X7ROOT File Manager
Current Path:
/opt/alt/ruby34/share/gems/gems/bundler-2.6.2/lib/bundler
opt
/
alt
/
ruby34
/
share
/
gems
/
gems
/
bundler-2.6.2
/
lib
/
bundler
/
ðŸ“
..
📄
build_metadata.rb
(1.22 KB)
📄
capistrano.rb
(877 B)
📄
checksum.rb
(6.94 KB)
📄
ci_detector.rb
(3.72 KB)
ðŸ“
cli
📄
cli.rb
(40.63 KB)
ðŸ“
compact_index_client
📄
compact_index_client.rb
(3.28 KB)
📄
constants.rb
(311 B)
📄
current_ruby.rb
(1.79 KB)
📄
definition.rb
(39.46 KB)
📄
dependency.rb
(3.3 KB)
📄
deployment.rb
(3.19 KB)
📄
deprecate.rb
(876 B)
📄
digest.rb
(2.16 KB)
📄
dsl.rb
(22.68 KB)
📄
endpoint_specification.rb
(4.32 KB)
📄
env.rb
(4.92 KB)
📄
environment_preserver.rb
(1.42 KB)
📄
errors.rb
(8.11 KB)
📄
feature_flag.rb
(1.85 KB)
ðŸ“
fetcher
📄
fetcher.rb
(11.64 KB)
📄
force_platform.rb
(544 B)
📄
friendly_errors.rb
(3.69 KB)
📄
gem_helper.rb
(6.88 KB)
📄
gem_helpers.rb
(5.29 KB)
📄
gem_tasks.rb
(138 B)
📄
gem_version_promoter.rb
(5.15 KB)
📄
graph.rb
(4.95 KB)
📄
index.rb
(4.85 KB)
📄
injector.rb
(10.03 KB)
📄
inline.rb
(3.45 KB)
ðŸ“
installer
📄
installer.rb
(8.89 KB)
📄
lazy_specification.rb
(6.98 KB)
📄
lockfile_generator.rb
(2.42 KB)
📄
lockfile_parser.rb
(8.94 KB)
ðŸ“
man
📄
match_metadata.rb
(390 B)
📄
match_platform.rb
(583 B)
📄
match_remote_metadata.rb
(863 B)
📄
materialization.rb
(1.37 KB)
📄
mirror.rb
(5.77 KB)
ðŸ“
plugin
📄
plugin.rb
(11.98 KB)
📄
process_lock.rb
(554 B)
📄
remote_specification.rb
(3.92 KB)
ðŸ“
resolver
📄
resolver.rb
(18.38 KB)
📄
retry.rb
(1.59 KB)
📄
ruby_dsl.rb
(1.83 KB)
📄
ruby_version.rb
(4.68 KB)
📄
rubygems_ext.rb
(13.68 KB)
📄
rubygems_gem_installer.rb
(4.67 KB)
📄
rubygems_integration.rb
(12.66 KB)
📄
runtime.rb
(10.54 KB)
📄
safe_marshal.rb
(597 B)
📄
self_manager.rb
(6.45 KB)
ðŸ“
settings
📄
settings.rb
(15.11 KB)
📄
setup.rb
(1.36 KB)
📄
shared_helpers.rb
(12.26 KB)
📄
similarity_detector.rb
(1.84 KB)
ðŸ“
source
📄
source.rb
(3.01 KB)
📄
source_list.rb
(6.8 KB)
📄
source_map.rb
(2.17 KB)
📄
spec_set.rb
(7.64 KB)
📄
stub_specification.rb
(3.43 KB)
ðŸ“
templates
ðŸ“
ui
📄
ui.rb
(255 B)
📄
uri_credentials_filter.rb
(1.29 KB)
📄
uri_normalizer.rb
(715 B)
ðŸ“
vendor
📄
vendored_fileutils.rb
(101 B)
📄
vendored_net_http.rb
(735 B)
📄
vendored_persistent.rb
(197 B)
📄
vendored_pub_grub.rb
(99 B)
📄
vendored_securerandom.rb
(387 B)
📄
vendored_thor.rb
(180 B)
📄
vendored_timeout.rb
(209 B)
📄
vendored_tsort.rb
(93 B)
📄
vendored_uri.rb
(496 B)
📄
version.rb
(259 B)
📄
vlad.rb
(465 B)
📄
worker.rb
(2.85 KB)
📄
yaml_serializer.rb
(2.42 KB)
Editing: compact_index_client.rb
# frozen_string_literal: true require "pathname" require "set" module Bundler # The CompactIndexClient is responsible for fetching and parsing the compact index. # # The compact index is a set of caching optimized files that are used to fetch gem information. # The files are: # - names: a list of all gem names # - versions: a list of all gem versions # - info/[gem]: a list of all versions of a gem # # The client is instantiated with: # - `directory`: the root directory where the cache files are stored. # - `fetcher`: (optional) an object that responds to #call(uri_path, headers) and returns an http response. # If the `fetcher` is not provided, the client will only read cached files from disk. # # The client is organized into: # - `Updater`: updates the cached files on disk using the fetcher. # - `Cache`: calls the updater, caches files, read and return them from disk # - `Parser`: parses the compact index file data # - `CacheFile`: a concurrency safe file reader/writer that verifies checksums # # The client is intended to optimize memory usage and performance. # It is called 100s or 1000s of times, parsing files with hundreds of thousands of lines. # It may be called concurrently without global interpreter lock in some Rubies. # As a result, some methods may look more complex than necessary to save memory or time. class CompactIndexClient # NOTE: MD5 is here not because we expect a server to respond with it, but # because we use it to generate the etag on first request during the upgrade # to the compact index client that uses opaque etags saved to files. # Remove once 2.5.0 has been out for a while. SUPPORTED_DIGESTS = { "sha-256" => :SHA256, "md5" => :MD5 }.freeze DEBUG_MUTEX = Thread::Mutex.new # info returns an Array of INFO Arrays. Each INFO Array has the following indices: INFO_NAME = 0 INFO_VERSION = 1 INFO_PLATFORM = 2 INFO_DEPS = 3 INFO_REQS = 4 def self.debug return unless ENV["DEBUG_COMPACT_INDEX"] DEBUG_MUTEX.synchronize { warn("[#{self}] #{yield}") } end class Error < StandardError; end require_relative "compact_index_client/cache" require_relative "compact_index_client/cache_file" require_relative "compact_index_client/parser" require_relative "compact_index_client/updater" def initialize(directory, fetcher = nil) @cache = Cache.new(directory, fetcher) @parser = Parser.new(@cache) end def names Bundler::CompactIndexClient.debug { "names" } @parser.names end def versions Bundler::CompactIndexClient.debug { "versions" } @parser.versions end def dependencies(names) Bundler::CompactIndexClient.debug { "dependencies(#{names})" } names.map {|name| info(name) } end def info(name) Bundler::CompactIndexClient.debug { "info(#{name})" } @parser.info(name) end def latest_version(name) Bundler::CompactIndexClient.debug { "latest_version(#{name})" } @parser.info(name).map {|d| Gem::Version.new(d[INFO_VERSION]) }.max end def available? Bundler::CompactIndexClient.debug { "available?" } @parser.available? end def reset! Bundler::CompactIndexClient.debug { "reset!" } @cache.reset! end end end
Upload File
Create Folder