diff options
Diffstat (limited to 'lib/rubygems/commands/mirror_command.rb')
-rw-r--r-- | lib/rubygems/commands/mirror_command.rb | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/rubygems/commands/mirror_command.rb b/lib/rubygems/commands/mirror_command.rb index 75419c857a..24fb668d54 100644 --- a/lib/rubygems/commands/mirror_command.rb +++ b/lib/rubygems/commands/mirror_command.rb @@ -1,23 +1,25 @@ require 'rubygems/command' -class Gem::Commands::MirrorCommand < Gem::Command - 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 +unless defined? Gem::Commands::MirrorCommand + class Gem::Commands::MirrorCommand < Gem::Command + 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 - end - def description # :nodoc: - <<-EOF + def description # :nodoc: + <<-EOF The mirror command has been moved to the rubygems-mirror gem. - EOF - end + EOF + end - def execute - alert_error "Install the rubygems-mirror gem for the mirror command" - end + def execute + alert_error "Install the rubygems-mirror gem for the mirror command" + end + end end |