test/configs/contact/contact.god in mojombo-god-0.7.7 vs test/configs/contact/contact.god in mojombo-god-0.7.9
- old
+ new
@@ -4,10 +4,17 @@
:address => "smtp.aa.powerset.com",
:port => 25,
:domain => "powerset.com"
}
+God::Contacts::Twitter.settings = {
+ # this is for my 'mojombo2' twitter test account
+ # feel free to use it for testing your conditions
+ :username => 'mojombo@gmail.com',
+ :password => 'gok9we3ot1av2e'
+}
+
God.contact(:email) do |c|
c.name = 'tom'
c.email = 'tom@mojombo.com'
c.group = 'developers'
end
@@ -22,16 +29,19 @@
c.name = 'kevin'
c.email = 'kevin@example.com'
c.group = 'platform'
end
+God.contact(:twitter) do |c|
+ c.name = 'tom2'
+ c.group = 'developers'
+end
+
God.watch do |w|
w.name = "contact"
w.interval = 5.seconds
w.start = "ruby " + File.join(File.dirname(__FILE__), *%w[simple_server.rb])
- w.uid = 'tom'
- w.gid = 'tom'
w.log = "/Users/tom/contact.log"
# determine the state on startup
w.transition(:init, { true => :up, false => :start }) do |on|
on.condition(:process_running) do |c|
@@ -53,10 +63,10 @@
end
# start if process is not running
w.transition(:up, :start) do |on|
on.condition(:process_exits) do |c|
- c.notify = {:contacts => ['tom', 'foobar'], :priority => 1, :category => 'product'}
+ c.notify = {:contacts => ['tom2', 'foobar'], :priority => 1, :category => 'product'}
end
end
# lifecycle
w.lifecycle do |on|
\ No newline at end of file