peeping_tom 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/peeping_tom/dsl.rb +3 -0
- data/lib/peeping_tom/notifier/campfire.rb +17 -0
- metadata +4 -3
data/lib/peeping_tom/dsl.rb
CHANGED
@@ -61,6 +61,9 @@ module PeepingTom
|
|
61
61
|
elsif type == :email
|
62
62
|
require File.join(File.dirname(__FILE__), "notifier", "email")
|
63
63
|
channel = PeepingTom::Notifier::Email.new(*opts)
|
64
|
+
elsif type == :campfire
|
65
|
+
require File.join(File.dirname(__FILE__), "notifier", "campfire")
|
66
|
+
channel = PeepingTom::Notifier::Campfire.new(*opts)
|
64
67
|
else
|
65
68
|
raise ArgumentError, "unknown channel type: #{type}"
|
66
69
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'broach'
|
2
|
+
|
3
|
+
module PeepingTom
|
4
|
+
module Notifier
|
5
|
+
class Campfire
|
6
|
+
def initialize(subdomain, token, room)
|
7
|
+
Broach.settings = {'account' => subdomain, 'token' => token}
|
8
|
+
@room = room
|
9
|
+
end
|
10
|
+
|
11
|
+
def notify!(site)
|
12
|
+
msg = "#{site.name} was tested at #{site.url}, and it's busted. You should look into that."
|
13
|
+
Broach.speak(@room, msg)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 7
|
8
|
+
- 0
|
9
|
+
version: 0.7.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Terry Heath
|
@@ -31,6 +31,7 @@ files:
|
|
31
31
|
- lib/peeping_tom/dsl.rb
|
32
32
|
- lib/peeping_tom/peeper.rb
|
33
33
|
- lib/peeping_tom/site.rb
|
34
|
+
- lib/peeping_tom/notifier/campfire.rb
|
34
35
|
- lib/peeping_tom/notifier/email.rb
|
35
36
|
- lib/peeping_tom/notifier/irc.rb
|
36
37
|
has_rdoc: true
|