From 9a513ab45dfdb390ad694646bd9009e9631f8784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Thu, 2 Nov 2023 09:33:11 -1000 Subject: [PATCH 1/2] Fix compatibility with rspec-puppet 4+ These settings where used for compatibility with Puppet 7.10 and older (Puppet 7.10 was released more than 2 years ago). rspec-puppet 4 removed them: https://github.com/puppetlabs/rspec-puppet/pull/73 In order to avoid this kind of accident in the future, add an upper bound on the rspec-puppet dependency. Version 5.0.0 is also working with this change, so accept anything before 6.0.0. --- onceover.gemspec | 2 +- templates/spec_helper.rb.erb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/onceover.gemspec b/onceover.gemspec index 034fb311..5dde8d98 100644 --- a/onceover.gemspec +++ b/onceover.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'r10k', '>=2.1.0' s.add_runtime_dependency 'rake', '>= 10.0.0' s.add_runtime_dependency 'rspec', '>= 3.0.0' - s.add_runtime_dependency 'rspec-puppet', ">= 2.4.0" + s.add_runtime_dependency 'rspec-puppet', ">= 2.4.0", '< 6.0.0' s.add_runtime_dependency 'rspec_junit_formatter', '>= 0.2.0' s.add_runtime_dependency 'terminal-table', '>= 1.8.0' s.add_runtime_dependency 'versionomy', '>= 0.5.0' diff --git a/templates/spec_helper.rb.erb b/templates/spec_helper.rb.erb index 2b02b1c7..b1358a5a 100644 --- a/templates/spec_helper.rb.erb +++ b/templates/spec_helper.rb.erb @@ -19,11 +19,9 @@ RSpec.configure do |c| # Also add JUnit output in case people want to use that c.add_formatter('RSpecJUnitFormatter','<%= repo.tempdir %>/spec.xml') - c.parser = 'future' <% @formatters.each do |fm| -%> c.formatter = '<%= fm %>' <% end -%> - c.trusted_server_facts = true c.environmentpath = '<%= environmentpath %>' c.module_path = '<%= modulepath %>' <% if repo.hiera_config_file_relative_path %> From 5d48b686f0bef528ded140c5d5c2467227617e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Thu, 2 Nov 2023 09:46:43 -1000 Subject: [PATCH 2/2] Fix CI This old version of cucumber does not restrict the version of ActiveSupport it use and the latest ActiveSupport is not working with this old cucumber. Allow the latest cucumber versions which does not exhibit this problem. --- onceover.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onceover.gemspec b/onceover.gemspec index 5dde8d98..557b7468 100644 --- a/onceover.gemspec +++ b/onceover.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'terminal-table', '>= 1.8.0' s.add_runtime_dependency 'versionomy', '>= 0.5.0' - s.add_development_dependency 'cucumber', '~> 4.1' + s.add_development_dependency 'cucumber', '>= 4.1', '< 10.0.0' s.add_development_dependency 'pry', '~> 0.13.1' # We need to depend on rubocop <= 1.12 in order to support Ruby 2.4 (Puppet # 5). Once we drop support for Puppet 5 we can re-open this