locomotivecms_coal 1.6.0.rc1 → 1.6.0.rc2

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 +1 -1
  4. data/Gemfile +0 -4
  5. data/Gemfile.lock +7 -8
  6. data/MIT-LICENSE +1 -1
  7. data/README.md +18 -3
  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 +1 -1
  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 +10 -6
@@ -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