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
@@ -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:31 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,40 +24,52 @@ http_interactions:
22
24
  headers:
23
25
  Content-Type:
24
26
  - application/json
25
- Etag:
26
- - W/"120917583ae3f64355d682b690f7cb40"
27
+ Content-Length:
28
+ - '32'
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - 201 Created
27
33
  Cache-Control:
28
34
  - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - 4eae4a97-dd60-436a-88f1-6edd44c7f699
35
+ Etag:
36
+ - W/"410e3d6fde24f39257a7cc619b61baa7"
31
37
  X-Runtime:
32
- - '0.017439'
33
- Content-Length:
34
- - '32'
38
+ - '0.004300'
39
+ X-Request-Id:
40
+ - 496ee443-49f5-423c-847b-fe42e92c4fc6
41
+ Date:
42
+ - Sun, 17 Nov 2019 16:39:31 GMT
43
+ X-Powered-By:
44
+ - Phusion Passenger 6.0.4
45
+ Server:
46
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
35
47
  body:
36
48
  encoding: UTF-8
37
- string: '{"token":"E2aoXzMxkFsLnCcmCcc_"}'
49
+ string: '{"token":"bzwAyFQzcchf_hgDQhz3"}'
38
50
  http_version:
39
- recorded_at: Sat, 21 Nov 2015 22:31:02 GMT
51
+ recorded_at: Sun, 17 Nov 2019 16:39:31 GMT
40
52
  - request:
41
53
  method: get
42
- uri: http://localhost:3000/locomotive/sample/api/v3/snippets.json?auth_token=E2aoXzMxkFsLnCcmCcc_
54
+ uri: http://localhost:3000/locomotive/sample/api/v3/snippets.json?auth_token=bzwAyFQzcchf_hgDQhz3
43
55
  body:
44
- encoding: US-ASCII
56
+ encoding: UTF-8
45
57
  string: ''
46
58
  headers:
59
+ User-Agent:
60
+ - Faraday v0.15.4
47
61
  Accept:
48
62
  - application/json
63
+ Accept-Encoding:
64
+ - gzip,deflate
65
+ Date:
66
+ - Sun, 17 Nov 2019 16:39:31 GMT
49
67
  X-Locomotive-Account-Email:
50
68
  - admin@locomotivecms.com
51
69
  X-Locomotive-Account-Token:
52
- - E2aoXzMxkFsLnCcmCcc_
70
+ - bzwAyFQzcchf_hgDQhz3
53
71
  X-Locomotive-Locale:
54
72
  - ''
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- User-Agent:
58
- - Ruby
59
73
  response:
60
74
  status:
61
75
  code: 200
@@ -63,40 +77,52 @@ http_interactions:
63
77
  headers:
64
78
  Content-Type:
65
79
  - application/json
66
- Etag:
67
- - W/"d751713988987e9331980363e24189ce"
80
+ Content-Length:
81
+ - '2'
82
+ Connection:
83
+ - keep-alive
84
+ Status:
85
+ - 200 OK
68
86
  Cache-Control:
69
87
  - max-age=0, private, must-revalidate
70
- X-Request-Id:
71
- - 3e37c92f-728f-4f73-95cd-ed3741b8cbf3
88
+ Etag:
89
+ - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
72
90
  X-Runtime:
73
- - '0.025702'
74
- Content-Length:
75
- - '2'
91
+ - '0.014611'
92
+ X-Request-Id:
93
+ - 5fc5d6b0-2c4b-44d6-879f-eddf9fd7ed8d
94
+ Date:
95
+ - Sun, 17 Nov 2019 16:39:31 GMT
96
+ X-Powered-By:
97
+ - Phusion Passenger 6.0.4
98
+ Server:
99
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
76
100
  body:
77
101
  encoding: UTF-8
78
102
  string: "[]"
79
103
  http_version:
80
- recorded_at: Sat, 21 Nov 2015 22:31:02 GMT
104
+ recorded_at: Sun, 17 Nov 2019 16:39:31 GMT
81
105
  - request:
82
106
  method: post
83
107
  uri: http://localhost:3000/locomotive/sample/api/v3/snippets.json
84
108
  body:
85
109
  encoding: UTF-8
86
- string: auth_token=E2aoXzMxkFsLnCcmCcc_&snippet%5Bname%5D=Footer&snippet%5Bslug%5D=footer&snippet%5Btemplate%5D=Locomotive+rocks%21
110
+ string: auth_token=bzwAyFQzcchf_hgDQhz3&snippet%5Bname%5D=Footer&snippet%5Bslug%5D=footer&snippet%5Btemplate%5D=Locomotive+rocks%21
87
111
  headers:
112
+ User-Agent:
113
+ - Faraday v0.15.4
88
114
  Accept:
89
115
  - application/json
116
+ Accept-Encoding:
117
+ - gzip,deflate
118
+ Date:
119
+ - Sun, 17 Nov 2019 16:39:31 GMT
90
120
  X-Locomotive-Account-Email:
91
121
  - admin@locomotivecms.com
92
122
  X-Locomotive-Account-Token:
93
- - E2aoXzMxkFsLnCcmCcc_
123
+ - bzwAyFQzcchf_hgDQhz3
94
124
  Content-Type:
95
125
  - application/x-www-form-urlencoded
96
- Accept-Encoding:
97
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
- User-Agent:
99
- - Ruby
100
126
  response:
101
127
  status:
102
128
  code: 201
@@ -104,41 +130,53 @@ http_interactions:
104
130
  headers:
105
131
  Content-Type:
106
132
  - application/json
107
- Etag:
108
- - W/"6fd1f8f58519ef71254fe50d4d56924f"
133
+ Content-Length:
134
+ - '169'
135
+ Connection:
136
+ - keep-alive
137
+ Status:
138
+ - 201 Created
109
139
  Cache-Control:
110
140
  - max-age=0, private, must-revalidate
111
- X-Request-Id:
112
- - 10a0da9c-44aa-49fc-8362-f77567158951
141
+ Etag:
142
+ - W/"d32822cfbc1176fadcc53813e5650e2d"
113
143
  X-Runtime:
114
- - '0.037070'
115
- Content-Length:
116
- - '169'
144
+ - '0.021879'
145
+ X-Request-Id:
146
+ - 19792439-8164-4986-a1e8-c89889eff039
147
+ Date:
148
+ - Sun, 17 Nov 2019 16:39:31 GMT
149
+ X-Powered-By:
150
+ - Phusion Passenger 6.0.4
151
+ Server:
152
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
117
153
  body:
118
154
  encoding: UTF-8
119
- string: '{"_id":"5650f0a687f6436cbc000033","created_at":"2015-11-21T22:31:02Z","updated_at":"2015-11-21T22:31:02Z","name":"Footer","slug":"footer","template":"Locomotive
155
+ string: '{"_id":"5dd177c3a95330aa17f8f8e6","created_at":"2019-11-17T16:39:31Z","updated_at":"2019-11-17T16:39:31Z","name":"Footer","slug":"footer","template":"Locomotive
120
156
  rocks!"}'
121
157
  http_version:
122
- recorded_at: Sat, 21 Nov 2015 22:31:02 GMT
158
+ recorded_at: Sun, 17 Nov 2019 16:39:31 GMT
123
159
  - request:
124
160
  method: put
125
- uri: http://localhost:3000/locomotive/sample/api/v3/snippets/5650f0a687f6436cbc000033.json
161
+ uri: http://localhost:3000/locomotive/sample/api/v3/snippets/5dd177c3a95330aa17f8f8e6.json
126
162
  body:
127
163
  encoding: UTF-8
128
- string: auth_token=E2aoXzMxkFsLnCcmCcc_&snippet%5Btemplate%5D=Locomotive+rocks.+period
164
+ string: auth_token=bzwAyFQzcchf_hgDQhz3&snippet%5Btemplate%5D=Locomotive+rocks.+period
129
165
  headers:
166
+ User-Agent:
167
+ - Faraday v0.15.4
130
168
  Accept:
131
169
  - application/json
170
+ Accept-Encoding:
171
+ - gzip,deflate
172
+ Date:
173
+ - Sun, 17 Nov 2019 16:39:31 GMT
132
174
  X-Locomotive-Account-Email:
133
175
  - admin@locomotivecms.com
134
176
  X-Locomotive-Account-Token:
135
- - E2aoXzMxkFsLnCcmCcc_
177
+ - bzwAyFQzcchf_hgDQhz3
136
178
  Content-Type:
137
179
  - application/x-www-form-urlencoded
138
- Accept-Encoding:
139
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
140
- User-Agent:
141
- - Ruby
142
180
  response:
143
181
  status:
144
182
  code: 200
@@ -146,39 +184,53 @@ http_interactions:
146
184
  headers:
147
185
  Content-Type:
148
186
  - application/json
149
- Etag:
150
- - W/"325fba36719f0a2bff11a2e9ee5e33f4"
187
+ Transfer-Encoding:
188
+ - chunked
189
+ Connection:
190
+ - keep-alive
191
+ Status:
192
+ - 200 OK
151
193
  Cache-Control:
152
194
  - max-age=0, private, must-revalidate
153
- X-Request-Id:
154
- - b9308197-8d1a-41b4-a922-073787811d07
195
+ Etag:
196
+ - W/"2197badf15aa10bbcc18cdf139791f06"
155
197
  X-Runtime:
156
- - '0.034344'
157
- Content-Length:
158
- - '176'
198
+ - '0.021834'
199
+ X-Request-Id:
200
+ - 99c35a38-f168-477c-a40d-e3facf91cc44
201
+ Date:
202
+ - Sun, 17 Nov 2019 16:39:31 GMT
203
+ X-Powered-By:
204
+ - Phusion Passenger 6.0.4
205
+ Server:
206
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
207
+ Content-Encoding:
208
+ - gzip
159
209
  body:
160
210
  encoding: UTF-8
161
- string: '{"_id":"5650f0a687f6436cbc000033","created_at":"2015-11-21T22:31:02Z","updated_at":"2015-11-21T22:31:02Z","name":"Footer","slug":"footer","template":"Locomotive
211
+ string: '{"_id":"5dd177c3a95330aa17f8f8e6","created_at":"2019-11-17T16:39:31Z","updated_at":"2019-11-17T16:39:31Z","name":"Footer","slug":"footer","template":"Locomotive
162
212
  rocks. period"}'
163
213
  http_version:
164
- recorded_at: Sat, 21 Nov 2015 22:31:02 GMT
214
+ recorded_at: Sun, 17 Nov 2019 16:39:31 GMT
165
215
  - request:
166
216
  method: delete
167
- uri: http://localhost:3000/locomotive/sample/api/v3/snippets/5650f0a687f6436cbc000033.json?auth_token=E2aoXzMxkFsLnCcmCcc_
217
+ uri: http://localhost:3000/locomotive/sample/api/v3/snippets/5dd177c3a95330aa17f8f8e6.json?auth_token=bzwAyFQzcchf_hgDQhz3
168
218
  body:
169
- encoding: US-ASCII
219
+ encoding: UTF-8
170
220
  string: ''
171
221
  headers:
222
+ User-Agent:
223
+ - Faraday v0.15.4
172
224
  Accept:
173
225
  - application/json
226
+ Accept-Encoding:
227
+ - gzip,deflate
228
+ Date:
229
+ - Sun, 17 Nov 2019 16:39:31 GMT
174
230
  X-Locomotive-Account-Email:
175
231
  - admin@locomotivecms.com
176
232
  X-Locomotive-Account-Token:
177
- - E2aoXzMxkFsLnCcmCcc_
178
- Accept-Encoding:
179
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
180
- User-Agent:
181
- - Ruby
233
+ - bzwAyFQzcchf_hgDQhz3
182
234
  response:
183
235
  status:
184
236
  code: 200
@@ -186,20 +238,32 @@ http_interactions:
186
238
  headers:
187
239
  Content-Type:
188
240
  - application/json
189
- Etag:
190
- - W/"325fba36719f0a2bff11a2e9ee5e33f4"
241
+ Transfer-Encoding:
242
+ - chunked
243
+ Connection:
244
+ - keep-alive
245
+ Status:
246
+ - 200 OK
191
247
  Cache-Control:
192
248
  - max-age=0, private, must-revalidate
193
- X-Request-Id:
194
- - 357b0f60-db70-4d47-a92c-3442d9d563da
249
+ Etag:
250
+ - W/"2197badf15aa10bbcc18cdf139791f06"
195
251
  X-Runtime:
196
- - '0.042417'
197
- Content-Length:
198
- - '176'
252
+ - '0.016640'
253
+ X-Request-Id:
254
+ - 3bc518fa-446d-4ef0-b725-741fbc45af17
255
+ Date:
256
+ - Sun, 17 Nov 2019 16:39:31 GMT
257
+ X-Powered-By:
258
+ - Phusion Passenger 6.0.4
259
+ Server:
260
+ - nginx/1.17.3 + Phusion Passenger 6.0.4
261
+ Content-Encoding:
262
+ - gzip
199
263
  body:
200
264
  encoding: UTF-8
201
- string: '{"_id":"5650f0a687f6436cbc000033","created_at":"2015-11-21T22:31:02Z","updated_at":"2015-11-21T22:31:02Z","name":"Footer","slug":"footer","template":"Locomotive
265
+ string: '{"_id":"5dd177c3a95330aa17f8f8e6","created_at":"2019-11-17T16:39:31Z","updated_at":"2019-11-17T16:39:31Z","name":"Footer","slug":"footer","template":"Locomotive
202
266
  rocks. period"}'
203
267
  http_version:
204
- recorded_at: Sat, 21 Nov 2015 22:31:02 GMT
205
- recorded_with: VCR 2.9.3
268
+ recorded_at: Sun, 17 Nov 2019 16:39:31 GMT
269
+ recorded_with: VCR 4.0.0