Mercurial > zeropaste
annotate config/config_init.rb @ 472:b26dd8fa1c26 bootstrap-4
Update link to source
author | nanaya <me@nanaya.pro> |
---|---|
date | Sun, 23 Feb 2020 22:42:15 +0900 |
parents | a5eae5b07abf |
children | 300bac944674 |
rev | line source |
---|---|
437 | 1 $cfg = {} |
2 $cfg[:secret_key] = ENV["ZP_SECRET_KEY"] | |
3 $cfg[:newrelic] = ENV["ZP_NEWRELIC"] == 1 | |
4 | |
438
a5eae5b07abf
Prepare for removing custom database.yml
nanaya <me@myconan.net>
parents:
437
diff
changeset
|
5 env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" |
a5eae5b07abf
Prepare for removing custom database.yml
nanaya <me@myconan.net>
parents:
437
diff
changeset
|
6 config_local = File.expand_path("config_local_#{env}.rb", __dir__) |
437 | 7 |
8 require config_local if File.exist? config_local | |
9 | |
10 $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? | |
13 | |
438
a5eae5b07abf
Prepare for removing custom database.yml
nanaya <me@myconan.net>
parents:
437
diff
changeset
|
14 $cfg[:bundler_groups] ||= [:default, env] |
437 | 15 $cfg[:bundler_groups] << "standalone" if $cfg[:standalone] |
16 $cfg[:bundler_groups] << "newrelic" if $cfg[:newrelic] | |
17 | |
18 $cfg.freeze |