diff options
| author | hukl <contact@smyck.org> | 2009-02-21 11:27:57 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-21 11:27:57 +0100 |
| commit | fa566e7dafaa4c44ad120acce7079176146fdc53 (patch) | |
| tree | aeb98b8e5a2b5ff0fb0fc6905ef6985fde599817 /lib/tasks/development_init.rake | |
| parent | 88666df9fd21d612ea6d713bacf137584acf7f40 (diff) | |
rake task to create a user and rake task to import
the updates
Diffstat (limited to 'lib/tasks/development_init.rake')
| -rw-r--r-- | lib/tasks/development_init.rake | 18 |
1 files changed, 18 insertions, 0 deletions
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 @@ | |||
| 1 | namespace :cccms do | ||
| 2 | |||
| 3 | desc "Create admin:foobar user:password" | ||
| 4 | task :create_admin_user => :environment do |t| | ||
| 5 | User.create!( | ||
| 6 | :login => 'admin', | ||
| 7 | :email => 'admin@cccms.de', | ||
| 8 | :password => 'foobar', | ||
| 9 | :password_confirmation => 'foobar' | ||
| 10 | ) | ||
| 11 | end | ||
| 12 | |||
| 13 | desc "Import the old XML Files" | ||
| 14 | task :import_updates => :environment do |t| | ||
| 15 | i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") | ||
| 16 | i.import_xml | ||
| 17 | end | ||
| 18 | end \ No newline at end of file | ||
