Sha256: 09636e3928da3874e1acff21b04885b75dfb4269ec048d8f7b079b67748678e4

Contents?: true

Size: 533 Bytes

Versions: 47

Compression:

Stored size: 533 Bytes

Contents

namespace :rodauth do
  desc "Create a Rodauth admin account"
  task admin: :environment do
    # require "rodauth"
    # require "active_record"
    require "tty-prompt"

    prompt = TTY::Prompt.new
    email = ENV["EMAIL"] || prompt.ask("email:", required: true)
    # password = SecureRandom.hex
    # password = ENV["PASSWORD"] || prompt.mask("password:", required: true)
    # password_confirm = ENV["PASSWORD"] || prompt.mask("password:", required: true)

    RodauthApp.rodauth(:admin).create_account(login: email)
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
plutonium-0.15.20 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.19 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.18 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.17 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.16 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.15 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.14 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.13 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.12 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.11 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.10 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.9 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.8 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.7 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.6 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.5 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.4 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.3 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.2 lib/tasks/create_rodauth_admin.rake
plutonium-0.15.1 lib/tasks/create_rodauth_admin.rake