Mercurial > zeropaste
comparison config/config_init.rb @ 498:300bac944674
Remove newrelic
To be replaced with sentry (maybe).
| author | nanaya <me@nanaya.net> |
|---|---|
| date | Sun, 15 Dec 2024 22:31:14 +0900 |
| parents | a5eae5b07abf |
| children | d2ef59c9a4b4 |
comparison
equal
deleted
inserted
replaced
| 497:3adab940b090 | 498:300bac944674 |
|---|---|
| 1 $cfg = {} | 1 $cfg = {} |
| 2 $cfg[:secret_key] = ENV["ZP_SECRET_KEY"] | 2 $cfg[:secret_key] = ENV["ZP_SECRET_KEY"] |
| 3 $cfg[:newrelic] = ENV["ZP_NEWRELIC"] == 1 | |
| 4 | 3 |
| 5 env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" | 4 env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" |
| 6 config_local = File.expand_path("config_local_#{env}.rb", __dir__) | 5 config_local = File.expand_path("config_local_#{env}.rb", __dir__) |
| 7 | 6 |
| 8 require config_local if File.exist? config_local | 7 require config_local if File.exist? config_local |
| 9 | 8 |
| 10 $cfg[:standalone] = true if $cfg[:standalone].nil? | 9 $cfg[:standalone] = true if $cfg[:standalone].nil? |
| 11 $cfg[:newrelic] = false if $cfg[:newrelic].nil? | |
| 12 $cfg[:log_to_stdout] = true if $cfg[:log_to_stdout].nil? | 10 $cfg[:log_to_stdout] = true if $cfg[:log_to_stdout].nil? |
| 13 | 11 |
| 14 $cfg[:bundler_groups] ||= [:default, env] | 12 $cfg[:bundler_groups] ||= [:default, env] |
| 15 $cfg[:bundler_groups] << "standalone" if $cfg[:standalone] | 13 $cfg[:bundler_groups] << "standalone" if $cfg[:standalone] |
| 16 $cfg[:bundler_groups] << "newrelic" if $cfg[:newrelic] | |
| 17 | 14 |
| 18 $cfg.freeze | 15 $cfg.freeze |
