PATH:
opt
/
alt
/
ruby19
/
lib64
/
ruby
/
1.9.1
/
rubygems
/
commands
require 'rubygems/command' require 'rubygems/version_option' require 'rubygems/validator' class Gem::Commands::CheckCommand < Gem::Command include Gem::VersionOption def initialize super 'check', 'Check installed gems', :verify => false, :alien => false add_option( '--verify FILE', 'Verify gem file against its internal', 'checksum') do |value, options| options[:verify] = value end add_option('-a', '--alien', "Report 'unmanaged' or rogue files in the", "gem repository") do |value, options| options[:alien] = true end add_version_option 'check' end def execute if options[:alien] say "Performing the 'alien' operation" 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 if options[:verify] gem_name = options[:verify] unless gem_name alert_error "Must specify a .gem file with --verify NAME" return end unless File.exist?(gem_name) alert_error "Unknown file: #{gem_name}." return end say "Verifying gem: '#{gem_name}'" begin Gem::Validator.new.verify_gem_file(gem_name) rescue Exception alert_error "#{gem_name} is invalid." end end end end
[-] generate_index_command.rb
[edit]
[-] dependency_command.rb
[edit]
[-] search_command.rb
[edit]
[-] environment_command.rb
[edit]
[-] sources_command.rb
[edit]
[-] owner_command.rb
[edit]
[-] server_command.rb
[edit]
[-] contents_command.rb
[edit]
[-] push_command.rb
[edit]
[-] cleanup_command.rb
[edit]
[-] list_command.rb
[edit]
[-] setup_command.rb
[edit]
[-] query_command.rb
[edit]
[-] build_command.rb
[edit]
[-] uninstall_command.rb
[edit]
[-] stale_command.rb
[edit]
[-] fetch_command.rb
[edit]
[+]
..
[-] unpack_command.rb
[edit]
[-] rdoc_command.rb
[edit]
[-] install_command.rb
[edit]
[-] update_command.rb
[edit]
[-] pristine_command.rb
[edit]
[-] cert_command.rb
[edit]
[-] lock_command.rb
[edit]
[-] help_command.rb
[edit]
[-] check_command.rb
[edit]
[-] outdated_command.rb
[edit]
[-] which_command.rb
[edit]
[-] specification_command.rb
[edit]