Maintenance of Ruby 2.0.0 ended on February 24, 2016. Read more
Specifies a Specification object that should be activated. Also contains a dependency that was used to introduce this activation.
# File rubygems/dependency_resolver.rb, line 414
def ==(other)
case other
when Gem::Specification
@spec == other
when ActivationRequest
@spec == other.spec && @request == other.request
else
false
end
end
# File rubygems/dependency_resolver.rb, line 402
def download(path)
if @spec.respond_to? :source
source = @spec.source
else
source = Gem.sources.first
end
Gem.ensure_gem_subdirectories path
source.download full_spec, path
end
# File rubygems/dependency_resolver.rb, line 390
def full_name
@spec.full_name
end
# File rubygems/dependency_resolver.rb, line 398
def full_spec
Gem::Specification === @spec ? @spec : @spec.spec
end
Indicates if the requested gem has already been installed.
# File rubygems/dependency_resolver.rb, line 428
def installed?
this_spec = full_spec
Gem::Specification.any? do |s|
s == this_spec
end
end
# File rubygems/dependency_resolver.rb, line 386
def name
@spec.name
end
Indicate if this activation is one of a set of possible requests for the same Dependency request.
# File rubygems/dependency_resolver.rb, line 375
def others_possible?
@others_possible
end
Return the ActivationRequest that contained the dependency that we were activated for.
# File rubygems/dependency_resolver.rb, line 382
def parent
@request.requester
end