Class | Gem::ConfigFile |
In: |
lib/rubygems/config_file.rb
|
Parent: | Object |
Gem::ConfigFile RubyGems options and gem command options from ~/.gemrc.
~/.gemrc is a YAML file that uses strings to match gem command arguments and symbols to match RubyGems options.
Gem command arguments use a String key that matches the command name and allow you to specify default arguments:
install: --no-rdoc --no-ri update: --no-rdoc --no-ri
You can use gem: to set default arguments for all commands.
RubyGems options use symbol keys. Valid options are:
+:backtrace+: | See backtrace |
+:benchmark+: | See benchmark |
+:sources+: | Sets Gem::sources |
+:verbose+: | See verbose |
DEFAULT_BACKTRACE | = | false | ||
DEFAULT_BENCHMARK | = | false | ||
DEFAULT_BULK_THRESHOLD | = | 1000 | ||
DEFAULT_VERBOSITY | = | true | ||
DEFAULT_UPDATE_SOURCES | = | true | ||
OPERATING_SYSTEM_DEFAULTS | = | {} | For Ruby packagers to set configuration defaults. Set in rubygems/defaults/operating_system.rb | |
PLATFORM_DEFAULTS | = | {} | For Ruby implementers to set configuration defaults. Set in rubygems/defaults/#{RUBY_ENGINE}.rb | |
CSIDL_COMMON_APPDATA | = | 0x0023 | ||
SHGetFolderPath | = | Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', 'L', :stdcall | ||
SHGetFolderPath | = | Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', 'L' | ||
SYSTEM_WIDE_CONFIG_FILE | = | File.join system_config_path, 'gemrc' |
api_keys | [R] | Hash of RubyGems.org and alternate API keys |
args | [R] | List of arguments supplied to the config file object. |
backtrace | [W] | True if we print backtraces on errors. |
benchmark | [RW] | True if we are benchmarking this run. |
bulk_threshold | [RW] | Bulk threshold value. If the number of missing gems are above this threshold value, then a bulk download technique is used. (deprecated) |
hash | [R] | |
home | [RW] | Where to install gems (deprecated) |
path | [RW] | Where to look for gems (deprecated) |
rubygems_api_key | [R] | API key for RubyGems.org |
update_sources | [RW] | True if we want to update the SourceInfoCache every time, false otherwise |
verbose | [RW] |
Verbose level of output:
|
Create the config file object. args is the list of arguments from the command line.
The following command line options are handled early here rather than later at the time most command options are processed.
—config-file, —config-file==NAME: | Obviously these need to be handled by the ConfigFile object to ensure we get the right config file. |
—backtrace: | Backtrace needs to be turned on early so that errors before normal option parsing can be properly handled. |
—debug: | Enable Ruby level debug messages. Handled early for the same reason as —backtrace. |