module Thor::Actions

Public Instance Methods

run(command, config={}) click to toggle source
# File lib/fwtoolkit/cli/ext/thor.rb, line 6
def run(command, config={})
  command_output = run_base(command, config)
  if config[:raise_errors] && !$?.success?
    say "An error has occured while running: \"#{command}\"", :red
    say 'Command output:'
    raise Thor::Error, "\n***\n#{command_output}***"
  end
end
Also aliased as: run_base
run!(command, config={}) click to toggle source
# File lib/fwtoolkit/cli/ext/thor.rb, line 15
def run!(command, config={})
  config.merge!({ :raise_errors => true })
  run command, config
end
run_base(command, config={})
Alias for: run
template_directory(source, *args, &block) click to toggle source
# File lib/fwtoolkit/cli/fw_actions/template_dir.rb, line 8
def template_directory(source, *args, &block)
  config = args.last.is_a?(Hash) ? args.pop : {}
  destination = args.first || source
  action TemplateDirectory.new(self, source, destination || source, config, &block)
end