Skip to content

Commit

Permalink
Now password request hides the password
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hintz committed Jun 27, 2012
1 parent a1298a9 commit addd628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
@@ -1,2 +1,3 @@
source 'https://rubygems.org'
gem "octokit", "~> 1.4.0"
gem "highline"
3 changes: 2 additions & 1 deletion github.rb
Expand Up @@ -3,6 +3,7 @@
require 'octokit'
require 'readline'
require 'shellwords'
require 'highline/import'

module Github
##
Expand Down Expand Up @@ -61,7 +62,7 @@ def self.request_authorization(authorization_info)
puts "Authorizing..."

username ||= Readline.readline("github username: ", true)
password = Readline.readline("github password: ", false)
password = ask("github password: ") { |q| q.echo = false }

octokit = Octokit::Client.new(:login => username, :password => password)

Expand Down

0 comments on commit addd628

Please sign in to comment.