diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-22 00:27:02 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-22 00:27:02 +0000 |
commit | 615ac3593499f54fde4b1eb0fba66b6bd944821b (patch) | |
tree | 1f0b0e97ee3dd51798658d53cee7eec976a83a97 /lib/rubygems/config_file.rb | |
parent | ff31b35f6a66f3c1548e3356d506ff65a574be7f (diff) |
Merge rubygems master branch from github.com/rubygems/rubygems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/config_file.rb')
-rw-r--r-- | lib/rubygems/config_file.rb | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index 9ef1236204..f8782015a1 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -45,6 +45,7 @@ class Gem::ConfigFile DEFAULT_VERBOSITY = true DEFAULT_UPDATE_SOURCES = true DEFAULT_CONCURRENT_DOWNLOADS = 8 + DEFAULT_CERT_EXPIRATION_LENGTH_DAYS = 365 ## # For Ruby packagers to set configuration defaults. Set in @@ -136,6 +137,11 @@ class Gem::ConfigFile attr_accessor :sources ## + # Expiration length to sign a certificate + + attr_accessor :cert_expiration_length_days + + ## # Path name of directory or file of openssl client certificate, used for remote https connection with client authentication attr_reader :ssl_client_cert @@ -185,6 +191,7 @@ class Gem::ConfigFile @verbose = DEFAULT_VERBOSITY @update_sources = DEFAULT_UPDATE_SOURCES @concurrent_downloads = DEFAULT_CONCURRENT_DOWNLOADS + @cert_expiration_length_days = DEFAULT_CERT_EXPIRATION_LENGTH_DAYS operating_system_config = Marshal.load Marshal.dump(OPERATING_SYSTEM_DEFAULTS) platform_config = Marshal.load Marshal.dump(PLATFORM_DEFAULTS) @@ -202,15 +209,15 @@ class Gem::ConfigFile end # HACK these override command-line args, which is bad - @backtrace = @hash[:backtrace] if @hash.key? :backtrace - @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold - @home = @hash[:gemhome] if @hash.key? :gemhome - @path = @hash[:gempath] if @hash.key? :gempath - @update_sources = @hash[:update_sources] if @hash.key? :update_sources - @verbose = @hash[:verbose] if @hash.key? :verbose - @concurrent_downloads = @hash[:concurrent_downloads] if @hash.key? :concurrent_downloads - @disable_default_gem_server = @hash[:disable_default_gem_server] if @hash.key? :disable_default_gem_server - @sources = @hash[:sources] if @hash.key? :sources + @backtrace = @hash[:backtrace] if @hash.key? :backtrace + @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold + @home = @hash[:gemhome] if @hash.key? :gemhome + @path = @hash[:gempath] if @hash.key? :gempath + @update_sources = @hash[:update_sources] if @hash.key? :update_sources + @verbose = @hash[:verbose] if @hash.key? :verbose + @disable_default_gem_server = @hash[:disable_default_gem_server] if @hash.key? :disable_default_gem_server + @sources = @hash[:sources] if @hash.key? :sources + @cert_expiration_length_days = @hash[:cert_expiration_length_days] if @hash.key? :cert_expiration_length_days @ssl_verify_mode = @hash[:ssl_verify_mode] if @hash.key? :ssl_verify_mode @ssl_ca_cert = @hash[:ssl_ca_cert] if @hash.key? :ssl_ca_cert |