aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2012-12-17 16:04:48 +0100
committerLuc Donnet2012-12-17 16:04:48 +0100
commit87f19b42235d7d59a3ee65360d6c9137825fdeb2 (patch)
tree5885916a93dbc03a3f2d50302c66f786f6b45829
parent3d35d440f43e68ed4fa68843c75b53d1c5c670a1 (diff)
downloadchouette-core-87f19b42235d7d59a3ee65360d6c9137825fdeb2.tar.bz2
Use rake for create database
-rw-r--r--.travis.yml7
-rw-r--r--config/database.yml.travis8
2 files changed, 10 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 5adbb9b48..d736e4950 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,10 +5,9 @@ rvm:
before_install:
- sudo apt-get install build-essential ruby-dev libproj-dev libgeos-dev libffi-dev libsparsehash-dev zlib1g-dev libxslt1-dev libxml2-dev libbz2-dev
before_script:
- - "psql -c 'create database chouette_test;' -U postgres"
- - "psql -c 'create database chouette_production_test;' -U postgres"
- - "RAILS_ENV=test rake ci:prepare_travis"
-script: "RAILS_ENV=test rake spec"
+ - "rake db:create"
+ - "rake ci:prepare_travis"
+script: "rake spec"
branches:
only:
- master
diff --git a/config/database.yml.travis b/config/database.yml.travis
index 0335bca94..40a95e668 100644
--- a/config/database.yml.travis
+++ b/config/database.yml.travis
@@ -1,5 +1,11 @@
+development:
+ adapter: <%= RUBY_PLATFORM == "java" ? "jdbcpostgresql" : "postgresql" %>
+ database: <%= (ENV["GIT_BRANCH"].nil? || ENV["GIT_BRANCH"] == "master") ? "chouette_d" : "chouette_" + ENV["GIT_BRANCH"] + "_d" %>
+ encoding: utf8
+ username: postgres
+
test:
- adapter: jdbcpostgresql
+ adapter: <%= RUBY_PLATFORM == "java" ? "jdbcpostgresql" : "postgresql" %>
database: <%= (ENV["GIT_BRANCH"].nil? || ENV["GIT_BRANCH"] == "master") ? "chouette_test" : "chouette_" + ENV["GIT_BRANCH"] + "_test" %>
encoding: utf8
username: postgres \ No newline at end of file