koala 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +6 -0
- data/lib/koala/api/graph_error_checker.rb +2 -1
- data/lib/koala/version.rb +1 -1
- data/spec/cases/graph_error_checker_spec.rb +6 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe8f0af88bb59626abb6b309322ed98a0e5f5faceca7931968f6ce8842451b0d
|
4
|
+
data.tar.gz: f813925e9a5905f34b27c95b45cef4ca282e12cee0e4a09db58160b8f5de2e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6b17b4a746648c7910b6c946178f62b3fc9aadd79439e82c61169ecb98a9f1e0e47c2d54fb4a9918b620431dce46a6340c5fa1317c809ee9c287a8a9f38a14b
|
7
|
+
data.tar.gz: 1ba2fcc4f6bb844c14dba797d49d4042d7e8cab78d53251a0c2e3b88edbfcb31512a27e4f3e62e2cd2da8174f7e381c87571887954121edc3119324464e1014c
|
data/changelog.md
CHANGED
@@ -15,6 +15,12 @@ Testing improvements:
|
|
15
15
|
|
16
16
|
Others:
|
17
17
|
|
18
|
+
v3.5.0 (2023-08-23)
|
19
|
+
======
|
20
|
+
|
21
|
+
Internal improvements:
|
22
|
+
* Raise ClientError instead of NoMethodError when body is 'null' ([#673](https://github.com/arsduo/koala/issues/673))
|
23
|
+
|
18
24
|
v3.4.0 (2023-01-05)
|
19
25
|
======
|
20
26
|
|
@@ -61,7 +61,8 @@ module Koala
|
|
61
61
|
# Normally, we start with the response body. If it isn't valid JSON, we start with an empty
|
62
62
|
# hash and fill it with error data.
|
63
63
|
@response_hash ||= begin
|
64
|
-
JSON.parse(body)
|
64
|
+
parsed_body = JSON.parse(body)
|
65
|
+
parsed_body.is_a?(Hash) ? parsed_body : {}
|
65
66
|
rescue JSON::ParserError
|
66
67
|
{}
|
67
68
|
end
|
data/lib/koala/version.rb
CHANGED
@@ -63,6 +63,12 @@ module Koala
|
|
63
63
|
expect(error.response_body).to eq(body)
|
64
64
|
end
|
65
65
|
|
66
|
+
it "returns a ClientError if the body is null" do
|
67
|
+
body.replace("null")
|
68
|
+
expect(error).to be_a(ClientError)
|
69
|
+
expect(error.response_body).to eq(body)
|
70
|
+
end
|
71
|
+
|
66
72
|
it "adds error data from the body" do
|
67
73
|
error_data = {
|
68
74
|
"type" => "FB error type",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Koppel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -158,7 +158,7 @@ homepage: http://github.com/arsduo/koala
|
|
158
158
|
licenses:
|
159
159
|
- MIT
|
160
160
|
metadata: {}
|
161
|
-
post_install_message:
|
161
|
+
post_install_message:
|
162
162
|
rdoc_options:
|
163
163
|
- "--line-numbers"
|
164
164
|
- "--inline-source"
|
@@ -177,8 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
|
-
rubygems_version: 3.
|
181
|
-
signing_key:
|
180
|
+
rubygems_version: 3.4.0.dev
|
181
|
+
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: A lightweight, flexible library for Facebook with support for the Graph API,
|
184
184
|
the REST API, realtime updates, and OAuth authentication.
|