ad_leads 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ad_leads/client.rb +5 -5
- data/lib/ad_leads/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 479cda63e3f226132b2ad9999f038fc771067333
|
4
|
+
data.tar.gz: 1e32eb9c367cee86ec90477121e6ee8be83dc9ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2171e5b43e829b1fcc0ddd65491b9c4d2bb69b621b2b5868f0bc9f83d203245d9a834778a0dce6cf81173a3edd61d12b1a40dea8868550c983ba083089f612b
|
7
|
+
data.tar.gz: a87f9ad97458846d1751bd7e8ed5631646d588f39bddb78f070f86a5b2bd982fdddc15f3bd0a35ef3bd2b89bfcd2b85f712581118cf2c76b8ed84899b9206f34
|
data/lib/ad_leads/client.rb
CHANGED
@@ -87,7 +87,7 @@ module AdLeads
|
|
87
87
|
case response.status
|
88
88
|
when 400 then raise ArgError.new response.body
|
89
89
|
when 401 then raise AuthError.new "token: #{token}" + response.body.to_s
|
90
|
-
when 500 then raise
|
90
|
+
when 500 then raise ApiServerError.new response.body
|
91
91
|
else
|
92
92
|
response
|
93
93
|
end
|
@@ -97,13 +97,13 @@ module AdLeads
|
|
97
97
|
|
98
98
|
end
|
99
99
|
|
100
|
-
class
|
100
|
+
class ApiError < StandardError
|
101
101
|
def initialize(message)
|
102
102
|
Logger.new(STDOUT).error message
|
103
103
|
super(message)
|
104
104
|
end
|
105
105
|
end
|
106
|
-
class AuthError <
|
107
|
-
class
|
108
|
-
class ArgError <
|
106
|
+
class AuthError < ApiError; end
|
107
|
+
class ApiServerError < ApiError; end
|
108
|
+
class ArgError < ApiError; end
|
109
109
|
end
|
data/lib/ad_leads/version.rb
CHANGED