1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems: Update to RubyGems master 612f85a. Notable changes:

Fixed installation and activation of git: and path: gems via
  Gem.use_gemdeps

  Improved documentation coverage

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-11-25 19:14:49 +00:00
parent c107372597
commit 04817ae6d3
38 changed files with 587 additions and 88 deletions

View file

@ -1,21 +1,33 @@
##
# Specifies a Specification object that should be activated.
# Also contains a dependency that was used to introduce this
# activation.
# Specifies a Specification object that should be activated. Also contains a
# dependency that was used to introduce this activation.
class Gem::Resolver::ActivationRequest
##
# The parent request for this activation request.
attr_reader :request
##
# The specification to be activated.
attr_reader :spec
def initialize spec, req, others_possible = true
##
# Creates a new ActivationRequest that will activate +spec+. The parent
# +request+ is used to provide diagnostics in case of conflicts.
#
# +others_possible+ indicates that other specifications may also match this
# activation request.
def initialize spec, request, others_possible = true
@spec = spec
@request = req
@request = request
@others_possible = others_possible
end
def == other
def == other # :nodoc:
case other
when Gem::Specification
@spec == other
@ -26,6 +38,9 @@ class Gem::Resolver::ActivationRequest
end
end
##
# Downloads a gem at +path+ and returns the file path.
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
##
# The full name of the specification to be activated.
def full_name
@spec.full_name
end
##
# The Gem::Specification for this activation request.
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.
# True if the requested gem has already been installed.
def installed?
case @spec
@ -81,6 +102,9 @@ class Gem::Resolver::ActivationRequest
end
end
##
# The name of this activation request's specification
def name
@spec.name
end
@ -130,6 +154,9 @@ class Gem::Resolver::ActivationRequest
end
end
##
# The version of this activation request's specification
def version
@spec.version
end