From 8739d618ba1e319b268b769a9818a1ac27b9ff7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonne=20Ha=C3=9F?= <me@mrzyx.de>
Date: Tue, 10 Apr 2012 21:36:57 +0200
Subject: [PATCH] reenable pg on travis but let it use a basic database.yml

---
 .travis.yml                 | 4 ++--
 config/database.yml.example | 5 ++++-
 script/ci/before.sh         | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index c69515b444..b30652c8a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,9 +9,9 @@ rvm:
   - 1.9.2
 
 env:
-  # - DB=postgres BUILD_TYPE=other
+  - DB=postgres BUILD_TYPE=other
   - DB=mysql BUILD_TYPE=other
-  # - DB=postgres BUILD_TYPE=cucumber
+  - DB=postgres BUILD_TYPE=cucumber
   - DB=mysql BUILD_TYPE=cucumber
 
 before_install: 
diff --git a/config/database.yml.example b/config/database.yml.example
index 3dcbfa33c9..6d286b3258 100644
--- a/config/database.yml.example
+++ b/config/database.yml.example
@@ -37,4 +37,7 @@ integration1:
   database: diaspora_integration1
 integration2:
   <<: *common
-  database: diaspora_integration2
\ No newline at end of file
+  database: diaspora_integration2
+postgres_travis: &postgres_travis
+  adapter: postgresql
+  username: postgres
diff --git a/script/ci/before.sh b/script/ci/before.sh
index 999d5784bb..e447c24327 100755
--- a/script/ci/before.sh
+++ b/script/ci/before.sh
@@ -23,7 +23,7 @@ sh -e /etc/init.d/xvfb start
 echo "Setting up database.yml for $DB"
 cp config/database.yml.example config/database.yml
 if [ "$DB" = "postgres" ]; then
-  sed -i 's/*mysql/*postgres/' config/database.yml
+  sed -i 's/*mysql/*postgres_travis/' config/database.yml
 fi
 
 # Set up database
-- 
GitLab