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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -1
- data/Gemfile +0 -4
- data/Gemfile.lock +7 -8
- data/MIT-LICENSE +1 -1
- data/README.md +18 -3
- data/lib/locomotive/coal/client.rb +8 -0
- data/lib/locomotive/coal/resources/accounts.rb +33 -0
- data/lib/locomotive/coal/resources/concerns/request.rb +19 -1
- data/lib/locomotive/coal/version.rb +1 -1
- data/lib/locomotive/coal.rb +1 -0
- data/locomotivecms_coal.gemspec +1 -1
- data/spec/fixtures/coal_cassettes/accounts.yml +214 -0
- data/spec/fixtures/coal_cassettes/client.yml +277 -163
- data/spec/fixtures/coal_cassettes/content_assets.yml +144 -445
- data/spec/fixtures/coal_cassettes/content_entries.yml +963 -1647
- data/spec/fixtures/coal_cassettes/content_types.yml +387 -209
- data/spec/fixtures/coal_cassettes/current_site.yml +89 -49
- data/spec/fixtures/coal_cassettes/memberships.yml +143 -77
- data/spec/fixtures/coal_cassettes/my_account.yml +163 -99
- data/spec/fixtures/coal_cassettes/pages.yml +177 -99
- data/spec/fixtures/coal_cassettes/sections.yml +121 -78
- data/spec/fixtures/coal_cassettes/sites.yml +108 -141
- data/spec/fixtures/coal_cassettes/snippets.yml +140 -76
- data/spec/fixtures/coal_cassettes/theme_assets.yml +142 -254
- data/spec/fixtures/coal_cassettes/token.yml +64 -43
- data/spec/fixtures/coal_cassettes/translations.yml +140 -76
- data/spec/fixtures/coal_cassettes/version.yml +54 -30
- data/spec/integration/resources/accounts_spec.rb +38 -0
- data/spec/integration/resources/sections_spec.rb +1 -1
- data/spec/integration/resources/token_spec.rb +1 -1
- 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.
|
11
|
+
- Faraday v0.15.4
|
12
12
|
Accept:
|
13
13
|
- application/json
|
14
14
|
Accept-Encoding:
|
15
15
|
- gzip,deflate
|
16
16
|
Date:
|
17
|
-
-
|
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
|
-
|
28
|
-
-
|
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
|
-
|
32
|
-
-
|
35
|
+
Etag:
|
36
|
+
- W/"410e3d6fde24f39257a7cc619b61baa7"
|
33
37
|
X-Runtime:
|
34
|
-
- '0.
|
35
|
-
|
36
|
-
-
|
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":"
|
49
|
+
string: '{"token":"bzwAyFQzcchf_hgDQhz3"}'
|
40
50
|
http_version:
|
41
|
-
recorded_at:
|
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=
|
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.
|
60
|
+
- Faraday v0.15.4
|
51
61
|
Accept:
|
52
62
|
- application/json
|
53
63
|
Accept-Encoding:
|
54
64
|
- gzip,deflate
|
55
65
|
Date:
|
56
|
-
-
|
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
|
-
-
|
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
|
-
|
69
|
-
-
|
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
|
-
|
73
|
-
-
|
86
|
+
Etag:
|
87
|
+
- W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
|
74
88
|
X-Runtime:
|
75
|
-
- '0.
|
76
|
-
|
77
|
-
-
|
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:
|
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:
|
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=
|
108
|
+
string: auth_token=bzwAyFQzcchf_hgDQhz3§ion%5Bdefinition%5D%5Bname%5D=sidebar§ion%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Bid%5D=title§ion%5Bdefinition%5D%5Bsettings%5D%5B0%5D%5Btype%5D=text§ion%5Bname%5D=Sidebar§ion%5Bslug%5D=sidebar§ion%5Btemplate%5D=Locomotive+rocks%21
|
100
109
|
headers:
|
101
110
|
User-Agent:
|
102
|
-
- Faraday v0.
|
111
|
+
- Faraday v0.15.4
|
103
112
|
Accept:
|
104
113
|
- application/json
|
105
114
|
Accept-Encoding:
|
106
115
|
- gzip,deflate
|
107
116
|
Date:
|
108
|
-
-
|
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
|
-
-
|
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
|
-
|
123
|
-
-
|
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
|
-
|
127
|
-
-
|
139
|
+
Etag:
|
140
|
+
- W/"6efbc3c10345f9b5208f5c1f11e7436a"
|
128
141
|
X-Runtime:
|
129
|
-
- '0.
|
130
|
-
|
131
|
-
-
|
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":"
|
135
|
-
rocks!","definition":{"name":"sidebar","settings":[{"id":"title","type":"
|
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:
|
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/
|
159
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/sections/5dd177bca95330aa17f8f8db.json
|
141
160
|
body:
|
142
161
|
encoding: UTF-8
|
143
|
-
string: auth_token=
|
162
|
+
string: auth_token=bzwAyFQzcchf_hgDQhz3§ion%5Btemplate%5D=Locomotive+rocks.+period
|
144
163
|
headers:
|
145
164
|
User-Agent:
|
146
|
-
- Faraday v0.
|
165
|
+
- Faraday v0.15.4
|
147
166
|
Accept:
|
148
167
|
- application/json
|
149
168
|
Accept-Encoding:
|
150
169
|
- gzip,deflate
|
151
170
|
Date:
|
152
|
-
-
|
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
|
-
-
|
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
|
-
|
167
|
-
-
|
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
|
-
|
171
|
-
-
|
193
|
+
Etag:
|
194
|
+
- W/"302257f3323e37c9a7c957bde91fce31"
|
172
195
|
X-Runtime:
|
173
|
-
- '0.
|
174
|
-
|
175
|
-
-
|
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":"
|
179
|
-
rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"
|
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:
|
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/
|
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.
|
221
|
+
- Faraday v0.15.4
|
191
222
|
Accept:
|
192
223
|
- application/json
|
193
224
|
Accept-Encoding:
|
194
225
|
- gzip,deflate
|
195
226
|
Date:
|
196
|
-
-
|
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
|
-
-
|
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
|
-
|
209
|
-
-
|
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
|
-
|
213
|
-
-
|
247
|
+
Etag:
|
248
|
+
- W/"302257f3323e37c9a7c957bde91fce31"
|
214
249
|
X-Runtime:
|
215
|
-
- '0.
|
216
|
-
|
217
|
-
-
|
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":"
|
221
|
-
rocks. period","definition":{"name":"sidebar","settings":[{"id":"title","type":"
|
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:
|
266
|
+
recorded_at: Sun, 17 Nov 2019 16:39:24 GMT
|
224
267
|
recorded_with: VCR 4.0.0
|