1 # This file must be loaded _after_ secret_token.rb if secret_token is
2 # defined there instead of in config/application.yml.
4 $application_config = {}
6 %w(application.default application).each do |cfgfile|
7 path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml"
9 yaml = ERB.new(IO.read path).result(binding)
10 confs = YAML.load(yaml, deserialize_symbols: true)
11 $application_config.merge!(confs['common'] || {})
12 $application_config.merge!(confs[::Rails.env.to_s] || {})
16 ArvadosWorkbench::Application.configure do
18 $application_config.each do |k, v|
19 # "foo.bar: baz" --> { config.foo.bar = baz }
26 if v.nil? and cfg.respond_to?(k) and !cfg.send(k).nil?
27 # Config is nil in *.yml, but has been set already in
28 # environments/*.rb (or has a Rails default). Don't overwrite
29 # the default/upstream config with nil.
31 # After config files have been migrated, this mechanism should
33 Rails.logger.warn <<EOS
34 DEPRECATED: Inheriting config.#{ks.join '.'} from Rails config.
35 Please move this config into config/application.yml.
38 # Config variables are not allowed to be nil. Make a "naughty"
39 # list, and present it below.
47 Refusing to start in #{::Rails.env.to_s} mode with missing configuration.
49 The following configuration settings must be specified in
50 config/application.yml: