Skip to content

Commit

Permalink
Merge pull request #9398 from joshcooper/ruby33
Browse files Browse the repository at this point in the history
(PUP-12029) Prepare for Ruby 3.3
  • Loading branch information
mhashizume authored Jun 21, 2024
2 parents 1a0ec94 + ba63ca0 commit fa0e42a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ group(:features) do
# requires native ldap headers/libs
# gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby]
gem 'puppetserver-ca', '~> 2.0', require: false
gem 'syslog', '~> 0.1.1', require: false, platforms: [:ruby]
gem 'CFPropertyList', ['>= 3.0.6', '< 4'], require: false
end

Expand Down
19 changes: 10 additions & 9 deletions puppet.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.summary = "Puppet, an automated configuration management tool"
spec.specification_version = 4
spec.add_runtime_dependency(%q<facter>, [">= 4.3.0", "< 5"])
spec.add_runtime_dependency(%q<semantic_puppet>, "~> 1.0")
spec.add_runtime_dependency(%q<fast_gettext>, ">= 2.1", "< 4")
spec.add_runtime_dependency(%q<locale>, "~> 2.1")
spec.add_runtime_dependency(%q<multi_json>, "~> 1.13")
spec.add_runtime_dependency(%q<puppet-resource_api>, "~> 1.5")
spec.add_runtime_dependency(%q<concurrent-ruby>, "~> 1.0")
spec.add_runtime_dependency(%q<deep_merge>, "~> 1.0")
spec.add_runtime_dependency(%q<scanf>, "~> 1.0")
spec.add_runtime_dependency('concurrent-ruby', '~> 1.0')
spec.add_runtime_dependency('deep_merge', '~> 1.0')
spec.add_runtime_dependency('facter', ['>= 4.3.0', '< 5'])
spec.add_runtime_dependency('fast_gettext', '>= 2.1', '< 4')
spec.add_runtime_dependency('getoptlong', '~> 0.2.0')
spec.add_runtime_dependency('locale', '~> 2.1')
spec.add_runtime_dependency('multi_json', '~> 1.13')
spec.add_runtime_dependency('puppet-resource_api', '~> 1.5')
spec.add_runtime_dependency('scanf', '~> 1.0')
spec.add_runtime_dependency('semantic_puppet', '~> 1.0')

platform = spec.platform.to_s
if platform == 'universal-darwin'
Expand Down
20 changes: 15 additions & 5 deletions spec/unit/interface_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,22 @@
describe 'when raising NoMethodErrors' do
subject { described_class.new(:foo, '1.0.0') }

it 'includes the face name in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.name}/)
end
if RUBY_VERSION.to_f >= 3.3
it 'includes the face name in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /for an instance of Puppet::Interface/)
end

it 'includes the face version in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /for an instance of Puppet::Interface/)
end
else
it 'includes the face name in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.name}/)
end

it 'includes the face version in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.version}/)
it 'includes the face version in the error message' do
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.version}/)
end
end
end

Expand Down

0 comments on commit fa0e42a

Please sign in to comment.