Sha256: ca4dda4b3c5c73e9e4f36612ec95b74d95f940399c1b4280c9874557911feb35

Contents?: true

Size: 773 Bytes

Versions: 27

Compression:

Stored size: 773 Bytes

Contents

require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/spec_fetcher'
require 'rubygems/version_option'

class Gem::Commands::OutdatedCommand < Gem::Command

  include Gem::LocalRemoteOptions
  include Gem::VersionOption

  def initialize
    super 'outdated', 'Display all gems that need updates'

    add_local_remote_options
    add_platform_option
  end

  def execute
    locals = Gem::SourceIndex.from_installed_gems

    locals.outdated.sort.each do |name|
      local = locals.find_name(name).last

      dep = Gem::Dependency.new local.name, ">= #{local.version}"
      remotes = Gem::SpecFetcher.fetcher.fetch dep
      remote = remotes.last.first

      say "#{local.name} (#{local.version} < #{remote.version})"
    end
  end

end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
slimgems-1.3.9.5 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.9.4 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.9.3 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.9.2 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.9.1 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.9 lib/rubygems/commands/outdated_command.rb
slimgems-1.3.8 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.6.1 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.6.0 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.5.3 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.5.2 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.5.0 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.4.2 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.4.1 lib/rubygems/commands/outdated_command.rb
rubygems-update-1.4.0 lib/rubygems/commands/outdated_command.rb
shoesgem-0.1514.0 shoes/ruby/lib/rubygems/commands/outdated_command.rb
shoesgem-0.1480.0 shoes/ruby/lib/rubygems/commands/outdated_command.rb
shoesgem-0.1469.0 shoes/ruby/lib/rubygems/commands/outdated_command.rb
shoesgem-0.1424.0 shoes/ruby/lib/rubygems/commands/outdated_command.rb
rubygems-update-1.3.7 lib/rubygems/commands/outdated_command.rb