Class: ConfigCurator::CLI

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

Overview

Thor class for the curate command.

Instance Method Summary collapse

Instance Method Details

#install(manifest = 'manifest.yml') ⇒ Boolean

Installs the collection.


20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/config_curator/cli.rb', line 20

def install(manifest = 'manifest.yml')
  unless File.exist? manifest
    logger.fatal { "Manifest file '#{manifest}' does not exist." }
    return false
  end

  collection.load_manifest manifest
  result = options[:dryrun] ? collection.install? : collection.install

  msg = install_message(result, options[:dryrun])
  result ? logger.info(msg) : logger.error(msg)
  result
end