radar / rboard

A fully featured forum system compatible with Rails 2.3

This URL has Read+Write access

CvX (author)
Wed Nov 11 02:51:54 -0800 2009
commit  271bc97eab8fc0dbd84ae8e2394cbc7275fed118
tree    1e311963909dfff4f9ab97ce1a4e8f2863fddfc0
parent  629f709c7d7ac45e57db3756ef96b61ae20bcebe
rboard / .autotest
100644 19 lines (16 sloc) 0.596 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Autotest::Growl
 
   def self.growl title, msg, img, pri=0, sticky=""
     system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}"
   end
 
  Autotest.add_hook :ran_command do |at|
    results = [at.results].flatten.join("\n")
    output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?/)
      if output
        if $~[2].to_i > 0
          growl "FAIL", "#{output}", "~/.autotest_images/fail.png", 2
       else
         growl "Pass", "#{output}", "~/.autotest_images/pass.png"
       end
     end
   end
 end