class

Bundler::Settings

ruby latest stable - Superclass: Object

Class not available on this version

This class is only available on newer versions. The first available version (v2_6_3) is shown here.

No documentation available for this class.

Constants

ARRAY_KEYS = %w[\nwith\nwithout\n].freeze

BOOL_KEYS = %w[\nallow_bundler_dependency_conflicts\nallow_deployment_source_credential_changes\nallow_offline_install\nauto_clean_without_path\nauto_install\nauto_config_jobs\ncache_all\ncache_all_platforms\ncache_command_is_package\nconsole_command\ndefault_install_uses_path\ndeployment\ndeployment_means_frozen\ndisable_checksum_validation\ndisable_exec_load\ndisable_local_branch_check\ndisable_multisource\ndisable_platform_warnings\ndisable_shared_gems\ndisable_version_check\nerror_on_stderr\nforce_ruby_platform\nforget_cli_options\nfrozen\ngem.coc\ngem.mit\nglobal_path_appends_ruby_scope\nglobal_gem_cache\nignore_messages\ninit_gems_rb\nlist_command\nlockfile_uses_separate_rubygems_sources\nmajor_deprecations\nno_install\nno_prune\nonly_update_to_newer_versions\npath_relative_to_cwd\npath.system\nplugins\nprefer_gems_rb\nprint_only_version_number\nsetup_makes_kernel_gem_public\nsilence_root_warning\nskip_default_git_sources\nspecific_platform\nsuppress_install_using_messages\nunlock_source_unlocks_spec\nupdate_requires_all_flag\nuse_gem_version_promoter_for_major_updates\nviz_command\n].freeze

CONFIG_REGEX = %r{ # rubocop:disable Style/RegexpLiteral\n^\n(BUNDLE_.+):\\s # the key\n(?: !\\s)? # optional exclamation mark found with ruby 1.9.3\n(['"]?) # optional opening quote\n(.* # contents of the value\n(?: # optionally, up until the next key\n(\\n(?!BUNDLE).+)*\n)\n)\n\\2 # matching closing quote\n$\n}xo

DEFAULT_CONFIG = {\n:disable_version_check => true,\n:redirect => 5,\n:retry => 3,\n:timeout => 10,\n}.freeze

NORMALIZE_URI_OPTIONS_PATTERN = /\n\\A\n(\\w+\\.)? # optional prefix key\n(https?.*?) # URI\n(\\.#{Regexp.union(PER_URI_OPTIONS)})? # optional suffix key\n\\z\n/ix

NUMBER_KEYS = %w[\njobs\nredirect\nretry\nssl_verify_mode\ntimeout\n].freeze

PER_URI_OPTIONS = %w[\nfallback_timeout\n].freeze

Path = Struct.new(:explicit_path, :append_ruby_scope, :system_path, :default_install_uses_path) do\ndef path\npath = base_path\npath = File.join(path, Bundler.ruby_scope) if append_ruby_scope && !use_system_gems?\npath\nend\n\ndef use_system_gems?\nreturn true if system_path\nreturn false if explicit_path\n!default_install_uses_path\nend\n\ndef base_path\npath = explicit_path\npath ||= ".bundle" unless use_system_gems?\npath ||= Bundler.rubygems.gem_dir\npath\nend\n\ndef base_path_relative_to_pwd\nbase_path = Pathname.new(self.base_path)\nexpanded_base_path = base_path.expand_path(Bundler.root)\nrelative_path = expanded_base_path.relative_path_from(Pathname.pwd)\nif relative_path.to_s.start_with?("..")\nrelative_path = base_path if base_path.absolute?\nelse\nrelative_path = Pathname.new(File.join(".", relative_path))\nend\nrelative_path\nrescue ArgumentError\nexpanded_base_path\nend\n\ndef validate!\nreturn unless explicit_path && system_path\npath = Bundler.settings.pretty_values_for(:path)\npath.unshift(nil, "path:") unless path.empty?\nsystem_path = Bundler.settings.pretty_values_for("path.system")\nsystem_path.unshift(nil, "path.system:") unless system_path.empty?\ndisable_shared_gems = Bundler.settings.pretty_values_for(:disable_shared_gems)\ndisable_shared_gems.unshift(nil, "disable_shared_gems:") unless disable_shared_gems.empty?\nraise InvalidOption,\n"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")}"\nend\nend

Files

  • lib/bundler/mirror.rb
  • lib/bundler/settings.rb
  • lib/bundler/settings/validator.rb