Mercurial > zeropaste
annotate config/config_init.rb @ 463:4608d12ebe03
Sync database
author | nanaya <me@nanaya.pro> |
---|---|
date | Mon, 10 Dec 2018 02:35:08 +0900 |
parents | a5eae5b07abf |
children |
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 |