social_auth 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f17d8454ca12a98759b8cca6ac37af4788c9cc
|
4
|
+
data.tar.gz: 35c9c20f217c64e02c5cd10bb501a60774b9b27b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed04d3f7b67b5a00231aa016e3a0210dfaffdd506b80bf9a9ef871285ecbb0372d72b428acbca16cec48b322137d16d6bf6e6e435414e870ad073e1b588b6931
|
7
|
+
data.tar.gz: 320f53186898d9830fdd2bea93f4cf7aedf2acc3b1d7ce43ed39567b1fdc7f17c99a1a0e944c6071aa6f5eb466756e71284b4610bad407fbc09320d1c5aeb2cb
|
@@ -145,6 +145,7 @@ module SocialAuth
|
|
145
145
|
|
146
146
|
#exceptions
|
147
147
|
class InvalidToken < StandardError ; end
|
148
|
+
class RateLimitExceeded < StandardError ; end
|
148
149
|
class BadRequest < StandardError ; end
|
149
150
|
class ServiceDoesNotExist < StandardError ; end
|
150
151
|
class Error < StandardError ; end
|
@@ -19,6 +19,10 @@ module SocialAuth
|
|
19
19
|
|
20
20
|
rescue Twitter::Error::Unauthorized => e
|
21
21
|
raise InvalidToken.new(e.message)
|
22
|
+
rescue Twitter::Error::TooManyRequests => e
|
23
|
+
raise RateLimitExceeded.new(e.message)
|
24
|
+
rescue Twitter::Error => e
|
25
|
+
raise Error.new(e.message)
|
22
26
|
end
|
23
27
|
|
24
28
|
def self.connect_with(user, auth_token={}, method="Connected")
|
@@ -33,6 +37,10 @@ module SocialAuth
|
|
33
37
|
|
34
38
|
rescue Twitter::Error::Unauthorized => e
|
35
39
|
raise InvalidToken.new(e.message)
|
40
|
+
rescue Twitter::Error::TooManyRequests => e
|
41
|
+
raise RateLimitExceeded.new(e.message)
|
42
|
+
rescue Twitter::Error => e
|
43
|
+
raise Error.new(e.message)
|
36
44
|
end
|
37
45
|
|
38
46
|
def self.create_connection(auth_token={})
|
data/lib/social_auth/version.rb
CHANGED