1 $NetBSD: patch-lib_rubygems_config__file.rb,v 1.1.1.1 2011/11/08 16:10:51 taca Exp $
3 Don't hard code config file's path for gem.
5 --- lib/rubygems/config_file.rb.orig 2012-04-19 23:38:41.000000000 +0000
6 +++ lib/rubygems/config_file.rb
7 @@ -47,32 +47,7 @@ class Gem::ConfigFile
11 - system_config_path =
15 - rescue LoadError, NoMethodError
17 - # TODO: remove after we drop 1.8.7 and 1.9.1
20 - CSIDL_COMMON_APPDATA = 0x0023
22 - if RUBY_VERSION > '1.9' then
23 - SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP',
25 - SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
27 - SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP',
29 - SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
34 - RbConfig::CONFIG["sysconfdir"] || "/etc"
37 + system_config_path = '@PKG_SYSCONFDIR@'
39 SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc'