Greg Hauptmann
2008-Sep-12 03:45 UTC
[rspec-users] Growl notifications don''t work each time??
Hi - has anyone had problems with Growl notifications not working each time? I can hit save on a test, wait, check. Then hit save again, wait, check. Sometimes the growl notification doesn''t work. I''m using ZenTest / Rspec. * ZenTest (3.10.0) * Macintosh-2:myequity greg$ ruby -v ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0] * Macintosh-2:myequity greg$ rails -v Rails 2.1.1 ========================Macintosh-2:myequity greg$ cat ~/.autotest # -*- ruby -*- # NOTE Copy this to your home folder as .autotest # # Originally from http://wincent.com/knowledge-base/Setting_up_autotest_to_use_Growl # # Modifications: # * Minor refactoring to use .autotest_images directory # [Geoffrey Grosenbach http://peepcode.com] # * Test::Unit compatibility [Pat Nakajima] # module Autotest::Growl AUTOTEST_IMAGE_ROOT = "~/.autotest_images" def self.growl title, msg, img, pri=0, sticky="" system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}" end def self.growl_fail(output) growl "FAIL", "#{output}", "#{AUTOTEST_IMAGE_ROOT}/fail.png", 2 end def self.growl_pass(output) growl "Pass", "#{output}", "#{AUTOTEST_IMAGE_ROOT}/pass.png" end Autotest.add_hook :ran_command do |at| results = [at.results].flatten.join("\n") if results.include? ''tests'' output = results.slice(/(\d+)\s+tests?,\s*(\d+)\s+assertions?,\s*(\d+)\s+failures?(,\s*(\d+)\s+errors)?/) if output $~[3].to_i + $~[5].to_i > 0 ? growl_fail(output) : growl_pass(output) end else output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?/) if output $~[2].to_i > 0 ? growl_fail(output) : growl_pass(output) end end end end =========================
Pat Maddox
2008-Sep-12 05:38 UTC
[rspec-users] Growl notifications don''t work each time??
"Greg Hauptmann" <greg.hauptmann.ruby at gmail.com> writes:> Hi - has anyone had problems with Growl notifications not working each > time? I can hit save on a test, wait, check. Then hit save again, > wait, check. Sometimes the growl notification doesn''t work. > > I''m using ZenTest / Rspec. > * ZenTest (3.10.0) > * Macintosh-2:myequity greg$ ruby -v > ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0] > * Macintosh-2:myequity greg$ rails -v > Rails 2.1.1I don''t know about your particular problem, but since you''re on OS X I recommend using RSpactor instead. The app itself just works better, and growl notifications work great out of the box. Pat
Scott Taylor
2008-Sep-13 03:11 UTC
[rspec-users] Growl notifications don''t work each time??
On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote:> "Greg Hauptmann" <greg.hauptmann.ruby at gmail.com> writes: > >> Hi - has anyone had problems with Growl notifications not working >> each >> time? I can hit save on a test, wait, check. Then hit save again, >> wait, check. Sometimes the growl notification doesn''t work. >> >> I''m using ZenTest / Rspec. >> * ZenTest (3.10.0) >> * Macintosh-2:myequity greg$ ruby -v >> ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0] >> * Macintosh-2:myequity greg$ rails -v >> Rails 2.1.1 > > I don''t know about your particular problem, but since you''re on OS X I > recommend using RSpactor instead. The app itself just works better, > and > growl notifications work great out of the box.Have you gotten rspactor to work with only specific directories? I''d like to run rspactor only in spec/unit, but can''t seem to find any documentation on it. Also - why does it only work on OS X.5? Scott
Zach Dennis
2008-Sep-13 03:25 UTC
[rspec-users] Growl notifications don''t work each time??
On Fri, Sep 12, 2008 at 11:11 PM, Scott Taylor <mailing_lists at railsnewbie.com> wrote:> > On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote: > >> "Greg Hauptmann" <greg.hauptmann.ruby at gmail.com> writes: >> >>> Hi - has anyone had problems with Growl notifications not working each >>> time? I can hit save on a test, wait, check. Then hit save again, >>> wait, check. Sometimes the growl notification doesn''t work. >>> >>> I''m using ZenTest / Rspec. >>> * ZenTest (3.10.0) >>> * Macintosh-2:myequity greg$ ruby -v >>> ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0] >>> * Macintosh-2:myequity greg$ rails -v >>> Rails 2.1.1 >> >> I don''t know about your particular problem, but since you''re on OS X I >> recommend using RSpactor instead. The app itself just works better, and >> growl notifications work great out of the box. > > Have you gotten rspactor to work with only specific directories? I''d like > to run rspactor only in spec/unit, but can''t seem to find any documentation > on it. > > Also - why does it only work on OS X.5?Because it relies on the File System Events API which was introduced in 10.5. -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com
Scott Taylor
2008-Sep-13 03:32 UTC
[rspec-users] Growl notifications don''t work each time??
On Sep 12, 2008, at 11:25 PM, Zach Dennis wrote:> On Fri, Sep 12, 2008 at 11:11 PM, Scott Taylor > <mailing_lists at railsnewbie.com> wrote: >> >> On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote: >> >>> "Greg Hauptmann" <greg.hauptmann.ruby at gmail.com> writes: >>> >>>> Hi - has anyone had problems with Growl notifications not working >>>> each >>>> time? I can hit save on a test, wait, check. Then hit save again, >>>> wait, check. Sometimes the growl notification doesn''t work. >>>> >>>> I''m using ZenTest / Rspec. >>>> * ZenTest (3.10.0) >>>> * Macintosh-2:myequity greg$ ruby -v >>>> ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0] >>>> * Macintosh-2:myequity greg$ rails -v >>>> Rails 2.1.1 >>> >>> I don''t know about your particular problem, but since you''re on OS >>> X I >>> recommend using RSpactor instead. The app itself just works >>> better, and >>> growl notifications work great out of the box. >> >> Have you gotten rspactor to work with only specific directories? >> I''d like >> to run rspactor only in spec/unit, but can''t seem to find any >> documentation >> on it. >> >> Also - why does it only work on OS X.5? > > Because it relies on the File System Events API which was introduced > in 10.5.This was designed for TimeMachine, right? Scott