Class: MediaWikiVagrant::ExportDump

Inherits:
Object
  • Object
show all
Defined in:
lib/mediawiki-vagrant/export_dump.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



3
4
5
# File 'lib/mediawiki-vagrant/export_dump.rb', line 3

def self.synopsis
  'exports MediaWiki content as an XML dump'
end

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/mediawiki-vagrant/export_dump.rb', line 7

def execute
  if ['-h', '--help'].include? @argv.first
    @env.ui.info 'Usage: vagrant export-dump [-h]'
    return 0
  end
  opts = { extra_args: @argv.unshift('export-mediawiki-dump') }
  with_target_vms(nil, single_target: true) do |vm|
    vm.action :ssh, ssh_opts: opts
  end
end