1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
drbrain 2013-07-30 22:10:21 +00:00
parent d82e5cc4cc
commit 310d77d4b0
14 changed files with 311 additions and 212 deletions

View file

@ -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