contentful-management 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +12 -29
  3. data/.rubocop_todo.yml +24 -0
  4. data/.travis.yml +1 -1
  5. data/.yardopts +4 -0
  6. data/CHANGELOG.md +12 -0
  7. data/Gemfile +1 -0
  8. data/Guardfile +39 -34
  9. data/README.md +42 -1
  10. data/Rakefile +2 -0
  11. data/contentful-management.gemspec +2 -1
  12. data/lib/contentful/management/api_key.rb +65 -0
  13. data/lib/contentful/management/array.rb +3 -2
  14. data/lib/contentful/management/asset.rb +124 -58
  15. data/lib/contentful/management/client.rb +60 -19
  16. data/lib/contentful/management/content_type.rb +104 -49
  17. data/lib/contentful/management/content_type_entry_methods_factory.rb +21 -0
  18. data/lib/contentful/management/dynamic_entry.rb +22 -18
  19. data/lib/contentful/management/entry.rb +138 -80
  20. data/lib/contentful/management/error.rb +23 -23
  21. data/lib/contentful/management/field.rb +16 -13
  22. data/lib/contentful/management/http_client.rb +29 -0
  23. data/lib/contentful/management/link.rb +3 -3
  24. data/lib/contentful/management/locale.rb +55 -26
  25. data/lib/contentful/management/location.rb +1 -1
  26. data/lib/contentful/management/request.rb +11 -12
  27. data/lib/contentful/management/resource.rb +27 -12
  28. data/lib/contentful/management/resource/array_like.rb +1 -1
  29. data/lib/contentful/management/resource/asset_fields.rb +1 -0
  30. data/lib/contentful/management/resource/entry_fields.rb +2 -0
  31. data/lib/contentful/management/resource/field_aware.rb +16 -5
  32. data/lib/contentful/management/resource/fields.rb +16 -8
  33. data/lib/contentful/management/resource/refresher.rb +1 -0
  34. data/lib/contentful/management/resource/system_properties.rb +13 -6
  35. data/lib/contentful/management/resource_builder.rb +43 -40
  36. data/lib/contentful/management/space.rb +67 -28
  37. data/lib/contentful/management/space_api_key_methods_factory.rb +15 -0
  38. data/lib/contentful/management/space_asset_methods_factory.rb +4 -0
  39. data/lib/contentful/management/space_association_all_published_method_factory.rb +11 -0
  40. data/lib/contentful/management/space_association_methods_factory.rb +4 -2
  41. data/lib/contentful/management/space_content_type_methods_factory.rb +4 -0
  42. data/lib/contentful/management/space_entry_methods_factory.rb +4 -0
  43. data/lib/contentful/management/space_locale_methods_factory.rb +2 -0
  44. data/lib/contentful/management/space_webhook_methods_factory.rb +2 -0
  45. data/lib/contentful/management/validation.rb +3 -2
  46. data/lib/contentful/management/version.rb +4 -1
  47. data/lib/contentful/management/webhook.rb +42 -21
  48. data/spec/fixtures/vcr_cassettes/api_key/all_for_space.yml +194 -0
  49. data/spec/fixtures/vcr_cassettes/api_key/create_for_space.yml +113 -0
  50. data/spec/fixtures/vcr_cassettes/api_key/find.yml +113 -0
  51. data/spec/fixtures/vcr_cassettes/api_key/find_for_space_not_found.yml +71 -0
  52. data/spec/fixtures/vcr_cassettes/asset/all_public.yml +112 -0
  53. data/spec/fixtures/vcr_cassettes/content_type/all_public.yml +106 -0
  54. data/spec/fixtures/vcr_cassettes/entry/all_public.yml +102 -0
  55. data/spec/fixtures/vcr_cassettes/locale/destroy.yml +330 -0
  56. data/spec/fixtures/vcr_cassettes/locale/update_both.yml +306 -0
  57. data/spec/fixtures/vcr_cassettes/locale/update_code.yml +306 -0
  58. data/spec/fixtures/vcr_cassettes/locale/update_name.yml +306 -0
  59. data/spec/fixtures/vcr_cassettes/space/api_key/all.yml +410 -0
  60. data/spec/fixtures/vcr_cassettes/space/api_key/create.yml +329 -0
  61. data/spec/fixtures/vcr_cassettes/space/api_key/find.yml +329 -0
  62. data/spec/fixtures/vcr_cassettes/space/asset/all_public.yml +328 -0
  63. data/spec/fixtures/vcr_cassettes/space/content_type/all_public.yml +322 -0
  64. data/spec/fixtures/vcr_cassettes/space/entry/all_public.yml +318 -0
  65. data/spec/lib/contentful/management/api_key_spec.rb +55 -0
  66. data/spec/lib/contentful/management/asset_spec.rb +10 -0
  67. data/spec/lib/contentful/management/content_type_spec.rb +10 -0
  68. data/spec/lib/contentful/management/entry_spec.rb +10 -0
  69. data/spec/lib/contentful/management/locale_spec.rb +58 -0
  70. data/spec/lib/contentful/management/space_spec.rb +53 -0
  71. metadata +58 -9
@@ -0,0 +1,102 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/public/entries
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/0.8.0
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
+ 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
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cf-Space-Id:
38
+ - bjwq7b86vgmm
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Tue, 26 Jan 2016 21:09:10 GMT
43
+ Etag:
44
+ - '"1f726ad559b7a5cf82db6135bea8c132"'
45
+ Server:
46
+ - nginx
47
+ Strict-Transport-Security:
48
+ - max-age=15768000
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Contentful-Request-Id:
52
+ - content-api:5GclclJMHK08ucwCeW0MuI
53
+ X-Powered-By:
54
+ - Express
55
+ Content-Length:
56
+ - '723'
57
+ Connection:
58
+ - Close
59
+ body:
60
+ encoding: UTF-8
61
+ string: |
62
+ {
63
+ "sys": {
64
+ "type": "Array"
65
+ },
66
+ "total": 1,
67
+ "skip": 0,
68
+ "limit": 100,
69
+ "items": [
70
+ {
71
+ "fields": {
72
+ "name": {
73
+ "en-US": "testEntry"
74
+ }
75
+ },
76
+ "sys": {
77
+ "space": {
78
+ "sys": {
79
+ "type": "Link",
80
+ "linkType": "Space",
81
+ "id": "bjwq7b86vgmm"
82
+ }
83
+ },
84
+ "type": "Entry",
85
+ "contentType": {
86
+ "sys": {
87
+ "type": "Link",
88
+ "linkType": "ContentType",
89
+ "id": "testCt"
90
+ }
91
+ },
92
+ "id": "2KFh3j824U8qQeaIs06gou",
93
+ "revision": 39,
94
+ "createdAt": "2016-01-25T17:26:29.082Z",
95
+ "updatedAt": "2016-01-26T21:05:13.858Z"
96
+ }
97
+ }
98
+ ]
99
+ }
100
+ http_version:
101
+ recorded_at: Tue, 26 Jan 2016 21:09:10 GMT
102
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,330 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Spanish (Argentina)","code":"es-AR"}'
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/0.8.0
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Accept-Ranges:
26
+ - bytes
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
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cache-Control:
38
+ - max-age=0
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Mon, 25 Jan 2016 18:35:51 GMT
43
+ Etag:
44
+ - '"fe56836a0221dc7e68461e69db4b98c1"'
45
+ Location:
46
+ - https://api.contentful.com/spaces/bjwq7b86vgmm/locales/2XSmmRfiRP04ucgYfxZUxu
47
+ Server:
48
+ - nginx
49
+ Status:
50
+ - 201 Created
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Contentful-Request-Id:
56
+ - b89-1520974384
57
+ Content-Length:
58
+ - '744'
59
+ Connection:
60
+ - Close
61
+ body:
62
+ encoding: UTF-8
63
+ string: |+
64
+ {
65
+ "sys":{
66
+ "type":"Locale",
67
+ "id":"2XSmmRfiRP04ucgYfxZUxu",
68
+ "version":0,
69
+ "space":{
70
+ "sys":{
71
+ "type":"Link",
72
+ "linkType":"Space",
73
+ "id":"bjwq7b86vgmm"
74
+ }
75
+ },
76
+ "createdBy":{
77
+ "sys":{
78
+ "type":"Link",
79
+ "linkType":"User",
80
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
81
+ }
82
+ },
83
+ "createdAt":"2016-01-25T18:35:49Z",
84
+ "updatedBy":{
85
+ "sys":{
86
+ "type":"Link",
87
+ "linkType":"User",
88
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
89
+ }
90
+ },
91
+ "updatedAt":"2016-01-25T18:35:49Z"
92
+ },
93
+ "name":"Spanish (Argentina)",
94
+ "internal_code":"zzz-AD",
95
+ "code":"es-AR",
96
+ "fallback_code":null,
97
+ "default":false,
98
+ "contentManagementApi":true,
99
+ "contentDeliveryApi":true
100
+ }
101
+
102
+ http_version:
103
+ recorded_at: Mon, 25 Jan 2016 18:35:49 GMT
104
+ - request:
105
+ method: get
106
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/2XSmmRfiRP04ucgYfxZUxu
107
+ body:
108
+ encoding: US-ASCII
109
+ string: ''
110
+ headers:
111
+ User-Agent:
112
+ - RubyContentfulManagementGem/0.8.0
113
+ Authorization:
114
+ - Bearer <ACCESS_TOKEN>
115
+ Content-Type:
116
+ - application/vnd.contentful.management.v1+json
117
+ Content-Length:
118
+ - '0'
119
+ Connection:
120
+ - close
121
+ Host:
122
+ - api.contentful.com
123
+ response:
124
+ status:
125
+ code: 200
126
+ message: OK
127
+ headers:
128
+ Accept-Ranges:
129
+ - bytes
130
+ Access-Control-Allow-Headers:
131
+ - 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
132
+ Access-Control-Allow-Methods:
133
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
134
+ Access-Control-Allow-Origin:
135
+ - "*"
136
+ Access-Control-Expose-Headers:
137
+ - Etag
138
+ Access-Control-Max-Age:
139
+ - '1728000'
140
+ Cache-Control:
141
+ - max-age=0
142
+ Content-Type:
143
+ - application/vnd.contentful.management.v1+json
144
+ Date:
145
+ - Mon, 25 Jan 2016 18:35:52 GMT
146
+ Etag:
147
+ - '"fe56836a0221dc7e68461e69db4b98c1"'
148
+ Server:
149
+ - nginx
150
+ Status:
151
+ - 200 OK
152
+ Strict-Transport-Security:
153
+ - max-age=15768000
154
+ X-Content-Type-Options:
155
+ - nosniff
156
+ X-Contentful-Request-Id:
157
+ - 9e1-668120047
158
+ Content-Length:
159
+ - '744'
160
+ Connection:
161
+ - Close
162
+ body:
163
+ encoding: UTF-8
164
+ string: |+
165
+ {
166
+ "sys":{
167
+ "type":"Locale",
168
+ "id":"2XSmmRfiRP04ucgYfxZUxu",
169
+ "version":0,
170
+ "space":{
171
+ "sys":{
172
+ "type":"Link",
173
+ "linkType":"Space",
174
+ "id":"bjwq7b86vgmm"
175
+ }
176
+ },
177
+ "createdBy":{
178
+ "sys":{
179
+ "type":"Link",
180
+ "linkType":"User",
181
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
182
+ }
183
+ },
184
+ "createdAt":"2016-01-25T18:35:49Z",
185
+ "updatedBy":{
186
+ "sys":{
187
+ "type":"Link",
188
+ "linkType":"User",
189
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
190
+ }
191
+ },
192
+ "updatedAt":"2016-01-25T18:35:49Z"
193
+ },
194
+ "name":"Spanish (Argentina)",
195
+ "internal_code":"zzz-AD",
196
+ "code":"es-AR",
197
+ "fallback_code":null,
198
+ "default":false,
199
+ "contentManagementApi":true,
200
+ "contentDeliveryApi":true
201
+ }
202
+
203
+ http_version:
204
+ recorded_at: Mon, 25 Jan 2016 18:35:50 GMT
205
+ - request:
206
+ method: delete
207
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/2XSmmRfiRP04ucgYfxZUxu
208
+ body:
209
+ encoding: US-ASCII
210
+ string: ''
211
+ headers:
212
+ User-Agent:
213
+ - RubyContentfulManagementGem/0.8.0
214
+ Authorization:
215
+ - Bearer <ACCESS_TOKEN>
216
+ Content-Type:
217
+ - application/vnd.contentful.management.v1+json
218
+ Content-Length:
219
+ - '0'
220
+ Connection:
221
+ - close
222
+ Host:
223
+ - api.contentful.com
224
+ response:
225
+ status:
226
+ code: 204
227
+ message: No Content
228
+ headers:
229
+ Accept-Ranges:
230
+ - bytes
231
+ Access-Control-Allow-Headers:
232
+ - 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
233
+ Access-Control-Allow-Methods:
234
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
235
+ Access-Control-Allow-Origin:
236
+ - "*"
237
+ Access-Control-Expose-Headers:
238
+ - Etag
239
+ Access-Control-Max-Age:
240
+ - '1728000'
241
+ Cache-Control:
242
+ - max-age=0
243
+ Date:
244
+ - Mon, 25 Jan 2016 18:35:53 GMT
245
+ Server:
246
+ - nginx
247
+ Status:
248
+ - 204 No Content
249
+ Strict-Transport-Security:
250
+ - max-age=15768000
251
+ X-Content-Type-Options:
252
+ - nosniff
253
+ X-Contentful-Request-Id:
254
+ - 9e1-668120055
255
+ Connection:
256
+ - Close
257
+ body:
258
+ encoding: UTF-8
259
+ string: ''
260
+ http_version:
261
+ recorded_at: Mon, 25 Jan 2016 18:35:51 GMT
262
+ - request:
263
+ method: get
264
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/2XSmmRfiRP04ucgYfxZUxu
265
+ body:
266
+ encoding: US-ASCII
267
+ string: ''
268
+ headers:
269
+ User-Agent:
270
+ - RubyContentfulManagementGem/0.8.0
271
+ Authorization:
272
+ - Bearer <ACCESS_TOKEN>
273
+ Content-Type:
274
+ - application/vnd.contentful.management.v1+json
275
+ Content-Length:
276
+ - '0'
277
+ Connection:
278
+ - close
279
+ Host:
280
+ - api.contentful.com
281
+ response:
282
+ status:
283
+ code: 404
284
+ message: Not Found
285
+ headers:
286
+ Accept-Ranges:
287
+ - bytes
288
+ Access-Control-Allow-Headers:
289
+ - 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
290
+ Access-Control-Allow-Methods:
291
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
292
+ Access-Control-Allow-Origin:
293
+ - "*"
294
+ Access-Control-Expose-Headers:
295
+ - Etag
296
+ Access-Control-Max-Age:
297
+ - '1728000'
298
+ Cache-Control:
299
+ - max-age=0
300
+ Content-Type:
301
+ - application/vnd.contentful.management.v1+json
302
+ Date:
303
+ - Mon, 25 Jan 2016 18:35:53 GMT
304
+ Server:
305
+ - nginx
306
+ Status:
307
+ - 404 Not Found
308
+ X-Contentful-Request-Id:
309
+ - b89-1520974414
310
+ X-Ua-Compatible:
311
+ - IE=Edge,chrome=1
312
+ Content-Length:
313
+ - '139'
314
+ Connection:
315
+ - Close
316
+ body:
317
+ encoding: UTF-8
318
+ string: |+
319
+ {
320
+ "sys":{
321
+ "type":"Error",
322
+ "id":"NotFound"
323
+ },
324
+ "requestId":"b89-1520974414",
325
+ "message":"The resource could not be found."
326
+ }
327
+
328
+ http_version:
329
+ recorded_at: Mon, 25 Jan 2016 18:35:51 GMT
330
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,306 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/63274yOrU0s4XiJlAp1ZMQ
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/0.8.0
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
+ - Mon, 25 Jan 2016 18:22:50 GMT
45
+ Etag:
46
+ - '"25c5ca13d058427323963558ea2e6612"'
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-1520966186
57
+ Content-Length:
58
+ - '733'
59
+ Connection:
60
+ - Close
61
+ body:
62
+ encoding: UTF-8
63
+ string: |+
64
+ {
65
+ "sys":{
66
+ "type":"Locale",
67
+ "id":"63274yOrU0s4XiJlAp1ZMQ",
68
+ "version":5,
69
+ "space":{
70
+ "sys":{
71
+ "type":"Link",
72
+ "linkType":"Space",
73
+ "id":"bjwq7b86vgmm"
74
+ }
75
+ },
76
+ "createdBy":{
77
+ "sys":{
78
+ "type":"Link",
79
+ "linkType":"User",
80
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
81
+ }
82
+ },
83
+ "createdAt":"2016-01-21T13:21:17Z",
84
+ "updatedBy":{
85
+ "sys":{
86
+ "type":"Link",
87
+ "linkType":"User",
88
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
89
+ }
90
+ },
91
+ "updatedAt":"2016-01-25T18:22:37Z"
92
+ },
93
+ "name":"U. S. English",
94
+ "internal_code":"en-US",
95
+ "code":"es",
96
+ "fallback_code":null,
97
+ "default":true,
98
+ "contentManagementApi":true,
99
+ "contentDeliveryApi":true
100
+ }
101
+
102
+ http_version:
103
+ recorded_at: Mon, 25 Jan 2016 18:22:48 GMT
104
+ - request:
105
+ method: put
106
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/63274yOrU0s4XiJlAp1ZMQ
107
+ body:
108
+ encoding: UTF-8
109
+ string: '{"name":"Spanish","code":"es"}'
110
+ headers:
111
+ User-Agent:
112
+ - RubyContentfulManagementGem/0.8.0
113
+ Authorization:
114
+ - Bearer <ACCESS_TOKEN>
115
+ Content-Type:
116
+ - application/vnd.contentful.management.v1+json
117
+ X-Contentful-Version:
118
+ - '5'
119
+ Connection:
120
+ - close
121
+ Host:
122
+ - api.contentful.com
123
+ response:
124
+ status:
125
+ code: 200
126
+ message: OK
127
+ headers:
128
+ Accept-Ranges:
129
+ - bytes
130
+ Access-Control-Allow-Headers:
131
+ - 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
132
+ Access-Control-Allow-Methods:
133
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
134
+ Access-Control-Allow-Origin:
135
+ - "*"
136
+ Access-Control-Expose-Headers:
137
+ - Etag
138
+ Access-Control-Max-Age:
139
+ - '1728000'
140
+ Cache-Control:
141
+ - max-age=0
142
+ Content-Type:
143
+ - application/vnd.contentful.management.v1+json
144
+ Date:
145
+ - Mon, 25 Jan 2016 18:22:51 GMT
146
+ Etag:
147
+ - '"92b843a928acbd456f052bed816cabe5"'
148
+ Server:
149
+ - nginx
150
+ Status:
151
+ - 200 OK
152
+ Strict-Transport-Security:
153
+ - max-age=15768000
154
+ X-Content-Type-Options:
155
+ - nosniff
156
+ X-Contentful-Request-Id:
157
+ - b89-1520966198
158
+ Content-Length:
159
+ - '727'
160
+ Connection:
161
+ - Close
162
+ body:
163
+ encoding: UTF-8
164
+ string: |+
165
+ {
166
+ "sys":{
167
+ "type":"Locale",
168
+ "id":"63274yOrU0s4XiJlAp1ZMQ",
169
+ "version":6,
170
+ "space":{
171
+ "sys":{
172
+ "type":"Link",
173
+ "linkType":"Space",
174
+ "id":"bjwq7b86vgmm"
175
+ }
176
+ },
177
+ "createdBy":{
178
+ "sys":{
179
+ "type":"Link",
180
+ "linkType":"User",
181
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
182
+ }
183
+ },
184
+ "createdAt":"2016-01-21T13:21:17Z",
185
+ "updatedBy":{
186
+ "sys":{
187
+ "type":"Link",
188
+ "linkType":"User",
189
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
190
+ }
191
+ },
192
+ "updatedAt":"2016-01-25T18:22:51Z"
193
+ },
194
+ "name":"Spanish",
195
+ "internal_code":"en-US",
196
+ "code":"es",
197
+ "fallback_code":null,
198
+ "default":true,
199
+ "contentManagementApi":true,
200
+ "contentDeliveryApi":true
201
+ }
202
+
203
+ http_version:
204
+ recorded_at: Mon, 25 Jan 2016 18:22:49 GMT
205
+ - request:
206
+ method: get
207
+ uri: https://api.contentful.com/spaces/bjwq7b86vgmm/locales/63274yOrU0s4XiJlAp1ZMQ
208
+ body:
209
+ encoding: US-ASCII
210
+ string: ''
211
+ headers:
212
+ User-Agent:
213
+ - RubyContentfulManagementGem/0.8.0
214
+ Authorization:
215
+ - Bearer <ACCESS_TOKEN>
216
+ Content-Type:
217
+ - application/vnd.contentful.management.v1+json
218
+ Content-Length:
219
+ - '0'
220
+ Connection:
221
+ - close
222
+ Host:
223
+ - api.contentful.com
224
+ response:
225
+ status:
226
+ code: 200
227
+ message: OK
228
+ headers:
229
+ Accept-Ranges:
230
+ - bytes
231
+ Access-Control-Allow-Headers:
232
+ - 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
233
+ Access-Control-Allow-Methods:
234
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
235
+ Access-Control-Allow-Origin:
236
+ - "*"
237
+ Access-Control-Expose-Headers:
238
+ - Etag
239
+ Access-Control-Max-Age:
240
+ - '1728000'
241
+ Cache-Control:
242
+ - max-age=0
243
+ Content-Type:
244
+ - application/vnd.contentful.management.v1+json
245
+ Date:
246
+ - Mon, 25 Jan 2016 18:22:52 GMT
247
+ Etag:
248
+ - '"92b843a928acbd456f052bed816cabe5"'
249
+ Server:
250
+ - nginx
251
+ Status:
252
+ - 200 OK
253
+ Strict-Transport-Security:
254
+ - max-age=15768000
255
+ X-Content-Type-Options:
256
+ - nosniff
257
+ X-Contentful-Request-Id:
258
+ - 0b5-177117176
259
+ Content-Length:
260
+ - '727'
261
+ Connection:
262
+ - Close
263
+ body:
264
+ encoding: UTF-8
265
+ string: |+
266
+ {
267
+ "sys":{
268
+ "type":"Locale",
269
+ "id":"63274yOrU0s4XiJlAp1ZMQ",
270
+ "version":6,
271
+ "space":{
272
+ "sys":{
273
+ "type":"Link",
274
+ "linkType":"Space",
275
+ "id":"bjwq7b86vgmm"
276
+ }
277
+ },
278
+ "createdBy":{
279
+ "sys":{
280
+ "type":"Link",
281
+ "linkType":"User",
282
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
283
+ }
284
+ },
285
+ "createdAt":"2016-01-21T13:21:17Z",
286
+ "updatedBy":{
287
+ "sys":{
288
+ "type":"Link",
289
+ "linkType":"User",
290
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
291
+ }
292
+ },
293
+ "updatedAt":"2016-01-25T18:22:51Z"
294
+ },
295
+ "name":"Spanish",
296
+ "internal_code":"en-US",
297
+ "code":"es",
298
+ "fallback_code":null,
299
+ "default":true,
300
+ "contentManagementApi":true,
301
+ "contentDeliveryApi":true
302
+ }
303
+
304
+ http_version:
305
+ recorded_at: Mon, 25 Jan 2016 18:22:50 GMT
306
+ recorded_with: VCR 2.9.3