- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
Constants
NORMALIZE_URI_OPTIONS_PATTERN = / \A (\w+\.)? # optional prefix key (https?.*?) # URI (\.#{Regexp.union(PER_URI_OPTIONS)})? # optional suffix key \z /ix
PER_URI_OPTIONS = %w[ fallback_timeout ].freeze
CONFIG_REGEX = %r{ # rubocop:disable Style/RegexpLiteral ^ (BUNDLE_.+):\s # the key (?: !\s)? # optional exclamation mark found with ruby 1.9.3 (['"]?) # optional opening quote (.* # contents of the value (?: # optionally, up until the next key (\n(?!BUNDLE).+)* ) ) \2 # matching closing quote $ }xo
Path = Struct.new(:explicit_path, :append_ruby_scope, :system_path, :default_install_uses_path) do def path path = base_path path = File.join(path, Bundler.ruby_scope) if append_ruby_scope && !use_system_gems? path end def use_system_gems? return true if system_path return false if explicit_path !default_install_uses_path end def base_path path = explicit_path path ||= ".bundle" unless use_system_gems? path ||= Bundler.rubygems.gem_dir path end def base_path_relative_to_pwd base_path = Pathname.new(self.base_path) expanded_base_path = base_path.expand_path(Bundler.root) relative_path = expanded_base_path.relative_path_from(Pathname.pwd) if relative_path.to_s.start_with?("..") relative_path = base_path if base_path.absolute? else relative_path = Pathname.new(File.join(".", relative_path)) end relative_path rescue ArgumentError expanded_base_path end def validate! return unless explicit_path && system_path path = Bundler.settings.pretty_values_for(:path) path.unshift(nil, "path:") unless path.empty? system_path = Bundler.settings.pretty_values_for("path.system") system_path.unshift(nil, "path.system:") unless system_path.empty? disable_shared_gems = Bundler.settings.pretty_values_for(:disable_shared_gems) disable_shared_gems.unshift(nil, "disable_shared_gems:") unless disable_shared_gems.empty? raise InvalidOption, "Using a custom path while using system gems is unsupported.\n#{path.join("\n")}\n#{system_path.join("\n")}\n#{disable_shared_gems.join("\n")}" end end
DEFAULT_CONFIG = { :disable_version_check => true, :redirect => 5, :retry => 3, :timeout => 10, }.freeze
ARRAY_KEYS = %w[ with without ].freeze
NUMBER_KEYS = %w[ jobs redirect retry ssl_verify_mode timeout ].freeze
BOOL_KEYS = %w[ allow_bundler_dependency_conflicts allow_deployment_source_credential_changes allow_offline_install auto_clean_without_path auto_install auto_config_jobs cache_all cache_all_platforms cache_command_is_package console_command default_install_uses_path deployment deployment_means_frozen disable_checksum_validation disable_exec_load disable_local_branch_check disable_multisource disable_platform_warnings disable_shared_gems disable_version_check error_on_stderr force_ruby_platform forget_cli_options frozen gem.coc gem.mit global_path_appends_ruby_scope global_gem_cache ignore_messages init_gems_rb list_command lockfile_uses_separate_rubygems_sources major_deprecations no_install no_prune only_update_to_newer_versions path_relative_to_cwd path.system plugins prefer_gems_rb print_only_version_number setup_makes_kernel_gem_public silence_root_warning skip_default_git_sources specific_platform suppress_install_using_messages unlock_source_unlocks_spec update_requires_all_flag use_gem_version_promoter_for_major_updates viz_command ].freeze