Class: Domo::CLI
- Inherits:
-
Thor
- Object
- Thor
- Domo::CLI
- Defined in:
- lib/domo/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #backup_config(target) ⇒ Object
- #clone(src, dest, job_list) ⇒ Object
- #create_jobs(target, config_dir) ⇒ Object
- #delete(target, job_list) ⇒ Object
- #delete_all(target) ⇒ Object
- #help(*args) ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ CLI
constructor
A new instance of CLI.
- #install(target, plugin_list) ⇒ Object
- #list(target) ⇒ Object
- #toggle(target, action, job_list) ⇒ Object
- #toggle_all(target, action) ⇒ Object
- #trigger(target, job_list) ⇒ Object
- #version ⇒ Object
Constructor Details
Class Method Details
.help(shell) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/domo/cli.rb', line 93 def self.help(shell, *) list = printable_tasks shell.say "Usage: domo [command] [options]" shell.say "Commands:" shell.print_table(list, :ident => 2, :truncate => true) shell.say (shell) end |
Instance Method Details
#backup_config(target) ⇒ Object
74 75 76 |
# File 'lib/domo/cli.rb', line 74 def backup_config(target) @domo.backup_config(target, [:dest]) end |
#clone(src, dest, job_list) ⇒ Object
41 42 43 |
# File 'lib/domo/cli.rb', line 41 def clone(src, dest, job_list) @domo.clone(src, dest, job_list) end |
#create_jobs(target, config_dir) ⇒ Object
79 80 81 |
# File 'lib/domo/cli.rb', line 79 def create_jobs(target, config_dir) @domo.create_jobs(target, config_dir) end |
#delete(target, job_list) ⇒ Object
51 52 53 |
# File 'lib/domo/cli.rb', line 51 def delete(target, job_list) @domo.delete(target, job_list, [:dryrun]) end |
#delete_all(target) ⇒ Object
60 61 62 |
# File 'lib/domo/cli.rb', line 60 def delete_all(target) @domo.delete_all(target, [:dryrun]) end |
#help(*args) ⇒ Object
89 90 91 |
# File 'lib/domo/cli.rb', line 89 def help(*args) super(*args) end |
#install(target, plugin_list) ⇒ Object
65 66 67 |
# File 'lib/domo/cli.rb', line 65 def install(target, plugin_list) @domo.install(target, plugin_list) end |
#list(target) ⇒ Object
17 18 19 |
# File 'lib/domo/cli.rb', line 17 def list(target) @domo.list(target, true) end |
#toggle(target, action, job_list) ⇒ Object
36 37 38 |
# File 'lib/domo/cli.rb', line 36 def toggle(target, action, job_list) @domo.toggle(target, action, job_list) end |
#toggle_all(target, action) ⇒ Object
31 32 33 |
# File 'lib/domo/cli.rb', line 31 def toggle_all(target, action) @domo.toggle_all(target, action) end |
#trigger(target, job_list) ⇒ Object
26 27 28 |
# File 'lib/domo/cli.rb', line 26 def trigger(target, job_list) @domo.trigger(target, job_list, [:dryrun]) end |