mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Extract a gem_bin
path helper
https://github.com/bundler/bundler/commit/8eedbecac0
This commit is contained in:
parent
e38994d2f7
commit
91c63828f7
2 changed files with 5 additions and 1 deletions
|
@ -17,6 +17,10 @@ module Spec
|
|||
@bindir ||= root.join(ruby_core? ? "libexec" : "exe")
|
||||
end
|
||||
|
||||
def gem_bin
|
||||
@gem_bin ||= ruby_core? ? ENV["BUNDLE_GEM"] : "#{Gem.ruby} -S gem"
|
||||
end
|
||||
|
||||
def spec_dir
|
||||
@spec_dir ||= root.join(ruby_core? ? "spec/bundler" : "spec")
|
||||
end
|
||||
|
|
|
@ -81,7 +81,7 @@ module Spec
|
|||
no_reqs.map!(&:first)
|
||||
reqs.map! {|name, req| "'#{name}:#{req}'" }
|
||||
deps = reqs.concat(no_reqs).join(" ")
|
||||
gem = Spec::Path.ruby_core? ? ENV["BUNDLE_GEM"] : "#{Gem.ruby} -S gem"
|
||||
gem = Spec::Path.gem_bin
|
||||
cmd = "#{gem} install #{deps} --no-document --conservative"
|
||||
puts cmd
|
||||
system(cmd) || raise("Installing gems #{deps} for the tests to use failed!")
|
||||
|
|
Loading…
Reference in a new issue