locomotivecms_coal 1.0.0.pre.alpha.3 → 1.0.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/README.md +60 -3
- data/lib/locomotive/coal/client.rb +10 -3
- data/lib/locomotive/coal/error.rb +4 -3
- data/lib/locomotive/coal/resources/concerns/request.rb +3 -3
- data/lib/locomotive/coal/resources/content_entries.rb +9 -0
- data/lib/locomotive/coal/resources/current_site.rb +25 -0
- data/lib/locomotive/coal/resources/memberships.rb +13 -0
- data/lib/locomotive/coal/resources/pages.rb +1 -1
- data/lib/locomotive/coal/resources/snippets.rb +8 -0
- data/lib/locomotive/coal/version.rb +1 -1
- data/lib/locomotive/coal.rb +3 -0
- data/locomotivecms_coal.gemspec +2 -2
- data/spec/fixtures/coal_cassettes/client.yml +117 -160
- data/spec/fixtures/coal_cassettes/content_assets.yml +47 -71
- data/spec/fixtures/coal_cassettes/content_entries.yml +510 -388
- data/spec/fixtures/coal_cassettes/content_types.yml +128 -196
- data/spec/fixtures/coal_cassettes/current_site.yml +124 -0
- data/spec/fixtures/coal_cassettes/memberships.yml +203 -0
- data/spec/fixtures/coal_cassettes/my_account.yml +40 -62
- data/spec/fixtures/coal_cassettes/pages.yml +82 -108
- data/spec/fixtures/coal_cassettes/sites.yml +43 -59
- data/spec/fixtures/coal_cassettes/snippets.yml +48 -70
- data/spec/fixtures/coal_cassettes/theme_assets.yml +46 -70
- data/spec/fixtures/coal_cassettes/token.yml +25 -31
- data/spec/fixtures/coal_cassettes/translations.yml +46 -70
- data/spec/fixtures/coal_cassettes/version.yml +18 -28
- data/spec/integration/resources/content_entries_spec.rb +11 -0
- data/spec/integration/resources/current_site_spec.rb +22 -0
- data/spec/integration/resources/memberships_spec.rb +39 -0
- metadata +16 -6
@@ -22,40 +22,34 @@ http_interactions:
|
|
22
22
|
headers:
|
23
23
|
Content-Type:
|
24
24
|
- application/json
|
25
|
-
Content-Length:
|
26
|
-
- '32'
|
27
25
|
Etag:
|
28
|
-
- W/"
|
26
|
+
- W/"157eb61d395f237526d11950bbc5a1fa"
|
29
27
|
Cache-Control:
|
30
28
|
- max-age=0, private, must-revalidate
|
31
29
|
X-Request-Id:
|
32
|
-
-
|
30
|
+
- 0a24b038-1f4d-4d63-9112-adebdb5637aa
|
33
31
|
X-Runtime:
|
34
|
-
- '0.
|
35
|
-
|
36
|
-
-
|
37
|
-
Server:
|
38
|
-
- thin
|
32
|
+
- '0.015947'
|
33
|
+
Content-Length:
|
34
|
+
- '32'
|
39
35
|
body:
|
40
36
|
encoding: UTF-8
|
41
|
-
string: '{"token":"
|
37
|
+
string: '{"token":"v6XDp282UyPDeM6DgA-S"}'
|
42
38
|
http_version:
|
43
|
-
recorded_at:
|
39
|
+
recorded_at: Wed, 29 Jul 2015 15:36:34 GMT
|
44
40
|
- request:
|
45
41
|
method: get
|
46
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets.json
|
42
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets.json?auth_token=v6XDp282UyPDeM6DgA-S
|
47
43
|
body:
|
48
|
-
encoding:
|
49
|
-
string:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
50
46
|
headers:
|
51
47
|
Accept:
|
52
48
|
- application/json
|
53
49
|
X-Locomotive-Account-Email:
|
54
50
|
- admin@locomotivecms.com
|
55
51
|
X-Locomotive-Account-Token:
|
56
|
-
-
|
57
|
-
Content-Type:
|
58
|
-
- application/x-www-form-urlencoded
|
52
|
+
- v6XDp282UyPDeM6DgA-S
|
59
53
|
Accept-Encoding:
|
60
54
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
55
|
User-Agent:
|
@@ -67,25 +61,21 @@ http_interactions:
|
|
67
61
|
headers:
|
68
62
|
Content-Type:
|
69
63
|
- application/json
|
70
|
-
Content-Length:
|
71
|
-
- '2'
|
72
64
|
Etag:
|
73
65
|
- W/"d751713988987e9331980363e24189ce"
|
74
66
|
Cache-Control:
|
75
67
|
- max-age=0, private, must-revalidate
|
76
68
|
X-Request-Id:
|
77
|
-
-
|
69
|
+
- 53ad7b7b-05db-4158-87e5-d0346b394f5c
|
78
70
|
X-Runtime:
|
79
|
-
- '0.
|
80
|
-
|
81
|
-
-
|
82
|
-
Server:
|
83
|
-
- thin
|
71
|
+
- '0.075728'
|
72
|
+
Content-Length:
|
73
|
+
- '2'
|
84
74
|
body:
|
85
75
|
encoding: UTF-8
|
86
76
|
string: "[]"
|
87
77
|
http_version:
|
88
|
-
recorded_at:
|
78
|
+
recorded_at: Wed, 29 Jul 2015 15:36:34 GMT
|
89
79
|
- request:
|
90
80
|
method: post
|
91
81
|
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets.json
|
@@ -265,7 +255,7 @@ http_interactions:
|
|
265
255
|
zZ/uVbu+4Zd1Nr1kLn00AZ7VJ/B8t/Du50zkuv4fvgGYnNqyFZUAAAAASUVO
|
266
256
|
RK5CYIINCi0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdA0KQ29udGVu
|
267
257
|
dC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJhdXRoX3Rva2VuIg0K
|
268
|
-
|
258
|
+
DQp2NlhEcDI4MlV5UERlTTZEZ0EtUw0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0
|
269
259
|
aXBhcnRQb3N0LS0NCg0K
|
270
260
|
headers:
|
271
261
|
Accept:
|
@@ -273,7 +263,7 @@ http_interactions:
|
|
273
263
|
X-Locomotive-Account-Email:
|
274
264
|
- admin@locomotivecms.com
|
275
265
|
X-Locomotive-Account-Token:
|
276
|
-
-
|
266
|
+
- v6XDp282UyPDeM6DgA-S
|
277
267
|
Content-Type:
|
278
268
|
- multipart/form-data; boundary=-----------RubyMultipartPost
|
279
269
|
Content-Length:
|
@@ -289,28 +279,24 @@ http_interactions:
|
|
289
279
|
headers:
|
290
280
|
Content-Type:
|
291
281
|
- application/json
|
292
|
-
Content-Length:
|
293
|
-
- '859'
|
294
282
|
Etag:
|
295
|
-
- W/"
|
283
|
+
- W/"488767597fd7f732946635d7ddfcf183"
|
296
284
|
Cache-Control:
|
297
285
|
- max-age=0, private, must-revalidate
|
298
286
|
X-Request-Id:
|
299
|
-
-
|
287
|
+
- 76e0eae3-d74f-498d-961e-5fb893464694
|
300
288
|
X-Runtime:
|
301
|
-
- '0.
|
302
|
-
|
303
|
-
-
|
304
|
-
Server:
|
305
|
-
- thin
|
289
|
+
- '0.181597'
|
290
|
+
Content-Length:
|
291
|
+
- '905'
|
306
292
|
body:
|
307
293
|
encoding: UTF-8
|
308
|
-
string: '{"_id":"
|
294
|
+
string: '{"_id":"55b8f302446964641a000002","created_at":"2015-07-29T15:36:34Z","updated_at":"2015-07-29T15:36:34Z","content_type":"image","width":50,"height":64,"vignette_url":"/sites/55b8f2ea4469646440000006/assets/55b8f302446964641a000002/rails.png","alternative_vignette_url":"/images/dynamic/W1siZmYiLCIvVXNlcnMvZGlkaWVyL0RvY3VtZW50cy9Mb2NvbW90aXZlQ01TL2VuZ2luZS9zcGVjL2R1bW15L3B1YmxpYy9zaXRlcy81NWI4ZjJlYTQ0Njk2NDY0NDAwMDAwMDYvYXNzZXRzLzU1YjhmMzAyNDQ2OTY0NjQxYTAwMDAwMi9yYWlscy5wbmciXSxbInAiLCJ0aHVtYiIsIjE5MHgxMjBcdTAwM2UiLHsiZm9ybWF0IjoicG5nIiwiZnJhbWUiOjB9XSxbInAiLCJlbmNvZGUiLCJwbmciXV0/rails.png?sha=c20906156dde3ed1","checksum":"933d32a3720db54b73003ba10a876eec","filename":"rails.png","short_name":"rails.png","extname":"png","full_filename":"rails.png","content_type_text":"image","with_thumbnail":true,"raw_size":7485,"url":"/sites/55b8f2ea4469646440000006/assets/55b8f302446964641a000002/rails.png"}'
|
309
295
|
http_version:
|
310
|
-
recorded_at:
|
296
|
+
recorded_at: Wed, 29 Jul 2015 15:36:34 GMT
|
311
297
|
- request:
|
312
298
|
method: put
|
313
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets/
|
299
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets/55b8f302446964641a000002.json
|
314
300
|
body:
|
315
301
|
encoding: ASCII-8BIT
|
316
302
|
string: !binary |-
|
@@ -504,15 +490,15 @@ http_interactions:
|
|
504
490
|
QAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAE
|
505
491
|
QAAEQMArAv8PisPwG9GP5SUAAAAASUVORK5CYIINCi0tLS0tLS0tLS0tLS1S
|
506
492
|
dWJ5TXVsdGlwYXJ0UG9zdA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1k
|
507
|
-
|
508
|
-
|
493
|
+
YXRhOyBuYW1lPSJhdXRoX3Rva2VuIg0KDQp2NlhEcDI4MlV5UERlTTZEZ0Et
|
494
|
+
Uw0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0LS0NCg0K
|
509
495
|
headers:
|
510
496
|
Accept:
|
511
497
|
- application/json
|
512
498
|
X-Locomotive-Account-Email:
|
513
499
|
- admin@locomotivecms.com
|
514
500
|
X-Locomotive-Account-Token:
|
515
|
-
-
|
501
|
+
- v6XDp282UyPDeM6DgA-S
|
516
502
|
Content-Type:
|
517
503
|
- multipart/form-data; boundary=-----------RubyMultipartPost
|
518
504
|
Content-Length:
|
@@ -528,40 +514,34 @@ http_interactions:
|
|
528
514
|
headers:
|
529
515
|
Content-Type:
|
530
516
|
- application/json
|
531
|
-
Content-Length:
|
532
|
-
- '1104'
|
533
517
|
Etag:
|
534
|
-
- W/"
|
518
|
+
- W/"57e0a3ff25647460212d40840fba5369"
|
535
519
|
Cache-Control:
|
536
520
|
- max-age=0, private, must-revalidate
|
537
521
|
X-Request-Id:
|
538
|
-
-
|
522
|
+
- 4b5ff1d7-038c-42c3-b924-4becdd59f84c
|
539
523
|
X-Runtime:
|
540
|
-
- '0.
|
541
|
-
|
542
|
-
-
|
543
|
-
Server:
|
544
|
-
- thin
|
524
|
+
- '0.057554'
|
525
|
+
Content-Length:
|
526
|
+
- '1150'
|
545
527
|
body:
|
546
528
|
encoding: UTF-8
|
547
|
-
string: '{"_id":"
|
529
|
+
string: '{"_id":"55b8f302446964641a000002","created_at":"2015-07-29T15:36:34Z","updated_at":"2015-07-29T15:36:34Z","content_type":"image","width":256,"height":256,"vignette_url":"/images/dynamic/W1siZmYiLCIvVXNlcnMvZGlkaWVyL0RvY3VtZW50cy9Mb2NvbW90aXZlQ01TL2VuZ2luZS9zcGVjL2R1bW15L3B1YmxpYy9zaXRlcy81NWI4ZjJlYTQ0Njk2NDY0NDAwMDAwMDYvYXNzZXRzLzU1YjhmMzAyNDQ2OTY0NjQxYTAwMDAwMi9sb2NvbW90aXZlLnBuZyJdLFsicCIsInRodW1iIiwiODV4ODUjIl1d/locomotive.png?sha=15bfc6427f00c02d","alternative_vignette_url":"/images/dynamic/W1siZmYiLCIvVXNlcnMvZGlkaWVyL0RvY3VtZW50cy9Mb2NvbW90aXZlQ01TL2VuZ2luZS9zcGVjL2R1bW15L3B1YmxpYy9zaXRlcy81NWI4ZjJlYTQ0Njk2NDY0NDAwMDAwMDYvYXNzZXRzLzU1YjhmMzAyNDQ2OTY0NjQxYTAwMDAwMi9sb2NvbW90aXZlLnBuZyJdLFsicCIsInRodW1iIiwiMTkweDEyMFx1MDAzZSIseyJmb3JtYXQiOiJwbmciLCJmcmFtZSI6MH1dLFsicCIsImVuY29kZSIsInBuZyJdXQ/locomotive.png?sha=f18377134a32ae05","checksum":"933d32a3720db54b73003ba10a876eec","filename":"locomotive.png","short_name":"locomotive.png","extname":"png","full_filename":"locomotive.png","content_type_text":"image","with_thumbnail":true,"raw_size":8269,"url":"/sites/55b8f2ea4469646440000006/assets/55b8f302446964641a000002/locomotive.png"}'
|
548
530
|
http_version:
|
549
|
-
recorded_at:
|
531
|
+
recorded_at: Wed, 29 Jul 2015 15:36:34 GMT
|
550
532
|
- request:
|
551
533
|
method: delete
|
552
|
-
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets/
|
534
|
+
uri: http://localhost:3000/locomotive/sample/api/v3/content_assets/55b8f302446964641a000002.json?auth_token=v6XDp282UyPDeM6DgA-S
|
553
535
|
body:
|
554
|
-
encoding:
|
555
|
-
string:
|
536
|
+
encoding: US-ASCII
|
537
|
+
string: ''
|
556
538
|
headers:
|
557
539
|
Accept:
|
558
540
|
- application/json
|
559
541
|
X-Locomotive-Account-Email:
|
560
542
|
- admin@locomotivecms.com
|
561
543
|
X-Locomotive-Account-Token:
|
562
|
-
-
|
563
|
-
Content-Type:
|
564
|
-
- application/x-www-form-urlencoded
|
544
|
+
- v6XDp282UyPDeM6DgA-S
|
565
545
|
Accept-Encoding:
|
566
546
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
567
547
|
User-Agent:
|
@@ -573,23 +553,19 @@ http_interactions:
|
|
573
553
|
headers:
|
574
554
|
Content-Type:
|
575
555
|
- application/json
|
576
|
-
Content-Length:
|
577
|
-
- '1103'
|
578
556
|
Etag:
|
579
|
-
- W/"
|
557
|
+
- W/"b0bd7641a724e8a8501e609ed151a1f4"
|
580
558
|
Cache-Control:
|
581
559
|
- max-age=0, private, must-revalidate
|
582
560
|
X-Request-Id:
|
583
|
-
-
|
561
|
+
- a3eb9386-82dc-4122-b0c5-8aa28187ebe1
|
584
562
|
X-Runtime:
|
585
|
-
- '0.
|
586
|
-
|
587
|
-
-
|
588
|
-
Server:
|
589
|
-
- thin
|
563
|
+
- '0.052364'
|
564
|
+
Content-Length:
|
565
|
+
- '1149'
|
590
566
|
body:
|
591
567
|
encoding: UTF-8
|
592
|
-
string: '{"_id":"
|
568
|
+
string: '{"_id":"55b8f302446964641a000002","created_at":"2015-07-29T15:36:34Z","updated_at":"2015-07-29T15:36:34Z","content_type":"image","width":256,"height":256,"vignette_url":"/images/dynamic/W1siZmYiLCIvVXNlcnMvZGlkaWVyL0RvY3VtZW50cy9Mb2NvbW90aXZlQ01TL2VuZ2luZS9zcGVjL2R1bW15L3B1YmxpYy9zaXRlcy81NWI4ZjJlYTQ0Njk2NDY0NDAwMDAwMDYvYXNzZXRzLzU1YjhmMzAyNDQ2OTY0NjQxYTAwMDAwMi9sb2NvbW90aXZlLnBuZyJdLFsicCIsInRodW1iIiwiODV4ODUjIl1d/locomotive.png?sha=15bfc6427f00c02d","alternative_vignette_url":"/images/dynamic/W1siZmYiLCIvVXNlcnMvZGlkaWVyL0RvY3VtZW50cy9Mb2NvbW90aXZlQ01TL2VuZ2luZS9zcGVjL2R1bW15L3B1YmxpYy9zaXRlcy81NWI4ZjJlYTQ0Njk2NDY0NDAwMDAwMDYvYXNzZXRzLzU1YjhmMzAyNDQ2OTY0NjQxYTAwMDAwMi9sb2NvbW90aXZlLnBuZyJdLFsicCIsInRodW1iIiwiMTkweDEyMFx1MDAzZSIseyJmb3JtYXQiOiJwbmciLCJmcmFtZSI6MH1dLFsicCIsImVuY29kZSIsInBuZyJdXQ/locomotive.png?sha=f18377134a32ae05","checksum":"933d32a3720db54b73003ba10a876eec","filename":"locomotive.png","short_name":"locomotive.png","extname":null,"full_filename":"locomotive.png","content_type_text":"image","with_thumbnail":true,"raw_size":8269,"url":"/sites/55b8f2ea4469646440000006/assets/55b8f302446964641a000002/locomotive.png"}'
|
593
569
|
http_version:
|
594
|
-
recorded_at:
|
570
|
+
recorded_at: Wed, 29 Jul 2015 15:36:34 GMT
|
595
571
|
recorded_with: VCR 2.9.3
|