Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Forked from akitaonrails/newrelic.yml
Created March 30, 2011 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/895331 to your computer and use it in GitHub Desktop.
Save tenderlove/895331 to your computer and use it in GitHub Desktop.
# Install the psych gem and uncomment the following line.
#gem 'psych'
require 'psych'
stuff = Psych.load_file ARGV[0] || 'newrelic.yml'
p stuff['production']['enabled']
common: &default_settings
license_key: 'aee....517'
app_name: AkitaOnRails.com
enabled: false
log_level: info
ssl: false
apdex_t: 0.5
capture_params: false
transaction_tracer:
enabled: true
transaction_threshold: apdex_f
record_sql: obfuscated
stack_trace_threshold: 0.500
error_collector:
enabled: true
capture_source: true
development:
<<: *default_settings
enabled: false
developer: true
test:
<<: *default_settings
enabled: false
production:
<<: *default_settings
enabled: true
staging:
<<: *default_settings
enabled: true
app_name: My Application (Staging)
Running Rails 3.0.5 and Ruby 1.9.2-p180 in both OS X (Snow Leopard 10.6.7) and Debian Lenny, different override results for the YAML parsing:
~/Sites/rails/enki ruby-1.9.2(master $) ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0]
> ruby-1.9.2-p180 :004 > a["production"]["enabled"]
=> true
root@webby4106:/var/webapps/akitaonrails# ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
> ruby-1.9.2-p180 :002 > a["production"]["enabled"]
=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment