diff --git a/Gemfile b/Gemfile index 6660ec71..a123b942 100644 --- a/Gemfile +++ b/Gemfile @@ -30,11 +30,9 @@ 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 'rubocop-factory_bot', '!= 2.26.0', require: false - gem 'rubocop-rspec_rails', '!= 2.29.0', require: false gem 'fakefs' gem 'yard' 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