1
0
Fork 0
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:
David Rodríguez 2019-08-15 18:12:34 +02:00 committed by Hiroshi SHIBATA
parent e38994d2f7
commit 91c63828f7
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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!")