diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 21:50:14 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-01 21:50:14 +0000 |
commit | effdbf5936cc090a618e13c8f9a1b5412ebab2fa (patch) | |
tree | c8410a18cbbe7ad013470fc06fef0c75ce0fd230 /lib/rubygems.rb | |
parent | 9c4ef4b191a1e6b9abdbb21c7c709d1d0f2397e6 (diff) |
* lib/rubygems: Update to RubyGems HEAD(c202db2).
this version contains many enhancements see http://git.io/vtNwF
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 817805c1f4..7af0694402 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -9,7 +9,7 @@ require 'rbconfig' require 'thread' module Gem - VERSION = '2.4.8' + VERSION = '2.5.0' end # Must be first since it unloads the prelude from 1.9.2 @@ -26,12 +26,12 @@ require 'rubygems/errors' # For user documentation, see: # # * <tt>gem help</tt> and <tt>gem help [command]</tt> -# * {RubyGems User Guide}[http://docs.rubygems.org/read/book/1] -# * {Frequently Asked Questions}[http://docs.rubygems.org/read/book/3] +# * {RubyGems User Guide}[http://guides.rubygems.org/] +# * {Frequently Asked Questions}[http://guides.rubygems.org/faqs] # # For gem developer documentation see: # -# * {Creating Gems}[http://docs.rubygems.org/read/chapter/5] +# * {Creating Gems}[http://guides.rubygems.org/make-your-own-gem] # * Gem::Specification # * Gem::Version for version dependency notes # @@ -156,6 +156,7 @@ module Gem @@win_platform = nil @configuration = nil + @gemdeps = nil @loaded_specs = {} LOADED_SPECS_MUTEX = Mutex.new @path_to_default_spec_map = {} @@ -184,13 +185,9 @@ module Gem # or if it was ambiguous (and thus unresolved) the code in our custom # require will try to activate the more specific version. - spec = Gem::Specification.find_inactive_by_path path - - unless spec - spec = Gem::Specification.find_by_path path - return true if spec && spec.activated? - return false - end + spec = Gem::Specification.find_by_path path + return false unless spec + return true if spec.activated? begin spec.activate @@ -433,7 +430,7 @@ module Gem files = find_files_from_load_path glob if check_load_path - files.concat Gem::Specification.map { |spec| + files.concat Gem::Specification.stubs.map { |spec| spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}") }.flatten @@ -598,7 +595,7 @@ module Gem unless test_syck begin - gem 'psych', '~> 1.2', '>= 1.2.1' + gem 'psych', '>= 1.2.1' rescue Gem::LoadError # It's OK if the user does not have the psych gem installed. We will # attempt to require the stdlib version @@ -1052,7 +1049,7 @@ module Gem end rs = Gem::RequestSet.new - rs.load_gemdeps path + @gemdeps = rs.load_gemdeps path rs.resolve_current.map do |s| sp = s.full_spec @@ -1083,6 +1080,12 @@ module Gem attr_reader :loaded_specs ## + # GemDependencyAPI object, which is set when .use_gemdeps is called. + # This contains all the information from the Gemfile. + + attr_reader :gemdeps + + ## # Register a Gem::Specification for default gem. # # Two formats for the specification are supported: |