Sha256: 0bb4162c8e21e2fcd1a71a99eb8ab2cbfa9fc07578015cebb7fb4870b44050e6
Contents?: true
Size: 854 Bytes
Versions: 62
Compression:
Stored size: 854 Bytes
Contents
namespace :muck do namespace :sync do desc "Sync files from muck users." task :users do path = File.join(File.dirname(__FILE__), *%w[.. ..]) system "rsync -ruv #{path}/db ." system "rsync -ruv #{path}/public ." end end namespace :users do desc "Setup default admin user" task :create_admin => :environment do ['administrator', 'manager', 'editor', 'contributor'].each {|r| Role.create(:rolename => r) } user = User.new user.login = "admin" user.email = MuckEngine.configuration.admin_email user.password = "asdfasdf" user.password_confirmation = "asdfasdf" user.first_name = "Administrator" user.last_name = "Administrator" user.save user.activate! user.add_to_role('administrator') puts 'created admin user' end end end
Version data entries
62 entries across 62 versions & 1 rubygems