hotchoc 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/hotchoc/client/configuration.rb +3 -3
- data/lib/hotchoc/client/fetcher.rb +6 -9
- data/lib/hotchoc/client/version.rb +1 -1
- data/lib/hotchoc/client.rb +2 -2
- data/spec/hotchoc/album_spec.rb +1 -1
- data/spec/hotchoc/blocks/image_spec.rb +1 -1
- data/spec/hotchoc/blocks/text_spec.rb +1 -1
- data/spec/hotchoc/client/api_spec.rb +4 -4
- data/spec/hotchoc/client_spec.rb +2 -2
- data/spec/hotchoc/file_spec.rb +1 -1
- data/spec/hotchoc/page_spec.rb +1 -1
- data/spec/hotchoc/post_spec.rb +1 -1
- data/spec/hotchoc/thumbnail_spec.rb +1 -1
- data/spec/hotchoc/topic_spec.rb +1 -1
- data/spec/support/responses/albums.json +481 -483
- data/spec/support/responses/pages.json +75 -77
- data/spec/support/responses/posts.json +78 -80
- data/spec/support/responses/topics.json +121 -123
- data/spec/support/stubs.rb +1 -1
- metadata +2 -2
@@ -1,78 +1,76 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
{
|
6
|
-
"
|
7
|
-
|
8
|
-
"markdown": "Test _test_ test"
|
9
|
-
},
|
10
|
-
"created_at": "2015-05-04T09:26:59Z",
|
11
|
-
"id": "07072e07-0afd-44b2-ae02-94161632f218",
|
12
|
-
"position": 0,
|
13
|
-
"type": "text",
|
14
|
-
"updated_at": "2015-05-04T09:27:11Z"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"created_at": "2015-05-04T09:26:47Z",
|
18
|
-
"id": "730524b0-b68e-486f-8199-31c582ce7e99",
|
19
|
-
"identifier": "test-page-1",
|
20
|
-
"level": 1,
|
21
|
-
"parent_id": "2fba7834-b083-4dc5-9c50-a488c42dcded",
|
22
|
-
"path": "/test-page-1",
|
23
|
-
"position": 0,
|
24
|
-
"publish_date": "2015-05-04T09:26:47Z",
|
25
|
-
"status": "published",
|
26
|
-
"subtitle": "Test subtitle 1",
|
27
|
-
"title": "Test page 1",
|
28
|
-
"topics": [
|
29
|
-
{
|
30
|
-
"created_at": "2015-05-04T08:08:27Z",
|
31
|
-
"id": "3002a596-252f-4397-aeda-f93b631de857",
|
32
|
-
"identifier": "ducati",
|
33
|
-
"name": "Ducati",
|
34
|
-
"updated_at": "2015-05-05T03:57:28Z"
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"blocks": [
|
4
|
+
{
|
5
|
+
"content": {
|
6
|
+
"html": "<p>Test <em>test</em> test</p>\n",
|
7
|
+
"markdown": "Test _test_ test"
|
35
8
|
},
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
9
|
+
"created_at": "2015-05-04T09:26:59Z",
|
10
|
+
"id": "07072e07-0afd-44b2-ae02-94161632f218",
|
11
|
+
"position": 0,
|
12
|
+
"type": "text",
|
13
|
+
"updated_at": "2015-05-04T09:27:11Z"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"created_at": "2015-05-04T09:26:47Z",
|
17
|
+
"id": "730524b0-b68e-486f-8199-31c582ce7e99",
|
18
|
+
"identifier": "test-page-1",
|
19
|
+
"level": 1,
|
20
|
+
"parent_id": "2fba7834-b083-4dc5-9c50-a488c42dcded",
|
21
|
+
"path": "/test-page-1",
|
22
|
+
"position": 0,
|
23
|
+
"publish_date": "2015-05-04T09:26:47Z",
|
24
|
+
"status": "published",
|
25
|
+
"subtitle": "Test subtitle 1",
|
26
|
+
"title": "Test page 1",
|
27
|
+
"topics": [
|
28
|
+
{
|
29
|
+
"created_at": "2015-05-04T08:08:27Z",
|
30
|
+
"id": "3002a596-252f-4397-aeda-f93b631de857",
|
31
|
+
"identifier": "ducati",
|
32
|
+
"name": "Ducati",
|
33
|
+
"updated_at": "2015-05-05T03:57:28Z"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"created_at": "2015-05-04T08:08:27Z",
|
37
|
+
"id": "37e30b6f-9f51-414e-8c76-bbdda12f11a7",
|
38
|
+
"identifier": "victoria",
|
39
|
+
"name": "Victoria",
|
40
|
+
"updated_at": "2015-05-05T03:57:27Z"
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"updated_at": "2015-05-05T03:57:28Z"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"blocks": [],
|
47
|
+
"created_at": "2015-05-04T08:08:26Z",
|
48
|
+
"id": "2fba7834-b083-4dc5-9c50-a488c42dcded",
|
49
|
+
"identifier": "home",
|
50
|
+
"level": 0,
|
51
|
+
"parent_id": null,
|
52
|
+
"path": "/",
|
53
|
+
"position": 0,
|
54
|
+
"publish_date": "2015-05-04T08:08:26Z",
|
55
|
+
"status": "published",
|
56
|
+
"subtitle": "",
|
57
|
+
"title": "Home",
|
58
|
+
"topics": [
|
59
|
+
{
|
60
|
+
"created_at": "2015-05-04T08:08:27Z",
|
61
|
+
"id": "a1753785-ba93-4846-8bce-9c2af6813317",
|
62
|
+
"identifier": "bushwalking",
|
63
|
+
"name": "Bushwalking",
|
64
|
+
"updated_at": "2015-05-05T03:57:01Z"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"created_at": "2015-05-04T08:08:27Z",
|
68
|
+
"id": "86f6e524-932f-4ddf-a1f9-a6d0132394ef",
|
69
|
+
"identifier": "darwin",
|
70
|
+
"name": "Darwin",
|
71
|
+
"updated_at": "2015-05-05T03:57:06Z"
|
72
|
+
}
|
73
|
+
],
|
74
|
+
"updated_at": "2015-05-05T03:57:09Z"
|
75
|
+
}
|
76
|
+
]
|
@@ -1,82 +1,80 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
{
|
6
|
-
"
|
7
|
-
|
8
|
-
"markdown": "Test test _test_"
|
9
|
-
},
|
10
|
-
"created_at": "2015-05-04T09:28:39Z",
|
11
|
-
"id": "72b6bee3-c4ba-4fcb-afe2-434ae1e0c8c9",
|
12
|
-
"position": 0,
|
13
|
-
"type": "text",
|
14
|
-
"updated_at": "2015-05-04T09:28:47Z"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"created_at": "2015-05-04T09:28:26Z",
|
18
|
-
"id": "5388f1e6-ad20-4baa-8720-63c3fb50273a",
|
19
|
-
"identifier": "test-post-2",
|
20
|
-
"publish_date": "2015-05-04T09:28:26Z",
|
21
|
-
"status": "published",
|
22
|
-
"subtitle": "Test subtitle 2",
|
23
|
-
"title": "Test post 2",
|
24
|
-
"topics": [
|
25
|
-
{
|
26
|
-
"created_at": "2015-05-04T08:08:27Z",
|
27
|
-
"id": "37e30b6f-9f51-414e-8c76-bbdda12f11a7",
|
28
|
-
"identifier": "victoria",
|
29
|
-
"name": "Victoria",
|
30
|
-
"updated_at": "2015-05-04T09:28:55Z"
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"blocks": [
|
4
|
+
{
|
5
|
+
"content": {
|
6
|
+
"html": "<p>Test test <em>test</em></p>\n",
|
7
|
+
"markdown": "Test test _test_"
|
31
8
|
},
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
"
|
69
|
-
"
|
9
|
+
"created_at": "2015-05-04T09:28:39Z",
|
10
|
+
"id": "72b6bee3-c4ba-4fcb-afe2-434ae1e0c8c9",
|
11
|
+
"position": 0,
|
12
|
+
"type": "text",
|
13
|
+
"updated_at": "2015-05-04T09:28:47Z"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"created_at": "2015-05-04T09:28:26Z",
|
17
|
+
"id": "5388f1e6-ad20-4baa-8720-63c3fb50273a",
|
18
|
+
"identifier": "test-post-2",
|
19
|
+
"publish_date": "2015-05-04T09:28:26Z",
|
20
|
+
"status": "published",
|
21
|
+
"subtitle": "Test subtitle 2",
|
22
|
+
"title": "Test post 2",
|
23
|
+
"topics": [
|
24
|
+
{
|
25
|
+
"created_at": "2015-05-04T08:08:27Z",
|
26
|
+
"id": "37e30b6f-9f51-414e-8c76-bbdda12f11a7",
|
27
|
+
"identifier": "victoria",
|
28
|
+
"name": "Victoria",
|
29
|
+
"updated_at": "2015-05-04T09:28:55Z"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"created_at": "2015-05-04T08:08:27Z",
|
33
|
+
"id": "30479282-7b1f-40b8-befb-d7e86ca0021f",
|
34
|
+
"identifier": "melbourne",
|
35
|
+
"name": "Melbourne",
|
36
|
+
"updated_at": "2015-05-04T09:28:53Z"
|
37
|
+
}
|
38
|
+
],
|
39
|
+
"updated_at": "2015-05-04T09:28:57Z"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"blocks": [
|
43
|
+
{
|
44
|
+
"content": {
|
45
|
+
"html": "<p>Test test <strong>test</strong></p>\n",
|
46
|
+
"markdown": "Test test **test**"
|
70
47
|
},
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
48
|
+
"created_at": "2015-05-04T09:27:46Z",
|
49
|
+
"id": "a53d6576-3e7d-4b48-9b99-245c34748922",
|
50
|
+
"position": 0,
|
51
|
+
"type": "text",
|
52
|
+
"updated_at": "2015-05-04T09:27:56Z"
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"created_at": "2015-05-04T09:27:31Z",
|
56
|
+
"id": "316c76ac-0fb7-4eee-9291-f48857068f68",
|
57
|
+
"identifier": "test-post-1",
|
58
|
+
"publish_date": "2015-05-04T09:27:31Z",
|
59
|
+
"status": "published",
|
60
|
+
"subtitle": "Test subtitle 1",
|
61
|
+
"title": "Test post 1",
|
62
|
+
"topics": [
|
63
|
+
{
|
64
|
+
"created_at": "2015-05-04T08:08:27Z",
|
65
|
+
"id": "a1753785-ba93-4846-8bce-9c2af6813317",
|
66
|
+
"identifier": "bushwalking",
|
67
|
+
"name": "Bushwalking",
|
68
|
+
"updated_at": "2015-05-04T09:28:07Z"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"created_at": "2015-05-04T08:08:27Z",
|
72
|
+
"id": "ac5ce271-a199-44c2-89e9-3f57515fbbb6",
|
73
|
+
"identifier": "hobart",
|
74
|
+
"name": "Hobart",
|
75
|
+
"updated_at": "2015-05-04T09:28:09Z"
|
76
|
+
}
|
77
|
+
],
|
78
|
+
"updated_at": "2015-05-04T09:28:20Z"
|
79
|
+
}
|
80
|
+
]
|
@@ -1,123 +1,121 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
]
|
123
|
-
}
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"created_at": "2015-05-04T08:08:27Z",
|
4
|
+
"id": "4b3e5569-7bef-445d-9f11-92cdceeda222",
|
5
|
+
"identifier": "australia",
|
6
|
+
"name": "Australia",
|
7
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"created_at": "2015-05-04T08:08:27Z",
|
11
|
+
"id": "a1753785-ba93-4846-8bce-9c2af6813317",
|
12
|
+
"identifier": "bushwalking",
|
13
|
+
"name": "Bushwalking",
|
14
|
+
"updated_at": "2015-05-04T09:28:07Z"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"created_at": "2015-05-04T08:08:27Z",
|
18
|
+
"id": "86f6e524-932f-4ddf-a1f9-a6d0132394ef",
|
19
|
+
"identifier": "darwin",
|
20
|
+
"name": "Darwin",
|
21
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"created_at": "2015-05-04T08:08:27Z",
|
25
|
+
"id": "3002a596-252f-4397-aeda-f93b631de857",
|
26
|
+
"identifier": "ducati",
|
27
|
+
"name": "Ducati",
|
28
|
+
"updated_at": "2015-05-04T09:22:39Z"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"created_at": "2015-05-04T08:08:27Z",
|
32
|
+
"id": "bb20d36a-9f3a-47be-9b49-af1d95240e96",
|
33
|
+
"identifier": "hiking",
|
34
|
+
"name": "Hiking",
|
35
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"created_at": "2015-05-04T08:08:27Z",
|
39
|
+
"id": "ac5ce271-a199-44c2-89e9-3f57515fbbb6",
|
40
|
+
"identifier": "hobart",
|
41
|
+
"name": "Hobart",
|
42
|
+
"updated_at": "2015-05-04T09:28:09Z"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"created_at": "2015-05-04T08:08:27Z",
|
46
|
+
"id": "bd0edb81-95b7-4ab7-9a11-ea04e79cd468",
|
47
|
+
"identifier": "launceston",
|
48
|
+
"name": "Launceston",
|
49
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"created_at": "2015-05-04T08:08:27Z",
|
53
|
+
"id": "30479282-7b1f-40b8-befb-d7e86ca0021f",
|
54
|
+
"identifier": "melbourne",
|
55
|
+
"name": "Melbourne",
|
56
|
+
"updated_at": "2015-05-04T09:28:53Z"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"created_at": "2015-05-04T08:08:27Z",
|
60
|
+
"id": "741201ee-b9d0-4b10-b9ae-64b5aba838f9",
|
61
|
+
"identifier": "new-south-wales",
|
62
|
+
"name": "New South Wales",
|
63
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"created_at": "2015-05-04T08:08:27Z",
|
67
|
+
"id": "5e56277d-cb2d-441d-8827-dca97cf3d67b",
|
68
|
+
"identifier": "northern-territory",
|
69
|
+
"name": "Northern Territory",
|
70
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"created_at": "2015-05-04T08:08:27Z",
|
74
|
+
"id": "0b0f7c89-252d-4dfa-9c45-99295adfc976",
|
75
|
+
"identifier": "numbulwar",
|
76
|
+
"name": "Numbulwar",
|
77
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"created_at": "2015-05-04T08:08:27Z",
|
81
|
+
"id": "6e6d7cb5-429f-48b6-93ac-301825e2c595",
|
82
|
+
"identifier": "overland-track",
|
83
|
+
"name": "Overland Track",
|
84
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"created_at": "2015-05-04T08:08:27Z",
|
88
|
+
"id": "2189e20c-f651-48c5-bd3f-f7b497081643",
|
89
|
+
"identifier": "south-australia",
|
90
|
+
"name": "South Australia",
|
91
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"created_at": "2015-05-04T08:08:27Z",
|
95
|
+
"id": "8acd8555-1e9c-4f12-add9-728904c655be",
|
96
|
+
"identifier": "south-coast-track",
|
97
|
+
"name": "South Coast Track",
|
98
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"created_at": "2015-05-04T08:08:27Z",
|
102
|
+
"id": "99d1e3ad-d1b1-4ff9-9f31-3f7295c1308f",
|
103
|
+
"identifier": "sydney",
|
104
|
+
"name": "Sydney",
|
105
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"created_at": "2015-05-04T08:08:27Z",
|
109
|
+
"id": "c149c800-c75d-4638-9baa-35a5abe4fc60",
|
110
|
+
"identifier": "tasmania",
|
111
|
+
"name": "Tasmania",
|
112
|
+
"updated_at": "2015-05-04T08:08:27Z"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"created_at": "2015-05-04T08:08:27Z",
|
116
|
+
"id": "37e30b6f-9f51-414e-8c76-bbdda12f11a7",
|
117
|
+
"identifier": "victoria",
|
118
|
+
"name": "Victoria",
|
119
|
+
"updated_at": "2015-05-04T09:28:55Z"
|
120
|
+
}
|
121
|
+
]
|
data/spec/support/stubs.rb
CHANGED
@@ -12,7 +12,7 @@ RSpec.configure do |config|
|
|
12
12
|
stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/topics\/?(\?.*)?\z/)
|
13
13
|
.to_return(status: 200, body: File.read(response_stub('topics')))
|
14
14
|
|
15
|
-
stub_request(:get, "
|
15
|
+
stub_request(:get, "http://def.ghi/api/posts?api_key=abc")
|
16
16
|
.to_return(status: 504)
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotchoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Siegel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|