Be nicer about changing app_config.yml to app.yml

This commit is contained in:
Raphael Sofaer 2011-05-19 12:53:03 -07:00
parent b0967ad8b4
commit 7912c8af3b

View file

@ -36,6 +36,10 @@ class AppConfig
if File.exist? "#{Rails.root}/config/app.yml" if File.exist? "#{Rails.root}/config/app.yml"
all_envs_custom = load_config_yaml "#{Rails.root}/config/app.yml" all_envs_custom = load_config_yaml "#{Rails.root}/config/app.yml"
all_envs.deep_merge!(all_envs_custom) all_envs.deep_merge!(all_envs_custom)
elsif File.exist? "#{Rails.root}/config/app_config.yml"
all_envs_custom = load_config_yaml "#{Rails.root}/config/app_config.yml"
all_envs.deep_merge!(all_envs_custom)
$stderr.puts "DEPRECATION WARNING: config/app_config.yml has been renamed to config/app.yml"
else else
unless Rails.env == "development" || Rails.env == "test" unless Rails.env == "development" || Rails.env == "test"
$stderr.puts "WARNING: No config/app.yml found! Look at config/app.yml.example for help." $stderr.puts "WARNING: No config/app.yml found! Look at config/app.yml.example for help."