contentful 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/contentful/resource.rb +1 -1
- data/lib/contentful/version.rb +1 -1
- data/spec/entry_spec.rb +12 -0
- data/spec/fixtures/vcr_cassettes/entries/issue_117.yml +201 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0282a011ae90a4b76aad56ea87739191d7cfad3
|
4
|
+
data.tar.gz: 1a07148812c1bc8bb976f03e1816a5070790d880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d2ad17326e6bdd452b49bf20494a54b19667b14e31962abdbc07864de7bf0e77ce5cf31ddb91cbf6bf0f396382ec30d2fdb3c6bd4ff8bd5123b1a0fd0abe83
|
7
|
+
data.tar.gz: 8f906415d0e28f43e6a996eb5caf68f2885ff605ad56a4fa9688ab612378a006ddac539dd190a6d956cd1572f6c4bbbe1d6a337cc456b45c6ff35bdaf177b4bc
|
data/CHANGELOG.md
CHANGED
data/lib/contentful/resource.rb
CHANGED
data/lib/contentful/version.rb
CHANGED
data/spec/entry_spec.rb
CHANGED
@@ -313,4 +313,16 @@ describe Contentful::Entry do
|
|
313
313
|
end
|
314
314
|
end
|
315
315
|
end
|
316
|
+
|
317
|
+
describe 'issues' do
|
318
|
+
it 'Symbol/Text field with null values should be serialized as nil - #117' do
|
319
|
+
vcr('entries/issue_117') {
|
320
|
+
client = create_client(space: '8jbbayggj9gj', access_token: '4ce0108f04e55c76476ba84ab0e6149734db73d67cd1b429323ef67f00977e07', dynamic_entries: :auto)
|
321
|
+
entry = client.entries.first
|
322
|
+
|
323
|
+
expect(entry.nil).to be_nil
|
324
|
+
expect(entry.nil).not_to eq ''
|
325
|
+
}
|
326
|
+
end
|
327
|
+
end
|
316
328
|
end
|
@@ -0,0 +1,201 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/8jbbayggj9gj/content_types?limit=1000
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/1.2.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 4ce0108f04e55c76476ba84ab0e6149734db73d67cd1b429323ef67f00977e07
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- cdn.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Access-Control-Allow-Headers:
|
28
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
29
|
+
Access-Control-Allow-Methods:
|
30
|
+
- GET,HEAD,OPTIONS
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Etag
|
35
|
+
Access-Control-Max-Age:
|
36
|
+
- '86400'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0
|
39
|
+
Content-Encoding:
|
40
|
+
- gzip
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.delivery.v1+json
|
43
|
+
Etag:
|
44
|
+
- W/"d02c518f396fb5eb186d791cf1cc57cb"
|
45
|
+
Server:
|
46
|
+
- Contentful
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
- nosniff
|
50
|
+
X-Contentful-Request-Id:
|
51
|
+
- d68e2dbfc63f32d5054ac63537e8d03e
|
52
|
+
Content-Length:
|
53
|
+
- '375'
|
54
|
+
Accept-Ranges:
|
55
|
+
- bytes
|
56
|
+
Date:
|
57
|
+
- Tue, 03 Jan 2017 11:34:30 GMT
|
58
|
+
Via:
|
59
|
+
- 1.1 varnish
|
60
|
+
Age:
|
61
|
+
- '5788'
|
62
|
+
Connection:
|
63
|
+
- close
|
64
|
+
X-Served-By:
|
65
|
+
- cache-gru7126-GRU
|
66
|
+
X-Cache:
|
67
|
+
- HIT
|
68
|
+
X-Cache-Hits:
|
69
|
+
- '1'
|
70
|
+
X-Timer:
|
71
|
+
- S1483443270.292050,VS0,VE0
|
72
|
+
Vary:
|
73
|
+
- Accept-Encoding
|
74
|
+
body:
|
75
|
+
encoding: ASCII-8BIT
|
76
|
+
string: !binary |-
|
77
|
+
H4sIAAAAAAAAA9VTvW7CMBDeeQrkuVQmUkXLhqp2qlhgasXgJAYdOI5rm0ou
|
78
|
+
4t3rs0lwUhi6US/J3fm+n7vkMBgOiXGGTIcH/+oD6xT3EZlpzRzxueMd3rG1
|
79
|
+
ZcLnxyEyO1A+oCEQUIHFEqUxAZZXiPgRECNujyZQGcUK5GpuxGQiBhMh2Yh6
|
80
|
+
A7kjSHo+nl7ulifRi4DYuwAl+nnc5jlzm832abNFW805tu/BaDwk9lhubILW
|
81
|
+
yniupeXSBtakqdCcWV7OcBgko+PJiI5HNFtmdEon0+zh3k/oPW3Yq/JvDZp/
|
82
|
+
gYFa4rRPYlvVpASjBHOvwEVwLFl1lhcjn12mnkjJTaFB2YhJWnFkjSjnJeJY
|
83
|
+
OmuKA+pQ4J2WZp6Sh0qzw4Wr8lp0lkREXTAB3xx1r5kwPF0h0fxzD/pK0btm
|
84
|
+
ubhSrP2X6TfSoF5a9QVXvFLWdQUGo356L79L/8eXhN7YG1fzfuGmPJ22tgpP
|
85
|
+
/F1Xg+PgB3EoeHC5BAAA
|
86
|
+
http_version:
|
87
|
+
recorded_at: Tue, 03 Jan 2017 11:34:30 GMT
|
88
|
+
- request:
|
89
|
+
method: get
|
90
|
+
uri: https://cdn.contentful.com/spaces/8jbbayggj9gj/entries
|
91
|
+
body:
|
92
|
+
encoding: US-ASCII
|
93
|
+
string: ''
|
94
|
+
headers:
|
95
|
+
User-Agent:
|
96
|
+
- RubyContentfulGem/1.2.1
|
97
|
+
Authorization:
|
98
|
+
- Bearer 4ce0108f04e55c76476ba84ab0e6149734db73d67cd1b429323ef67f00977e07
|
99
|
+
Content-Type:
|
100
|
+
- application/vnd.contentful.delivery.v1+json
|
101
|
+
Accept-Encoding:
|
102
|
+
- gzip
|
103
|
+
Connection:
|
104
|
+
- close
|
105
|
+
Host:
|
106
|
+
- cdn.contentful.com
|
107
|
+
response:
|
108
|
+
status:
|
109
|
+
code: 200
|
110
|
+
message: OK
|
111
|
+
headers:
|
112
|
+
Access-Control-Allow-Headers:
|
113
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
114
|
+
Access-Control-Allow-Methods:
|
115
|
+
- GET,HEAD,OPTIONS
|
116
|
+
Access-Control-Allow-Origin:
|
117
|
+
- "*"
|
118
|
+
Access-Control-Expose-Headers:
|
119
|
+
- Etag
|
120
|
+
Access-Control-Max-Age:
|
121
|
+
- '86400'
|
122
|
+
Cache-Control:
|
123
|
+
- max-age=0
|
124
|
+
Content-Type:
|
125
|
+
- application/vnd.contentful.delivery.v1+json
|
126
|
+
Etag:
|
127
|
+
- '"16bd1168ea8f89e34f0a4d2eb7e905c5"'
|
128
|
+
Server:
|
129
|
+
- Contentful
|
130
|
+
X-Content-Type-Options:
|
131
|
+
- nosniff
|
132
|
+
- nosniff
|
133
|
+
X-Contentful-Request-Id:
|
134
|
+
- 3e7f93d9d3d1ca80aa17f60fd8a644bc
|
135
|
+
Content-Length:
|
136
|
+
- '753'
|
137
|
+
Accept-Ranges:
|
138
|
+
- bytes
|
139
|
+
Date:
|
140
|
+
- Tue, 03 Jan 2017 11:34:30 GMT
|
141
|
+
Via:
|
142
|
+
- 1.1 varnish
|
143
|
+
Age:
|
144
|
+
- '5774'
|
145
|
+
Connection:
|
146
|
+
- close
|
147
|
+
X-Served-By:
|
148
|
+
- cache-gru7122-GRU
|
149
|
+
X-Cache:
|
150
|
+
- HIT
|
151
|
+
X-Cache-Hits:
|
152
|
+
- '1'
|
153
|
+
X-Timer:
|
154
|
+
- S1483443270.462614,VS0,VE0
|
155
|
+
Vary:
|
156
|
+
- Accept-Encoding
|
157
|
+
body:
|
158
|
+
encoding: ASCII-8BIT
|
159
|
+
string: |
|
160
|
+
{
|
161
|
+
"sys": {
|
162
|
+
"type": "Array"
|
163
|
+
},
|
164
|
+
"total": 1,
|
165
|
+
"skip": 0,
|
166
|
+
"limit": 100,
|
167
|
+
"items": [
|
168
|
+
{
|
169
|
+
"sys": {
|
170
|
+
"space": {
|
171
|
+
"sys": {
|
172
|
+
"type": "Link",
|
173
|
+
"linkType": "Space",
|
174
|
+
"id": "8jbbayggj9gj"
|
175
|
+
}
|
176
|
+
},
|
177
|
+
"id": "3vuP7wtireIWM2WO2oiw4u",
|
178
|
+
"type": "Entry",
|
179
|
+
"createdAt": "2017-01-02T20:07:37.872Z",
|
180
|
+
"updatedAt": "2017-01-03T09:57:26.558Z",
|
181
|
+
"revision": 3,
|
182
|
+
"contentType": {
|
183
|
+
"sys": {
|
184
|
+
"type": "Link",
|
185
|
+
"linkType": "ContentType",
|
186
|
+
"id": "test"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"locale": "en-US"
|
190
|
+
},
|
191
|
+
"fields": {
|
192
|
+
"name": "Test",
|
193
|
+
"empty": "",
|
194
|
+
"nil": null
|
195
|
+
}
|
196
|
+
}
|
197
|
+
]
|
198
|
+
}
|
199
|
+
http_version:
|
200
|
+
recorded_at: Tue, 03 Jan 2017 11:34:30 GMT
|
201
|
+
recorded_with: VCR 3.0.3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (Jan Lelis)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|
@@ -384,6 +384,7 @@ files:
|
|
384
384
|
- spec/fixtures/vcr_cassettes/bad_request.yml
|
385
385
|
- spec/fixtures/vcr_cassettes/content_type.yml
|
386
386
|
- spec/fixtures/vcr_cassettes/entries.yml
|
387
|
+
- spec/fixtures/vcr_cassettes/entries/issue_117.yml
|
387
388
|
- spec/fixtures/vcr_cassettes/entry.yml
|
388
389
|
- spec/fixtures/vcr_cassettes/entry/custom_resource.yml
|
389
390
|
- spec/fixtures/vcr_cassettes/entry/json_objects.yml
|
@@ -491,6 +492,7 @@ test_files:
|
|
491
492
|
- spec/fixtures/vcr_cassettes/bad_request.yml
|
492
493
|
- spec/fixtures/vcr_cassettes/content_type.yml
|
493
494
|
- spec/fixtures/vcr_cassettes/entries.yml
|
495
|
+
- spec/fixtures/vcr_cassettes/entries/issue_117.yml
|
494
496
|
- spec/fixtures/vcr_cassettes/entry.yml
|
495
497
|
- spec/fixtures/vcr_cassettes/entry/custom_resource.yml
|
496
498
|
- spec/fixtures/vcr_cassettes/entry/json_objects.yml
|