locomotivecms_coal 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +23 -12
- data/README.md +167 -10
- data/lib/locomotive/coal/client.rb +70 -20
- data/lib/locomotive/coal/client_v2.rb +31 -0
- data/lib/locomotive/coal/error.rb +46 -5
- data/lib/locomotive/coal/resources/base.rb +57 -0
- data/lib/locomotive/coal/resources/concerns/request.rb +101 -0
- data/lib/locomotive/coal/resources/content_assets.rb +9 -0
- data/lib/locomotive/coal/resources/content_entries.rb +17 -11
- data/lib/locomotive/coal/resources/{contents.rb → content_types.rb} +4 -5
- data/lib/locomotive/coal/resources/engine_version.rb +15 -0
- data/lib/locomotive/coal/resources/my_account.rb +14 -2
- data/lib/locomotive/coal/resources/pages.rb +25 -0
- data/lib/locomotive/coal/resources/sites.rb +5 -17
- data/lib/locomotive/coal/resources/snippets.rb +9 -0
- data/lib/locomotive/coal/resources/theme_assets.rb +13 -0
- data/lib/locomotive/coal/resources/token.rb +2 -2
- data/lib/locomotive/coal/resources/translations.rb +9 -0
- data/lib/locomotive/coal/upload_io.rb +11 -0
- data/lib/locomotive/coal/version.rb +1 -1
- data/lib/locomotive/coal.rb +11 -3
- data/locomotivecms_coal.gemspec +4 -4
- data/spec/fixtures/assets/locomotive.png +0 -0
- data/spec/fixtures/assets/rails.png +0 -0
- data/spec/fixtures/coal_cassettes/client.yml +333 -69
- data/spec/fixtures/coal_cassettes/content_assets.yml +595 -0
- data/spec/fixtures/coal_cassettes/content_entries.yml +1134 -223
- data/spec/fixtures/coal_cassettes/content_types.yml +616 -0
- data/spec/fixtures/coal_cassettes/my_account.yml +167 -47
- data/spec/fixtures/coal_cassettes/pages.yml +281 -0
- data/spec/fixtures/coal_cassettes/sites.yml +93 -117
- data/spec/fixtures/coal_cassettes/snippets.yml +227 -0
- data/spec/fixtures/coal_cassettes/theme_assets.yml +406 -0
- data/spec/fixtures/coal_cassettes/token.yml +37 -55
- data/spec/fixtures/coal_cassettes/translations.yml +227 -0
- data/spec/fixtures/coal_cassettes/version.yml +89 -0
- data/spec/integration/client_spec.rb +37 -3
- data/spec/integration/resources/content_assets_spec.rb +42 -0
- data/spec/integration/resources/content_entries_spec.rb +45 -18
- data/spec/integration/resources/content_types_spec.rb +44 -0
- data/spec/integration/resources/engine_version_spec.rb +17 -0
- data/spec/integration/resources/my_account_spec.rb +22 -5
- data/spec/integration/resources/pages_spec.rb +43 -0
- data/spec/integration/resources/sites_spec.rb +9 -9
- data/spec/integration/resources/snippets_spec.rb +38 -0
- data/spec/integration/resources/theme_assets_spec.rb +43 -0
- data/spec/integration/resources/token_spec.rb +7 -7
- data/spec/integration/resources/translations_spec.rb +38 -0
- data/spec/spec_helper.rb +2 -13
- data/spec/support/api_settings.rb +7 -3
- data/spec/support/assets.rb +4 -0
- data/spec/support/vcr.rb +10 -0
- data/spec/unit/error_spec.rb +28 -0
- metadata +71 -13
- data/lib/locomotive/coal/request.rb +0 -63
- data/spec/fixtures/coal_cassettes/contents.yml +0 -120
- data/spec/integration/resources/contents_spec.rb +0 -22
@@ -0,0 +1,616 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Content-Length:
|
26
|
+
- '32'
|
27
|
+
Etag:
|
28
|
+
- W/"61c6d81d1b41b9aad218fbfd9bec3e38"
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Request-Id:
|
32
|
+
- 634ca1b4-6314-41ab-9258-005e6c5cce80
|
33
|
+
X-Runtime:
|
34
|
+
- '0.015775'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Server:
|
38
|
+
- thin
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"token":"NuCxqFfvpry9osYdFUm1"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
50
|
+
headers:
|
51
|
+
Accept:
|
52
|
+
- application/json
|
53
|
+
X-Locomotive-Account-Email:
|
54
|
+
- admin@locomotivecms.com
|
55
|
+
X-Locomotive-Account-Token:
|
56
|
+
- NuCxqFfvpry9osYdFUm1
|
57
|
+
Content-Type:
|
58
|
+
- application/x-www-form-urlencoded
|
59
|
+
Accept-Encoding:
|
60
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
|
+
User-Agent:
|
62
|
+
- Ruby
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 200
|
66
|
+
message: OK
|
67
|
+
headers:
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
Content-Length:
|
71
|
+
- '2'
|
72
|
+
Etag:
|
73
|
+
- W/"d751713988987e9331980363e24189ce"
|
74
|
+
Cache-Control:
|
75
|
+
- max-age=0, private, must-revalidate
|
76
|
+
X-Request-Id:
|
77
|
+
- 29566a7a-576b-4d50-b91c-327bac3acd14
|
78
|
+
X-Runtime:
|
79
|
+
- '0.039877'
|
80
|
+
Connection:
|
81
|
+
- keep-alive
|
82
|
+
Server:
|
83
|
+
- thin
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: "[]"
|
87
|
+
http_version:
|
88
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
89
|
+
- request:
|
90
|
+
method: post
|
91
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
95
|
+
headers:
|
96
|
+
Accept:
|
97
|
+
- application/json
|
98
|
+
Content-Type:
|
99
|
+
- application/x-www-form-urlencoded
|
100
|
+
Accept-Encoding:
|
101
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 201
|
107
|
+
message: Created
|
108
|
+
headers:
|
109
|
+
Content-Type:
|
110
|
+
- application/json
|
111
|
+
Content-Length:
|
112
|
+
- '32'
|
113
|
+
Etag:
|
114
|
+
- W/"61c6d81d1b41b9aad218fbfd9bec3e38"
|
115
|
+
Cache-Control:
|
116
|
+
- max-age=0, private, must-revalidate
|
117
|
+
X-Request-Id:
|
118
|
+
- d84d4dd3-9749-42fe-808d-9ba94aff5191
|
119
|
+
X-Runtime:
|
120
|
+
- '0.015005'
|
121
|
+
Connection:
|
122
|
+
- keep-alive
|
123
|
+
Server:
|
124
|
+
- thin
|
125
|
+
body:
|
126
|
+
encoding: UTF-8
|
127
|
+
string: '{"token":"NuCxqFfvpry9osYdFUm1"}'
|
128
|
+
http_version:
|
129
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
130
|
+
- request:
|
131
|
+
method: post
|
132
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
133
|
+
body:
|
134
|
+
encoding: UTF-8
|
135
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1&content_type%5Bfields%5D%5B%5D%5Blabel%5D=Name&content_type%5Bfields%5D%5B%5D%5Bname%5D=name&content_type%5Bfields%5D%5B%5D%5Btype%5D=string&content_type%5Bname%5D=Projects&content_type%5Bslug%5D=projects
|
136
|
+
headers:
|
137
|
+
Accept:
|
138
|
+
- application/json
|
139
|
+
X-Locomotive-Account-Email:
|
140
|
+
- admin@locomotivecms.com
|
141
|
+
X-Locomotive-Account-Token:
|
142
|
+
- NuCxqFfvpry9osYdFUm1
|
143
|
+
Content-Type:
|
144
|
+
- application/x-www-form-urlencoded
|
145
|
+
Accept-Encoding:
|
146
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
147
|
+
User-Agent:
|
148
|
+
- Ruby
|
149
|
+
response:
|
150
|
+
status:
|
151
|
+
code: 201
|
152
|
+
message: Created
|
153
|
+
headers:
|
154
|
+
Content-Type:
|
155
|
+
- application/json
|
156
|
+
Content-Length:
|
157
|
+
- '549'
|
158
|
+
Etag:
|
159
|
+
- W/"be22e78fa71c253f833d0a5a2b7bd117"
|
160
|
+
Cache-Control:
|
161
|
+
- max-age=0, private, must-revalidate
|
162
|
+
X-Request-Id:
|
163
|
+
- d2262f1e-5f78-4749-a651-a7297e51993e
|
164
|
+
X-Runtime:
|
165
|
+
- '0.060041'
|
166
|
+
Connection:
|
167
|
+
- keep-alive
|
168
|
+
Server:
|
169
|
+
- thin
|
170
|
+
body:
|
171
|
+
encoding: UTF-8
|
172
|
+
string: '{"_id":"55477a3e6469643251480300","created_at":"2015-05-04T13:55:10Z","updated_at":"2015-05-04T13:55:10Z","name":"Projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3e6469643251490300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}'
|
173
|
+
http_version:
|
174
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
175
|
+
- request:
|
176
|
+
method: post
|
177
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
181
|
+
headers:
|
182
|
+
Accept:
|
183
|
+
- application/json
|
184
|
+
Content-Type:
|
185
|
+
- application/x-www-form-urlencoded
|
186
|
+
Accept-Encoding:
|
187
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
188
|
+
User-Agent:
|
189
|
+
- Ruby
|
190
|
+
response:
|
191
|
+
status:
|
192
|
+
code: 201
|
193
|
+
message: Created
|
194
|
+
headers:
|
195
|
+
Content-Type:
|
196
|
+
- application/json
|
197
|
+
Content-Length:
|
198
|
+
- '32'
|
199
|
+
Etag:
|
200
|
+
- W/"61c6d81d1b41b9aad218fbfd9bec3e38"
|
201
|
+
Cache-Control:
|
202
|
+
- max-age=0, private, must-revalidate
|
203
|
+
X-Request-Id:
|
204
|
+
- 1e8df614-192a-4bf4-8132-ec425d1a982b
|
205
|
+
X-Runtime:
|
206
|
+
- '0.014822'
|
207
|
+
Connection:
|
208
|
+
- keep-alive
|
209
|
+
Server:
|
210
|
+
- thin
|
211
|
+
body:
|
212
|
+
encoding: UTF-8
|
213
|
+
string: '{"token":"NuCxqFfvpry9osYdFUm1"}'
|
214
|
+
http_version:
|
215
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
216
|
+
- request:
|
217
|
+
method: get
|
218
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
219
|
+
body:
|
220
|
+
encoding: UTF-8
|
221
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
222
|
+
headers:
|
223
|
+
Accept:
|
224
|
+
- application/json
|
225
|
+
X-Locomotive-Account-Email:
|
226
|
+
- admin@locomotivecms.com
|
227
|
+
X-Locomotive-Account-Token:
|
228
|
+
- NuCxqFfvpry9osYdFUm1
|
229
|
+
Content-Type:
|
230
|
+
- application/x-www-form-urlencoded
|
231
|
+
Accept-Encoding:
|
232
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
233
|
+
User-Agent:
|
234
|
+
- Ruby
|
235
|
+
response:
|
236
|
+
status:
|
237
|
+
code: 200
|
238
|
+
message: OK
|
239
|
+
headers:
|
240
|
+
Content-Type:
|
241
|
+
- application/json
|
242
|
+
Content-Length:
|
243
|
+
- '551'
|
244
|
+
Etag:
|
245
|
+
- W/"13e0e20c7b2e68347e46689530a95be1"
|
246
|
+
Cache-Control:
|
247
|
+
- max-age=0, private, must-revalidate
|
248
|
+
X-Request-Id:
|
249
|
+
- eb42b9c7-42e9-4fde-a5e8-39a338fdf685
|
250
|
+
X-Runtime:
|
251
|
+
- '0.042756'
|
252
|
+
Connection:
|
253
|
+
- keep-alive
|
254
|
+
Server:
|
255
|
+
- thin
|
256
|
+
body:
|
257
|
+
encoding: UTF-8
|
258
|
+
string: '[{"_id":"55477a3e6469643251480300","created_at":"2015-05-04T13:55:10Z","updated_at":"2015-05-04T13:55:10Z","name":"Projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3e6469643251490300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}]'
|
259
|
+
http_version:
|
260
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
261
|
+
- request:
|
262
|
+
method: put
|
263
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types/55477a3e6469643251480300.json
|
264
|
+
body:
|
265
|
+
encoding: UTF-8
|
266
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1&content_type%5Bname%5D=Our+projects
|
267
|
+
headers:
|
268
|
+
Accept:
|
269
|
+
- application/json
|
270
|
+
X-Locomotive-Account-Email:
|
271
|
+
- admin@locomotivecms.com
|
272
|
+
X-Locomotive-Account-Token:
|
273
|
+
- NuCxqFfvpry9osYdFUm1
|
274
|
+
Content-Type:
|
275
|
+
- application/x-www-form-urlencoded
|
276
|
+
Accept-Encoding:
|
277
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
278
|
+
User-Agent:
|
279
|
+
- Ruby
|
280
|
+
response:
|
281
|
+
status:
|
282
|
+
code: 200
|
283
|
+
message: OK
|
284
|
+
headers:
|
285
|
+
Content-Type:
|
286
|
+
- application/json
|
287
|
+
Content-Length:
|
288
|
+
- '553'
|
289
|
+
Etag:
|
290
|
+
- W/"babb06d9a57c66e6e8c52da416d20309"
|
291
|
+
Cache-Control:
|
292
|
+
- max-age=0, private, must-revalidate
|
293
|
+
X-Request-Id:
|
294
|
+
- fd63264e-42df-4a1d-93c1-71260e3d083e
|
295
|
+
X-Runtime:
|
296
|
+
- '0.043858'
|
297
|
+
Connection:
|
298
|
+
- keep-alive
|
299
|
+
Server:
|
300
|
+
- thin
|
301
|
+
body:
|
302
|
+
encoding: UTF-8
|
303
|
+
string: '{"_id":"55477a3e6469643251480300","created_at":"2015-05-04T13:55:10Z","updated_at":"2015-05-04T13:55:10Z","name":"Our
|
304
|
+
projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3e6469643251490300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}'
|
305
|
+
http_version:
|
306
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
307
|
+
- request:
|
308
|
+
method: post
|
309
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
310
|
+
body:
|
311
|
+
encoding: UTF-8
|
312
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
313
|
+
headers:
|
314
|
+
Accept:
|
315
|
+
- application/json
|
316
|
+
Content-Type:
|
317
|
+
- application/x-www-form-urlencoded
|
318
|
+
Accept-Encoding:
|
319
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
320
|
+
User-Agent:
|
321
|
+
- Ruby
|
322
|
+
response:
|
323
|
+
status:
|
324
|
+
code: 201
|
325
|
+
message: Created
|
326
|
+
headers:
|
327
|
+
Content-Type:
|
328
|
+
- application/json
|
329
|
+
Content-Length:
|
330
|
+
- '32'
|
331
|
+
Etag:
|
332
|
+
- W/"61c6d81d1b41b9aad218fbfd9bec3e38"
|
333
|
+
Cache-Control:
|
334
|
+
- max-age=0, private, must-revalidate
|
335
|
+
X-Request-Id:
|
336
|
+
- ad45fdda-fe37-4b9a-8ce8-c3c187392b7a
|
337
|
+
X-Runtime:
|
338
|
+
- '0.020351'
|
339
|
+
Connection:
|
340
|
+
- keep-alive
|
341
|
+
Server:
|
342
|
+
- thin
|
343
|
+
body:
|
344
|
+
encoding: UTF-8
|
345
|
+
string: '{"token":"NuCxqFfvpry9osYdFUm1"}'
|
346
|
+
http_version:
|
347
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
348
|
+
- request:
|
349
|
+
method: get
|
350
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
351
|
+
body:
|
352
|
+
encoding: UTF-8
|
353
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
354
|
+
headers:
|
355
|
+
Accept:
|
356
|
+
- application/json
|
357
|
+
X-Locomotive-Account-Email:
|
358
|
+
- admin@locomotivecms.com
|
359
|
+
X-Locomotive-Account-Token:
|
360
|
+
- NuCxqFfvpry9osYdFUm1
|
361
|
+
Content-Type:
|
362
|
+
- application/x-www-form-urlencoded
|
363
|
+
Accept-Encoding:
|
364
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
365
|
+
User-Agent:
|
366
|
+
- Ruby
|
367
|
+
response:
|
368
|
+
status:
|
369
|
+
code: 200
|
370
|
+
message: OK
|
371
|
+
headers:
|
372
|
+
Content-Type:
|
373
|
+
- application/json
|
374
|
+
Content-Length:
|
375
|
+
- '555'
|
376
|
+
Etag:
|
377
|
+
- W/"61c64815463a39d9debd7752a6dfd26d"
|
378
|
+
Cache-Control:
|
379
|
+
- max-age=0, private, must-revalidate
|
380
|
+
X-Request-Id:
|
381
|
+
- d74d8093-3e23-477b-9b57-9e5c5976c88f
|
382
|
+
X-Runtime:
|
383
|
+
- '0.033780'
|
384
|
+
Connection:
|
385
|
+
- keep-alive
|
386
|
+
Server:
|
387
|
+
- thin
|
388
|
+
body:
|
389
|
+
encoding: UTF-8
|
390
|
+
string: '[{"_id":"55477a3e6469643251480300","created_at":"2015-05-04T13:55:10Z","updated_at":"2015-05-04T13:55:10Z","name":"Our
|
391
|
+
projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3e6469643251490300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}]'
|
392
|
+
http_version:
|
393
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
394
|
+
- request:
|
395
|
+
method: delete
|
396
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types/55477a3e6469643251480300.json
|
397
|
+
body:
|
398
|
+
encoding: UTF-8
|
399
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
400
|
+
headers:
|
401
|
+
Accept:
|
402
|
+
- application/json
|
403
|
+
X-Locomotive-Account-Email:
|
404
|
+
- admin@locomotivecms.com
|
405
|
+
X-Locomotive-Account-Token:
|
406
|
+
- NuCxqFfvpry9osYdFUm1
|
407
|
+
Content-Type:
|
408
|
+
- application/x-www-form-urlencoded
|
409
|
+
Accept-Encoding:
|
410
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
411
|
+
User-Agent:
|
412
|
+
- Ruby
|
413
|
+
response:
|
414
|
+
status:
|
415
|
+
code: 200
|
416
|
+
message: OK
|
417
|
+
headers:
|
418
|
+
Content-Type:
|
419
|
+
- application/json
|
420
|
+
Content-Length:
|
421
|
+
- '553'
|
422
|
+
Etag:
|
423
|
+
- W/"babb06d9a57c66e6e8c52da416d20309"
|
424
|
+
Cache-Control:
|
425
|
+
- max-age=0, private, must-revalidate
|
426
|
+
X-Request-Id:
|
427
|
+
- ea4d4bdd-d387-407b-8627-71770d98ae9c
|
428
|
+
X-Runtime:
|
429
|
+
- '0.024044'
|
430
|
+
Connection:
|
431
|
+
- keep-alive
|
432
|
+
Server:
|
433
|
+
- thin
|
434
|
+
body:
|
435
|
+
encoding: UTF-8
|
436
|
+
string: '{"_id":"55477a3e6469643251480300","created_at":"2015-05-04T13:55:10Z","updated_at":"2015-05-04T13:55:10Z","name":"Our
|
437
|
+
projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3e6469643251490300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}'
|
438
|
+
http_version:
|
439
|
+
recorded_at: Mon, 04 May 2015 13:55:10 GMT
|
440
|
+
- request:
|
441
|
+
method: post
|
442
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
443
|
+
body:
|
444
|
+
encoding: UTF-8
|
445
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
446
|
+
headers:
|
447
|
+
Accept:
|
448
|
+
- application/json
|
449
|
+
Content-Type:
|
450
|
+
- application/x-www-form-urlencoded
|
451
|
+
Accept-Encoding:
|
452
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
453
|
+
User-Agent:
|
454
|
+
- Ruby
|
455
|
+
response:
|
456
|
+
status:
|
457
|
+
code: 201
|
458
|
+
message: Created
|
459
|
+
headers:
|
460
|
+
Content-Type:
|
461
|
+
- application/json
|
462
|
+
Content-Length:
|
463
|
+
- '32'
|
464
|
+
Etag:
|
465
|
+
- W/"61c6d81d1b41b9aad218fbfd9bec3e38"
|
466
|
+
Cache-Control:
|
467
|
+
- max-age=0, private, must-revalidate
|
468
|
+
X-Request-Id:
|
469
|
+
- bd3d450a-b00a-4d4b-aab2-09d9a1659c04
|
470
|
+
X-Runtime:
|
471
|
+
- '0.013403'
|
472
|
+
Connection:
|
473
|
+
- keep-alive
|
474
|
+
Server:
|
475
|
+
- thin
|
476
|
+
body:
|
477
|
+
encoding: UTF-8
|
478
|
+
string: '{"token":"NuCxqFfvpry9osYdFUm1"}'
|
479
|
+
http_version:
|
480
|
+
recorded_at: Mon, 04 May 2015 13:55:11 GMT
|
481
|
+
- request:
|
482
|
+
method: get
|
483
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
484
|
+
body:
|
485
|
+
encoding: UTF-8
|
486
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
487
|
+
headers:
|
488
|
+
Accept:
|
489
|
+
- application/json
|
490
|
+
X-Locomotive-Account-Email:
|
491
|
+
- admin@locomotivecms.com
|
492
|
+
X-Locomotive-Account-Token:
|
493
|
+
- NuCxqFfvpry9osYdFUm1
|
494
|
+
Content-Type:
|
495
|
+
- application/x-www-form-urlencoded
|
496
|
+
Accept-Encoding:
|
497
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
498
|
+
User-Agent:
|
499
|
+
- Ruby
|
500
|
+
response:
|
501
|
+
status:
|
502
|
+
code: 200
|
503
|
+
message: OK
|
504
|
+
headers:
|
505
|
+
Content-Type:
|
506
|
+
- application/json
|
507
|
+
Content-Length:
|
508
|
+
- '2'
|
509
|
+
Etag:
|
510
|
+
- W/"d751713988987e9331980363e24189ce"
|
511
|
+
Cache-Control:
|
512
|
+
- max-age=0, private, must-revalidate
|
513
|
+
X-Request-Id:
|
514
|
+
- 193ad8f7-bbf8-4382-9f10-039e39deeb14
|
515
|
+
X-Runtime:
|
516
|
+
- '0.019278'
|
517
|
+
Connection:
|
518
|
+
- keep-alive
|
519
|
+
Server:
|
520
|
+
- thin
|
521
|
+
body:
|
522
|
+
encoding: UTF-8
|
523
|
+
string: "[]"
|
524
|
+
http_version:
|
525
|
+
recorded_at: Mon, 04 May 2015 13:55:11 GMT
|
526
|
+
- request:
|
527
|
+
method: post
|
528
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
529
|
+
body:
|
530
|
+
encoding: UTF-8
|
531
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1&content_type%5Bfields%5D%5B%5D%5Blabel%5D=Name&content_type%5Bfields%5D%5B%5D%5Bname%5D=name&content_type%5Bfields%5D%5B%5D%5Btype%5D=string&content_type%5Bname%5D=Projects&content_type%5Bslug%5D=projects
|
532
|
+
headers:
|
533
|
+
Accept:
|
534
|
+
- application/json
|
535
|
+
X-Locomotive-Account-Email:
|
536
|
+
- admin@locomotivecms.com
|
537
|
+
X-Locomotive-Account-Token:
|
538
|
+
- NuCxqFfvpry9osYdFUm1
|
539
|
+
Content-Type:
|
540
|
+
- application/x-www-form-urlencoded
|
541
|
+
Accept-Encoding:
|
542
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
543
|
+
User-Agent:
|
544
|
+
- Ruby
|
545
|
+
response:
|
546
|
+
status:
|
547
|
+
code: 201
|
548
|
+
message: Created
|
549
|
+
headers:
|
550
|
+
Content-Type:
|
551
|
+
- application/json
|
552
|
+
Content-Length:
|
553
|
+
- '549'
|
554
|
+
Etag:
|
555
|
+
- W/"752f101d5ebe23634f29c7f315610e0e"
|
556
|
+
Cache-Control:
|
557
|
+
- max-age=0, private, must-revalidate
|
558
|
+
X-Request-Id:
|
559
|
+
- 9b2b89c0-8f61-4742-b24a-74e82630ed58
|
560
|
+
X-Runtime:
|
561
|
+
- '0.043684'
|
562
|
+
Connection:
|
563
|
+
- keep-alive
|
564
|
+
Server:
|
565
|
+
- thin
|
566
|
+
body:
|
567
|
+
encoding: UTF-8
|
568
|
+
string: '{"_id":"55477a3f64696432514a0300","created_at":"2015-05-04T13:55:11Z","updated_at":"2015-05-04T13:55:11Z","name":"Projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3f64696432514b0300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}'
|
569
|
+
http_version:
|
570
|
+
recorded_at: Mon, 04 May 2015 13:55:11 GMT
|
571
|
+
- request:
|
572
|
+
method: get
|
573
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_types.json
|
574
|
+
body:
|
575
|
+
encoding: UTF-8
|
576
|
+
string: auth_token=NuCxqFfvpry9osYdFUm1
|
577
|
+
headers:
|
578
|
+
Accept:
|
579
|
+
- application/json
|
580
|
+
X-Locomotive-Account-Email:
|
581
|
+
- admin@locomotivecms.com
|
582
|
+
X-Locomotive-Account-Token:
|
583
|
+
- NuCxqFfvpry9osYdFUm1
|
584
|
+
Content-Type:
|
585
|
+
- application/x-www-form-urlencoded
|
586
|
+
Accept-Encoding:
|
587
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
588
|
+
User-Agent:
|
589
|
+
- Ruby
|
590
|
+
response:
|
591
|
+
status:
|
592
|
+
code: 200
|
593
|
+
message: OK
|
594
|
+
headers:
|
595
|
+
Content-Type:
|
596
|
+
- application/json
|
597
|
+
Content-Length:
|
598
|
+
- '551'
|
599
|
+
Etag:
|
600
|
+
- W/"fb16282d502d49a3ec22b8cd8b1644f3"
|
601
|
+
Cache-Control:
|
602
|
+
- max-age=0, private, must-revalidate
|
603
|
+
X-Request-Id:
|
604
|
+
- 1cfee319-a9d9-452b-9dfd-6a225edabb38
|
605
|
+
X-Runtime:
|
606
|
+
- '0.023280'
|
607
|
+
Connection:
|
608
|
+
- keep-alive
|
609
|
+
Server:
|
610
|
+
- thin
|
611
|
+
body:
|
612
|
+
encoding: UTF-8
|
613
|
+
string: '[{"_id":"55477a3f64696432514a0300","created_at":"2015-05-04T13:55:11Z","updated_at":"2015-05-04T13:55:11Z","name":"Projects","slug":"projects","description":null,"label_field_name":"name","order_direction":"asc","public_submission_enabled":false,"raw_item_template":null,"fields":[{"_id":"55477a3f64696432514b0300","created_at":null,"updated_at":null,"name":"name","type":"string","label":"Name","hint":null,"required":true,"localized":false,"unique":false,"position":0}],"order_by":"created_at","group_by":null,"public_submission_account_emails":[]}]'
|
614
|
+
http_version:
|
615
|
+
recorded_at: Mon, 04 May 2015 13:55:11 GMT
|
616
|
+
recorded_with: VCR 2.9.3
|