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

Sync latest development version of bundler & rubygems

This commit is contained in:
David Rodríguez 2021-02-01 16:17:16 +01:00 committed by Hiroshi SHIBATA
parent 2ab6b7a751
commit 53468cc111
Notes: git 2021-03-08 13:47:56 +09:00
161 changed files with 2544 additions and 1016 deletions

View file

@ -1,7 +1,6 @@
# frozen_string_literal: true
require "tsort"
require "set"
module Bundler
class SpecSet
@ -13,14 +12,16 @@ module Bundler
end
def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true)
handled = Set.new
handled = []
deps = dependencies.dup
specs = []
skip += ["bundler"]
loop do
break unless dep = deps.shift
next if !handled.add?(dep) || skip.include?(dep.name)
next if handled.include?(dep) || skip.include?(dep.name)
handled << dep
specs_for_dep = spec_for_dependency(dep, match_current_platform)
if specs_for_dep.any?
@ -28,7 +29,7 @@ module Bundler
specs_for_dep.first.dependencies.each do |d|
next if d.type == :development
d = DepProxy.new(d, dep.__platform) unless match_current_platform
d = DepProxy.get_proxy(d, dep.__platform) unless match_current_platform
deps << d
end
elsif check