From 0c3e12dfa3b3b403acf0d87d7220e451dbca2a1e Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 2 Sep 2013 10:15:53 +0200 Subject: [PATCH] Revert "Disable new relic" This reverts commit 6412a07ad1becb984e767022edf558fe4d7f4d8d. --- Gemfile.lock | 2 ++ lib/travis/api/app/base.rb | 4 ++++ travis-api.gemspec | 2 ++ 3 files changed, 8 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 16a1d775..53a779da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,6 +75,7 @@ PATH specs: travis-api (0.0.1) backports (~> 2.5) + newrelic_rpm (~> 3.6.6) pg (~> 0.13.2) rack-contrib (~> 1.1) rack-ssl (~> 1.3, >= 1.3.3) @@ -178,6 +179,7 @@ GEM multipart-post (1.2.0) net-http-persistent (2.9) net-http-pipeline (1.0.1) + newrelic_rpm (3.6.6.147) pg (0.13.2) polyglot (0.3.3) pry (0.9.12.2) diff --git a/lib/travis/api/app/base.rb b/lib/travis/api/app/base.rb index 70804953..4fbf40c8 100644 --- a/lib/travis/api/app/base.rb +++ b/lib/travis/api/app/base.rb @@ -7,6 +7,10 @@ class Travis::Api::App class Base < Sinatra::Base register Extensions::SmartConstants + configure :production do + require 'newrelic_rpm' + end + error NotImplementedError do content_type :txt status 501 diff --git a/travis-api.gemspec b/travis-api.gemspec index 08e03222..d6d027fe 100644 --- a/travis-api.gemspec +++ b/travis-api.gemspec @@ -47,6 +47,7 @@ Gem::Specification.new do |s| "Rakefile", "config.ru", "config/database.yml", + "config/newrelic.yml", "config/unicorn.rb", "docs/00_overview.md", "docs/01_cross_origin.md", @@ -198,6 +199,7 @@ Gem::Specification.new do |s| s.add_dependency 'backports', '~> 2.5' s.add_dependency 'pg', '~> 0.13.2' + s.add_dependency 'newrelic_rpm', '~> 3.6.6' s.add_dependency 'thin', '~> 1.4' s.add_dependency 'sinatra', '~> 1.3' s.add_dependency 'sinatra-contrib', '~> 1.3'