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

[bundler/bundler] Extract single gem installation logic

https://github.com/bundler/bundler/commit/7888d621c8
This commit is contained in:
David Rodríguez 2019-08-15 17:07:48 +02:00 committed by Hiroshi SHIBATA
parent 20af44c277
commit aef5509139
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -314,14 +314,18 @@ module Spec
"#{gem_repo}/gems/#{g}.gem"
end
raise "OMG `#{path}` does not exist!" unless File.exist?(path)
gem_command! :install, "--no-document --ignore-dependencies '#{path}'"
install_gem(path)
bundler_path && bundler_path.rmtree
end
end
def install_gem(path)
raise "OMG `#{path}` does not exist!" unless File.exist?(path)
gem_command! :install, "--no-document --ignore-dependencies '#{path}'"
end
def with_gem_path_as(path)
backup = ENV.to_hash
ENV["GEM_HOME"] = path.to_s