peeping_tom 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/peeping_tom/notifier/irc.rb +5 -3
  2. 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('irc://PeepingTom@irc.freenode.net:6667/#' + @channel) do |channel|
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
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- version: "0.2"
7
+ - 3
8
+ version: "0.3"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Terry Heath