Skip to content

Commit 86aafd9

Browse files
committed
add .kick, i love it
1 parent 26e974f commit 86aafd9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.kick

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# take control of the growl notifications
2+
module GrowlHacks
3+
def growl(type, subject, body, *args, &block)
4+
case type
5+
when Kicker::GROWL_NOTIFICATIONS[:succeeded]
6+
puts subject = "Success"
7+
body = body.split("\n").last
8+
when Kicker::GROWL_NOTIFICATIONS[:failed]
9+
subject = "Failure"
10+
puts body
11+
body = body.split("\n").last
12+
else
13+
return nil
14+
end
15+
super(type, subject, body, *args, &block)
16+
end
17+
end
18+
19+
Kicker.send :extend, GrowlHacks
20+
21+
# no logging
22+
Kicker::Utils.module_eval do
23+
def log(message)
24+
nil
25+
end
26+
end

0 commit comments

Comments
 (0)