Sha256: cbb4f97077e474a6f1398db795a843e8c3d4a8e3a054b391c63f36fb5d042712

Contents?: true

Size: 853 Bytes

Versions: 9

Compression:

Stored size: 853 Bytes

Contents

require "jdc/cli/user/base"
=begin
module JDC::User
  class Passwd < Base
    desc "Update the current user's password"
    group :admin, :user
    input :password, :desc => "Current password"
    input :new_password, :desc => "New password"
    input :verify, :desc => "Repeat new password"

    def passwd
      password = input[:password]
      new_password = input[:new_password]

      validate_password! new_password

      with_progress("Changing password") do
        client.current_user.change_password!(new_password, password)
      end
    end

    private

    def ask_password
      ask("Current Password", :echo => "*", :forget => true)
    end

    def ask_new_password
      ask("New Password", :echo => "*", :forget => true)
    end

    def ask_verify
      ask("Verify Password", :echo => "*", :forget => true)
    end
  end
end
=end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jdc-0.2.7 lib/jdc/cli/user/passwd.rb
jdc-0.2.5 lib/jdc/cli/user/passwd.rb
jdc-0.2.4 lib/jdc/cli/user/passwd.rb
jdc-0.2.3 lib/jdc/cli/user/passwd.rb
jdc-0.2.2 lib/jdc/cli/user/passwd.rb
jdc-0.2.3.pre lib/jdc/cli/user/passwd.rb
jdc-0.2.2.pre lib/jdc/cli/user/passwd.rb
jdc-0.2.1.pre lib/jdc/cli/user/passwd.rb
jdc-0.2.0 lib/jdc/cli/user/passwd.rb