Skip to content

Commit

Permalink
Fix compatibility with rspec-puppet 4+
Browse files Browse the repository at this point in the history
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:
puppetlabs/rspec-puppet#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.
  • Loading branch information
smortex committed Nov 2, 2023
1 parent cf42f96 commit 9a513ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion onceover.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 0 additions & 2 deletions templates/spec_helper.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down

0 comments on commit 9a513ab

Please sign in to comment.