2016-02-01 07:43:26 -05:00
|
|
|
# frozen_string_literal: true
|
2019-04-22 07:56:16 -04:00
|
|
|
require_relative '../command'
|
2012-11-29 01:52:18 -05:00
|
|
|
|
2014-11-10 02:20:48 -05:00
|
|
|
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
|
2012-11-29 01:52:18 -05:00
|
|
|
end
|
|
|
|
|
2014-11-10 02:20:48 -05:00
|
|
|
def description # :nodoc:
|
|
|
|
<<-EOF
|
2013-09-14 04:59:02 -04:00
|
|
|
The mirror command has been moved to the rubygems-mirror gem.
|
2014-11-10 02:20:48 -05:00
|
|
|
EOF
|
|
|
|
end
|
2013-09-14 04:59:02 -04:00
|
|
|
|
2014-11-10 02:20:48 -05:00
|
|
|
def execute
|
|
|
|
alert_error "Install the rubygems-mirror gem for the mirror command"
|
|
|
|
end
|
|
|
|
end
|
2012-11-29 01:52:18 -05:00
|
|
|
end
|