Mercurial > zeropaste
annotate config/config_init.rb @ 494:e508d3226214 default tip
Update gems
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 29 Oct 2023 23:24:13 +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 |