diff --git a/.rubocop.yml b/.rubocop.yml index 1407be2..20f05fa 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ AllCops: - TargetRubyVersion: 2.5 DisplayCopNames: true + NewCops: enable + TargetRubyVersion: 2.5 Bundler/DuplicatedGem: Enabled: false diff --git a/lib/simplecov-html.rb b/lib/simplecov-html.rb index 7e725f5..2887811 100644 --- a/lib/simplecov-html.rb +++ b/lib/simplecov-html.rb @@ -10,8 +10,8 @@ # Ensure we are using a compatible version of SimpleCov major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i) if major < 0 || minor < 9 || patch < 0 - raise "The version of SimpleCov you are using is too old. "\ - "Please update with `gem install simplecov` or `bundle update simplecov`" + raise "The version of SimpleCov you are using is too old. " \ + "Please update with `gem install simplecov` or `bundle update simplecov`" end module SimpleCov @@ -94,7 +94,7 @@ def asset_inline(name) ".css" => "text/css", }[File.extname(name)] - base64_content = Base64.strict_encode64 File.open(path).read + base64_content = Base64.strict_encode64 File.read(path) "data:#{content_type};base64,#{base64_content}" end diff --git a/simplecov-html.gemspec b/simplecov-html.gemspec index f2d780e..48103af 100644 --- a/simplecov-html.gemspec +++ b/simplecov-html.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |gem| f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile assets .rubocop.yml Guardfile]) end end - gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } gem.require_paths = ["lib"] + gem.metadata["rubygems_mfa_required"] = "true" end