mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Simplify instantiating the gem version promoter
https://github.com/rubygems/rubygems/commit/c4e2737f2c
This commit is contained in:
parent
6a21d196ba
commit
dce73c8616
1 changed files with 2 additions and 12 deletions
|
@ -106,6 +106,7 @@ module Bundler
|
|||
@locked_gems = nil
|
||||
@locked_deps = {}
|
||||
@locked_specs = SpecSet.new([])
|
||||
@originally_locked_specs = @locked_specs
|
||||
@locked_sources = []
|
||||
@locked_platforms = []
|
||||
end
|
||||
|
@ -149,18 +150,7 @@ module Bundler
|
|||
end
|
||||
|
||||
def gem_version_promoter
|
||||
@gem_version_promoter ||= begin
|
||||
locked_specs =
|
||||
if unlocking? && @locked_specs.empty? && !@lockfile_contents.empty?
|
||||
# Definition uses an empty set of locked_specs to indicate all gems
|
||||
# are unlocked, but GemVersionPromoter needs the locked_specs
|
||||
# for conservative comparison.
|
||||
Bundler::SpecSet.new(@locked_gems.specs)
|
||||
else
|
||||
@locked_specs
|
||||
end
|
||||
GemVersionPromoter.new(locked_specs, @unlock[:gems])
|
||||
end
|
||||
@gem_version_promoter ||= GemVersionPromoter.new(@originally_locked_specs, @unlock[:gems])
|
||||
end
|
||||
|
||||
def resolve_only_locally!
|
||||
|
|
Loading…
Reference in a new issue