This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
grindable/lib/tasks/create_user.rake

16 lines
441 B
Ruby

desc "Makes an user without the use of the web interface"
task :create_user => :environment do
begin
account = Barista.new
print "Give me a username: "
account.name = STDIN.gets.chomp
#print "Password: "
#password = STDIN.gets.chomp
#account.set_password password, password
#account.activated = true
account.save_with_validation false
rescue => exception
puts "Failed: #{exception.inspect}"
end
end