locomotivecms_coal 1.0.0.pre.beta.1 → 1.0.0.pre.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/locomotive/coal/resources/concerns/request.rb +24 -1
- data/lib/locomotive/coal/version.rb +1 -1
- data/spec/fixtures/coal_cassettes/client.yml +81 -86
- data/spec/fixtures/coal_cassettes/content_assets.yml +33 -33
- data/spec/fixtures/coal_cassettes/content_entries.yml +225 -225
- data/spec/fixtures/coal_cassettes/content_types.yml +88 -88
- data/spec/fixtures/coal_cassettes/current_site.yml +21 -21
- data/spec/fixtures/coal_cassettes/memberships.yml +34 -34
- data/spec/fixtures/coal_cassettes/my_account.yml +68 -68
- data/spec/fixtures/coal_cassettes/pages.yml +45 -45
- data/spec/fixtures/coal_cassettes/sites.yml +30 -34
- data/spec/fixtures/coal_cassettes/snippets.yml +32 -32
- data/spec/fixtures/coal_cassettes/theme_assets.yml +32 -32
- data/spec/fixtures/coal_cassettes/token.yml +8 -8
- data/spec/fixtures/coal_cassettes/translations.yml +32 -32
- data/spec/fixtures/coal_cassettes/version.yml +10 -10
- metadata +2 -2
@@ -23,23 +23,23 @@ http_interactions:
|
|
23
23
|
Content-Type:
|
24
24
|
- application/json
|
25
25
|
Etag:
|
26
|
-
- W/"
|
26
|
+
- W/"3b6ceb0d2ba232a8d48dd0dc8f702ef4"
|
27
27
|
Cache-Control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
X-Request-Id:
|
30
|
-
-
|
30
|
+
- 67b4ae0b-bd6b-4eb1-bbd3-1c95f4af69e9
|
31
31
|
X-Runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.014640'
|
33
33
|
Content-Length:
|
34
34
|
- '32'
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
|
-
string: '{"token":"
|
37
|
+
string: '{"token":"xM_3r1zn2aQAinPFqSvd"}'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Tue, 11 Aug 2015 13:12:36 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=xM_3r1zn2aQAinPFqSvd
|
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
|
+
- xM_3r1zn2aQAinPFqSvd
|
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,33 @@ http_interactions:
|
|
62
62
|
Content-Type:
|
63
63
|
- application/json
|
64
64
|
Etag:
|
65
|
-
- W/"
|
65
|
+
- W/"a2be6652728a5b6ecb89fbbec5339ed1"
|
66
66
|
Cache-Control:
|
67
67
|
- max-age=0, private, must-revalidate
|
68
68
|
X-Request-Id:
|
69
|
-
-
|
69
|
+
- 18da77a8-6451-450d-bbbd-1218306b5a5f
|
70
70
|
X-Runtime:
|
71
|
-
- '0.
|
71
|
+
- '0.038700'
|
72
72
|
Content-Length:
|
73
73
|
- '204'
|
74
74
|
body:
|
75
75
|
encoding: UTF-8
|
76
|
-
string: '[{"_id":"
|
76
|
+
string: '[{"_id":"55c9f4a487f6432a1e000009","created_at":null,"updated_at":null,"role":"admin","account_id":"55c9f4a387f6432a1e000000","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}]'
|
77
77
|
http_version:
|
78
|
-
recorded_at:
|
78
|
+
recorded_at: Tue, 11 Aug 2015 13:12:36 GMT
|
79
79
|
- request:
|
80
80
|
method: post
|
81
81
|
uri: http://localhost:3000/locomotive/sample/api/v3/memberships.json
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
|
-
string: auth_token=
|
84
|
+
string: auth_token=xM_3r1zn2aQAinPFqSvd&membership%5Baccount_email%5D=new_admin%40locomotivecms.com&membership%5Brole%5D=Admin
|
85
85
|
headers:
|
86
86
|
Accept:
|
87
87
|
- application/json
|
88
88
|
X-Locomotive-Account-Email:
|
89
89
|
- admin@locomotivecms.com
|
90
90
|
X-Locomotive-Account-Token:
|
91
|
-
-
|
91
|
+
- xM_3r1zn2aQAinPFqSvd
|
92
92
|
Content-Type:
|
93
93
|
- application/x-www-form-urlencoded
|
94
94
|
Accept-Encoding:
|
@@ -103,34 +103,34 @@ http_interactions:
|
|
103
103
|
Content-Type:
|
104
104
|
- application/json
|
105
105
|
Etag:
|
106
|
-
- W/"
|
106
|
+
- W/"c09dbba413397d4984cac133fccbb4a2"
|
107
107
|
Cache-Control:
|
108
108
|
- max-age=0, private, must-revalidate
|
109
109
|
X-Request-Id:
|
110
|
-
-
|
110
|
+
- 70c4e3b4-19e4-4384-8bd9-f3337f9a7784
|
111
111
|
X-Runtime:
|
112
|
-
- '0.
|
112
|
+
- '0.062572'
|
113
113
|
Content-Length:
|
114
114
|
- '246'
|
115
115
|
body:
|
116
116
|
encoding: UTF-8
|
117
|
-
string: '{"_id":"
|
117
|
+
string: '{"_id":"55c9f4c487f6432a3b000004","created_at":"2015-08-11T13:12:36Z","updated_at":"2015-08-11T13:12:36Z","role":"admin","account_id":"55c9f4a387f6432a1e000001","name":"New
|
118
118
|
Admin","role_name":"Administrator","email":"new_admin@locomotivecms.com"}'
|
119
119
|
http_version:
|
120
|
-
recorded_at:
|
120
|
+
recorded_at: Tue, 11 Aug 2015 13:12:36 GMT
|
121
121
|
- request:
|
122
122
|
method: put
|
123
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/
|
123
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/55c9f4c487f6432a3b000004.json
|
124
124
|
body:
|
125
125
|
encoding: UTF-8
|
126
|
-
string: auth_token=
|
126
|
+
string: auth_token=xM_3r1zn2aQAinPFqSvd&membership%5Brole%5D=author
|
127
127
|
headers:
|
128
128
|
Accept:
|
129
129
|
- application/json
|
130
130
|
X-Locomotive-Account-Email:
|
131
131
|
- admin@locomotivecms.com
|
132
132
|
X-Locomotive-Account-Token:
|
133
|
-
-
|
133
|
+
- xM_3r1zn2aQAinPFqSvd
|
134
134
|
Content-Type:
|
135
135
|
- application/x-www-form-urlencoded
|
136
136
|
Accept-Encoding:
|
@@ -145,24 +145,24 @@ http_interactions:
|
|
145
145
|
Content-Type:
|
146
146
|
- application/json
|
147
147
|
Etag:
|
148
|
-
- W/"
|
148
|
+
- W/"048428aa5560ebfe41b29b4963201835"
|
149
149
|
Cache-Control:
|
150
150
|
- max-age=0, private, must-revalidate
|
151
151
|
X-Request-Id:
|
152
|
-
-
|
152
|
+
- aa90977c-9167-45ab-bba5-6366438e95f6
|
153
153
|
X-Runtime:
|
154
|
-
- '0.
|
154
|
+
- '0.082957'
|
155
155
|
Content-Length:
|
156
156
|
- '240'
|
157
157
|
body:
|
158
158
|
encoding: UTF-8
|
159
|
-
string: '{"_id":"
|
159
|
+
string: '{"_id":"55c9f4c487f6432a3b000004","created_at":"2015-08-11T13:12:36Z","updated_at":"2015-08-11T13:12:36Z","role":"author","account_id":"55c9f4a387f6432a1e000001","name":"New
|
160
160
|
Admin","role_name":"Author","email":"new_admin@locomotivecms.com"}'
|
161
161
|
http_version:
|
162
|
-
recorded_at:
|
162
|
+
recorded_at: Tue, 11 Aug 2015 13:12:36 GMT
|
163
163
|
- request:
|
164
164
|
method: delete
|
165
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/
|
165
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/memberships/55c9f4c487f6432a3b000004.json?auth_token=xM_3r1zn2aQAinPFqSvd
|
166
166
|
body:
|
167
167
|
encoding: US-ASCII
|
168
168
|
string: ''
|
@@ -172,7 +172,7 @@ http_interactions:
|
|
172
172
|
X-Locomotive-Account-Email:
|
173
173
|
- admin@locomotivecms.com
|
174
174
|
X-Locomotive-Account-Token:
|
175
|
-
-
|
175
|
+
- xM_3r1zn2aQAinPFqSvd
|
176
176
|
Accept-Encoding:
|
177
177
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
178
178
|
User-Agent:
|
@@ -185,19 +185,19 @@ http_interactions:
|
|
185
185
|
Content-Type:
|
186
186
|
- application/json
|
187
187
|
Etag:
|
188
|
-
- W/"
|
188
|
+
- W/"048428aa5560ebfe41b29b4963201835"
|
189
189
|
Cache-Control:
|
190
190
|
- max-age=0, private, must-revalidate
|
191
191
|
X-Request-Id:
|
192
|
-
-
|
192
|
+
- bc406ec2-0b3b-4844-bf35-c92b95bfb8e0
|
193
193
|
X-Runtime:
|
194
|
-
- '0.
|
194
|
+
- '0.034121'
|
195
195
|
Content-Length:
|
196
196
|
- '240'
|
197
197
|
body:
|
198
198
|
encoding: UTF-8
|
199
|
-
string: '{"_id":"
|
199
|
+
string: '{"_id":"55c9f4c487f6432a3b000004","created_at":"2015-08-11T13:12:36Z","updated_at":"2015-08-11T13:12:36Z","role":"author","account_id":"55c9f4a387f6432a1e000001","name":"New
|
200
200
|
Admin","role_name":"Author","email":"new_admin@locomotivecms.com"}'
|
201
201
|
http_version:
|
202
|
-
recorded_at:
|
202
|
+
recorded_at: Tue, 11 Aug 2015 13:12:36 GMT
|
203
203
|
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/tokens.json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/json
|
@@ -23,66 +23,72 @@ http_interactions:
|
|
23
23
|
Content-Type:
|
24
24
|
- application/json
|
25
25
|
Etag:
|
26
|
-
- W/"
|
26
|
+
- W/"3b6ceb0d2ba232a8d48dd0dc8f702ef4"
|
27
27
|
Cache-Control:
|
28
28
|
- max-age=0, private, must-revalidate
|
29
29
|
X-Request-Id:
|
30
|
-
-
|
30
|
+
- 810363fc-e06a-4340-b9ed-cee96a95b374
|
31
31
|
X-Runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.018056'
|
33
33
|
Content-Length:
|
34
|
-
- '
|
34
|
+
- '32'
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
|
-
string: '{"
|
38
|
-
Doe","email":"jack@doe.net","locale":"en","api_key":"a6c20ed6c12c7bcd4cb172be50e04d55c1a02f3c","super_admin":false,"local_admin":false}'
|
37
|
+
string: '{"token":"xM_3r1zn2aQAinPFqSvd"}'
|
39
38
|
http_version:
|
40
|
-
recorded_at:
|
39
|
+
recorded_at: Tue, 11 Aug 2015 13:12:39 GMT
|
41
40
|
- request:
|
42
|
-
method:
|
43
|
-
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
41
|
+
method: get
|
42
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=xM_3r1zn2aQAinPFqSvd
|
44
43
|
body:
|
45
|
-
encoding:
|
46
|
-
string:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
47
46
|
headers:
|
48
47
|
Accept:
|
49
48
|
- application/json
|
50
|
-
|
51
|
-
-
|
49
|
+
X-Locomotive-Account-Email:
|
50
|
+
- admin@locomotivecms.com
|
51
|
+
X-Locomotive-Account-Token:
|
52
|
+
- xM_3r1zn2aQAinPFqSvd
|
52
53
|
Accept-Encoding:
|
53
54
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
54
55
|
User-Agent:
|
55
56
|
- Ruby
|
56
57
|
response:
|
57
58
|
status:
|
58
|
-
code:
|
59
|
-
message:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
60
61
|
headers:
|
61
62
|
Content-Type:
|
62
63
|
- application/json
|
64
|
+
Etag:
|
65
|
+
- W/"5d81ea9f3bdc8f0d8d64e6987d114b29"
|
63
66
|
Cache-Control:
|
64
|
-
-
|
67
|
+
- max-age=0, private, must-revalidate
|
65
68
|
X-Request-Id:
|
66
|
-
-
|
69
|
+
- 10f7ae49-fd25-41f5-93d3-bac448d505db
|
67
70
|
X-Runtime:
|
68
|
-
- '0.
|
71
|
+
- '0.017685'
|
69
72
|
Content-Length:
|
70
|
-
- '
|
73
|
+
- '261'
|
71
74
|
body:
|
72
75
|
encoding: UTF-8
|
73
|
-
string: '{"
|
74
|
-
missing"]}}'
|
76
|
+
string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:03Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
|
75
77
|
http_version:
|
76
|
-
recorded_at:
|
78
|
+
recorded_at: Tue, 11 Aug 2015 13:12:39 GMT
|
77
79
|
- request:
|
78
|
-
method:
|
79
|
-
uri: http://localhost:3000/locomotive/api/v3/
|
80
|
+
method: put
|
81
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
80
82
|
body:
|
81
83
|
encoding: UTF-8
|
82
|
-
string:
|
84
|
+
string: account%5Bname%5D=John+Doe&auth_token=xM_3r1zn2aQAinPFqSvd
|
83
85
|
headers:
|
84
86
|
Accept:
|
85
87
|
- application/json
|
88
|
+
X-Locomotive-Account-Email:
|
89
|
+
- admin@locomotivecms.com
|
90
|
+
X-Locomotive-Account-Token:
|
91
|
+
- xM_3r1zn2aQAinPFqSvd
|
86
92
|
Content-Type:
|
87
93
|
- application/x-www-form-urlencoded
|
88
94
|
Accept-Encoding:
|
@@ -91,78 +97,74 @@ http_interactions:
|
|
91
97
|
- Ruby
|
92
98
|
response:
|
93
99
|
status:
|
94
|
-
code:
|
95
|
-
message:
|
100
|
+
code: 200
|
101
|
+
message: OK
|
96
102
|
headers:
|
97
103
|
Content-Type:
|
98
104
|
- application/json
|
99
105
|
Etag:
|
100
|
-
- W/"
|
106
|
+
- W/"52bd05e384c279a85dca7d54c93622f3"
|
101
107
|
Cache-Control:
|
102
108
|
- max-age=0, private, must-revalidate
|
103
109
|
X-Request-Id:
|
104
|
-
-
|
110
|
+
- 8587d5b9-62af-43cf-8f17-42ebdc088f33
|
105
111
|
X-Runtime:
|
106
|
-
- '0.
|
112
|
+
- '0.030495'
|
107
113
|
Content-Length:
|
108
|
-
- '
|
114
|
+
- '264'
|
109
115
|
body:
|
110
116
|
encoding: UTF-8
|
111
|
-
string: '{"
|
117
|
+
string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:39Z","name":"John
|
118
|
+
Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
|
112
119
|
http_version:
|
113
|
-
recorded_at:
|
120
|
+
recorded_at: Tue, 11 Aug 2015 13:12:39 GMT
|
114
121
|
- request:
|
115
|
-
method:
|
116
|
-
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
122
|
+
method: post
|
123
|
+
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
117
124
|
body:
|
118
|
-
encoding:
|
119
|
-
string:
|
125
|
+
encoding: UTF-8
|
126
|
+
string: account%5Bemail%5D=jack%40doe.net&account%5Bname%5D=Jack+Doe&account%5Bpassword%5D=easyone&account%5Bpassword_confirmation%5D=easyone
|
120
127
|
headers:
|
121
128
|
Accept:
|
122
129
|
- application/json
|
123
|
-
|
124
|
-
-
|
125
|
-
X-Locomotive-Account-Token:
|
126
|
-
- v6XDp282UyPDeM6DgA-S
|
130
|
+
Content-Type:
|
131
|
+
- application/x-www-form-urlencoded
|
127
132
|
Accept-Encoding:
|
128
133
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
129
134
|
User-Agent:
|
130
135
|
- Ruby
|
131
136
|
response:
|
132
137
|
status:
|
133
|
-
code:
|
134
|
-
message:
|
138
|
+
code: 201
|
139
|
+
message: Created
|
135
140
|
headers:
|
136
141
|
Content-Type:
|
137
142
|
- application/json
|
138
143
|
Etag:
|
139
|
-
- W/"
|
144
|
+
- W/"4932a1a8e6c2445d67f4d7715831b759"
|
140
145
|
Cache-Control:
|
141
146
|
- max-age=0, private, must-revalidate
|
142
147
|
X-Request-Id:
|
143
|
-
-
|
148
|
+
- f3cfc251-ee44-4111-b3aa-8b480c5900b4
|
144
149
|
X-Runtime:
|
145
|
-
- '0.
|
150
|
+
- '0.028706'
|
146
151
|
Content-Length:
|
147
|
-
- '
|
152
|
+
- '254'
|
148
153
|
body:
|
149
154
|
encoding: UTF-8
|
150
|
-
string: '{"_id":"
|
155
|
+
string: '{"_id":"55c9f4c787f6432a3b000033","created_at":"2015-08-11T13:12:39Z","updated_at":"2015-08-11T13:12:39Z","name":"Jack
|
156
|
+
Doe","email":"jack@doe.net","locale":"en","api_key":"cd5ebfa5371bf936da6523fe5443a80061258fe8","super_admin":false,"local_admin":false}'
|
151
157
|
http_version:
|
152
|
-
recorded_at:
|
158
|
+
recorded_at: Tue, 11 Aug 2015 13:12:39 GMT
|
153
159
|
- request:
|
154
|
-
method:
|
160
|
+
method: post
|
155
161
|
uri: http://localhost:3000/locomotive/api/v3/my_account.json
|
156
162
|
body:
|
157
163
|
encoding: UTF-8
|
158
|
-
string: account%5Bname%5D=
|
164
|
+
string: account%5Bname%5D=Wrong+account
|
159
165
|
headers:
|
160
166
|
Accept:
|
161
167
|
- application/json
|
162
|
-
X-Locomotive-Account-Email:
|
163
|
-
- admin@locomotivecms.com
|
164
|
-
X-Locomotive-Account-Token:
|
165
|
-
- v6XDp282UyPDeM6DgA-S
|
166
168
|
Content-Type:
|
167
169
|
- application/x-www-form-urlencoded
|
168
170
|
Accept-Encoding:
|
@@ -171,25 +173,23 @@ http_interactions:
|
|
171
173
|
- Ruby
|
172
174
|
response:
|
173
175
|
status:
|
174
|
-
code:
|
175
|
-
message:
|
176
|
+
code: 422
|
177
|
+
message: Unprocessable Entity
|
176
178
|
headers:
|
177
179
|
Content-Type:
|
178
180
|
- application/json
|
179
|
-
Etag:
|
180
|
-
- W/"90a3d77a13c34daf43fc0149ef56eeec"
|
181
181
|
Cache-Control:
|
182
|
-
-
|
182
|
+
- no-cache
|
183
183
|
X-Request-Id:
|
184
|
-
-
|
184
|
+
- 6e47ff86-729d-4e4c-a1f6-483c333df67a
|
185
185
|
X-Runtime:
|
186
|
-
- '0.
|
186
|
+
- '0.018511'
|
187
187
|
Content-Length:
|
188
|
-
- '
|
188
|
+
- '92'
|
189
189
|
body:
|
190
190
|
encoding: UTF-8
|
191
|
-
string: '{"
|
192
|
-
|
191
|
+
string: '{"error":"Resource invalid","attributes":{"email":["is missing"],"password":["is
|
192
|
+
missing"]}}'
|
193
193
|
http_version:
|
194
|
-
recorded_at:
|
194
|
+
recorded_at: Tue, 11 Aug 2015 13:12:39 GMT
|
195
195
|
recorded_with: VCR 2.9.3
|