1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems: Update to RubyGems master 50a8210. Important changes

in this commit:

  RubyGems now automatically checks for gem.deps.rb or Gemfile when
  running ruby executables.  This behavior is similar to `bundle exec
  rake`.  This change may be reverted before Ruby 2.1.0 if too many bugs
  are found.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-11-21 23:27:30 +00:00
parent b1529a30e0
commit 5307d803f5
30 changed files with 714 additions and 196 deletions

View file

@ -42,38 +42,27 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set
# Finds all git gems matching +req+
def find_all req
@repositories.keys.select do |name|
name == req.name
end.map do |name|
@specs[name] || load_spec(name)
end.select do |spec|
prefetch nil
specs.values.select do |spec|
req.matches_spec? spec
end
end
def load_spec name
repository, reference = @repositories[name]
source = Gem::Source::Git.new name, repository, reference
spec = source.load_spec name
git_spec =
Gem::Resolver::GitSpecification.new self, spec, source
@specs[name] = git_spec
end
##
# Prefetches specifications from the git repositories in this set.
def prefetch reqs
names = reqs.map { |req| req.name }
return unless @specs.empty?
@repositories.each_key do |name|
next unless names.include? name
@repositories.each do |name, (repository, reference)|
source = Gem::Source::Git.new name, repository, reference
load_spec name
source.specs.each do |spec|
git_spec = Gem::Resolver::GitSpecification.new self, spec, source
@specs[spec.name] = git_spec
end
end
end