public
Description: Example of notification classes for Pushr. Heavily inspired by Integrity
Homepage: http://github.com/karmi/pushr/tree/master
Clone URL: git://github.com/karmi/pushr_notifiers.git
pushr_notifiers / irc.rb
100644 19 lines (13 sloc) 0.451 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'rubygems'
require 'shout-bot' # $ sudo gem install sr-shout-bot --source=http://gems.github.com
 
# = IRC notifications for Pushr (http://github.com/karmi/pushr/)
class Pushr::Notifier::Irc < Pushr::Notifier::Base
 
  def deliver!(notification)
    return unless configured?
    ShoutBot.shout(config['uri'], :as => "Pushr") { |channel| channel.say message(notification) }
  end
 
  private
 
  def configured?
    !config['uri'].nil?
  end
 
end