From 69934aeb8d7948c4ca590b7092504c41d8bce6ac Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 Sep 2016 00:57:53 +0000 Subject: rubygems 2.6.7 * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems to 2.6.7. Release note of 2.6.7: https://github.com/rubygems/rubygems/commit/60f35bd1d2359fc30301d2d4cd72bc6833e8d12a git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/test_case.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/rubygems/test_case.rb') diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index f7ae97cd8d..3e1924ac63 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -25,6 +25,7 @@ unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty? gem 'json' end +require 'bundler' require 'minitest/autorun' require 'rubygems/deprecate' @@ -222,17 +223,25 @@ class Gem::TestCase < MiniTest::Unit::TestCase @orig_gem_vendor = ENV['GEM_VENDOR'] @orig_gem_spec_cache = ENV['GEM_SPEC_CACHE'] @orig_rubygems_gemdeps = ENV['RUBYGEMS_GEMDEPS'] + @orig_bundle_gemfile = ENV['BUNDLE_GEMFILE'] @orig_rubygems_host = ENV['RUBYGEMS_HOST'] + @orig_bundle_disable_postit = ENV['BUNDLE_DISABLE_POSTIT'] ENV.keys.find_all { |k| k.start_with?('GEM_REQUIREMENT_') }.each do |k| ENV.delete k end @orig_gem_env_requirements = ENV.to_hash ENV['GEM_VENDOR'] = nil + ENV['BUNDLE_DISABLE_POSTIT'] = 'true' @current_dir = Dir.pwd @fetcher = nil - @ui = Gem::MockGemUi.new + + Bundler.ui = Bundler::UI::Silent.new + @ui = Gem::MockGemUi.new + # This needs to be a new instance since we call use_ui(@ui) when we want to + # capture output + Gem::DefaultUserInteraction.ui = Gem::MockGemUi.new tmpdir = File.expand_path Dir.tmpdir tmpdir.untaint @@ -323,6 +332,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase Gem.loaded_specs.clear Gem.clear_default_specs Gem::Specification.unresolved_deps.clear + Bundler.reset! Gem.configuration.verbose = true Gem.configuration.update_sources = true @@ -394,7 +404,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase ENV['GEM_VENDOR'] = @orig_gem_vendor ENV['GEM_SPEC_CACHE'] = @orig_gem_spec_cache ENV['RUBYGEMS_GEMDEPS'] = @orig_rubygems_gemdeps + ENV['BUNDLE_GEMFILE'] = @orig_bundle_gemfile ENV['RUBYGEMS_HOST'] = @orig_rubygems_host + ENV['BUNDLE_DISABLE_POSTIT'] = @orig_bundle_disable_postit Gem.ruby = @orig_ruby if @orig_ruby -- cgit v1.2.3