Class: TripwireNotifier::Configuration
- Inherits:
-
Object
- Object
- TripwireNotifier::Configuration
- Defined in:
- lib/tripwire_notifier/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#monitored_environments ⇒ Object
The set of environments that should be monitored for validation errors (defaults to only the production environment).
-
#notifier_version ⇒ Object
readonly
The version of the notifier (defaults to the version of this gem).
-
#on_exception ⇒ Object
A callable object, such as a Proc, to be invoked if an exception occurs when logging to Tripwire (defaults to nil).
-
#secure ⇒ Object
(also: #secure?)
true
for https connections,false
for http connections. -
#timeout_in_seconds ⇒ Object
Number of seconds after which submission to Tripwire should timeout (defaults to 5).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 28 29 30 31 |
# File 'lib/tripwire_notifier/configuration.rb', line 25 def initialize @notifier_version = VERSION @timeout_in_seconds = 5 @monitored_environments = ['production'] @secure = true @on_exception = nil end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/tripwire_notifier/configuration.rb', line 3 def api_key @api_key end |
#monitored_environments ⇒ Object
The set of environments that should be monitored for validation errors (defaults to only the production environment).
7 8 9 |
# File 'lib/tripwire_notifier/configuration.rb', line 7 def monitored_environments @monitored_environments end |
#notifier_version ⇒ Object (readonly)
The version of the notifier (defaults to the version of this gem).
23 24 25 |
# File 'lib/tripwire_notifier/configuration.rb', line 23 def notifier_version @notifier_version end |
#on_exception ⇒ Object
A callable object, such as a Proc, to be invoked if an exception occurs when logging to Tripwire (defaults to nil). For example, to notify Hoptoad:
config.on_exception = proc { |e| notify_hoptoad(e) }
20 21 22 |
# File 'lib/tripwire_notifier/configuration.rb', line 20 def on_exception @on_exception end |
#secure ⇒ Object Also known as: secure?
true
for https connections, false
for http connections.
13 14 15 |
# File 'lib/tripwire_notifier/configuration.rb', line 13 def secure @secure end |
#timeout_in_seconds ⇒ Object
Number of seconds after which submission to Tripwire should timeout (defaults to 5).
10 11 12 |
# File 'lib/tripwire_notifier/configuration.rb', line 10 def timeout_in_seconds @timeout_in_seconds end |