mailchimp3 1.3.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailchimp3/endpoint.rb +5 -1
- data/lib/mailchimp3/version.rb +1 -1
- data/spec/mailchimp3/endpoint_spec.rb +11 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4384d48096f975c34151d557e5bd7a35dcc2d346a4320c6cd5a00537562d0e8
|
4
|
+
data.tar.gz: 9e9f15e7e4557be4ee1f838e9970685e919fffe471784ff4b344883d52c046ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f3b3ef343cf148466b722002c4687afb3e2a913ec608bd9cb081314eecc7f0e8125daf294868160a5135bbbc67bfebe85c99fc5cfe847ce633907f422aa7317
|
7
|
+
data.tar.gz: 848bce52776ccad5e21c4075c3927a73d70986a16694bbf13c2acbd23ec1ffb5119e47b2299be0275652783f5019a7571c7b7d774b1a7910e8037c92dcb8cfd6
|
data/lib/mailchimp3/endpoint.rb
CHANGED
@@ -34,7 +34,11 @@ module MailChimp3
|
|
34
34
|
body[:apikey] = @oauth_access_token || @basic_auth_key if @version == 2
|
35
35
|
req.body = body.to_json
|
36
36
|
end
|
37
|
-
|
37
|
+
if @last_result.status == 204
|
38
|
+
true
|
39
|
+
else
|
40
|
+
_build_response(@last_result)
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
def patch(body = {})
|
data/lib/mailchimp3/version.rb
CHANGED
@@ -167,6 +167,17 @@ describe MailChimp3::Endpoint do
|
|
167
167
|
end
|
168
168
|
end
|
169
169
|
end
|
170
|
+
|
171
|
+
context 'when the response is 204' do
|
172
|
+
before do
|
173
|
+
stub_request(:post, 'https://us2.api.mailchimp.com/3.0/lists')
|
174
|
+
.to_return(status: 204, body: nil, headers: { 'Content-Type' => 'application/json; charset=utf-8' })
|
175
|
+
end
|
176
|
+
|
177
|
+
it 'returns true' do
|
178
|
+
expect(subject.post(resource)).to eq(true)
|
179
|
+
end
|
180
|
+
end
|
170
181
|
end
|
171
182
|
|
172
183
|
describe '#patch' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailchimp3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: excon
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.71.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.71.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: oauth2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
135
|
+
rubygems_version: 3.1.2
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: wrapper for MailChimp's 3.0 API
|