Class: Ops
- Inherits:
-
Object
- Object
- Ops
- Defined in:
- lib/ops.rb
Overview
executes commands based on local ‘ops.yml`
Defined Under Namespace
Classes: UnknownActionError
Constant Summary collapse
- CONFIG_FILE =
"ops.yml"- INVALID_SYNTAX_EXIT_CODE =
1
Instance Method Summary collapse
-
#initialize(argv) ⇒ Ops
constructor
A new instance of Ops.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ops.rb', line 28 def run exit(INVALID_SYNTAX_EXIT_CODE) unless syntax_valid? environment.set_variables app_config.load return builtin.run if builtin Output.warn("Running '#{action}' from #{CONFIG_FILE}...") action.run rescue UnknownActionError => e Output.error("Error: #{e}") end |