summaryrefslogtreecommitdiff
path: root/lib/rubygems/config_file.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
commitc00e84327f14845bd484e76b5ee5dfeb1fa9ce3d ()
tree9f558dafa363f4f0118d504a50cd4461e2821cd1 /lib/rubygems/config_file.rb
parent6b05153a3a75b74b64553d6a46f501d9ee0f0376 (diff)
Merge rubygems master.
This is RC version of Rubygems 2.7.0. https://.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems/config_file.rb37
1 files changed, 13 insertions, 24 deletions
@@ -336,6 +336,15 @@ if you believe they were disclosed to a third party.
load_api_keys # reload
end
def load_file(filename)
Gem.load_yaml
@@ -419,31 +428,11 @@ if you believe they were disclosed to a third party.
# to_yaml only overwrites things you can't override on the command line.
def to_yaml # :nodoc:
yaml_hash = {}
- yaml_hash[:backtrace] = if @hash.key?(:backtrace)
- @hash[:backtrace]
- else
- DEFAULT_BACKTRACE
- end
-
- yaml_hash[:bulk_threshold] = if @hash.key?(:bulk_threshold)
- @hash[:bulk_threshold]
- else
- DEFAULT_BULK_THRESHOLD
- end
-
yaml_hash[:sources] = Gem.sources.to_a
-
- yaml_hash[:update_sources] = if @hash.key?(:update_sources)
- @hash[:update_sources]
- else
- DEFAULT_UPDATE_SOURCES
- end
-
- yaml_hash[:verbose] = if @hash.key?(:verbose)
- @hash[:verbose]
- else
- DEFAULT_VERBOSITY
- end
yaml_hash[:ssl_verify_mode] =
@hash[:ssl_verify_mode] if @hash.key? :ssl_verify_mode