/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/bundler
NameSizeModeActions
cli/-0755rm
compact_index_client/-0755rm
fetcher/-0755rm
installer/-0755rm
plugin/-0755rm
resolver/-0755rm
settings/-0755rm
source/-0755rm
templates/-0755rm
ui/-0755rm
vendor/-0755rm
build_metadata.rb16040644editdlrm
capistrano.rb8830644editdlrm
cli.rb373000644editdlrm
compact_index_client.rb36710644editdlrm
constants.rb2120644editdlrm
current_ruby.rb21730644editdlrm
definition.rb376050644editdlrm
dependency.rb49550644editdlrm
deployment.rb32690644editdlrm
deprecate.rb8760644editdlrm
dep_proxy.rb8270644editdlrm
dsl.rb209180644editdlrm
endpoint_specification.rb40020644editdlrm
env.rb51260644editdlrm
environment_preserver.rb13100644editdlrm
errors.rb47000644editdlrm
feature_flag.rb25070644editdlrm
fetcher.rb113680644editdlrm
friendly_errors.rb44660644editdlrm
gemdeps.rb4230644editdlrm
gem_helper.rb63750644editdlrm
gem_helpers.rb32690644editdlrm
gem_remote_fetcher.rb14940644editdlrm
gem_tasks.rb1380644editdlrm
gem_version_promoter.rb66640644editdlrm
graph.rb51120644editdlrm
index.rb53680644editdlrm
injector.rb89730644editdlrm
inline.rb28290644editdlrm
installer.rb118740644editdlrm
lazy_specification.rb36930644editdlrm
lockfile_generator.rb22310644editdlrm
lockfile_parser.rb84690644editdlrm
match_platform.rb6600644editdlrm
mirror.rb59560644editdlrm
plugin.rb98520644editdlrm
process_lock.rb7020644editdlrm
psyched_yaml.rb8540644editdlrm
remote_specification.rb35250644editdlrm
resolver.rb164220644editdlrm
retry.rb16500644editdlrm
rubygems_ext.rb42440644editdlrm
rubygems_gem_installer.rb35740644editdlrm
rubygems_integration.rb184760644editdlrm
ruby_dsl.rb7610644editdlrm
ruby_version.rb45540644editdlrm
runtime.rb109300644editdlrm
settings.rb116680644editdlrm
setup.rb8020644editdlrm
shared_helpers.rb115350644editdlrm
similarity_detector.rb18820644editdlrm
source.rb28140644editdlrm
source_list.rb56490644editdlrm
spec_set.rb54020644editdlrm
stub_specification.rb23280644editdlrm
ui.rb2550644editdlrm
uri_credentials_filter.rb12660644editdlrm
vendored_fileutils.rb1010644editdlrm
vendored_molinillo.rb1010644editdlrm
vendored_persistent.rb17070644editdlrm
vendored_thor.rb1800644editdlrm
vendored_uri.rb890644editdlrm
version.rb1790644editdlrm
version_ranges.rb38880644editdlrm
vlad.rb4680644editdlrm
worker.rb26510644editdlrm
yaml_serializer.rb24120644editdlrm
Edit: /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/bundler/spec_set.rb (5402B)
# frozen_string_literal: true require "tsort" require "set" module Bundler class SpecSet include Enumerable include TSort def initialize(specs) @specs = specs end def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true) handled = Set.new deps = dependencies.dup specs = [] skip += ["bundler"] loop do break unless dep = deps.shift next if !handled.add?(dep) || skip.include?(dep.name) if spec = spec_for_dependency(dep, match_current_platform) specs << spec spec.dependencies.each do |d| next if d.type == :development d = DepProxy.new(d, dep.__platform) unless match_current_platform deps << d end elsif check return false elsif raise_on_missing others = lookup[dep.name] if match_current_platform message = "Unable to find a spec satisfying #{dep} in the set. Perhaps the lockfile is corrupted?" message += " Found #{others.join(", ")} that did not match the current platform." if others && !others.empty? raise GemNotFound, message end end if spec = lookup["bundler"].first specs << spec end check ? true : SpecSet.new(specs) end def valid_for?(deps) self.for(deps, [], true) end def [](key) key = key.name if key.respond_to?(:name) lookup[key].reverse end def []=(key, value) @specs << value @lookup = nil @sorted = nil end def sort! self end def to_a sorted.dup end def to_hash lookup.dup end def materialize(deps, missing_specs = nil) 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) s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=) spec = s.__materialize__ unless spec unless missing_specs raise GemNotFound, "Could not find #{s.full_name} in any of the sources" end missing_specs << s end spec end SpecSet.new(missing_specs ? materialized.compact : materialized) end # Materialize for all the specs in the spec set, regardless of what platform they're for # This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform) # @return [Array] def materialized_for_all_platforms names = @specs.map(&:name).uniq @specs.map do |s| next s unless s.is_a?(LazySpecification) s.source.dependency_names = names if s.source.respond_to?(:dependency_names=) spec = s.__materialize__ raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec spec end end def merge(set) arr = sorted.dup 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 def find_by_name_and_platform(name, platform) @specs.detect {|spec| spec.name == name && spec.match_platform(platform) } end def what_required(spec) unless req = find {|s| s.dependencies.any? {|d| d.type == :runtime && d.name == spec.name } } return [spec] end what_required(req) << spec end def <<(spec) @specs << spec end def length @specs.length end def size @specs.size end def empty? @specs.empty? end def each(&b) sorted.each(&b) end private def sorted rake = @specs.find {|s| s.name == "rake" } begin @sorted ||= ([rake] + tsort).compact.uniq rescue TSort::Cyclic => error cgems = extract_circular_gems(error) raise CyclicDependencyError, "Your bundle requires gems that depend" \ " on each other, creating an infinite loop. Please remove either" \ " gem '#{cgems[1]}' or gem '#{cgems[0]}' and try again." end end def extract_circular_gems(error) error.message.scan(/@name="(.*?)"/).flatten end def lookup @lookup ||= begin lookup = Hash.new {|h, k| h[k] = [] } Index.sort_specs(@specs).reverse_each do |s| lookup[s.name] << s end lookup end end def tsort_each_node # MUST sort by name for backwards compatibility @specs.sort_by(&:name).each {|s| yield s } end def spec_for_dependency(dep, match_current_platform) specs_for_platforms = lookup[dep.name] if match_current_platform Bundler.rubygems.platforms.reverse_each do |pl| match = GemHelpers.select_best_platform_match(specs_for_platforms, pl) return match if match end nil else GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform) end end def tsort_each_child(s) s.dependencies.sort_by(&:name).each do |d| next if d.type == :development lookup[d.name].each {|s2| yield s2 } end end end end