Permalink
Browse files

Finalizing move campfire notification to DJ

  • Loading branch information...
1 parent 90d23f2 commit 5b103795cafdf0c34e76df2609393b08802e34c3 @courtenay courtenay committed Apr 23, 2009
Showing with 4 additions and 2 deletions.
  1. +1 −0 app/models/job/notify_campfire.rb
  2. +2 −1 app/models/status_observer.rb
  3. +1 −1 config/initializers/custom.rb
@@ -2,6 +2,7 @@ class Job::NofifyCampfire < Job::Base.new(:campfire, :message)
# tinder_room.speak message
def perform
+ return if Rails.env == 'test'
campfire.tinder_room.speak message
end
end
@@ -11,7 +11,8 @@ def after_create(status)
return unless project
project.tendrils.each do |tendril|
- puts "WARNING: no notifies for tendril #{tendril.inspect}"
+ next if tendril.notifies.nil? # usually this is caused by bad data or missing foreign object (aka no 'campfire')
+
# Round the message. If it was more than a few hours, we probably don't care
# about the exact number of minutes.
if status.created_at.utc < 4.hours.ago.utc
@@ -4,4 +4,4 @@
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update \
:time => '%I:%M %p'
-Aimbo.credentials = { :username => 'USERNAME', :password => 'PASSWORD' }
+Aimbo.credentials = { :username => 'USERNAME', :password => 'PASSWORD' }

0 comments on commit 5b10379

Please sign in to comment.