Class: Zonesync::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


37
# File 'lib/zonesync/cli.rb', line 37

def self.exit_on_failure? = true

Instance Method Details

#generateObject



24
25
26
27
# File 'lib/zonesync/cli.rb', line 24

def generate
  kwargs = options.to_hash.transform_keys(&:to_sym)
  Zonesync.generate(**kwargs)
end

#repairObject



32
33
34
35
# File 'lib/zonesync/cli.rb', line 32

def repair
  kwargs = options.to_hash.transform_keys(&:to_sym)
  Zonesync.repair(**kwargs)
end

#syncObject



13
14
15
16
17
18
19
# File 'lib/zonesync/cli.rb', line 13

def sync
  kwargs = options.to_hash.transform_keys(&:to_sym)
  Zonesync.call(**kwargs)
rescue ConflictError, MissingManifestError, ChecksumMismatchError => e
  puts e.message
  exit 1
end