diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-29 18:02:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-29 18:02:20 +0000 |
commit | b0f496a58d4ecc149737448d231a24d707028674 (patch) | |
tree | ff5d55fb4fad8fbbac5064952c355e88006fc184 /Gemfile | |
parent | 1e0a94de84197825e34c3dd01e5b2ef6112963d9 (diff) | |
download | redmine-b0f496a58d4ecc149737448d231a24d707028674.tar.gz redmine-b0f496a58d4ecc149737448d231a24d707028674.zip |
Parse database.yml with erb (#13004).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11286 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'Gemfile')
-rw-r--r-- | Gemfile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -36,9 +36,10 @@ end # Include database gems for the adapters found in the database # configuration file +require 'erb' database_file = File.join(File.dirname(__FILE__), "config/database.yml") if File.exist?(database_file) - database_config = YAML.load_file(database_file) + database_config = YAML::load(ERB.new(IO.read(database_file)).result) adapters = database_config.values.map {|c| c['adapter']}.compact.uniq if adapters.any? adapters.each do |adapter| |