From 962013fb285631b61092ddc5ea39088bf2bdc0c9 Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen Date: Thu, 13 Jun 2024 13:24:49 +0100 Subject: [PATCH 1/3] Revert "(maint) Exclude breaking rubocop versions" --- Gemfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gemfile b/Gemfile index 6660ec71..99374e92 100644 --- a/Gemfile +++ b/Gemfile @@ -33,8 +33,6 @@ group :development do gem 'rubocop', '~> 1.50.0', require: false gem 'rubocop-rspec', '~> 2.19', require: false gem 'rubocop-performance', '~> 1.16', require: false - gem 'rubocop-factory_bot', '!= 2.26.0', require: false - gem 'rubocop-rspec_rails', '!= 2.29.0', require: false gem 'fakefs' gem 'yard' From 173ba1792874a15da318ee4e14450e685abae23e Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen Date: Thu, 13 Jun 2024 13:25:39 +0100 Subject: [PATCH 2/3] Update rubocop dependencies --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 99374e92..a123b942 100644 --- a/Gemfile +++ b/Gemfile @@ -30,8 +30,8 @@ group :development do gem 'rake' gem 'rspec', '~> 3.1' gem 'rspec-its', '~> 1.0' - gem 'rubocop', '~> 1.50.0', require: false - gem 'rubocop-rspec', '~> 2.19', require: false + gem 'rubocop', '~> 1.64.0', require: false + gem 'rubocop-rspec', '~> 3.0', require: false gem 'rubocop-performance', '~> 1.16', require: false gem 'fakefs' From 02f4c47ced40ca63202731dd5d3e4a68407532c2 Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen Date: Thu, 20 Jun 2024 12:27:33 +0100 Subject: [PATCH 3/3] Fix ruby cop warning Signed-off-by: Gavin Didrichsen --- .../puppetlabs_spec/puppet_internals.rb | 2 +- lib/puppetlabs_spec_helper/tasks/fixtures.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb b/lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb index a50e3b84..09ffc159 100644 --- a/lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb +++ b/lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb @@ -39,7 +39,7 @@ def function_method(name, parts = {}) # exposed hack. return nil unless Puppet::Parser::Functions.function(name) - scope.method("function_#{name}".to_sym) + scope.method(:"function_#{name}") end module_function :function_method end diff --git a/lib/puppetlabs_spec_helper/tasks/fixtures.rb b/lib/puppetlabs_spec_helper/tasks/fixtures.rb index 8f82e176..6ecc0283 100644 --- a/lib/puppetlabs_spec_helper/tasks/fixtures.rb +++ b/lib/puppetlabs_spec_helper/tasks/fixtures.rb @@ -317,7 +317,7 @@ def download_items(items) end end # wait for all the threads to finish - items.each { |_remote, opts| opts[:thread].join } + items.each_value { |opts| opts[:thread].join } end # @param target [String] - the target directory @@ -427,12 +427,12 @@ def download_module(remote, opts) desc 'Clean up the fixtures directory' task :spec_clean do - repositories.each do |_remote, opts| + repositories.each_value do |opts| target = opts['target'] FileUtils.rm_rf(target) end - forge_modules.each do |_remote, opts| + forge_modules.each_value do |opts| target = opts['target'] FileUtils.rm_rf(target) end @@ -446,7 +446,7 @@ def download_module(remote, opts) desc 'Clean up any fixture symlinks' task :spec_clean_symlinks do - fixtures('symlinks').each do |_source, opts| + fixtures('symlinks').each_value do |opts| target = opts['target'] FileUtils.rm_f(target) end