locomotivecms_coal 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -4
- data/lib/locomotive/coal/error.rb +12 -0
- data/lib/locomotive/coal/version.rb +1 -1
- data/spec/fixtures/coal_cassettes/client.yml +98 -128
- data/spec/fixtures/coal_cassettes/content_assets.yml +33 -33
- data/spec/fixtures/coal_cassettes/content_entries.yml +227 -227
- data/spec/fixtures/coal_cassettes/content_types.yml +95 -95
- data/spec/fixtures/coal_cassettes/current_site.yml +35 -33
- data/spec/fixtures/coal_cassettes/memberships.yml +36 -35
- data/spec/fixtures/coal_cassettes/my_account.yml +69 -68
- data/spec/fixtures/coal_cassettes/pages.yml +51 -51
- data/spec/fixtures/coal_cassettes/sites.yml +34 -30
- data/spec/fixtures/coal_cassettes/snippets.yml +32 -32
- data/spec/fixtures/coal_cassettes/theme_assets.yml +35 -35
- data/spec/fixtures/coal_cassettes/token.yml +32 -25
- data/spec/fixtures/coal_cassettes/translations.yml +32 -32
- data/spec/fixtures/coal_cassettes/version.yml +13 -13
- data/spec/unit/error_spec.rb +8 -0
- metadata +3 -3
@@ -23,23 +23,23 @@ http_interactions:
|
|
23
23
|
Content-Type:
|
24
24
|
- application/json
|
25
25
|
Etag:
|
26
|
-
- W/"
|
26
|
+
- W/"120917583ae3f64355d682b690f7cb40"
|
27
27
|
Cache-Control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
X-Request-Id:
|
30
|
-
-
|
30
|
+
- 381e6af9-10dd-44a7-a3d4-4b33d244be49
|
31
31
|
X-Runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.018218'
|
33
33
|
Content-Length:
|
34
34
|
- '32'
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
|
-
string: '{"token":"
|
37
|
+
string: '{"token":"E2aoXzMxkFsLnCcmCcc_"}'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
40
40
|
- request:
|
41
41
|
method: get
|
42
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/memberships.json?auth_token=
|
42
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/memberships.json?auth_token=E2aoXzMxkFsLnCcmCcc_
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
45
|
string: ''
|
@@ -49,7 +49,7 @@ http_interactions:
|
|
49
49
|
X-Locomotive-Account-Email:
|
50
50
|
- admin@locomotivecms.com
|
51
51
|
X-Locomotive-Account-Token:
|
52
|
-
-
|
52
|
+
- E2aoXzMxkFsLnCcmCcc_
|
53
53
|
Accept-Encoding:
|
54
54
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
55
|
User-Agent:
|
@@ -62,33 +62,34 @@ http_interactions:
|
|
62
62
|
Content-Type:
|
63
63
|
- application/json
|
64
64
|
Etag:
|
65
|
-
- W/"
|
65
|
+
- W/"82f4a0f214f0ee00db7eb994a6bf4a5c"
|
66
66
|
Cache-Control:
|
67
67
|
- max-age=0, private, must-revalidate
|
68
68
|
X-Request-Id:
|
69
|
-
-
|
69
|
+
- 360cc50b-3816-4a32-92eb-d234f2afa0e2
|
70
70
|
X-Runtime:
|
71
|
-
- '0.
|
71
|
+
- '0.040017'
|
72
72
|
Content-Length:
|
73
|
-
- '
|
73
|
+
- '207'
|
74
74
|
body:
|
75
75
|
encoding: UTF-8
|
76
|
-
string: '[{"_id":"
|
76
|
+
string: '[{"_id":"5650f08c87f6436c94000009","created_at":null,"updated_at":null,"role":"admin","account_id":"5650f08c87f6436c94000000","name":"John
|
77
|
+
Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}]'
|
77
78
|
http_version:
|
78
|
-
recorded_at:
|
79
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
79
80
|
- request:
|
80
81
|
method: post
|
81
82
|
uri: http://localhost:3000/locomotive/sample/api/v3/memberships.json
|
82
83
|
body:
|
83
84
|
encoding: UTF-8
|
84
|
-
string: auth_token=
|
85
|
+
string: auth_token=E2aoXzMxkFsLnCcmCcc_&membership%5Baccount_email%5D=new_admin%40locomotivecms.com&membership%5Brole%5D=Admin
|
85
86
|
headers:
|
86
87
|
Accept:
|
87
88
|
- application/json
|
88
89
|
X-Locomotive-Account-Email:
|
89
90
|
- admin@locomotivecms.com
|
90
91
|
X-Locomotive-Account-Token:
|
91
|
-
-
|
92
|
+
- E2aoXzMxkFsLnCcmCcc_
|
92
93
|
Content-Type:
|
93
94
|
- application/x-www-form-urlencoded
|
94
95
|
Accept-Encoding:
|
@@ -103,34 +104,34 @@ http_interactions:
|
|
103
104
|
Content-Type:
|
104
105
|
- application/json
|
105
106
|
Etag:
|
106
|
-
- W/"
|
107
|
+
- W/"6f334477e9c89e2e09fc2f4736bd17c9"
|
107
108
|
Cache-Control:
|
108
109
|
- max-age=0, private, must-revalidate
|
109
110
|
X-Request-Id:
|
110
|
-
-
|
111
|
+
- 32f9a532-001b-4629-9b7a-b27cd431ccaa
|
111
112
|
X-Runtime:
|
112
|
-
- '0.
|
113
|
+
- '0.045455'
|
113
114
|
Content-Length:
|
114
115
|
- '246'
|
115
116
|
body:
|
116
117
|
encoding: UTF-8
|
117
|
-
string: '{"_id":"
|
118
|
+
string: '{"_id":"5650f0a187f6436cbc000001","created_at":"2015-11-21T22:30:57Z","updated_at":"2015-11-21T22:30:57Z","role":"admin","account_id":"5650f08c87f6436c94000001","name":"New
|
118
119
|
Admin","role_name":"Administrator","email":"new_admin@locomotivecms.com"}'
|
119
120
|
http_version:
|
120
|
-
recorded_at:
|
121
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
121
122
|
- request:
|
122
123
|
method: put
|
123
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/
|
124
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/5650f0a187f6436cbc000001.json
|
124
125
|
body:
|
125
126
|
encoding: UTF-8
|
126
|
-
string: auth_token=
|
127
|
+
string: auth_token=E2aoXzMxkFsLnCcmCcc_&membership%5Brole%5D=author
|
127
128
|
headers:
|
128
129
|
Accept:
|
129
130
|
- application/json
|
130
131
|
X-Locomotive-Account-Email:
|
131
132
|
- admin@locomotivecms.com
|
132
133
|
X-Locomotive-Account-Token:
|
133
|
-
-
|
134
|
+
- E2aoXzMxkFsLnCcmCcc_
|
134
135
|
Content-Type:
|
135
136
|
- application/x-www-form-urlencoded
|
136
137
|
Accept-Encoding:
|
@@ -145,24 +146,24 @@ http_interactions:
|
|
145
146
|
Content-Type:
|
146
147
|
- application/json
|
147
148
|
Etag:
|
148
|
-
- W/"
|
149
|
+
- W/"ebcae4e0ba25af79a3f418be1dce184e"
|
149
150
|
Cache-Control:
|
150
151
|
- max-age=0, private, must-revalidate
|
151
152
|
X-Request-Id:
|
152
|
-
-
|
153
|
+
- 47379333-8b9e-4463-b79e-e0e3bf9be16d
|
153
154
|
X-Runtime:
|
154
|
-
- '0.
|
155
|
+
- '0.039794'
|
155
156
|
Content-Length:
|
156
157
|
- '240'
|
157
158
|
body:
|
158
159
|
encoding: UTF-8
|
159
|
-
string: '{"_id":"
|
160
|
+
string: '{"_id":"5650f0a187f6436cbc000001","created_at":"2015-11-21T22:30:57Z","updated_at":"2015-11-21T22:30:57Z","role":"author","account_id":"5650f08c87f6436c94000001","name":"New
|
160
161
|
Admin","role_name":"Author","email":"new_admin@locomotivecms.com"}'
|
161
162
|
http_version:
|
162
|
-
recorded_at:
|
163
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
163
164
|
- request:
|
164
165
|
method: delete
|
165
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/
|
166
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/5650f0a187f6436cbc000001.json?auth_token=E2aoXzMxkFsLnCcmCcc_
|
166
167
|
body:
|
167
168
|
encoding: US-ASCII
|
168
169
|
string: ''
|
@@ -172,7 +173,7 @@ http_interactions:
|
|
172
173
|
X-Locomotive-Account-Email:
|
173
174
|
- admin@locomotivecms.com
|
174
175
|
X-Locomotive-Account-Token:
|
175
|
-
-
|
176
|
+
- E2aoXzMxkFsLnCcmCcc_
|
176
177
|
Accept-Encoding:
|
177
178
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
178
179
|
User-Agent:
|
@@ -185,19 +186,19 @@ http_interactions:
|
|
185
186
|
Content-Type:
|
186
187
|
- application/json
|
187
188
|
Etag:
|
188
|
-
- W/"
|
189
|
+
- W/"ebcae4e0ba25af79a3f418be1dce184e"
|
189
190
|
Cache-Control:
|
190
191
|
- max-age=0, private, must-revalidate
|
191
192
|
X-Request-Id:
|
192
|
-
-
|
193
|
+
- 81a087fc-2a4a-4390-897a-24303b0f44a5
|
193
194
|
X-Runtime:
|
194
|
-
- '0.
|
195
|
+
- '0.036796'
|
195
196
|
Content-Length:
|
196
197
|
- '240'
|
197
198
|
body:
|
198
199
|
encoding: UTF-8
|
199
|
-
string: '{"_id":"
|
200
|
+
string: '{"_id":"5650f0a187f6436cbc000001","created_at":"2015-11-21T22:30:57Z","updated_at":"2015-11-21T22:30:57Z","role":"author","account_id":"5650f08c87f6436c94000001","name":"New
|
200
201
|
Admin","role_name":"Author","email":"new_admin@locomotivecms.com"}'
|
201
202
|
http_version:
|
202
|
-
recorded_at:
|
203
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
203
204
|
recorded_with: VCR 2.9.3
|
@@ -2,10 +2,10 @@
|
|
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/my_account.json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: account%5Bemail%5D=jack%40doe.net&account%5Bname%5D=Jack+Doe&account%5Bpassword%5D=easyone&account%5Bpassword_confirmation%5D=easyone
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/json
|
@@ -23,72 +23,66 @@ http_interactions:
|
|
23
23
|
Content-Type:
|
24
24
|
- application/json
|
25
25
|
Etag:
|
26
|
-
- W/"
|
26
|
+
- W/"dce6a314e0a0733cd3d313f6a20efa40"
|
27
27
|
Cache-Control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
X-Request-Id:
|
30
|
-
-
|
30
|
+
- 70848878-d96e-4830-b461-8f9036921cbe
|
31
31
|
X-Runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.486625'
|
33
33
|
Content-Length:
|
34
|
-
- '
|
34
|
+
- '254'
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
|
-
string: '{"
|
37
|
+
string: '{"_id":"5650f0a087f6436cbc000000","created_at":"2015-11-21T22:30:56Z","updated_at":"2015-11-21T22:30:56Z","name":"Jack
|
38
|
+
Doe","email":"jack@doe.net","locale":"en","api_key":"92f2e03b57b3f31f485ecf4d99bc94ea20eee862","super_admin":false,"local_admin":false}'
|
38
39
|
http_version:
|
39
|
-
recorded_at:
|
40
|
+
recorded_at: Sat, 21 Nov 2015 22:30:56 GMT
|
40
41
|
- request:
|
41
|
-
method:
|
42
|
-
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
42
|
+
method: post
|
43
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
43
44
|
body:
|
44
|
-
encoding:
|
45
|
-
string:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: account%5Bname%5D=Wrong+account
|
46
47
|
headers:
|
47
48
|
Accept:
|
48
49
|
- application/json
|
49
|
-
|
50
|
-
-
|
51
|
-
X-Locomotive-Account-Token:
|
52
|
-
- xM_3r1zn2aQAinPFqSvd
|
50
|
+
Content-Type:
|
51
|
+
- application/x-www-form-urlencoded
|
53
52
|
Accept-Encoding:
|
54
53
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
54
|
User-Agent:
|
56
55
|
- Ruby
|
57
56
|
response:
|
58
57
|
status:
|
59
|
-
code:
|
60
|
-
message:
|
58
|
+
code: 422
|
59
|
+
message: Unprocessable Entity
|
61
60
|
headers:
|
62
61
|
Content-Type:
|
63
62
|
- application/json
|
64
|
-
Etag:
|
65
|
-
- W/"5d81ea9f3bdc8f0d8d64e6987d114b29"
|
66
63
|
Cache-Control:
|
67
|
-
-
|
64
|
+
- no-cache
|
68
65
|
X-Request-Id:
|
69
|
-
-
|
66
|
+
- 3fab80c5-9da7-4de9-8b9f-5e0ffa3bb1c1
|
70
67
|
X-Runtime:
|
71
|
-
- '0.
|
68
|
+
- '0.600956'
|
72
69
|
Content-Length:
|
73
|
-
- '
|
70
|
+
- '92'
|
74
71
|
body:
|
75
72
|
encoding: UTF-8
|
76
|
-
string: '{"
|
73
|
+
string: '{"error":"Resource invalid","attributes":{"email":["is missing"],"password":["is
|
74
|
+
missing"]}}'
|
77
75
|
http_version:
|
78
|
-
recorded_at:
|
76
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
79
77
|
- request:
|
80
|
-
method:
|
81
|
-
uri: http://localhost:3000/locomotive/api/v3/
|
78
|
+
method: post
|
79
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
82
80
|
body:
|
83
81
|
encoding: UTF-8
|
84
|
-
string:
|
82
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
85
83
|
headers:
|
86
84
|
Accept:
|
87
85
|
- application/json
|
88
|
-
X-Locomotive-Account-Email:
|
89
|
-
- admin@locomotivecms.com
|
90
|
-
X-Locomotive-Account-Token:
|
91
|
-
- xM_3r1zn2aQAinPFqSvd
|
92
86
|
Content-Type:
|
93
87
|
- application/x-www-form-urlencoded
|
94
88
|
Accept-Encoding:
|
@@ -97,36 +91,39 @@ http_interactions:
|
|
97
91
|
- Ruby
|
98
92
|
response:
|
99
93
|
status:
|
100
|
-
code:
|
101
|
-
message:
|
94
|
+
code: 201
|
95
|
+
message: Created
|
102
96
|
headers:
|
103
97
|
Content-Type:
|
104
98
|
- application/json
|
105
99
|
Etag:
|
106
|
-
- W/"
|
100
|
+
- W/"120917583ae3f64355d682b690f7cb40"
|
107
101
|
Cache-Control:
|
108
102
|
- max-age=0, private, must-revalidate
|
109
103
|
X-Request-Id:
|
110
|
-
-
|
104
|
+
- 1101bb4a-c567-4209-95ad-d151951e68d6
|
111
105
|
X-Runtime:
|
112
|
-
- '0.
|
106
|
+
- '0.018846'
|
113
107
|
Content-Length:
|
114
|
-
- '
|
108
|
+
- '32'
|
115
109
|
body:
|
116
110
|
encoding: UTF-8
|
117
|
-
string: '{"
|
118
|
-
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
|
111
|
+
string: '{"token":"E2aoXzMxkFsLnCcmCcc_"}'
|
119
112
|
http_version:
|
120
|
-
recorded_at:
|
113
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
121
114
|
- request:
|
122
|
-
method:
|
115
|
+
method: put
|
123
116
|
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
124
117
|
body:
|
125
118
|
encoding: UTF-8
|
126
|
-
string: account%
|
119
|
+
string: account%5Bname%5D=John+Doe&auth_token=E2aoXzMxkFsLnCcmCcc_
|
127
120
|
headers:
|
128
121
|
Accept:
|
129
122
|
- application/json
|
123
|
+
X-Locomotive-Account-Email:
|
124
|
+
- admin@locomotivecms.com
|
125
|
+
X-Locomotive-Account-Token:
|
126
|
+
- E2aoXzMxkFsLnCcmCcc_
|
130
127
|
Content-Type:
|
131
128
|
- application/x-www-form-urlencoded
|
132
129
|
Accept-Encoding:
|
@@ -135,61 +132,65 @@ http_interactions:
|
|
135
132
|
- Ruby
|
136
133
|
response:
|
137
134
|
status:
|
138
|
-
code:
|
139
|
-
message:
|
135
|
+
code: 200
|
136
|
+
message: OK
|
140
137
|
headers:
|
141
138
|
Content-Type:
|
142
139
|
- application/json
|
143
140
|
Etag:
|
144
|
-
- W/"
|
141
|
+
- W/"aa5b3af2d3ff7e0d53fd68d1d077876d"
|
145
142
|
Cache-Control:
|
146
143
|
- max-age=0, private, must-revalidate
|
147
144
|
X-Request-Id:
|
148
|
-
-
|
145
|
+
- dc423123-88c7-4cc7-a7f5-e021ab2abe79
|
149
146
|
X-Runtime:
|
150
|
-
- '0.
|
147
|
+
- '0.040982'
|
151
148
|
Content-Length:
|
152
|
-
- '
|
149
|
+
- '264'
|
153
150
|
body:
|
154
151
|
encoding: UTF-8
|
155
|
-
string: '{"_id":"
|
156
|
-
Doe","email":"
|
152
|
+
string: '{"_id":"5650f08c87f6436c94000000","created_at":"2015-11-21T22:30:36Z","updated_at":"2015-11-21T22:30:57Z","name":"John
|
153
|
+
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
|
157
154
|
http_version:
|
158
|
-
recorded_at:
|
155
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
159
156
|
- request:
|
160
|
-
method:
|
161
|
-
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
157
|
+
method: get
|
158
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=E2aoXzMxkFsLnCcmCcc_
|
162
159
|
body:
|
163
|
-
encoding:
|
164
|
-
string:
|
160
|
+
encoding: US-ASCII
|
161
|
+
string: ''
|
165
162
|
headers:
|
166
163
|
Accept:
|
167
164
|
- application/json
|
168
|
-
|
169
|
-
-
|
165
|
+
X-Locomotive-Account-Email:
|
166
|
+
- admin@locomotivecms.com
|
167
|
+
X-Locomotive-Account-Token:
|
168
|
+
- E2aoXzMxkFsLnCcmCcc_
|
170
169
|
Accept-Encoding:
|
171
170
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
172
171
|
User-Agent:
|
173
172
|
- Ruby
|
174
173
|
response:
|
175
174
|
status:
|
176
|
-
code:
|
177
|
-
message:
|
175
|
+
code: 200
|
176
|
+
message: OK
|
178
177
|
headers:
|
179
178
|
Content-Type:
|
180
179
|
- application/json
|
180
|
+
Etag:
|
181
|
+
- W/"aa5b3af2d3ff7e0d53fd68d1d077876d"
|
181
182
|
Cache-Control:
|
182
|
-
-
|
183
|
+
- max-age=0, private, must-revalidate
|
183
184
|
X-Request-Id:
|
184
|
-
-
|
185
|
+
- 92138415-2bf7-452a-b04c-d947488d0b71
|
185
186
|
X-Runtime:
|
186
|
-
- '0.
|
187
|
+
- '0.019667'
|
187
188
|
Content-Length:
|
188
|
-
- '
|
189
|
+
- '264'
|
189
190
|
body:
|
190
191
|
encoding: UTF-8
|
191
|
-
string: '{"
|
192
|
-
|
192
|
+
string: '{"_id":"5650f08c87f6436c94000000","created_at":"2015-11-21T22:30:36Z","updated_at":"2015-11-21T22:30:57Z","name":"John
|
193
|
+
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
|
193
194
|
http_version:
|
194
|
-
recorded_at:
|
195
|
+
recorded_at: Sat, 21 Nov 2015 22:30:57 GMT
|
195
196
|
recorded_with: VCR 2.9.3
|