Class: TripwireNotifier::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/tripwire_notifier/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

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_environmentsObject

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_versionObject (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_exceptionObject

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

#secureObject 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_secondsObject

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