[rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
https://github.com/rubygems/rubygems/commit/4ec608a573
This commit is contained in:
parent
f681f9ae24
commit
6eab8095fa
@ -118,15 +118,18 @@ command to remove old versions.
|
|||||||
|
|
||||||
updated = update_gems gems_to_update
|
updated = update_gems gems_to_update
|
||||||
|
|
||||||
|
installed_names = highest_installed_gems.keys
|
||||||
updated_names = updated.map {|spec| spec.name }
|
updated_names = updated.map {|spec| spec.name }
|
||||||
not_updated_names = options[:args].uniq - updated_names
|
not_updated_names = options[:args].uniq - updated_names
|
||||||
|
not_installed_names = not_updated_names - installed_names
|
||||||
|
up_to_date_names = not_updated_names - not_installed_names
|
||||||
|
|
||||||
if updated.empty?
|
if updated.empty?
|
||||||
say "Nothing to update"
|
say "Nothing to update"
|
||||||
else
|
else
|
||||||
say "Gems updated: #{updated_names.join(' ')}"
|
say "Gems updated: #{updated_names.join(' ')}"
|
||||||
say "Gems already up-to-date: #{not_updated_names.join(' ')}" unless not_updated_names.empty?
|
|
||||||
end
|
end
|
||||||
|
say "Gems already up-to-date: #{up_to_date_names.join(' ')}" unless up_to_date_names.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_remote_gems(spec) # :nodoc:
|
def fetch_remote_gems(spec) # :nodoc:
|
||||||
|
@ -535,6 +535,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
|||||||
out = @ui.output.split "\n"
|
out = @ui.output.split "\n"
|
||||||
assert_equal "Updating installed gems", out.shift
|
assert_equal "Updating installed gems", out.shift
|
||||||
assert_equal "Nothing to update", out.shift
|
assert_equal "Nothing to update", out.shift
|
||||||
|
assert_equal "Gems already up-to-date: a", out.shift
|
||||||
|
|
||||||
assert_empty out
|
assert_empty out
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user