diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
commit | 4de117a61517e839f2c45eaf45d56fc243d6d5b2 (patch) | |
tree | 7cb5af7a7eb513e5dddf5e343746b1611e628387 /lib/rubygems/source | |
parent | e548c09d429a5136285ea81aed418685359ed124 (diff) | |
download | ruby-4de117a61517e839f2c45eaf45d56fc243d6d5b2.tar.gz |
* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/source')
-rw-r--r-- | lib/rubygems/source/git.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/source/installed.rb | 7 | ||||
-rw-r--r-- | lib/rubygems/source/specific_file.rb | 7 |
3 files changed, 15 insertions, 5 deletions
diff --git a/lib/rubygems/source/git.rb b/lib/rubygems/source/git.rb index 2e3fa03730..fb9cbce2fb 100644 --- a/lib/rubygems/source/git.rb +++ b/lib/rubygems/source/git.rb @@ -51,7 +51,7 @@ class Gem::Source::Git < Gem::Source # will be checked out when the gem is installed. def initialize name, repository, reference, submodules = false - super(nil) + super repository @name = name @repository = repository @@ -67,7 +67,7 @@ class Gem::Source::Git < Gem::Source case other when Gem::Source::Git then 0 - when Gem::Source::Installed, + when Gem::Source::Vendor, Gem::Source::Lock then -1 when Gem::Source then @@ -101,7 +101,7 @@ class Gem::Source::Git < Gem::Source Dir.chdir install_dir do system @git, 'fetch', '--quiet', '--force', '--tags', install_dir - success = system @git, 'reset', '--quiet', '--hard', @reference + success = system @git, 'reset', '--quiet', '--hard', rev_parse success &&= Gem::Util.silent_system @git, 'submodule', 'update', diff --git a/lib/rubygems/source/installed.rb b/lib/rubygems/source/installed.rb index 6d343c2439..bd05c75af1 100644 --- a/lib/rubygems/source/installed.rb +++ b/lib/rubygems/source/installed.rb @@ -12,7 +12,8 @@ class Gem::Source::Installed < Gem::Source def <=> other case other - when Gem::Source::Lock, + when Gem::Source::Git, + Gem::Source::Lock, Gem::Source::Vendor then -1 when Gem::Source::Installed then @@ -31,5 +32,9 @@ class Gem::Source::Installed < Gem::Source nil end + def pretty_print q # :nodoc: + q.text '[Installed]' + end + end diff --git a/lib/rubygems/source/specific_file.rb b/lib/rubygems/source/specific_file.rb index a7b6c53542..250a839203 100644 --- a/lib/rubygems/source/specific_file.rb +++ b/lib/rubygems/source/specific_file.rb @@ -5,6 +5,11 @@ class Gem::Source::SpecificFile < Gem::Source ## + # The path to the gem for this specific file. + + attr_reader :path + + ## # Creates a new SpecificFile for the gem in +file+ def initialize(file) @@ -37,7 +42,7 @@ class Gem::Source::SpecificFile < Gem::Source end def pretty_print q # :nodoc: - q.group 2, '[Local:', ']' do + q.group 2, '[SpecificFile:', ']' do q.breakable q.text @path end |