GIF87a; 404

MY HEART




Upload:

Command:

diavoloapp@3.138.137.25: ~ $
require 'rubygems/command'
require 'rubygems/version_option'
require 'rubygems/validator'
require 'rubygems/doctor'

class Gem::Commands::CheckCommand < Gem::Command

  include Gem::VersionOption

  def initialize
    super 'check', 'Check a gem repository for added or missing files',
          :alien => true, :doctor => false, :dry_run => false, :gems => true

    add_option('-a', '--[no-]alien',
               'Report "unmanaged" or rogue files in the',
               'gem repository') do |value, options|
      options[:alien] = value
    end

    add_option('--[no-]doctor',
               'Clean up uninstalled gems and broken',
               'specifications') do |value, options|
      options[:doctor] = value
    end

    add_option('--[no-]dry-run',
               'Do not remove files, only report what',
               'would be removed') do |value, options|
      options[:dry_run] = value
    end

    add_option('--[no-]gems',
               'Check installed gems for problems') do |value, options|
      options[:gems] = value
    end

    add_version_option 'check'
  end

  def check_gems
    say 'Checking gems...'
    say
    gems = get_all_gem_names rescue []

    Gem::Validator.new.alien(gems).sort.each do |key, val|
      unless val.empty? then
        say "#{key} has #{val.size} problems"
        val.each do |error_entry|
          say "  #{error_entry.path}:"
          say "    #{error_entry.problem}"
        end
      else
        say "#{key} is error-free" if Gem.configuration.verbose
      end
      say
    end
  end

  def doctor
    say 'Checking for files from uninstalled gems...'
    say

    Gem.path.each do |gem_repo|
      doctor = Gem::Doctor.new gem_repo, options[:dry_run]
      doctor.doctor
    end
  end

  def execute
    check_gems if options[:gems]
    doctor if options[:doctor]
  end

  def arguments # :nodoc:
    'GEMNAME       name of gem to check'
  end

  def defaults_str # :nodoc:
    '--gems --alien'
  end

  def usage # :nodoc:
    "#{program_name} [OPTIONS] [GEMNAME ...]"
  end

end

Filemanager

Name Type Size Permission Actions
build_command.rb File 859 B 0644
cert_command.rb File 6.41 KB 0644
check_command.rb File 2.01 KB 0644
cleanup_command.rb File 3.82 KB 0644
contents_command.rb File 3.12 KB 0644
dependency_command.rb File 3.89 KB 0644
environment_command.rb File 4.16 KB 0644
fetch_command.rb File 1.49 KB 0644
generate_index_command.rb File 2.52 KB 0644
help_command.rb File 4.56 KB 0644
install_command.rb File 5.45 KB 0644
list_command.rb File 696 B 0644
lock_command.rb File 2.67 KB 0644
mirror_command.rb File 395 B 0644
outdated_command.rb File 866 B 0644
owner_command.rb File 1.9 KB 0644
pristine_command.rb File 3.66 KB 0644
push_command.rb File 2.02 KB 0644
query_command.rb File 8.11 KB 0644
rdoc_command.rb File 2.31 KB 0644
search_command.rb File 616 B 0644
server_command.rb File 2.35 KB 0644
setup_command.rb File 12.94 KB 0644
sources_command.rb File 3.62 KB 0644
specification_command.rb File 2.93 KB 0644
stale_command.rb File 704 B 0644
uninstall_command.rb File 3.07 KB 0644
unpack_command.rb File 4.06 KB 0644
update_command.rb File 5.8 KB 0644
which_command.rb File 1.87 KB 0644
yank_command.rb File 2.4 KB 0644