From 3d1ebd849cc698717ae1c0109a6eaa5614a15a7f Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Mon, 2 Aug 2010 14:22:10 +0200 Subject: Rake prepare task to can prepare MySQL configuration --- lib/tasks/prepare.rake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3-65-gdbad