diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-18 13:33:25 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-18 13:33:25 +0000 |
commit | d04963501bc057685220fa1160fb9a102dd46d57 (patch) | |
tree | f01135aaac7519197f6a8992f387176a65283d86 /spec/bundler/support | |
parent | bef0c0a3678d07ce40f147051fba092ee30da640 (diff) | |
download | ruby-d04963501bc057685220fa1160fb9a102dd46d57.tar.gz |
Use ENV["BUNDLE_GEM"] instead of gem command provided by system ruby.
It break the examples of bundler. Because some examples detect the
different version of system ruby than test target version like trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/support')
-rw-r--r-- | spec/bundler/support/rubygems_ext.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/support/rubygems_ext.rb b/spec/bundler/support/rubygems_ext.rb index c18f7650fc..42f887f268 100644 --- a/spec/bundler/support/rubygems_ext.rb +++ b/spec/bundler/support/rubygems_ext.rb @@ -59,10 +59,11 @@ 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" cmd = if Gem::VERSION < "2.0.0" - "gem install #{deps} --no-rdoc --no-ri --conservative" + "#{gem} install #{deps} --no-rdoc --no-ri --conservative" else - "gem install #{deps} --no-document --conservative" + "#{gem} install #{deps} --no-document --conservative" end puts cmd system(cmd) || raise("Installing gems #{deps} for the tests to use failed!") |