Skip to content

Commit

Permalink
Enable all new cops and autocorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Dec 26, 2023
1 parent 34cec9e commit ccc0b7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AllCops:
TargetRubyVersion: 2.5
DisplayCopNames: true
NewCops: enable
TargetRubyVersion: 2.5

Bundler/DuplicatedGem:
Enabled: false
Expand Down
6 changes: 3 additions & 3 deletions lib/simplecov-html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion simplecov-html.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ccc0b7e

Please sign in to comment.