Skip to content

Commit

Permalink
include newrelic if the newrelic config file is present. profiling ftw.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrippi committed Jun 2, 2011
1 parent 7363bf3 commit 918284a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config/oauth_keys.yml
config/initializers/secret_token.rb
config/redis.conf
config/deploy_config.yml
config/newrelic.yml
.bundle
vendor/bundle/*
config/database.yml
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ gem 'jammit', '0.5.4'
gem 'rest-client', '1.6.1'
gem 'typhoeus'

gem 'newrelic_rpm', :require => false

#Backups
gem 'cloudfiles', '1.4.10', :require => false

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ GEM
net-ssh (2.0.24)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
newrelic_rpm (3.0.1)
nokogiri (1.4.3.1)
oa-basic (0.2.6)
oa-core (= 0.2.6)
Expand Down Expand Up @@ -428,6 +429,7 @@ DEPENDENCIES
mini_magick (= 3.2)
mongrel
mysql2 (= 0.2.6)
newrelic_rpm
nokogiri
ohai (= 0.5.8)
omniauth (= 0.2.6)
Expand Down
3 changes: 3 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

# use newrelic if configured via config/newrelic.yml
require 'newrelic_rpm' if File.exists?(Rails.root.to_s << '/config/newrelic.yml')

# Load the rails application
require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5
Expand Down

0 comments on commit 918284a

Please sign in to comment.