From 427ca5cf03bb4ea3c2df511ecc4f96d3508e5c6f Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Tue, 25 Feb 2025 11:37:11 +0000 Subject: [PATCH 1/2] (CAT-2113) Adjusting minimum ruby version required Following investigation on an issue that prevented puppet-resource_api from consuming latest puppetlabs_spec_helper, it was noted that this repository assumes Ruby 2.7 as the minimum required version, causing some repositories to fail their testing environment builds due to the fact that they are consuming some form of Ruby 2.6 in order to test properly against puppetserver. This commit adjusts the required Ruby version to the standard used across other modules/tools of the ecosystem. --- puppetlabs_spec_helper.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppetlabs_spec_helper.gemspec b/puppetlabs_spec_helper.gemspec index 264f7111..84b48bf9 100644 --- a/puppetlabs_spec_helper.gemspec +++ b/puppetlabs_spec_helper.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.executables = Dir['bin/**/*'].map { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.required_ruby_version = Gem::Requirement.new('>= 2.7') + spec.required_ruby_version = Gem::Requirement.new('>= 2.6') spec.add_runtime_dependency 'mocha', '>= 1.0', '< 3' spec.add_runtime_dependency 'pathspec', '>= 0.2', '< 3' From 7868b39a2af729a692ed20ee8d0855c4fe112fd3 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Tue, 25 Feb 2025 12:00:44 +0000 Subject: [PATCH 2/2] regenerating rubocop_todo --- .rubocop_todo.yml | 53 +++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9a6ef1e6..9906703f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,18 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-06-28 12:36:37 UTC using RuboCop version 1.64.1. +# on 2025-02-25 12:00:05 UTC using RuboCop version 1.64.1. # 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 # versions of RuboCop, may require this file to be generated again. +# Offense count: 1 +# Configuration parameters: Severity, Include. +# Include: **/*.gemspec +Gemspec/RequiredRubyVersion: + Exclude: + - 'puppetlabs_spec_helper.gemspec' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Width, AllowedPatterns. @@ -18,13 +25,6 @@ Lint/MixedRegexpCaptureTypes: Exclude: - 'Gemfile' -# Offense count: 7 -# Configuration parameters: Prefixes, AllowedPatterns. -# Prefixes: when, with, without -RSpec/ContextWording: - Exclude: - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb' - # Offense count: 1 # Configuration parameters: IgnoredMetadata. RSpec/DescribeClass: @@ -36,55 +36,31 @@ RSpec/DescribeClass: - '**/spec/views/**/*' - 'spec/acceptance/smoke_spec.rb' -# Offense count: 12 +# Offense count: 7 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 13 -# Offense count: 1 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. -# Include: **/*_spec*rb*, **/spec/**/* -RSpec/FilePath: - Exclude: - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb' - -# Offense count: 8 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: implicit, each, example -RSpec/HookArgument: - Exclude: - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb' - -# Offense count: 7 +# Offense count: 5 # Configuration parameters: . # SupportedStyles: have_received, receive RSpec/MessageSpies: EnforcedStyle: receive -# Offense count: 8 +# Offense count: 5 RSpec/MultipleExpectations: Max: 3 -# Offense count: 14 +# Offense count: 7 # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 5 -# Offense count: 1 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. -# Include: **/*_spec.rb -RSpec/SpecFilePathFormat: - Exclude: - - '**/spec/routing/**/*' - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb' - -# Offense count: 7 +# Offense count: 5 RSpec/StubbedMock: Exclude: - 'spec/unit/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals_spec.rb' - 'spec/unit/puppetlabs_spec_helper/tasks/fixture_helpers_spec.rb' - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb' # Offense count: 2 Security/Eval: @@ -122,11 +98,10 @@ Style/RedundantRegexpEscape: Exclude: - 'Gemfile' -# Offense count: 3 +# Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowInnerSlashes. # SupportedStyles: slashes, percent_r, mixed Style/RegexpLiteral: Exclude: - 'Gemfile' - - 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'