diff options
-rw-r--r-- | lib/rubygems/resolver/activation_request.rb | 41 |
1 files changed, 34 insertions, 7 deletions
@@ -1,21 +1,33 @@ ## -# Specifies a Specification object that should be activated. -# Also contains a dependency that was used to introduce this -# activation. class Gem::Resolver::ActivationRequest attr_reader :request attr_reader :spec - def initialize spec, req, others_possible = true @spec = spec - @request = req @others_possible = others_possible end - def == other case other when Gem::Specification @spec == other @@ -26,6 +38,9 @@ class Gem::Resolver::ActivationRequest end end def download path if @spec.respond_to? :source source = @spec.source @@ -38,10 +53,16 @@ class Gem::Resolver::ActivationRequest source.download full_spec, path end def full_name @spec.full_name end def full_spec Gem::Specification === @spec ? @spec : @spec.spec end @@ -66,7 +87,7 @@ class Gem::Resolver::ActivationRequest end ## - # Indicates if the requested gem has already been installed. def installed? case @spec @@ -81,6 +102,9 @@ class Gem::Resolver::ActivationRequest end end def name @spec.name end @@ -130,6 +154,9 @@ class Gem::Resolver::ActivationRequest end end def version @spec.version end |