From 7e7466545950ba6b54440fb151e2b01f9a86be3b Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 28 May 2024 12:02:03 +0200 Subject: [PATCH] voxpupuli-rubocop: Require 2.7.0 --- .rubocop_todo.yml | 12 +++++++++--- Gemfile | 2 +- lib/beaker_puppet_helpers/install_utils.rb | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f521752..2af4c9c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-05-05 18:42:04 UTC using RuboCop version 1.50.2. +# on 2024-05-28 10:04:32 UTC using RuboCop version 1.63.5. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -11,13 +11,13 @@ RSpec/ExampleLength: Max: 9 -# Offense count: 72 +# Offense count: 77 # Configuration parameters: . # SupportedStyles: have_received, receive RSpec/MessageSpies: EnforcedStyle: receive -# Offense count: 24 +# Offense count: 26 RSpec/MultipleExpectations: Max: 7 @@ -25,3 +25,9 @@ RSpec/MultipleExpectations: # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 4 + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/ReceiveMessages: + Exclude: + - 'spec/beaker_puppet_helpers/dsl_spec.rb' diff --git a/Gemfile b/Gemfile index bb49184..b49ec48 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ group :development do end group :rubocop do - gem 'voxpupuli-rubocop', '~> 1.2' + gem 'voxpupuli-rubocop', '~> 2.7.0' end group :test do diff --git a/lib/beaker_puppet_helpers/install_utils.rb b/lib/beaker_puppet_helpers/install_utils.rb index 4e27273..91663a4 100644 --- a/lib/beaker_puppet_helpers/install_utils.rb +++ b/lib/beaker_puppet_helpers/install_utils.rb @@ -80,14 +80,14 @@ def self.puppet_package_name(host, prefer_aio: true) case host['packaging_platform'].split('-', 3).first when 'debian' # 12 started to ship puppet-agent with puppet as a legacy package - prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 12 ? 'puppet-agent' : 'puppet' + (prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 12) ? 'puppet-agent' : 'puppet' when /el|fedora|sles|cisco_/ prefer_aio ? 'puppet-agent' : 'puppet' when /freebsd/ 'sysutils/puppet8' when 'ubuntu' # 23.04 started to ship puppet-agent with puppet as a legacy package - prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 2304 ? 'puppet-agent' : 'puppet' + (prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 2304) ? 'puppet-agent' : 'puppet' else 'puppet' end