Permalink
Browse files

use highlight to mask password from console during auth

  • Loading branch information...
ghackett committed Sep 11, 2012
1 parent dead075 commit a47bbe25f0f9a36f0cf1dd78eb3f09a2ee10a66d
Showing with 3 additions and 1 deletion.
  1. +2 −1 lib/meme_generator/groupme.rb
  2. +1 −0 memegen.gemspec
@@ -16,10 +16,11 @@ def config
def prompt_config
require "readline"
+ require "highline/import"
puts "Set your GroupMe credentials..." unless config
phonenumber = Readline.readline("Phone #: ").strip
- password = Readline.readline("Password: ").strip
+ password = ask("Password: ") { |input| input.echo = false }
room = Readline.readline("Group Id: ").strip
message = Readline.readline("Message (optional): ").strip
View
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
s.add_dependency("rmagick")
s.add_dependency("tinder", "1.4.4")
s.add_dependency("multipart-post")
+ s.add_dependency("highlight")
s.files = Dir.glob("{bin,lib,generators,fonts,script}/**/*") + %w(LICENSE README.md)
s.executables = ['memegen']

0 comments on commit a47bbe2

Please sign in to comment.