Permalink
Browse files

In dev/test, just log campfire output.

  • Loading branch information...
1 parent fbc7106 commit a602afc519001e9257fda176dcec82980dc0bf9c @spraints committed Nov 30, 2011
Showing with 18 additions and 1 deletion.
  1. +1 −0 Gemfile
  2. +2 −0 Gemfile.lock
  3. +3 −0 config/initializers/config.rb
  4. +7 −0 config/kanbfire.yml
  5. +5 −1 lib/campfire_notifier.rb
View
@@ -15,6 +15,7 @@ gem 'haml-rails'
gem 'omniauth-openid'
gem 'decent_exposure'
gem 'tinder'
+gem 'static_config'
group :development, :test do
gem 'sqlite3'
View
@@ -153,6 +153,7 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
+ static_config (0.0.3)
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
@@ -198,6 +199,7 @@ DEPENDENCIES
rspec-rails
sass-rails (~> 3.1.5)
sqlite3
+ static_config
tinder
uglifier (>= 1.0.3)
unicorn
@@ -0,0 +1,3 @@
+KanbfireConfig = StaticConfig.build do
+ file Rails.root.join('config/kanbfire.yml'), :section => Rails.env
+end
View
@@ -0,0 +1,7 @@
+development:
+ no_campfire: true
+
+test:
+ no_campfire: true
+
+production:
View
@@ -23,7 +23,11 @@ def message_for(params)
end
def say message
- campfire_room.speak message
+ if KanbfireConfig.no_campfire
+ Rails.logger.info "MESSAGE FOR CAMPFIRE: #{message}"
+ else
+ campfire_room.speak message
+ end
end
def campfire_room

0 comments on commit a602afc

Please sign in to comment.