Skip to content

Commit fa0e42a

Browse files
authored
Merge pull request #9398 from joshcooper/ruby33
(PUP-12029) Prepare for Ruby 3.3
2 parents 1a0ec94 + ba63ca0 commit fa0e42a

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ group(:features) do
3535
# requires native ldap headers/libs
3636
# gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby]
3737
gem 'puppetserver-ca', '~> 2.0', require: false
38+
gem 'syslog', '~> 0.1.1', require: false, platforms: [:ruby]
3839
gem 'CFPropertyList', ['>= 3.0.6', '< 4'], require: false
3940
end
4041

puppet.gemspec

+10-9
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ Gem::Specification.new do |spec|
2020
spec.require_paths = ["lib"]
2121
spec.summary = "Puppet, an automated configuration management tool"
2222
spec.specification_version = 4
23-
spec.add_runtime_dependency(%q<facter>, [">= 4.3.0", "< 5"])
24-
spec.add_runtime_dependency(%q<semantic_puppet>, "~> 1.0")
25-
spec.add_runtime_dependency(%q<fast_gettext>, ">= 2.1", "< 4")
26-
spec.add_runtime_dependency(%q<locale>, "~> 2.1")
27-
spec.add_runtime_dependency(%q<multi_json>, "~> 1.13")
28-
spec.add_runtime_dependency(%q<puppet-resource_api>, "~> 1.5")
29-
spec.add_runtime_dependency(%q<concurrent-ruby>, "~> 1.0")
30-
spec.add_runtime_dependency(%q<deep_merge>, "~> 1.0")
31-
spec.add_runtime_dependency(%q<scanf>, "~> 1.0")
23+
spec.add_runtime_dependency('concurrent-ruby', '~> 1.0')
24+
spec.add_runtime_dependency('deep_merge', '~> 1.0')
25+
spec.add_runtime_dependency('facter', ['>= 4.3.0', '< 5'])
26+
spec.add_runtime_dependency('fast_gettext', '>= 2.1', '< 4')
27+
spec.add_runtime_dependency('getoptlong', '~> 0.2.0')
28+
spec.add_runtime_dependency('locale', '~> 2.1')
29+
spec.add_runtime_dependency('multi_json', '~> 1.13')
30+
spec.add_runtime_dependency('puppet-resource_api', '~> 1.5')
31+
spec.add_runtime_dependency('scanf', '~> 1.0')
32+
spec.add_runtime_dependency('semantic_puppet', '~> 1.0')
3233

3334
platform = spec.platform.to_s
3435
if platform == 'universal-darwin'

spec/unit/interface_spec.rb

+15-5
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,22 @@
129129
describe 'when raising NoMethodErrors' do
130130
subject { described_class.new(:foo, '1.0.0') }
131131

132-
it 'includes the face name in the error message' do
133-
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.name}/)
134-
end
132+
if RUBY_VERSION.to_f >= 3.3
133+
it 'includes the face name in the error message' do
134+
expect { subject.boombaz }.to raise_error(NoMethodError, /for an instance of Puppet::Interface/)
135+
end
136+
137+
it 'includes the face version in the error message' do
138+
expect { subject.boombaz }.to raise_error(NoMethodError, /for an instance of Puppet::Interface/)
139+
end
140+
else
141+
it 'includes the face name in the error message' do
142+
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.name}/)
143+
end
135144

136-
it 'includes the face version in the error message' do
137-
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.version}/)
145+
it 'includes the face version in the error message' do
146+
expect { subject.boombaz }.to raise_error(NoMethodError, /#{subject.version}/)
147+
end
138148
end
139149
end
140150

0 commit comments

Comments
 (0)