2023-02-17 15:41:07 +03:00
|
|
|
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb
|
|
|
|
index 4aa8b4d..8354c08 100644
|
|
|
|
--- a/lib/rubygems/config_file.rb
|
|
|
|
+++ b/lib/rubygems/config_file.rb
|
|
|
|
@@ -62,12 +62,7 @@ class Gem::ConfigFile
|
|
|
|
# :stopdoc:
|
|
|
|
|
|
|
|
SYSTEM_CONFIG_PATH =
|
|
|
|
- begin
|
|
|
|
- require "etc"
|
|
|
|
- Etc.sysconfdir
|
|
|
|
- rescue LoadError, NoMethodError
|
|
|
|
- RbConfig::CONFIG["sysconfdir"] || "/etc"
|
|
|
|
- end
|
|
|
|
+ RbConfig::CONFIG["sysconfdir"] || "/etc"
|
|
|
|
|
|
|
|
# :startdoc:
|
|
|
|
|
|
|
|
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
|
2023-06-16 16:33:37 +03:00
|
|
|
index b186375..de168c4 100644
|
2023-02-17 15:41:07 +03:00
|
|
|
--- a/lib/rubygems/defaults.rb
|
|
|
|
+++ b/lib/rubygems/defaults.rb
|
|
|
|
@@ -34,7 +28,7 @@ def self.default_spec_cache_dir
|
|
|
|
# specified in the environment
|
|
|
|
|
|
|
|
def self.default_dir
|
|
|
|
- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"])
|
2023-06-16 16:33:37 +03:00
|
|
|
+ @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"])
|
2023-02-17 15:41:07 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
##
|
|
|
|
@@ -100,8 +94,7 @@ def self.user_home
|
|
|
|
# Path for gems in the user's home directory
|
|
|
|
|
|
|
|
def self.user_dir
|
|
|
|
- gem_dir = File.join(Gem.user_home, ".gem")
|
|
|
|
- gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir)
|
|
|
|
+ gem_dir = Gem.data_home
|
|
|
|
parts = [gem_dir, ruby_engine]
|
|
|
|
parts << RbConfig::CONFIG["ruby_version"] unless RbConfig::CONFIG["ruby_version"].empty?
|
|
|
|
File.join parts
|
2023-06-16 16:33:37 +03:00
|
|
|
@@ -176,6 +172,7 @@ def self.default_path
|
|
|
|
path << user_dir if user_home && File.exist?(user_home)
|
|
|
|
path << default_dir
|
|
|
|
path << vendor_dir if vendor_dir && File.directory?(vendor_dir)
|
|
|
|
+ path << File.expand_path(File.join(__FILE__, "../../../../../ruby-lang.org", "v#{RbConfig::CONFIG["RUBY_PROGRAM_VERSION"]}", "lib/ruby/gems", RbConfig::CONFIG["ruby_version"]))
|
|
|
|
path
|
|
|
|
end
|
|
|
|
|
|
|
|
@@ -197,7 +194,7 @@ def self.default_exec_format
|
2023-02-17 15:41:07 +03:00
|
|
|
# The default directory for binaries
|
|
|
|
|
|
|
|
def self.default_bindir
|
|
|
|
- RbConfig::CONFIG["bindir"]
|
|
|
|
+ "/usr/local/bin"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.ruby_engine
|
2023-06-16 16:33:37 +03:00
|
|
|
@@ -208,26 +205,14 @@ def self.ruby_engine
|
2023-02-17 15:41:07 +03:00
|
|
|
# The default signing key path
|
|
|
|
|
|
|
|
def self.default_key_path
|
|
|
|
- default_key_path = File.join Gem.user_home, ".gem", "gem-private_key.pem"
|
|
|
|
-
|
|
|
|
- unless File.exist?(default_key_path)
|
|
|
|
- default_key_path = File.join Gem.data_home, "gem", "gem-private_key.pem"
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
- default_key_path
|
|
|
|
+ File.join Gem.data_home, "private-key.pem"
|
|
|
|
end
|
|
|
|
|
|
|
|
##
|
|
|
|
# The default signing certificate chain path
|
|
|
|
|
|
|
|
def self.default_cert_path
|
|
|
|
- default_cert_path = File.join Gem.user_home, ".gem", "gem-public_cert.pem"
|
|
|
|
-
|
|
|
|
- unless File.exist?(default_cert_path)
|
|
|
|
- default_cert_path = File.join Gem.data_home, "gem", "gem-public_cert.pem"
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
- default_cert_path
|
|
|
|
+ File.join Gem.data_home, "public-cert.pem"
|
|
|
|
end
|
|
|
|
|
|
|
|
##
|
2023-06-16 16:33:37 +03:00
|
|
|
@@ -267,7 +252,10 @@ def self.vendor_dir # :nodoc:
|
2023-02-17 15:41:07 +03:00
|
|
|
# end
|
|
|
|
|
|
|
|
def self.operating_system_defaults
|
|
|
|
- {}
|
|
|
|
+ {
|
2023-03-19 15:01:42 +03:00
|
|
|
+ 'install' => '--no-rdoc --no-ri --env-shebang',
|
|
|
|
+ 'update' => '--no-rdoc --no-ri --env-shebang'
|
2023-02-17 15:41:07 +03:00
|
|
|
+ }
|
|
|
|
end
|
|
|
|
|
|
|
|
##
|