1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Move rubygems source specific logic to rubygems source

https://github.com/rubygems/rubygems/commit/6aa4c422a7
This commit is contained in:
David Rodríguez 2022-06-30 11:54:53 +02:00 committed by git
parent 0f06b8fa3e
commit 9101269e94
2 changed files with 1 additions and 2 deletions

View file

@ -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

View file

@ -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)}"