Class: Neetob::CLI::Heroku::AutoscalingConfig
- Defined in:
- lib/neetob/cli/heroku/autoscaling_config.rb
Constant Summary
Constants inherited from Base
Constants inherited from Base
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app) ⇒ AutoscalingConfig
constructor
A new instance of AutoscalingConfig.
- #run ⇒ Object
Methods inherited from Base
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(app) ⇒ AutoscalingConfig
14 15 16 17 |
# File 'lib/neetob/cli/heroku/autoscaling_config.rb', line 14 def initialize(app) super() @app = app end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
12 13 14 |
# File 'lib/neetob/cli/heroku/autoscaling_config.rb', line 12 def app @app end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/neetob/cli/heroku/autoscaling_config.rb', line 19 def run addons_list_heroku_output = `heroku addons -a #{app}` judoscale_addon = addons_list_heroku_output.lines.select { |line| line.include?("judoscale") }.first judoscale_addon_enabled = judoscale_addon && judoscale_addon.include?("created") if judoscale_addon_enabled ui.success("Judoscale addon is enabled for #{app}.", print_to_audit_log: false) else ui.error("Judoscale addon is not enabled for #{app}.", print_to_audit_log: false) end if Thread.current[:audit_mode] { judoscale_addon_enabled: } end end |