diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-02 14:22:10 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-02 20:54:50 +0200 |
commit | 3d1ebd849cc698717ae1c0109a6eaa5614a15a7f (patch) | |
tree | 7f788716228907fd4ef36673a2eacf9294879d7f /lib | |
parent | Make tests pass on MySQL (diff) | |
download | recruiting-webapp-3d1ebd849cc698717ae1c0109a6eaa5614a15a7f.tar.gz recruiting-webapp-3d1ebd849cc698717ae1c0109a6eaa5614a15a7f.tar.bz2 recruiting-webapp-3d1ebd849cc698717ae1c0109a6eaa5614a15a7f.zip |
Rake prepare task to can prepare MySQL configuration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/prepare.rake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tasks/prepare.rake b/lib/tasks/prepare.rake index f28826e..bc46a43 100644 --- a/lib/tasks/prepare.rake +++ b/lib/tasks/prepare.rake @@ -7,7 +7,7 @@ task :prepare => ['prepare:config', 'db:schema:load'] + opt namespace :prepare do - desc "Prepare configuration files (you can pass db=[none|sqlite3|postgres])" + desc "Prepare configuration files (you can pass db=[none|sqlite3|postgres|mysql])" task :config do if !ENV.include?('db') || (ENV['db'] == 'none') @@ -21,6 +21,11 @@ namespace :prepare do puts "Now you have a template postgeres configuration in config/database.yml. Remember to set user and database names matching you configuration." + elsif ENV['db'] == 'mysql' + File.copy('doc/config/database-mysql.yml', 'config/database.yml') + puts "Now you have a template mysql configuration in config/database.yml. + Remember to set user and database names matching you configuration." + else raise "valid values for db are sqlite3, postgres, none" end |