diff options
author | Harald Eilertsen <hareiler@cisco.com> | 2013-01-28 17:34:49 +0100 |
---|---|---|
committer | Harald Eilertsen <hareiler@cisco.com> | 2013-01-28 17:34:49 +0100 |
commit | 67a26cf042d6431e364bb85675f788e780b4f651 (patch) | |
tree | 0c4e98a988e2056ed4588e6c2d899288a1b9e879 | |
parent | 996deb2d68baff186f8d0f521cd53cdb1f391949 (diff) | |
download | hmnoweb-67a26cf042d6431e364bb85675f788e780b4f651.tar.gz hmnoweb-67a26cf042d6431e364bb85675f788e780b4f651.tar.bz2 hmnoweb-67a26cf042d6431e364bb85675f788e780b4f651.zip |
Create development setup script.
Runs bundle install, creates database config and loads the database schema
and initial seed. Should probably be made smarter in the end, but for now
we'll try to get by with this.
-rw-r--r-- | lib/tasks/dev_setup.rake | 10 | ||||
-rwxr-xr-x | script/setup | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/dev_setup.rake b/lib/tasks/dev_setup.rake new file mode 100644 index 0000000..42a37a5 --- /dev/null +++ b/lib/tasks/dev_setup.rake @@ -0,0 +1,10 @@ +# Rake task for local development setup + +namespace :dev do + task :config_db do + sh 'ln -s database.yml.sqlite3 config/database.yml' + end + + desc "Setup local environment for development." + task :setup => [ 'config_db', 'db:setup' ] +end diff --git a/script/setup b/script/setup new file mode 100755 index 0000000..e81eacf --- /dev/null +++ b/script/setup @@ -0,0 +1,6 @@ +#!/bin/bash +bundle install + +if [ $? ]; then + bundle exec rake dev:setup +fi |