Module: TripwireNotifier
- Defined in:
- lib/tripwire_notifier.rb,
lib/tripwire_notifier/sender.rb,
lib/tripwire_notifier/version.rb,
lib/tripwire_notifier/configuration.rb,
lib/tripwire_notifier/rails/action_controller_monitor.rb
Defined Under Namespace
Modules: Rails
Classes: Configuration, Sender
Constant Summary
collapse
- API_VERSION =
"alpha 1"
- VERSION =
'0.2.11'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
13
14
15
|
# File 'lib/tripwire_notifier.rb', line 13
def configuration
@configuration ||= Configuration.new
end
|
17
18
19
|
# File 'lib/tripwire_notifier.rb', line 17
def configure
yield(self.configuration)
end
|
.notifier_params ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/tripwire_notifier.rb', line 29
def notifier_params
@notifier_params ||= {
:notifier_version => self.configuration.notifier_version,
:api_key => self.configuration.api_key || ENV['TRIPWIRE_API_KEY'],
:api_version => API_VERSION
}
end
|
.notify(data) ⇒ Object
25
26
27
|
# File 'lib/tripwire_notifier.rb', line 25
def notify(data)
self.sender.send_to_tripwire(data.merge(notifier_params))
end
|
.sender ⇒ Object
21
22
23
|
# File 'lib/tripwire_notifier.rb', line 21
def sender
@sender ||= Sender.new(self.configuration)
end
|