mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:
Implement gem.deps.rb (Gemfile) .lock support Fixed `gem uninstall` for a relative directory in GEM_HOME. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6727297dfe
commit
73fc703f7c
31 changed files with 598 additions and 26 deletions
|
@ -10,6 +10,12 @@
|
|||
|
||||
class Gem::Resolver::GitSet < Gem::Resolver::Set
|
||||
|
||||
##
|
||||
# The root directory for git gems in this set. This is usually Gem.dir, the
|
||||
# installation directory for regular gems.
|
||||
|
||||
attr_accessor :root_dir
|
||||
|
||||
##
|
||||
# Contains repositories needing submodules
|
||||
|
||||
|
@ -30,6 +36,7 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set
|
|||
@git = ENV['git'] || 'git'
|
||||
@need_submodules = {}
|
||||
@repositories = {}
|
||||
@root_dir = Gem.dir
|
||||
@specs = {}
|
||||
end
|
||||
|
||||
|
@ -57,6 +64,7 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set
|
|||
|
||||
@repositories.each do |name, (repository, reference)|
|
||||
source = Gem::Source::Git.new name, repository, reference
|
||||
source.root_dir = @root_dir
|
||||
|
||||
source.specs.each do |spec|
|
||||
git_spec = Gem::Resolver::GitSpecification.new self, spec, source
|
||||
|
@ -66,5 +74,20 @@ class Gem::Resolver::GitSet < Gem::Resolver::Set
|
|||
end
|
||||
end
|
||||
|
||||
def pretty_print q # :nodoc:
|
||||
q.group 2, '[GitSet', ']' do
|
||||
next if @repositories.empty?
|
||||
q.breakable
|
||||
|
||||
repos = @repositories.map do |name, (repository, reference)|
|
||||
"#{name}: #{repository}@#{reference}"
|
||||
end
|
||||
|
||||
q.seplist repos do |repo|
|
||||
q.text repo
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue