Class: Whisk::CLI
- Inherits:
-
Thor
- Object
- Thor
- Whisk::CLI
- Defined in:
- lib/whisk/cli.rb
Instance Method Summary collapse
- #destroy(filter = nil) ⇒ Object
- #diff(filter = nil) ⇒ Object
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #list(filter = nil) ⇒ Object
- #prepare(filter = nil) ⇒ Object
- #status(filter = nil) ⇒ Object
- #update(filter = nil) ⇒ Object
- #upload(filter = nil) ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
25 26 27 28 29 30 31 32 |
# File 'lib/whisk/cli.rb', line 25 def initialize(*) super ::Whisk.ui = Chef::Knife::UI.new(STDOUT, STDERR, STDIN, {}) @options = .dup # unfreeze frozen options Hash from Thor rescue Error => e Whisk.ui.fatal e exit e.status_code end |
Instance Method Details
#destroy(filter = nil) ⇒ Object
44 45 46 47 |
# File 'lib/whisk/cli.rb', line 44 def destroy(filter=nil) runner = Whisk::Runner.new([:whiskfile], filter) runner.run('destroy') end |
#diff(filter = nil) ⇒ Object
50 51 52 53 |
# File 'lib/whisk/cli.rb', line 50 def diff(filter=nil) runner = Whisk::Runner.new([:whiskfile], filter) runner.run('diff') end |
#list(filter = nil) ⇒ Object
56 57 58 59 |
# File 'lib/whisk/cli.rb', line 56 def list(filter=nil) runner = Whisk::Runner.new([:whiskfile], filter) runner.run('list') end |
#prepare(filter = nil) ⇒ Object
62 63 64 65 |
# File 'lib/whisk/cli.rb', line 62 def prepare(filter=nil) runner = Whisk::Runner.new([:whiskfile], filter) runner.run('prepare') end |
#status(filter = nil) ⇒ Object
68 69 70 71 |
# File 'lib/whisk/cli.rb', line 68 def status(filter=nil) runner = Whisk::Runner.new([:whiskfile], filter) runner.run('status') end |