gmail_oauth 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gmail/client.rb +5 -5
- data/lib/gmail/version.rb +1 -1
- metadata +2 -2
data/lib/gmail/client.rb
CHANGED
@@ -53,11 +53,11 @@ module Gmail
|
|
53
53
|
|
54
54
|
# Login to specified account.
|
55
55
|
def login(raise_errors=false)
|
56
|
-
@imap and @logged_in = (login = @imap.authenticate('XOAUTH', email,
|
57
|
-
:consumer_key => consumer_key,
|
58
|
-
:consumer_secret => consumer_secret,
|
59
|
-
:token => token,
|
60
|
-
:token_secret => secret
|
56
|
+
@imap and @logged_in = (login = @imap.authenticate('XOAUTH', @email,
|
57
|
+
:consumer_key => @consumer_key,
|
58
|
+
:consumer_secret => @consumer_secret,
|
59
|
+
:token => @token,
|
60
|
+
:token_secret => @secret
|
61
61
|
)) && login.name == 'OK'
|
62
62
|
rescue Net::IMAP::NoResponseError
|
63
63
|
raise_errors and raise AuthorizationError, "Couldn't login to given GMail account"
|
data/lib/gmail/version.rb
CHANGED