Class: Tapsoob::CLI::Root

Inherits:
Thor
  • Object
show all
Defined in:
lib/tapsoob/cli/root.rb

Instance Method Summary collapse

Instance Method Details

#pull(dump_path, database_url) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/tapsoob/cli/root.rb', line 27

def pull(dump_path, database_url)
  opts = parse_opts(options)
  Tapsoob.log.level = Logger::DEBUG if opts[:debug]
  if opts[:resume_filename]
    clientresumexfer(:pull, dump_path, database_url, opts)
  else
    clientxfer(:pull, dump_path, database_url, opts)
  end
end

#push(dump_path, database_url) ⇒ Object



52
53
54
55
56
57
58
59
60
# File 'lib/tapsoob/cli/root.rb', line 52

def push(dump_path, database_url)
  opts = parse_opts(options)
  Tapsoob.log.level = Logger::DEBUG if opts[:debug]
  if opts[:resume_filename]
    clientresumexfer(:push, dump_path, database_url, opts)
  else
    clientxfer(:push, dump_path, database_url, opts)
  end
end

#versionObject



63
64
65
# File 'lib/tapsoob/cli/root.rb', line 63

def version
  puts Tapsoob::VERSION.dup
end