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

Update bundled bundler to 1.16.0.

* lib/bundler, spec/bundler: Merge bundler-1.16.0.
  * common.mk: rspec examples of bundler-1.16.0 needs require option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-11-01 23:29:38 +00:00
parent ae49dbd392
commit be7b592912
1025 changed files with 13902 additions and 3180 deletions

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true
require "tsort"
require "forwardable"
require "set"
@ -76,7 +77,7 @@ module Bundler
end
def materialize(deps, missing_specs = nil)
materialized = self.for(deps, [], false, true, missing_specs).to_a
materialized = self.for(deps, [], false, true, !missing_specs).to_a
deps = materialized.map(&:name).uniq
materialized.map! do |s|
next s unless s.is_a?(LazySpecification)
@ -109,9 +110,10 @@ module Bundler
def merge(set)
arr = sorted.dup
set.each do |s|
next if arr.any? {|s2| s2.name == s.name && s2.version == s.version && s2.platform == s.platform }
arr << s
set.each do |set_spec|
full_name = set_spec.full_name
next if arr.any? {|spec| spec.full_name == full_name }
arr << set_spec
end
SpecSet.new(arr)
end