X7ROOT File Manager
Current Path:
/opt/alt/ruby32/share/gems/gems/bundler-2.4.19/lib/bundler
opt
/
alt
/
ruby32
/
share
/
gems
/
gems
/
bundler-2.4.19
/
lib
/
bundler
/
ðŸ“
..
📄
build_metadata.rb
(1.2 KB)
📄
capistrano.rb
(883 B)
ðŸ“
cli
📄
cli.rb
(41 KB)
ðŸ“
compact_index_client
📄
compact_index_client.rb
(3.36 KB)
📄
constants.rb
(224 B)
📄
current_ruby.rb
(2.43 KB)
📄
definition.rb
(32.33 KB)
📄
dependency.rb
(3.11 KB)
📄
deployment.rb
(3.19 KB)
📄
deprecate.rb
(876 B)
📄
digest.rb
(2.16 KB)
📄
dsl.rb
(19.97 KB)
📄
endpoint_specification.rb
(3.65 KB)
📄
env.rb
(5.01 KB)
📄
environment_preserver.rb
(1.94 KB)
📄
errors.rb
(5.17 KB)
📄
feature_flag.rb
(1.79 KB)
ðŸ“
fetcher
📄
fetcher.rb
(11.19 KB)
📄
force_platform.rb
(557 B)
📄
friendly_errors.rb
(3.75 KB)
📄
gem_helper.rb
(6.89 KB)
📄
gem_helpers.rb
(4.08 KB)
📄
gem_tasks.rb
(138 B)
📄
gem_version_promoter.rb
(4.76 KB)
📄
graph.rb
(4.99 KB)
📄
index.rb
(4.14 KB)
📄
injector.rb
(10.08 KB)
📄
inline.rb
(2.47 KB)
ðŸ“
installer
📄
installer.rb
(10.25 KB)
📄
lazy_specification.rb
(5.35 KB)
📄
lockfile_generator.rb
(2.18 KB)
📄
lockfile_parser.rb
(7.01 KB)
ðŸ“
man
📄
match_metadata.rb
(290 B)
📄
match_platform.rb
(583 B)
📄
match_remote_metadata.rb
(863 B)
📄
mirror.rb
(5.78 KB)
ðŸ“
plugin
📄
plugin.rb
(11.25 KB)
📄
process_lock.rb
(686 B)
📄
remote_specification.rb
(3.71 KB)
ðŸ“
resolver
📄
resolver.rb
(14.62 KB)
📄
retry.rb
(1.61 KB)
📄
ruby_dsl.rb
(961 B)
📄
ruby_version.rb
(4.17 KB)
📄
rubygems_ext.rb
(10.88 KB)
📄
rubygems_gem_installer.rb
(5.24 KB)
📄
rubygems_integration.rb
(15.82 KB)
📄
runtime.rb
(10.15 KB)
📄
safe_marshal.rb
(597 B)
📄
self_manager.rb
(4.76 KB)
ðŸ“
settings
📄
settings.rb
(13.19 KB)
📄
setup.rb
(963 B)
📄
shared_helpers.rb
(10.76 KB)
📄
similarity_detector.rb
(1.84 KB)
ðŸ“
source
📄
source.rb
(2.98 KB)
📄
source_list.rb
(6.18 KB)
📄
source_map.rb
(2.17 KB)
📄
spec_set.rb
(5.08 KB)
📄
stub_specification.rb
(2.79 KB)
ðŸ“
templates
ðŸ“
ui
📄
ui.rb
(255 B)
📄
uri_credentials_filter.rb
(1.28 KB)
📄
uri_normalizer.rb
(715 B)
ðŸ“
vendor
📄
vendored_fileutils.rb
(101 B)
📄
vendored_persistent.rb
(270 B)
📄
vendored_pub_grub.rb
(99 B)
📄
vendored_thor.rb
(180 B)
📄
vendored_tsort.rb
(93 B)
📄
vendored_uri.rb
(89 B)
📄
version.rb
(260 B)
📄
vlad.rb
(468 B)
📄
worker.rb
(2.85 KB)
📄
yaml_serializer.rb
(2.36 KB)
Editing: index.rb
# frozen_string_literal: true module Bundler class Index include Enumerable def self.build i = new yield i i end attr_reader :specs, :all_specs, :sources protected :specs, :all_specs RUBY = "ruby" NULL = "\0" def initialize @sources = [] @cache = {} @specs = Hash.new {|h, k| h[k] = {} } @all_specs = Hash.new {|h, k| h[k] = EMPTY_SEARCH } end def initialize_copy(o) @sources = o.sources.dup @cache = {} @specs = Hash.new {|h, k| h[k] = {} } @all_specs = Hash.new {|h, k| h[k] = EMPTY_SEARCH } o.specs.each do |name, hash| @specs[name] = hash.dup end o.all_specs.each do |name, array| @all_specs[name] = array.dup end end def inspect "#<#{self.class}:0x#{object_id} sources=#{sources.map(&:inspect)} specs.size=#{specs.size}>" end def empty? each { return false } true end def search_all(name) all_matches = local_search(name) + @all_specs[name] @sources.each do |source| all_matches.concat(source.search_all(name)) end all_matches end # Search this index's specs, and any source indexes that this index knows # about, returning all of the results. def search(query) results = local_search(query) return results unless @sources.any? @sources.each do |source| results.concat(source.search(query)) end results.uniq(&:full_name) end def local_search(query) case query when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query) when String then specs_by_name(query) when Array then specs_by_name_and_version(*query) else raise "You can't search for a #{query.inspect}." end end alias_method :[], :search def <<(spec) @specs[spec.name][spec.full_name] = spec spec end def each(&blk) return enum_for(:each) unless blk specs.values.each do |spec_sets| spec_sets.values.each(&blk) end sources.each {|s| s.each(&blk) } self end def spec_names names = specs.keys + sources.map(&:spec_names) names.uniq! names end def unmet_dependency_names dependency_names.select do |name| search(name).empty? end end def dependency_names names = [] each do |spec| spec.dependencies.each do |dep| next if dep.type == :development names << dep.name end end names.uniq end def use(other, override_dupes = false) return unless other other.each do |s| if (dupes = search_by_spec(s)) && !dupes.empty? # safe to << since it's a new array when it has contents @all_specs[s.name] = dupes << s next unless override_dupes end self << s end self end def size @sources.inject(@specs.size) do |size, source| size += source.size end end # Whether all the specs in self are in other # TODO: rename to #include? def ==(other) all? do |spec| other_spec = other[spec].first other_spec && dependencies_eql?(spec, other_spec) && spec.source == other_spec.source end end def dependencies_eql?(spec, other_spec) deps = spec.dependencies.select {|d| d.type != :development } other_deps = other_spec.dependencies.select {|d| d.type != :development } deps.sort == other_deps.sort end def add_source(index) raise ArgumentError, "Source must be an index, not #{index.class}" unless index.is_a?(Index) @sources << index @sources.uniq! # need to use uniq! here instead of checking for the item before adding end private def specs_by_name_and_version(name, version) specs_by_name(name).select {|spec| spec.version == version } end def specs_by_name(name) @specs[name].values end EMPTY_SEARCH = [].freeze def search_by_spec(spec) spec = @specs[spec.name][spec.full_name] spec ? [spec] : EMPTY_SEARCH end end end
Upload File
Create Folder