locomotivecms_coal 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +23 -12
- data/README.md +167 -10
- data/lib/locomotive/coal/client.rb +70 -20
- data/lib/locomotive/coal/client_v2.rb +31 -0
- data/lib/locomotive/coal/error.rb +46 -5
- data/lib/locomotive/coal/resources/base.rb +57 -0
- data/lib/locomotive/coal/resources/concerns/request.rb +101 -0
- data/lib/locomotive/coal/resources/content_assets.rb +9 -0
- data/lib/locomotive/coal/resources/content_entries.rb +17 -11
- data/lib/locomotive/coal/resources/{contents.rb → content_types.rb} +4 -5
- data/lib/locomotive/coal/resources/engine_version.rb +15 -0
- data/lib/locomotive/coal/resources/my_account.rb +14 -2
- data/lib/locomotive/coal/resources/pages.rb +25 -0
- data/lib/locomotive/coal/resources/sites.rb +5 -17
- data/lib/locomotive/coal/resources/snippets.rb +9 -0
- data/lib/locomotive/coal/resources/theme_assets.rb +13 -0
- data/lib/locomotive/coal/resources/token.rb +2 -2
- data/lib/locomotive/coal/resources/translations.rb +9 -0
- data/lib/locomotive/coal/upload_io.rb +11 -0
- data/lib/locomotive/coal/version.rb +1 -1
- data/lib/locomotive/coal.rb +11 -3
- data/locomotivecms_coal.gemspec +4 -4
- data/spec/fixtures/assets/locomotive.png +0 -0
- data/spec/fixtures/assets/rails.png +0 -0
- data/spec/fixtures/coal_cassettes/client.yml +333 -69
- data/spec/fixtures/coal_cassettes/content_assets.yml +595 -0
- data/spec/fixtures/coal_cassettes/content_entries.yml +1134 -223
- data/spec/fixtures/coal_cassettes/content_types.yml +616 -0
- data/spec/fixtures/coal_cassettes/my_account.yml +167 -47
- data/spec/fixtures/coal_cassettes/pages.yml +281 -0
- data/spec/fixtures/coal_cassettes/sites.yml +93 -117
- data/spec/fixtures/coal_cassettes/snippets.yml +227 -0
- data/spec/fixtures/coal_cassettes/theme_assets.yml +406 -0
- data/spec/fixtures/coal_cassettes/token.yml +37 -55
- data/spec/fixtures/coal_cassettes/translations.yml +227 -0
- data/spec/fixtures/coal_cassettes/version.yml +89 -0
- data/spec/integration/client_spec.rb +37 -3
- data/spec/integration/resources/content_assets_spec.rb +42 -0
- data/spec/integration/resources/content_entries_spec.rb +45 -18
- data/spec/integration/resources/content_types_spec.rb +44 -0
- data/spec/integration/resources/engine_version_spec.rb +17 -0
- data/spec/integration/resources/my_account_spec.rb +22 -5
- data/spec/integration/resources/pages_spec.rb +43 -0
- data/spec/integration/resources/sites_spec.rb +9 -9
- data/spec/integration/resources/snippets_spec.rb +38 -0
- data/spec/integration/resources/theme_assets_spec.rb +43 -0
- data/spec/integration/resources/token_spec.rb +7 -7
- data/spec/integration/resources/translations_spec.rb +38 -0
- data/spec/spec_helper.rb +2 -13
- data/spec/support/api_settings.rb +7 -3
- data/spec/support/assets.rb +4 -0
- data/spec/support/vcr.rb +10 -0
- data/spec/unit/error_spec.rb +28 -0
- metadata +71 -13
- data/lib/locomotive/coal/request.rb +0 -63
- data/spec/fixtures/coal_cassettes/contents.yml +0 -120
- data/spec/integration/resources/contents_spec.rb +0 -22
@@ -2,203 +2,179 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://
|
5
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string: email=
|
7
|
+
encoding: UTF-8
|
8
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/json
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip
|
14
|
-
User-Agent:
|
15
|
-
- unirest-ruby/1.1
|
16
|
-
Content-Length:
|
17
|
-
- '37'
|
18
12
|
Content-Type:
|
19
13
|
- 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
|
20
18
|
response:
|
21
19
|
status:
|
22
|
-
code:
|
23
|
-
message:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
24
22
|
headers:
|
25
|
-
Date:
|
26
|
-
- Thu, 26 Mar 2015 12:13:39 GMT
|
27
|
-
Status:
|
28
|
-
- 200 OK
|
29
|
-
Connection:
|
30
|
-
- close
|
31
|
-
Location:
|
32
|
-
- http://sample.lvh.me:4000/locomotive/
|
33
23
|
Content-Type:
|
34
|
-
- application/json
|
35
|
-
|
36
|
-
-
|
24
|
+
- application/json
|
25
|
+
Content-Length:
|
26
|
+
- '32'
|
37
27
|
Etag:
|
38
|
-
-
|
28
|
+
- W/"6ba0e226b40adfde2d656d9027a1335f"
|
39
29
|
Cache-Control:
|
40
30
|
- max-age=0, private, must-revalidate
|
41
|
-
Set-Cookie:
|
42
|
-
- _locomotive_session=VquoZyFjWuRKNtfa4Qz8Ow1atCk; domain=.sample.lvh.me; path=/;
|
43
|
-
HttpOnly
|
44
31
|
X-Request-Id:
|
45
|
-
-
|
32
|
+
- 55fa53e7-0e78-4353-ba72-cde1ccc36bff
|
46
33
|
X-Runtime:
|
47
|
-
- '0.
|
34
|
+
- '0.039202'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Server:
|
38
|
+
- thin
|
48
39
|
body:
|
49
40
|
encoding: UTF-8
|
50
|
-
string: '{"token":"
|
41
|
+
string: '{"token":"Z9s7W_-BXyGQsDPFsorr"}'
|
51
42
|
http_version:
|
52
|
-
recorded_at:
|
43
|
+
recorded_at: Mon, 04 May 2015 13:51:28 GMT
|
53
44
|
- request:
|
54
45
|
method: get
|
55
|
-
uri: http://
|
46
|
+
uri: http://localhost:3000/locomotive/api/v3/sites.json
|
56
47
|
body:
|
57
|
-
encoding:
|
58
|
-
string:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr
|
59
50
|
headers:
|
60
51
|
Accept:
|
61
52
|
- application/json
|
53
|
+
X-Locomotive-Account-Email:
|
54
|
+
- admin@locomotivecms.com
|
55
|
+
X-Locomotive-Account-Token:
|
56
|
+
- Z9s7W_-BXyGQsDPFsorr
|
57
|
+
Content-Type:
|
58
|
+
- application/x-www-form-urlencoded
|
62
59
|
Accept-Encoding:
|
63
|
-
- gzip
|
60
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
64
61
|
User-Agent:
|
65
|
-
-
|
62
|
+
- Ruby
|
66
63
|
response:
|
67
64
|
status:
|
68
65
|
code: 200
|
69
66
|
message: OK
|
70
67
|
headers:
|
71
|
-
Date:
|
72
|
-
- Thu, 26 Mar 2015 12:13:39 GMT
|
73
|
-
Status:
|
74
|
-
- 200 OK
|
75
|
-
Connection:
|
76
|
-
- close
|
77
68
|
Content-Type:
|
78
|
-
- application/json
|
79
|
-
|
80
|
-
-
|
69
|
+
- application/json
|
70
|
+
Content-Length:
|
71
|
+
- '1021'
|
81
72
|
Etag:
|
82
|
-
-
|
73
|
+
- W/"7447d8e7cdca76d1abcbb9df74b1cab8"
|
83
74
|
Cache-Control:
|
84
75
|
- max-age=0, private, must-revalidate
|
85
|
-
Set-Cookie:
|
86
|
-
- _locomotive_session=E_E0wjZoHg6guMeaGEFc_IYQ0Q8; domain=.sample.lvh.me; path=/;
|
87
|
-
HttpOnly
|
88
76
|
X-Request-Id:
|
89
|
-
-
|
77
|
+
- 0798d382-b16c-42c0-a00d-d4116b953af6
|
90
78
|
X-Runtime:
|
91
|
-
- '0.
|
79
|
+
- '0.037419'
|
80
|
+
Connection:
|
81
|
+
- keep-alive
|
82
|
+
Server:
|
83
|
+
- thin
|
92
84
|
body:
|
93
85
|
encoding: UTF-8
|
94
|
-
string: '[{"
|
95
|
-
|
96
|
-
simple LocomotiveCMS website","meta_keywords":"some meta keywords","meta_description":"some
|
97
|
-
meta description"}]'
|
86
|
+
string: '[{"_id":"554779596469644d44010000","created_at":"2015-05-04T13:51:21Z","updated_at":"2015-05-04T13:51:21Z","name":"LocomotiveCMS","handle":"www","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"locales":["en"],"domains":["www.example.com"],"memberships":[{"_id":"554779596469644d44040000","created_at":null,"updated_at":null,"role":"admin","account_id":"554779596469644d44000000","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC"},{"_id":"554779596469644d44050000","created_at":"2015-05-04T13:51:21Z","updated_at":"2015-05-04T13:51:21Z","name":"Sample
|
87
|
+
site","handle":"sample","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"locales":["en"],"domains":["sample.example.com"],"memberships":[{"_id":"554779596469644d44080000","created_at":null,"updated_at":null,"role":"admin","account_id":"554779596469644d44000000","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC"}]'
|
98
88
|
http_version:
|
99
|
-
recorded_at:
|
89
|
+
recorded_at: Mon, 04 May 2015 13:51:28 GMT
|
100
90
|
- request:
|
101
91
|
method: post
|
102
|
-
uri: http://
|
92
|
+
uri: http://localhost:3000/locomotive/api/v3/sites.json
|
103
93
|
body:
|
104
|
-
encoding:
|
105
|
-
string:
|
94
|
+
encoding: UTF-8
|
95
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr&site%5Bhandle%5D=acme&site%5Blocales%5D%5B%5D=en&site%5Bname%5D=Acme
|
106
96
|
headers:
|
107
97
|
Accept:
|
108
98
|
- application/json
|
109
|
-
|
110
|
-
-
|
111
|
-
|
112
|
-
-
|
113
|
-
Content-Length:
|
114
|
-
- '87'
|
99
|
+
X-Locomotive-Account-Email:
|
100
|
+
- admin@locomotivecms.com
|
101
|
+
X-Locomotive-Account-Token:
|
102
|
+
- Z9s7W_-BXyGQsDPFsorr
|
115
103
|
Content-Type:
|
116
104
|
- application/x-www-form-urlencoded
|
105
|
+
Accept-Encoding:
|
106
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
107
|
+
User-Agent:
|
108
|
+
- Ruby
|
117
109
|
response:
|
118
110
|
status:
|
119
|
-
code:
|
120
|
-
message:
|
111
|
+
code: 201
|
112
|
+
message: Created
|
121
113
|
headers:
|
122
|
-
Date:
|
123
|
-
- Thu, 26 Mar 2015 12:13:39 GMT
|
124
|
-
Status:
|
125
|
-
- 200 OK
|
126
|
-
Connection:
|
127
|
-
- close
|
128
|
-
Location:
|
129
|
-
- http://sample.lvh.me:4000/locomotive/sites/5513f7f3c36511aa6a000001
|
130
114
|
Content-Type:
|
131
|
-
- application/json
|
132
|
-
|
133
|
-
-
|
115
|
+
- application/json
|
116
|
+
Content-Length:
|
117
|
+
- '482'
|
134
118
|
Etag:
|
135
|
-
-
|
119
|
+
- W/"9ab618d5bc9a66e66ff55a4198096ffc"
|
136
120
|
Cache-Control:
|
137
121
|
- max-age=0, private, must-revalidate
|
138
|
-
Set-Cookie:
|
139
|
-
- _locomotive_session=j7Fc1aPj5ncc_5vthK1b94dOF3M; domain=.sample.lvh.me; path=/;
|
140
|
-
HttpOnly
|
141
122
|
X-Request-Id:
|
142
|
-
-
|
123
|
+
- de7f0ba4-53dc-4f96-98b7-d178e4c601dd
|
143
124
|
X-Runtime:
|
144
|
-
- '0.
|
125
|
+
- '0.081937'
|
126
|
+
Connection:
|
127
|
+
- keep-alive
|
128
|
+
Server:
|
129
|
+
- thin
|
145
130
|
body:
|
146
131
|
encoding: UTF-8
|
147
|
-
string: '{"
|
132
|
+
string: '{"_id":"554779606469643251250300","created_at":"2015-05-04T13:51:28Z","updated_at":"2015-05-04T13:51:28Z","name":"Acme","handle":"acme","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"locales":["en"],"domains":[],"memberships":[{"_id":"554779606469643251260300","created_at":null,"updated_at":null,"role":"admin","account_id":"554779596469644d44000000","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC"}'
|
148
133
|
http_version:
|
149
|
-
recorded_at:
|
134
|
+
recorded_at: Mon, 04 May 2015 13:51:28 GMT
|
150
135
|
- request:
|
151
136
|
method: delete
|
152
|
-
uri: http://
|
137
|
+
uri: http://localhost:3000/locomotive/api/v3/sites/554779606469643251250300.json
|
153
138
|
body:
|
154
|
-
encoding:
|
155
|
-
string: auth_token=
|
139
|
+
encoding: UTF-8
|
140
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr
|
156
141
|
headers:
|
157
142
|
Accept:
|
158
143
|
- application/json
|
159
|
-
|
160
|
-
-
|
161
|
-
|
162
|
-
-
|
163
|
-
Content-Length:
|
164
|
-
- '31'
|
144
|
+
X-Locomotive-Account-Email:
|
145
|
+
- admin@locomotivecms.com
|
146
|
+
X-Locomotive-Account-Token:
|
147
|
+
- Z9s7W_-BXyGQsDPFsorr
|
165
148
|
Content-Type:
|
166
149
|
- application/x-www-form-urlencoded
|
150
|
+
Accept-Encoding:
|
151
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
152
|
+
User-Agent:
|
153
|
+
- Ruby
|
167
154
|
response:
|
168
155
|
status:
|
169
156
|
code: 200
|
170
157
|
message: OK
|
171
158
|
headers:
|
172
|
-
Date:
|
173
|
-
- Thu, 26 Mar 2015 12:13:39 GMT
|
174
|
-
Status:
|
175
|
-
- 200 OK
|
176
|
-
Connection:
|
177
|
-
- close
|
178
|
-
X-Message:
|
179
|
-
- '"Site%20was%20successfully%20destroyed."'
|
180
|
-
X-Message-Type:
|
181
|
-
- notice
|
182
|
-
Location:
|
183
|
-
- http://sample.lvh.me:4000/locomotive/sites
|
184
159
|
Content-Type:
|
185
|
-
- application/json
|
186
|
-
|
187
|
-
-
|
160
|
+
- application/json
|
161
|
+
Content-Length:
|
162
|
+
- '482'
|
188
163
|
Etag:
|
189
|
-
-
|
164
|
+
- W/"9ab618d5bc9a66e66ff55a4198096ffc"
|
190
165
|
Cache-Control:
|
191
166
|
- max-age=0, private, must-revalidate
|
192
|
-
Set-Cookie:
|
193
|
-
- _locomotive_session=nC_FJh22VAjBWzBkUYv1KxMkBYw; domain=.sample.lvh.me; path=/;
|
194
|
-
HttpOnly
|
195
167
|
X-Request-Id:
|
196
|
-
-
|
168
|
+
- 101dcbef-6d1f-411e-b3cc-ba34ee6ba351
|
197
169
|
X-Runtime:
|
198
|
-
- '0.
|
170
|
+
- '0.081414'
|
171
|
+
Connection:
|
172
|
+
- keep-alive
|
173
|
+
Server:
|
174
|
+
- thin
|
199
175
|
body:
|
200
176
|
encoding: UTF-8
|
201
|
-
string: '{"
|
177
|
+
string: '{"_id":"554779606469643251250300","created_at":"2015-05-04T13:51:28Z","updated_at":"2015-05-04T13:51:28Z","name":"Acme","handle":"acme","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"locales":["en"],"domains":[],"memberships":[{"_id":"554779606469643251260300","created_at":null,"updated_at":null,"role":"admin","account_id":"554779596469644d44000000","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC"}'
|
202
178
|
http_version:
|
203
|
-
recorded_at:
|
179
|
+
recorded_at: Mon, 04 May 2015 13:51:28 GMT
|
204
180
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,227 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Content-Type:
|
13
|
+
- 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
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Content-Length:
|
26
|
+
- '32'
|
27
|
+
Etag:
|
28
|
+
- W/"6ba0e226b40adfde2d656d9027a1335f"
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Request-Id:
|
32
|
+
- 7a04c2fb-f959-42d2-977a-01b459734c6a
|
33
|
+
X-Runtime:
|
34
|
+
- '0.017824'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Server:
|
38
|
+
- thin
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"token":"Z9s7W_-BXyGQsDPFsorr"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Mon, 04 May 2015 13:51:30 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/snippets.json
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr
|
50
|
+
headers:
|
51
|
+
Accept:
|
52
|
+
- application/json
|
53
|
+
X-Locomotive-Account-Email:
|
54
|
+
- admin@locomotivecms.com
|
55
|
+
X-Locomotive-Account-Token:
|
56
|
+
- Z9s7W_-BXyGQsDPFsorr
|
57
|
+
Content-Type:
|
58
|
+
- application/x-www-form-urlencoded
|
59
|
+
Accept-Encoding:
|
60
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
|
+
User-Agent:
|
62
|
+
- Ruby
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 200
|
66
|
+
message: OK
|
67
|
+
headers:
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
Content-Length:
|
71
|
+
- '2'
|
72
|
+
Etag:
|
73
|
+
- W/"d751713988987e9331980363e24189ce"
|
74
|
+
Cache-Control:
|
75
|
+
- max-age=0, private, must-revalidate
|
76
|
+
X-Request-Id:
|
77
|
+
- 1d60a784-b876-4c04-903c-c86f982e53b8
|
78
|
+
X-Runtime:
|
79
|
+
- '0.021975'
|
80
|
+
Connection:
|
81
|
+
- keep-alive
|
82
|
+
Server:
|
83
|
+
- thin
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: "[]"
|
87
|
+
http_version:
|
88
|
+
recorded_at: Mon, 04 May 2015 13:51:30 GMT
|
89
|
+
- request:
|
90
|
+
method: post
|
91
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/snippets.json
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr&snippet%5Bname%5D=Footer&snippet%5Bslug%5D=footer&snippet%5Btemplate%5D=Locomotive+rocks%21
|
95
|
+
headers:
|
96
|
+
Accept:
|
97
|
+
- application/json
|
98
|
+
X-Locomotive-Account-Email:
|
99
|
+
- admin@locomotivecms.com
|
100
|
+
X-Locomotive-Account-Token:
|
101
|
+
- Z9s7W_-BXyGQsDPFsorr
|
102
|
+
Content-Type:
|
103
|
+
- application/x-www-form-urlencoded
|
104
|
+
Accept-Encoding:
|
105
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
106
|
+
User-Agent:
|
107
|
+
- Ruby
|
108
|
+
response:
|
109
|
+
status:
|
110
|
+
code: 201
|
111
|
+
message: Created
|
112
|
+
headers:
|
113
|
+
Content-Type:
|
114
|
+
- application/json
|
115
|
+
Content-Length:
|
116
|
+
- '169'
|
117
|
+
Etag:
|
118
|
+
- W/"79d6d859de866e0e55fe556f451b75d3"
|
119
|
+
Cache-Control:
|
120
|
+
- max-age=0, private, must-revalidate
|
121
|
+
X-Request-Id:
|
122
|
+
- 93194645-3be2-46f4-bc15-96796a6f06e4
|
123
|
+
X-Runtime:
|
124
|
+
- '0.031877'
|
125
|
+
Connection:
|
126
|
+
- keep-alive
|
127
|
+
Server:
|
128
|
+
- thin
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"_id":"554779626469643251320300","created_at":"2015-05-04T13:51:30Z","updated_at":"2015-05-04T13:51:30Z","name":"Footer","slug":"footer","template":"Locomotive
|
132
|
+
rocks!"}'
|
133
|
+
http_version:
|
134
|
+
recorded_at: Mon, 04 May 2015 13:51:30 GMT
|
135
|
+
- request:
|
136
|
+
method: put
|
137
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/snippets/554779626469643251320300.json
|
138
|
+
body:
|
139
|
+
encoding: UTF-8
|
140
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr&snippet%5Btemplate%5D=Locomotive+rocks.+period
|
141
|
+
headers:
|
142
|
+
Accept:
|
143
|
+
- application/json
|
144
|
+
X-Locomotive-Account-Email:
|
145
|
+
- admin@locomotivecms.com
|
146
|
+
X-Locomotive-Account-Token:
|
147
|
+
- Z9s7W_-BXyGQsDPFsorr
|
148
|
+
Content-Type:
|
149
|
+
- application/x-www-form-urlencoded
|
150
|
+
Accept-Encoding:
|
151
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
152
|
+
User-Agent:
|
153
|
+
- Ruby
|
154
|
+
response:
|
155
|
+
status:
|
156
|
+
code: 200
|
157
|
+
message: OK
|
158
|
+
headers:
|
159
|
+
Content-Type:
|
160
|
+
- application/json
|
161
|
+
Content-Length:
|
162
|
+
- '176'
|
163
|
+
Etag:
|
164
|
+
- W/"fd080808673a96a8580ff3c3bf28814c"
|
165
|
+
Cache-Control:
|
166
|
+
- max-age=0, private, must-revalidate
|
167
|
+
X-Request-Id:
|
168
|
+
- 3f2eb487-cb8f-481f-9cf4-71f6f8bd1c55
|
169
|
+
X-Runtime:
|
170
|
+
- '0.030187'
|
171
|
+
Connection:
|
172
|
+
- keep-alive
|
173
|
+
Server:
|
174
|
+
- thin
|
175
|
+
body:
|
176
|
+
encoding: UTF-8
|
177
|
+
string: '{"_id":"554779626469643251320300","created_at":"2015-05-04T13:51:30Z","updated_at":"2015-05-04T13:51:30Z","name":"Footer","slug":"footer","template":"Locomotive
|
178
|
+
rocks. period"}'
|
179
|
+
http_version:
|
180
|
+
recorded_at: Mon, 04 May 2015 13:51:30 GMT
|
181
|
+
- request:
|
182
|
+
method: delete
|
183
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/snippets/554779626469643251320300.json
|
184
|
+
body:
|
185
|
+
encoding: UTF-8
|
186
|
+
string: auth_token=Z9s7W_-BXyGQsDPFsorr
|
187
|
+
headers:
|
188
|
+
Accept:
|
189
|
+
- application/json
|
190
|
+
X-Locomotive-Account-Email:
|
191
|
+
- admin@locomotivecms.com
|
192
|
+
X-Locomotive-Account-Token:
|
193
|
+
- Z9s7W_-BXyGQsDPFsorr
|
194
|
+
Content-Type:
|
195
|
+
- application/x-www-form-urlencoded
|
196
|
+
Accept-Encoding:
|
197
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
198
|
+
User-Agent:
|
199
|
+
- Ruby
|
200
|
+
response:
|
201
|
+
status:
|
202
|
+
code: 200
|
203
|
+
message: OK
|
204
|
+
headers:
|
205
|
+
Content-Type:
|
206
|
+
- application/json
|
207
|
+
Content-Length:
|
208
|
+
- '176'
|
209
|
+
Etag:
|
210
|
+
- W/"fd080808673a96a8580ff3c3bf28814c"
|
211
|
+
Cache-Control:
|
212
|
+
- max-age=0, private, must-revalidate
|
213
|
+
X-Request-Id:
|
214
|
+
- b56ecde4-6ad7-4f0b-bda5-7e9d0e4547b6
|
215
|
+
X-Runtime:
|
216
|
+
- '0.027051'
|
217
|
+
Connection:
|
218
|
+
- keep-alive
|
219
|
+
Server:
|
220
|
+
- thin
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: '{"_id":"554779626469643251320300","created_at":"2015-05-04T13:51:30Z","updated_at":"2015-05-04T13:51:30Z","name":"Footer","slug":"footer","template":"Locomotive
|
224
|
+
rocks. period"}'
|
225
|
+
http_version:
|
226
|
+
recorded_at: Mon, 04 May 2015 13:51:30 GMT
|
227
|
+
recorded_with: VCR 2.9.3
|