contentful-management 2.13.0 → 2.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d88eccf48f7dafd7ea1dffa2714427454f90db64d6977f06acf54900e441b39
4
- data.tar.gz: 8e27ade92ccc73100cb336012ca1cd50e6fc87ae2b50bddf159344cd33e7e17d
3
+ metadata.gz: 7ab386d5bdca593af2a33e0c20aa4497e3e8e19a72060e8481c11370e5007121
4
+ data.tar.gz: ec6a5beca729d2eba0ee273112ebb45ab0ca9a8ce8f969023a2382ace4583385
5
5
  SHA512:
6
- metadata.gz: 72d956064a708379f60b886a27c9a2565922bcad0521e895989ea9c73e3ec046a19895fe343c9e7d5f7cc1dd4adafabd3c52bdf549cb3cfe1344cda737fbf877
7
- data.tar.gz: '093505dbccbab0e54c94c9cdce7ba9df3ebf338bcf7e3f6ac28fe857020357f7bae6d9b0ccc61d4ef9c4da80d9f854738fd9388f0fbbf0f6cfdfb6c8c6e4cba6'
6
+ metadata.gz: e379b2a6ff1c47622460bf7d1e06b00dc65aab3f086971a2eacc294a3a10ce943c0474e682be980ad0c9649f95e0981c89122a1fec2f4f5fcef2233ffc639c5d
7
+ data.tar.gz: 7a05c37cb9471cc1405a82ec14bb9b92eced0494b184645f3b0be42ee8f0c68995fef40ea64c20c89ba195f402c0c4f7c2451497e747e1f22fdf7fc9d45eadc8
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Master
4
4
 
5
+ ## 2.13.1
6
+ ### Fixed
7
+ * Fixed an issue when loading entries or assets that included tags. [#219](https://github.com/contentful/contentful-management.rb/issues/219)
8
+
5
9
  ## 2.13.0
6
10
  ### Fixed
7
11
  * Fixed a possible validation error when submitting a content type. [#218](https://github.com/contentful/contentful-management.rb/pull/218)
@@ -1,6 +1,7 @@
1
1
  require_relative 'resource'
2
2
  require_relative 'resource/fields'
3
3
  require_relative 'resource/archiver'
4
+ require_relative 'resource/metadata'
4
5
  require_relative 'resource/publisher'
5
6
  require_relative 'resource/asset_fields'
6
7
  require_relative 'resource/environment_aware'
@@ -15,6 +16,7 @@ module Contentful
15
16
  include Contentful::Management::Resource
16
17
  include Contentful::Management::Resource::Fields
17
18
  include Contentful::Management::Resource::Archiver
19
+ include Contentful::Management::Resource::Metadata
18
20
  include Contentful::Management::Resource::Refresher
19
21
  include Contentful::Management::Resource::Publisher
20
22
  include Contentful::Management::Resource::SystemProperties
@@ -1,6 +1,7 @@
1
1
  require_relative 'resource'
2
2
  require_relative 'resource/fields'
3
3
  require_relative 'resource/archiver'
4
+ require_relative 'resource/metadata'
4
5
  require_relative 'resource/publisher'
5
6
  require_relative 'resource_requester'
6
7
  require_relative 'resource/field_aware'
@@ -15,6 +16,7 @@ module Contentful
15
16
  # @see _ https://www.contentful.com/developers/documentation/content-management-api/#resources-entries
16
17
  class Entry
17
18
  include Contentful::Management::Resource
19
+ include Contentful::Management::Resource::Metadata
18
20
  extend Contentful::Management::Resource::EntryFields
19
21
  include Contentful::Management::Resource::SystemProperties
20
22
 
@@ -0,0 +1,48 @@
1
+ module Contentful
2
+ module Management
3
+ module Resource
4
+ # Adds metadata logic for [Resource] classes
5
+ module Metadata
6
+ # Returns the metadata hash
7
+ #
8
+ # @return [Hash] Metadata
9
+ def metadata
10
+ @metadata
11
+ end
12
+
13
+ # @private
14
+ def initialize(object = nil, *)
15
+ super
16
+ @metadata = {}
17
+ extract_metadata_from_object! object if object
18
+ end
19
+
20
+ # @private
21
+ def inspect(info = nil)
22
+ if metadata.empty?
23
+ super(info)
24
+ else
25
+ super("#{info} @metadata=#{metadata.inspect}")
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def extract_metadata_from_object!(object)
32
+ return unless object.key?('metadata')
33
+ object['metadata'].each do |key, value|
34
+ @metadata[key.to_sym] = if key == 'tags'
35
+ coerce_tags(value)
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def coerce_tags(tags)
43
+ tags.map { |tag| Contentful::Management::Link.new(tag) }
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,3 +1,4 @@
1
+ require_relative 'tag'
1
2
  require_relative 'link'
2
3
  require_relative 'user'
3
4
  require_relative 'role'
@@ -58,7 +59,8 @@ module Contentful
58
59
  'Extension' => Contentful::Management::UIExtension,
59
60
  'EditorInterface' => Contentful::Management::EditorInterface,
60
61
  'Snapshot' => Contentful::Management::Snapshot,
61
- 'Upload' => Contentful::Management::Upload
62
+ 'Upload' => Contentful::Management::Upload,
63
+ 'Tag' => Contentful::Management::Tag
62
64
  }.freeze
63
65
 
64
66
  # Default Entry Mapping
@@ -214,7 +216,7 @@ module Contentful
214
216
  detect_child_objects(potential_objects).each do |child_name, child_object|
215
217
  res.public_send(name)[child_name.to_sym] = create_resource(child_object)
216
218
  end
217
- next if name == 'includes'
219
+ next if %w[includes metadata].include?(name)
218
220
  detect_child_arrays(potential_objects).each do |child_name, _child_array|
219
221
  replace_child_array res.public_send(name)[child_name.to_sym]
220
222
  end
@@ -0,0 +1,14 @@
1
+ require_relative 'resource'
2
+
3
+ module Contentful
4
+ module Management
5
+ # Resource Class for Tags
6
+ # https://www.contentful.com/developers/docs/references/content-management-api/#/reference/content-tags
7
+ class Tag
8
+ include Contentful::Management::Resource
9
+ include Contentful::Management::Resource::SystemProperties
10
+
11
+ property :name
12
+ end
13
+ end
14
+ end
@@ -3,6 +3,6 @@ module Contentful
3
3
  # Management Namespace
4
4
  module Management
5
5
  # Gem Version
6
- VERSION = '2.13.0'.freeze
6
+ VERSION = '2.13.1'.freeze
7
7
  end
8
8
  end
@@ -0,0 +1,442 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
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
+ User-Agent:
21
+ - http.rb/4.4.1
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,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,PATCH,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
+ - no-store
41
+ Cf-Organization-Id:
42
+ - 1VcAE6naLx3WZBNNUIMMZE
43
+ Cf-Space-Id:
44
+ - 2l3j7k267g9k
45
+ Content-Type:
46
+ - application/vnd.contentful.management.v1+json
47
+ Contentful-Api:
48
+ - cma
49
+ Date:
50
+ - Thu, 07 Jan 2021 11:06:34 GMT
51
+ Etag:
52
+ - W/"659d95ef36a17e58e2737034fa6383c8"
53
+ Referrer-Policy:
54
+ - strict-origin-when-cross-origin
55
+ Server:
56
+ - Contentful
57
+ Strict-Transport-Security:
58
+ - max-age=15768000
59
+ X-Content-Type-Options:
60
+ - nosniff
61
+ X-Contentful-Ratelimit-Hour-Limit:
62
+ - '36000'
63
+ X-Contentful-Ratelimit-Hour-Remaining:
64
+ - '35999'
65
+ X-Contentful-Ratelimit-Reset:
66
+ - '0'
67
+ X-Contentful-Ratelimit-Second-Limit:
68
+ - '10'
69
+ X-Contentful-Ratelimit-Second-Remaining:
70
+ - '9'
71
+ X-Contentful-Request-Id:
72
+ - ec8d18ce16f490826aa9fad2da805fab
73
+ X-Contentful-Route:
74
+ - "/spaces/:id"
75
+ X-Download-Options:
76
+ - noopen
77
+ X-Frame-Options:
78
+ - ALLOWALL
79
+ X-Permitted-Cross-Domain-Policies:
80
+ - none
81
+ X-Xss-Protection:
82
+ - 1; mode=block
83
+ Content-Length:
84
+ - '615'
85
+ Connection:
86
+ - Close
87
+ Set-Cookie:
88
+ - incap_ses_1209_673446=YVZmXgaaL1nUoYajdzvHEDnr9l8AAAAA9AANvTqheZgll2XY47/SVw==;
89
+ path=/; Domain=.contentful.com
90
+ - nlbi_673446=TEfpMs2gcV4tuBwBKsJtVwAAAADqY9XHcdiGX3TdLGbT6y5/; path=/; Domain=.contentful.com
91
+ - visid_incap_673446=Tu9GqOaLRImlZ3thm9+RNznr9l8AAAAAQUIPAAAAAAA1c9Y1VFXr0Jkj3riEyjEx;
92
+ expires=Fri, 07 Jan 2022 10:05:00 GMT; HttpOnly; path=/; Domain=.contentful.com
93
+ X-Cdn:
94
+ - Incapsula
95
+ X-Iinfo:
96
+ - 6-1974143-1974145 NNNN CT(159 160 0) RT(1610017593403 47) q(0 0 3 -1) r(5
97
+ 5) U5
98
+ body:
99
+ encoding: ASCII-8BIT
100
+ string: |+
101
+ {
102
+ "name":"Colorful-Demo-Dev-workflow",
103
+ "sys":{
104
+ "type":"Space",
105
+ "id":"2l3j7k267g9k",
106
+ "version":3,
107
+ "createdBy":{
108
+ "sys":{
109
+ "type":"Link",
110
+ "linkType":"User",
111
+ "id":"0PCYk22mt1xD7gTKZhHycN"
112
+ }
113
+ },
114
+ "createdAt":"2019-09-09T14:37:05Z",
115
+ "updatedBy":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"User",
119
+ "id":"0PCYk22mt1xD7gTKZhHycN"
120
+ }
121
+ },
122
+ "updatedAt":"2019-10-25T15:17:48Z",
123
+ "organization":{
124
+ "sys":{
125
+ "type":"Link",
126
+ "linkType":"Organization",
127
+ "id":"1VcAE6naLx3WZBNNUIMMZE"
128
+ }
129
+ }
130
+ }
131
+ }
132
+
133
+ http_version:
134
+ recorded_at: Thu, 07 Jan 2021 11:06:32 GMT
135
+ - request:
136
+ method: get
137
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master
138
+ body:
139
+ encoding: UTF-8
140
+ string: ''
141
+ headers:
142
+ X-Contentful-User-Agent:
143
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
144
+ Authorization:
145
+ - Bearer <ACCESS_TOKEN>
146
+ Content-Type:
147
+ - application/vnd.contentful.management.v1+json
148
+ Connection:
149
+ - close
150
+ Host:
151
+ - api.contentful.com
152
+ User-Agent:
153
+ - http.rb/4.4.1
154
+ response:
155
+ status:
156
+ code: 200
157
+ message: OK
158
+ headers:
159
+ Accept-Ranges:
160
+ - bytes
161
+ Access-Control-Allow-Headers:
162
+ - 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
163
+ Access-Control-Allow-Methods:
164
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Expose-Headers:
168
+ - Etag
169
+ Access-Control-Max-Age:
170
+ - '1728000'
171
+ Cache-Control:
172
+ - no-store
173
+ Cf-Organization-Id:
174
+ - 1VcAE6naLx3WZBNNUIMMZE
175
+ Cf-Space-Id:
176
+ - 2l3j7k267g9k
177
+ Content-Type:
178
+ - application/vnd.contentful.management.v1+json
179
+ Contentful-Api:
180
+ - cma
181
+ Date:
182
+ - Thu, 07 Jan 2021 11:06:34 GMT
183
+ Etag:
184
+ - W/"901485ea9ca14612f2a5764df6b0fc04"
185
+ Referrer-Policy:
186
+ - strict-origin-when-cross-origin
187
+ Server:
188
+ - Contentful
189
+ Strict-Transport-Security:
190
+ - max-age=15768000
191
+ X-Content-Type-Options:
192
+ - nosniff
193
+ X-Contentful-Ratelimit-Hour-Limit:
194
+ - '36000'
195
+ X-Contentful-Ratelimit-Hour-Remaining:
196
+ - '35998'
197
+ X-Contentful-Ratelimit-Reset:
198
+ - '0'
199
+ X-Contentful-Ratelimit-Second-Limit:
200
+ - '10'
201
+ X-Contentful-Ratelimit-Second-Remaining:
202
+ - '8'
203
+ X-Contentful-Request-Id:
204
+ - 9b6794c810697dd6efc6303e4e8ef4d9
205
+ X-Contentful-Route:
206
+ - "/spaces/:space_id/environments/:id"
207
+ X-Download-Options:
208
+ - noopen
209
+ X-Frame-Options:
210
+ - ALLOWALL
211
+ X-Permitted-Cross-Domain-Policies:
212
+ - none
213
+ X-Xss-Protection:
214
+ - 1; mode=block
215
+ Content-Length:
216
+ - '827'
217
+ Connection:
218
+ - Close
219
+ Set-Cookie:
220
+ - incap_ses_1209_673446=Y2ykEEBgTnreoYajdzvHEDrr9l8AAAAAkviSHB+2OK8NcHzKUeC0Wg==;
221
+ path=/; Domain=.contentful.com
222
+ - nlbi_673446=t9IxdbWZoBXar3EkKsJtVwAAAACJnZFzX6lnLUI0ElgfMeWH; path=/; Domain=.contentful.com
223
+ - visid_incap_673446=CY/ac4UKQqSGiRg3sUKObDrr9l8AAAAAQUIPAAAAAADMHW0fGxjNQm6BtzVzbNhH;
224
+ expires=Fri, 07 Jan 2022 10:05:05 GMT; HttpOnly; path=/; Domain=.contentful.com
225
+ X-Cdn:
226
+ - Incapsula
227
+ X-Iinfo:
228
+ - 2-1495637-1495638 NNNY CT(0 0 0) RT(1610017594007 44) q(0 0 0 -1) r(2 2) U5
229
+ body:
230
+ encoding: ASCII-8BIT
231
+ string: |+
232
+ {
233
+ "name":"backup-1",
234
+ "sys":{
235
+ "type":"Environment",
236
+ "id":"master",
237
+ "aliasedEnvironment":{
238
+ "sys":{
239
+ "type":"Link",
240
+ "linkType":"Environment",
241
+ "id":"backup-1"
242
+ }
243
+ },
244
+ "version":3,
245
+ "space":{
246
+ "sys":{
247
+ "type":"Link",
248
+ "linkType":"Space",
249
+ "id":"2l3j7k267g9k"
250
+ }
251
+ },
252
+ "status":{
253
+ "sys":{
254
+ "type":"Link",
255
+ "linkType":"Status",
256
+ "id":"ready"
257
+ }
258
+ },
259
+ "createdBy":{
260
+ "sys":{
261
+ "type":"Link",
262
+ "linkType":"User",
263
+ "id":"6c10tlsIDlE3qvnNoTwYa5"
264
+ }
265
+ },
266
+ "createdAt":"2020-10-05T14:36:26Z",
267
+ "updatedBy":{
268
+ "sys":{
269
+ "type":"Link",
270
+ "linkType":"User",
271
+ "id":"6c10tlsIDlE3qvnNoTwYa5"
272
+ }
273
+ },
274
+ "updatedAt":"2020-10-05T14:36:30Z"
275
+ }
276
+ }
277
+
278
+ http_version:
279
+ recorded_at: Thu, 07 Jan 2021 11:06:32 GMT
280
+ - request:
281
+ method: get
282
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master/assets/2lxYoWv3LWHe0yhO3w2Yid
283
+ body:
284
+ encoding: UTF-8
285
+ string: ''
286
+ headers:
287
+ X-Contentful-User-Agent:
288
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
289
+ Authorization:
290
+ - Bearer <ACCESS_TOKEN>
291
+ Content-Type:
292
+ - application/vnd.contentful.management.v1+json
293
+ Connection:
294
+ - close
295
+ Host:
296
+ - api.contentful.com
297
+ User-Agent:
298
+ - http.rb/4.4.1
299
+ response:
300
+ status:
301
+ code: 200
302
+ message: OK
303
+ headers:
304
+ Access-Control-Allow-Headers:
305
+ - 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
306
+ Access-Control-Allow-Methods:
307
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
308
+ Access-Control-Allow-Origin:
309
+ - "*"
310
+ Access-Control-Expose-Headers:
311
+ - Etag
312
+ Access-Control-Max-Age:
313
+ - '1728000'
314
+ Cache-Control:
315
+ - no-store
316
+ Cf-Environment-Id:
317
+ - master
318
+ Cf-Environment-Uuid:
319
+ - master
320
+ Cf-Space-Id:
321
+ - 2l3j7k267g9k
322
+ Content-Type:
323
+ - application/vnd.contentful.management.v1+json
324
+ Contentful-Api:
325
+ - cma
326
+ Date:
327
+ - Thu, 07 Jan 2021 11:06:35 GMT
328
+ Etag:
329
+ - '"8117790482973496674"'
330
+ Server:
331
+ - Contentful
332
+ Strict-Transport-Security:
333
+ - max-age=15768000
334
+ X-Content-Type-Options:
335
+ - nosniff
336
+ X-Contentful-Ratelimit-Hour-Limit:
337
+ - '36000'
338
+ X-Contentful-Ratelimit-Hour-Remaining:
339
+ - '35997'
340
+ X-Contentful-Ratelimit-Reset:
341
+ - '0'
342
+ X-Contentful-Ratelimit-Second-Limit:
343
+ - '10'
344
+ X-Contentful-Ratelimit-Second-Remaining:
345
+ - '7'
346
+ X-Contentful-Request-Id:
347
+ - e9987a6feedac9d160825158388850fe
348
+ X-Contentful-Route:
349
+ - "/spaces/:space/environments/:environment/assets/:id"
350
+ Content-Length:
351
+ - '1517'
352
+ Connection:
353
+ - Close
354
+ Set-Cookie:
355
+ - incap_ses_1209_673446=dVwret9u1XPsoYajdzvHEDvr9l8AAAAATsuve5Yp0rNFifAENHDQWg==;
356
+ path=/; Domain=.contentful.com
357
+ - nlbi_673446=0tHYcaIMu2YAHvPnKsJtVwAAAAB0aM8FkVVYSdZiiR9Cm87x; path=/; Domain=.contentful.com
358
+ - visid_incap_673446=q/YtdCgUTpKLYpGlrXXQ/Tvr9l8AAAAAQUIPAAAAAADMMMF1cxU9/9X4djNOAm0R;
359
+ expires=Fri, 07 Jan 2022 10:05:05 GMT; HttpOnly; path=/; Domain=.contentful.com
360
+ X-Cdn:
361
+ - Incapsula
362
+ X-Iinfo:
363
+ - 5-4907447-4907449 NNNN CT(164 163 0) RT(1610017594299 46) q(0 0 3 -1) r(7
364
+ 7) U5
365
+ body:
366
+ encoding: ASCII-8BIT
367
+ string: |
368
+ {
369
+ "metadata": {
370
+ "tags": [
371
+ {
372
+ "sys": {
373
+ "type": "Link",
374
+ "linkType": "Tag",
375
+ "id": "mobQa"
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ "sys": {
381
+ "space": {
382
+ "sys": {
383
+ "type": "Link",
384
+ "linkType": "Space",
385
+ "id": "2l3j7k267g9k"
386
+ }
387
+ },
388
+ "id": "2lxYoWv3LWHe0yhO3w2Yid",
389
+ "type": "Asset",
390
+ "createdAt": "2019-09-09T14:43:26.287Z",
391
+ "updatedAt": "2020-11-23T14:38:46.698Z",
392
+ "environment": {
393
+ "sys": {
394
+ "id": "master",
395
+ "type": "Link",
396
+ "linkType": "Environment"
397
+ }
398
+ },
399
+ "firstPublishedAt": "2019-09-09T14:52:29.719Z",
400
+ "createdBy": {
401
+ "sys": {
402
+ "type": "Link",
403
+ "linkType": "User",
404
+ "id": "0PCYk22mt1xD7gTKZhHycN"
405
+ }
406
+ },
407
+ "updatedBy": {
408
+ "sys": {
409
+ "type": "Link",
410
+ "linkType": "User",
411
+ "id": "2tk1qOdVUXzixfz5dsanLT"
412
+ }
413
+ },
414
+ "publishedCounter": 4,
415
+ "version": 14
416
+ },
417
+ "fields": {
418
+ "title": {
419
+ "en-US": "Berlin skyline"
420
+ },
421
+ "description": {
422
+ "en-US": "changed"
423
+ },
424
+ "file": {
425
+ "en-US": {
426
+ "url": "//images.ctfassets.net/2l3j7k267g9k/2lxYoWv3LWHe0yhO3w2Yid/c6df694a8607018926bfd2fe32fe9b88/photo-1532978794596-d56d649a0493",
427
+ "details": {
428
+ "size": 571480,
429
+ "image": {
430
+ "width": 2550,
431
+ "height": 1700
432
+ }
433
+ },
434
+ "fileName": "photo-1532978794596-d56d649a0493",
435
+ "contentType": "image/jpeg"
436
+ }
437
+ }
438
+ }
439
+ }
440
+ http_version:
441
+ recorded_at: Thu, 07 Jan 2021 11:06:33 GMT
442
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,535 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
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
+ User-Agent:
21
+ - http.rb/4.4.1
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,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,PATCH,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
+ - no-store
41
+ Cf-Organization-Id:
42
+ - 1VcAE6naLx3WZBNNUIMMZE
43
+ Cf-Space-Id:
44
+ - 2l3j7k267g9k
45
+ Content-Type:
46
+ - application/vnd.contentful.management.v1+json
47
+ Contentful-Api:
48
+ - cma
49
+ Date:
50
+ - Thu, 07 Jan 2021 10:15:41 GMT
51
+ Etag:
52
+ - W/"659d95ef36a17e58e2737034fa6383c8"
53
+ Referrer-Policy:
54
+ - strict-origin-when-cross-origin
55
+ Server:
56
+ - Contentful
57
+ Strict-Transport-Security:
58
+ - max-age=15768000
59
+ X-Content-Type-Options:
60
+ - nosniff
61
+ X-Contentful-Ratelimit-Hour-Limit:
62
+ - '36000'
63
+ X-Contentful-Ratelimit-Hour-Remaining:
64
+ - '35999'
65
+ X-Contentful-Ratelimit-Reset:
66
+ - '0'
67
+ X-Contentful-Ratelimit-Second-Limit:
68
+ - '10'
69
+ X-Contentful-Ratelimit-Second-Remaining:
70
+ - '9'
71
+ X-Contentful-Request-Id:
72
+ - ae7817779337e63eea52cd0f2f7dcdd5
73
+ X-Contentful-Route:
74
+ - "/spaces/:id"
75
+ X-Download-Options:
76
+ - noopen
77
+ X-Frame-Options:
78
+ - ALLOWALL
79
+ X-Permitted-Cross-Domain-Policies:
80
+ - none
81
+ X-Xss-Protection:
82
+ - 1; mode=block
83
+ Content-Length:
84
+ - '615'
85
+ Connection:
86
+ - Close
87
+ Set-Cookie:
88
+ - incap_ses_1209_673446=NYPYaV0kOibRCIajdzvHEE3f9l8AAAAA1u9RFV5i0MGh+jM4zLejYg==;
89
+ path=/; Domain=.contentful.com
90
+ - nlbi_673446=wuGJCEio1FjuPvlOKsJtVwAAAAARF/iOnrZLadQsEp4cFAj/; path=/; Domain=.contentful.com
91
+ - visid_incap_673446=bDRMaDvjS3ekzB3AqzZWsk3f9l8AAAAAQUIPAAAAAABo15YvOU6jMObvBXrpBpjL;
92
+ expires=Fri, 07 Jan 2022 10:04:56 GMT; HttpOnly; path=/; Domain=.contentful.com
93
+ X-Cdn:
94
+ - Incapsula
95
+ X-Iinfo:
96
+ - 4-3558002-3558003 NNNN CT(160 324 0) RT(1610014540569 49) q(0 0 5 -1) r(7
97
+ 7) U5
98
+ body:
99
+ encoding: ASCII-8BIT
100
+ string: |+
101
+ {
102
+ "name":"Colorful-Demo-Dev-workflow",
103
+ "sys":{
104
+ "type":"Space",
105
+ "id":"2l3j7k267g9k",
106
+ "version":3,
107
+ "createdBy":{
108
+ "sys":{
109
+ "type":"Link",
110
+ "linkType":"User",
111
+ "id":"0PCYk22mt1xD7gTKZhHycN"
112
+ }
113
+ },
114
+ "createdAt":"2019-09-09T14:37:05Z",
115
+ "updatedBy":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"User",
119
+ "id":"0PCYk22mt1xD7gTKZhHycN"
120
+ }
121
+ },
122
+ "updatedAt":"2019-10-25T15:17:48Z",
123
+ "organization":{
124
+ "sys":{
125
+ "type":"Link",
126
+ "linkType":"Organization",
127
+ "id":"1VcAE6naLx3WZBNNUIMMZE"
128
+ }
129
+ }
130
+ }
131
+ }
132
+
133
+ http_version:
134
+ recorded_at: Thu, 07 Jan 2021 10:15:39 GMT
135
+ - request:
136
+ method: get
137
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master
138
+ body:
139
+ encoding: UTF-8
140
+ string: ''
141
+ headers:
142
+ X-Contentful-User-Agent:
143
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
144
+ Authorization:
145
+ - Bearer <ACCESS_TOKEN>
146
+ Content-Type:
147
+ - application/vnd.contentful.management.v1+json
148
+ Connection:
149
+ - close
150
+ Host:
151
+ - api.contentful.com
152
+ User-Agent:
153
+ - http.rb/4.4.1
154
+ response:
155
+ status:
156
+ code: 200
157
+ message: OK
158
+ headers:
159
+ Accept-Ranges:
160
+ - bytes
161
+ Access-Control-Allow-Headers:
162
+ - 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
163
+ Access-Control-Allow-Methods:
164
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Expose-Headers:
168
+ - Etag
169
+ Access-Control-Max-Age:
170
+ - '1728000'
171
+ Cache-Control:
172
+ - no-store
173
+ Cf-Organization-Id:
174
+ - 1VcAE6naLx3WZBNNUIMMZE
175
+ Cf-Space-Id:
176
+ - 2l3j7k267g9k
177
+ Content-Type:
178
+ - application/vnd.contentful.management.v1+json
179
+ Contentful-Api:
180
+ - cma
181
+ Date:
182
+ - Thu, 07 Jan 2021 10:15:42 GMT
183
+ Etag:
184
+ - W/"901485ea9ca14612f2a5764df6b0fc04"
185
+ Referrer-Policy:
186
+ - strict-origin-when-cross-origin
187
+ Server:
188
+ - Contentful
189
+ Strict-Transport-Security:
190
+ - max-age=15768000
191
+ X-Content-Type-Options:
192
+ - nosniff
193
+ X-Contentful-Ratelimit-Hour-Limit:
194
+ - '36000'
195
+ X-Contentful-Ratelimit-Hour-Remaining:
196
+ - '35999'
197
+ X-Contentful-Ratelimit-Reset:
198
+ - '0'
199
+ X-Contentful-Ratelimit-Second-Limit:
200
+ - '10'
201
+ X-Contentful-Ratelimit-Second-Remaining:
202
+ - '9'
203
+ X-Contentful-Request-Id:
204
+ - 9366bf5d97ab32b035c8f5c532b5c646
205
+ X-Contentful-Route:
206
+ - "/spaces/:space_id/environments/:id"
207
+ X-Download-Options:
208
+ - noopen
209
+ X-Frame-Options:
210
+ - ALLOWALL
211
+ X-Permitted-Cross-Domain-Policies:
212
+ - none
213
+ X-Xss-Protection:
214
+ - 1; mode=block
215
+ Content-Length:
216
+ - '827'
217
+ Connection:
218
+ - Close
219
+ Set-Cookie:
220
+ - incap_ses_1209_673446=4xkcB15qUhfkCIajdzvHEE7f9l8AAAAAzl8nYw0WQL216dS3rMMkLQ==;
221
+ path=/; Domain=.contentful.com
222
+ - nlbi_673446=uqrSaaLg+XBNK0neKsJtVwAAAAATBJU71Pl5tybeAllvOETE; path=/; Domain=.contentful.com
223
+ - visid_incap_673446=68Pe7uJMSPq/vuiZN6eRSE7f9l8AAAAAQUIPAAAAAACQENWxP8CRHf+WGIOVFqIY;
224
+ expires=Fri, 07 Jan 2022 10:05:01 GMT; HttpOnly; path=/; Domain=.contentful.com
225
+ X-Cdn:
226
+ - Incapsula
227
+ X-Iinfo:
228
+ - 1-982498-982499 NNNN CT(153 309 0) RT(1610014541353 53) q(0 0 4 -1) r(6 6)
229
+ U5
230
+ body:
231
+ encoding: ASCII-8BIT
232
+ string: |+
233
+ {
234
+ "name":"backup-1",
235
+ "sys":{
236
+ "type":"Environment",
237
+ "id":"master",
238
+ "aliasedEnvironment":{
239
+ "sys":{
240
+ "type":"Link",
241
+ "linkType":"Environment",
242
+ "id":"backup-1"
243
+ }
244
+ },
245
+ "version":3,
246
+ "space":{
247
+ "sys":{
248
+ "type":"Link",
249
+ "linkType":"Space",
250
+ "id":"2l3j7k267g9k"
251
+ }
252
+ },
253
+ "status":{
254
+ "sys":{
255
+ "type":"Link",
256
+ "linkType":"Status",
257
+ "id":"ready"
258
+ }
259
+ },
260
+ "createdBy":{
261
+ "sys":{
262
+ "type":"Link",
263
+ "linkType":"User",
264
+ "id":"6c10tlsIDlE3qvnNoTwYa5"
265
+ }
266
+ },
267
+ "createdAt":"2020-10-05T14:36:26Z",
268
+ "updatedBy":{
269
+ "sys":{
270
+ "type":"Link",
271
+ "linkType":"User",
272
+ "id":"6c10tlsIDlE3qvnNoTwYa5"
273
+ }
274
+ },
275
+ "updatedAt":"2020-10-05T14:36:30Z"
276
+ }
277
+ }
278
+
279
+ http_version:
280
+ recorded_at: Thu, 07 Jan 2021 10:15:40 GMT
281
+ - request:
282
+ method: get
283
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master/entries/2AtqG09C50s7kE66POudAV
284
+ body:
285
+ encoding: UTF-8
286
+ string: ''
287
+ headers:
288
+ X-Contentful-User-Agent:
289
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
290
+ Authorization:
291
+ - Bearer <ACCESS_TOKEN>
292
+ Content-Type:
293
+ - application/vnd.contentful.management.v1+json
294
+ Connection:
295
+ - close
296
+ Host:
297
+ - api.contentful.com
298
+ User-Agent:
299
+ - http.rb/4.4.1
300
+ response:
301
+ status:
302
+ code: 200
303
+ message: OK
304
+ headers:
305
+ Access-Control-Allow-Headers:
306
+ - 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
307
+ Access-Control-Allow-Methods:
308
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
309
+ Access-Control-Allow-Origin:
310
+ - "*"
311
+ Access-Control-Expose-Headers:
312
+ - Etag
313
+ Access-Control-Max-Age:
314
+ - '1728000'
315
+ Cache-Control:
316
+ - no-store
317
+ Cf-Environment-Id:
318
+ - master
319
+ Cf-Environment-Uuid:
320
+ - master
321
+ Cf-Space-Id:
322
+ - 2l3j7k267g9k
323
+ Content-Type:
324
+ - application/vnd.contentful.management.v1+json
325
+ Contentful-Api:
326
+ - cma
327
+ Date:
328
+ - Thu, 07 Jan 2021 10:15:42 GMT
329
+ Etag:
330
+ - '"5027620856603294770"'
331
+ Server:
332
+ - Contentful
333
+ Strict-Transport-Security:
334
+ - max-age=15768000
335
+ X-Content-Type-Options:
336
+ - nosniff
337
+ X-Contentful-Ratelimit-Hour-Limit:
338
+ - '36000'
339
+ X-Contentful-Ratelimit-Hour-Remaining:
340
+ - '35998'
341
+ X-Contentful-Ratelimit-Reset:
342
+ - '0'
343
+ X-Contentful-Ratelimit-Second-Limit:
344
+ - '10'
345
+ X-Contentful-Ratelimit-Second-Remaining:
346
+ - '8'
347
+ X-Contentful-Request-Id:
348
+ - c77b0210baec732686012a1a9e93c675
349
+ X-Contentful-Route:
350
+ - "/spaces/:space/environments/:environment/entries/:id"
351
+ Content-Length:
352
+ - '1460'
353
+ Connection:
354
+ - Close
355
+ Set-Cookie:
356
+ - incap_ses_1209_673446=neaDAj/Cs0vsCIajdzvHEE7f9l8AAAAAuNroBh8yIBDF7Q+nviLEKQ==;
357
+ path=/; Domain=.contentful.com
358
+ - nlbi_673446=KOBNIE0HUA3lhYOrKsJtVwAAAABty07BOgyGRxg4qhvbLoCm; path=/; Domain=.contentful.com
359
+ - visid_incap_673446=AyGHubpJRIOKpTTRYKjD207f9l8AAAAAQUIPAAAAAAA3ewF62GXIoE6x+yEuVlr9;
360
+ expires=Fri, 07 Jan 2022 10:04:56 GMT; HttpOnly; path=/; Domain=.contentful.com
361
+ X-Cdn:
362
+ - Incapsula
363
+ X-Iinfo:
364
+ - 4-3558015-3558016 NNNY CT(0 0 0) RT(1610014542111 81) q(0 0 0 -1) r(5 5) U5
365
+ body:
366
+ encoding: ASCII-8BIT
367
+ string: |
368
+ {
369
+ "metadata": {
370
+ "tags": [
371
+ {
372
+ "sys": {
373
+ "type": "Link",
374
+ "linkType": "Tag",
375
+ "id": "mobQa"
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ "sys": {
381
+ "space": {
382
+ "sys": {
383
+ "type": "Link",
384
+ "linkType": "Space",
385
+ "id": "2l3j7k267g9k"
386
+ }
387
+ },
388
+ "id": "2AtqG09C50s7kE66POudAV",
389
+ "type": "Entry",
390
+ "createdAt": "2020-11-23T13:09:04.355Z",
391
+ "updatedAt": "2020-11-23T14:37:00.106Z",
392
+ "environment": {
393
+ "sys": {
394
+ "id": "master",
395
+ "type": "Link",
396
+ "linkType": "Environment"
397
+ }
398
+ },
399
+ "firstPublishedAt": "2020-11-23T13:11:21.838Z",
400
+ "createdBy": {
401
+ "sys": {
402
+ "type": "Link",
403
+ "linkType": "User",
404
+ "id": "2hGh0i6ODQLEcdHQKgQfrA"
405
+ }
406
+ },
407
+ "updatedBy": {
408
+ "sys": {
409
+ "type": "Link",
410
+ "linkType": "User",
411
+ "id": "2tk1qOdVUXzixfz5dsanLT"
412
+ }
413
+ },
414
+ "publishedCounter": 4,
415
+ "version": 20,
416
+ "contentType": {
417
+ "sys": {
418
+ "type": "Link",
419
+ "linkType": "ContentType",
420
+ "id": "topicArticle"
421
+ }
422
+ }
423
+ },
424
+ "fields": {
425
+ "title": {
426
+ "en-US": "Can't publish this"
427
+ },
428
+ "shortDescription": {
429
+ "en-US": "What is going on here can I still write? changed"
430
+ },
431
+ "featuredImage": {
432
+ "en-US": {
433
+ "sys": {
434
+ "type": "Link",
435
+ "linkType": "Asset",
436
+ "id": "2lxYoWv3LWHe0yhO3w2Yid"
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ http_version:
443
+ recorded_at: Thu, 07 Jan 2021 10:15:41 GMT
444
+ - request:
445
+ method: get
446
+ uri: https://api.contentful.com/spaces/2l3j7k267g9k/environments/master/content_types/topicArticle
447
+ body:
448
+ encoding: UTF-8
449
+ string: ''
450
+ headers:
451
+ X-Contentful-User-Agent:
452
+ - sdk contentful-management.rb/2.13.0; platform ruby/2.6.3; os macOS/18;
453
+ Authorization:
454
+ - Bearer <ACCESS_TOKEN>
455
+ Content-Type:
456
+ - application/vnd.contentful.management.v1+json
457
+ Connection:
458
+ - close
459
+ Host:
460
+ - api.contentful.com
461
+ User-Agent:
462
+ - http.rb/4.4.1
463
+ response:
464
+ status:
465
+ code: 200
466
+ message: OK
467
+ headers:
468
+ Access-Control-Allow-Headers:
469
+ - 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,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace
470
+ Access-Control-Allow-Methods:
471
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
472
+ Access-Control-Allow-Origin:
473
+ - "*"
474
+ Access-Control-Expose-Headers:
475
+ - Etag
476
+ Access-Control-Max-Age:
477
+ - '1728000'
478
+ Cache-Control:
479
+ - no-store
480
+ Cf-Environment-Id:
481
+ - master
482
+ Cf-Environment-Uuid:
483
+ - master
484
+ Cf-Space-Id:
485
+ - 2l3j7k267g9k
486
+ Content-Type:
487
+ - application/vnd.contentful.management.v1+json
488
+ Contentful-Api:
489
+ - cma
490
+ Date:
491
+ - Thu, 07 Jan 2021 10:15:43 GMT
492
+ Etag:
493
+ - '"4974522899569612358"'
494
+ Server:
495
+ - Contentful
496
+ Strict-Transport-Security:
497
+ - max-age=15768000
498
+ X-Content-Type-Options:
499
+ - nosniff
500
+ X-Contentful-Ratelimit-Hour-Limit:
501
+ - '36000'
502
+ X-Contentful-Ratelimit-Hour-Remaining:
503
+ - '35999'
504
+ X-Contentful-Ratelimit-Reset:
505
+ - '0'
506
+ X-Contentful-Ratelimit-Second-Limit:
507
+ - '10'
508
+ X-Contentful-Ratelimit-Second-Remaining:
509
+ - '9'
510
+ X-Contentful-Request-Id:
511
+ - 0b51053b1ac49d268d8ac87e5e39c2be
512
+ X-Contentful-Route:
513
+ - "/spaces/:space/environments/:environment/content_types/:id"
514
+ Content-Length:
515
+ - '3824'
516
+ Connection:
517
+ - Close
518
+ Set-Cookie:
519
+ - incap_ses_1209_673446=QjL4G9jtPFj1CIajdzvHEE/f9l8AAAAAd9rglC+r4x/mZiY67yg6Yw==;
520
+ path=/; Domain=.contentful.com
521
+ - nlbi_673446=XoeUANHUryEh/JIhKsJtVwAAAAA943uwBsL7BajTnIq9/0at; path=/; Domain=.contentful.com
522
+ - visid_incap_673446=8zXqh11eR4yYd//ITWyqZk/f9l8AAAAAQUIPAAAAAACnfPpefYG47IdplymIlqkv;
523
+ expires=Fri, 07 Jan 2022 10:04:58 GMT; HttpOnly; path=/; Domain=.contentful.com
524
+ X-Cdn:
525
+ - Incapsula
526
+ X-Iinfo:
527
+ - 13-3299791-3299792 NNNN CT(159 159 0) RT(1610014542711 54) q(0 0 3 -1) r(6
528
+ 6) U5
529
+ body:
530
+ encoding: ASCII-8BIT
531
+ string: !binary |-
532
+ ewogICJzeXMiOiB7CiAgICAic3BhY2UiOiB7CiAgICAgICJzeXMiOiB7CiAgICAgICAgInR5cGUiOiAiTGluayIsCiAgICAgICAgImxpbmtUeXBlIjogIlNwYWNlIiwKICAgICAgICAiaWQiOiAiMmwzajdrMjY3ZzlrIgogICAgICB9CiAgICB9LAogICAgImlkIjogInRvcGljQXJ0aWNsZSIsCiAgICAidHlwZSI6ICJDb250ZW50VHlwZSIsCiAgICAiY3JlYXRlZEF0IjogIjIwMTktMDktMDlUMTQ6NDE6NTUuNDkwWiIsCiAgICAidXBkYXRlZEF0IjogIjIwMTktMDktMTBUMDc6NTY6MjIuMTE4WiIsCiAgICAiZW52aXJvbm1lbnQiOiB7CiAgICAgICJzeXMiOiB7CiAgICAgICAgImlkIjogIm1hc3RlciIsCiAgICAgICAgInR5cGUiOiAiTGluayIsCiAgICAgICAgImxpbmtUeXBlIjogIkVudmlyb25tZW50IgogICAgICB9CiAgICB9LAogICAgInB1Ymxpc2hlZFZlcnNpb24iOiAzLAogICAgInB1Ymxpc2hlZEF0IjogIjIwMTktMDktMTBUMDc6NTY6MjIuMTE4WiIsCiAgICAiZmlyc3RQdWJsaXNoZWRBdCI6ICIyMDE5LTA5LTA5VDE0OjQyOjEzLjg2MVoiLAogICAgImNyZWF0ZWRCeSI6IHsKICAgICAgInN5cyI6IHsKICAgICAgICAidHlwZSI6ICJMaW5rIiwKICAgICAgICAibGlua1R5cGUiOiAiVXNlciIsCiAgICAgICAgImlkIjogIjBQQ1lrMjJtdDF4RDdnVEtaaEh5Y04iCiAgICAgIH0KICAgIH0sCiAgICAidXBkYXRlZEJ5IjogewogICAgICAic3lzIjogewogICAgICAgICJ0eXBlIjogIkxpbmsiLAogICAgICAgICJsaW5rVHlwZSI6ICJVc2VyIiwKICAgICAgICAiaWQiOiAiMFBDWWsyMm10MXhEN2dUS1poSHljTiIKICAgICAgfQogICAgfSwKICAgICJwdWJsaXNoZWRDb3VudGVyIjogMiwKICAgICJ2ZXJzaW9uIjogNCwKICAgICJwdWJsaXNoZWRCeSI6IHsKICAgICAgInN5cyI6IHsKICAgICAgICAidHlwZSI6ICJMaW5rIiwKICAgICAgICAibGlua1R5cGUiOiAiVXNlciIsCiAgICAgICAgImlkIjogIjBQQ1lrMjJtdDF4RDdnVEtaaEh5Y04iCiAgICAgIH0KICAgIH0KICB9LAogICJkaXNwbGF5RmllbGQiOiAidGl0bGUiLAogICJuYW1lIjogIiPvuI/ig6MtdG9waWMtQXJ0aWNsZSIsCiAgImRlc2NyaXB0aW9uIjogIlRvcGljIGZvciBlZGl0b3JpYWwgY29udGVudCB3L28gYW55IHByZXNlbnRhdGlvbiBvcHRpb25zIiwKICAiZmllbGRzIjogWwogICAgewogICAgICAiaWQiOiAidGl0bGUiLAogICAgICAibmFtZSI6ICJUaXRsZSIsCiAgICAgICJ0eXBlIjogIlN5bWJvbCIsCiAgICAgICJsb2NhbGl6ZWQiOiB0cnVlLAogICAgICAicmVxdWlyZWQiOiBmYWxzZSwKICAgICAgInZhbGlkYXRpb25zIjogW10sCiAgICAgICJkaXNhYmxlZCI6IGZhbHNlLAogICAgICAib21pdHRlZCI6IGZhbHNlCiAgICB9LAogICAgewogICAgICAiaWQiOiAic2hvcnREZXNjcmlwdGlvbiIsCiAgICAgICJuYW1lIjogIlNob3J0IGRlc2NyaXB0aW9uIiwKICAgICAgInR5cGUiOiAiVGV4dCIsCiAgICAgICJsb2NhbGl6ZWQiOiB0cnVlLAogICAgICAicmVxdWlyZWQiOiBmYWxzZSwKICAgICAgInZhbGlkYXRpb25zIjogW10sCiAgICAgICJkaXNhYmxlZCI6IGZhbHNlLAogICAgICAib21pdHRlZCI6IGZhbHNlCiAgICB9LAogICAgewogICAgICAiaWQiOiAicHVibGlzaGVkRGF0ZSIsCiAgICAgICJuYW1lIjogIlB1Ymxpc2hlZCBkYXRlIiwKICAgICAgInR5cGUiOiAiRGF0ZSIsCiAgICAgICJsb2NhbGl6ZWQiOiBmYWxzZSwKICAgICAgInJlcXVpcmVkIjogZmFsc2UsCiAgICAgICJ2YWxpZGF0aW9ucyI6IFtdLAogICAgICAiZGlzYWJsZWQiOiBmYWxzZSwKICAgICAgIm9taXR0ZWQiOiBmYWxzZQogICAgfSwKICAgIHsKICAgICAgImlkIjogImZlYXR1cmVkSW1hZ2UiLAogICAgICAibmFtZSI6ICJGZWF0dXJlZCBpbWFnZSIsCiAgICAgICJ0eXBlIjogIkxpbmsiLAogICAgICAibG9jYWxpemVkIjogdHJ1ZSwKICAgICAgInJlcXVpcmVkIjogZmFsc2UsCiAgICAgICJ2YWxpZGF0aW9ucyI6IFtdLAogICAgICAiZGlzYWJsZWQiOiBmYWxzZSwKICAgICAgIm9taXR0ZWQiOiBmYWxzZSwKICAgICAgImxpbmtUeXBlIjogIkFzc2V0IgogICAgfSwKICAgIHsKICAgICAgImlkIjogImludHJvIiwKICAgICAgIm5hbWUiOiAiSW50cm8iLAogICAgICAidHlwZSI6ICJUZXh0IiwKICAgICAgImxvY2FsaXplZCI6IHRydWUsCiAgICAgICJyZXF1aXJlZCI6IGZhbHNlLAogICAgICAidmFsaWRhdGlvbnMiOiBbXSwKICAgICAgImRpc2FibGVkIjogZmFsc2UsCiAgICAgICJvbWl0dGVkIjogZmFsc2UKICAgIH0sCiAgICB7CiAgICAgICJpZCI6ICJib2R5IiwKICAgICAgIm5hbWUiOiAiQm9keSIsCiAgICAgICJ0eXBlIjogIlJpY2hUZXh0IiwKICAgICAgImxvY2FsaXplZCI6IHRydWUsCiAgICAgICJyZXF1aXJlZCI6IGZhbHNlLAogICAgICAidmFsaWRhdGlvbnMiOiBbCiAgICAgICAgewogICAgICAgICAgIm5vZGVzIjoge30KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJlbmFibGVkTm9kZVR5cGVzIjogWwogICAgICAgICAgICAiaGVhZGluZy00IiwKICAgICAgICAgICAgIm9yZGVyZWQtbGlzdCIsCiAgICAgICAgICAgICJ1bm9yZGVyZWQtbGlzdCIsCiAgICAgICAgICAgICJociIsCiAgICAgICAgICAgICJibG9ja3F1b3RlIiwKICAgICAgICAgICAgImVtYmVkZGVkLWVudHJ5LWJsb2NrIiwKICAgICAgICAgICAgImVtYmVkZGVkLWFzc2V0LWJsb2NrIiwKICAgICAgICAgICAgImh5cGVybGluayIsCiAgICAgICAgICAgICJlbnRyeS1oeXBlcmxpbmsiLAogICAgICAgICAgICAiZW1iZWRkZWQtZW50cnktaW5saW5lIiwKICAgICAgICAgICAgImhlYWRpbmctNSIsCiAgICAgICAgICAgICJoZWFkaW5nLTYiCiAgICAgICAgICBdLAogICAgICAgICAgIm1lc3NhZ2UiOiAiT25seSBoZWFkaW5nIDQsIG9yZGVyZWQgbGlzdCwgdW5vcmRlcmVkIGxpc3QsIGhvcml6b250YWwgcnVsZSwgcXVvdGUsIGJsb2NrIGVudHJ5LCBhc3NldCwgbGluayB0byBVcmwsIGxpbmsgdG8gZW50cnksIGlubGluZSBlbnRyeSwgaGVhZGluZyA1LCBhbmQgaGVhZGluZyA2IG5vZGVzIGFyZSBhbGxvd2VkIgogICAgICAgIH0KICAgICAgXSwKICAgICAgImRpc2FibGVkIjogZmFsc2UsCiAgICAgICJvbWl0dGVkIjogZmFsc2UKICAgIH0sCiAgICB7CiAgICAgICJpZCI6ICJ0YWdzIiwKICAgICAgIm5hbWUiOiAiVGFncyIsCiAgICAgICJ0eXBlIjogIkFycmF5IiwKICAgICAgImxvY2FsaXplZCI6IHRydWUsCiAgICAgICJyZXF1aXJlZCI6IGZhbHNlLAogICAgICAidmFsaWRhdGlvbnMiOiBbXSwKICAgICAgImRpc2FibGVkIjogZmFsc2UsCiAgICAgICJvbWl0dGVkIjogZmFsc2UsCiAgICAgICJpdGVtcyI6IHsKICAgICAgICAidHlwZSI6ICJTeW1ib2wiLAogICAgICAgICJ2YWxpZGF0aW9ucyI6IFtdCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJpZCI6ICJhdXRob3IiLAogICAgICAibmFtZSI6ICJBdXRob3IiLAogICAgICAidHlwZSI6ICJBcnJheSIsCiAgICAgICJsb2NhbGl6ZWQiOiBmYWxzZSwKICAgICAgInJlcXVpcmVkIjogZmFsc2UsCiAgICAgICJ2YWxpZGF0aW9ucyI6IFtdLAogICAgICAiZGlzYWJsZWQiOiBmYWxzZSwKICAgICAgIm9taXR0ZWQiOiBmYWxzZSwKICAgICAgIml0ZW1zIjogewogICAgICAgICJ0eXBlIjogIkxpbmsiLAogICAgICAgICJ2YWxpZGF0aW9ucyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImxpbmtDb250ZW50VHlwZSI6IFsKICAgICAgICAgICAgICAidG9waWNBdXRob3IiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJsaW5rVHlwZSI6ICJFbnRyeSIKICAgICAgfQogICAgfQogIF0KfQo=
533
+ http_version:
534
+ recorded_at: Thu, 07 Jan 2021 10:15:41 GMT
535
+ recorded_with: VCR 4.0.0
@@ -457,6 +457,37 @@ module Contentful
457
457
  end
458
458
 
459
459
  describe 'issues' do
460
+ describe 'metadata and tags do not break entry fetching - #219' do
461
+ let(:space_id) { '2l3j7k267g9k' }
462
+ let(:space) { client.spaces.find(space_id) }
463
+ let(:environment) { space.environments.find('master') }
464
+ let(:asset_id) { '2lxYoWv3LWHe0yhO3w2Yid' }
465
+
466
+ it 'can load an entry with tags' do
467
+ vcr('asset/issue_219') {
468
+ expect {
469
+ entry = environment.assets.find(asset_id)
470
+ }.not_to raise_error
471
+ }
472
+ end
473
+
474
+ it 'hydrates tags' do
475
+ vcr('asset/issue_219') {
476
+ asset = environment.assets.find(asset_id)
477
+ expect(asset.metadata[:tags].first).to be_a Contentful::Management::Link
478
+ }
479
+ end
480
+
481
+ it 'loads tag links with their proper attributes' do
482
+ vcr('asset/issue_219') {
483
+ asset = environment.assets.find(asset_id)
484
+ tag = asset.metadata[:tags].first
485
+ expect(tag.id).to eq 'mobQa'
486
+ expect(tag.link_type).to eq 'Tag'
487
+ }
488
+ end
489
+ end
490
+
460
491
  describe "Pagination on assets doesn't work without first calling limit - #143" do
461
492
  it 'shouldnt break on next page without parameters on original query' do
462
493
  vcr('asset/143_assets_next_page') do
@@ -870,6 +870,35 @@ describe Contentful::Management::Entry do
870
870
  let(:space) { client.spaces.find(space_id) }
871
871
  let(:environment) { space.environments.find('master') }
872
872
 
873
+ describe 'metadata and tags do not break entry fetching - #219' do
874
+ let(:space_id) { '2l3j7k267g9k' }
875
+ let(:entry_id) { '2AtqG09C50s7kE66POudAV' }
876
+
877
+ it 'can load an entry with tags' do
878
+ vcr('entry/issue_219') {
879
+ expect {
880
+ entry = environment.entries.find(entry_id)
881
+ }.not_to raise_error
882
+ }
883
+ end
884
+
885
+ it 'hydrates tags' do
886
+ vcr('entry/issue_219') {
887
+ entry = environment.entries.find(entry_id)
888
+ expect(entry.metadata[:tags].first).to be_a Contentful::Management::Link
889
+ }
890
+ end
891
+
892
+ it 'loads tag links with their proper attributes' do
893
+ vcr('entry/issue_219') {
894
+ entry = environment.entries.find(entry_id)
895
+ tag = entry.metadata[:tags].first
896
+ expect(tag.id).to eq 'mobQa'
897
+ expect(tag.link_type).to eq 'Tag'
898
+ }
899
+ end
900
+ end
901
+
873
902
  describe 'json fields do not get reset on save - #215' do
874
903
  it 'can load a json array, modify it, save it, and retrieve it' do
875
904
  vcr('entry/issue_215_1') {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Protas
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-09 00:00:00.000000000 Z
13
+ date: 2021-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -372,6 +372,7 @@ files:
372
372
  - lib/contentful/management/resource/environment_aware.rb
373
373
  - lib/contentful/management/resource/field_aware.rb
374
374
  - lib/contentful/management/resource/fields.rb
375
+ - lib/contentful/management/resource/metadata.rb
375
376
  - lib/contentful/management/resource/publisher.rb
376
377
  - lib/contentful/management/resource/refresher.rb
377
378
  - lib/contentful/management/resource/system_properties.rb
@@ -392,6 +393,7 @@ files:
392
393
  - lib/contentful/management/space_user_methods_factory.rb
393
394
  - lib/contentful/management/space_webhook_methods_factory.rb
394
395
  - lib/contentful/management/support.rb
396
+ - lib/contentful/management/tag.rb
395
397
  - lib/contentful/management/ui_extension.rb
396
398
  - lib/contentful/management/upload.rb
397
399
  - lib/contentful/management/user.rb
@@ -451,6 +453,7 @@ files:
451
453
  - spec/fixtures/vcr_cassettes/asset/destroy_published.yml
452
454
  - spec/fixtures/vcr_cassettes/asset/find.yml
453
455
  - spec/fixtures/vcr_cassettes/asset/find_not_found.yml
456
+ - spec/fixtures/vcr_cassettes/asset/issue_219.yml
454
457
  - spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml
455
458
  - spec/fixtures/vcr_cassettes/asset/locale.yml
456
459
  - spec/fixtures/vcr_cassettes/asset/process.yml
@@ -571,6 +574,7 @@ files:
571
574
  - spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
572
575
  - spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
573
576
  - spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
577
+ - spec/fixtures/vcr_cassettes/entry/issue_219.yml
574
578
  - spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
575
579
  - spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
576
580
  - spec/fixtures/vcr_cassettes/entry/issue_61_3.yml
@@ -860,6 +864,7 @@ test_files:
860
864
  - spec/fixtures/vcr_cassettes/asset/destroy_published.yml
861
865
  - spec/fixtures/vcr_cassettes/asset/find.yml
862
866
  - spec/fixtures/vcr_cassettes/asset/find_not_found.yml
867
+ - spec/fixtures/vcr_cassettes/asset/issue_219.yml
863
868
  - spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml
864
869
  - spec/fixtures/vcr_cassettes/asset/locale.yml
865
870
  - spec/fixtures/vcr_cassettes/asset/process.yml
@@ -980,6 +985,7 @@ test_files:
980
985
  - spec/fixtures/vcr_cassettes/entry/issue_215_1.yml
981
986
  - spec/fixtures/vcr_cassettes/entry/issue_215_2.yml
982
987
  - spec/fixtures/vcr_cassettes/entry/issue_215_3.yml
988
+ - spec/fixtures/vcr_cassettes/entry/issue_219.yml
983
989
  - spec/fixtures/vcr_cassettes/entry/issue_61_1.yml
984
990
  - spec/fixtures/vcr_cassettes/entry/issue_61_2.yml
985
991
  - spec/fixtures/vcr_cassettes/entry/issue_61_3.yml