diff options
Diffstat (limited to 'spec/support/rubygems_ext.rb')
-rw-r--r-- | spec/support/rubygems_ext.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index d237897b67..ee9c750a52 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -5,13 +5,13 @@ require_relative "path" module Spec module Rubygems DEV_DEPS = { - "automatiek" => "~> 0.2.0", + "automatiek" => "~> 0.3.0", "parallel_tests" => "~> 2.29", "rake" => "~> 12.0", "ronn" => "~> 0.7.3", "rspec" => "~> 3.8", - "rubocop" => "= 0.74.0", - "rubocop-performance" => "= 1.4.0", + "rubocop" => "= 0.77.0", + "rubocop-performance" => "= 1.5.1", }.freeze DEPS = { @@ -39,7 +39,9 @@ module Spec end def gem_load(gem_name, bin_container) - require_relative "../rubygems/rubygems" + require_relative "rubygems_version_manager" + RubygemsVersionManager.new(ENV["RGV"]).switch + gem_load_and_activate(gem_name, bin_container) end @@ -65,7 +67,7 @@ module Spec FileUtils.mkdir_p(Path.base_system_gems) puts "installing gems for the tests to use..." install_gems(DEPS) - manifest_path.open("w") {|f| f << manifest.join } + manifest_path.open("wb") {|f| f << manifest.join } end FileUtils.mkdir_p(Path.home) @@ -97,7 +99,7 @@ module Spec no_reqs.map!(&:first) reqs.map! {|name, req| "'#{name}:#{req}'" } deps = reqs.concat(no_reqs).join(" ") - gem = Path.gem_bin + gem = ENV["GEM_COMMAND"] || "#{Gem.ruby} -S gem --backtrace" cmd = "#{gem} install #{deps} --no-document --conservative" system(cmd) || raise("Installing gems #{deps} for the tests to use failed!") end |