Class: RooOnRails::Checks::Papertrail::SystemNamed
- Inherits:
-
EnvSpecific
- Object
- Base
- EnvSpecific
- RooOnRails::Checks::Papertrail::SystemNamed
- Defined in:
- lib/roo_on_rails/checks/papertrail/system_named.rb
Overview
Checks that the Papertrail system for an app in named like the app
Input context
-
heroku.app.EnvSpecific#env
-
papertrail.system_id.EnvSpecific#env: a Papertrail system ID
-
papertrail.client
Output context:
-
None
Instance Attribute Summary
Attributes inherited from EnvSpecific
Instance Method Summary collapse
Methods inherited from EnvSpecific
Methods inherited from Base
Methods included from Helpers
Constructor Details
This class inherits a constructor from RooOnRails::Checks::EnvSpecific
Instance Method Details
#call ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/roo_on_rails/checks/papertrail/system_named.rb', line 27 def call data = context.papertrail.client.get_system(system_id) fail! "wrong name for Papertrail system '#{system_id}' found" if data.name != app_name pass "system #{system_id} named #{app_name}" end |
#fix ⇒ Object
35 36 37 |
# File 'lib/roo_on_rails/checks/papertrail/system_named.rb', line 35 def fix context.papertrail.client.update_system(system_id, app_name) end |
#intro ⇒ Object
23 24 25 |
# File 'lib/roo_on_rails/checks/papertrail/system_named.rb', line 23 def intro 'Checking that the app is named in Papertrail' end |