From fa566e7dafaa4c44ad120acce7079176146fdc53 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 21 Feb 2009 11:27:57 +0100 Subject: rake task to create a user and rake task to import the updates --- lib/tasks/development_init.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/tasks/development_init.rake (limited to 'lib/tasks') diff --git a/lib/tasks/development_init.rake b/lib/tasks/development_init.rake new file mode 100644 index 0000000..7c732d2 --- /dev/null +++ b/lib/tasks/development_init.rake @@ -0,0 +1,18 @@ +namespace :cccms do + + desc "Create admin:foobar user:password" + task :create_admin_user => :environment do |t| + User.create!( + :login => 'admin', + :email => 'admin@cccms.de', + :password => 'foobar', + :password_confirmation => 'foobar' + ) + end + + desc "Import the old XML Files" + task :import_updates => :environment do |t| + i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") + i.import_xml + end +end \ No newline at end of file -- cgit v1.3