locomotivecms_coal 1.6.0.beta1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +2 -3
  4. data/Gemfile +1 -6
  5. data/Gemfile.lock +54 -59
  6. data/MIT-LICENSE +1 -1
  7. data/README.md +20 -5
  8. data/lib/locomotive/coal/client.rb +8 -0
  9. data/lib/locomotive/coal/resources/accounts.rb +33 -0
  10. data/lib/locomotive/coal/resources/concerns/request.rb +19 -1
  11. data/lib/locomotive/coal/version.rb +1 -1
  12. data/lib/locomotive/coal.rb +1 -0
  13. data/locomotivecms_coal.gemspec +5 -6
  14. data/spec/fixtures/coal_cassettes/accounts.yml +214 -0
  15. data/spec/fixtures/coal_cassettes/client.yml +277 -163
  16. data/spec/fixtures/coal_cassettes/content_assets.yml +144 -445
  17. data/spec/fixtures/coal_cassettes/content_entries.yml +963 -1647
  18. data/spec/fixtures/coal_cassettes/content_types.yml +387 -209
  19. data/spec/fixtures/coal_cassettes/current_site.yml +89 -49
  20. data/spec/fixtures/coal_cassettes/memberships.yml +143 -77
  21. data/spec/fixtures/coal_cassettes/my_account.yml +163 -99
  22. data/spec/fixtures/coal_cassettes/pages.yml +177 -99
  23. data/spec/fixtures/coal_cassettes/sections.yml +121 -78
  24. data/spec/fixtures/coal_cassettes/sites.yml +108 -141
  25. data/spec/fixtures/coal_cassettes/snippets.yml +140 -76
  26. data/spec/fixtures/coal_cassettes/theme_assets.yml +142 -254
  27. data/spec/fixtures/coal_cassettes/token.yml +64 -43
  28. data/spec/fixtures/coal_cassettes/translations.yml +140 -76
  29. data/spec/fixtures/coal_cassettes/version.yml +54 -30
  30. data/spec/integration/resources/accounts_spec.rb +38 -0
  31. data/spec/integration/resources/sections_spec.rb +1 -1
  32. data/spec/integration/resources/token_spec.rb +1 -1
  33. metadata +20 -30
@@ -8,13 +8,13 @@ http_interactions:
8
8
  string: email=admin%40locomotivecms.com&password=locomotive
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.14.0
11
+ - Faraday v0.15.4
12
12
  Accept:
13
13
  - application/json
14
14
  Accept-Encoding:
15
15
  - gzip,deflate
16
16
  Date:
17
- - Mon, 30 Apr 2018 08:02:00 GMT
17
+ - Sun, 17 Nov 2019 16:39:24 GMT
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  response:
@@ -24,40 +24,50 @@ http_interactions:
24
24
  headers:
25
25
  Content-Type:
26
26
  - application/json
27
- Etag:
28
- - W/"2129738122b01b8471b44d9b5fa111ef"
27
+ Content-Length:
28
+ - '32'
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 201 Created
29
33
  Cache-Control:
30
34
  - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - af61f926-8c2c-4de6-b2d4-227cfc2d36f1
35
+ Etag:
36
+ - W/"410e3d6fde24f39257a7cc619b61baa7"
33
37
  X-Runtime:
34
- - '0.021122'
35
- Content-Length:
36
- - '32'
38
+ - '0.004174'
39
+ X-Request-Id:
40
+ - 0fc70152-9692-4b43-b256-bdb668723f0c
41
+ Date:
42
+ - Sun, 17 Nov 2019 16:39:24 GMT
43
+ X-Powered-By:
44
+ - Phusion Passenger 6.0.4
45
+ Server:
46
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
37
47
  body:
38
48
  encoding: UTF-8
39
- string: '{"token":"oTxs76hxMqHv6jyav1tw"}'
49
+ string: '{"token":"bzwAyFQzcchf_hgDQhz3"}'
40
50
  http_version:
41
- recorded_at: Mon, 30 Apr 2018 08:02:00 GMT
51
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
42
52
  - request:
43
53
  method: get
44
- uri: http://localhost:3000/locomotive/sample/api/v3/sections.json?auth_token=oTxs76hxMqHv6jyav1tw
54
+ uri: http://localhost:3000/locomotive/sample/api/v3/sections.json?auth_token=bzwAyFQzcchf_hgDQhz3
45
55
  body:
46
56
  encoding: UTF-8
47
57
  string: ''
48
58
  headers:
49
59
  User-Agent:
50
- - Faraday v0.14.0
60
+ - Faraday v0.15.4
51
61
  Accept:
52
62
  - application/json
53
63
  Accept-Encoding:
54
64
  - gzip,deflate
55
65
  Date:
56
- - Mon, 30 Apr 2018 08:02:00 GMT
66
+ - Sun, 17 Nov 2019 16:39:24 GMT
57
67
  X-Locomotive-Account-Email:
58
68
  - admin@locomotivecms.com
59
69
  X-Locomotive-Account-Token:
60
- - oTxs76hxMqHv6jyav1tw
70
+ - bzwAyFQzcchf_hgDQhz3
61
71
  response:
62
72
  status:
63
73
  code: 200
@@ -65,51 +75,50 @@ http_interactions:
65
75
  headers:
66
76
  Content-Type:
67
77
  - application/json
68
- Etag:
69
- - W/"490955a3a3e4e639bc53bcec098c7d71"
78
+ Content-Length:
79
+ - '2'
80
+ Connection:
81
+ - keep-alive
82
+ Status:
83
+ - 200 OK
70
84
  Cache-Control:
71
85
  - max-age=0, private, must-revalidate
72
- X-Request-Id:
73
- - d9ef8a4f-edac-4b91-9935-5d698ffeb79a
86
+ Etag:
87
+ - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
74
88
  X-Runtime:
75
- - '0.031445'
76
- Content-Length:
77
- - '1370'
89
+ - '0.014604'
90
+ X-Request-Id:
91
+ - b5d2a046-2543-46b6-a9cb-ae7c3c0e70d0
92
+ Date:
93
+ - Sun, 17 Nov 2019 16:39:24 GMT
94
+ X-Powered-By:
95
+ - Phusion Passenger 6.0.4
96
+ Server:
97
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
78
98
  body:
79
99
  encoding: UTF-8
80
- string: '[{"_id":"5ae629b4a95330361d619e92","created_at":"2018-04-29T20:23:16Z","updated_at":"2018-04-29T20:23:16Z","name":"Header","slug":"header","template":"\u003ch1\u003e
81
- {{ section.settings.brand }} \u003c/h1\u003e\n\u003cul\u003e\n {% for block
82
- in section.blocks %}\n \u003cli\u003e\n \u003ca href=\"{{ block.settings.url
83
- }}\" target=\"{% if block.settings.new_tab %}_blank{% endif %}\"\u003e\n {{
84
- block.settings.label }}\n \u003c/a\u003e\n \u003c/li\u003e\n {% endfor
85
- %}\n\u003c/ul\u003e\n","definition":{"category":"header","class":"section-header","default":{"blocks":[{"settings":{"label":"Link
86
- #1","new_tab":"true","url":"https://www.nocoffee.fr"},"type":"link"},{"settings":{"label":"Link
87
- #2","new_tab":"true","url":"https://www.nocoffee.fr"},"type":"link"}],"settings":{"brand":"MY
88
- COMPANY"}},"name":"header","settings":[{"default":"Header","id":"brand","label":"Text
89
- to display in the header","type":"text"}],"static":"true"}},{"_id":"5ae629b4a95330361d619e94","created_at":"2018-04-29T20:23:16Z","updated_at":"2018-04-29T20:23:16Z","name":"Carousel","slug":"carousel","template":"\u003ch2\u003e\n FOOTER
90
- PLAIN TEXT\n\u003c/h2\u003e\n","definition":{"category":"carousel","class":"section-carousel","name":"carousel","settings":[{"default":"Header","id":"brand","label":"Text
91
- to display in the carousel","type":"text"}],"static":"false"}}]'
100
+ string: "[]"
92
101
  http_version:
93
- recorded_at: Mon, 30 Apr 2018 08:02:01 GMT
102
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
94
103
  - request:
95
104
  method: post
96
105
  uri: http://localhost:3000/locomotive/sample/api/v3/sections.json
97
106
  body:
98
107
  encoding: UTF-8
99
- string: auth_token=oTxs76hxMqHv6jyav1tw&section%5Bdefinition%5D%5Bname%5D=sidebar&section%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Bid%5D=title&section%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Btype%5D=string&section%5Bname%5D=Sidebar&section%5Bslug%5D=sidebar&section%5Btemplate%5D=Locomotive+rocks%21
108
+ string: auth_token=bzwAyFQzcchf_hgDQhz3&section%5Bdefinition%5D%5Bname%5D=sidebar&section%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Bid%5D=title&section%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Btype%5D=text&section%5Bname%5D=Sidebar&section%5Bslug%5D=sidebar&section%5Btemplate%5D=Locomotive+rocks%21
100
109
  headers:
101
110
  User-Agent:
102
- - Faraday v0.14.0
111
+ - Faraday v0.15.4
103
112
  Accept:
104
113
  - application/json
105
114
  Accept-Encoding:
106
115
  - gzip,deflate
107
116
  Date:
108
- - Mon, 30 Apr 2018 08:02:01 GMT
117
+ - Sun, 17 Nov 2019 16:39:24 GMT
109
118
  X-Locomotive-Account-Email:
110
119
  - admin@locomotivecms.com
111
120
  X-Locomotive-Account-Token:
112
- - oTxs76hxMqHv6jyav1tw
121
+ - bzwAyFQzcchf_hgDQhz3
113
122
  Content-Type:
114
123
  - application/x-www-form-urlencoded
115
124
  response:
@@ -119,41 +128,51 @@ http_interactions:
119
128
  headers:
120
129
  Content-Type:
121
130
  - application/json
122
- Etag:
123
- - W/"19bceeabd505d7d296ba801379371a72"
131
+ Content-Length:
132
+ - '245'
133
+ Connection:
134
+ - keep-alive
135
+ Status:
136
+ - 201 Created
124
137
  Cache-Control:
125
138
  - max-age=0, private, must-revalidate
126
- X-Request-Id:
127
- - 4aa8a696-79c8-4a72-8cb0-bee2d2baeda7
139
+ Etag:
140
+ - W/"6efbc3c10345f9b5208f5c1f11e7436a"
128
141
  X-Runtime:
129
- - '0.036655'
130
- Content-Length:
131
- - '247'
142
+ - '0.028602'
143
+ X-Request-Id:
144
+ - 5042faa5-c0fd-4fb8-a3cc-14d01b4586f0
145
+ Date:
146
+ - Sun, 17 Nov 2019 16:39:24 GMT
147
+ X-Powered-By:
148
+ - Phusion Passenger 6.0.4
149
+ Server:
150
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
132
151
  body:
133
152
  encoding: UTF-8
134
- string: '{"_id":"5ae6cd79e051bb388c4d8890","created_at":"2018-04-30T08:02:01Z","updated_at":"2018-04-30T08:02:01Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
135
- rocks!","definition":{"name":"sidebar","settings":[{"id":"title","type":"string"}]}}'
153
+ string: '{"_id":"5dd177bca95330aa17f8f8db","created_at":"2019-11-17T16:39:24Z","updated_at":"2019-11-17T16:39:24Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
154
+ rocks!","definition":{"name":"sidebar","settings":[{"id":"title","type":"text"}]}}'
136
155
  http_version:
137
- recorded_at: Mon, 30 Apr 2018 08:02:01 GMT
156
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
138
157
  - request:
139
158
  method: put
140
- uri: http://localhost:3000/locomotive/sample/api/v3/sections/5ae6cd79e051bb388c4d8890.json
159
+ uri: http://localhost:3000/locomotive/sample/api/v3/sections/5dd177bca95330aa17f8f8db.json
141
160
  body:
142
161
  encoding: UTF-8
143
- string: auth_token=oTxs76hxMqHv6jyav1tw&section%5Btemplate%5D=Locomotive+rocks.+period
162
+ string: auth_token=bzwAyFQzcchf_hgDQhz3&section%5Btemplate%5D=Locomotive+rocks.+period
144
163
  headers:
145
164
  User-Agent:
146
- - Faraday v0.14.0
165
+ - Faraday v0.15.4
147
166
  Accept:
148
167
  - application/json
149
168
  Accept-Encoding:
150
169
  - gzip,deflate
151
170
  Date:
152
- - Mon, 30 Apr 2018 08:02:01 GMT
171
+ - Sun, 17 Nov 2019 16:39:24 GMT
153
172
  X-Locomotive-Account-Email:
154
173
  - admin@locomotivecms.com
155
174
  X-Locomotive-Account-Token:
156
- - oTxs76hxMqHv6jyav1tw
175
+ - bzwAyFQzcchf_hgDQhz3
157
176
  Content-Type:
158
177
  - application/x-www-form-urlencoded
159
178
  response:
@@ -163,41 +182,53 @@ http_interactions:
163
182
  headers:
164
183
  Content-Type:
165
184
  - application/json
166
- Etag:
167
- - W/"da36f1d7680992a2a7167dcc17772d51"
185
+ Transfer-Encoding:
186
+ - chunked
187
+ Connection:
188
+ - keep-alive
189
+ Status:
190
+ - 200 OK
168
191
  Cache-Control:
169
192
  - max-age=0, private, must-revalidate
170
- X-Request-Id:
171
- - 81cf8bcd-6d14-4743-9d1b-39c360b2d50c
193
+ Etag:
194
+ - W/"302257f3323e37c9a7c957bde91fce31"
172
195
  X-Runtime:
173
- - '0.033459'
174
- Content-Length:
175
- - '254'
196
+ - '0.024131'
197
+ X-Request-Id:
198
+ - bdbea9ba-14aa-42c3-8351-5b8f3d377afa
199
+ Date:
200
+ - Sun, 17 Nov 2019 16:39:24 GMT
201
+ X-Powered-By:
202
+ - Phusion Passenger 6.0.4
203
+ Server:
204
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
205
+ Content-Encoding:
206
+ - gzip
176
207
  body:
177
208
  encoding: UTF-8
178
- string: '{"_id":"5ae6cd79e051bb388c4d8890","created_at":"2018-04-30T08:02:01Z","updated_at":"2018-04-30T08:02:01Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
179
- rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"string"}]}}'
209
+ string: '{"_id":"5dd177bca95330aa17f8f8db","created_at":"2019-11-17T16:39:24Z","updated_at":"2019-11-17T16:39:24Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
210
+ rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"text"}]}}'
180
211
  http_version:
181
- recorded_at: Mon, 30 Apr 2018 08:02:01 GMT
212
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
182
213
  - request:
183
214
  method: delete
184
- uri: http://localhost:3000/locomotive/sample/api/v3/sections/5ae6cd79e051bb388c4d8890.json?auth_token=oTxs76hxMqHv6jyav1tw
215
+ uri: http://localhost:3000/locomotive/sample/api/v3/sections/5dd177bca95330aa17f8f8db.json?auth_token=bzwAyFQzcchf_hgDQhz3
185
216
  body:
186
217
  encoding: UTF-8
187
218
  string: ''
188
219
  headers:
189
220
  User-Agent:
190
- - Faraday v0.14.0
221
+ - Faraday v0.15.4
191
222
  Accept:
192
223
  - application/json
193
224
  Accept-Encoding:
194
225
  - gzip,deflate
195
226
  Date:
196
- - Mon, 30 Apr 2018 08:02:01 GMT
227
+ - Sun, 17 Nov 2019 16:39:24 GMT
197
228
  X-Locomotive-Account-Email:
198
229
  - admin@locomotivecms.com
199
230
  X-Locomotive-Account-Token:
200
- - oTxs76hxMqHv6jyav1tw
231
+ - bzwAyFQzcchf_hgDQhz3
201
232
  response:
202
233
  status:
203
234
  code: 200
@@ -205,20 +236,32 @@ http_interactions:
205
236
  headers:
206
237
  Content-Type:
207
238
  - application/json
208
- Etag:
209
- - W/"da36f1d7680992a2a7167dcc17772d51"
239
+ Transfer-Encoding:
240
+ - chunked
241
+ Connection:
242
+ - keep-alive
243
+ Status:
244
+ - 200 OK
210
245
  Cache-Control:
211
246
  - max-age=0, private, must-revalidate
212
- X-Request-Id:
213
- - 8e5bb871-c8bc-4794-bfd7-c6c5944eb899
247
+ Etag:
248
+ - W/"302257f3323e37c9a7c957bde91fce31"
214
249
  X-Runtime:
215
- - '0.028105'
216
- Content-Length:
217
- - '254'
250
+ - '0.019364'
251
+ X-Request-Id:
252
+ - e45c8cef-5450-43db-a351-4d22f6bc1a80
253
+ Date:
254
+ - Sun, 17 Nov 2019 16:39:24 GMT
255
+ X-Powered-By:
256
+ - Phusion Passenger 6.0.4
257
+ Server:
258
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
259
+ Content-Encoding:
260
+ - gzip
218
261
  body:
219
262
  encoding: UTF-8
220
- string: '{"_id":"5ae6cd79e051bb388c4d8890","created_at":"2018-04-30T08:02:01Z","updated_at":"2018-04-30T08:02:01Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
221
- rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"string"}]}}'
263
+ string: '{"_id":"5dd177bca95330aa17f8f8db","created_at":"2019-11-17T16:39:24Z","updated_at":"2019-11-17T16:39:24Z","name":"Sidebar","slug":"sidebar","template":"Locomotive
264
+ rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"text"}]}}'
222
265
  http_version:
223
- recorded_at: Mon, 30 Apr 2018 08:02:01 GMT
266
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
224
267
  recorded_with: VCR 4.0.0
@@ -7,14 +7,16 @@ http_interactions:
7
7
  encoding: UTF-8
8
8
  string: email=admin%40locomotivecms.com&password=locomotive
9
9
  headers:
10
+ User-Agent:
11
+ - Faraday v0.15.4
10
12
  Accept:
11
13
  - application/json
14
+ Accept-Encoding:
15
+ - gzip,deflate
16
+ Date:
17
+ - Sun, 17 Nov 2019 16:39:24 GMT
12
18
  Content-Type:
13
19
  - 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
20
  response:
19
21
  status:
20
22
  code: 201
@@ -22,122 +24,50 @@ http_interactions:
22
24
  headers:
23
25
  Content-Type:
24
26
  - application/json
25
- Etag:
26
- - W/"120917583ae3f64355d682b690f7cb40"
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - 7ea64e94-d6ee-4f5c-8069-fe2c99261cdc
31
- X-Runtime:
32
- - '0.017257'
33
27
  Content-Length:
34
28
  - '32'
35
- body:
36
- encoding: UTF-8
37
- string: '{"token":"E2aoXzMxkFsLnCcmCcc_"}'
38
- http_version:
39
- recorded_at: Sat, 21 Nov 2015 22:31:00 GMT
40
- - request:
41
- method: get
42
- uri: http://localhost:3000/locomotive/api/v3/sites.json?auth_token=E2aoXzMxkFsLnCcmCcc_
43
- body:
44
- encoding: US-ASCII
45
- string: ''
46
- headers:
47
- Accept:
48
- - application/json
49
- X-Locomotive-Account-Email:
50
- - admin@locomotivecms.com
51
- X-Locomotive-Account-Token:
52
- - E2aoXzMxkFsLnCcmCcc_
53
- Accept-Encoding:
54
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
55
- User-Agent:
56
- - Ruby
57
- response:
58
- status:
59
- code: 200
60
- message: OK
61
- headers:
62
- Content-Type:
63
- - application/json
64
- Etag:
65
- - W/"3a8a8abe91f933f0044deaa41db1e962"
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 201 Created
66
33
  Cache-Control:
67
34
  - max-age=0, private, must-revalidate
68
- X-Request-Id:
69
- - 1870bfe2-f33b-41f9-8a52-7803eff9fcd5
70
- X-Runtime:
71
- - '0.059006'
72
- Content-Length:
73
- - '1524'
74
- body:
75
- encoding: UTF-8
76
- string: '[{"_id":"5650f08c87f6436c94000002","created_at":"2015-11-21T22:30:36Z","updated_at":"2015-11-21T22:30:36Z","name":"LocomotiveCMS","handle":"www","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"locales":["en"],"domains":["www.example.com"],"memberships":[{"_id":"5650f08c87f6436c94000005","created_at":null,"updated_at":null,"role":"admin","account_id":"5650f08c87f6436c94000000","name":"John
77
- Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1448145036,"template_version":1448145036,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/www/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in"},{"_id":"5650f08c87f6436c94000006","created_at":"2015-11-21T22:30:36Z","updated_at":"2015-11-21T22:31:00Z","name":"Sample
78
- site","handle":"sample","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"locales":["en"],"domains":["sample.example.com"],"memberships":[{"_id":"5650f08c87f6436c94000009","created_at":null,"updated_at":null,"role":"admin","account_id":"5650f08c87f6436c94000000","name":"John
79
- Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1448145060,"template_version":1448145058,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/sample/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in"}]'
80
- http_version:
81
- recorded_at: Sat, 21 Nov 2015 22:31:00 GMT
82
- - request:
83
- method: post
84
- uri: http://localhost:3000/locomotive/api/v3/sites.json
85
- body:
86
- encoding: UTF-8
87
- string: auth_token=E2aoXzMxkFsLnCcmCcc_&site%5Bhandle%5D=acme&site%5Blocales%5D%5B%5D=en&site%5Bname%5D=Acme
88
- headers:
89
- Accept:
90
- - application/json
91
- X-Locomotive-Account-Email:
92
- - admin@locomotivecms.com
93
- X-Locomotive-Account-Token:
94
- - E2aoXzMxkFsLnCcmCcc_
95
- Content-Type:
96
- - application/x-www-form-urlencoded
97
- Accept-Encoding:
98
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
99
- User-Agent:
100
- - Ruby
101
- response:
102
- status:
103
- code: 201
104
- message: Created
105
- headers:
106
- Content-Type:
107
- - application/json
108
35
  Etag:
109
- - W/"1e7b3b53216ac2d81db62af9f5c21b67"
110
- Cache-Control:
111
- - max-age=0, private, must-revalidate
112
- X-Request-Id:
113
- - d4426626-4211-498d-9d6d-91d2159c9de5
36
+ - W/"410e3d6fde24f39257a7cc619b61baa7"
114
37
  X-Runtime:
115
- - '0.131513'
116
- Content-Length:
117
- - '744'
38
+ - '0.115832'
39
+ X-Request-Id:
40
+ - 0dfce39c-0574-431e-8c53-67cb765348de
41
+ Date:
42
+ - Sun, 17 Nov 2019 16:39:24 GMT
43
+ X-Powered-By:
44
+ - Phusion Passenger 6.0.4
45
+ Server:
46
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
118
47
  body:
119
48
  encoding: UTF-8
120
- string: '{"_id":"5650f0a487f6436cbc000028","created_at":"2015-11-21T22:31:00Z","updated_at":"2015-11-21T22:31:00Z","name":"Acme","handle":"lush-dawn-5649","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"locales":["en"],"domains":[],"memberships":[{"_id":"5650f0a487f6436cbc000029","created_at":null,"updated_at":null,"role":"admin","account_id":"5650f08c87f6436c94000000","name":"John
121
- Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":0,"template_version":1448145060,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/lush-dawn-5649/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in"}'
49
+ string: '{"token":"bzwAyFQzcchf_hgDQhz3"}'
122
50
  http_version:
123
- recorded_at: Sat, 21 Nov 2015 22:31:00 GMT
51
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
124
52
  - request:
125
- method: delete
126
- uri: http://localhost:3000/locomotive/api/v3/sites/5650f0a487f6436cbc000028.json?auth_token=E2aoXzMxkFsLnCcmCcc_
53
+ method: get
54
+ uri: http://localhost:3000/locomotive/api/v3/sites.json?auth_token=bzwAyFQzcchf_hgDQhz3
127
55
  body:
128
- encoding: US-ASCII
56
+ encoding: UTF-8
129
57
  string: ''
130
58
  headers:
59
+ User-Agent:
60
+ - Faraday v0.15.4
131
61
  Accept:
132
62
  - application/json
63
+ Accept-Encoding:
64
+ - gzip,deflate
65
+ Date:
66
+ - Sun, 17 Nov 2019 16:39:24 GMT
133
67
  X-Locomotive-Account-Email:
134
68
  - admin@locomotivecms.com
135
69
  X-Locomotive-Account-Token:
136
- - E2aoXzMxkFsLnCcmCcc_
137
- Accept-Encoding:
138
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
139
- User-Agent:
140
- - Ruby
70
+ - bzwAyFQzcchf_hgDQhz3
141
71
  response:
142
72
  status:
143
73
  code: 200
@@ -145,37 +75,53 @@ http_interactions:
145
75
  headers:
146
76
  Content-Type:
147
77
  - application/json
148
- Etag:
149
- - W/"1e7b3b53216ac2d81db62af9f5c21b67"
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ Status:
83
+ - 200 OK
150
84
  Cache-Control:
151
85
  - max-age=0, private, must-revalidate
152
- X-Request-Id:
153
- - c6474f4e-002f-485d-b834-3ec9db5047a3
86
+ Etag:
87
+ - W/"3c0036f2ffdff81eef12c1627cb023ca"
154
88
  X-Runtime:
155
- - '0.102743'
156
- Content-Length:
157
- - '744'
89
+ - '0.048373'
90
+ X-Request-Id:
91
+ - 76666b71-1188-4e05-b05c-e5ad3acc370a
92
+ Date:
93
+ - Sun, 17 Nov 2019 16:39:24 GMT
94
+ X-Powered-By:
95
+ - Phusion Passenger 6.0.4
96
+ Server:
97
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
98
+ Content-Encoding:
99
+ - gzip
158
100
  body:
159
101
  encoding: UTF-8
160
- string: '{"_id":"5650f0a487f6436cbc000028","created_at":"2015-11-21T22:31:00Z","updated_at":"2015-11-21T22:31:00Z","name":"Acme","handle":"lush-dawn-5649","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"locales":["en"],"domains":[],"memberships":[{"_id":"5650f0a487f6436cbc000029","created_at":null,"updated_at":null,"role":"admin","account_id":"5650f08c87f6436c94000000","name":"John
161
- Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":0,"template_version":1448145060,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/lush-dawn-5649/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in"}'
102
+ string: '[{"_id":"5dd1779ba95330a94bf7253e","created_at":"2019-11-17T16:38:51Z","updated_at":"2019-11-17T16:38:52Z","name":"LocomotiveCMS","handle":"www","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en","fr","nb"],"prefix_default_locale":false,"bypass_browser_locale":false,"domains":["www.example.com"],"asset_host":null,"url_redirections":[],"memberships":[{"_id":"5dd1779ca95330a94bf72541","created_at":null,"updated_at":null,"role":"admin","account_id":"5dd1779ba95330a94bf7253c","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1574008732,"template_version":1574008732,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/www/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}","sections_content":"{}","routes":"[]"},{"_id":"5dd1779ca95330a94bf72542","created_at":"2019-11-17T16:38:52Z","updated_at":"2019-11-17T16:38:52Z","name":"Sample
103
+ site","handle":"sample","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"prefix_default_locale":false,"bypass_browser_locale":false,"domains":["sample.example.com","acme.example.local"],"asset_host":null,"url_redirections":[],"memberships":[{"_id":"5dd1779ca95330a94bf72545","created_at":null,"updated_at":null,"role":"admin","account_id":"5dd1779ba95330a94bf7253c","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1574008732,"template_version":1574008732,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/sample/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}","sections_content":"{}","routes":"[]"}]'
162
104
  http_version:
163
- recorded_at: Sat, 21 Nov 2015 22:31:00 GMT
105
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
164
106
  - request:
165
107
  method: post
166
- uri: http://localhost:3000/locomotive/api/v3/tokens.json
108
+ uri: http://localhost:3000/locomotive/api/v3/sites.json
167
109
  body:
168
110
  encoding: UTF-8
169
- string: email=admin%40locomotivecms.com&password=locomotive
111
+ string: auth_token=bzwAyFQzcchf_hgDQhz3&site%5Bhandle%5D=acme&site%5Blocales%5D%5B%5D=en&site%5Bname%5D=Acme
170
112
  headers:
171
113
  User-Agent:
172
- - HTTPClient/1.0 (2.7.1, ruby 2.2.3 (2015-08-18))
114
+ - Faraday v0.15.4
173
115
  Accept:
174
116
  - application/json
175
117
  Accept-Encoding:
176
118
  - gzip,deflate
177
119
  Date:
178
- - Thu, 21 Jul 2016 08:30:28 GMT
120
+ - Sun, 17 Nov 2019 16:39:24 GMT
121
+ X-Locomotive-Account-Email:
122
+ - admin@locomotivecms.com
123
+ X-Locomotive-Account-Token:
124
+ - bzwAyFQzcchf_hgDQhz3
179
125
  Content-Type:
180
126
  - application/x-www-form-urlencoded
181
127
  response:
@@ -185,40 +131,50 @@ http_interactions:
185
131
  headers:
186
132
  Content-Type:
187
133
  - application/json
188
- Etag:
189
- - W/"ed6b5e5d77dd808432ec751c0deee185"
134
+ Content-Length:
135
+ - '946'
136
+ Connection:
137
+ - keep-alive
138
+ Status:
139
+ - 201 Created
190
140
  Cache-Control:
191
141
  - max-age=0, private, must-revalidate
192
- X-Request-Id:
193
- - e0a01184-2a20-479b-8dbc-b116141ee8fe
142
+ Etag:
143
+ - W/"0cf11fcd758fa106a3f9f9fc961a9d05"
194
144
  X-Runtime:
195
- - '0.186431'
196
- Content-Length:
197
- - '32'
145
+ - '0.088384'
146
+ X-Request-Id:
147
+ - a54fc775-c851-4c31-a47e-8e9a4542798b
148
+ Date:
149
+ - Sun, 17 Nov 2019 16:39:24 GMT
150
+ X-Powered-By:
151
+ - Phusion Passenger 6.0.4
152
+ Server:
153
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
198
154
  body:
199
155
  encoding: UTF-8
200
- string: '{"token":"4W9TGVPm1TgacsoyhusB"}'
156
+ string: '{"_id":"5dd177bca95330aa17f8f8d6","created_at":"2019-11-17T16:39:24Z","updated_at":"2019-11-17T16:39:24Z","name":"Acme","handle":"acme","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"prefix_default_locale":false,"bypass_browser_locale":false,"domains":[],"asset_host":null,"url_redirections":[],"memberships":[{"_id":"5dd177bca95330aa17f8f8d7","created_at":null,"updated_at":null,"role":"admin","account_id":"5dd1779ba95330a94bf7253c","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":0,"template_version":1574008764,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/acme/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}","sections_content":"{}","routes":"[]"}'
201
157
  http_version:
202
- recorded_at: Thu, 21 Jul 2016 08:30:28 GMT
158
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
203
159
  - request:
204
- method: get
205
- uri: http://localhost:3000/locomotive/api/v3/sites.json?auth_token=4W9TGVPm1TgacsoyhusB
160
+ method: delete
161
+ uri: http://localhost:3000/locomotive/api/v3/sites/5dd177bca95330aa17f8f8d6.json?auth_token=bzwAyFQzcchf_hgDQhz3
206
162
  body:
207
163
  encoding: UTF-8
208
164
  string: ''
209
165
  headers:
210
166
  User-Agent:
211
- - HTTPClient/1.0 (2.7.1, ruby 2.2.3 (2015-08-18))
167
+ - Faraday v0.15.4
212
168
  Accept:
213
169
  - application/json
214
170
  Accept-Encoding:
215
171
  - gzip,deflate
216
172
  Date:
217
- - Thu, 21 Jul 2016 08:30:28 GMT
173
+ - Sun, 17 Nov 2019 16:39:24 GMT
218
174
  X-Locomotive-Account-Email:
219
175
  - admin@locomotivecms.com
220
176
  X-Locomotive-Account-Token:
221
- - 4W9TGVPm1TgacsoyhusB
177
+ - bzwAyFQzcchf_hgDQhz3
222
178
  response:
223
179
  status:
224
180
  code: 200
@@ -226,20 +182,31 @@ http_interactions:
226
182
  headers:
227
183
  Content-Type:
228
184
  - application/json
229
- Etag:
230
- - W/"436570d60a44c4abddf750be2c1baaab"
185
+ Transfer-Encoding:
186
+ - chunked
187
+ Connection:
188
+ - keep-alive
189
+ Status:
190
+ - 200 OK
231
191
  Cache-Control:
232
192
  - max-age=0, private, must-revalidate
233
- X-Request-Id:
234
- - 6f0ec9fb-b5de-4e57-a0bb-b5764a65c173
193
+ Etag:
194
+ - W/"0cf11fcd758fa106a3f9f9fc961a9d05"
235
195
  X-Runtime:
236
- - '0.431548'
237
- Content-Length:
238
- - '1692'
196
+ - '0.152010'
197
+ X-Request-Id:
198
+ - 8f0c8e58-2d76-4244-a282-77059a7f8971
199
+ Date:
200
+ - Sun, 17 Nov 2019 16:39:24 GMT
201
+ X-Powered-By:
202
+ - Phusion Passenger 6.0.4
203
+ Server:
204
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
205
+ Content-Encoding:
206
+ - gzip
239
207
  body:
240
208
  encoding: UTF-8
241
- string: '[{"_id":"578fac3b00ea466ec7e90a2d","created_at":"2016-07-20T16:52:11Z","updated_at":"2016-07-20T16:52:12Z","name":"LocomotiveCMS","handle":"www","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"domains":["www.example.com"],"memberships":[{"_id":"578fac3c00ea466ec7e90a30","created_at":null,"updated_at":null,"role":"admin","account_id":"578fac3a00ea466ec7e90a2b","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1469033532,"template_version":1469033532,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/www/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}"},{"_id":"578fac3c00ea466ec7e90a31","created_at":"2016-07-20T16:52:12Z","updated_at":"2016-07-20T16:52:12Z","name":"Sample
242
- site","handle":"sample","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"domains":["sample.example.com"],"memberships":[{"_id":"578fac3c00ea466ec7e90a34","created_at":null,"updated_at":null,"role":"admin","account_id":"578fac3a00ea466ec7e90a2b","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1469033532,"template_version":1469033532,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/sample/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}"}]'
209
+ string: '{"_id":"5dd177bca95330aa17f8f8d6","created_at":"2019-11-17T16:39:24Z","updated_at":"2019-11-17T16:39:24Z","name":"Acme","handle":"acme","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"prefix_default_locale":false,"bypass_browser_locale":false,"domains":[],"asset_host":null,"url_redirections":[],"memberships":[{"_id":"5dd177bca95330aa17f8f8d7","created_at":null,"updated_at":null,"role":"admin","account_id":"5dd1779ba95330a94bf7253c","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":0,"template_version":1574008764,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/acme/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}","sections_content":"{}","routes":"[]"}'
243
210
  http_version:
244
- recorded_at: Thu, 21 Jul 2016 08:30:28 GMT
245
- recorded_with: VCR 3.0.1
211
+ recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
212
+ recorded_with: VCR 4.0.0