3 # An Array of the default sources that come with RubyGems.
4 def self.default_sources
5 %w[http://gems.rubyforge.org/]
8 # Default home directory path to be used if an alternate value is not
9 # specified in the environment.
11 if defined? RUBY_FRAMEWORK_VERSION then
12 File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
13 ConfigMap[:ruby_version]
14 elsif defined? RUBY_ENGINE then
15 File.join ConfigMap[:libdir], RUBY_ENGINE, 'gems',
16 ConfigMap[:ruby_version]
18 File.join ConfigMap[:libdir], 'ruby', 'gems', ConfigMap[:ruby_version]
27 # Deduce Ruby's --program-prefix and --program-suffix from its install name.
28 def self.default_exec_format
29 baseruby = ConfigMap[:BASERUBY] || 'ruby'
30 ConfigMap[:RUBY_INSTALL_NAME].sub(baseruby, '%s') rescue '%s'
33 # The default directory for binaries
34 def self.default_bindir
35 if defined? RUBY_FRAMEWORK_VERSION then # mac framework support
37 else # generic install
42 # The default system-wide source info cache directory.
43 def self.default_system_source_cache_dir
44 File.join Gem.dir, 'source_cache'
47 # The default user-specific source info cache directory.
48 def self.default_user_source_cache_dir
49 File.join Gem.user_home, '.gem', 'source_cache'