Skip to content

Commit

Permalink
Merge pull request #708 from cthorn42/maint/main/PA-5666_fix_up_pl-ru…
Browse files Browse the repository at this point in the history
…by-patch

(PA-5666) Fix pl-ruby-patch's filename
  • Loading branch information
joshcooper authored Aug 1, 2023
2 parents 2db5815 + cd2c821 commit 5b0d814
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion configs/components/pl-ruby-patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@
sed_command = %(s|Gem.ruby.shellsplit|& << '-r/opt/puppetlabs/puppet/share/doc/rbconfig-#{settings[:ruby_version]}-orig.rb'|)
end

# rubygems switched which file has the command we need to patch starting with ruby 3.2.2
if Gem::Version.new(settings[:ruby_version]) >= Gem::Version.new('3.2.2')
filename = 'builder.rb'
else
filename = 'ext_conf_builder.rb'
end

pkg.build do
[
%(#{platform[:sed]} -i "#{sed_command}" #{base_ruby}/rubygems/ext/ext_conf_builder.rb)
%(#{platform[:sed]} -i "#{sed_command}" #{base_ruby}/rubygems/ext/#{filename})
]
end
end
Expand Down

0 comments on commit 5b0d814

Please sign in to comment.