Sha256: 1219d3c5a323ec59fd441a1a6cbef1034d3ee4ed3ebd45ebf3b4d3edba1d1287
Contents?: true
Size: 851 Bytes
Versions: 54
Compression:
Stored size: 851 Bytes
Contents
require "vmc/cli/user/base" module VMC::User class Create < Base desc "Create a user" group :admin, :user, :hidden => true input :email, :desc => "User email", :argument => :optional input :password, :desc => "User password" input :verify, :desc => "Repeat password" def create_user email = input[:email] password = input[:password] if !force? && password != input[:verify] fail "Passwords don't match." end with_progress("Creating user") do client.register(email, password) end end alias_command :add_user, :create_user private def ask_email ask("Email") end def ask_password ask("Password", :echo => "*", :forget => true) end def ask_verify ask("Verify Password", :echo => "*", :forget => true) end end end
Version data entries
54 entries across 54 versions & 4 rubygems