Class: Integrity::Notifier::Prowl
- Inherits:
-
Notifier::Base
- Object
- Notifier::Base
- Integrity::Notifier::Prowl
- Defined in:
- lib/integrity/notifier/prowl.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/integrity/notifier/prowl.rb', line 7 def config @config end |
Class Method Details
.to_haml ⇒ Object
9 10 11 |
# File 'lib/integrity/notifier/prowl.rb', line 9 def self.to_haml File.read(File.dirname(__FILE__) + '/config.haml') end |
Instance Method Details
#deliver! ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/integrity/notifier/prowl.rb', line 13 def deliver! return unless config[commit.status.to_s] == '1' if api_keys = config['api_keys'] api_keys.split(',').each do |key| prowl_params = {} prowl_params[:application] = commit.project.name prowl_params[:event] = prowl_params[:description] = ::Prowl.add(key, prowl_params) end end end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/integrity/notifier/prowl.rb', line 28 def to_s 'Prowl' end |