Module: Rollbar::Mode
- Defined in:
- lib/rollbar/mode.rb,
lib/rollbar/mode/version.rb,
lib/rollbar/mode/production.rb,
lib/rollbar/mode/development.rb,
lib/rollbar/mode/local_notifier.rb
Overview
Minor mode for Rollbar
Defined Under Namespace
Classes: Development, LocalNotifier, Production
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
- .apply ⇒ Object
-
.heroku? ⇒ Boolean
Determine if the current environment is a Heroku dyno based on the dyno metadata.
- .production? ⇒ Boolean
Class Method Details
.apply ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rollbar/mode.rb', line 15 def self.apply if Rollbar::Mode.production? Rollbar::Mode::Production.apply else Rollbar::Mode::Development.apply end end |
.heroku? ⇒ Boolean
Determine if the current environment is a Heroku dyno based on the dyno metadata.
See:
34 35 36 37 |
# File 'lib/rollbar/mode.rb', line 34 def self.heroku? ENV.key?('HEROKU_SLUG_COMMIT') && ENV.key?('HEROKU_APP_NAME') end |
.production? ⇒ Boolean
23 24 25 26 |
# File 'lib/rollbar/mode.rb', line 23 def self.production? Rollbar::Mode::Production.access_token || Rollbar.configuration.enabled end |