X7ROOT File Manager
Current Path:
/opt/alt/ruby40/share/gems/gems/bundler-4.0.10/lib/bundler
opt
/
alt
/
ruby40
/
share
/
gems
/
gems
/
bundler-4.0.10
/
lib
/
bundler
/
??
..
??
build_metadata.rb
(1.24 KB)
??
capistrano.rb
(189 B)
??
checksum.rb
(7.26 KB)
??
ci_detector.rb
(3.72 KB)
??
cli
??
cli.rb
(40.13 KB)
??
compact_index_client
??
compact_index_client.rb
(2.97 KB)
??
constants.rb
(311 B)
??
current_ruby.rb
(3.07 KB)
??
definition.rb
(42.51 KB)
??
dependency.rb
(3.14 KB)
??
deployment.rb
(272 B)
??
deprecate.rb
(876 B)
??
digest.rb
(2.16 KB)
??
dsl.rb
(22.11 KB)
??
endpoint_specification.rb
(4.49 KB)
??
env.rb
(4.92 KB)
??
environment_preserver.rb
(1.44 KB)
??
errors.rb
(8.35 KB)
??
feature_flag.rb
(522 B)
??
fetcher
??
fetcher.rb
(12 KB)
??
force_platform.rb
(544 B)
??
friendly_errors.rb
(3.8 KB)
??
gem_helper.rb
(6.88 KB)
??
gem_tasks.rb
(138 B)
??
gem_version_promoter.rb
(5.06 KB)
??
index.rb
(4.79 KB)
??
injector.rb
(9.97 KB)
??
inline.rb
(3.66 KB)
??
installer
??
installer.rb
(9.24 KB)
??
lazy_specification.rb
(8.88 KB)
??
lockfile_generator.rb
(2.42 KB)
??
lockfile_parser.rb
(9.3 KB)
??
man
??
match_metadata.rb
(769 B)
??
match_platform.rb
(1.48 KB)
??
match_remote_metadata.rb
(863 B)
??
materialization.rb
(1.4 KB)
??
mirror.rb
(5.77 KB)
??
plugin
??
plugin.rb
(12.17 KB)
??
process_lock.rb
(554 B)
??
remote_specification.rb
(3.92 KB)
??
resolver
??
resolver.rb
(19.17 KB)
??
retry.rb
(2.44 KB)
??
ruby_dsl.rb
(2.6 KB)
??
ruby_version.rb
(4.57 KB)
??
rubygems_ext.rb
(14.11 KB)
??
rubygems_gem_installer.rb
(4.61 KB)
??
rubygems_integration.rb
(12.26 KB)
??
runtime.rb
(10.66 KB)
??
safe_marshal.rb
(597 B)
??
self_manager.rb
(5.92 KB)
??
settings
??
settings.rb
(14.86 KB)
??
setup.rb
(1.36 KB)
??
shared_helpers.rb
(12.06 KB)
??
source
??
source.rb
(3.06 KB)
??
source_list.rb
(6.09 KB)
??
source_map.rb
(2.13 KB)
??
spec_set.rb
(9.55 KB)
??
stub_specification.rb
(3.48 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
(500 B)
??
vlad.rb
(133 B)
??
worker.rb
(3.1 KB)
??
yaml_serializer.rb
(2.42 KB)
Editing: ruby_dsl.rb
# frozen_string_literal: true module Bundler module RubyDsl def ruby(*ruby_version) options = ruby_version.pop if ruby_version.last.is_a?(Hash) ruby_version.flatten! if options patchlevel = options[:patchlevel] engine = options[:engine] engine_version = options[:engine_version] raise GemfileError, "Please define :engine_version" if engine && engine_version.nil? raise GemfileError, "Please define :engine" if engine_version && engine.nil? if options[:file] raise GemfileError, "Do not pass version argument when using :file option" unless ruby_version.empty? ruby_version << normalize_ruby_file(options[:file]) end if engine == "ruby" && engine_version && ruby_version != Array(engine_version) raise GemfileEvalError, "ruby_version must match the :engine_version for MRI" end end @ruby_version = RubyVersion.new(ruby_version, patchlevel, engine, engine_version) end # Support the various file formats found in .ruby-version files. # # 3.2.2 # ruby-3.2.2 # # Also supports .tool-versions files for asdf. Lines not starting with "ruby" are ignored. # # ruby 2.5.1 # comment is ignored # ruby 2.5.1# close comment and extra spaces doesn't confuse # # Intentionally does not support `3.2.1@gemset` since rvm recommends using .ruby-gemset instead # # Loads the file relative to the dirname of the Gemfile itself. def normalize_ruby_file(filename) file_content = Bundler.read_file(gemfile.dirname.join(filename)) # match "ruby-3.2.2", ruby = "3.2.2", ruby = '3.2.2' or "ruby 3.2.2" capturing version string up to the first space or comment version_match = /^ # Start of line ruby # Literal "ruby" [\s-]* # Optional whitespace or hyphens (for "ruby-3.2.2" format) (?:=\s*)? # Optional equals sign with whitespace (for ruby = "3.2.2" format) (?: "([^"]+)" # Double quoted version | '([^']+)' # Single quoted version | ([^\s#"']+) # Unquoted version ) /x.match(file_content) if version_match version_match[1] || version_match[2] || version_match[3] else file_content.strip end rescue Errno::ENOENT raise GemfileError, "Could not find version file #{filename}" end end end
Upload File
Create Folder