diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-08 01:22:39 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-08 01:22:39 +0000 |
commit | 7ed9b794b4e3f3f9874f2ce19401461596d8a2c0 (patch) | |
tree | 5caaf13685de34b09d2949709a77b4c650b62741 /lib/rubygems/resolver/git_set.rb | |
parent | 866b438c21ff05dfeabba8bc9aa9850e415be607 (diff) |
* lib/rubygems: Update to RubyGems master 14749ce. This fixes bugs
handling of gem dependencies lockfiles (Gemfile.lock).
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/resolver/git_set.rb')
-rw-r--r-- | lib/rubygems/resolver/git_set.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/rubygems/resolver/git_set.rb b/lib/rubygems/resolver/git_set.rb index ed809c124f..1a2b230b80 100644 --- a/lib/rubygems/resolver/git_set.rb +++ b/lib/rubygems/resolver/git_set.rb @@ -46,6 +46,32 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set end ## + # Adds and returns a GitSpecification with the given +name+ and +version+ + # which came from a +repository+ at the given +reference+. If +submodules+ + # is true they are checked out along with the repository. + # + # This fills in the prefetch information as enough information about the gem + # is present in the arguments. + + def add_git_spec name, version, repository, reference, submodules # :nodoc: + add_git_gem name, repository, reference, submodules + + source = Gem::Source::Git.new name, repository, reference + source.root_dir = @root_dir + + spec = Gem::Specification.new do |s| + s.name = name + s.version = version + end + + git_spec = Gem::Resolver::GitSpecification.new self, spec, source + + @specs[spec.name] = git_spec + + git_spec + end + + ## # Finds all git gems matching +req+ def find_all req |