Skip to content

Commit

Permalink
Extract another script. [#87]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Aug 9, 2013
1 parent b3da237 commit 22cbf88
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
12 changes: 2 additions & 10 deletions .travis.yml
Expand Up @@ -7,16 +7,8 @@ before_install:
- gem update --system 1.8.25 # since ZenTest needs ~> 1.8
- gem --version
before_script:
- ./install_postgis.sh
- |
cat >config/database.yml <<EOF
test:
adapter: postgis
database: quorum2_test
username: postgres
encoding: UTF8
EOF
- cp config/config-orig.yml config/config.yml
- ./ci/install_postgis.sh
- ./ci/create_config_files.sh
- bundle exec rake db:create
- psql -U postgres -d quorum2_test -c 'CREATE EXTENSION postgis;'
- bundle exec rake db:schema:load
Expand Down
15 changes: 15 additions & 0 deletions ci/create_config_files.sh
@@ -0,0 +1,15 @@
#!/usr/bin/env sh
printf >&2 'Setting up config files... '
cat >config/database.yml <<EOF
test:
adapter: postgis
database: quorum2_test
username: postgres
encoding: UTF8
EOF
printf >&2 'database.yml '

cp config/config-orig.yml config/config.yml
printf >&2 'config.yml '

printf >&2 "done\n"
4 changes: 2 additions & 2 deletions ci/install_postgis.sh 100644 → 100755
Expand Up @@ -3,9 +3,9 @@
# PostGIS installation stuff from https://github.com/geoalchemy/geoalchemy2/pull/43/files
# TODO: this could really use some refinement

echo >&2 Installing PostGIS...
printf >&2 Installing PostGIS...
sudo apt-add-repository -y ppa:sharpie/for-science
sudo apt-add-repository -y ppa:sharpie/postgis-nightly
sudo apt-get update
sudo apt-get install postgresql-9.1-postgis -q
echo >&2 PostGIS installed!
printf >&2 "done\n"

0 comments on commit 22cbf88

Please sign in to comment.