summaryrefslogtreecommitdiff
path: root/lib/rubygems/dependency_resolver/vendor_specification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/dependency_resolver/vendor_specification.rb')
-rw-r--r--lib/rubygems/dependency_resolver/vendor_specification.rb42
1 files changed, 7 insertions, 35 deletions
diff --git a/lib/rubygems/dependency_resolver/vendor_specification.rb b/lib/rubygems/dependency_resolver/vendor_specification.rb
index 2f18fab4ce..27b2fd6df2 100644
--- a/lib/rubygems/dependency_resolver/vendor_specification.rb
+++ b/lib/rubygems/dependency_resolver/vendor_specification.rb
@@ -1,43 +1,15 @@
-class Gem::DependencyResolver::VendorSpecification
+##
+# A VendorSpecification represents a gem that has been unpacked into a project
+# and is being loaded through a gem dependencies file through the +path:+
+# option.
- attr_reader :spec
-
- attr_reader :set
-
- def initialize set, spec, source=nil
- @set = set
- @source = source
- @spec = spec
- end
+class Gem::DependencyResolver::VendorSpecification < Gem::DependencyResolver::SpecSpecification
def == other # :nodoc:
self.class === other and
@set == other.set and
- @spec == other.spec
- end
-
- def dependencies
- @spec.dependencies
- end
-
- def full_name
- "#{@spec.name}-#{@spec.version}"
- end
-
- def name
- @spec.name
- end
-
- def platform
- @spec.platform
- end
-
- def source
- @source ||= Gem::Source::Vendor.new
- end
-
- def version
- @spec.version
+ @spec == other.spec and
+ @source == other.source
end
end