class RooOnRails::Checks::Heroku::PrebootEnabled
Input context
-
heroku.api_client: a connected PlatformAPI client
-
heroku.app.{env}: an existing app name.
Public Instance Methods
call()
click to toggle source
# File lib/roo_on_rails/checks/heroku/preboot_enabled.rb, line 18 def call status = client.app_feature.info(app_name, 'preboot') if status['enabled'] pass "preboot enabled on #{bold app_name}" else fail! "preboot disabled on #{bold app_name}" end end
intro()
click to toggle source
# File lib/roo_on_rails/checks/heroku/preboot_enabled.rb, line 14 def intro 'Checking preboot status...' end
Private Instance Methods
app_name()
click to toggle source
# File lib/roo_on_rails/checks/heroku/preboot_enabled.rb, line 33 def app_name context.heroku.app[env] end
client()
click to toggle source
# File lib/roo_on_rails/checks/heroku/preboot_enabled.rb, line 37 def client context.heroku.api_client end
fix()
click to toggle source
# File lib/roo_on_rails/checks/heroku/preboot_enabled.rb, line 29 def fix client.app_feature.update(app_name, 'preboot', enabled: true) end