Created
January 4, 2011 12:38
-
-
Save stevebartholomew/764726 to your computer and use it in GitHub Desktop.
Override Rails's test prepare db task to source in postgis data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :db do | |
namespace :test do | |
task :prepare_postgis do | |
`/usr/local/pgsql/bin/psql dbname -f /usr/local/pgsql-9.0/share/contrib/postgis-1.5/postgis.sql -U postgres` | |
`/usr/local/pgsql/bin/psql dbname -f /usr/local/pgsql-9.0/share/contrib/postgis-1.5/spatial_ref_sys.sql -U postgres` | |
end | |
end | |
end | |
Rake::Task["db:test:prepare"].enhance do | |
Rake::Task["db:test:prepare_postgis"].invoke | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment