[DRE-commits] [redmine] 09/26: update DB config location in Gemfile
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Sep 14 17:54:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository redmine.
commit 9c6a8dbd3ddfcbd81ee2c7d4e7f0db59d3277193
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Aug 29 00:42:08 2014 -0700
update DB config location in Gemfile
---
debian/patches/gemfile-adjustments.patch | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/debian/patches/gemfile-adjustments.patch b/debian/patches/gemfile-adjustments.patch
index 6d801ab..79e527a 100644
--- a/debian/patches/gemfile-adjustments.patch
+++ b/debian/patches/gemfile-adjustments.patch
@@ -28,7 +28,19 @@
gem "rack-openid"
end
-@@ -83,16 +83,6 @@ group :development do
+@@ -46,7 +46,10 @@ end
+ # configuration file
+ require 'erb'
+ require 'yaml'
+-database_file = File.join(File.dirname(__FILE__), "config/database.yml")
++# FIXME duplicating logic in config/application.rb
++ENV['X_DEBIAN_SITEID'] ||= 'default'
++ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++database_file = File.join(ENV['RAILS_ETC'], "database.yml")
+ if File.exist?(database_file)
+ database_config = YAML::load(ERB.new(IO.read(database_file)).result)
+ adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
+@@ -83,16 +86,6 @@ group :development do
gem "yard"
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git
More information about the Pkg-ruby-extras-commits
mailing list