From 9101269e948d838c916ea8342b8e6edce2e0957c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 30 Jun 2022 11:54:53 +0200 Subject: [PATCH] [rubygems/rubygems] Move rubygems source specific logic to rubygems source https://github.com/rubygems/rubygems/commit/6aa4c422a7 --- lib/bundler/runtime.rb | 1 - lib/bundler/source/rubygems.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index d703e2345e..bd38353d3c 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -125,7 +125,6 @@ module Bundler specs_to_cache.each do |spec| next if spec.name == "bundler" next if spec.source.is_a?(Source::Gemspec) - spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true) spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache) end diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 04ba4a654c..7200f54a9c 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -242,7 +242,7 @@ module Bundler end def cache(spec, custom_path = nil) - cached_path = cached_gem(spec) + cached_path = Bundler.settings[:cache_all_platforms] ? fetch_gem(spec) : cached_gem(spec) raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path return if File.dirname(cached_path) == Bundler.app_cache.to_s Bundler.ui.info " * #{File.basename(cached_path)}"