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/.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/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/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' 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