From bde974e1829a435beaa62c793c5ee13266c87cda Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Fri, 25 Jan 2013 22:11:53 +0100 Subject: [PATCH] Revert "disable newrelic" This reverts commit 48cc0d366a0e310e21131ee7569e60c8ee44ab01. --- lib/travis/api/app/base.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/travis/api/app/base.rb b/lib/travis/api/app/base.rb index 65bf2382..4ab5af58 100644 --- a/lib/travis/api/app/base.rb +++ b/lib/travis/api/app/base.rb @@ -1,6 +1,6 @@ require 'travis/api/app' require 'sinatra/base' -#require 'new_relic/agent/instrumentation/rack' +require 'new_relic/agent/instrumentation/rack' class Travis::Api::App # Superclass for any endpoint and middleware. @@ -9,7 +9,7 @@ class Travis::Api::App register Extensions::SmartConstants configure :production do - #require 'newrelic_rpm' + require 'newrelic_rpm' end error NotImplementedError do @@ -18,6 +18,12 @@ class Travis::Api::App "This feature has not yet been implemented. Sorry :(\n\nPull Requests welcome!" end + def call(env) + super + rescue Sinatra::NotFound + [404, {'Content-Type' => 'text/plain'}, ['Tell Konstantin to fix this!']] + end + configure do # We pull in certain protection middleware in App. # Being token based makes us invulnerable to common