Class: Zonesync::CLI

Inherits:
Thor
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/zonesync/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean



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

def self.exit_on_failure? = true

Instance Method Details

#generateObject



29
30
31
32
# File 'lib/zonesync/cli.rb', line 29

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

#syncObject



17
18
19
20
21
22
23
# File 'lib/zonesync/cli.rb', line 17

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