From 69dc2ea46538f47ff5edda3bb16863034bd19069 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 21 Dec 2021 14:50:44 +0900 Subject: Merge RubyGems-3.3.0 and Bundler-2.3.0 --- spec/bundler/support/filters.rb | 1 + spec/bundler/support/hax.rb | 2 +- spec/bundler/support/helpers.rb | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'spec/bundler/support') diff --git a/spec/bundler/support/filters.rb b/spec/bundler/support/filters.rb index 3b91897a2e..96f2e2a274 100644 --- a/spec/bundler/support/filters.rb +++ b/spec/bundler/support/filters.rb @@ -28,6 +28,7 @@ RSpec.configure do |config| config.filter_run_excluding :git => RequirementChecker.against(git_version) config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) + config.filter_run_excluding :rubygems => RequirementChecker.against(Gem::VERSION) config.filter_run_excluding :ruby_repo => !ENV["GEM_COMMAND"].nil? config.filter_run_excluding :no_color_tty => Gem.win_platform? || !ENV["GITHUB_ACTION"].nil? config.filter_run_excluding :permissions => Gem.win_platform? diff --git a/spec/bundler/support/hax.rb b/spec/bundler/support/hax.rb index 0ad5239128..4a49ffb49f 100644 --- a/spec/bundler/support/hax.rb +++ b/spec/bundler/support/hax.rb @@ -32,7 +32,7 @@ module Gem end if ENV["BUNDLER_SPEC_GEM_SOURCES"] - @sources = [ENV["BUNDLER_SPEC_GEM_SOURCES"]] + self.sources = [ENV["BUNDLER_SPEC_GEM_SOURCES"]] end # We only need this hack for rubygems versions without the BundlerVersionFinder diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index f84e68cee8..5238c8b980 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -166,7 +166,7 @@ module Spec def gem_command(command, options = {}) env = options[:env] || {} - env["RUBYOPT"] = opt_add("-r#{spec_dir}/support/hax.rb", env["RUBYOPT"] || ENV["RUBYOPT"]) + env["RUBYOPT"] = opt_add(opt_add("-r#{spec_dir}/support/hax.rb", env["RUBYOPT"]), ENV["RUBYOPT"]) options[:env] = env sys_exec("#{Path.gem_bin} #{command}", options) end @@ -181,7 +181,7 @@ module Spec def sys_exec(cmd, options = {}) env = options[:env] || {} - env["RUBYOPT"] = opt_add("-r#{spec_dir}/support/switch_rubygems.rb", env["RUBYOPT"] || ENV["RUBYOPT"]) + env["RUBYOPT"] = opt_add(opt_add("-r#{spec_dir}/support/switch_rubygems.rb", env["RUBYOPT"]), ENV["RUBYOPT"]) dir = options[:dir] || bundled_app command_execution = CommandExecution.new(cmd.to_s, dir) @@ -348,6 +348,7 @@ module Spec without_env_side_effects do ENV["GEM_HOME"] = path.to_s ENV["GEM_PATH"] = path.to_s + ENV["BUNDLER_ORIG_GEM_HOME"] = nil ENV["BUNDLER_ORIG_GEM_PATH"] = nil yield end -- cgit v1.2.1