Class: Cloudspin::CLI
- Inherits:
-
Thor
- Object
- Thor
- Cloudspin::CLI
- Defined in:
- lib/cloudspin/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
96 97 98 |
# File 'lib/cloudspin/cli.rb', line 96 def self.exit_on_failure? true end |
Instance Method Details
#down(id) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cloudspin/cli.rb', line 51 def down(id) if [:plan] && [:dry] puts instance(id).plan_dry(plan_destroy: true) elsif [:plan] && ! [:dry] puts instance(id).plan(plan_destroy: true) elsif ! [:plan] && [:dry] puts instance(id).down_dry else instance(id).down end end |
#info ⇒ Object
69 70 71 |
# File 'lib/cloudspin/cli.rb', line 69 def info puts "Configuration file: #{[:file]}" end |
#up(id) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/cloudspin/cli.rb', line 36 def up(id) if [:plan] && [:dry] puts instance(id).plan_dry elsif [:plan] && ! [:dry] puts instance(id).plan elsif ! [:plan] && [:dry] puts instance(id).up_dry else instance(id).up end end |