class

Gem::ConfigFile

v2_2_9 - Show latest stable - Superclass: 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

: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)

Included modules

  • Gem::UserInteraction

Constants

DEFAULT_BACKTRACE = false

DEFAULT_BULK_THRESHOLD = 1000

DEFAULT_UPDATE_SOURCES = true

DEFAULT_VERBOSITY = true

OPERATING_SYSTEM_DEFAULTS = {}

PLATFORM_DEFAULTS = {}

SYSTEM_WIDE_CONFIG_FILE = File.join SYSTEM_CONFIG_PATH, 'gemrc'

YAMLErrors = [ArgumentError]

Attributes

[R]args
[W]backtrace
[RW]bulk_threshold
[RW]disable_default_gem_server
[R]hash
[RW]home
[RW]path
[RW]ssl_ca_cert
[R]ssl_client_cert
[R]ssl_verify_mode
[RW]update_sources
[RW]verbose

Files

  • lib/rubygems/config_file.rb