mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update RubyGems to master 0886307. This commit
improves documentation and should bring ruby above 75% documented on rubyci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8552f7aa68
commit
3f15d35f83
13 changed files with 306 additions and 54 deletions
|
@ -81,7 +81,16 @@ end
|
|||
|
||||
class Gem::GemNotFoundException < Gem::Exception; end
|
||||
|
||||
##
|
||||
# Raised by the DependencyInstaller when a specific gem cannot be found
|
||||
|
||||
class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
|
||||
|
||||
##
|
||||
# Creates a new SpecificGemNotFoundException for a gem with the given +name+
|
||||
# and +version+. Any +errors+ encountered when attempting to find the gem
|
||||
# are also stored.
|
||||
|
||||
def initialize(name, version, errors=nil)
|
||||
super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"
|
||||
|
||||
|
@ -90,7 +99,21 @@ class Gem::SpecificGemNotFoundException < Gem::GemNotFoundException
|
|||
@errors = errors
|
||||
end
|
||||
|
||||
attr_reader :name, :version, :errors
|
||||
##
|
||||
# The name of the gem that could not be found.
|
||||
|
||||
attr_reader :name
|
||||
|
||||
##
|
||||
# The version of the gem that could not be found.
|
||||
|
||||
attr_reader :version
|
||||
|
||||
##
|
||||
# Errors encountered attempting to find the gem.
|
||||
|
||||
attr_reader :errors
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -160,6 +183,9 @@ class Gem::RemoteSourceException < Gem::Exception; end
|
|||
|
||||
class Gem::RubyVersionMismatch < Gem::Exception; end
|
||||
|
||||
##
|
||||
# Raised by Gem::Validator when something is not right in a gem.
|
||||
|
||||
class Gem::VerificationError < Gem::Exception; end
|
||||
|
||||
##
|
||||
|
@ -167,8 +193,15 @@ class Gem::VerificationError < Gem::Exception; end
|
|||
# exit_code
|
||||
|
||||
class Gem::SystemExitException < SystemExit
|
||||
|
||||
##
|
||||
# The exit code for the process
|
||||
|
||||
attr_accessor :exit_code
|
||||
|
||||
##
|
||||
# Creates a new SystemExitException with the given +exit_code+
|
||||
|
||||
def initialize(exit_code)
|
||||
@exit_code = exit_code
|
||||
|
||||
|
@ -183,8 +216,16 @@ end
|
|||
|
||||
class Gem::UnsatisfiableDependencyError < Gem::Exception
|
||||
|
||||
##
|
||||
# The unsatisfiable dependency. This is a
|
||||
# Gem::DependencyResolver::DependencyRequest, not a Gem::Dependency
|
||||
|
||||
attr_reader :dependency
|
||||
|
||||
##
|
||||
# Creates a new UnsatisfiableDepedencyError for the unsatisfiable
|
||||
# Gem::DependencyResolver::DependencyRequest +dep+
|
||||
|
||||
def initialize dep
|
||||
requester = dep.requester ? dep.requester.request : '(unknown)'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue