aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-11-23 22:06:19 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-27 15:04:40 +0900
commit60803e192eebd1048f28ea5ba2a2f2c753424dad (patch)
treedf4fb3a910cdec5a00d97defaed3d1a9a73f4c98 /spec/bundler/support
parent67ee91a3058e9d918add38ed02205e7383f00fad (diff)
downloadruby-60803e192eebd1048f28ea5ba2a2f2c753424dad.tar.gz
[rubygems/rubygems] Remove no longer necessary workaround for old RubyGems
https://github.com/rubygems/rubygems/commit/ed4eaefac0
Diffstat (limited to 'spec/bundler/support')
-rw-r--r--spec/bundler/support/helpers.rb2
-rw-r--r--spec/bundler/support/path.rb7
-rw-r--r--spec/bundler/support/rubygems_version_manager.rb3
3 files changed, 2 insertions, 10 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index d63cf1e839..f873220f14 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -60,7 +60,7 @@ module Spec
def run(cmd, *args)
opts = args.last.is_a?(Hash) ? args.pop : {}
groups = args.map(&:inspect).join(", ")
- setup = "require '#{entrypoint}' ; Bundler.ui.silence { Bundler.setup(#{groups}) }"
+ setup = "require 'bundler' ; Bundler.ui.silence { Bundler.setup(#{groups}) }"
ruby([setup, cmd].join(" ; "), opts)
end
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index 8b9c0e1290..23b8cc4180 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -225,13 +225,6 @@ module Spec
root.join("lib")
end
- # Sometimes rubygems version under test does not include
- # https://github.com/rubygems/rubygems/pull/2728 and will not always end up
- # activating the current bundler. In that case, require bundler absolutely.
- def entrypoint
- Gem.rubygems_version < Gem::Version.new("3.1.a") ? "#{lib_dir}/bundler" : "bundler"
- end
-
def global_plugin_gem(*args)
home ".bundle", "plugin", "gems", *args
end
diff --git a/spec/bundler/support/rubygems_version_manager.rb b/spec/bundler/support/rubygems_version_manager.rb
index 5653601ae8..cb670d60e5 100644
--- a/spec/bundler/support/rubygems_version_manager.rb
+++ b/spec/bundler/support/rubygems_version_manager.rb
@@ -30,11 +30,10 @@ class RubygemsVersionManager
rubygems_default_path = rubygems_path + "/defaults"
bundler_path = rubylibdir + "/bundler"
- bundler_exemptions = Gem.rubygems_version < Gem::Version.new("3.2.0") ? [bundler_path + "/errors.rb"] : []
bad_loaded_features = $LOADED_FEATURES.select do |loaded_feature|
(loaded_feature.start_with?(rubygems_path) && !loaded_feature.start_with?(rubygems_default_path)) ||
- (loaded_feature.start_with?(bundler_path) && !bundler_exemptions.any? {|bundler_exemption| loaded_feature.start_with?(bundler_exemption) })
+ loaded_feature.start_with?(bundler_path)
end
errors = if bad_loaded_features.any?