Type:
Class
Constants:
DEFAULT_BACKTRACE : 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

SYSTEM_WIDE_CONFIG_FILE : File.join system_config_path, 'gemrc'

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:

1
2
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)

check_credentials_permissions
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

check_credentials_permissions() Instance Public methods Checks the permissions

2025-01-10 15:47:30
config_file_name
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

config_file_name() Instance Public methods The name of the configuration file

2025-01-10 15:47:30
[]=
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

[]=(key, value) Instance Public methods

2025-01-10 15:47:30
each
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

each(&block) Instance Public methods Delegates to @hash

2025-01-10 15:47:30
rubygems_api_key=
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

rubygems_api_key=(api_key) Instance Public methods Sets the RubyGems.org API

2025-01-10 15:47:30
handle_arguments
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

handle_arguments(arg_list) Instance Public methods Handle the command arguments

2025-01-10 15:47:30
write
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

write() Instance Public methods Writes out this config file, replacing its source

2025-01-10 15:47:30
load_file
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

load_file(filename) Instance Public methods

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

new(args) Class Public methods Create the config file object. args

2025-01-10 15:47:30
load_api_keys
  • References/Ruby on Rails/Ruby/Classes/Gem/Gem::ConfigFile

load_api_keys() Instance Public methods

2025-01-10 15:47:30