Class: Rundock::CLI
Constant Summary collapse
- DEFAULT_SCENARIO_FILE_PATH =
'./scenario.yml'- DEFAULT_SSH_OPTIONS_DEFAULT_FILE_PATH =
'./default_ssh.yml'- DEFAULT_HOSTGROUP_FILE_PATH =
'./hostgroup.yml'
Instance Method Summary collapse
- #do(*scenario_file_path) ⇒ Object
-
#initialize(args, opts, config) ⇒ CLI
constructor
A new instance of CLI.
- #method_missing(command, *args) ⇒ Object
- #ssh ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(args, opts, config) ⇒ CLI
Returns a new instance of CLI.
16 17 18 19 20 21 22 23 24 |
# File 'lib/rundock/cli.rb', line 16 def initialize(args, opts, config) super(args, opts, config) Rundock::Logger.level = ::Logger.const_get([:log_level].upcase) Rundock::Logger.formatter.colored = [:color] Rundock::Logger.formatter.show_header = [:header] Rundock::Logger.formatter.short_header = [:short_header] Rundock::Logger.formatter.date_header = [:date_header] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(command, *args) ⇒ Object
64 65 66 |
# File 'lib/rundock/cli.rb', line 64 def method_missing(command, *args) help end |
Instance Method Details
#do(*scenario_file_path) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/rundock/cli.rb', line 37 def do(*scenario_file_path) scenario_file_path = [DEFAULT_SCENARIO_FILE_PATH] if scenario_file_path.empty? opts = { :scenario => scenario_file_path[0] } Runner.run(opts.merge(.deep_symbolize_keys)) end |