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
@@ -2,19 +2,21 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:3000/locomotive/api/v3/
|
5
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
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:30 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,175 +24,237 @@ http_interactions:
|
|
22
24
|
headers:
|
23
25
|
Content-Type:
|
24
26
|
- application/json
|
25
|
-
|
26
|
-
-
|
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
|
-
|
30
|
-
-
|
35
|
+
Etag:
|
36
|
+
- W/"410e3d6fde24f39257a7cc619b61baa7"
|
31
37
|
X-Runtime:
|
32
|
-
- '0.
|
33
|
-
|
34
|
-
-
|
38
|
+
- '0.004127'
|
39
|
+
X-Request-Id:
|
40
|
+
- edee538a-e182-4fc2-87d7-2e4bc60c00d6
|
41
|
+
Date:
|
42
|
+
- Sun, 17 Nov 2019 16:39:30 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: '{"
|
38
|
-
Doe","email":"jack@doe.net","locale":"en","api_key":"92f2e03b57b3f31f485ecf4d99bc94ea20eee862","super_admin":false,"local_admin":false}'
|
49
|
+
string: '{"token":"bzwAyFQzcchf_hgDQhz3"}'
|
39
50
|
http_version:
|
40
|
-
recorded_at:
|
51
|
+
recorded_at: Sun, 17 Nov 2019 16:39:30 GMT
|
41
52
|
- request:
|
42
|
-
method:
|
53
|
+
method: put
|
43
54
|
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
44
55
|
body:
|
45
56
|
encoding: UTF-8
|
46
|
-
string: account%5Bname%5D=
|
57
|
+
string: account%5Bname%5D=John+Doe&auth_token=bzwAyFQzcchf_hgDQhz3
|
47
58
|
headers:
|
59
|
+
User-Agent:
|
60
|
+
- Faraday v0.15.4
|
48
61
|
Accept:
|
49
62
|
- application/json
|
63
|
+
Accept-Encoding:
|
64
|
+
- gzip,deflate
|
65
|
+
Date:
|
66
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
67
|
+
X-Locomotive-Account-Email:
|
68
|
+
- admin@locomotivecms.com
|
69
|
+
X-Locomotive-Account-Token:
|
70
|
+
- bzwAyFQzcchf_hgDQhz3
|
50
71
|
Content-Type:
|
51
72
|
- application/x-www-form-urlencoded
|
52
|
-
Accept-Encoding:
|
53
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
54
|
-
User-Agent:
|
55
|
-
- Ruby
|
56
73
|
response:
|
57
74
|
status:
|
58
|
-
code:
|
59
|
-
message:
|
75
|
+
code: 200
|
76
|
+
message: OK
|
60
77
|
headers:
|
61
78
|
Content-Type:
|
62
79
|
- application/json
|
80
|
+
Transfer-Encoding:
|
81
|
+
- chunked
|
82
|
+
Connection:
|
83
|
+
- keep-alive
|
84
|
+
Status:
|
85
|
+
- 200 OK
|
63
86
|
Cache-Control:
|
64
|
-
-
|
65
|
-
|
66
|
-
-
|
87
|
+
- max-age=0, private, must-revalidate
|
88
|
+
Etag:
|
89
|
+
- W/"7f5b02da1aa964d6d9d0be396d5d6fb9"
|
67
90
|
X-Runtime:
|
68
|
-
- '0.
|
69
|
-
|
70
|
-
-
|
91
|
+
- '0.016235'
|
92
|
+
X-Request-Id:
|
93
|
+
- 7b9c8cd3-5e5e-4bc6-baec-567c194bcec9
|
94
|
+
Date:
|
95
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
96
|
+
X-Powered-By:
|
97
|
+
- Phusion Passenger 6.0.4
|
98
|
+
Server:
|
99
|
+
- nginx/1.17.3 + Phusion Passenger 6.0.4
|
100
|
+
Content-Encoding:
|
101
|
+
- gzip
|
71
102
|
body:
|
72
103
|
encoding: UTF-8
|
73
|
-
string: '{"
|
74
|
-
|
104
|
+
string: '{"_id":"5dd1779ba95330a94bf7253c","created_at":"2019-11-17T16:38:51Z","updated_at":"2019-11-17T16:39:30Z","name":"John
|
105
|
+
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":true,"local_admin":true}'
|
75
106
|
http_version:
|
76
|
-
recorded_at:
|
107
|
+
recorded_at: Sun, 17 Nov 2019 16:39:30 GMT
|
77
108
|
- request:
|
78
|
-
method:
|
79
|
-
uri: http://localhost:3000/locomotive/api/v3/
|
109
|
+
method: get
|
110
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=bzwAyFQzcchf_hgDQhz3
|
80
111
|
body:
|
81
112
|
encoding: UTF-8
|
82
|
-
string:
|
113
|
+
string: ''
|
83
114
|
headers:
|
115
|
+
User-Agent:
|
116
|
+
- Faraday v0.15.4
|
84
117
|
Accept:
|
85
118
|
- application/json
|
86
|
-
Content-Type:
|
87
|
-
- application/x-www-form-urlencoded
|
88
119
|
Accept-Encoding:
|
89
|
-
- gzip
|
90
|
-
|
91
|
-
-
|
120
|
+
- gzip,deflate
|
121
|
+
Date:
|
122
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
123
|
+
X-Locomotive-Account-Email:
|
124
|
+
- admin@locomotivecms.com
|
125
|
+
X-Locomotive-Account-Token:
|
126
|
+
- bzwAyFQzcchf_hgDQhz3
|
92
127
|
response:
|
93
128
|
status:
|
94
|
-
code:
|
95
|
-
message:
|
129
|
+
code: 200
|
130
|
+
message: OK
|
96
131
|
headers:
|
97
132
|
Content-Type:
|
98
133
|
- application/json
|
99
|
-
|
100
|
-
-
|
134
|
+
Transfer-Encoding:
|
135
|
+
- chunked
|
136
|
+
Connection:
|
137
|
+
- keep-alive
|
138
|
+
Status:
|
139
|
+
- 200 OK
|
101
140
|
Cache-Control:
|
102
141
|
- max-age=0, private, must-revalidate
|
103
|
-
|
104
|
-
-
|
142
|
+
Etag:
|
143
|
+
- W/"7f5b02da1aa964d6d9d0be396d5d6fb9"
|
105
144
|
X-Runtime:
|
106
|
-
- '0.
|
107
|
-
|
108
|
-
-
|
145
|
+
- '0.007792'
|
146
|
+
X-Request-Id:
|
147
|
+
- 2037c4b1-cd3c-4f90-a52b-d7d8ed64ffca
|
148
|
+
Date:
|
149
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
150
|
+
X-Powered-By:
|
151
|
+
- Phusion Passenger 6.0.4
|
152
|
+
Server:
|
153
|
+
- nginx/1.17.3 + Phusion Passenger 6.0.4
|
154
|
+
Content-Encoding:
|
155
|
+
- gzip
|
109
156
|
body:
|
110
157
|
encoding: UTF-8
|
111
|
-
string: '{"
|
158
|
+
string: '{"_id":"5dd1779ba95330a94bf7253c","created_at":"2019-11-17T16:38:51Z","updated_at":"2019-11-17T16:39:30Z","name":"John
|
159
|
+
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":true,"local_admin":true}'
|
112
160
|
http_version:
|
113
|
-
recorded_at:
|
161
|
+
recorded_at: Sun, 17 Nov 2019 16:39:30 GMT
|
114
162
|
- request:
|
115
|
-
method:
|
163
|
+
method: post
|
116
164
|
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
117
165
|
body:
|
118
166
|
encoding: UTF-8
|
119
|
-
string: account%5Bname%5D=
|
167
|
+
string: account%5Bemail%5D=jack%40doe.net&account%5Bname%5D=Jack+Doe&account%5Bpassword%5D=easyone&account%5Bpassword_confirmation%5D=easyone
|
120
168
|
headers:
|
169
|
+
User-Agent:
|
170
|
+
- Faraday v0.15.4
|
121
171
|
Accept:
|
122
172
|
- application/json
|
123
|
-
|
124
|
-
-
|
125
|
-
|
126
|
-
-
|
173
|
+
Accept-Encoding:
|
174
|
+
- gzip,deflate
|
175
|
+
Date:
|
176
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
127
177
|
Content-Type:
|
128
178
|
- application/x-www-form-urlencoded
|
129
|
-
Accept-Encoding:
|
130
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
131
|
-
User-Agent:
|
132
|
-
- Ruby
|
133
179
|
response:
|
134
180
|
status:
|
135
|
-
code:
|
136
|
-
message:
|
181
|
+
code: 201
|
182
|
+
message: Created
|
137
183
|
headers:
|
138
184
|
Content-Type:
|
139
185
|
- application/json
|
140
|
-
|
141
|
-
-
|
186
|
+
Content-Length:
|
187
|
+
- '254'
|
188
|
+
Connection:
|
189
|
+
- keep-alive
|
190
|
+
Status:
|
191
|
+
- 201 Created
|
142
192
|
Cache-Control:
|
143
193
|
- max-age=0, private, must-revalidate
|
144
|
-
|
145
|
-
-
|
194
|
+
Etag:
|
195
|
+
- W/"a6622ed0db1411c79380131ed794f25f"
|
146
196
|
X-Runtime:
|
147
|
-
- '0.
|
148
|
-
|
149
|
-
-
|
197
|
+
- '0.013885'
|
198
|
+
X-Request-Id:
|
199
|
+
- 4672e3bc-c78d-4dda-936b-717500fc9daf
|
200
|
+
Date:
|
201
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
202
|
+
X-Powered-By:
|
203
|
+
- Phusion Passenger 6.0.4
|
204
|
+
Server:
|
205
|
+
- nginx/1.17.3 + Phusion Passenger 6.0.4
|
150
206
|
body:
|
151
207
|
encoding: UTF-8
|
152
|
-
string: '{"_id":"
|
153
|
-
Doe","email":"
|
208
|
+
string: '{"_id":"5dd177c2a95330aa17f8f8df","created_at":"2019-11-17T16:39:30Z","updated_at":"2019-11-17T16:39:30Z","name":"Jack
|
209
|
+
Doe","email":"jack@doe.net","locale":"en","api_key":"b99855e630e7510ee902e0871f213328cfcbc552","super_admin":false,"local_admin":false}'
|
154
210
|
http_version:
|
155
|
-
recorded_at:
|
211
|
+
recorded_at: Sun, 17 Nov 2019 16:39:30 GMT
|
156
212
|
- request:
|
157
|
-
method:
|
158
|
-
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
213
|
+
method: post
|
214
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
159
215
|
body:
|
160
|
-
encoding:
|
161
|
-
string:
|
216
|
+
encoding: UTF-8
|
217
|
+
string: account%5Bname%5D=Wrong+account
|
162
218
|
headers:
|
219
|
+
User-Agent:
|
220
|
+
- Faraday v0.15.4
|
163
221
|
Accept:
|
164
222
|
- application/json
|
165
|
-
X-Locomotive-Account-Email:
|
166
|
-
- admin@locomotivecms.com
|
167
|
-
X-Locomotive-Account-Token:
|
168
|
-
- E2aoXzMxkFsLnCcmCcc_
|
169
223
|
Accept-Encoding:
|
170
|
-
- gzip
|
171
|
-
|
172
|
-
-
|
224
|
+
- gzip,deflate
|
225
|
+
Date:
|
226
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
227
|
+
Content-Type:
|
228
|
+
- application/x-www-form-urlencoded
|
173
229
|
response:
|
174
230
|
status:
|
175
|
-
code:
|
176
|
-
message:
|
231
|
+
code: 422
|
232
|
+
message: Unprocessable Entity
|
177
233
|
headers:
|
178
234
|
Content-Type:
|
179
235
|
- application/json
|
180
|
-
|
181
|
-
-
|
236
|
+
Content-Length:
|
237
|
+
- '92'
|
238
|
+
Connection:
|
239
|
+
- keep-alive
|
240
|
+
Status:
|
241
|
+
- 422 Unprocessable Entity
|
182
242
|
Cache-Control:
|
183
|
-
-
|
184
|
-
X-Request-Id:
|
185
|
-
- 92138415-2bf7-452a-b04c-d947488d0b71
|
243
|
+
- no-cache
|
186
244
|
X-Runtime:
|
187
|
-
- '0.
|
188
|
-
|
189
|
-
-
|
245
|
+
- '0.006917'
|
246
|
+
X-Request-Id:
|
247
|
+
- 323b1477-94b4-4e06-9da3-48e09f37bbc3
|
248
|
+
Date:
|
249
|
+
- Sun, 17 Nov 2019 16:39:30 GMT
|
250
|
+
X-Powered-By:
|
251
|
+
- Phusion Passenger 6.0.4
|
252
|
+
Server:
|
253
|
+
- nginx/1.17.3 + Phusion Passenger 6.0.4
|
190
254
|
body:
|
191
255
|
encoding: UTF-8
|
192
|
-
string: '{"
|
193
|
-
|
256
|
+
string: '{"error":"Resource invalid","attributes":{"email":["is missing"],"password":["is
|
257
|
+
missing"]}}'
|
194
258
|
http_version:
|
195
|
-
recorded_at:
|
196
|
-
recorded_with: VCR
|
259
|
+
recorded_at: Sun, 17 Nov 2019 16:39:30 GMT
|
260
|
+
recorded_with: VCR 4.0.0
|