summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/outdated_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-30 22:10:21 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-30 22:10:21 +0000
commit310d77d4b05d1aa166616ca323ebcc7f67bc7378 (patch)
treec778eba7300c7eec523962d80f973d1ab1f18a4e /lib/rubygems/commands/outdated_command.rb
parentd82e5cc4cc0c3340a9fa92f795751d495e13efe1 (diff)
* lib/rubygems: Import RubyGems from master as of commit 523551c
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/outdated_command.rb')
-rw-r--r--lib/rubygems/commands/outdated_command.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/rubygems/commands/outdated_command.rb b/lib/rubygems/commands/outdated_command.rb
index 887faab0a2..196d0d67e6 100644
--- a/lib/rubygems/commands/outdated_command.rb
+++ b/lib/rubygems/commands/outdated_command.rb
@@ -16,18 +16,8 @@ class Gem::Commands::OutdatedCommand < Gem::Command
end
def execute
- Gem::Specification.outdated.sort.each do |name|
- local = Gem::Specification.find_all_by_name(name).max
- dep = Gem::Dependency.new local.name, ">= #{local.version}"
- remotes, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dep
-
- next if remotes.empty?
-
- remotes.sort! { |a,b| a[0].version <=> b[0].version }
-
- highest = remotes.last.first
-
- say "#{local.name} (#{local.version} < #{highest.version})"
+ Gem::Specification.outdated_and_latest_version.each do |spec, remote_version|
+ say "#{spec.name} (#{spec.version} < #{remote_version})"
end
end
end