locomotivecms_coal 1.2.0 → 1.3.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/locomotive/coal/resources/concerns/request.rb +2 -2
- data/lib/locomotive/coal/resources/content_entries.rb +1 -1
- data/lib/locomotive/coal/version.rb +1 -1
- data/spec/fixtures/coal_cassettes/content_entries.yml +1739 -285
- data/spec/fixtures/coal_cassettes/sites.yml +82 -1
- data/spec/integration/resources/content_entries_spec.rb +7 -0
- metadata +4 -4
@@ -161,4 +161,85 @@ http_interactions:
|
|
161
161
|
Doe","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":0,"template_version":1448145060,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/lush-dawn-5649/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in"}'
|
162
162
|
http_version:
|
163
163
|
recorded_at: Sat, 21 Nov 2015 22:31:00 GMT
|
164
|
-
|
164
|
+
- request:
|
165
|
+
method: post
|
166
|
+
uri: http://localhost:3000/locomotive/api/v3/tokens.json
|
167
|
+
body:
|
168
|
+
encoding: UTF-8
|
169
|
+
string: email=admin%40locomotivecms.com&password=locomotive
|
170
|
+
headers:
|
171
|
+
User-Agent:
|
172
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.2.3 (2015-08-18))
|
173
|
+
Accept:
|
174
|
+
- application/json
|
175
|
+
Accept-Encoding:
|
176
|
+
- gzip,deflate
|
177
|
+
Date:
|
178
|
+
- Thu, 21 Jul 2016 08:30:28 GMT
|
179
|
+
Content-Type:
|
180
|
+
- application/x-www-form-urlencoded
|
181
|
+
response:
|
182
|
+
status:
|
183
|
+
code: 201
|
184
|
+
message: Created
|
185
|
+
headers:
|
186
|
+
Content-Type:
|
187
|
+
- application/json
|
188
|
+
Etag:
|
189
|
+
- W/"ed6b5e5d77dd808432ec751c0deee185"
|
190
|
+
Cache-Control:
|
191
|
+
- max-age=0, private, must-revalidate
|
192
|
+
X-Request-Id:
|
193
|
+
- e0a01184-2a20-479b-8dbc-b116141ee8fe
|
194
|
+
X-Runtime:
|
195
|
+
- '0.186431'
|
196
|
+
Content-Length:
|
197
|
+
- '32'
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: '{"token":"4W9TGVPm1TgacsoyhusB"}'
|
201
|
+
http_version:
|
202
|
+
recorded_at: Thu, 21 Jul 2016 08:30:28 GMT
|
203
|
+
- request:
|
204
|
+
method: get
|
205
|
+
uri: http://localhost:3000/locomotive/api/v3/sites.json?auth_token=4W9TGVPm1TgacsoyhusB
|
206
|
+
body:
|
207
|
+
encoding: UTF-8
|
208
|
+
string: ''
|
209
|
+
headers:
|
210
|
+
User-Agent:
|
211
|
+
- HTTPClient/1.0 (2.7.1, ruby 2.2.3 (2015-08-18))
|
212
|
+
Accept:
|
213
|
+
- application/json
|
214
|
+
Accept-Encoding:
|
215
|
+
- gzip,deflate
|
216
|
+
Date:
|
217
|
+
- Thu, 21 Jul 2016 08:30:28 GMT
|
218
|
+
X-Locomotive-Account-Email:
|
219
|
+
- admin@locomotivecms.com
|
220
|
+
X-Locomotive-Account-Token:
|
221
|
+
- 4W9TGVPm1TgacsoyhusB
|
222
|
+
response:
|
223
|
+
status:
|
224
|
+
code: 200
|
225
|
+
message: OK
|
226
|
+
headers:
|
227
|
+
Content-Type:
|
228
|
+
- application/json
|
229
|
+
Etag:
|
230
|
+
- W/"436570d60a44c4abddf750be2c1baaab"
|
231
|
+
Cache-Control:
|
232
|
+
- max-age=0, private, must-revalidate
|
233
|
+
X-Request-Id:
|
234
|
+
- 6f0ec9fb-b5de-4e57-a0bb-b5764a65c173
|
235
|
+
X-Runtime:
|
236
|
+
- '0.431548'
|
237
|
+
Content-Length:
|
238
|
+
- '1692'
|
239
|
+
body:
|
240
|
+
encoding: UTF-8
|
241
|
+
string: '[{"_id":"578fac3b00ea466ec7e90a2d","created_at":"2016-07-20T16:52:11Z","updated_at":"2016-07-20T16:52:12Z","name":"LocomotiveCMS","handle":"www","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"domains":["www.example.com"],"memberships":[{"_id":"578fac3c00ea466ec7e90a30","created_at":null,"updated_at":null,"role":"admin","account_id":"578fac3a00ea466ec7e90a2b","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1469033532,"template_version":1469033532,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/www/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}"},{"_id":"578fac3c00ea466ec7e90a31","created_at":"2016-07-20T16:52:12Z","updated_at":"2016-07-20T16:52:12Z","name":"Sample
|
242
|
+
site","handle":"sample","seo_title":null,"meta_keywords":null,"meta_description":null,"robots_txt":null,"cache_enabled":false,"private_access":false,"locales":["en"],"domains":["sample.example.com"],"memberships":[{"_id":"578fac3c00ea466ec7e90a34","created_at":null,"updated_at":null,"role":"admin","account_id":"578fac3a00ea466ec7e90a2b","name":"Admin","role_name":"Administrator","email":"admin@locomotivecms.com"}],"timezone":"UTC","picture_url":null,"content_version":1469033532,"template_version":1469033532,"picture_thumbnail_url":null,"preview_url":"http://localhost:3000/locomotive/sample/preview","sign_in_url":"http://localhost:3000/locomotive/sign_in","metafields":"{}","metafields_schema":"[]","metafields_ui":"{}"}]'
|
243
|
+
http_version:
|
244
|
+
recorded_at: Thu, 21 Jul 2016 08:30:28 GMT
|
245
|
+
recorded_with: VCR 3.0.1
|
@@ -33,6 +33,13 @@ describe Locomotive::Coal::Resources::ContentEntries, order: :defined do
|
|
33
33
|
expect(subject._total_entries).to be >= 2
|
34
34
|
end
|
35
35
|
|
36
|
+
it 'returns a list of entries without params' do
|
37
|
+
subject { entries.all }
|
38
|
+
expect(subject.size).to be >= 2
|
39
|
+
expect(subject._total_pages).to eq 1
|
40
|
+
expect(subject._total_entries).to be >= 2
|
41
|
+
end
|
42
|
+
|
36
43
|
describe 'pagination' do
|
37
44
|
|
38
45
|
let(:options) { { page: 2, per_page: 1 } }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotivecms_coal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -190,9 +190,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '2.0'
|
191
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
192
|
requirements:
|
193
|
-
- - "
|
193
|
+
- - ">"
|
194
194
|
- !ruby/object:Gem::Version
|
195
|
-
version:
|
195
|
+
version: 1.3.1
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
198
|
rubygems_version: 2.4.5.1
|