peeping_tom 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/peeping_tom/notifier/irc.rb +5 -3
- metadata +2 -2
@@ -3,13 +3,15 @@ require 'shout-bot'
|
|
3
3
|
module PeepingTom
|
4
4
|
module Notifier
|
5
5
|
class IRC
|
6
|
-
def initialize(channel_name)
|
6
|
+
def initialize(server_name, port, channel_name)
|
7
|
+
@server_name = server_name
|
8
|
+
@port = port
|
7
9
|
@channel = channel_name
|
8
10
|
end
|
9
11
|
|
10
12
|
def notify!(site)
|
11
13
|
msg = "#{site.name} was tested at #{site.url}, and it's busted. You should look into that."
|
12
|
-
ShoutBot.shout(
|
14
|
+
ShoutBot.shout("irc://PeepingTom@#{@server_name}:#{@port}/#{@channel}") do |channel|
|
13
15
|
channel.say msg
|
14
16
|
end
|
15
17
|
rescue SocketError
|
@@ -17,4 +19,4 @@ module PeepingTom
|
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
20
|
-
end
|
22
|
+
end
|