diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-12-21 14:50:44 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-12-21 15:27:05 +0900 |
commit | 69dc2ea46538f47ff5edda3bb16863034bd19069 (patch) | |
tree | a4c545640fbdf31ab90f02a7def173840944806b /spec/bundler/support | |
parent | ad450c9fe51c51626dd07f6e766f47d839cae3ba (diff) | |
download | ruby-69dc2ea46538f47ff5edda3bb16863034bd19069.tar.gz |
Merge RubyGems-3.3.0 and Bundler-2.3.0
Diffstat (limited to 'spec/bundler/support')
-rw-r--r-- | spec/bundler/support/filters.rb | 1 | ||||
-rw-r--r-- | spec/bundler/support/hax.rb | 2 | ||||
-rw-r--r-- | spec/bundler/support/helpers.rb | 5 |
3 files changed, 5 insertions, 3 deletions
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 |