diff options
Diffstat (limited to 'lib/rubygems/resolver/git_specification.rb')
-rw-r--r-- | lib/rubygems/resolver/git_specification.rb | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/rubygems/resolver/git_specification.rb b/lib/rubygems/resolver/git_specification.rb index 113e7ea9de..55e180e525 100644 --- a/lib/rubygems/resolver/git_specification.rb +++ b/lib/rubygems/resolver/git_specification.rb @@ -12,11 +12,15 @@ class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification @source == other.source end + def add_dependency dependency # :nodoc: + spec.dependencies << dependency + end + ## # Installing a git gem only involves building the extensions and generating # the executables. - def install options + def install options = {} require 'rubygems/installer' installer = Gem::Installer.new '', options @@ -31,5 +35,25 @@ class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification installer.run_post_install_hooks end + def pretty_print q # :nodoc: + q.group 2, '[GitSpecification', ']' do + q.breakable + q.text "name: #{name}" + + q.breakable + q.text "version: #{version}" + + q.breakable + q.text 'dependencies:' + q.breakable + q.pp dependencies + + q.breakable + q.text "source:" + q.breakable + q.pp @source + end + end + end |