Class Gem::Commands::OutdatedCommand
In: lib/rubygems/commands/outdated_command.rb
Parent: Gem::Command

Methods

execute   new  

Included Modules

Gem::LocalRemoteOptions Gem::VersionOption

Public Class methods

[Source]

    # File lib/rubygems/commands/outdated_command.rb, line 11
11:   def initialize
12:     super 'outdated', 'Display all gems that need updates'
13: 
14:     add_local_remote_options
15:     add_platform_option
16:   end

Public Instance methods

[Source]

    # File lib/rubygems/commands/outdated_command.rb, line 18
18:   def execute
19:     locals = Gem::SourceIndex.from_installed_gems
20: 
21:     locals.outdated.sort.each do |name|
22:       local = locals.search(/^#{name}$/).last
23:       remotes = Gem::SourceInfoCache.search_with_source(/^#{name}$/, true)
24:       remote = remotes.last.first
25:       say "#{local.name} (#{local.version} < #{remote.version})"
26:     end
27:   end

[Validate]