-
-
Save tenderlove/895331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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