Class: RobotArmy::Keychain

Inherits:
Object show all
Defined in:
lib/robot-army/keychain.rb

Instance Method Summary collapse

Instance Method Details

#get_password_for_user_on_host(user, host) ⇒ Object



2
3
4
# File 'lib/robot-army/keychain.rb', line 2

def get_password_for_user_on_host(user, host)
  read_with_prompt("[sudo] password for #{user}@#{host}: ")
end

#read_with_prompt(prompt) ⇒ Object



6
7
8
9
# File 'lib/robot-army/keychain.rb', line 6

def read_with_prompt(prompt)
  require 'highline'
  HighLine.new.ask(prompt) {|q| q.echo = false}
end