Created
August 17, 2009 03:16
-
-
Save wtnabe/168872 to your computer and use it in GitHub Desktop.
A patch of God's simplest sample with Growl notify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/simple.god b/simple.god | |
index 407e34b..3ca0518 100644 | |
--- a/simple.god | |
+++ b/simple.god | |
@@ -1,4 +1,12 @@ | |
+# -*- mode: ruby -*- | |
+ | |
+require File.dirname( __FILE__ ) + '/../god_extension/god_growl' | |
+ | |
#The simplest possible watch | |
+God.contact( :god_growl ) do |c| | |
+ c.name = 'growl' | |
+end | |
+ | |
God.watch do |w| | |
w.name = "crashy" | |
w.interval = 1.seconds | |
@@ -7,6 +15,7 @@ God.watch do |w| | |
w.start_if do |start| | |
start.condition(:process_running) do |c| | |
c.running = false | |
+ c.notify = 'growl' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment