Class: Cadre::Growl::Notifier
- Inherits:
-
Object
- Object
- Cadre::Growl::Notifier
- Defined in:
- lib/cadre/growl/notifier.rb
Overview
XXXX This isn’t going to work at all as is. Lifted from other code, as #ok hints toward a working adapter
Instance Method Summary collapse
Instance Method Details
#close ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cadre/growl/notifier.rb', line 6 def close super summary = summary_line example_count, failure_count, pending_count if failure_count > 0 growlnotify "--image ./autotest/fail.png -p Emergency -m '#{summary}' -t 'Spec failure detected'" #ok elsif pending_count > 0 growlnotify "--image ./autotest/pending.png -p High -m '#{summary}' -t 'Pending spec(s) present'" #ok else growlnotify "--image ./autotest/pass.png -p 'Very Low' -m '#{summary}' -t 'All specs passed'" #ok end end |
#growlnotify(str) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/cadre/growl/notifier.rb', line 18 def growlnotify str system 'which growlnotify > /dev/null' if $?.exitstatus == 0 system "growlnotify -n autotest #{str}" end end |