snov 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/snov/client.rb +2 -2
- data/lib/snov/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7faf9e2f35034621c1431218b982ad536b36286982b5dcbe6cce5e88a167b5c8
|
4
|
+
data.tar.gz: 733b376b869be78af8537a41e62405c4006e0ac2745f8c05c980522e21662ecf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de5cd49d6bc4a25101314ab0434510bcee7436ce25c574d8dfe46546516069b2f57322716d8b6c74e6740c917ec5753ba1d4c54eecb5a9e93b30b14d4f30aa20
|
7
|
+
data.tar.gz: 72a08e7800eb9297ebd746ba7a19c75458a312ad6a1b271ec28c384bf384e33688134b5d041809d01da3b6ef2783b98d58c1c8e8c50a045e76f62948baa5deea
|
data/CHANGELOG.md
CHANGED
data/lib/snov/client.rb
CHANGED
@@ -33,7 +33,7 @@ module Snov
|
|
33
33
|
ERROR_CLASSES = { 401 => UnauthorizedError, 502 => BadGatewayError, 403 => ForbiddenError,
|
34
34
|
504 => GatewayTimeOut, 400 => BadRequest, 405 => MethodNotAllowed }
|
35
35
|
|
36
|
-
def initialize(client_id:, client_secret:, access_token: nil, timeout_seconds:
|
36
|
+
def initialize(client_id:, client_secret:, access_token: nil, timeout_seconds: 90)
|
37
37
|
self.client_id = client_id.to_str
|
38
38
|
self.client_secret = client_secret.to_str
|
39
39
|
@access_token = access_token
|
@@ -67,7 +67,7 @@ module Snov
|
|
67
67
|
def parse_response(resp, path, _params)
|
68
68
|
unless resp.success?
|
69
69
|
error_class = ERROR_CLASSES.fetch(resp.status, ResponseError)
|
70
|
-
raise error_class.new("#{path} (#{resp.status})", response: resp)
|
70
|
+
raise error_class.new("#{path} (#{resp.status})", response: resp&.body)
|
71
71
|
end
|
72
72
|
MultiJson.load(resp.body)
|
73
73
|
end
|
data/lib/snov/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Petersen-Speelman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|