Skip to content

Commit

Permalink
Rubocop: Update 1.28.2->1.50.0; requires Ruby 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Aug 11, 2023
1 parent 97f5a2a commit 71f4845
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ require:
- rubocop-rake

AllCops:
# Puppet agent 6 ships with ruby 2.5. Puppetserver 6 uses JRuby 9.2.x (Ruby 2.5 compatible) since version 6.1.0.
TargetRubyVersion: 2.5
# Puppetserver 7 uses Jruby 9.3 which is compatible to C Ruby 2.6
TargetRubyVersion: 2.6
Include:
- '**/*.rb'
Exclude:
Expand Down Expand Up @@ -567,8 +567,6 @@ Naming/MethodParameterName:
AllowedNames: ['at', 'by', 'to', 'db', 'id', 'in', 'io', 'ip', 'of', 'on', 'os', 'pp', 'is']

# New cops available after rubocop upgrade
Gemspec/DateAssignment: # (new in 1.10)
Enabled: true
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DeprecatedConstants: # (new in 1.8)
Expand Down Expand Up @@ -665,3 +663,7 @@ RSpec/Rails/AvoidSetupHook: # new in 2.4
Enabled: true
RSpec/ImplicitSubject:
Enabled: false
# new configurations since rubocop 1.50.0
RSpec/NoExpectationExample:
Exclude:
- 'spec/acceptance/'
7 changes: 4 additions & 3 deletions voxpupuli-test.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'rspec-puppet-utils', '~> 3.4'

# Rubocop
# newest versions that still support Ruby 2.5
s.add_runtime_dependency 'rubocop', '~> 1.28.2'
s.add_runtime_dependency 'rubocop-rspec', '~> 2.10.0'
# newest versions that still support Ruby 2.6
# jruby 9.3 in Puppetserver 7 is compatible with C Ruby 2.6
s.add_runtime_dependency 'rubocop', '~> 1.50.0'
s.add_runtime_dependency 'rubocop-rspec', '~> 2.20.0'
s.add_runtime_dependency 'rubocop-rake', '~> 0.6.0'

# Linting
Expand Down

0 comments on commit 71f4845

Please sign in to comment.