contentful-management 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/lib/contentful/management/entry.rb +6 -1
- data/lib/contentful/management/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml +551 -0
- data/spec/fixtures/vcr_cassettes/entry/issue_70.yml +458 -0
- data/spec/lib/contentful/management/entry_spec.rb +28 -0
- metadata +31 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47059d83d4c15b51f55e64702a6994667badb940
|
4
|
+
data.tar.gz: 3321a691ad612179a6d71a8e9c64690c9e97e84d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd89d43a7261c962d67bbca48c0bb42447f6ecb182ce6a91701205884f57a811c78ea67b110d470a38d59f709949c8711c43335d497633409fc1d30a6a62584b
|
7
|
+
data.tar.gz: 95a0ea2d06ca2306f1c57da0254be4a1be7e6dad299d8d9aa98cb42c8715ff70c9bf16cdf252441d6d2cb3524a0031fc8b77f9b83d82d0ba7fe94a2aacea332e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
+
## 0.7.3
|
6
|
+
### Fixed
|
7
|
+
* Field names are no longer dependent on being present on `default_locale` [#70](https://github.com/contentful/contentful-management.rb/issues/70)
|
8
|
+
|
9
|
+
|
5
10
|
## 0.7.2
|
6
11
|
### Fixed
|
7
12
|
* Ensure that `Validation.type` returns correct value [#59](https://github.com/contentful/contentful-management.rb/issues/59), [#66](https://github.com/contentful/contentful-management.rb/issues/66)
|
@@ -192,7 +192,7 @@ module Contentful
|
|
192
192
|
# Returns a hash of existing fields.
|
193
193
|
def fields_for_query
|
194
194
|
raw_fields = instance_variable_get(:@fields)
|
195
|
-
fields_names = raw_fields
|
195
|
+
fields_names = flatten_field_names(raw_fields)
|
196
196
|
fields_names.each_with_object({}) do |field_name, results|
|
197
197
|
results[field_name] = raw_fields.each_with_object({}) do |(locale, fields), field_results|
|
198
198
|
field_results[locale] = parse_update_attribute(fields[field_name])
|
@@ -200,6 +200,11 @@ module Contentful
|
|
200
200
|
end
|
201
201
|
end
|
202
202
|
|
203
|
+
def flatten_field_names(fields)
|
204
|
+
without_locales = fields.map { |k,v| v }
|
205
|
+
without_locales.map(&:keys).flatten.uniq
|
206
|
+
end
|
207
|
+
|
203
208
|
def fields_from_attributes(attributes)
|
204
209
|
attributes.each do |id, value|
|
205
210
|
attributes[id] = {locale => parse_update_attribute(value)}
|
@@ -0,0 +1,551 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/bbukbffokvih
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulManagementGem/0.7.2
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Content-Length:
|
17
|
+
- '0'
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- api.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- 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
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- '*'
|
35
|
+
Access-Control-Expose-Headers:
|
36
|
+
- Etag
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '1728000'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.management.v1+json
|
43
|
+
Date:
|
44
|
+
- Thu, 19 Nov 2015 14:13:42 GMT
|
45
|
+
Etag:
|
46
|
+
- '"7f655c36850903fbd0a2ba66d212c1dc"'
|
47
|
+
Server:
|
48
|
+
- nginx
|
49
|
+
Status:
|
50
|
+
- 200 OK
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=15768000
|
53
|
+
X-Content-Type-Options:
|
54
|
+
- nosniff
|
55
|
+
X-Contentful-Request-Id:
|
56
|
+
- b89-1469285517
|
57
|
+
Content-Length:
|
58
|
+
- '451'
|
59
|
+
Connection:
|
60
|
+
- Close
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: |+
|
64
|
+
{
|
65
|
+
"sys":{
|
66
|
+
"type":"Space",
|
67
|
+
"id":"bbukbffokvih",
|
68
|
+
"version":1,
|
69
|
+
"createdBy":{
|
70
|
+
"sys":{
|
71
|
+
"type":"Link",
|
72
|
+
"linkType":"User",
|
73
|
+
"id":"4FLrUHftHW3v2BLi9fzfjU"
|
74
|
+
}
|
75
|
+
},
|
76
|
+
"createdAt":"2015-11-19T10:35:16Z",
|
77
|
+
"updatedBy":{
|
78
|
+
"sys":{
|
79
|
+
"type":"Link",
|
80
|
+
"linkType":"User",
|
81
|
+
"id":"4FLrUHftHW3v2BLi9fzfjU"
|
82
|
+
}
|
83
|
+
},
|
84
|
+
"updatedAt":"2015-11-19T10:35:17Z"
|
85
|
+
},
|
86
|
+
"name":"markdown"
|
87
|
+
}
|
88
|
+
|
89
|
+
http_version:
|
90
|
+
recorded_at: Thu, 19 Nov 2015 14:13:45 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: https://api.contentful.com/spaces/bbukbffokvih/content_types
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
User-Agent:
|
99
|
+
- RubyContentfulManagementGem/0.7.2
|
100
|
+
Authorization:
|
101
|
+
- Bearer <ACCESS_TOKEN>
|
102
|
+
Content-Type:
|
103
|
+
- application/vnd.contentful.management.v1+json
|
104
|
+
Content-Length:
|
105
|
+
- '0'
|
106
|
+
Connection:
|
107
|
+
- close
|
108
|
+
Host:
|
109
|
+
- api.contentful.com
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Access-Control-Allow-Headers:
|
116
|
+
- 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
|
117
|
+
Access-Control-Allow-Methods:
|
118
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
119
|
+
Access-Control-Allow-Origin:
|
120
|
+
- '*'
|
121
|
+
Access-Control-Expose-Headers:
|
122
|
+
- Etag
|
123
|
+
Access-Control-Max-Age:
|
124
|
+
- '1728000'
|
125
|
+
Cf-Space-Id:
|
126
|
+
- bbukbffokvih
|
127
|
+
Content-Type:
|
128
|
+
- application/vnd.contentful.management.v1+json
|
129
|
+
Date:
|
130
|
+
- Thu, 19 Nov 2015 14:13:42 GMT
|
131
|
+
Etag:
|
132
|
+
- '"c37bc5f0b1955e303fffd2e179ff389e"'
|
133
|
+
Server:
|
134
|
+
- nginx
|
135
|
+
Strict-Transport-Security:
|
136
|
+
- max-age=15768000
|
137
|
+
X-Content-Type-Options:
|
138
|
+
- nosniff
|
139
|
+
X-Contentful-Request-Id:
|
140
|
+
- content-api:cO3rm8K75u0Soe8KIyE0i
|
141
|
+
X-Powered-By:
|
142
|
+
- Express
|
143
|
+
Content-Length:
|
144
|
+
- '1571'
|
145
|
+
Connection:
|
146
|
+
- Close
|
147
|
+
body:
|
148
|
+
encoding: UTF-8
|
149
|
+
string: |
|
150
|
+
{
|
151
|
+
"sys": {
|
152
|
+
"type": "Array"
|
153
|
+
},
|
154
|
+
"total": 1,
|
155
|
+
"skip": 0,
|
156
|
+
"limit": 100,
|
157
|
+
"items": [
|
158
|
+
{
|
159
|
+
"name": "md",
|
160
|
+
"fields": [
|
161
|
+
{
|
162
|
+
"name": "title",
|
163
|
+
"id": "title",
|
164
|
+
"type": "Symbol",
|
165
|
+
"localized": false,
|
166
|
+
"validations": []
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"name": "body",
|
170
|
+
"id": "body",
|
171
|
+
"type": "Text",
|
172
|
+
"localized": false,
|
173
|
+
"validations": []
|
174
|
+
}
|
175
|
+
],
|
176
|
+
"description": "",
|
177
|
+
"displayField": "title",
|
178
|
+
"sys": {
|
179
|
+
"id": "5pg7Cy7dbaI2OCSakQa8k2",
|
180
|
+
"type": "ContentType",
|
181
|
+
"createdAt": "2015-11-19T10:35:49.144Z",
|
182
|
+
"createdBy": {
|
183
|
+
"sys": {
|
184
|
+
"type": "Link",
|
185
|
+
"linkType": "User",
|
186
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"space": {
|
190
|
+
"sys": {
|
191
|
+
"type": "Link",
|
192
|
+
"linkType": "Space",
|
193
|
+
"id": "bbukbffokvih"
|
194
|
+
}
|
195
|
+
},
|
196
|
+
"firstPublishedAt": "2015-11-19T10:35:51.895Z",
|
197
|
+
"publishedCounter": 1,
|
198
|
+
"publishedAt": "2015-11-19T10:35:51.895Z",
|
199
|
+
"publishedBy": {
|
200
|
+
"sys": {
|
201
|
+
"type": "Link",
|
202
|
+
"linkType": "User",
|
203
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"publishedVersion": 1,
|
207
|
+
"version": 2,
|
208
|
+
"updatedAt": "2015-11-19T10:35:51.944Z",
|
209
|
+
"updatedBy": {
|
210
|
+
"sys": {
|
211
|
+
"type": "Link",
|
212
|
+
"linkType": "User",
|
213
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
214
|
+
}
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
]
|
219
|
+
}
|
220
|
+
http_version:
|
221
|
+
recorded_at: Thu, 19 Nov 2015 14:13:46 GMT
|
222
|
+
- request:
|
223
|
+
method: get
|
224
|
+
uri: https://api.contentful.com/spaces/bbukbffokvih/content_types
|
225
|
+
body:
|
226
|
+
encoding: US-ASCII
|
227
|
+
string: ''
|
228
|
+
headers:
|
229
|
+
User-Agent:
|
230
|
+
- RubyContentfulManagementGem/0.7.2
|
231
|
+
Authorization:
|
232
|
+
- Bearer <ACCESS_TOKEN>
|
233
|
+
Content-Type:
|
234
|
+
- application/vnd.contentful.management.v1+json
|
235
|
+
Content-Length:
|
236
|
+
- '0'
|
237
|
+
Connection:
|
238
|
+
- close
|
239
|
+
Host:
|
240
|
+
- api.contentful.com
|
241
|
+
response:
|
242
|
+
status:
|
243
|
+
code: 200
|
244
|
+
message: OK
|
245
|
+
headers:
|
246
|
+
Access-Control-Allow-Headers:
|
247
|
+
- 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
|
248
|
+
Access-Control-Allow-Methods:
|
249
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
250
|
+
Access-Control-Allow-Origin:
|
251
|
+
- '*'
|
252
|
+
Access-Control-Expose-Headers:
|
253
|
+
- Etag
|
254
|
+
Access-Control-Max-Age:
|
255
|
+
- '1728000'
|
256
|
+
Cf-Space-Id:
|
257
|
+
- bbukbffokvih
|
258
|
+
Content-Type:
|
259
|
+
- application/vnd.contentful.management.v1+json
|
260
|
+
Date:
|
261
|
+
- Thu, 19 Nov 2015 14:13:43 GMT
|
262
|
+
Etag:
|
263
|
+
- '"c37bc5f0b1955e303fffd2e179ff389e"'
|
264
|
+
Server:
|
265
|
+
- nginx
|
266
|
+
Strict-Transport-Security:
|
267
|
+
- max-age=15768000
|
268
|
+
X-Content-Type-Options:
|
269
|
+
- nosniff
|
270
|
+
X-Contentful-Request-Id:
|
271
|
+
- content-api:4CSZiIce08UigQyw2Cq20e
|
272
|
+
X-Powered-By:
|
273
|
+
- Express
|
274
|
+
Content-Length:
|
275
|
+
- '1571'
|
276
|
+
Connection:
|
277
|
+
- Close
|
278
|
+
body:
|
279
|
+
encoding: UTF-8
|
280
|
+
string: |
|
281
|
+
{
|
282
|
+
"sys": {
|
283
|
+
"type": "Array"
|
284
|
+
},
|
285
|
+
"total": 1,
|
286
|
+
"skip": 0,
|
287
|
+
"limit": 100,
|
288
|
+
"items": [
|
289
|
+
{
|
290
|
+
"name": "md",
|
291
|
+
"fields": [
|
292
|
+
{
|
293
|
+
"name": "title",
|
294
|
+
"id": "title",
|
295
|
+
"type": "Symbol",
|
296
|
+
"localized": false,
|
297
|
+
"validations": []
|
298
|
+
},
|
299
|
+
{
|
300
|
+
"name": "body",
|
301
|
+
"id": "body",
|
302
|
+
"type": "Text",
|
303
|
+
"localized": false,
|
304
|
+
"validations": []
|
305
|
+
}
|
306
|
+
],
|
307
|
+
"description": "",
|
308
|
+
"displayField": "title",
|
309
|
+
"sys": {
|
310
|
+
"id": "5pg7Cy7dbaI2OCSakQa8k2",
|
311
|
+
"type": "ContentType",
|
312
|
+
"createdAt": "2015-11-19T10:35:49.144Z",
|
313
|
+
"createdBy": {
|
314
|
+
"sys": {
|
315
|
+
"type": "Link",
|
316
|
+
"linkType": "User",
|
317
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
318
|
+
}
|
319
|
+
},
|
320
|
+
"space": {
|
321
|
+
"sys": {
|
322
|
+
"type": "Link",
|
323
|
+
"linkType": "Space",
|
324
|
+
"id": "bbukbffokvih"
|
325
|
+
}
|
326
|
+
},
|
327
|
+
"firstPublishedAt": "2015-11-19T10:35:51.895Z",
|
328
|
+
"publishedCounter": 1,
|
329
|
+
"publishedAt": "2015-11-19T10:35:51.895Z",
|
330
|
+
"publishedBy": {
|
331
|
+
"sys": {
|
332
|
+
"type": "Link",
|
333
|
+
"linkType": "User",
|
334
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"publishedVersion": 1,
|
338
|
+
"version": 2,
|
339
|
+
"updatedAt": "2015-11-19T10:35:51.944Z",
|
340
|
+
"updatedBy": {
|
341
|
+
"sys": {
|
342
|
+
"type": "Link",
|
343
|
+
"linkType": "User",
|
344
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
345
|
+
}
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
]
|
350
|
+
}
|
351
|
+
http_version:
|
352
|
+
recorded_at: Thu, 19 Nov 2015 14:13:47 GMT
|
353
|
+
- request:
|
354
|
+
method: post
|
355
|
+
uri: https://api.contentful.com/spaces/bbukbffokvih/entries/
|
356
|
+
body:
|
357
|
+
encoding: UTF-8
|
358
|
+
string: '{"fields":{}}'
|
359
|
+
headers:
|
360
|
+
User-Agent:
|
361
|
+
- RubyContentfulManagementGem/0.7.2
|
362
|
+
Authorization:
|
363
|
+
- Bearer <ACCESS_TOKEN>
|
364
|
+
Content-Type:
|
365
|
+
- application/vnd.contentful.management.v1+json
|
366
|
+
X-Contentful-Content-Type:
|
367
|
+
- 5pg7Cy7dbaI2OCSakQa8k2
|
368
|
+
Connection:
|
369
|
+
- close
|
370
|
+
Host:
|
371
|
+
- api.contentful.com
|
372
|
+
response:
|
373
|
+
status:
|
374
|
+
code: 201
|
375
|
+
message: Created
|
376
|
+
headers:
|
377
|
+
Access-Control-Allow-Headers:
|
378
|
+
- 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
|
379
|
+
Access-Control-Allow-Methods:
|
380
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
381
|
+
Access-Control-Allow-Origin:
|
382
|
+
- '*'
|
383
|
+
Access-Control-Expose-Headers:
|
384
|
+
- Etag
|
385
|
+
Access-Control-Max-Age:
|
386
|
+
- '1728000'
|
387
|
+
Cf-Space-Id:
|
388
|
+
- bbukbffokvih
|
389
|
+
Content-Type:
|
390
|
+
- application/vnd.contentful.management.v1+json
|
391
|
+
Date:
|
392
|
+
- Thu, 19 Nov 2015 14:13:45 GMT
|
393
|
+
Etag:
|
394
|
+
- '"2a38262f64e0d4f597e87d8f73b369b7"'
|
395
|
+
Server:
|
396
|
+
- nginx
|
397
|
+
Strict-Transport-Security:
|
398
|
+
- max-age=15768000
|
399
|
+
X-Content-Type-Options:
|
400
|
+
- nosniff
|
401
|
+
X-Contentful-Request-Id:
|
402
|
+
- content-api:5T34uQHBJu4YcE482WMmK4
|
403
|
+
X-Powered-By:
|
404
|
+
- Express
|
405
|
+
Content-Length:
|
406
|
+
- '753'
|
407
|
+
Connection:
|
408
|
+
- Close
|
409
|
+
body:
|
410
|
+
encoding: UTF-8
|
411
|
+
string: |
|
412
|
+
{
|
413
|
+
"fields": {},
|
414
|
+
"sys": {
|
415
|
+
"id": "VeLgaBp6M0kqSww4Wkg2",
|
416
|
+
"type": "Entry",
|
417
|
+
"version": 1,
|
418
|
+
"createdAt": "2015-11-19T14:13:45.176Z",
|
419
|
+
"createdBy": {
|
420
|
+
"sys": {
|
421
|
+
"type": "Link",
|
422
|
+
"linkType": "User",
|
423
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
424
|
+
}
|
425
|
+
},
|
426
|
+
"space": {
|
427
|
+
"sys": {
|
428
|
+
"type": "Link",
|
429
|
+
"linkType": "Space",
|
430
|
+
"id": "bbukbffokvih"
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"contentType": {
|
434
|
+
"sys": {
|
435
|
+
"type": "Link",
|
436
|
+
"linkType": "ContentType",
|
437
|
+
"id": "5pg7Cy7dbaI2OCSakQa8k2"
|
438
|
+
}
|
439
|
+
},
|
440
|
+
"updatedAt": "2015-11-19T14:13:45.176Z",
|
441
|
+
"updatedBy": {
|
442
|
+
"sys": {
|
443
|
+
"type": "Link",
|
444
|
+
"linkType": "User",
|
445
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
446
|
+
}
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
http_version:
|
451
|
+
recorded_at: Thu, 19 Nov 2015 14:13:48 GMT
|
452
|
+
- request:
|
453
|
+
method: put
|
454
|
+
uri: https://api.contentful.com/spaces/bbukbffokvih/entries/VeLgaBp6M0kqSww4Wkg2
|
455
|
+
body:
|
456
|
+
encoding: UTF-8
|
457
|
+
string: '{"fields":{}}'
|
458
|
+
headers:
|
459
|
+
User-Agent:
|
460
|
+
- RubyContentfulManagementGem/0.7.2
|
461
|
+
Authorization:
|
462
|
+
- Bearer <ACCESS_TOKEN>
|
463
|
+
Content-Type:
|
464
|
+
- application/vnd.contentful.management.v1+json
|
465
|
+
X-Contentful-Version:
|
466
|
+
- '1'
|
467
|
+
Connection:
|
468
|
+
- close
|
469
|
+
Host:
|
470
|
+
- api.contentful.com
|
471
|
+
response:
|
472
|
+
status:
|
473
|
+
code: 200
|
474
|
+
message: OK
|
475
|
+
headers:
|
476
|
+
Access-Control-Allow-Headers:
|
477
|
+
- 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
|
478
|
+
Access-Control-Allow-Methods:
|
479
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
480
|
+
Access-Control-Allow-Origin:
|
481
|
+
- '*'
|
482
|
+
Access-Control-Expose-Headers:
|
483
|
+
- Etag
|
484
|
+
Access-Control-Max-Age:
|
485
|
+
- '1728000'
|
486
|
+
Cf-Space-Id:
|
487
|
+
- bbukbffokvih
|
488
|
+
Content-Type:
|
489
|
+
- application/vnd.contentful.management.v1+json
|
490
|
+
Date:
|
491
|
+
- Thu, 19 Nov 2015 14:13:46 GMT
|
492
|
+
Etag:
|
493
|
+
- '"8e2b1f66bf336fcc7dddeb478623d35e"'
|
494
|
+
Server:
|
495
|
+
- nginx
|
496
|
+
Strict-Transport-Security:
|
497
|
+
- max-age=15768000
|
498
|
+
X-Content-Type-Options:
|
499
|
+
- nosniff
|
500
|
+
X-Contentful-Request-Id:
|
501
|
+
- content-api:3Vh0FIcCkg4okeYqouAKqC
|
502
|
+
X-Powered-By:
|
503
|
+
- Express
|
504
|
+
Content-Length:
|
505
|
+
- '753'
|
506
|
+
Connection:
|
507
|
+
- Close
|
508
|
+
body:
|
509
|
+
encoding: UTF-8
|
510
|
+
string: |
|
511
|
+
{
|
512
|
+
"fields": {},
|
513
|
+
"sys": {
|
514
|
+
"id": "VeLgaBp6M0kqSww4Wkg2",
|
515
|
+
"type": "Entry",
|
516
|
+
"createdAt": "2015-11-19T14:13:45.176Z",
|
517
|
+
"createdBy": {
|
518
|
+
"sys": {
|
519
|
+
"type": "Link",
|
520
|
+
"linkType": "User",
|
521
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
522
|
+
}
|
523
|
+
},
|
524
|
+
"space": {
|
525
|
+
"sys": {
|
526
|
+
"type": "Link",
|
527
|
+
"linkType": "Space",
|
528
|
+
"id": "bbukbffokvih"
|
529
|
+
}
|
530
|
+
},
|
531
|
+
"contentType": {
|
532
|
+
"sys": {
|
533
|
+
"type": "Link",
|
534
|
+
"linkType": "ContentType",
|
535
|
+
"id": "5pg7Cy7dbaI2OCSakQa8k2"
|
536
|
+
}
|
537
|
+
},
|
538
|
+
"version": 2,
|
539
|
+
"updatedAt": "2015-11-19T14:13:46.113Z",
|
540
|
+
"updatedBy": {
|
541
|
+
"sys": {
|
542
|
+
"type": "Link",
|
543
|
+
"linkType": "User",
|
544
|
+
"id": "4FLrUHftHW3v2BLi9fzfjU"
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
}
|
549
|
+
http_version:
|
550
|
+
recorded_at: Thu, 19 Nov 2015 14:13:49 GMT
|
551
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,458 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/9sh5dtmfyzhj
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulManagementGem/0.7.2
|
12
|
+
Authorization:
|
13
|
+
- Bearer <ACCESS_TOKEN>
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.management.v1+json
|
16
|
+
Content-Length:
|
17
|
+
- '0'
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- api.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Access-Control-Allow-Headers:
|
30
|
+
- 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
|
31
|
+
Access-Control-Allow-Methods:
|
32
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Expose-Headers:
|
36
|
+
- Etag
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '1728000'
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.management.v1+json
|
43
|
+
Date:
|
44
|
+
- Tue, 24 Nov 2015 12:29:39 GMT
|
45
|
+
Etag:
|
46
|
+
- '"370c230b580965c03e076bc1e88944ae"'
|
47
|
+
Server:
|
48
|
+
- nginx
|
49
|
+
Status:
|
50
|
+
- 200 OK
|
51
|
+
Strict-Transport-Security:
|
52
|
+
- max-age=15768000
|
53
|
+
X-Content-Type-Options:
|
54
|
+
- nosniff
|
55
|
+
X-Contentful-Request-Id:
|
56
|
+
- 0b5-128589790
|
57
|
+
Content-Length:
|
58
|
+
- '458'
|
59
|
+
Connection:
|
60
|
+
- Close
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: |+
|
64
|
+
{
|
65
|
+
"sys":{
|
66
|
+
"type":"Space",
|
67
|
+
"id":"9sh5dtmfyzhj",
|
68
|
+
"version":1,
|
69
|
+
"createdBy":{
|
70
|
+
"sys":{
|
71
|
+
"type":"Link",
|
72
|
+
"linkType":"User",
|
73
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
74
|
+
}
|
75
|
+
},
|
76
|
+
"createdAt":"2015-10-19T15:13:09Z",
|
77
|
+
"updatedBy":{
|
78
|
+
"sys":{
|
79
|
+
"type":"Link",
|
80
|
+
"linkType":"User",
|
81
|
+
"id":"4SejVrWT96dvL9IV4Nb7sQ"
|
82
|
+
}
|
83
|
+
},
|
84
|
+
"updatedAt":"2015-10-19T15:13:10Z"
|
85
|
+
},
|
86
|
+
"name":"LocaleTestSpace"
|
87
|
+
}
|
88
|
+
|
89
|
+
http_version:
|
90
|
+
recorded_at: Tue, 24 Nov 2015 12:29:39 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: https://api.contentful.com/spaces/9sh5dtmfyzhj/content_types
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
User-Agent:
|
99
|
+
- RubyContentfulManagementGem/0.7.2
|
100
|
+
Authorization:
|
101
|
+
- Bearer <ACCESS_TOKEN>
|
102
|
+
Content-Type:
|
103
|
+
- application/vnd.contentful.management.v1+json
|
104
|
+
Content-Length:
|
105
|
+
- '0'
|
106
|
+
Connection:
|
107
|
+
- close
|
108
|
+
Host:
|
109
|
+
- api.contentful.com
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Access-Control-Allow-Headers:
|
116
|
+
- 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
|
117
|
+
Access-Control-Allow-Methods:
|
118
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
119
|
+
Access-Control-Allow-Origin:
|
120
|
+
- "*"
|
121
|
+
Access-Control-Expose-Headers:
|
122
|
+
- Etag
|
123
|
+
Access-Control-Max-Age:
|
124
|
+
- '1728000'
|
125
|
+
Cf-Space-Id:
|
126
|
+
- 9sh5dtmfyzhj
|
127
|
+
Content-Type:
|
128
|
+
- application/vnd.contentful.management.v1+json
|
129
|
+
Date:
|
130
|
+
- Tue, 24 Nov 2015 12:29:40 GMT
|
131
|
+
Etag:
|
132
|
+
- '"bf894e79a63be308214fb6399ea7ba80"'
|
133
|
+
Server:
|
134
|
+
- nginx
|
135
|
+
Strict-Transport-Security:
|
136
|
+
- max-age=15768000
|
137
|
+
X-Content-Type-Options:
|
138
|
+
- nosniff
|
139
|
+
X-Contentful-Request-Id:
|
140
|
+
- content-api:2sCmd9AGOsyyq0UKko4SkA
|
141
|
+
X-Powered-By:
|
142
|
+
- Express
|
143
|
+
Content-Length:
|
144
|
+
- '9286'
|
145
|
+
Connection:
|
146
|
+
- Close
|
147
|
+
body:
|
148
|
+
encoding: UTF-8
|
149
|
+
string: |
|
150
|
+
{
|
151
|
+
"sys": {
|
152
|
+
"type": "Array"
|
153
|
+
},
|
154
|
+
"total": 1,
|
155
|
+
"skip": 0,
|
156
|
+
"limit": 100,
|
157
|
+
"items": [
|
158
|
+
{
|
159
|
+
"name": "LocaleTest",
|
160
|
+
"fields": [
|
161
|
+
{
|
162
|
+
"name": "name",
|
163
|
+
"id": "name",
|
164
|
+
"type": "Symbol",
|
165
|
+
"localized": true,
|
166
|
+
"validations": []
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"name": "non_localized",
|
170
|
+
"id": "nonLocalized",
|
171
|
+
"type": "Symbol",
|
172
|
+
"localized": false,
|
173
|
+
"validations": []
|
174
|
+
}
|
175
|
+
],
|
176
|
+
"description": "",
|
177
|
+
"displayField": "name",
|
178
|
+
"sys": {
|
179
|
+
"id": "4uy7nXZ4jCSeGCQou6AcGe",
|
180
|
+
"type": "ContentType",
|
181
|
+
"createdAt": "2015-11-24T12:26:32.345Z",
|
182
|
+
"createdBy": {
|
183
|
+
"sys": {
|
184
|
+
"type": "Link",
|
185
|
+
"linkType": "User",
|
186
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"space": {
|
190
|
+
"sys": {
|
191
|
+
"type": "Link",
|
192
|
+
"linkType": "Space",
|
193
|
+
"id": "9sh5dtmfyzhj"
|
194
|
+
}
|
195
|
+
},
|
196
|
+
"firstPublishedAt": "2015-11-24T12:26:33.258Z",
|
197
|
+
"publishedCounter": 1,
|
198
|
+
"publishedAt": "2015-11-24T12:26:33.258Z",
|
199
|
+
"publishedBy": {
|
200
|
+
"sys": {
|
201
|
+
"type": "Link",
|
202
|
+
"linkType": "User",
|
203
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"publishedVersion": 1,
|
207
|
+
"version": 2,
|
208
|
+
"updatedAt": "2015-11-24T12:26:33.309Z",
|
209
|
+
"updatedBy": {
|
210
|
+
"sys": {
|
211
|
+
"type": "Link",
|
212
|
+
"linkType": "User",
|
213
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
214
|
+
}
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
]
|
219
|
+
}
|
220
|
+
http_version:
|
221
|
+
recorded_at: Tue, 24 Nov 2015 12:29:40 GMT
|
222
|
+
- request:
|
223
|
+
method: get
|
224
|
+
uri: https://api.contentful.com/spaces/9sh5dtmfyzhj/entries/1PdCkb5maYgqsSUCOweseM
|
225
|
+
body:
|
226
|
+
encoding: US-ASCII
|
227
|
+
string: ''
|
228
|
+
headers:
|
229
|
+
User-Agent:
|
230
|
+
- RubyContentfulManagementGem/0.7.2
|
231
|
+
Authorization:
|
232
|
+
- Bearer <ACCESS_TOKEN>
|
233
|
+
Content-Type:
|
234
|
+
- application/vnd.contentful.management.v1+json
|
235
|
+
Content-Length:
|
236
|
+
- '0'
|
237
|
+
Connection:
|
238
|
+
- close
|
239
|
+
Host:
|
240
|
+
- api.contentful.com
|
241
|
+
response:
|
242
|
+
status:
|
243
|
+
code: 200
|
244
|
+
message: OK
|
245
|
+
headers:
|
246
|
+
Access-Control-Allow-Headers:
|
247
|
+
- 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
|
248
|
+
Access-Control-Allow-Methods:
|
249
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
250
|
+
Access-Control-Allow-Origin:
|
251
|
+
- "*"
|
252
|
+
Access-Control-Expose-Headers:
|
253
|
+
- Etag
|
254
|
+
Access-Control-Max-Age:
|
255
|
+
- '1728000'
|
256
|
+
Cf-Space-Id:
|
257
|
+
- 9sh5dtmfyzhj
|
258
|
+
Content-Type:
|
259
|
+
- application/vnd.contentful.management.v1+json
|
260
|
+
Date:
|
261
|
+
- Tue, 24 Nov 2015 12:29:41 GMT
|
262
|
+
Etag:
|
263
|
+
- '"8f2315b106f713e6acad77c91520adef"'
|
264
|
+
Server:
|
265
|
+
- nginx
|
266
|
+
Strict-Transport-Security:
|
267
|
+
- max-age=15768000
|
268
|
+
X-Content-Type-Options:
|
269
|
+
- nosniff
|
270
|
+
X-Contentful-Request-Id:
|
271
|
+
- content-api:5PxADTxTMsU8q4uMa4m4Qs
|
272
|
+
X-Powered-By:
|
273
|
+
- Express
|
274
|
+
Content-Length:
|
275
|
+
- '1150'
|
276
|
+
Connection:
|
277
|
+
- Close
|
278
|
+
body:
|
279
|
+
encoding: UTF-8
|
280
|
+
string: |
|
281
|
+
{
|
282
|
+
"sys": {
|
283
|
+
"id": "1PdCkb5maYgqsSUCOweseM",
|
284
|
+
"type": "Entry",
|
285
|
+
"createdAt": "2015-11-24T12:28:21.880Z",
|
286
|
+
"createdBy": {
|
287
|
+
"sys": {
|
288
|
+
"type": "Link",
|
289
|
+
"linkType": "User",
|
290
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
291
|
+
}
|
292
|
+
},
|
293
|
+
"space": {
|
294
|
+
"sys": {
|
295
|
+
"type": "Link",
|
296
|
+
"linkType": "Space",
|
297
|
+
"id": "9sh5dtmfyzhj"
|
298
|
+
}
|
299
|
+
},
|
300
|
+
"contentType": {
|
301
|
+
"sys": {
|
302
|
+
"type": "Link",
|
303
|
+
"linkType": "ContentType",
|
304
|
+
"id": "4uy7nXZ4jCSeGCQou6AcGe"
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"firstPublishedAt": "2015-11-24T12:28:38.828Z",
|
308
|
+
"publishedCounter": 1,
|
309
|
+
"publishedAt": "2015-11-24T12:28:38.828Z",
|
310
|
+
"publishedBy": {
|
311
|
+
"sys": {
|
312
|
+
"type": "Link",
|
313
|
+
"linkType": "User",
|
314
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
315
|
+
}
|
316
|
+
},
|
317
|
+
"publishedVersion": 14,
|
318
|
+
"version": 15,
|
319
|
+
"updatedAt": "2015-11-24T12:28:38.881Z",
|
320
|
+
"updatedBy": {
|
321
|
+
"sys": {
|
322
|
+
"type": "Link",
|
323
|
+
"linkType": "User",
|
324
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
325
|
+
}
|
326
|
+
}
|
327
|
+
},
|
328
|
+
"fields": {
|
329
|
+
"name": {
|
330
|
+
"es": "Futbolista"
|
331
|
+
},
|
332
|
+
"nonLocalized": {
|
333
|
+
"de-DE": "baz"
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
http_version:
|
338
|
+
recorded_at: Tue, 24 Nov 2015 12:29:42 GMT
|
339
|
+
- request:
|
340
|
+
method: get
|
341
|
+
uri: https://api.contentful.com/spaces/9sh5dtmfyzhj/entries/1QKkNRf9AEW2wqwWowgscs
|
342
|
+
body:
|
343
|
+
encoding: US-ASCII
|
344
|
+
string: ''
|
345
|
+
headers:
|
346
|
+
User-Agent:
|
347
|
+
- RubyContentfulManagementGem/0.7.2
|
348
|
+
Authorization:
|
349
|
+
- Bearer <ACCESS_TOKEN>
|
350
|
+
Content-Type:
|
351
|
+
- application/vnd.contentful.management.v1+json
|
352
|
+
Content-Length:
|
353
|
+
- '0'
|
354
|
+
Connection:
|
355
|
+
- close
|
356
|
+
Host:
|
357
|
+
- api.contentful.com
|
358
|
+
response:
|
359
|
+
status:
|
360
|
+
code: 200
|
361
|
+
message: OK
|
362
|
+
headers:
|
363
|
+
Access-Control-Allow-Headers:
|
364
|
+
- 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
|
365
|
+
Access-Control-Allow-Methods:
|
366
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
367
|
+
Access-Control-Allow-Origin:
|
368
|
+
- "*"
|
369
|
+
Access-Control-Expose-Headers:
|
370
|
+
- Etag
|
371
|
+
Access-Control-Max-Age:
|
372
|
+
- '1728000'
|
373
|
+
Cf-Space-Id:
|
374
|
+
- 9sh5dtmfyzhj
|
375
|
+
Content-Type:
|
376
|
+
- application/vnd.contentful.management.v1+json
|
377
|
+
Date:
|
378
|
+
- Tue, 24 Nov 2015 12:29:43 GMT
|
379
|
+
Etag:
|
380
|
+
- '"4b9fefa240b2639ce41eb416498e79b2"'
|
381
|
+
Server:
|
382
|
+
- nginx
|
383
|
+
Strict-Transport-Security:
|
384
|
+
- max-age=15768000
|
385
|
+
X-Content-Type-Options:
|
386
|
+
- nosniff
|
387
|
+
X-Contentful-Request-Id:
|
388
|
+
- content-api:4NMYKGriI80MeaWKuwSsmw
|
389
|
+
X-Powered-By:
|
390
|
+
- Express
|
391
|
+
Content-Length:
|
392
|
+
- '1197'
|
393
|
+
Connection:
|
394
|
+
- Close
|
395
|
+
body:
|
396
|
+
encoding: UTF-8
|
397
|
+
string: |
|
398
|
+
{
|
399
|
+
"sys": {
|
400
|
+
"id": "1QKkNRf9AEW2wqwWowgscs",
|
401
|
+
"type": "Entry",
|
402
|
+
"createdAt": "2015-11-24T12:28:21.880Z",
|
403
|
+
"createdBy": {
|
404
|
+
"sys": {
|
405
|
+
"type": "Link",
|
406
|
+
"linkType": "User",
|
407
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
408
|
+
}
|
409
|
+
},
|
410
|
+
"space": {
|
411
|
+
"sys": {
|
412
|
+
"type": "Link",
|
413
|
+
"linkType": "Space",
|
414
|
+
"id": "9sh5dtmfyzhj"
|
415
|
+
}
|
416
|
+
},
|
417
|
+
"contentType": {
|
418
|
+
"sys": {
|
419
|
+
"type": "Link",
|
420
|
+
"linkType": "ContentType",
|
421
|
+
"id": "4uy7nXZ4jCSeGCQou6AcGe"
|
422
|
+
}
|
423
|
+
},
|
424
|
+
"firstPublishedAt": "2015-11-24T12:28:38.828Z",
|
425
|
+
"publishedCounter": 1,
|
426
|
+
"publishedAt": "2015-11-24T12:28:38.828Z",
|
427
|
+
"publishedBy": {
|
428
|
+
"sys": {
|
429
|
+
"type": "Link",
|
430
|
+
"linkType": "User",
|
431
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
432
|
+
}
|
433
|
+
},
|
434
|
+
"publishedVersion": 14,
|
435
|
+
"version": 15,
|
436
|
+
"updatedAt": "2015-11-24T12:28:38.881Z",
|
437
|
+
"updatedBy": {
|
438
|
+
"sys": {
|
439
|
+
"type": "Link",
|
440
|
+
"linkType": "User",
|
441
|
+
"id": "4SejVrWT96dvL9IV4Nb7sQ"
|
442
|
+
}
|
443
|
+
}
|
444
|
+
},
|
445
|
+
"fields": {
|
446
|
+
"name": {
|
447
|
+
"es": "Chico",
|
448
|
+
"en-US": "Boy",
|
449
|
+
"de-DE": "Junge"
|
450
|
+
},
|
451
|
+
"nonLocalized": {
|
452
|
+
"de-DE": "foobar"
|
453
|
+
}
|
454
|
+
}
|
455
|
+
}
|
456
|
+
http_version:
|
457
|
+
recorded_at: Tue, 24 Nov 2015 12:29:43 GMT
|
458
|
+
recorded_with: VCR 2.9.3
|
@@ -345,6 +345,15 @@ module Contentful
|
|
345
345
|
expect(publish.error[:message]).to eq 'You have exceeded the rate limit of the Organization this Space belongs to by making too many API requests within a short timespan. Please wait a moment before trying the request again.'
|
346
346
|
end
|
347
347
|
end
|
348
|
+
|
349
|
+
it 'with just an id' do
|
350
|
+
vcr('entry/create_with_just_id') do
|
351
|
+
space = Contentful::Management::Space.find('bbukbffokvih')
|
352
|
+
entry = space.content_types.all.first.entries.create({'id' => 'yol'})
|
353
|
+
entry.save
|
354
|
+
expect(entry).to be_a Contentful::Management::Entry
|
355
|
+
end
|
356
|
+
end
|
348
357
|
end
|
349
358
|
|
350
359
|
describe '#update' do
|
@@ -710,6 +719,25 @@ module Contentful
|
|
710
719
|
end
|
711
720
|
end
|
712
721
|
|
722
|
+
describe 'issues' do
|
723
|
+
describe 'handles multiple locales even when they are not all defined for the default locale - #70' do
|
724
|
+
it 'merges all present locales' do
|
725
|
+
vcr('entry/issue_70') {
|
726
|
+
space = Contentful::Management::Space.find('9sh5dtmfyzhj')
|
727
|
+
|
728
|
+
entry_non_default_locale = space.entries.find('1PdCkb5maYgqsSUCOweseM')
|
729
|
+
|
730
|
+
expect(entry_non_default_locale.name_with_locales).to match({"de-DE" => nil, "es" => "Futbolista"})
|
731
|
+
expect(entry_non_default_locale.non_localized_with_locales).to match({"de-DE" => "baz", "es" => nil})
|
732
|
+
|
733
|
+
entry_with_all_locales = space.entries.find('1QKkNRf9AEW2wqwWowgscs')
|
734
|
+
|
735
|
+
expect(entry_with_all_locales.name_with_locales).to match({"de-DE" => "Junge", "en-US" => "Boy", "es" => "Chico"})
|
736
|
+
expect(entry_with_all_locales.non_localized_with_locales).to match({"de-DE" => "foobar", "en-US" => nil, "es" => nil})
|
737
|
+
}
|
738
|
+
end
|
739
|
+
end
|
740
|
+
end
|
713
741
|
end
|
714
742
|
end
|
715
743
|
end
|
metadata
CHANGED
@@ -1,116 +1,117 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Protas
|
8
8
|
- Tomasz Warkocki
|
9
9
|
- Contentful GmbH (Andreas Tiefenthaler)
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
+
name: http
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
17
18
|
requirements:
|
18
19
|
- - "~>"
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: '0.8'
|
21
|
-
name: http
|
22
|
-
prerelease: false
|
23
22
|
type: :runtime
|
23
|
+
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '0.8'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
|
+
name: multi_json
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
33
|
- - "~>"
|
33
34
|
- !ruby/object:Gem::Version
|
34
35
|
version: '1'
|
35
|
-
name: multi_json
|
36
|
-
prerelease: false
|
37
36
|
type: :runtime
|
37
|
+
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '1'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
|
+
name: bundler
|
44
45
|
requirement: !ruby/object:Gem::Requirement
|
45
46
|
requirements:
|
46
47
|
- - "~>"
|
47
48
|
- !ruby/object:Gem::Version
|
48
49
|
version: '1.6'
|
49
|
-
name: bundler
|
50
|
-
prerelease: false
|
51
50
|
type: :development
|
51
|
+
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '1.6'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
|
+
name: rake
|
58
59
|
requirement: !ruby/object:Gem::Requirement
|
59
60
|
requirements:
|
60
61
|
- - ">="
|
61
62
|
- !ruby/object:Gem::Version
|
62
63
|
version: '0'
|
63
|
-
name: rake
|
64
|
-
prerelease: false
|
65
64
|
type: :development
|
65
|
+
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
+
name: rspec
|
72
73
|
requirement: !ruby/object:Gem::Requirement
|
73
74
|
requirements:
|
74
75
|
- - "~>"
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '3'
|
77
|
-
name: rspec
|
78
|
-
prerelease: false
|
79
78
|
type: :development
|
79
|
+
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '3'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
+
name: rspec-its
|
86
87
|
requirement: !ruby/object:Gem::Requirement
|
87
88
|
requirements:
|
88
89
|
- - ">="
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '0'
|
91
|
-
name: rspec-its
|
92
|
-
prerelease: false
|
93
92
|
type: :development
|
93
|
+
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
|
+
name: rubocop
|
100
101
|
requirement: !ruby/object:Gem::Requirement
|
101
102
|
requirements:
|
102
103
|
- - ">="
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
|
-
name: rubocop
|
106
|
-
prerelease: false
|
107
106
|
type: :development
|
107
|
+
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
+
name: reek
|
114
115
|
requirement: !ruby/object:Gem::Requirement
|
115
116
|
requirements:
|
116
117
|
- - "~>"
|
@@ -119,9 +120,8 @@ dependencies:
|
|
119
120
|
- - ">="
|
120
121
|
- !ruby/object:Gem::Version
|
121
122
|
version: 2.0.4
|
122
|
-
name: reek
|
123
|
-
prerelease: false
|
124
123
|
type: :development
|
124
|
+
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
@@ -131,20 +131,21 @@ dependencies:
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 2.0.4
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
|
+
name: vcr
|
134
135
|
requirement: !ruby/object:Gem::Requirement
|
135
136
|
requirements:
|
136
137
|
- - ">="
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: '0'
|
139
|
-
name: vcr
|
140
|
-
prerelease: false
|
141
140
|
type: :development
|
141
|
+
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
|
+
name: webmock
|
148
149
|
requirement: !ruby/object:Gem::Requirement
|
149
150
|
requirements:
|
150
151
|
- - "~>"
|
@@ -153,9 +154,8 @@ dependencies:
|
|
153
154
|
- - ">="
|
154
155
|
- !ruby/object:Gem::Version
|
155
156
|
version: 1.17.3
|
156
|
-
name: webmock
|
157
|
-
prerelease: false
|
158
157
|
type: :development
|
158
|
+
prerelease: false
|
159
159
|
version_requirements: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
161
|
- - "~>"
|
@@ -334,6 +334,7 @@ files:
|
|
334
334
|
- spec/fixtures/vcr_cassettes/entry/create_with_custom_id.yml
|
335
335
|
- spec/fixtures/vcr_cassettes/entry/create_with_entries.yml
|
336
336
|
- spec/fixtures/vcr_cassettes/entry/create_with_entry.yml
|
337
|
+
- spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml
|
337
338
|
- spec/fixtures/vcr_cassettes/entry/create_with_location.yml
|
338
339
|
- spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml
|
339
340
|
- spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml
|
@@ -342,6 +343,7 @@ files:
|
|
342
343
|
- spec/fixtures/vcr_cassettes/entry/find-with-null-symbols.yml
|
343
344
|
- spec/fixtures/vcr_cassettes/entry/find.yml
|
344
345
|
- spec/fixtures/vcr_cassettes/entry/find_not_found.yml
|
346
|
+
- spec/fixtures/vcr_cassettes/entry/issue_70.yml
|
345
347
|
- spec/fixtures/vcr_cassettes/entry/limited_entries.yml
|
346
348
|
- spec/fixtures/vcr_cassettes/entry/locales/fallback_to_default_locale.yml
|
347
349
|
- spec/fixtures/vcr_cassettes/entry/locales/retrieve_localized.yml
|
@@ -446,7 +448,7 @@ homepage: https://github.com/contentful/contentful-management.rb
|
|
446
448
|
licenses:
|
447
449
|
- MIT
|
448
450
|
metadata: {}
|
449
|
-
post_install_message:
|
451
|
+
post_install_message:
|
450
452
|
rdoc_options: []
|
451
453
|
require_paths:
|
452
454
|
- lib
|
@@ -461,9 +463,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
461
463
|
- !ruby/object:Gem::Version
|
462
464
|
version: '0'
|
463
465
|
requirements: []
|
464
|
-
rubyforge_project:
|
465
|
-
rubygems_version: 2.4.
|
466
|
-
signing_key:
|
466
|
+
rubyforge_project:
|
467
|
+
rubygems_version: 2.4.5.1
|
468
|
+
signing_key:
|
467
469
|
specification_version: 4
|
468
470
|
summary: contentful management api
|
469
471
|
test_files:
|
@@ -575,6 +577,7 @@ test_files:
|
|
575
577
|
- spec/fixtures/vcr_cassettes/entry/create_with_custom_id.yml
|
576
578
|
- spec/fixtures/vcr_cassettes/entry/create_with_entries.yml
|
577
579
|
- spec/fixtures/vcr_cassettes/entry/create_with_entry.yml
|
580
|
+
- spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml
|
578
581
|
- spec/fixtures/vcr_cassettes/entry/create_with_location.yml
|
579
582
|
- spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml
|
580
583
|
- spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml
|
@@ -583,6 +586,7 @@ test_files:
|
|
583
586
|
- spec/fixtures/vcr_cassettes/entry/find-with-null-symbols.yml
|
584
587
|
- spec/fixtures/vcr_cassettes/entry/find.yml
|
585
588
|
- spec/fixtures/vcr_cassettes/entry/find_not_found.yml
|
589
|
+
- spec/fixtures/vcr_cassettes/entry/issue_70.yml
|
586
590
|
- spec/fixtures/vcr_cassettes/entry/limited_entries.yml
|
587
591
|
- spec/fixtures/vcr_cassettes/entry/locales/fallback_to_default_locale.yml
|
588
592
|
- spec/fixtures/vcr_cassettes/entry/locales/retrieve_localized.yml
|