diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-20 08:39:12 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-20 08:39:12 +0000 |
commit | 8289771e326006cc4e15a667e3eff3a72cfb3327 (patch) | |
tree | f6d367888b42848fd6a660fad57fa2020e38c097 /lib/rubygems.rb | |
parent | 40d8543fbdec5485a638a2cb1008089d106b978d (diff) | |
download | ruby-8289771e326006cc4e15a667e3eff3a72cfb3327.tar.gz |
Import RubyGems 1.0.0, r1575
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index f233b520f1..72f735ce50 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -6,6 +6,7 @@ #++ require 'rubygems/rubygems_version' +require 'rubygems/defaults' require 'thread' module Gem @@ -29,8 +30,8 @@ module Kernel # version). # # You can define the environment variable GEM_SKIP as a way to not - # load specified gems. you might do this to test out changes that - # haven't been intsalled yet. Example: + # load specified gems. You might do this to test out changes that + # haven't been installed yet. Example: # # GEM_SKIP=libA:libB ruby-I../libA -I../libB ./mycode.rb # @@ -49,17 +50,6 @@ module Kernel active_gem_with_options(gem_name, version_requirements) end - # Same as the +gem+ command, but will also require a file if the gem - # provides an auto-required file name. - # - # DEPRECATED! Use +gem+ instead. - # - def require_gem(gem_name, *version_requirements) - file, lineno = location_of_caller - warn "#{file}:#{lineno}:Warning: require_gem is obsolete. Use gem instead." - active_gem_with_options(gem_name, version_requirements, :auto_require=>true) - end - # Return the file name (string) and line number (integer) of the caller of # the caller of this method. def location_of_caller @@ -84,15 +74,17 @@ module Gem ConfigMap = {} unless defined?(ConfigMap) require 'rbconfig' ConfigMap.merge!( - :sitedir => RbConfig::CONFIG["sitedir"], - :ruby_version => RbConfig::CONFIG["ruby_version"], - :libdir => RbConfig::CONFIG["libdir"], - :sitelibdir => RbConfig::CONFIG["sitelibdir"], - :arch => RbConfig::CONFIG["arch"], - :bindir => RbConfig::CONFIG["bindir"], + :BASERUBY => RbConfig::CONFIG["BASERUBY"], :EXEEXT => RbConfig::CONFIG["EXEEXT"], + :RUBY_INSTALL_NAME => RbConfig::CONFIG["RUBY_INSTALL_NAME"], :RUBY_SO_NAME => RbConfig::CONFIG["RUBY_SO_NAME"], - :ruby_install_name => RbConfig::CONFIG["ruby_install_name"] + :arch => RbConfig::CONFIG["arch"], + :bindir => RbConfig::CONFIG["bindir"], + :libdir => RbConfig::CONFIG["libdir"], + :ruby_install_name => RbConfig::CONFIG["ruby_install_name"], + :ruby_version => RbConfig::CONFIG["ruby_version"], + :sitedir => RbConfig::CONFIG["sitedir"], + :sitelibdir => RbConfig::CONFIG["sitelibdir"] ) MUTEX = Mutex.new @@ -207,10 +199,6 @@ module Gem @sources end - # An Array of the default sources that come with RubyGems. - def default_sources - %w[http://gems.rubyforge.org] - end # Provide an alias for the old name. alias cache source_index @@ -536,18 +524,6 @@ module Gem end end - public - - # Default home directory path to be used if an alternate value is - # not specified in the environment. - def default_dir - if defined? RUBY_FRAMEWORK_VERSION - return File.join(File.dirname(ConfigMap[:sitedir]), "Gems", ConfigMap[:ruby_version]) - else - File.join(ConfigMap[:libdir], 'ruby', 'gems', ConfigMap[:ruby_version]) - end - end - end end |