diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
commit | 4de117a61517e839f2c45eaf45d56fc243d6d5b2 (patch) | |
tree | 7cb5af7a7eb513e5dddf5e343746b1611e628387 /lib/rubygems/resolver/specification.rb | |
parent | e548c09d429a5136285ea81aed418685359ed124 (diff) | |
download | ruby-4de117a61517e839f2c45eaf45d56fc243d6d5b2.tar.gz |
* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/resolver/specification.rb')
-rw-r--r-- | lib/rubygems/resolver/specification.rb | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/rubygems/resolver/specification.rb b/lib/rubygems/resolver/specification.rb index d158225474..4d77293262 100644 --- a/lib/rubygems/resolver/specification.rb +++ b/lib/rubygems/resolver/specification.rb @@ -31,6 +31,14 @@ class Gem::Resolver::Specification attr_reader :source ## + # The Gem::Specification for this Resolver::Specification. + # + # Implementers, note that #install updates @spec, so be sure to cache the + # Gem::Specification in @spec when overriding. + + attr_reader :spec + + ## # The version of the gem for this specification. attr_reader :version @@ -48,6 +56,13 @@ class Gem::Resolver::Specification end ## + # Fetches development dependencies if the source does not provide them by + # default (see APISpecification). + + def fetch_development_dependencies # :nodoc: + end + + ## # The name and version of the specification. # # Unlike Gem::Specification#full_name, the platform is not included. @@ -61,8 +76,11 @@ class Gem::Resolver::Specification # install method yields a Gem::Installer instance, which indicates the # gem will be installed, or +nil+, which indicates the gem is already # installed. + # + # After installation #spec is updated to point to the just-installed + # specification. - def install options + def install options = {} require 'rubygems/installer' destination = options[:install_dir] || Gem.dir @@ -75,7 +93,7 @@ class Gem::Resolver::Specification yield installer if block_given? - installer.install + @spec = installer.install end ## @@ -85,5 +103,8 @@ class Gem::Resolver::Specification Gem::Platform.match spec.platform end + def local? # :nodoc: + false + end end |