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:
parent
20af44c277
commit
aef5509139
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue