From 1e019918b259a0b41eca50aca633cea983f424e1 Mon Sep 17 00:00:00 2001 From: Nico Fuenzalida Date: Mon, 23 Nov 2015 14:23:41 -0300 Subject: [PATCH] Minor changes --- account.yml | 4 ++-- credencial.yml | 2 -- gmail.rb | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 credencial.yml diff --git a/account.yml b/account.yml index da29d2b..bd7adae 100644 --- a/account.yml +++ b/account.yml @@ -3,5 +3,5 @@ # Doesn't matter if you write on uppercase # Please, leave a space between both variable. -email: -password: +email: nico01f@gmail.com +password: nifo.simon diff --git a/credencial.yml b/credencial.yml deleted file mode 100644 index f36285c..0000000 --- a/credencial.yml +++ /dev/null @@ -1,2 +0,0 @@ -correo: -clave: diff --git a/gmail.rb b/gmail.rb index fd691b8..3699214 100644 --- a/gmail.rb +++ b/gmail.rb @@ -6,7 +6,7 @@ ACCOUNT = YAML.load_file("account.yml") unless defined? ACCOUNT #Conecta con Gmail -def conecta_gmail (email, pass) +def conecta(email, pass) g = Gmail.connect(email, pass) if g.logged_in? == true puts "Connected!".green @@ -18,12 +18,14 @@ def conecta_gmail (email, pass) def info_credencial() puts "Usuario: #{ACCOUNT['email']}" - puts "Clave: #{ACCOUNT['password']}" - conecta_gmail(ACCOUNT['email'], ACCOUNT['password']) + password_hided = "*" * ACCOUNT['password'].length + puts "Password: #{password_hided}" + puts "=============" + conecta(ACCOUNT['email'], ACCOUNT['password']) end info_credencial() -puts "Saliendo...".yellow +puts "Exiting...".yellow