Class: Integrity::Notifier::Growl
- Inherits:
-
Notifier::Base
- Object
- Notifier::Base
- Integrity::Notifier::Growl
- Defined in:
- lib/notifier/growl.rb
Class Method Summary collapse
Instance Method Summary collapse
- #deliver! ⇒ Object
-
#initialize(build, config = {}) ⇒ Growl
constructor
A new instance of Growl.
- #message ⇒ Object
Constructor Details
#initialize(build, config = {}) ⇒ Growl
Returns a new instance of Growl.
9 10 11 12 13 14 15 16 |
# File 'lib/notifier/growl.rb', line 9 def initialize(build, config = {}) @growl = Growl.new "localhost", "Integrity", ["Integrity build notification"] @addresses = config[:addresses].nil? ? [] : config.delete(:addresses).split(/,|\s+/) @growl = @addresses.map do |address| Growl.new address, "Integrity", ["Integrity build notification"] end super end |
Class Method Details
.to_haml ⇒ Object
18 19 20 |
# File 'lib/notifier/growl.rb', line 18 def self.to_haml File.read File.dirname(__FILE__) / "config.haml" end |
Instance Method Details
#deliver! ⇒ Object
22 23 24 25 26 |
# File 'lib/notifier/growl.rb', line 22 def deliver! @growl.each do |g| g.notify "Integrity build notification", , end end |
#message ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/notifier/growl.rb', line 28 def @message ||= <<-content #{build.project.name}: #{} (at #{build.commited_at} by #{build..name}) Commit Message: '#{build.}' Link: #{build_url} content end |