From 71f4845c1366d54de407804d0ed98a237b4fb325 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 11 Aug 2023 13:51:29 +0200 Subject: [PATCH] Rubocop: Update 1.28.2->1.50.0; requires Ruby 2.6 --- rubocop.yml | 10 ++++++---- voxpupuli-test.gemspec | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/rubocop.yml b/rubocop.yml index f6483be..afa4cb0 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -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: @@ -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) @@ -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/' diff --git a/voxpupuli-test.gemspec b/voxpupuli-test.gemspec index 0aafbd2..e6ab2d0 100644 --- a/voxpupuli-test.gemspec +++ b/voxpupuli-test.gemspec @@ -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