diff --git a/lib/tasks/new_site.rake b/lib/tasks/new_site.rake index 03dc7b983..b005b9590 100644 --- a/lib/tasks/new_site.rake +++ b/lib/tasks/new_site.rake @@ -5,15 +5,16 @@ require 'open-uri' require 'net/http/post/multipart' namespace :new_site do - task :build, [:website_name, :username, :password] => :environment do |t, args| + task :build, [:website_name, :username, :password, :email] => :environment do |t, args| website_name = "#{args.website_name}" username = "#{args.username}" password = "#{args.password}" + email = "#{args.email}" Site.destroy_all Purchase.destroy_all Site.create( :school => "#{website_name}", :department => 'Computer Science', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ], :frontend_open => true) upload_package - User.create!(:email=>'admin@rulingcom.com',:admin=>true,:user_id=>"#{username}",:password=>"#{password}") + User.create!(:email=>"#{email}",:admin=>true,:user_id=>"#{username}",:password=>"#{password}") puts @user = User.last `mongo #{Mongoid.config.database.name} --eval "db.fs.chunks.ensureIndex({files_id: 1, n: 1})"` puts "Congres you can now login within url"