Class: Gem::Commands::MirrorCommand

Inherits:
Gem::Command show all
Defined in:
lib/rubygems/commands/mirror_command.rb

Instance Attribute Summary

Attributes inherited from Gem::Command

#command, #defaults, #options, #program_name, #summary

Instance Method Summary collapse

Methods inherited from Gem::Command

add_common_option, #add_extra_args, #add_option, add_specific_extra_args, #arguments, #begins?, build_args, build_args=, #check_deprecated_options, common_options, #defaults_str, #deprecate_option, #deprecated?, extra_args, extra_args=, #extract_gem_name_and_version, #get_all_gem_names, #get_all_gem_names_and_versions, #get_one_gem_name, #get_one_optional_argument, #handle_options, #handles?, #invoke, #invoke_with_build_args, #merge_options, #remove_option, #show_help, #show_lookup_failure, specific_extra_args, specific_extra_args_hash, #usage, #when_invoked

Methods included from UserInteraction

#alert, #alert_error, #alert_warning, #ask, #ask_for_password, #ask_yes_no, #choose_from_list, #say, #terminate_interaction, #verbose

Methods included from DefaultUserInteraction

ui, #ui, ui=, #ui=, use_ui, #use_ui

Methods included from Text

#clean_text, #format_text, #levenshtein_distance, #min3, #truncate_text

Constructor Details

#initializeMirrorCommand

Returns a new instance of MirrorCommand.



7
8
9
10
11
12
13
14
# File 'lib/rubygems/commands/mirror_command.rb', line 7

def initialize
  super("mirror", "Mirror all gem files (requires rubygems-mirror)")
  begin
    Gem::Specification.find_by_name("rubygems-mirror").activate
  rescue Gem::LoadError
    # no-op
  end
end

Instance Method Details

#descriptionObject

:nodoc:



16
17
18
19
20
# File 'lib/rubygems/commands/mirror_command.rb', line 16

def description # :nodoc:
  <<-EOF
The mirror command has been moved to the rubygems-mirror gem.
  EOF
end

#executeObject



22
23
24
# File 'lib/rubygems/commands/mirror_command.rb', line 22

def execute
  alert_error "Install the rubygems-mirror gem for the mirror command"
end