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

:sources

Sets Gem::sources

:verbose

See verbose

gemrc files may exist in various locations and are read and merged in the following order:

  • system wide (/etc/gemrc)

  • per user (~/.gemrc)

  • per environment (gemrc files listed in the GEMRC environment variable)

Constants
No documentation available
No documentation available
No documentation available
No documentation available

For Ruby packagers to set configuration defaults. Set in rubygems/defaults/operating_system.rb

For Ruby implementers to set configuration defaults. Set in rubygems/defaults/#{RUBY_ENGINE}.rb

No documentation available
Attributes
Read

List of arguments supplied to the config file object.

Read & Write

Where to look for gems (deprecated)

Read & Write

Where to install gems (deprecated)

Write

True if we print backtraces on errors.

Read & Write

Bulk threshold value. If the number of missing gems are above this threshold value, then a bulk download technique is used. (deprecated)

Read & Write

Verbose level of output:

  • false – No output

  • true – Normal output

  • :loud – Extra output

Read & Write

True if we want to update the SourceInfoCache every time, false otherwise

True if we want to force specification of gem server when pushing a gem

openssl verify mode value, used for remote https connection

Read & Write

Path name of directory or file of openssl CA certificate, used for remote https connection

Path name of directory or file of openssl client certificate, used for remote https connection with client authentication

Read
No documentation available
Class Methods

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.

Instance Methods

Return the configuration information for key.

Set configuration option key to value.

Hash of RubyGems.org and alternate API keys

True if the backtrace option has been specified, or debug is on.

Checks the permissions of the credentials file. If they are not 0600 an error message is displayed and RubyGems aborts.

The name of the configuration file.

Location of RubyGems.org credentials

Delegates to @hash

Handle the command arguments.

No documentation available
No documentation available

Really verbose mode gives you extra output.

Returns the RubyGems.org API key

Sets the RubyGems.org API key to api_key

Writes out this config file, replacing its source.