[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH] removed fixed environment from taskomatic, now can be configured via /etc/sysconfig/ovirt-rails



---
 autobuild.sh                        |    1 -
 wui/src/dutils/active_record_env.rb |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/autobuild.sh b/autobuild.sh
index 95395d0..385c80f 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -80,7 +80,6 @@ fi
 echo "Running the wui tests"
 $ssh_cmd \
   "sed -i \"s/#RAILS_ENV=production/RAILS_ENV=test/g\" /etc/sysconfig/ovirt-rails && \
-   sed -i \"s/development/test/\" /usr/share/ovirt-wui/dutils/active_record_env.rb && \
    service ovirt-taskomatic restart && \
    service ovirt-mongrel-rails restart && \
    service httpd restart && \
diff --git a/wui/src/dutils/active_record_env.rb b/wui/src/dutils/active_record_env.rb
index 9b7b416..a9412f8 100644
--- a/wui/src/dutils/active_record_env.rb
+++ b/wui/src/dutils/active_record_env.rb
@@ -40,7 +40,7 @@ require "#{OVIRT_DIR}/vendor/plugins/acts_as_xapian/lib/acts_as_xapian"
 
 def database_connect
   $dbconfig = YAML::load(ERB.new(IO.read("#{OVIRT_DIR}/config/database.yml")).result)
-  $develdb = $dbconfig['development']
+  $develdb = $dbconfig[ENV['RAILS_ENV']]
   ActiveRecord::Base.establish_connection(
                                           :adapter  => $develdb['adapter'],
                                           :host     => $develdb['host'],
-- 
1.5.4.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]