contentful_middleman 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -0
- data/lib/contentful_middleman/core.rb +3 -0
- data/lib/contentful_middleman/instance.rb +2 -1
- data/lib/contentful_middleman/mappers/base.rb +2 -4
- data/lib/contentful_middleman/tools/preview_proxy.rb +10 -10
- data/lib/contentful_middleman/version.rb +1 -1
- data/spec/contentful_middleman/core_spec.rb +1 -0
- data/spec/contentful_middleman/mappers/base_spec.rb +23 -0
- data/spec/fixtures/vcr_fixtures/entries/repeated_entry.yml +180 -0
- data/spec/fixtures/vcr_fixtures/helpers/preview.yml +4 -4
- data/spec/fixtures/vcr_fixtures/tools/preview_helper.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/asset.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/asset_2.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/assets.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/assets_2.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/entries.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/entries_2.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/entry.yml +2 -2
- data/spec/fixtures/vcr_fixtures/tools/preview_helper/entry_2.yml +2 -2
- data/spec/spec_helper.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f4cc17f613bedbda4d1c47204f5fb11212c2c1
|
4
|
+
data.tar.gz: 27f6a703690c874159b13366a75be793a7e36c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a92c016aed093ad6be4607c5720de5b6c58f826eb96c34280d9a2a3c36d0c3a8f113df3d307234d19acf67e13ae6d0a44f547cb165f3b576359553860eef128c
|
7
|
+
data.tar.gz: e29f82913048e350ef55898d7a27ba27efe9b00a6ba00483914e0ca530ed117dd07fe19c058dc097d961f7280d0b9c331a7064bcb4cf703ed2a09df17b75e963
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
# Change Log
|
2
2
|
## Unreleased
|
3
3
|
|
4
|
+
## 1.5.0
|
5
|
+
|
6
|
+
### Added
|
7
|
+
* Added Contentful Client `default_locale` option as a configuration parameter
|
8
|
+
* Added possibility to set API URL for Preview Proxy
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
* Fix repeated items not appearing on reference arrays [#99](https://github.com/contentful/contentful_middleman/issues/99)
|
12
|
+
* Fix Default URL for Preview Proxy which is now the Preview API
|
13
|
+
|
4
14
|
## 1.4.2
|
5
15
|
### Fixed
|
6
16
|
* Fix localized resource serialization for localized Assets[#95](https://github.com/contentful/contentful_middleman/issues/95)
|
data/README.md
CHANGED
@@ -55,6 +55,7 @@ space | Hash with an user choosen name for the space as key and
|
|
55
55
|
access_token | Contentful Delivery API access token
|
56
56
|
cda_query | Hash describing query configuration. See [contentful.rb](https://github.com/contentful/contentful.rb) for more info (look for filter options there). Note that by default only 100 entries will be fetched, this can be configured to up to 1000 entries using the `limit` option. Example: `f.cda_query = { limit: 1000 }`
|
57
57
|
content_types | Hash describing the mapping applied to entries of the imported content types
|
58
|
+
default_locale | String with the value for the default locale for your space. Defaults to `'en-US'`.
|
58
59
|
use_preview_api | Boolean to toggle the used API. Set it to `false` to use `cdn.contentful.com` (default value). Set it to `true` to use `preview.contentful.com`. More info in [the documentation](https://www.contentful.com/developers/documentation/content-delivery-api/#preview-api)
|
59
60
|
all_entries | Boolean to toggle multiple requests to the API for getting over 1000 entries. This uses a naive approach and can get rate limited. When using this, have in mind adding an `order` in your `:cda_query` . Default order is `order: 'sys.createdAt'`
|
60
61
|
all_entries_page_size | Integer amount of items per page for `:all_entries` requests, allowing for smaller page sizes on content heavy requests.
|
@@ -28,6 +28,9 @@ module ContentfulMiddleman
|
|
28
28
|
option :content_types, {},
|
29
29
|
'The mapping of Content Types names to ids'
|
30
30
|
|
31
|
+
option :default_locale, 'en-US',
|
32
|
+
"Default Locale for the client"
|
33
|
+
|
31
34
|
option :use_preview_api, false,
|
32
35
|
'Use the Preview API when fetching content'
|
33
36
|
|
@@ -65,7 +65,8 @@ module ContentfulMiddleman
|
|
65
65
|
access_token: options.access_token,
|
66
66
|
space: options.space.fetch(:id),
|
67
67
|
dynamic_entries: :auto,
|
68
|
-
raise_errors: true
|
68
|
+
raise_errors: true,
|
69
|
+
default_locale: options.default_locale
|
69
70
|
}
|
70
71
|
|
71
72
|
client_options[:api_url] = API_PREVIEW_URL if options.use_preview_api
|
@@ -88,10 +88,8 @@ module ContentfulMiddleman
|
|
88
88
|
def map_entry(entry)
|
89
89
|
context = Context.new
|
90
90
|
context.id = entry.id
|
91
|
-
|
92
|
-
|
93
|
-
@children[:discovered].push(entry.id)
|
94
|
-
end
|
91
|
+
@children[:discovered].push(entry.id) unless @children[:discovered].include?(entry.id)
|
92
|
+
@children[:queue].push({ :context => context, :entry => entry})
|
95
93
|
context
|
96
94
|
end
|
97
95
|
|
@@ -4,10 +4,10 @@ module ContentfulMiddleman
|
|
4
4
|
module Tools
|
5
5
|
class PreviewProxy < ::Contentful::Client
|
6
6
|
@@instances = []
|
7
|
-
def self.instance(space: '', access_token: '', tries: 3, expires_in: hours(2))
|
7
|
+
def self.instance(space: '', access_token: '', api_url: 'preview.contentful.com', tries: 3, expires_in: hours(2))
|
8
8
|
possible_instance = @@instances.detect { |i| i[:space] == space && i[:access_token] == access_token }
|
9
9
|
if possible_instance.nil?
|
10
|
-
preview_client = PreviewProxy.new(space: space, access_token: access_token, tries: tries, expires_in: expires_in)
|
10
|
+
preview_client = PreviewProxy.new(space: space, access_token: access_token, api_url: api_url, tries: tries, expires_in: expires_in)
|
11
11
|
@@instances << {space: space, access_token: access_token, instance: preview_client}
|
12
12
|
else
|
13
13
|
preview_client = possible_instance[:instance]
|
@@ -47,12 +47,13 @@ module ContentfulMiddleman
|
|
47
47
|
}
|
48
48
|
}
|
49
49
|
|
50
|
-
def initialize(space: '', access_token: '', tries: 3, expires_in: self.class.hours(2))
|
50
|
+
def initialize(space: '', access_token: '', api_url: 'preview.contentful.com', tries: 3, expires_in: self.class.hours(2))
|
51
51
|
super(
|
52
52
|
space: space,
|
53
53
|
access_token: access_token,
|
54
54
|
dynamic_entries: :auto,
|
55
|
-
preview: true
|
55
|
+
preview: true,
|
56
|
+
api_url: api_url
|
56
57
|
)
|
57
58
|
|
58
59
|
@cache_tries = tries
|
@@ -62,19 +63,19 @@ module ContentfulMiddleman
|
|
62
63
|
end
|
63
64
|
|
64
65
|
def entries(query = {})
|
65
|
-
cache(:entries, ->(
|
66
|
+
cache(:entries, ->(q, _) { super(q) }, query)
|
66
67
|
end
|
67
68
|
|
68
69
|
def entry(id, query = {})
|
69
|
-
cache(:entry, ->(
|
70
|
+
cache(:entry, ->(q, e_id) { super(e_id, q) }, query, id)
|
70
71
|
end
|
71
72
|
|
72
73
|
def assets(query = {})
|
73
|
-
cache(:assets, ->(
|
74
|
+
cache(:assets, ->(q, _) { super(q) }, query)
|
74
75
|
end
|
75
76
|
|
76
77
|
def asset(id, query = {})
|
77
|
-
cache(:asset, ->(
|
78
|
+
cache(:asset, ->(q, a_id) { super(a_id, q) }, query, id)
|
78
79
|
end
|
79
80
|
|
80
81
|
def clear_cache
|
@@ -104,9 +105,8 @@ module ContentfulMiddleman
|
|
104
105
|
instance_variable_get("@#{mapping[:cache]}")[cache_key(name, query, id)][:data]
|
105
106
|
end
|
106
107
|
|
107
|
-
def cache_key(name, query = {}, id = '')
|
108
|
-
mapping = CACHE_MAPPINGS[name]
|
109
108
|
|
109
|
+
def cache_key(name, query = {}, id = '')
|
110
110
|
Marshal.dump(collection?(name) ? query : query.merge(cache_id: id))
|
111
111
|
end
|
112
112
|
|
@@ -188,5 +188,28 @@ describe ContentfulMiddleman::Mapper::Base do
|
|
188
188
|
expect(context.hashize[:oneMedia].keys.map(&:to_s)).not_to include('url')
|
189
189
|
}
|
190
190
|
end
|
191
|
+
|
192
|
+
it 'should serialize repeated entries in an array - #99' do
|
193
|
+
vcr('entries/repeated_entry') {
|
194
|
+
context = ContentfulMiddleman::Context.new
|
195
|
+
client = Contentful::Client.new(
|
196
|
+
space: 'a80guayqr8ut',
|
197
|
+
access_token: '8b915cca980970ee60f749bf4435a48c61c9482038f185d6d0c4325bbde87170',
|
198
|
+
dynamic_entries: :auto
|
199
|
+
)
|
200
|
+
|
201
|
+
entry_with_repeated_item = client.entries('sys.id' => 'DT1yQgZABwuWeY842sGYY').first
|
202
|
+
|
203
|
+
subject.map(context, entry_with_repeated_item)
|
204
|
+
hash = YAML.load(context.to_yaml)
|
205
|
+
expect(hash[:bars]).to match([
|
206
|
+
{ id: "1Xq3cu45qguO4Uiwc2yycY", name: "bar_1" },
|
207
|
+
{ id: "6jLRFVvafuM6E0QiCA8YMu", name: "bar_2" },
|
208
|
+
{ id: "1Xq3cu45qguO4Uiwc2yycY", name: "bar_1" }
|
209
|
+
])
|
210
|
+
|
211
|
+
expect(hash[:bars].first).to eq(hash[:bars].last)
|
212
|
+
}
|
213
|
+
end
|
191
214
|
end
|
192
215
|
end
|
@@ -0,0 +1,180 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/a80guayqr8ut/content_types?limit=1000
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/1.0.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 8b915cca980970ee60f749bf4435a48c61c9482038f185d6d0c4325bbde87170
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- cdn.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Access-Control-Allow-Headers:
|
28
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
29
|
+
Access-Control-Allow-Methods:
|
30
|
+
- GET,HEAD,OPTIONS
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Etag
|
35
|
+
Access-Control-Max-Age:
|
36
|
+
- '86400'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0
|
39
|
+
Content-Encoding:
|
40
|
+
- gzip
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.delivery.v1+json
|
43
|
+
Etag:
|
44
|
+
- W/"3257011580fde0518e8923edeb445613"
|
45
|
+
Server:
|
46
|
+
- Contentful
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
- nosniff
|
50
|
+
X-Contentful-Request-Id:
|
51
|
+
- d63d57bd4d37b43043bf18d6ac8c5968
|
52
|
+
Content-Length:
|
53
|
+
- '496'
|
54
|
+
Accept-Ranges:
|
55
|
+
- bytes
|
56
|
+
Date:
|
57
|
+
- Tue, 13 Dec 2016 12:56:31 GMT
|
58
|
+
Via:
|
59
|
+
- 1.1 varnish
|
60
|
+
Age:
|
61
|
+
- '8845'
|
62
|
+
Connection:
|
63
|
+
- close
|
64
|
+
X-Served-By:
|
65
|
+
- cache-lcy1149-LCY
|
66
|
+
X-Cache:
|
67
|
+
- HIT
|
68
|
+
X-Cache-Hits:
|
69
|
+
- '1'
|
70
|
+
X-Timer:
|
71
|
+
- S1481633791.049293,VS0,VE0
|
72
|
+
Vary:
|
73
|
+
- Accept-Encoding
|
74
|
+
body:
|
75
|
+
encoding: ASCII-8BIT
|
76
|
+
string: !binary |-
|
77
|
+
H4sIAAAAAAAAA+UWy27CMOzOV6CcN9Ty7LixaZymXeC0iUOgYYoIbUkCUkH8
|
78
|
+
+5yEtklV2BAIaSPqobbjtx17V6vXkUgF6td38AuATBMCEBpwjlMEuP2DuiNj
|
79
|
+
iRngWxoSC5oA4GmA0SWVAPmeZxBUkqWS+KklGrklNVqVSPBM6cpuGKRljEJo
|
80
|
+
ZGbUG40WSCktDqiPFuOD0SMtsXSBhsofHHhfa5yueLCWyq3s7PN/7ag5yPDM
|
81
|
+
49gSllvxEkeSRFIrtXhmnGBJwoGKBWp6fvfRb8I39lv9ttdv9hrd4OnDZlgn
|
82
|
+
4XkMnGyooHGkgn2wNTcahVQkDKdDSph2OMLLwjwDAXZouYRCImacJtKIRLlt
|
83
|
+
aK6EFClUQXGSZMLjaFB3ci3vtm5NyTI4SpfTmDkpQiyeYUa3RJk9x0wQO4GI
|
84
|
+
k9Wa8iNEcBpP2RFiDHUJCcmkViW6wqsp5q552k0I3XOZcLQqb+WREye7D14j
|
85
|
+
yXXzmpPV+ERjDiXzh/vSTdFlfdnuNHpB+4y+rGC4Ql/axXW3fXko2P9TptuL
|
86
|
+
x0dr7MPsCPpep9HpBb8o0xMMVynTwqW7LdPi2a0eH6J6fsCrVaK4u5b7mt9m
|
87
|
+
Jjo6s73N9uqH5WsDgxuWGFgg9LYwKa1eJ2YSzKFj8wnwk9q+9g0LqS8unAoA
|
88
|
+
AA==
|
89
|
+
http_version:
|
90
|
+
recorded_at: Tue, 13 Dec 2016 12:56:31 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: https://cdn.contentful.com/spaces/a80guayqr8ut/entries?sys.id=DT1yQgZABwuWeY842sGYY
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
User-Agent:
|
99
|
+
- RubyContentfulGem/1.0.1
|
100
|
+
Authorization:
|
101
|
+
- Bearer 8b915cca980970ee60f749bf4435a48c61c9482038f185d6d0c4325bbde87170
|
102
|
+
Content-Type:
|
103
|
+
- application/vnd.contentful.delivery.v1+json
|
104
|
+
Accept-Encoding:
|
105
|
+
- gzip
|
106
|
+
Connection:
|
107
|
+
- close
|
108
|
+
Host:
|
109
|
+
- cdn.contentful.com
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Access-Control-Allow-Headers:
|
116
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
|
117
|
+
Access-Control-Allow-Methods:
|
118
|
+
- GET,HEAD,OPTIONS
|
119
|
+
Access-Control-Allow-Origin:
|
120
|
+
- "*"
|
121
|
+
Access-Control-Expose-Headers:
|
122
|
+
- Etag
|
123
|
+
Access-Control-Max-Age:
|
124
|
+
- '86400'
|
125
|
+
Cache-Control:
|
126
|
+
- max-age=0
|
127
|
+
Content-Encoding:
|
128
|
+
- gzip
|
129
|
+
Content-Type:
|
130
|
+
- application/vnd.contentful.delivery.v1+json
|
131
|
+
Etag:
|
132
|
+
- W/"b1bd4c22951f2a2cbf772f5751683086"
|
133
|
+
Server:
|
134
|
+
- Contentful
|
135
|
+
X-Content-Type-Options:
|
136
|
+
- nosniff
|
137
|
+
- nosniff
|
138
|
+
X-Contentful-Request-Id:
|
139
|
+
- 499261e23a4fb8360a42c60444137413
|
140
|
+
Content-Length:
|
141
|
+
- '566'
|
142
|
+
Accept-Ranges:
|
143
|
+
- bytes
|
144
|
+
Date:
|
145
|
+
- Tue, 13 Dec 2016 12:56:31 GMT
|
146
|
+
Via:
|
147
|
+
- 1.1 varnish
|
148
|
+
Age:
|
149
|
+
- '0'
|
150
|
+
Connection:
|
151
|
+
- close
|
152
|
+
X-Served-By:
|
153
|
+
- cache-lcy1143-LCY
|
154
|
+
X-Cache:
|
155
|
+
- MISS
|
156
|
+
X-Cache-Hits:
|
157
|
+
- '0'
|
158
|
+
X-Timer:
|
159
|
+
- S1481633791.208875,VS0,VE495
|
160
|
+
Vary:
|
161
|
+
- Accept-Encoding
|
162
|
+
body:
|
163
|
+
encoding: ASCII-8BIT
|
164
|
+
string: !binary |-
|
165
|
+
H4sIAAAAAAAAA+1VTW/bIBi+51dEnJcIHCdjvmVdt0urqWu6zZ2qito0YnFI
|
166
|
+
YkMrt8p/H2Bs0whnjZRNO4yDxYt5vx4eHp57/T4oygJE/Wc1VYYo11RZYJrn
|
167
|
+
pARqbftG7xErQTK1joxVLNhaGdAYGVsyoX/BymaCLnXAHyZgFXYni8lUrEmi
|
168
|
+
U9U7qkWnFr1gFuuazhhfAJ2zHSo7X8xszZcm4s4Glup2CIZzScpNjqXQXdVj
|
169
|
+
28xNn9UAlc+HGSov5tfT94/yG41xGBSf4tgJ39R1ykVeuj+SnBJB06mGBQQQ
|
170
|
+
TQYoGKDRDMEowNHo7RC/C69dB7lOD3PI6QMr2IrXR2ILT1ZcUC4sIMdD9sSJ
|
171
|
+
68X3jjz9HtZslZDMsIvywdVl7dAgD+4ZzdKWjLopwMnSuKgMt8jF7I7kLc2q
|
172
|
+
/t2GPZSzIO2hk6FzS6jdg31BD/R9M0pkON7M5efwij0mQVkmsYuCujwu1Vzg
|
173
|
+
/mqlk59nXz5+fSD38nxyCi/YyRTH5/JfrPRgTBt8b+ysQlx/b4w6MZ5kMqWO
|
174
|
+
wlWHWutTq1BewnhVyrvTkPX11PJplS53r1rtIZT17ADQpV6nbKn0fuEKZmgU
|
175
|
+
hTAa4yHC2BUu5eKXrr0ufvHS6Tvl6xiQd4tYA7zSlFdeC9AhZvbBtErhETSV
|
176
|
+
q5W0XEla+wLVFK5PqxWJF2+0je17P48B0x9iZocIHYOZKILjYQgnBzCzw+U/
|
177
|
+
M+vHNr8NPMw0DNVSu+1te78An3QIhT0KAAA=
|
178
|
+
http_version:
|
179
|
+
recorded_at: Tue, 13 Dec 2016 12:56:32 GMT
|
180
|
+
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/content_types?limit=1000
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -92,7 +92,7 @@ http_interactions:
|
|
92
92
|
recorded_at: Thu, 10 Dec 2015 19:42:11 GMT
|
93
93
|
- request:
|
94
94
|
method: get
|
95
|
-
uri: https://
|
95
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/entries
|
96
96
|
body:
|
97
97
|
encoding: US-ASCII
|
98
98
|
string: ''
|
@@ -108,7 +108,7 @@ http_interactions:
|
|
108
108
|
Connection:
|
109
109
|
- close
|
110
110
|
Host:
|
111
|
-
-
|
111
|
+
- preview.contentful.com
|
112
112
|
response:
|
113
113
|
status:
|
114
114
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/content_types?limit=1000
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/assets/nyancat
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/assets/happycat
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/assets
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/assets?order=sys.createdAt
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/entries
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/entries?content_type=cat
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/entries/garfield
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://preview.contentful.com/spaces/cfexampleapi/entries/happycat
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -18,7 +18,7 @@ http_interactions:
|
|
18
18
|
Connection:
|
19
19
|
- close
|
20
20
|
Host:
|
21
|
-
-
|
21
|
+
- preview.contentful.com
|
22
22
|
response:
|
23
23
|
status:
|
24
24
|
code: 200
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful_middleman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sascha Konietzke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- spec/fixtures/vcr_fixtures/entries/localized_references.yml
|
243
243
|
- spec/fixtures/vcr_fixtures/entries/localized_references_localized_assets.yml
|
244
244
|
- spec/fixtures/vcr_fixtures/entries/nil_file.yml
|
245
|
+
- spec/fixtures/vcr_fixtures/entries/repeated_entry.yml
|
245
246
|
- spec/fixtures/vcr_fixtures/helpers/preview.yml
|
246
247
|
- spec/fixtures/vcr_fixtures/instance/entries_1.yml
|
247
248
|
- spec/fixtures/vcr_fixtures/instance/entries_2.yml
|
@@ -305,6 +306,7 @@ test_files:
|
|
305
306
|
- spec/fixtures/vcr_fixtures/entries/localized_references.yml
|
306
307
|
- spec/fixtures/vcr_fixtures/entries/localized_references_localized_assets.yml
|
307
308
|
- spec/fixtures/vcr_fixtures/entries/nil_file.yml
|
309
|
+
- spec/fixtures/vcr_fixtures/entries/repeated_entry.yml
|
308
310
|
- spec/fixtures/vcr_fixtures/helpers/preview.yml
|
309
311
|
- spec/fixtures/vcr_fixtures/instance/entries_1.yml
|
310
312
|
- spec/fixtures/vcr_fixtures/instance/entries_2.yml
|