-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintenance #37
base: main
Are you sure you want to change the base?
Maintenance #37
Changes from all commits
4d6c5ee
fd29a70
a7163da
11d0b43
eef8c17
ac6d560
f891038
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
AllCops: | ||
TargetRubyVersion: 2.5 | ||
TargetRubyVersion: 3.1 | ||
NewCops: enable | ||
SuggestExtensions: false | ||
|
||
Gemspec/DevelopmentDependencies: | ||
EnforcedStyle: gemspec | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cop was added, forcing all development dependencies out of the This rubocop config does the opposite, forcing all development dependencies to the |
||
|
||
Layout/LineLength: | ||
Exclude: | ||
- 'ruby_audit.gemspec' | ||
|
@@ -11,7 +14,7 @@ Metrics/MethodLength: | |
Max: 15 | ||
|
||
Metrics/BlockLength: | ||
IgnoredMethods: | ||
AllowedMethods: | ||
- describe | ||
|
||
Style/Documentation: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.3.0 | ||
3.3.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,12 @@ def advisories_for(name, type) | |
end | ||
end | ||
|
||
def check_ruby(ruby, &block) | ||
check(ruby, 'rubies', &block) | ||
def check_ruby(ruby, &) | ||
check(ruby, 'rubies', &) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rubocop encourages using "anonymous block forwarding", which was introduced in Ruby 3.1. |
||
end | ||
|
||
def check_rubygems(rubygems, &block) | ||
check(rubygems, 'gems', &block) | ||
def check_rubygems(rubygems, &) | ||
check(rubygems, 'gems', &) | ||
end | ||
|
||
def check(object, type = 'gems') | ||
|
@@ -28,12 +28,12 @@ def check(object, type = 'gems') | |
|
||
protected | ||
|
||
def each_advisory_path(&block) | ||
Dir.glob(File.join(@path, '{gems,rubies}', '*', '*.yml'), &block) | ||
def each_advisory_path(&) | ||
Dir.glob(File.join(@path, '{gems,rubies}', '*', '*.yml'), &) | ||
end | ||
|
||
def each_advisory_path_for(name, type = 'gems', &block) | ||
Dir.glob(File.join(@path, type, name, '*.yml'), &block) | ||
def each_advisory_path_for(name, type = 'gems', &) | ||
Dir.glob(File.join(@path, type, name, '*.yml'), &) | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec| | |
spec.version = RubyAudit::VERSION | ||
spec.authors = ['Jeff Cousens, Mike Saelim', 'John Zhang', 'Cristina Muñoz'] | ||
spec.email = ['[email protected]'] | ||
spec.metadata['rubygems_mfa_required'] = 'true' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rubocop encourages everyone to require MFA for rubygems operations like publishing gems. https://guides.rubygems.org/mfa-requirement-opt-in/ This will take effect after this gem is published to rubygems, with this line of metadata in. We already have MFA set up for Civis's account, right? |
||
|
||
spec.summary = 'Checks Ruby and RubyGems against known vulnerabilities.' | ||
spec.description = 'RubyAudit checks your current version of Ruby and ' \ | ||
|
@@ -17,7 +18,7 @@ Gem::Specification.new do |spec| | |
spec.homepage = 'https://github.com/civisanalytics/ruby_audit' | ||
spec.license = 'GPL-3.0-or-later' | ||
|
||
spec.required_ruby_version = ['>= 2.5', '< 3.4'] | ||
spec.required_ruby_version = ['>= 3.1', '< 3.4'] | ||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
|
@@ -27,6 +28,5 @@ Gem::Specification.new do |spec| | |
spec.add_development_dependency 'pry', '~> 0.14.1' | ||
spec.add_development_dependency 'rake', '~> 13.0' | ||
spec.add_development_dependency 'rspec', '~> 3.9' | ||
spec.add_development_dependency 'rubocop', '~> 1.9.1' | ||
spec.add_development_dependency 'timecop', '~> 0.9.1' | ||
spec.add_development_dependency 'rubocop', '~> 1.64.0' | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bundler-cache: true
on the previous step already runs abundle install
and caches the gems, so this isn't necessary.