Merge "Disable litmus when Ruby 3"
This commit is contained in:
commit
62e5f6fdf5
@ -3,7 +3,11 @@ require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
require 'puppet-syntax/tasks/puppet-syntax'
|
||||
require 'metadata-json-lint/rake_task'
|
||||
require 'puppet_litmus/rake_tasks'
|
||||
begin
|
||||
require 'puppet_litmus/rake_tasks'
|
||||
rescue LoadError
|
||||
# In case puppet_litmus does not support the OS (eg. CentOS Stream 9)
|
||||
end
|
||||
require 'json'
|
||||
|
||||
modname = JSON.parse(open('metadata.json').read)['name'].split('-')[1]
|
||||
|
@ -50,7 +50,13 @@ Gem::Specification.new do |spec|
|
||||
spec.add_dependency 'pathspec', ['< 1.0.0']
|
||||
end
|
||||
|
||||
spec.add_dependency 'bolt'
|
||||
spec.add_dependency 'puppet_litmus'
|
||||
# NOTE(tkajinam): The latest bolt does not support Ruby 3 yet. Disable litmus
|
||||
# so that we can run unit tests in CentOS Stream 9 which has
|
||||
# Ruby 3.
|
||||
if RUBY_VERSION < '3.0.0'
|
||||
spec.add_dependency 'bolt'
|
||||
spec.add_dependency 'puppet_litmus', ['0.33.2']
|
||||
end
|
||||
|
||||
spec.add_dependency 'serverspec'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user