mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 02:23:59 +02:00
* lib/rubygems: Update to RubyGems master 4bdc4f2. Important changes
in this commit: RubyGems now chooses the test server port reliably. Patch by akr. Partial implementation of bundler's Gemfile format. Refactorings to improve the new resolver. Fixes bugs in the resolver. * test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
31d355aaa9
commit
4f6779bac7
75 changed files with 3143 additions and 616 deletions
60
lib/rubygems/dependency_resolver/specification.rb
Normal file
60
lib/rubygems/dependency_resolver/specification.rb
Normal file
|
@ -0,0 +1,60 @@
|
|||
##
|
||||
# A DependencyResolver::Specification contains a subset of the information
|
||||
# contained in a Gem::Specification. Only the information necessary for
|
||||
# dependency resolution in the resolver is included.
|
||||
|
||||
class Gem::DependencyResolver::Specification
|
||||
|
||||
##
|
||||
# The dependencies of the gem for this specification
|
||||
|
||||
attr_reader :dependencies
|
||||
|
||||
##
|
||||
# The name of the gem for this specification
|
||||
|
||||
attr_reader :name
|
||||
|
||||
##
|
||||
# The platform this gem works on.
|
||||
|
||||
attr_reader :platform
|
||||
|
||||
##
|
||||
# The set this specification came from.
|
||||
|
||||
attr_reader :set
|
||||
|
||||
##
|
||||
# The source for this specification
|
||||
|
||||
attr_reader :source
|
||||
|
||||
##
|
||||
# The version of the gem for this specification.
|
||||
|
||||
attr_reader :version
|
||||
|
||||
##
|
||||
# Sets default instance variables for the specification.
|
||||
|
||||
def initialize
|
||||
@dependencies = nil
|
||||
@name = nil
|
||||
@platform = nil
|
||||
@set = nil
|
||||
@source = nil
|
||||
@version = nil
|
||||
end
|
||||
|
||||
##
|
||||
# The name and version of the specification.
|
||||
#
|
||||
# Unlike Gem::Specification#full_name, the platform is not included.
|
||||
|
||||
def full_name
|
||||
"#{@name}-#{@version}"
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue