contentful 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +37 -46
  4. data/lib/contentful/array.rb +8 -1
  5. data/lib/contentful/entry.rb +9 -9
  6. data/lib/contentful/fields_resource.rb +9 -8
  7. data/lib/contentful/resource_builder.rb +1 -7
  8. data/lib/contentful/support.rb +22 -0
  9. data/lib/contentful/version.rb +1 -1
  10. data/spec/array_spec.rb +21 -0
  11. data/spec/fixtures/vcr_cassettes/array/nested_resources.yml +159 -0
  12. metadata +5 -106
  13. data/coverage/.last_run.json +0 -5
  14. data/coverage/.resultset.json +0 -1887
  15. data/coverage/.resultset.json.lock +0 -0
  16. data/coverage/assets/0.10.0/application.css +0 -799
  17. data/coverage/assets/0.10.0/application.js +0 -1707
  18. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  19. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  20. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  21. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  22. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  23. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  24. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  25. data/coverage/assets/0.10.0/loading.gif +0 -0
  26. data/coverage/assets/0.10.0/magnify.png +0 -0
  27. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  28. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  29. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  30. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  32. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  35. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  36. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  37. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  38. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  39. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  40. data/coverage/index.html +0 -11816
  41. data/doc/Contentful.html +0 -153
  42. data/doc/Contentful/AccessDenied.html +0 -161
  43. data/doc/Contentful/Array.html +0 -743
  44. data/doc/Contentful/ArrayCoercion.html +0 -244
  45. data/doc/Contentful/ArrayLike.html +0 -627
  46. data/doc/Contentful/Asset.html +0 -475
  47. data/doc/Contentful/BadRequest.html +0 -161
  48. data/doc/Contentful/BaseCoercion.html +0 -447
  49. data/doc/Contentful/BaseResource.html +0 -599
  50. data/doc/Contentful/BooleanCoercion.html +0 -244
  51. data/doc/Contentful/Client.html +0 -1606
  52. data/doc/Contentful/Constants.html +0 -636
  53. data/doc/Contentful/ContentType.html +0 -614
  54. data/doc/Contentful/ContentTypeCache.html +0 -430
  55. data/doc/Contentful/DateCoercion.html +0 -240
  56. data/doc/Contentful/DeletedAsset.html +0 -159
  57. data/doc/Contentful/DeletedEntry.html +0 -159
  58. data/doc/Contentful/DynamicEntry.html +0 -214
  59. data/doc/Contentful/Entry.html +0 -273
  60. data/doc/Contentful/Error.html +0 -424
  61. data/doc/Contentful/Field.html +0 -929
  62. data/doc/Contentful/FieldsResource.html +0 -501
  63. data/doc/Contentful/File.html +0 -520
  64. data/doc/Contentful/FloatCoercion.html +0 -240
  65. data/doc/Contentful/IntegerCoercion.html +0 -240
  66. data/doc/Contentful/Link.html +0 -251
  67. data/doc/Contentful/LinkCoercion.html +0 -160
  68. data/doc/Contentful/Locale.html +0 -447
  69. data/doc/Contentful/Location.html +0 -385
  70. data/doc/Contentful/LocationCoercion.html +0 -240
  71. data/doc/Contentful/NotFound.html +0 -161
  72. data/doc/Contentful/ObjectCoercion.html +0 -240
  73. data/doc/Contentful/RateLimitExceeded.html +0 -161
  74. data/doc/Contentful/Request.html +0 -889
  75. data/doc/Contentful/Resource.html +0 -117
  76. data/doc/Contentful/Resource/ArrayLike.html +0 -627
  77. data/doc/Contentful/Resource/AssetFields.html +0 -246
  78. data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
  79. data/doc/Contentful/Resource/ClassMethods.html +0 -378
  80. data/doc/Contentful/Resource/CustomResource.html +0 -119
  81. data/doc/Contentful/Resource/Fields.html +0 -288
  82. data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
  83. data/doc/Contentful/Resource/LocalizedFields.html +0 -305
  84. data/doc/Contentful/Resource/SystemProperties.html +0 -205
  85. data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
  86. data/doc/Contentful/ResourceBuilder.html +0 -969
  87. data/doc/Contentful/Response.html +0 -641
  88. data/doc/Contentful/ServerError.html +0 -161
  89. data/doc/Contentful/ServiceUnavailable.html +0 -161
  90. data/doc/Contentful/Space.html +0 -395
  91. data/doc/Contentful/StringCoercion.html +0 -244
  92. data/doc/Contentful/Support.html +0 -550
  93. data/doc/Contentful/SymbolCoercion.html +0 -171
  94. data/doc/Contentful/Sync.html +0 -655
  95. data/doc/Contentful/SyncPage.html +0 -801
  96. data/doc/Contentful/TextCoercion.html +0 -171
  97. data/doc/Contentful/Unauthorized.html +0 -161
  98. data/doc/Contentful/UnparsableJson.html +0 -161
  99. data/doc/Contentful/UnparsableResource.html +0 -137
  100. data/doc/_index.html +0 -537
  101. data/doc/class_list.html +0 -51
  102. data/doc/css/common.css +0 -1
  103. data/doc/css/full_list.css +0 -58
  104. data/doc/css/style.css +0 -481
  105. data/doc/file.CHANGELOG.html +0 -506
  106. data/doc/file.LICENSE.html +0 -72
  107. data/doc/file.README.html +0 -565
  108. data/doc/file_list.html +0 -66
  109. data/doc/frames.html +0 -17
  110. data/doc/index.html +0 -565
  111. data/doc/js/app.js +0 -243
  112. data/doc/js/full_list.js +0 -216
  113. data/doc/js/jquery.js +0 -4
  114. data/doc/method_list.html +0 -1115
  115. data/doc/top-level-namespace.html +0 -112
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 523acf1290d29cdeb2972c104b7897a1e41909b2
4
- data.tar.gz: 4ed687d95992bac7c04427d244c98e9bc01ce5d4
3
+ metadata.gz: a7cecffd2cc6dc1c3b8becbfe965693955299401
4
+ data.tar.gz: 39bcfd617abf8f802cd18adb9c976965f5cec43f
5
5
  SHA512:
6
- metadata.gz: 1cacccbb9ea40372b8bb393d5ccc6e3b8b6fdeaeff9598cecd165e7a353b6b60e4aa6dc64b44756c934abb6de9016ad113df57802ace3d6102ac3dda46c2dbe4
7
- data.tar.gz: 692965f112c62b3b9e4d3dfbaf3ca37add478d78526ce53993e3cab8b394e2c0e6debc78ac58120a7ade93772d25ab622c92bd819ccc2afcdd249564ea623151
6
+ metadata.gz: 0a422e32a95b9d17d349d0b33a55e6b8dd02a3e0e635e5c1de4843e545895d9e0fce0c473372b8982fd4b22b7d2e804db3844195cc18f5e7212d2485a2f760aa
7
+ data.tar.gz: 748426ae43bac7533819f3ea42704894b715ab71a3b8f2ca4c6cc1d0bc47e4ff281b23c431c1f13028b2eb80095874c5650b896503717913136882ea0233fe7c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 2.1.2
6
+ ### Fixed
7
+ * Fixed Marshalling for Arrays with deeply nested resources. [#138](https://github.com/contentful/contentful.rb/issues/138)
8
+
3
9
  ## 2.1.1
4
10
 
5
11
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,33 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- contentful (2.1.1)
4
+ contentful (2.1.2)
5
5
  http (> 0.8, < 3.0)
6
6
  multi_json (~> 1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.5.0)
11
+ addressable (2.5.1)
12
12
  public_suffix (~> 2.0, >= 2.0.2)
13
13
  ast (2.3.0)
14
14
  coderay (1.1.1)
15
- coveralls (0.8.17)
15
+ coveralls (0.8.21)
16
16
  json (>= 1.8, < 3)
17
- simplecov (~> 0.12.0)
17
+ simplecov (~> 0.14.1)
18
18
  term-ansicolor (~> 1.3)
19
- thor (~> 0.19.1)
19
+ thor (~> 0.19.4)
20
20
  tins (~> 1.6)
21
21
  crack (0.4.3)
22
22
  safe_yaml (~> 1.0.0)
23
- diff-lcs (1.2.5)
23
+ diff-lcs (1.3)
24
24
  docile (1.1.5)
25
25
  domain_name (0.5.20170404)
26
26
  unf (>= 0.0.5, < 1.0.0)
27
- ffi (1.9.14)
28
- ffi (1.9.14-java)
27
+ ffi (1.9.18)
29
28
  formatador (0.2.5)
30
- guard (2.14.0)
29
+ guard (2.14.1)
31
30
  formatador (>= 0.2.4)
32
31
  listen (>= 2.7, < 4.0)
33
32
  lumberjack (~> 1.0)
@@ -41,13 +40,13 @@ GEM
41
40
  guard (~> 2.1)
42
41
  guard-compat (~> 1.1)
43
42
  rspec (>= 2.99.0, < 4.0)
44
- guard-rubocop (1.2.0)
43
+ guard-rubocop (1.3.0)
45
44
  guard (~> 2.0)
46
45
  rubocop (~> 0.20)
47
- guard-yard (2.1.4)
46
+ guard-yard (2.2.0)
48
47
  guard (>= 1.1.0)
49
48
  yard (>= 0.7.0)
50
- hashdiff (0.3.1)
49
+ hashdiff (0.3.4)
51
50
  http (2.2.2)
52
51
  addressable (~> 2.3)
53
52
  http-cookie (~> 1.0)
@@ -57,50 +56,45 @@ GEM
57
56
  domain_name (~> 0.5)
58
57
  http-form_data (1.0.3)
59
58
  http_parser.rb (0.6.0)
60
- json (2.0.2)
61
- json (2.0.2-java)
59
+ json (2.1.0)
62
60
  listen (3.0.6)
63
61
  rb-fsevent (>= 0.9.3)
64
62
  rb-inotify (>= 0.9.7)
65
- lumberjack (1.0.10)
63
+ lumberjack (1.0.12)
66
64
  method_source (0.8.2)
67
65
  multi_json (1.12.1)
68
66
  nenv (0.3.0)
69
67
  notiffany (0.1.1)
70
68
  nenv (~> 0.1)
71
69
  shellany (~> 0.0)
72
- parser (2.3.3.1)
70
+ parser (2.4.0.0)
73
71
  ast (~> 2.2)
74
72
  powerpack (0.1.1)
75
73
  pry (0.10.4)
76
74
  coderay (~> 1.1.0)
77
75
  method_source (~> 0.8.1)
78
76
  slop (~> 3.4)
79
- pry (0.10.4-java)
80
- coderay (~> 1.1.0)
81
- method_source (~> 0.8.1)
82
- slop (~> 3.4)
83
- spoon (~> 0.0)
84
- public_suffix (2.0.4)
85
- rainbow (2.1.0)
77
+ public_suffix (2.0.5)
78
+ rainbow (2.2.2)
79
+ rake
86
80
  rake (10.5.0)
87
- rb-fsevent (0.9.8)
88
- rb-inotify (0.9.7)
89
- ffi (>= 0.5.0)
90
- rr (1.2.0)
91
- rspec (3.5.0)
92
- rspec-core (~> 3.5.0)
93
- rspec-expectations (~> 3.5.0)
94
- rspec-mocks (~> 3.5.0)
95
- rspec-core (3.5.4)
96
- rspec-support (~> 3.5.0)
97
- rspec-expectations (3.5.0)
81
+ rb-fsevent (0.10.2)
82
+ rb-inotify (0.9.10)
83
+ ffi (>= 0.5.0, < 2)
84
+ rr (1.2.1)
85
+ rspec (3.6.0)
86
+ rspec-core (~> 3.6.0)
87
+ rspec-expectations (~> 3.6.0)
88
+ rspec-mocks (~> 3.6.0)
89
+ rspec-core (3.6.0)
90
+ rspec-support (~> 3.6.0)
91
+ rspec-expectations (3.6.0)
98
92
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.5.0)
100
- rspec-mocks (3.5.0)
93
+ rspec-support (~> 3.6.0)
94
+ rspec-mocks (3.6.0)
101
95
  diff-lcs (>= 1.2.0, < 2.0)
102
- rspec-support (~> 3.5.0)
103
- rspec-support (3.5.0)
96
+ rspec-support (~> 3.6.0)
97
+ rspec-support (3.6.0)
104
98
  rubocop (0.41.2)
105
99
  parser (>= 2.3.1.1, < 3.0)
106
100
  powerpack (~> 0.1)
@@ -111,31 +105,28 @@ GEM
111
105
  rubygems-tasks (0.2.4)
112
106
  safe_yaml (1.0.4)
113
107
  shellany (0.0.1)
114
- simplecov (0.12.0)
108
+ simplecov (0.14.1)
115
109
  docile (~> 1.1.0)
116
110
  json (>= 1.8, < 3)
117
111
  simplecov-html (~> 0.10.0)
118
- simplecov-html (0.10.0)
112
+ simplecov-html (0.10.1)
119
113
  slop (3.6.0)
120
- spoon (0.0.6)
121
- ffi
122
- term-ansicolor (1.4.0)
114
+ term-ansicolor (1.6.0)
123
115
  tins (~> 1.0)
124
116
  thor (0.19.4)
125
117
  tins (1.6.0)
126
118
  unf (0.1.4)
127
119
  unf_ext
128
120
  unf_ext (0.0.7.4)
129
- unicode-display_width (1.1.2)
121
+ unicode-display_width (1.3.0)
130
122
  vcr (3.0.3)
131
123
  webmock (1.24.6)
132
124
  addressable (>= 2.3.6)
133
125
  crack (>= 0.3.2)
134
126
  hashdiff
135
- yard (0.9.5)
127
+ yard (0.9.9)
136
128
 
137
129
  PLATFORMS
138
- java
139
130
  ruby
140
131
 
141
132
  DEPENDENCIES
@@ -37,7 +37,14 @@ module Contentful
37
37
  @total = raw.fetch('total', nil)
38
38
  @limit = raw.fetch('limit', nil)
39
39
  @skip = raw.fetch('skip', nil)
40
- @items = raw.fetch('items', [])
40
+ @items = raw.fetch('items', []).map do |item|
41
+ require_relative 'resource_builder'
42
+ ResourceBuilder.new(
43
+ item.raw,
44
+ raw_object[:configuration].merge(includes_for_single: Support.includes_from_response(raw, false)),
45
+ item.respond_to?(:localized) ? item.localized : false
46
+ ).run
47
+ end
41
48
  end
42
49
 
43
50
  # @private
@@ -12,9 +12,9 @@ module Contentful
12
12
 
13
13
  private
14
14
 
15
- def coerce(field_id, value, localized, includes)
16
- return build_nested_resource(value, localized, includes) if Support.link?(value)
17
- return coerce_link_array(value, localized, includes) if Support.link_array?(value)
15
+ def coerce(field_id, value, includes)
16
+ return build_nested_resource(value, includes) if Support.link?(value)
17
+ return coerce_link_array(value, includes) if Support.link_array?(value)
18
18
 
19
19
  content_type = ContentTypeCache.cache_get(sys[:space].id, sys[:content_type].id)
20
20
 
@@ -23,13 +23,13 @@ module Contentful
23
23
  return content_type_field.coerce(value) unless content_type_field.nil?
24
24
  end
25
25
 
26
- super(field_id, value, localized, includes)
26
+ super(field_id, value, includes)
27
27
  end
28
28
 
29
- def coerce_link_array(value, localized, includes)
29
+ def coerce_link_array(value, includes)
30
30
  items = []
31
31
  value.each do |link|
32
- items << build_nested_resource(link, localized, includes)
32
+ items << build_nested_resource(link, includes)
33
33
  end
34
34
 
35
35
  items
@@ -39,16 +39,16 @@ module Contentful
39
39
  # in case one of the included items has a reference in an upper level,
40
40
  # so we can keep the include chain for that object as well
41
41
  # Any included object after the maximum include resolution depth will be just a Link
42
- def build_nested_resource(value, localized, includes)
42
+ def build_nested_resource(value, includes)
43
43
  if @depth < @configuration.fetch(:max_include_resolution_depth, 20)
44
44
  resource = Support.resource_for_link(value, includes)
45
- return resolve_include(resource, localized, includes) unless resource.nil?
45
+ return resolve_include(resource, includes) unless resource.nil?
46
46
  end
47
47
 
48
48
  build_link(value)
49
49
  end
50
50
 
51
- def resolve_include(resource, localized, includes)
51
+ def resolve_include(resource, includes)
52
52
  require_relative 'resource_builder'
53
53
 
54
54
  ResourceBuilder.new(
@@ -4,10 +4,13 @@ require_relative 'base_resource'
4
4
  module Contentful
5
5
  # Base definition of a Contentful Resource containing Field properties
6
6
  class FieldsResource < BaseResource
7
+ attr_reader :localized
8
+
7
9
  def initialize(item, _configuration, localized = false, includes = [], *)
8
10
  super
9
11
 
10
- @fields = hydrate_fields(localized, includes)
12
+ @localized = localized
13
+ @fields = hydrate_fields(includes)
11
14
 
12
15
  define_fields_methods!
13
16
  end
@@ -45,15 +48,15 @@ module Contentful
45
48
  {
46
49
  configuration: @configuration,
47
50
  raw: raw_with_links,
48
- localized: locales.size > 1
51
+ localized: localized
49
52
  }
50
53
  end
51
54
 
52
55
  # @private
53
56
  def marshal_load(raw_object)
54
57
  super(raw_object)
55
- localized = raw_object[:localized]
56
- @fields = hydrate_fields(localized, raw_object[:configuration].fetch(:includes_for_single, []))
58
+ @localized = raw_object[:localized]
59
+ @fields = hydrate_fields(raw_object[:configuration].fetch(:includes_for_single, []))
57
60
  define_fields_methods!
58
61
  end
59
62
 
@@ -78,7 +81,7 @@ module Contentful
78
81
  end
79
82
  end
80
83
 
81
- def hydrate_fields(localized, includes)
84
+ def hydrate_fields(includes)
82
85
  return {} unless raw.key?('fields')
83
86
 
84
87
  locale = internal_resource_locale
@@ -91,7 +94,6 @@ module Contentful
91
94
  result[loc][Support.snakify(name).to_sym] = coerce(
92
95
  Support.snakify(name),
93
96
  value,
94
- localized,
95
97
  includes
96
98
  )
97
99
  end
@@ -101,7 +103,6 @@ module Contentful
101
103
  result[locale][Support.snakify(name).to_sym] = coerce(
102
104
  Support.snakify(name),
103
105
  value,
104
- localized,
105
106
  includes
106
107
  )
107
108
  end
@@ -112,7 +113,7 @@ module Contentful
112
113
 
113
114
  protected
114
115
 
115
- def coerce(_field_id, value, _localized, _includes)
116
+ def coerce(_field_id, value, _includes)
116
117
  value
117
118
  end
118
119
  end
@@ -78,13 +78,7 @@ module Contentful
78
78
  end
79
79
 
80
80
  def fetch_includes
81
- includes = json['items'].dup
82
- %w(Entry Asset).each do |type|
83
- if json.fetch('includes', {}).key?(type)
84
- includes.concat(json['includes'].fetch(type, []))
85
- end
86
- end
87
- includes
81
+ Support.includes_from_response(json)
88
82
  end
89
83
 
90
84
  def resource_class(item)
@@ -49,6 +49,28 @@ module Contentful
49
49
  i['sys']['type'] == link['sys']['linkType']
50
50
  end
51
51
  end
52
+
53
+ # Returns combined include array from an API Response
54
+ #
55
+ # @param [Hash] json JSON Response
56
+ # @param [Bool] raw Response pre-proccessed?
57
+ #
58
+ # @return [Array]
59
+ def includes_from_response(json, raw = true)
60
+ includes = if raw
61
+ json['items'].dup
62
+ else
63
+ json['items'].map(&:raw)
64
+ end
65
+
66
+ %w(Entry Asset).each do |type|
67
+ if json.fetch('includes', {}).key?(type)
68
+ includes.concat(json['includes'].fetch(type, []))
69
+ end
70
+ end
71
+
72
+ includes
73
+ end
52
74
  end
53
75
  end
54
76
  end
@@ -1,5 +1,5 @@
1
1
  # Contentful Namespace
2
2
  module Contentful
3
3
  # Gem Version
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
5
5
  end
data/spec/array_spec.rb CHANGED
@@ -73,5 +73,26 @@ describe Contentful::Array do
73
73
  expect(re_array.skip).to eq array.skip
74
74
  expect(re_array.items).to eq array.items
75
75
  end
76
+
77
+ it 'marshals nested includes propertly - #138' do
78
+ vcr('array/nested_resources') {
79
+ client = create_client(
80
+ space: 'j8tb59fszch7',
81
+ access_token: '5f711401f965951eb724ac72ac905e13d892294ba209268f13a9b32e896c8694',
82
+ dynamic_entries: :auto,
83
+ max_include_resolution_depth: 5
84
+ )
85
+ entries = client.entries(content_type: 'child')
86
+ rehydrated = Marshal.load(Marshal.dump(entries))
87
+
88
+ expect(entries.inspect).to eq rehydrated.inspect
89
+
90
+ expect(entries.first.image1.url).to eq rehydrated.first.image1.url
91
+ expect(entries.last.image1.url).to eq rehydrated.last.image1.url
92
+
93
+ expect(entries.first.image2.url).to eq rehydrated.first.image2.url
94
+ expect(entries.last.image2.url).to eq rehydrated.last.image2.url
95
+ }
96
+ end
76
97
  end
77
98
  end
@@ -0,0 +1,159 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cdn.contentful.com/spaces/j8tb59fszch7/content_types?limit=1000
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful.rb/2.1.1; platform ruby/2.4.1; os macOS/16;
12
+ Authorization:
13
+ - Bearer 5f711401f965951eb724ac72ac905e13d892294ba209268f13a9b32e896c8694
14
+ Content-Type:
15
+ - application/vnd.contentful.delivery.v1+json
16
+ Accept-Encoding:
17
+ - gzip
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - cdn.contentful.com
22
+ User-Agent:
23
+ - http.rb/2.2.2
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
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
31
+ Access-Control-Allow-Methods:
32
+ - GET,HEAD,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Expose-Headers:
36
+ - Etag
37
+ Access-Control-Max-Age:
38
+ - '86400'
39
+ Cache-Control:
40
+ - max-age=0
41
+ Content-Encoding:
42
+ - gzip
43
+ Content-Type:
44
+ - application/vnd.contentful.delivery.v1+json
45
+ Etag:
46
+ - W/"dbd86bc89681ff36b482b61f9acf6336"
47
+ Server:
48
+ - Contentful
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Contentful-Request-Id:
52
+ - 2643d7904927f996839e1f7b7fc8db3a
53
+ Content-Length:
54
+ - '458'
55
+ Accept-Ranges:
56
+ - bytes
57
+ Date:
58
+ - Thu, 03 Aug 2017 16:22:25 GMT
59
+ Via:
60
+ - 1.1 varnish
61
+ Age:
62
+ - '0'
63
+ Connection:
64
+ - close
65
+ X-Served-By:
66
+ - cache-gig17024-GIG
67
+ X-Cache:
68
+ - MISS
69
+ X-Cache-Hits:
70
+ - '0'
71
+ X-Timer:
72
+ - S1501777345.028288,VS0,VE442
73
+ Vary:
74
+ - Accept-Encoding
75
+ body:
76
+ encoding: ASCII-8BIT
77
+ string: !binary |-
78
+ H4sIAAAAAAAAA9VVO2/CMBDe+RWR54KSkJCSDVXt1K1MrRhMYoqL86htkALiv/fsPHCiQJ9ShZfkzr73fXeHgWUhUQgUWgf4BUIWOQEKzTjHBQLe8Ua9kZnEDPiupsSG5kDYmmA0oRIox7ZLBpUkURpftMZSb8eMNiVyHClb9YuSaTijGJpZO/VI0w1SRk8HzKebeeX0k9bYeUBjFc/brVz605XYR+tAhVWfY/OvAy0PKmWiNWWxoa7x4y5LJUmlNmtIRZxgSeKZygZybScY2sHQ9efONHQnoe+OJlPv2RTY5vH3BDjZUUGzVKW78rZxG8VU5AwXD5SA16GVbhmrnUMpTnRZ2yGhmIiI01yWKlHjG1opJaciqrS0ylQmiCb4lTithDeW+u7O1hGxLMKM7olyfIWZIGYRESfvW8rPXELYeMnOXGbQm1CSXq1m58yEIPLUF0YvnAvbvRB25+56wq56aqG/VRKuGMA55gDTP0KwH3r2yHNvv4rg8Tj0g5FnOy0BA8HjHyG4E9NvIawHgujv5b679n5oofQ/MFzvGhOlnyyMHQwaGLsw8vR8W1zYJ/ep5HoJ1sfYFm2oALUYHAcfDww1W1AHAAA=
79
+ http_version:
80
+ recorded_at: Thu, 03 Aug 2017 16:22:25 GMT
81
+ - request:
82
+ method: get
83
+ uri: https://cdn.contentful.com/spaces/j8tb59fszch7/entries?content_type=child
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ''
87
+ headers:
88
+ X-Contentful-User-Agent:
89
+ - sdk contentful.rb/2.1.1; platform ruby/2.4.1; os macOS/16;
90
+ Authorization:
91
+ - Bearer 5f711401f965951eb724ac72ac905e13d892294ba209268f13a9b32e896c8694
92
+ Content-Type:
93
+ - application/vnd.contentful.delivery.v1+json
94
+ Accept-Encoding:
95
+ - gzip
96
+ Connection:
97
+ - close
98
+ Host:
99
+ - cdn.contentful.com
100
+ User-Agent:
101
+ - http.rb/2.2.2
102
+ response:
103
+ status:
104
+ code: 200
105
+ message: OK
106
+ headers:
107
+ Access-Control-Allow-Headers:
108
+ - 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
109
+ Access-Control-Allow-Methods:
110
+ - GET,HEAD,OPTIONS
111
+ Access-Control-Allow-Origin:
112
+ - "*"
113
+ Access-Control-Expose-Headers:
114
+ - Etag
115
+ Access-Control-Max-Age:
116
+ - '86400'
117
+ Cache-Control:
118
+ - max-age=0
119
+ Content-Encoding:
120
+ - gzip
121
+ Content-Type:
122
+ - application/vnd.contentful.delivery.v1+json
123
+ Etag:
124
+ - W/"64e5b95602a4210b7b8494cb21e4dc1b"
125
+ Server:
126
+ - Contentful
127
+ X-Content-Type-Options:
128
+ - nosniff
129
+ X-Contentful-Request-Id:
130
+ - f3c2e62d826500ebd3bcd5a1123543a4
131
+ Content-Length:
132
+ - '1070'
133
+ Accept-Ranges:
134
+ - bytes
135
+ Date:
136
+ - Thu, 03 Aug 2017 16:22:26 GMT
137
+ Via:
138
+ - 1.1 varnish
139
+ Age:
140
+ - '0'
141
+ Connection:
142
+ - close
143
+ X-Served-By:
144
+ - cache-gig17031-GIG
145
+ X-Cache:
146
+ - MISS
147
+ X-Cache-Hits:
148
+ - '0'
149
+ X-Timer:
150
+ - S1501777346.023170,VS0,VE420
151
+ Vary:
152
+ - Accept-Encoding
153
+ body:
154
+ encoding: ASCII-8BIT
155
+ string: !binary |-
156
+ H4sIAAAAAAAAA+1YXW/iOBR976+o8jwQ2/FHwhtCLZrp0u4sZTvtah4cxwG3IbAkLKKj/ve1Q6CBCYTJ0korNQ8odnLte0/u8Tnix9n5uZUsE6t1/kPf6kG6nEo9stqzGV9aeu7lk3knnaQ80vMoGyVPaqoHIBtEaqxSPYJgNVapHJsF/8oWXC27s0u2UzLlwmy1fmM1WcjFTGST65x+U/GTZfZ8vfTu8dNtnnM/W3HnBRWYch7d1CdemDyLETNVra+XzX1W5+qyVjH3l+jh9o9o2u306WLYXo4X/atOYflNXhdxOlsWH4iZ5KkM2gYWCwHIGoA1ELmFXgt5LYyaFKCHYsB8GvxawEz+oxI1iQ3uhcTFJE5lnOaAnA7ZTmHdUnzFSEVBNbDRRPAo6y8ZNwb9dcAGeytUMgpe29F8D0uN+VDCk3ZKO0lkWt4p7PIxUn7UHrcn3d5iQFFPfqVP1aVlWaL3yhJO/e787gGxG9rt3YCbrhwPRXtPlnljr3o9x/p/zEviKfolxs/DpDvoL6j6fHEvu3f/lZgObAHcZOxoYpYHfBCzKCebE/XYI/wAMXH/25+3M3B1MVjeqV6vc8MHcjDY0/LFw/x9iXk9gPfi+uuX7uc2QsP21fjq77vJniy3ialH3zNFVbGI5oEsqPIKlrWmvqpqia7uUdbSN7Pj9cCn0U+r9NWke1BhtYMo6m1RPfJIWA7Z1psbW/LTwW0dEFsHtDBrQg8XxVZnfEBu94WU89oAVC5puXHKDUWJrBnkVboSQ8KkpNhDUCAScq5vQ8E85LrQY8KBzpZSaY3MoorqbmqaGX9m2XYmREkztwLhPNK3Y7togOxyxG1CQ04Z8n3IOPMZl4gxJwCuhAAGgHh2VZ7Nx+lwV1UDmXIVbUt6jkqink0hxMGYbrsK01WmjJ/KzDp2oYJ0lAVmjnP7skZSDUfGeVECd54WO3HrA2XLGlyv+TizJ3Uq3TZfqwLsx6kcVrB/XcPrB92y5GuwSuyyTrrstDWtlVviEsusn74HqcsNyglIrR00Ik3qwuNJvS/kTUl9OY/jZaPD08bvSqTzmUwaC5WO9Mw01c49acCT07oUc5tj6BLgUO5QDHiAsQdDxw1cD1EAHO7b1ZnWIzYFDNYiNkUHie0iXJvY9Wr9oHZ2Qq6Ufo8ROwG1tfhC1iTbHlzve1ivS0PelNoSaE8hBYfChQ6hDhUS6DnsYEiwK06u1+WI28ILOUKYBoQgj3tCC7UUNCSOywKBQ2pX5VmP1thjXi1aE4oP6jUltWldp9IPUhdIvedvjxOQGrktQpsE/Ype7wl5U1JXKgMipxbsctBtigjwgtADMsS+DBxXAAag73ucu4JhUS3Y2iDVsuKOPs+8XY4eY8UrFBsjVpvaR3yXsmLrsjvL87v+fTl7OfsXUKEY1CAXAAA=
157
+ http_version:
158
+ recorded_at: Thu, 03 Aug 2017 16:22:26 GMT
159
+ recorded_with: VCR 3.0.3