1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Refactor destdir checks

https://github.com/rubygems/rubygems/commit/ca956c0de2
This commit is contained in:
David Rodríguez 2022-07-18 13:39:06 +02:00 committed by git
parent fcfb3ce371
commit fae0d60120

View file

@ -165,7 +165,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.execute
bundler_spec.executables.each do |e|
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', bundler_spec.full_name, bundler_spec.bindir, e
assert_path_exist prepend_destdir(destdir, File.join(@gemhome, 'gems', bundler_spec.full_name, bundler_spec.bindir, e))
end
end
@ -280,7 +280,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.install_default_bundler_gem bin_dir
bundler_spec.executables.each do |e|
assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', bundler_spec.full_name, bundler_spec.bindir, e
assert_path_exist prepend_destdir(destdir, File.join(@gemhome, 'gems', bundler_spec.full_name, bundler_spec.bindir, e))
end
ensure
FileUtils.chmod "+w", @gemhome
@ -466,4 +466,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
def bundler_version
bundler_spec.version
end
def prepend_destdir(destdir, path)
File.join(destdir, path.gsub(/^[a-zA-Z]:/, ''))
end
end unless Gem.java_platform?