From 18b000ed83e29d164570c1373c3631f5f2137854 Mon Sep 17 00:00:00 2001 From: ta-ando Date: Thu, 16 Oct 2025 17:27:20 +0900 Subject: [PATCH 1/2] =?UTF-8?q?bizside=5Ftest=5Fapp=E3=81=AE=E3=82=AB?= =?UTF-8?q?=E3=83=90=E3=83=AC=E3=83=83=E3=82=B8=E5=87=BA=E5=8A=9B=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bizside_test_app/.gitignore | 3 +++ bizside_test_app/test/test_helper.rb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/bizside_test_app/.gitignore b/bizside_test_app/.gitignore index eb7a677..f0403b4 100644 --- a/bizside_test_app/.gitignore +++ b/bizside_test_app/.gitignore @@ -14,4 +14,7 @@ /log/*.log /tmp +# test coverage output dir +/coverage + /Gemfile.lock diff --git a/bizside_test_app/test/test_helper.rb b/bizside_test_app/test/test_helper.rb index 7b4aa93..293d7cc 100644 --- a/bizside_test_app/test/test_helper.rb +++ b/bizside_test_app/test/test_helper.rb @@ -1,3 +1,5 @@ +require 'bizside/test_help' + ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' From f157ce0d6fb4de2ef9629b30158a717b5ae65a10 Mon Sep 17 00:00:00 2001 From: ta-ando Date: Fri, 17 Oct 2025 10:55:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?##=203.1.2=20=20=20*=20=E3=82=AB=E3=83=90?= =?UTF-8?q?=E3=83=AC=E3=83=83=E3=82=B8=E3=83=AC=E3=83=9D=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E5=87=BA=E5=8A=9B=E3=81=8B=E3=82=89=20rcov=20?= =?UTF-8?q?=E5=BD=A2=E5=BC=8F=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.md | 4 ++++ bizside_test_app/Gemfile | 3 +-- lib/bizside/coverage/launch.rb | 15 ++------------- lib/bizside/coverage/rcov_formatter.rb | 15 --------------- lib/bizside/version.rb | 2 +- 5 files changed, 8 insertions(+), 31 deletions(-) delete mode 100755 lib/bizside/coverage/rcov_formatter.rb diff --git a/HISTORY.md b/HISTORY.md index c5e158c..7aabd72 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.1.2 + * カバレッジレポートの出力から rcov 形式を削除 + * simplecov-rcov は(他の箇所で使っていなければ)不使用になるので、Gemfile から削除してください + ## 3.1.1 * ジョブ監査ログに開始時刻と終了時刻を追加 diff --git a/bizside_test_app/Gemfile b/bizside_test_app/Gemfile index 49781f8..b9f6c64 100644 --- a/bizside_test_app/Gemfile +++ b/bizside_test_app/Gemfile @@ -48,8 +48,7 @@ group :test do gem 'puma' gem 'rails-controller-testing' gem 'RedCloth' - gem 'simplecov' - gem 'simplecov-rcov' + gem 'simplecov', require: false gem 'webmock' end diff --git a/lib/bizside/coverage/launch.rb b/lib/bizside/coverage/launch.rb index 0df21a1..cc3bdb7 100644 --- a/lib/bizside/coverage/launch.rb +++ b/lib/bizside/coverage/launch.rb @@ -4,7 +4,7 @@ class Launch def self.load if ENV["COVERAGE"].to_s.downcase == 'true' and ENV['ACCEPTANCE_TEST'].to_s.downcase == 'true' - setup() + require 'simplecov' SimpleCov.start 'rails' do SimpleCov.command_name(ENV['COMMAND_NAME']) if ENV['COMMAND_NAME'] @@ -15,21 +15,10 @@ def self.load def self.load_from_test_helper if ENV["COVERAGE"] == 'true' - setup() + require 'simplecov' SimpleCov.start 'rails' end end - - def self.setup - require 'simplecov' - require 'simplecov-rcov' - require_relative 'rcov_formatter' - SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - Bizside::Coverage::RcovFormatter - ]) - end - private_class_method :setup end end end diff --git a/lib/bizside/coverage/rcov_formatter.rb b/lib/bizside/coverage/rcov_formatter.rb deleted file mode 100755 index 6d9e5f7..0000000 --- a/lib/bizside/coverage/rcov_formatter.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Bizside - module Coverage - class RcovFormatter < SimpleCov::Formatter::RcovFormatter - - private - - def write_file(template, output_filename, binding) - rcov_result = template.result( binding ).force_encoding('UTF-8') - File.open( output_filename, "w" ) do |file_result| - file_result.write rcov_result - end - end - end - end -end diff --git a/lib/bizside/version.rb b/lib/bizside/version.rb index 005ed0b..3a8b6de 100644 --- a/lib/bizside/version.rb +++ b/lib/bizside/version.rb @@ -1,3 +1,3 @@ module Bizside - VERSION = '3.1.1' + VERSION = '3.1.2' end