From 2e6865d55ff3ae6483471a95cf5ef14e14b4d403 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 14 Feb 2013 19:12:26 +0100 Subject: [PATCH] don't run metrics etc in heroku console --- lib/travis/api/app.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index f6c332a2..c88a3b5d 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -100,6 +100,10 @@ module Travis::Api private + def self.console? + defined? Travis::Console + end + def self.setup! setup_travis load_endpoints @@ -118,7 +122,7 @@ module Travis::Api end end - if Travis.env == 'production' + if Travis.env == 'production' and not console? Raven.configure do |config| config.dsn = Travis.config.sentry.dsn end if Travis.config.sentry