koala 3.6.0 → 3.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27591b64021ee915c13d9bcea2763739c2c86ce04d961dd5b540d964515a9905
4
- data.tar.gz: 4a8c184674f681b193a3686b4eeb0023da0c00765d60be9694af9098014dacfd
3
+ metadata.gz: cacc94480f8090c1c5380856b9315897e46b23b907efd411ab937d0c090d15ab
4
+ data.tar.gz: da676d048bd4d57e41eccef84cd72f7793ecad5e591728bac7ba45c51e01bb93
5
5
  SHA512:
6
- metadata.gz: 78e4a3d670c3524211d438b8b67713f3f27cc0638aee6660b544b8b3b83a99397546a96ae826c6d613a1b6799184894c816b95008dc6083689f866357ae7ae13
7
- data.tar.gz: 7a135a41f63d84e7e4f6c68632574eb19140aaf32ea9d9220bb2aaa4c79c50097c7ee1c957f7e9740d6b2c1141b5d24ebffdb47edd510c28bd7590f3cc09bf4f
6
+ metadata.gz: 709df731e154734f941caba0b9df74aa3c0201f1e769bed433947e4dc54e6c3c27396560dfcaedd6eccaaa5d2d3a02f01b7d09e934ad70e97d7f37f766794efd
7
+ data.tar.gz: 9d15308a886501cedd51422a76a5e38e72b453ecfe0a067337b773b790c4a483cfc9c164c0299b62ca3f0cda0833201409b8e4dbdfbb934906df00888ef73516
@@ -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
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: '8ced6c96e01737a418cd270e0382a8c2c6d85f7f' # needs https://github.com/vcr/vcr/pull/907 for ruby 3.1
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,20 @@ Testing improvements:
15
15
 
16
16
  Others:
17
17
 
18
+ v3.7.0 (2025-08-27)
19
+ ==========
20
+
21
+ Internal improvements:
22
+
23
+ * explicitly require ostruct for ruby >= 3.3.5 ([694](https://github.com/arsduo/koala/pull/694))
24
+ * explicitly require cgi for ruby >= 3.5.0 ([702](https://github.com/arsduo/koala/pull/702))
25
+
26
+ Testing improvements:
27
+
28
+ * Add ruby 3.4 to CI ([696](https://github.com/arsduo/koala/pull/696))
29
+ * Fix json assertions in CI ([701](https://github.com/arsduo/koala/pull/701))
30
+ * Fix ruby 3.5 CI ([702](https://github.com/arsduo/koala/pull/702))
31
+
18
32
  v3.6.0 (2024-06-27)
19
33
  ==========
20
34
 
data/koala.gemspec CHANGED
@@ -29,4 +29,6 @@ Gem::Specification.new do |gem|
29
29
  gem.add_runtime_dependency("json", ">= 1.8")
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
@@ -1,4 +1,5 @@
1
1
  require 'addressable/uri'
2
+ require 'cgi'
2
3
 
3
4
  module Koala
4
5
  module Facebook
data/lib/koala/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Koala
2
- VERSION = "3.6.0"
2
+ VERSION = "3.7.0"
3
3
  end
@@ -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(/JSON::ParserError:.*unexpected token at '{"acc_id_util_pct"9.67}' while parsing x-ad-account-usage = {"acc_id_util_pct"9.67}/)
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(/JSON::ParserError:.*unexpected token at '{invalid:json}' while parsing x-app-usage = {invalid:json}/)
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).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
242
- expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
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).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
251
- expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
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).with('STARTED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
262
- expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
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
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koala
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Koppel
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -94,6 +93,34 @@ dependencies:
94
93
  - - ">="
95
94
  - !ruby/object:Gem::Version
96
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: ostruct
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: cgi
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
97
124
  description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write
98
125
  access to the social graph via the Graph and REST APIs, as well as support for realtime
99
126
  updates and OAuth and Facebook Connect authentication. Koala is fully tested and
@@ -103,8 +130,8 @@ email: alex@alexkoppel.com
103
130
  executables: []
104
131
  extensions: []
105
132
  extra_rdoc_files:
106
- - readme.md
107
133
  - changelog.md
134
+ - readme.md
108
135
  files:
109
136
  - ".github/workflows/test.yml"
110
137
  - ".gitignore"
@@ -172,7 +199,6 @@ homepage: http://github.com/arsduo/koala
172
199
  licenses:
173
200
  - MIT
174
201
  metadata: {}
175
- post_install_message:
176
202
  rdoc_options:
177
203
  - "--line-numbers"
178
204
  - "--inline-source"
@@ -191,8 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
217
  - !ruby/object:Gem::Version
192
218
  version: '0'
193
219
  requirements: []
194
- rubygems_version: 3.3.26
195
- signing_key:
220
+ rubygems_version: 3.8.0.dev
196
221
  specification_version: 4
197
222
  summary: A lightweight, flexible library for Facebook with support for the Graph API,
198
223
  the REST API, realtime updates, and OAuth authentication.