[rubygems/rubygems] Refactor

https://github.com/rubygems/rubygems/commit/9964c16bb9
This commit is contained in:
David Rodríguez 2024-11-19 20:41:32 +01:00 committed by git
parent 0a7099a0ae
commit 486485a535

View File

@ -951,7 +951,6 @@ module Bundler
gemfile_source = dep.source || default_source
deps << dep if !dep.source || lockfile_source.include?(dep.source)
@gems_to_unlock << name if lockfile_source.include?(dep.source) && lockfile_source != gemfile_source
# Replace the locked dependency's source with the equivalent source from the Gemfile
s.source = gemfile_source
@ -964,7 +963,7 @@ module Bundler
next if @sources_to_unlock.include?(source.name)
# Path sources have special logic
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec)
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec) || (source.instance_of?(Source::Git) && !@gems_to_unlock.include?(name) && deps.include?(dep))
new_spec = source.specs[s].first
if new_spec
s.dependencies.replace(new_spec.dependencies)