diff options
author | David RodrÃguez <[email protected]> | 2025-06-03 12:56:55 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-05 19:12:44 +0900 |
commit | 5cf07c1e8fa32ff4619c02b1762b5b7bb074ad71 (patch) | |
tree | 930b4f54ac73d87154138ae2de0d767dbed77a6a | |
parent | 1befc5d1024419fcd96fa986eecc5cd16aa43ab4 (diff) |
[rubygems/rubygems] Look in configured path when checking if self-update version is installed
https://github.com/rubygems/rubygems/commit/1ce0882e6f
-rw-r--r-- | lib/bundler/self_manager.rb | 1 | ||||
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb index 024884cf2d..53eb2c1859 100644 --- a/lib/bundler/self_manager.rb +++ b/lib/bundler/self_manager.rb @@ -142,6 +142,7 @@ module Bundler end def find_latest_matching_spec(requirement) + Bundler.configure local_result = find_latest_matching_spec_from_collection(local_specs, requirement) return local_result if local_result && requirement.specific? diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index 160a09ed79..faf9db32d4 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -1685,7 +1685,7 @@ RSpec.describe "bundle update --bundler" do end it "allows updating to development versions if already installed locally" do - system_gems "bundler-9.0.0.dev" + system_gems "bundler-9.9.9" build_repo4 do build_gem "myrack", "1.0" @@ -1696,6 +1696,7 @@ RSpec.describe "bundle update --bundler" do gem "myrack" G + system_gems "bundler-9.0.0.dev", path: local_gem_path bundle :update, bundler: "9.0.0.dev", verbose: "true" checksums = checksums_section_when_enabled do |c| @@ -1722,7 +1723,7 @@ RSpec.describe "bundle update --bundler" do end it "does not touch the network if not necessary" do - system_gems "bundler-9.9.9", "bundler-9.0.0" + system_gems "bundler-9.9.9" build_repo4 do build_gem "myrack", "1.0" @@ -1732,7 +1733,7 @@ RSpec.describe "bundle update --bundler" do source "https://gem.repo4" gem "myrack" G - + system_gems "bundler-9.0.0", path: local_gem_path bundle :update, bundler: "9.0.0", verbose: true expect(out).not_to include("Fetching gem metadata from https://rubygems.org/") |