gibbon 4.0.1 → 4.1.1

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: 421fe35f5c093158bac5d59d0a684325e8b77888257b6758fd805d9c86608520
4
- data.tar.gz: cd15c1fa018171363d7fe32c6dddbe14e14985ed02ca1cbdcb313240e39c1640
3
+ metadata.gz: 03c53ed2d53ab67b1eb57e172b588844a8f58933e42b0e1ec082d89fe2c3f5fa
4
+ data.tar.gz: 96dd6b830075c0abf1e2d22d9937ccc99aba546c8168cbc0e35a72da2bc98334
5
5
  SHA512:
6
- metadata.gz: 0da6bfbdd8f9bff5ffbeac3943f3c3f571204b9a38869dfa2e75cba7bc1ba2863aa7dcdcb82e3167b54ed9dd0222d118a7b74606b2d7d8f92ec8fc8681529d24
7
- data.tar.gz: 0ff34fa92007f022b7faf7368cf1285ed995efa43e964b0328928e8c466bc1661d0cdc0a32f0fed612e4cb5d54deaba74dfdfecae5dc264e4215ddb4bfc39ddf
6
+ metadata.gz: bb64ec1e82f6106b597c1303dbea2bac8b5b6fd493d20a79a72421b01dd89583141ff1decd72bd2ea1172151258dc9474aedeefb805881e787e822b6fd9027a0
7
+ data.tar.gz: b2d40dcca0dfad041330e8c2dafe6b7072796109230ef8f11cb0e90bebabde4be06981a335ec1ab0aaa3118af568c6bd1b9257d9f0bedb768379ed1818137d08
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: ['3.1', '3.2', '3.3', '3.4', '4.0']
11
+ ruby: ['3.2', '3.3', '3.4', '4.0']
12
12
  steps:
13
13
  - uses: actions/checkout@v5
14
14
  - uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [4.1.1] - 2026-11-08
2
+ - Use the current MultiJSON API for JSON serialization, parsing, and parse errors to eliminate deprecation warnings and prepare for MultiJSON 2.0 (#330).
3
+ - Preserve Gibbon's public `symbolize_keys` option while passing `symbolize_names` to MultiJSON internally.
4
+
5
+ ## [4.1.0] - 2026-11-02
6
+ - Require Ruby 3.2+ (drops support for EOL Ruby 3.1)
7
+ - Require `multi_json` 1.21.2+, whose JSON adapter supports `json` 3.x, and remove the `json < 3.0` constraint added in 4.0.1
8
+ - Update CI matrix to Ruby 3.2 through 4.0
9
+
1
10
  ## [4.0.1] - 2026-10-23
2
11
  - Honor explicit `false` instance overrides for `symbolize_keys` and `debug`, while preserving class defaults for omitted options and `nil`.
3
12
  - Constrain `json` to versions below 3.0 to preserve compatibility with the `multi_json` adapter available on Ruby 3.1.
data/README.markdown CHANGED
@@ -24,10 +24,10 @@ gem "gibbon"
24
24
 
25
25
  ## Requirements
26
26
 
27
- * **Ruby 3.1 or newer.** Gibbon 4.0 dropped support for Ruby 2.4 through 3.0.
27
+ * **Ruby 3.2 or newer.** Gibbon 4.1 dropped support for Ruby 3.1; Gibbon 4.0 dropped support for Ruby 2.4 through 3.0.
28
28
  * A MailChimp account and API key. You can see your API keys [here](https://admin.mailchimp.com/account/api).
29
29
 
30
- Gibbon depends on [Faraday](https://github.com/lostisland/faraday) (both 1.x and 2.x are supported) and [MultiJson](https://github.com/intridea/multi_json). Connections to MailChimp negotiate TLS 1.2 or newer.
30
+ Gibbon depends on [Faraday](https://github.com/lostisland/faraday) (both 1.x and 2.x are supported) and [MultiJSON](https://github.com/sferik/multi_json). Connections to MailChimp negotiate TLS 1.2 or newer.
31
31
 
32
32
  ## Usage
33
33
 
@@ -508,6 +508,13 @@ Gibbon also raises `Gibbon::MailChimpError` when a *successful* response body is
508
508
 
509
509
  Full release history lives in the [CHANGELOG](CHANGELOG.md). The breaking changes are summarized here.
510
510
 
511
+ ### Upgrading to 4.1
512
+
513
+ Gibbon 4.1 contains no API changes. It changes what it runs on:
514
+
515
+ * **Ruby 3.2 or newer is required.** Ruby 3.1 is EOL and is no longer supported. If you are on Ruby 3.1, stay on Gibbon 4.0.1.
516
+ * **MultiJSON 1.21.2 or newer is required**, and Gibbon no longer constrains the `json` gem. This lets you use `json` 3.x.
517
+
511
518
  ### Upgrading to 4.0
512
519
 
513
520
  Gibbon 4.0 contains no API changes. It changes what it runs on:
data/gibbon.gemspec CHANGED
@@ -23,13 +23,11 @@ Gem::Specification.new do |s|
23
23
  s.files = `git ls-files`.split("\n")
24
24
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
25
  s.require_paths = ["lib"]
26
- s.required_ruby_version = '>= 3.1.0'
26
+ s.required_ruby_version = '>= 3.2.0'
27
27
 
28
28
  s.add_dependency('faraday', '>= 1.0')
29
- s.add_dependency('multi_json', '>= 1.11.0')
30
- # Ruby 3.1 uses multi_json <= 1.19.1, whose JSON adapter passes options
31
- # positionally. JSON 3 requires keyword arguments.
32
- s.add_dependency('json', '< 3.0')
29
+ # 1.21.2 is the first release whose JSON adapter supports json 3.x.
30
+ s.add_dependency('multi_json', '>= 1.21.2')
33
31
 
34
32
  s.add_development_dependency 'rake'
35
33
  s.add_development_dependency "rspec", "~> 3.13"
@@ -23,7 +23,7 @@ module Gibbon
23
23
 
24
24
  begin
25
25
  response = self.rest_client.post do |request|
26
- configure_request(request: request, params: params, headers: headers, body: MultiJson.dump(body))
26
+ configure_request(request: request, params: params, headers: headers, body: MultiJSON.generate(body))
27
27
  end
28
28
  parse_response(response)
29
29
  rescue => e
@@ -39,7 +39,7 @@ module Gibbon
39
39
 
40
40
  begin
41
41
  response = self.rest_client.patch do |request|
42
- configure_request(request: request, params: params, headers: headers, body: MultiJson.dump(body))
42
+ configure_request(request: request, params: params, headers: headers, body: MultiJSON.generate(body))
43
43
  end
44
44
  parse_response(response)
45
45
  rescue => e
@@ -55,7 +55,7 @@ module Gibbon
55
55
 
56
56
  begin
57
57
  response = self.rest_client.put do |request|
58
- configure_request(request: request, params: params, headers: headers, body: MultiJson.dump(body))
58
+ configure_request(request: request, params: params, headers: headers, body: MultiJSON.generate(body))
59
59
  end
60
60
  parse_response(response)
61
61
  rescue => e
@@ -142,7 +142,7 @@ module Gibbon
142
142
  error_params[:status_code] = error.response[:status]
143
143
  error_params[:raw_body] = error.response[:body]
144
144
 
145
- parsed_response = MultiJson.load(error.response[:body], symbolize_keys: symbolize_keys)
145
+ parsed_response = MultiJSON.parse(error.response[:body], symbolize_names: symbolize_keys)
146
146
 
147
147
  if parsed_response
148
148
  error_params[:body] = parsed_response
@@ -155,7 +155,7 @@ module Gibbon
155
155
  end
156
156
 
157
157
  end
158
- rescue MultiJson::ParseError
158
+ rescue MultiJSON::ParseError
159
159
  end
160
160
 
161
161
  error_to_raise = MailChimpError.new(error.message, error_params)
@@ -198,9 +198,9 @@ module Gibbon
198
198
  if response.body && !response.body.empty?
199
199
  begin
200
200
  headers = response.headers
201
- body = MultiJson.load(response.body, symbolize_keys: symbolize_keys)
201
+ body = MultiJSON.parse(response.body, symbolize_names: symbolize_keys)
202
202
  parsed_response = Response.new(headers: headers, body: body)
203
- rescue MultiJson::ParseError
203
+ rescue MultiJSON::ParseError
204
204
  error_params = { title: "UNPARSEABLE_RESPONSE", status_code: 500 }
205
205
  error = MailChimpError.new("Unparseable response: #{response.body}", error_params)
206
206
  raise error
@@ -1,4 +1,4 @@
1
1
  module Gibbon
2
2
  # The released version of the gem.
3
- VERSION = "4.0.1"
3
+ VERSION = "4.1.1"
4
4
  end
@@ -89,7 +89,7 @@ describe Gibbon::APIRequest do
89
89
  expect(e.title).to eq "Invalid Resource"
90
90
  expect(e.detail).to eq "The resource submitted could not be validated."
91
91
  expect(e.raw_body).to eq error_body
92
- expect(e.body).to eq MultiJson.load(error_body)
92
+ expect(e.body).to eq MultiJSON.parse(error_body)
93
93
  end
94
94
  end
95
95
 
@@ -57,7 +57,7 @@ describe Gibbon::Request do
57
57
 
58
58
  it "maps create to POST" do
59
59
  stub = stub_request(:post, "#{api_root}/lists")
60
- .with(body: MultiJson.dump(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
60
+ .with(body: MultiJSON.generate(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
61
61
  .to_return(status: 200)
62
62
  @gibbon.lists.create(body: body)
63
63
  expect(stub).to have_been_requested
@@ -65,7 +65,7 @@ describe Gibbon::Request do
65
65
 
66
66
  it "maps update to PATCH" do
67
67
  stub = stub_request(:patch, "#{api_root}/lists/list123")
68
- .with(body: MultiJson.dump(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
68
+ .with(body: MultiJSON.generate(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
69
69
  .to_return(status: 200)
70
70
  @gibbon.lists("list123").update(body: body)
71
71
  expect(stub).to have_been_requested
@@ -73,7 +73,7 @@ describe Gibbon::Request do
73
73
 
74
74
  it "maps upsert to PUT" do
75
75
  stub = stub_request(:put, "#{api_root}/lists/list123")
76
- .with(body: MultiJson.dump(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
76
+ .with(body: MultiJSON.generate(body), basic_auth: basic_auth_credentials, headers: { 'Content-Type' => 'application/json' })
77
77
  .to_return(status: 200)
78
78
  @gibbon.lists("list123").upsert(body: body)
79
79
  expect(stub).to have_been_requested
@@ -18,7 +18,7 @@ describe Gibbon do
18
18
 
19
19
  it 'supports upsert request' do
20
20
  stub_request(:put, "https://us1.api.mailchimp.com/3.0/lists/#{list_id}/members/#{member_id}")
21
- .with(body: MultiJson.dump(request_body), basic_auth: ['apikey', '1234-us1'])
21
+ .with(body: MultiJSON.generate(request_body), basic_auth: ['apikey', '1234-us1'])
22
22
  .to_return(status: 200)
23
23
 
24
24
  Gibbon::Request.new(api_key: api_key)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gibbon
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amro Mousa
@@ -29,28 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.11.0
32
+ version: 1.21.2
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 1.11.0
40
- - !ruby/object:Gem::Dependency
41
- name: json
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '3.0'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "<"
52
- - !ruby/object:Gem::Version
53
- version: '3.0'
39
+ version: 1.21.2
54
40
  - !ruby/object:Gem::Dependency
55
41
  name: rake
56
42
  requirement: !ruby/object:Gem::Requirement
@@ -159,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
145
  requirements:
160
146
  - - ">="
161
147
  - !ruby/object:Gem::Version
162
- version: 3.1.0
148
+ version: 3.2.0
163
149
  required_rubygems_version: !ruby/object:Gem::Requirement
164
150
  requirements:
165
151
  - - ">="
166
152
  - !ruby/object:Gem::Version
167
153
  version: '0'
168
154
  requirements: []
169
- rubygems_version: 4.0.20
155
+ rubygems_version: 4.0.23
170
156
  specification_version: 4
171
157
  summary: A wrapper for MailChimp API 3.0
172
158
  test_files: []