|
68 | 68 | # |
69 | 69 | # Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby. |
70 | 70 | GEM_PATH = ->(ruby_version, gem_name, gem_version) do |
71 | | - glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/gems/#{gem_name}-#{gem_version}*").first |
72 | | - alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*").first |
| 71 | + glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/gems/#{gem_name}-#{gem_version}*").first |
| 72 | + alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*").first |
73 | 73 | glob || alt_glob |
74 | 74 | end |
75 | 75 |
|
|
83 | 83 | # |
84 | 84 | # Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby. |
85 | 85 | SPEC_PATH = ->(ruby_version, gem_name, gem_version) do |
86 | | - glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first |
87 | | - alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*/**/*.gemspec").first |
| 86 | + glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first |
| 87 | + alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*/**/*.gemspec").first |
88 | 88 | glob || alt_glob |
89 | 89 | end |
90 | 90 |
|
@@ -199,13 +199,13 @@ def initialize(workspace_name:, |
199 | 199 | # ruby/2.6.0/gems for all minor versions of 2.6.* |
200 | 200 | @ruby_version ||= begin |
201 | 201 | version_string = (RUBY_VERSION.split('.')[0..1] << 0).join('.') |
202 | | - if File.exist?("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{version_string}") |
| 202 | + if File.exist?("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{version_string}") |
203 | 203 | version_string |
204 | 204 | else |
205 | | - if File.exist?("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{version_string}+0") |
| 205 | + if File.exist?("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{version_string}+0") |
206 | 206 | version_string + "+0" |
207 | 207 | else |
208 | | - raise "Cannot find directory named #{version_string} within lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}" |
| 208 | + raise "Cannot find directory named #{version_string} within lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}" |
209 | 209 | end |
210 | 210 | end |
211 | 211 | end |
|
0 commit comments