koala 3.6.0 → 3.8.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/.github/workflows/test.yml +3 -7
- data/Gemfile +1 -1
- data/changelog.md +25 -0
- data/koala.gemspec +3 -1
- data/lib/koala/api/graph_collection.rb +1 -0
- data/lib/koala/http_service/response.rb +1 -3
- data/lib/koala/version.rb +1 -1
- data/readme.md +1 -1
- data/spec/cases/api_spec.rb +1 -1
- data/spec/cases/graph_error_checker_spec.rb +1 -1
- data/spec/cases/http_service_spec.rb +18 -6
- data/spec/support/koala_test.rb +0 -1
- metadata +36 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7def64234f69cecf21daeb0c68586e30bf910897b7098afb12ab5f8e4d282400
|
|
4
|
+
data.tar.gz: fa72dede2aa3d5e1514e65b19bed263eb83494135b128c47e2125d842ed9f53c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9efc998919b1a31fc4692c35662408f02af1b22d431ddbaa6afc59c28a5aecfc328a90417d7a076d84ae3ddfdbf2882a47bebfa05607c5f8932995787193f8c
|
|
7
|
+
data.tar.gz: 1d8257c635cb709bf4fb99b1405605bfc3b3ad07e92e763d1d8d950b0ecd041979983326a3b1dbc6ec02f533869add21b568c500b250e0e26ccda2ee42b4b7a5
|
data/.github/workflows/test.yml
CHANGED
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
strategy:
|
|
11
11
|
fail-fast: false
|
|
12
12
|
matrix:
|
|
13
|
-
ruby: [2.7, "3.0", 3.1, 3.2, 3.3, head]
|
|
13
|
+
ruby: [2.7, "3.0", 3.1, 3.2, 3.3, 3.4, head]
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
- name: Checkout repository
|
|
@@ -24,9 +24,5 @@ jobs:
|
|
|
24
24
|
- name: Install dependencies
|
|
25
25
|
run: bundle install --jobs 4 --retry 3
|
|
26
26
|
|
|
27
|
-
- name:
|
|
28
|
-
|
|
29
|
-
env:
|
|
30
|
-
CC_TEST_REPORTER_ID: 7af99d9225b4c14640f9ec3cb2e24d2f7103ac49417b0bd989188fb6c25f2909
|
|
31
|
-
with:
|
|
32
|
-
coverageCommand: bundle exec rspec
|
|
27
|
+
- name: Run specs
|
|
28
|
+
run: bundle exec rspec
|
data/Gemfile
CHANGED
|
@@ -15,7 +15,7 @@ end
|
|
|
15
15
|
|
|
16
16
|
group :test do
|
|
17
17
|
gem "rspec", "~> 3.0", "< 3.10" # resrict rspec version until https://github.com/rspec/rspec-support/pull/537 gets merged
|
|
18
|
-
gem "vcr", github: 'vcr/vcr', ref: '
|
|
18
|
+
gem "vcr", github: 'vcr/vcr', ref: 'ce35c236fe48899f02ddf780973b44cdb756c0ee' # needs https://github.com/vcr/vcr/issues/1057 for ruby 3.5
|
|
19
19
|
gem "webmock"
|
|
20
20
|
gem "simplecov"
|
|
21
21
|
end
|
data/changelog.md
CHANGED
|
@@ -15,6 +15,31 @@ Testing improvements:
|
|
|
15
15
|
|
|
16
16
|
Others:
|
|
17
17
|
|
|
18
|
+
v3.8.0 (2026-10-25)
|
|
19
|
+
==========
|
|
20
|
+
|
|
21
|
+
Updated features:
|
|
22
|
+
|
|
23
|
+
* Support json 3 by no longer passing the removed `quirks_mode` option to `JSON.parse` (json >= 2.0 is now required)
|
|
24
|
+
|
|
25
|
+
Testing improvements:
|
|
26
|
+
|
|
27
|
+
* Remove obsolete Code Climate coverage reporting from CI
|
|
28
|
+
|
|
29
|
+
v3.7.0 (2025-08-27)
|
|
30
|
+
==========
|
|
31
|
+
|
|
32
|
+
Internal improvements:
|
|
33
|
+
|
|
34
|
+
* explicitly require ostruct for ruby >= 3.3.5 ([694](https://github.com/arsduo/koala/pull/694))
|
|
35
|
+
* explicitly require cgi for ruby >= 3.5.0 ([702](https://github.com/arsduo/koala/pull/702))
|
|
36
|
+
|
|
37
|
+
Testing improvements:
|
|
38
|
+
|
|
39
|
+
* Add ruby 3.4 to CI ([696](https://github.com/arsduo/koala/pull/696))
|
|
40
|
+
* Fix json assertions in CI ([701](https://github.com/arsduo/koala/pull/701))
|
|
41
|
+
* Fix ruby 3.5 CI ([702](https://github.com/arsduo/koala/pull/702))
|
|
42
|
+
|
|
18
43
|
v3.6.0 (2024-06-27)
|
|
19
44
|
==========
|
|
20
45
|
|
data/koala.gemspec
CHANGED
|
@@ -26,7 +26,9 @@ Gem::Specification.new do |gem|
|
|
|
26
26
|
gem.add_runtime_dependency("faraday")
|
|
27
27
|
gem.add_runtime_dependency("faraday-multipart")
|
|
28
28
|
gem.add_runtime_dependency("addressable")
|
|
29
|
-
gem.add_runtime_dependency("json", ">=
|
|
29
|
+
gem.add_runtime_dependency("json", ">= 2.0")
|
|
30
30
|
gem.add_runtime_dependency("rexml")
|
|
31
31
|
gem.add_runtime_dependency("base64")
|
|
32
|
+
gem.add_runtime_dependency("ostruct")
|
|
33
|
+
gem.add_runtime_dependency("cgi")
|
|
32
34
|
end
|
|
@@ -11,9 +11,7 @@ module Koala
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def data
|
|
14
|
-
|
|
15
|
-
# in Ruby 2.4 we can drop that.
|
|
16
|
-
@data ||= JSON.parse(body, quirks_mode: true) unless body.empty?
|
|
14
|
+
@data ||= JSON.parse(body) unless body.empty?
|
|
17
15
|
end
|
|
18
16
|
end
|
|
19
17
|
end
|
data/lib/koala/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Koala [](https://rubygems.org/gems/koala) [](http://travis-ci.org/arsduo/koala)
|
|
1
|
+
Koala [](https://rubygems.org/gems/koala) [](http://travis-ci.org/arsduo/koala)
|
|
2
2
|
====
|
|
3
3
|
[Koala](http://github.com/arsduo/koala) is a Facebook library for Ruby, supporting the Graph API (including the batch requests and photo uploads), the Marketing API, the Atlas API, realtime updates, test users, and OAuth validation. We wrote Koala with four goals:
|
|
4
4
|
|
data/spec/cases/api_spec.rb
CHANGED
|
@@ -345,7 +345,7 @@ describe "Koala::Facebook::API" do
|
|
|
345
345
|
response = Koala::HTTPService::Response.new(200, result.to_json, { "x-ad-account-usage" => "{\"acc_id_util_pct\"9.67}"})
|
|
346
346
|
allow(Koala).to receive(:make_request).and_return(response)
|
|
347
347
|
|
|
348
|
-
expect(Koala::Utils.logger).to receive(:error).with(
|
|
348
|
+
expect(Koala::Utils.logger).to receive(:error).with("JSON::ParserError: expected ':' after object key at line 1 column 19 while parsing x-ad-account-usage = {\"acc_id_util_pct\"9.67}")
|
|
349
349
|
api.graph_call('anything')
|
|
350
350
|
end
|
|
351
351
|
|
|
@@ -112,7 +112,7 @@ module Koala
|
|
|
112
112
|
"x-app-usage" => '{invalid:json}'
|
|
113
113
|
)
|
|
114
114
|
|
|
115
|
-
expect(Koala::Utils.logger).to receive(:error).with(
|
|
115
|
+
expect(Koala::Utils.logger).to receive(:error).with("JSON::ParserError: expected object key, got 'invalid:json}' at line 1 column 2 while parsing x-app-usage = {invalid:json}")
|
|
116
116
|
expect(error.fb_app_usage).to eq(nil)
|
|
117
117
|
end
|
|
118
118
|
|
|
@@ -238,8 +238,12 @@ describe Koala::HTTPService do
|
|
|
238
238
|
it 'logs tokens' do
|
|
239
239
|
allow(Koala.config).to receive(:mask_tokens) { false }
|
|
240
240
|
|
|
241
|
-
expect(Koala::Utils).to receive(:debug)
|
|
242
|
-
|
|
241
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
242
|
+
expect(log).to match(/STARTED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleaccesstoken"}/)
|
|
243
|
+
end
|
|
244
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
245
|
+
expect(log).to match(/FINISHED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleaccesstoken"}/)
|
|
246
|
+
end
|
|
243
247
|
|
|
244
248
|
Koala::HTTPService.make_request(request)
|
|
245
249
|
end
|
|
@@ -247,8 +251,12 @@ describe Koala::HTTPService do
|
|
|
247
251
|
it 'doesnt log tokens' do
|
|
248
252
|
allow(Koala.config).to receive(:mask_tokens) { true }
|
|
249
253
|
|
|
250
|
-
expect(Koala::Utils).to receive(:debug)
|
|
251
|
-
|
|
254
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
255
|
+
expect(log).to match(/STARTED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleac[*]{5}token"}/)
|
|
256
|
+
end
|
|
257
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
258
|
+
expect(log).to match(/FINISHED => GET: \/foo params: {"an"\s?=>\s?:arg, "access_token"\s?=>\s?"myvisbleac[*]{5}token"}/)
|
|
259
|
+
end
|
|
252
260
|
|
|
253
261
|
Koala::HTTPService.make_request(request)
|
|
254
262
|
end
|
|
@@ -258,8 +266,12 @@ describe Koala::HTTPService do
|
|
|
258
266
|
|
|
259
267
|
allow(Koala.config).to receive(:mask_tokens) { true }
|
|
260
268
|
|
|
261
|
-
expect(Koala::Utils).to receive(:debug)
|
|
262
|
-
|
|
269
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
270
|
+
expect(log).to match(/STARTED => GET: \/debug_token params: {"input_token"\s?=>\s?"myvisiblea[*]{5}token", "access_token"\s?=>\s?"myvisiblea[*]{5}token"}/)
|
|
271
|
+
end
|
|
272
|
+
expect(Koala::Utils).to receive(:debug) do |log|
|
|
273
|
+
expect(log).to match(/FINISHED => GET: \/debug_token params: {"input_token"\s?=>\s?"myvisiblea[*]{5}token", "access_token"\s?=>\s?"myvisiblea[*]{5}token"}/)
|
|
274
|
+
end
|
|
263
275
|
|
|
264
276
|
Koala::HTTPService.make_request(request)
|
|
265
277
|
end
|
data/spec/support/koala_test.rb
CHANGED
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.8.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:
|
|
11
|
+
date: 2026-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -58,14 +58,14 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
61
|
+
version: '2.0'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
68
|
+
version: '2.0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rexml
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -94,6 +94,34 @@ dependencies:
|
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: ostruct
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :runtime
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: cgi
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0'
|
|
118
|
+
type: :runtime
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
97
125
|
description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write
|
|
98
126
|
access to the social graph via the Graph and REST APIs, as well as support for realtime
|
|
99
127
|
updates and OAuth and Facebook Connect authentication. Koala is fully tested and
|
|
@@ -172,7 +200,7 @@ homepage: http://github.com/arsduo/koala
|
|
|
172
200
|
licenses:
|
|
173
201
|
- MIT
|
|
174
202
|
metadata: {}
|
|
175
|
-
post_install_message:
|
|
203
|
+
post_install_message:
|
|
176
204
|
rdoc_options:
|
|
177
205
|
- "--line-numbers"
|
|
178
206
|
- "--inline-source"
|
|
@@ -191,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
219
|
- !ruby/object:Gem::Version
|
|
192
220
|
version: '0'
|
|
193
221
|
requirements: []
|
|
194
|
-
rubygems_version: 3.
|
|
195
|
-
signing_key:
|
|
222
|
+
rubygems_version: 3.4.19
|
|
223
|
+
signing_key:
|
|
196
224
|
specification_version: 4
|
|
197
225
|
summary: A lightweight, flexible library for Facebook with support for the Graph API,
|
|
198
226
|
the REST API, realtime updates, and OAuth authentication.
|