ruby-changes:72390
From: David <ko1@a...>
Date: Sat, 2 Jul 2022 19:41:15 +0900 (JST)
Subject: [ruby-changes:72390] 9101269e94 (master): [rubygems/rubygems] Move rubygems source specific logic to rubygems source
https://git.ruby-lang.org/ruby.git/commit/?id=9101269e94 From 9101269e948d838c916ea8342b8e6edce2e0957c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Thu, 30 Jun 2022 11:54:53 +0200 Subject: [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 https://github.com/ruby/ruby/blob/trunk/lib/bundler/runtime.rb#L125 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 https://github.com/ruby/ruby/blob/trunk/lib/bundler/source/rubygems.rb#L242 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)}" -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/