aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/available_set.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
commit1daa0b113d853bfa57b776cc569939b61ca14292 (patch)
treef8c4acb08a551820299dff2b13966d6ac38d31e4 /lib/rubygems/available_set.rb
parent85995e88d49c442b5b113c2676456133e79f5c02 (diff)
downloadruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems Restored concurrent requires Fixed installing gems with extensions with --install-dir Fixed `gem fetch -v` to install the latest version Fixed installing gems with "./" in their files entries * test/rubygems/test_gem_package.rb: Tests for the above. * NEWS: Updated for RubyGems 2.1.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/available_set.rb')
-rw-r--r--lib/rubygems/available_set.rb68
1 files changed, 0 insertions, 68 deletions
diff --git a/lib/rubygems/available_set.rb b/lib/rubygems/available_set.rb
index bb0b3a3abe..80539feee9 100644
--- a/lib/rubygems/available_set.rb
+++ b/lib/rubygems/available_set.rb
@@ -1,7 +1,4 @@
class Gem::AvailableSet
-
- include Enumerable
-
Tuple = Struct.new(:spec, :source)
def initialize
@@ -39,28 +36,6 @@ class Gem::AvailableSet
self
end
- ##
- # Yields each Tuple in this AvailableSet
-
- def each
- return enum_for __method__ unless block_given?
-
- @set.each do |tuple|
- yield tuple
- end
- end
-
- ##
- # Yields the Gem::Specification for each Tuple in this AvailableSet
-
- def each_spec
- return enum_for __method__ unless block_given?
-
- each do |tuple|
- yield tuple.spec
- end
- end
-
def empty?
@set.empty?
end
@@ -91,49 +66,6 @@ class Gem::AvailableSet
f.source
end
- ##
- # Converts this AvailableSet into a RequestSet that can be used to install
- # gems.
- #
- # If +development+ is :none then no development dependencies are installed.
- # Other options are :shallow for only direct development dependencies of the
- # gems in this set or :all for all development dependencies.
-
- def to_request_set development = :none
- request_set = Gem::RequestSet.new
- request_set.development = :all == development
-
- each_spec do |spec|
- request_set.always_install << spec
-
- request_set.gem spec.name, spec.version
- request_set.import spec.development_dependencies if
- :shallow == development
- end
-
- request_set
- end
-
- ##
- #
- # Used by the DependencyResolver, the protocol to use a AvailableSet as a
- # search Set.
-
- def find_all(req)
- dep = req.dependency
-
- match = @set.find_all do |t|
- dep.matches_spec? t.spec
- end
-
- match.map do |t|
- Gem::DependencyResolver::InstalledSpecification.new(self, t.spec, t.source)
- end
- end
-
- def prefetch(reqs)
- end
-
def pick_best!
return self if empty?