mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4f6779bac7
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
60 lines
1.1 KiB
Ruby
60 lines
1.1 KiB
Ruby
##
|
|
# 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
|
|
|