Class: Deis::Commands::Disable
- Inherits:
-
Struct
- Object
- Struct
- Deis::Commands::Disable
- Includes:
- Helpers
- Defined in:
- lib/deis/commands/disable.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
Methods included from Helpers
#app_exists?, #capture_output, #capture_syscall, #debug?, #deis_command, #deis_local_command, #deis_login!, #deploy, #get_runner, #get_units!, #git_clone, #increment_retry!, #info, #reset_retry!, #run_util, #scale, seconds_to_human, #shell, #should_retry?, #status, #units
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
3 4 5 |
# File 'lib/deis/commands/disable.rb', line 3 def app @app end |
Instance Method Details
#run ⇒ Object
6 7 8 9 10 |
# File 'lib/deis/commands/disable.rb', line 6 def run status "Disabling App: #{app}" units = shell('foreman check').strip.sub(/.*\((.*)\)/, "\\1").split(', ') scale app, units.each_with_object({}) { |k, h| h[k] = 0 } end |