diff options
author | Hiroshi SHIBATA <[email protected]> | 2022-12-20 09:43:53 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-12-20 13:15:02 +0900 |
commit | 18ba89093a0b214cd89f1567c037c239f094496d (patch) | |
tree | bb4e07c66cca5fd2da04da297e8c66fbf883fdad /lib/bundler/source_list.rb | |
parent | ad1f61fe80dea7a1b1e8d27a4232d7b10b820960 (diff) |
Merge RubyGems/Bundler master
Pick from https://github.com/rubygems/rubygems/commit/ba3adad4d80038ffd7bea015da2f11d3e8a2ff82
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6966
Diffstat (limited to 'lib/bundler/source_list.rb')
-rw-r--r-- | lib/bundler/source_list.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index ab05e1334a..63798db941 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -161,11 +161,17 @@ module Bundler end def map_sources(replacement_sources) - [@rubygems_sources, @path_sources, @git_sources, @plugin_sources].map do |sources| + rubygems, git, plugin = [@rubygems_sources, @git_sources, @plugin_sources].map do |sources| sources.map do |source| replacement_sources.find {|s| s == source } || source end end + + path = @path_sources.map do |source| + replacement_sources.find {|s| s == (source.is_a?(Source::Gemspec) ? source.as_path_source : source) } || source + end + + [rubygems, path, git, plugin] end def global_replacement_source(replacement_sources) |