horn_of_plenty 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.txt +19 -0
- data/README.md +36 -0
- data/lib/horn_of_plenty.rb +22 -0
- data/lib/horn_of_plenty/adapters/github/client.rb +82 -0
- data/lib/horn_of_plenty/adapters/github/collections/card.rb +46 -0
- data/lib/horn_of_plenty/adapters/github/configuration.rb +38 -0
- data/lib/horn_of_plenty/adapters/github/error.rb +44 -0
- data/lib/horn_of_plenty/adapters/github/parsers/board.rb +52 -0
- data/lib/horn_of_plenty/adapters/github/parsers/card.rb +91 -0
- data/lib/horn_of_plenty/adapters/github/parsers/issue.rb +95 -0
- data/lib/horn_of_plenty/adapters/github/parsers/lane.rb +50 -0
- data/lib/horn_of_plenty/adapters/github/parsers/pull_request.rb +38 -0
- data/lib/horn_of_plenty/adapters/github/queries/list_boards.rb +18 -0
- data/lib/horn_of_plenty/adapters/github/queries/list_cards.rb +19 -0
- data/lib/horn_of_plenty/adapters/github/queries/list_issues.rb +22 -0
- data/lib/horn_of_plenty/adapters/github/queries/list_lanes.rb +19 -0
- data/lib/horn_of_plenty/adapters/github/queries/list_pull_requests.rb +22 -0
- data/lib/horn_of_plenty/adapters/github/repositories/board.rb +24 -0
- data/lib/horn_of_plenty/adapters/github/repositories/card.rb +24 -0
- data/lib/horn_of_plenty/adapters/github/repositories/issue.rb +24 -0
- data/lib/horn_of_plenty/adapters/github/repositories/lane.rb +24 -0
- data/lib/horn_of_plenty/adapters/github/repositories/pull_request.rb +24 -0
- data/lib/horn_of_plenty/adapters/github/requests/list_boards.rb +50 -0
- data/lib/horn_of_plenty/adapters/github/requests/list_cards.rb +52 -0
- data/lib/horn_of_plenty/adapters/github/requests/list_issues.rb +50 -0
- data/lib/horn_of_plenty/adapters/github/requests/list_lanes.rb +52 -0
- data/lib/horn_of_plenty/adapters/github/requests/list_pull_requests.rb +50 -0
- data/lib/horn_of_plenty/adapters/github/response.rb +16 -0
- data/lib/horn_of_plenty/adapters/github/responses/list_boards.rb +17 -0
- data/lib/horn_of_plenty/adapters/github/responses/list_cards.rb +23 -0
- data/lib/horn_of_plenty/adapters/github/responses/list_issues.rb +18 -0
- data/lib/horn_of_plenty/adapters/github/responses/list_lanes.rb +17 -0
- data/lib/horn_of_plenty/adapters/github/responses/list_pull_requests.rb +17 -0
- data/lib/horn_of_plenty/collection.rb +60 -0
- data/lib/horn_of_plenty/core_ext/string.rb +95 -0
- data/lib/horn_of_plenty/models/board.rb +32 -0
- data/lib/horn_of_plenty/models/card.rb +51 -0
- data/lib/horn_of_plenty/models/issue.rb +46 -0
- data/lib/horn_of_plenty/models/lane.rb +30 -0
- data/lib/horn_of_plenty/models/parsable.rb +44 -0
- data/lib/horn_of_plenty/models/pull_request.rb +12 -0
- data/lib/horn_of_plenty/null_objects/board.rb +10 -0
- data/lib/horn_of_plenty/null_objects/card.rb +10 -0
- data/lib/horn_of_plenty/null_objects/issue.rb +10 -0
- data/lib/horn_of_plenty/null_objects/lane.rb +10 -0
- data/lib/horn_of_plenty/null_objects/pull_request.rb +10 -0
- data/lib/horn_of_plenty/paginator.rb +109 -0
- data/lib/horn_of_plenty/parsers/hash.rb +95 -0
- data/lib/horn_of_plenty/queries/fetch.rb +36 -0
- data/lib/horn_of_plenty/repositories/board.rb +26 -0
- data/lib/horn_of_plenty/repositories/card.rb +26 -0
- data/lib/horn_of_plenty/repositories/issue.rb +26 -0
- data/lib/horn_of_plenty/repositories/lane.rb +26 -0
- data/lib/horn_of_plenty/repositories/pull_request.rb +26 -0
- data/lib/horn_of_plenty/repository.rb +29 -0
- data/lib/horn_of_plenty/request.rb +32 -0
- data/lib/horn_of_plenty/response.rb +44 -0
- data/lib/horn_of_plenty/version.rb +4 -0
- data/spec/fixtures/responses/board_github.json +29 -0
- data/spec/fixtures/responses/card_github.json +7 -0
- data/spec/fixtures/responses/issue_github.json +163 -0
- data/spec/fixtures/responses/lane_github.json +7 -0
- data/spec/fixtures/responses/pull_request_github.json +361 -0
- data/spec/lib/horn_of_plenty/adapters/github/client_spec.rb +12 -0
- data/spec/lib/horn_of_plenty/adapters/github/collections/card_spec.rb +14 -0
- data/spec/lib/horn_of_plenty/adapters/github/configuration_spec.rb +12 -0
- data/spec/lib/horn_of_plenty/adapters/github/error_spec.rb +35 -0
- data/spec/lib/horn_of_plenty/adapters/github/parsers/board_spec.rb +39 -0
- data/spec/lib/horn_of_plenty/adapters/github/parsers/card_spec.rb +64 -0
- data/spec/lib/horn_of_plenty/adapters/github/parsers/issue_spec.rb +47 -0
- data/spec/lib/horn_of_plenty/adapters/github/parsers/lane_spec.rb +38 -0
- data/spec/lib/horn_of_plenty/adapters/github/parsers/pull_request_spec.rb +50 -0
- data/spec/lib/horn_of_plenty/adapters/github/queries/list_boards_spec.rb +19 -0
- data/spec/lib/horn_of_plenty/adapters/github/queries/list_cards_spec.rb +19 -0
- data/spec/lib/horn_of_plenty/adapters/github/queries/list_issues_spec.rb +19 -0
- data/spec/lib/horn_of_plenty/adapters/github/queries/list_lanes_spec.rb +19 -0
- data/spec/lib/horn_of_plenty/adapters/github/queries/list_pull_requests_spec.rb +19 -0
- data/spec/lib/horn_of_plenty/adapters/github/repositories/board_spec.rb +22 -0
- data/spec/lib/horn_of_plenty/adapters/github/repositories/card_spec.rb +67 -0
- data/spec/lib/horn_of_plenty/adapters/github/repositories/issue_spec.rb +22 -0
- data/spec/lib/horn_of_plenty/adapters/github/repositories/lane_spec.rb +25 -0
- data/spec/lib/horn_of_plenty/adapters/github/repositories/pull_request_spec.rb +24 -0
- data/spec/lib/horn_of_plenty/adapters/github/requests/list_boards_spec.rb +42 -0
- data/spec/lib/horn_of_plenty/adapters/github/requests/list_cards_spec.rb +51 -0
- data/spec/lib/horn_of_plenty/adapters/github/requests/list_issues_spec.rb +42 -0
- data/spec/lib/horn_of_plenty/adapters/github/requests/list_lanes_spec.rb +51 -0
- data/spec/lib/horn_of_plenty/adapters/github/requests/list_pull_requests_spec.rb +42 -0
- data/spec/lib/horn_of_plenty/adapters/github/responses/list_boards_spec.rb +78 -0
- data/spec/lib/horn_of_plenty/adapters/github/responses/list_cards_spec.rb +86 -0
- data/spec/lib/horn_of_plenty/adapters/github/responses/list_issues_spec.rb +104 -0
- data/spec/lib/horn_of_plenty/adapters/github/responses/list_lanes_spec.rb +86 -0
- data/spec/lib/horn_of_plenty/adapters/github/responses/list_pull_requests_spec.rb +109 -0
- data/spec/lib/horn_of_plenty/models/board_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/models/card_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/models/issue_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/models/lane_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/models/pull_request_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/null_objects/board_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/null_objects/card_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/null_objects/issue_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/null_objects/lane_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/null_objects/pull_request_spec.rb +10 -0
- data/spec/lib/horn_of_plenty/queries/fetch_spec.rb +15 -0
- data/spec/lib/horn_of_plenty/repositories/board_spec.rb +48 -0
- data/spec/lib/horn_of_plenty/repositories/card_spec.rb +51 -0
- data/spec/lib/horn_of_plenty/repositories/issue_spec.rb +48 -0
- data/spec/lib/horn_of_plenty/repositories/lane_spec.rb +51 -0
- data/spec/lib/horn_of_plenty/repositories/pull_request_spec.rb +50 -0
- data/spec/support/patterns.rb +1 -0
- metadata +396 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,361 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6",
|
3
|
+
"id": 69448718,
|
4
|
+
"html_url": "https://github.com/RealSavvy/realsavvy/pull/6",
|
5
|
+
"diff_url": "https://github.com/RealSavvy/realsavvy/pull/6.diff",
|
6
|
+
"patch_url": "https://github.com/RealSavvy/realsavvy/pull/6.patch",
|
7
|
+
"issue_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/6",
|
8
|
+
"number": 6,
|
9
|
+
"state": "closed",
|
10
|
+
"locked": false,
|
11
|
+
"title": "GLUX updates!",
|
12
|
+
"user": {
|
13
|
+
"login": "markmakes",
|
14
|
+
"id": 503721,
|
15
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/503721?v=3",
|
16
|
+
"gravatar_id": "",
|
17
|
+
"url": "https://api.github.com/users/markmakes",
|
18
|
+
"html_url": "https://github.com/markmakes",
|
19
|
+
"followers_url": "https://api.github.com/users/markmakes/followers",
|
20
|
+
"following_url": "https://api.github.com/users/markmakes/following{/other_user}",
|
21
|
+
"gists_url": "https://api.github.com/users/markmakes/gists{/gist_id}",
|
22
|
+
"starred_url": "https://api.github.com/users/markmakes/starred{/owner}{/repo}",
|
23
|
+
"subscriptions_url": "https://api.github.com/users/markmakes/subscriptions",
|
24
|
+
"organizations_url": "https://api.github.com/users/markmakes/orgs",
|
25
|
+
"repos_url": "https://api.github.com/users/markmakes/repos",
|
26
|
+
"events_url": "https://api.github.com/users/markmakes/events{/privacy}",
|
27
|
+
"received_events_url": "https://api.github.com/users/markmakes/received_events",
|
28
|
+
"type": "User",
|
29
|
+
"site_admin": false
|
30
|
+
},
|
31
|
+
"body": "Footer is designed, but some of the items are placeholders till functionality is written.\r\n\r\nOtherwise loads of CSS edits for responsiveness, design, and colors.",
|
32
|
+
"created_at": "2016-05-10T04:52:19Z",
|
33
|
+
"updated_at": "2016-05-10T20:11:55Z",
|
34
|
+
"closed_at": "2016-05-10T20:11:54Z",
|
35
|
+
"merged_at": "2016-05-10T20:11:54Z",
|
36
|
+
"merge_commit_sha": "7351ad38d6ca90266f8e3df52e900feb12d13d8d",
|
37
|
+
"assignee": {
|
38
|
+
"login": "jfelchner",
|
39
|
+
"id": 285582,
|
40
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/285582?v=3",
|
41
|
+
"gravatar_id": "",
|
42
|
+
"url": "https://api.github.com/users/jfelchner",
|
43
|
+
"html_url": "https://github.com/jfelchner",
|
44
|
+
"followers_url": "https://api.github.com/users/jfelchner/followers",
|
45
|
+
"following_url": "https://api.github.com/users/jfelchner/following{/other_user}",
|
46
|
+
"gists_url": "https://api.github.com/users/jfelchner/gists{/gist_id}",
|
47
|
+
"starred_url": "https://api.github.com/users/jfelchner/starred{/owner}{/repo}",
|
48
|
+
"subscriptions_url": "https://api.github.com/users/jfelchner/subscriptions",
|
49
|
+
"organizations_url": "https://api.github.com/users/jfelchner/orgs",
|
50
|
+
"repos_url": "https://api.github.com/users/jfelchner/repos",
|
51
|
+
"events_url": "https://api.github.com/users/jfelchner/events{/privacy}",
|
52
|
+
"received_events_url": "https://api.github.com/users/jfelchner/received_events",
|
53
|
+
"type": "User",
|
54
|
+
"site_admin": false
|
55
|
+
},
|
56
|
+
"assignees": [
|
57
|
+
{
|
58
|
+
"login": "jfelchner",
|
59
|
+
"id": 285582,
|
60
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/285582?v=3",
|
61
|
+
"gravatar_id": "",
|
62
|
+
"url": "https://api.github.com/users/jfelchner",
|
63
|
+
"html_url": "https://github.com/jfelchner",
|
64
|
+
"followers_url": "https://api.github.com/users/jfelchner/followers",
|
65
|
+
"following_url": "https://api.github.com/users/jfelchner/following{/other_user}",
|
66
|
+
"gists_url": "https://api.github.com/users/jfelchner/gists{/gist_id}",
|
67
|
+
"starred_url": "https://api.github.com/users/jfelchner/starred{/owner}{/repo}",
|
68
|
+
"subscriptions_url": "https://api.github.com/users/jfelchner/subscriptions",
|
69
|
+
"organizations_url": "https://api.github.com/users/jfelchner/orgs",
|
70
|
+
"repos_url": "https://api.github.com/users/jfelchner/repos",
|
71
|
+
"events_url": "https://api.github.com/users/jfelchner/events{/privacy}",
|
72
|
+
"received_events_url": "https://api.github.com/users/jfelchner/received_events",
|
73
|
+
"type": "User",
|
74
|
+
"site_admin": false
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"milestone": null,
|
78
|
+
"commits_url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6/commits",
|
79
|
+
"review_comments_url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6/comments",
|
80
|
+
"review_comment_url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/comments{/number}",
|
81
|
+
"comments_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/6/comments",
|
82
|
+
"statuses_url": "https://api.github.com/repos/RealSavvy/realsavvy/statuses/0a26d368cb82583c76cb7d6afcd9fe9f54fa57b0",
|
83
|
+
"head": {
|
84
|
+
"label": "RealSavvy:ml-glux-edits",
|
85
|
+
"ref": "ml-glux-edits",
|
86
|
+
"sha": "0a26d368cb82583c76cb7d6afcd9fe9f54fa57b0",
|
87
|
+
"user": {
|
88
|
+
"login": "RealSavvy",
|
89
|
+
"id": 9361488,
|
90
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/9361488?v=3",
|
91
|
+
"gravatar_id": "",
|
92
|
+
"url": "https://api.github.com/users/RealSavvy",
|
93
|
+
"html_url": "https://github.com/RealSavvy",
|
94
|
+
"followers_url": "https://api.github.com/users/RealSavvy/followers",
|
95
|
+
"following_url": "https://api.github.com/users/RealSavvy/following{/other_user}",
|
96
|
+
"gists_url": "https://api.github.com/users/RealSavvy/gists{/gist_id}",
|
97
|
+
"starred_url": "https://api.github.com/users/RealSavvy/starred{/owner}{/repo}",
|
98
|
+
"subscriptions_url": "https://api.github.com/users/RealSavvy/subscriptions",
|
99
|
+
"organizations_url": "https://api.github.com/users/RealSavvy/orgs",
|
100
|
+
"repos_url": "https://api.github.com/users/RealSavvy/repos",
|
101
|
+
"events_url": "https://api.github.com/users/RealSavvy/events{/privacy}",
|
102
|
+
"received_events_url": "https://api.github.com/users/RealSavvy/received_events",
|
103
|
+
"type": "Organization",
|
104
|
+
"site_admin": false
|
105
|
+
},
|
106
|
+
"repo": {
|
107
|
+
"id": 25619360,
|
108
|
+
"name": "realsavvy",
|
109
|
+
"full_name": "RealSavvy/realsavvy",
|
110
|
+
"owner": {
|
111
|
+
"login": "RealSavvy",
|
112
|
+
"id": 9361488,
|
113
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/9361488?v=3",
|
114
|
+
"gravatar_id": "",
|
115
|
+
"url": "https://api.github.com/users/RealSavvy",
|
116
|
+
"html_url": "https://github.com/RealSavvy",
|
117
|
+
"followers_url": "https://api.github.com/users/RealSavvy/followers",
|
118
|
+
"following_url": "https://api.github.com/users/RealSavvy/following{/other_user}",
|
119
|
+
"gists_url": "https://api.github.com/users/RealSavvy/gists{/gist_id}",
|
120
|
+
"starred_url": "https://api.github.com/users/RealSavvy/starred{/owner}{/repo}",
|
121
|
+
"subscriptions_url": "https://api.github.com/users/RealSavvy/subscriptions",
|
122
|
+
"organizations_url": "https://api.github.com/users/RealSavvy/orgs",
|
123
|
+
"repos_url": "https://api.github.com/users/RealSavvy/repos",
|
124
|
+
"events_url": "https://api.github.com/users/RealSavvy/events{/privacy}",
|
125
|
+
"received_events_url": "https://api.github.com/users/RealSavvy/received_events",
|
126
|
+
"type": "Organization",
|
127
|
+
"site_admin": false
|
128
|
+
},
|
129
|
+
"private": true,
|
130
|
+
"html_url": "https://github.com/RealSavvy/realsavvy",
|
131
|
+
"description": "RealSavvy Rails + Ember App",
|
132
|
+
"fork": false,
|
133
|
+
"url": "https://api.github.com/repos/RealSavvy/realsavvy",
|
134
|
+
"forks_url": "https://api.github.com/repos/RealSavvy/realsavvy/forks",
|
135
|
+
"keys_url": "https://api.github.com/repos/RealSavvy/realsavvy/keys{/key_id}",
|
136
|
+
"collaborators_url": "https://api.github.com/repos/RealSavvy/realsavvy/collaborators{/collaborator}",
|
137
|
+
"teams_url": "https://api.github.com/repos/RealSavvy/realsavvy/teams",
|
138
|
+
"hooks_url": "https://api.github.com/repos/RealSavvy/realsavvy/hooks",
|
139
|
+
"issue_events_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/events{/number}",
|
140
|
+
"events_url": "https://api.github.com/repos/RealSavvy/realsavvy/events",
|
141
|
+
"assignees_url": "https://api.github.com/repos/RealSavvy/realsavvy/assignees{/user}",
|
142
|
+
"branches_url": "https://api.github.com/repos/RealSavvy/realsavvy/branches{/branch}",
|
143
|
+
"tags_url": "https://api.github.com/repos/RealSavvy/realsavvy/tags",
|
144
|
+
"blobs_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/blobs{/sha}",
|
145
|
+
"git_tags_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/tags{/sha}",
|
146
|
+
"git_refs_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/refs{/sha}",
|
147
|
+
"trees_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/trees{/sha}",
|
148
|
+
"statuses_url": "https://api.github.com/repos/RealSavvy/realsavvy/statuses/{sha}",
|
149
|
+
"languages_url": "https://api.github.com/repos/RealSavvy/realsavvy/languages",
|
150
|
+
"stargazers_url": "https://api.github.com/repos/RealSavvy/realsavvy/stargazers",
|
151
|
+
"contributors_url": "https://api.github.com/repos/RealSavvy/realsavvy/contributors",
|
152
|
+
"subscribers_url": "https://api.github.com/repos/RealSavvy/realsavvy/subscribers",
|
153
|
+
"subscription_url": "https://api.github.com/repos/RealSavvy/realsavvy/subscription",
|
154
|
+
"commits_url": "https://api.github.com/repos/RealSavvy/realsavvy/commits{/sha}",
|
155
|
+
"git_commits_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/commits{/sha}",
|
156
|
+
"comments_url": "https://api.github.com/repos/RealSavvy/realsavvy/comments{/number}",
|
157
|
+
"issue_comment_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/comments{/number}",
|
158
|
+
"contents_url": "https://api.github.com/repos/RealSavvy/realsavvy/contents/{+path}",
|
159
|
+
"compare_url": "https://api.github.com/repos/RealSavvy/realsavvy/compare/{base}...{head}",
|
160
|
+
"merges_url": "https://api.github.com/repos/RealSavvy/realsavvy/merges",
|
161
|
+
"archive_url": "https://api.github.com/repos/RealSavvy/realsavvy/{archive_format}{/ref}",
|
162
|
+
"downloads_url": "https://api.github.com/repos/RealSavvy/realsavvy/downloads",
|
163
|
+
"issues_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues{/number}",
|
164
|
+
"pulls_url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls{/number}",
|
165
|
+
"milestones_url": "https://api.github.com/repos/RealSavvy/realsavvy/milestones{/number}",
|
166
|
+
"notifications_url": "https://api.github.com/repos/RealSavvy/realsavvy/notifications{?since,all,participating}",
|
167
|
+
"labels_url": "https://api.github.com/repos/RealSavvy/realsavvy/labels{/name}",
|
168
|
+
"releases_url": "https://api.github.com/repos/RealSavvy/realsavvy/releases{/id}",
|
169
|
+
"deployments_url": "https://api.github.com/repos/RealSavvy/realsavvy/deployments",
|
170
|
+
"created_at": "2014-10-23T04:31:11Z",
|
171
|
+
"updated_at": "2016-05-25T19:24:23Z",
|
172
|
+
"pushed_at": "2016-10-13T19:12:34Z",
|
173
|
+
"git_url": "git://github.com/RealSavvy/realsavvy.git",
|
174
|
+
"ssh_url": "git@github.com:RealSavvy/realsavvy.git",
|
175
|
+
"clone_url": "https://github.com/RealSavvy/realsavvy.git",
|
176
|
+
"svn_url": "https://github.com/RealSavvy/realsavvy",
|
177
|
+
"homepage": "http://realsavvy.com",
|
178
|
+
"size": 24438,
|
179
|
+
"stargazers_count": 0,
|
180
|
+
"watchers_count": 0,
|
181
|
+
"language": "Ruby",
|
182
|
+
"has_issues": true,
|
183
|
+
"has_downloads": true,
|
184
|
+
"has_wiki": true,
|
185
|
+
"has_pages": false,
|
186
|
+
"forks_count": 0,
|
187
|
+
"mirror_url": null,
|
188
|
+
"open_issues_count": 5,
|
189
|
+
"forks": 0,
|
190
|
+
"open_issues": 5,
|
191
|
+
"watchers": 0,
|
192
|
+
"default_branch": "master"
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"base": {
|
196
|
+
"label": "RealSavvy:master",
|
197
|
+
"ref": "master",
|
198
|
+
"sha": "8397cbc45ce482b6d9b66b7a401e370073b93b36",
|
199
|
+
"user": {
|
200
|
+
"login": "RealSavvy",
|
201
|
+
"id": 9361488,
|
202
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/9361488?v=3",
|
203
|
+
"gravatar_id": "",
|
204
|
+
"url": "https://api.github.com/users/RealSavvy",
|
205
|
+
"html_url": "https://github.com/RealSavvy",
|
206
|
+
"followers_url": "https://api.github.com/users/RealSavvy/followers",
|
207
|
+
"following_url": "https://api.github.com/users/RealSavvy/following{/other_user}",
|
208
|
+
"gists_url": "https://api.github.com/users/RealSavvy/gists{/gist_id}",
|
209
|
+
"starred_url": "https://api.github.com/users/RealSavvy/starred{/owner}{/repo}",
|
210
|
+
"subscriptions_url": "https://api.github.com/users/RealSavvy/subscriptions",
|
211
|
+
"organizations_url": "https://api.github.com/users/RealSavvy/orgs",
|
212
|
+
"repos_url": "https://api.github.com/users/RealSavvy/repos",
|
213
|
+
"events_url": "https://api.github.com/users/RealSavvy/events{/privacy}",
|
214
|
+
"received_events_url": "https://api.github.com/users/RealSavvy/received_events",
|
215
|
+
"type": "Organization",
|
216
|
+
"site_admin": false
|
217
|
+
},
|
218
|
+
"repo": {
|
219
|
+
"id": 25619360,
|
220
|
+
"name": "realsavvy",
|
221
|
+
"full_name": "RealSavvy/realsavvy",
|
222
|
+
"owner": {
|
223
|
+
"login": "RealSavvy",
|
224
|
+
"id": 9361488,
|
225
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/9361488?v=3",
|
226
|
+
"gravatar_id": "",
|
227
|
+
"url": "https://api.github.com/users/RealSavvy",
|
228
|
+
"html_url": "https://github.com/RealSavvy",
|
229
|
+
"followers_url": "https://api.github.com/users/RealSavvy/followers",
|
230
|
+
"following_url": "https://api.github.com/users/RealSavvy/following{/other_user}",
|
231
|
+
"gists_url": "https://api.github.com/users/RealSavvy/gists{/gist_id}",
|
232
|
+
"starred_url": "https://api.github.com/users/RealSavvy/starred{/owner}{/repo}",
|
233
|
+
"subscriptions_url": "https://api.github.com/users/RealSavvy/subscriptions",
|
234
|
+
"organizations_url": "https://api.github.com/users/RealSavvy/orgs",
|
235
|
+
"repos_url": "https://api.github.com/users/RealSavvy/repos",
|
236
|
+
"events_url": "https://api.github.com/users/RealSavvy/events{/privacy}",
|
237
|
+
"received_events_url": "https://api.github.com/users/RealSavvy/received_events",
|
238
|
+
"type": "Organization",
|
239
|
+
"site_admin": false
|
240
|
+
},
|
241
|
+
"private": true,
|
242
|
+
"html_url": "https://github.com/RealSavvy/realsavvy",
|
243
|
+
"description": "RealSavvy Rails + Ember App",
|
244
|
+
"fork": false,
|
245
|
+
"url": "https://api.github.com/repos/RealSavvy/realsavvy",
|
246
|
+
"forks_url": "https://api.github.com/repos/RealSavvy/realsavvy/forks",
|
247
|
+
"keys_url": "https://api.github.com/repos/RealSavvy/realsavvy/keys{/key_id}",
|
248
|
+
"collaborators_url": "https://api.github.com/repos/RealSavvy/realsavvy/collaborators{/collaborator}",
|
249
|
+
"teams_url": "https://api.github.com/repos/RealSavvy/realsavvy/teams",
|
250
|
+
"hooks_url": "https://api.github.com/repos/RealSavvy/realsavvy/hooks",
|
251
|
+
"issue_events_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/events{/number}",
|
252
|
+
"events_url": "https://api.github.com/repos/RealSavvy/realsavvy/events",
|
253
|
+
"assignees_url": "https://api.github.com/repos/RealSavvy/realsavvy/assignees{/user}",
|
254
|
+
"branches_url": "https://api.github.com/repos/RealSavvy/realsavvy/branches{/branch}",
|
255
|
+
"tags_url": "https://api.github.com/repos/RealSavvy/realsavvy/tags",
|
256
|
+
"blobs_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/blobs{/sha}",
|
257
|
+
"git_tags_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/tags{/sha}",
|
258
|
+
"git_refs_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/refs{/sha}",
|
259
|
+
"trees_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/trees{/sha}",
|
260
|
+
"statuses_url": "https://api.github.com/repos/RealSavvy/realsavvy/statuses/{sha}",
|
261
|
+
"languages_url": "https://api.github.com/repos/RealSavvy/realsavvy/languages",
|
262
|
+
"stargazers_url": "https://api.github.com/repos/RealSavvy/realsavvy/stargazers",
|
263
|
+
"contributors_url": "https://api.github.com/repos/RealSavvy/realsavvy/contributors",
|
264
|
+
"subscribers_url": "https://api.github.com/repos/RealSavvy/realsavvy/subscribers",
|
265
|
+
"subscription_url": "https://api.github.com/repos/RealSavvy/realsavvy/subscription",
|
266
|
+
"commits_url": "https://api.github.com/repos/RealSavvy/realsavvy/commits{/sha}",
|
267
|
+
"git_commits_url": "https://api.github.com/repos/RealSavvy/realsavvy/git/commits{/sha}",
|
268
|
+
"comments_url": "https://api.github.com/repos/RealSavvy/realsavvy/comments{/number}",
|
269
|
+
"issue_comment_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues/comments{/number}",
|
270
|
+
"contents_url": "https://api.github.com/repos/RealSavvy/realsavvy/contents/{+path}",
|
271
|
+
"compare_url": "https://api.github.com/repos/RealSavvy/realsavvy/compare/{base}...{head}",
|
272
|
+
"merges_url": "https://api.github.com/repos/RealSavvy/realsavvy/merges",
|
273
|
+
"archive_url": "https://api.github.com/repos/RealSavvy/realsavvy/{archive_format}{/ref}",
|
274
|
+
"downloads_url": "https://api.github.com/repos/RealSavvy/realsavvy/downloads",
|
275
|
+
"issues_url": "https://api.github.com/repos/RealSavvy/realsavvy/issues{/number}",
|
276
|
+
"pulls_url": "https://api.github.com/repos/RealSavvy/realsavvy/pulls{/number}",
|
277
|
+
"milestones_url": "https://api.github.com/repos/RealSavvy/realsavvy/milestones{/number}",
|
278
|
+
"notifications_url": "https://api.github.com/repos/RealSavvy/realsavvy/notifications{?since,all,participating}",
|
279
|
+
"labels_url": "https://api.github.com/repos/RealSavvy/realsavvy/labels{/name}",
|
280
|
+
"releases_url": "https://api.github.com/repos/RealSavvy/realsavvy/releases{/id}",
|
281
|
+
"deployments_url": "https://api.github.com/repos/RealSavvy/realsavvy/deployments",
|
282
|
+
"created_at": "2014-10-23T04:31:11Z",
|
283
|
+
"updated_at": "2016-05-25T19:24:23Z",
|
284
|
+
"pushed_at": "2016-10-13T19:12:34Z",
|
285
|
+
"git_url": "git://github.com/RealSavvy/realsavvy.git",
|
286
|
+
"ssh_url": "git@github.com:RealSavvy/realsavvy.git",
|
287
|
+
"clone_url": "https://github.com/RealSavvy/realsavvy.git",
|
288
|
+
"svn_url": "https://github.com/RealSavvy/realsavvy",
|
289
|
+
"homepage": "http://realsavvy.com",
|
290
|
+
"size": 24438,
|
291
|
+
"stargazers_count": 0,
|
292
|
+
"watchers_count": 0,
|
293
|
+
"language": "Ruby",
|
294
|
+
"has_issues": true,
|
295
|
+
"has_downloads": true,
|
296
|
+
"has_wiki": true,
|
297
|
+
"has_pages": false,
|
298
|
+
"forks_count": 0,
|
299
|
+
"mirror_url": null,
|
300
|
+
"open_issues_count": 5,
|
301
|
+
"forks": 0,
|
302
|
+
"open_issues": 5,
|
303
|
+
"watchers": 0,
|
304
|
+
"default_branch": "master"
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"_links": {
|
308
|
+
"self": {
|
309
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6"
|
310
|
+
},
|
311
|
+
"html": {
|
312
|
+
"href": "https://github.com/RealSavvy/realsavvy/pull/6"
|
313
|
+
},
|
314
|
+
"issue": {
|
315
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/issues/6"
|
316
|
+
},
|
317
|
+
"comments": {
|
318
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/issues/6/comments"
|
319
|
+
},
|
320
|
+
"review_comments": {
|
321
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6/comments"
|
322
|
+
},
|
323
|
+
"review_comment": {
|
324
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/comments{/number}"
|
325
|
+
},
|
326
|
+
"commits": {
|
327
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/pulls/6/commits"
|
328
|
+
},
|
329
|
+
"statuses": {
|
330
|
+
"href": "https://api.github.com/repos/RealSavvy/realsavvy/statuses/0a26d368cb82583c76cb7d6afcd9fe9f54fa57b0"
|
331
|
+
}
|
332
|
+
},
|
333
|
+
"merged": true,
|
334
|
+
"mergeable": null,
|
335
|
+
"mergeable_state": "unknown",
|
336
|
+
"merged_by": {
|
337
|
+
"login": "mswezey",
|
338
|
+
"id": 186368,
|
339
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/186368?v=3",
|
340
|
+
"gravatar_id": "",
|
341
|
+
"url": "https://api.github.com/users/mswezey",
|
342
|
+
"html_url": "https://github.com/mswezey",
|
343
|
+
"followers_url": "https://api.github.com/users/mswezey/followers",
|
344
|
+
"following_url": "https://api.github.com/users/mswezey/following{/other_user}",
|
345
|
+
"gists_url": "https://api.github.com/users/mswezey/gists{/gist_id}",
|
346
|
+
"starred_url": "https://api.github.com/users/mswezey/starred{/owner}{/repo}",
|
347
|
+
"subscriptions_url": "https://api.github.com/users/mswezey/subscriptions",
|
348
|
+
"organizations_url": "https://api.github.com/users/mswezey/orgs",
|
349
|
+
"repos_url": "https://api.github.com/users/mswezey/repos",
|
350
|
+
"events_url": "https://api.github.com/users/mswezey/events{/privacy}",
|
351
|
+
"received_events_url": "https://api.github.com/users/mswezey/received_events",
|
352
|
+
"type": "User",
|
353
|
+
"site_admin": false
|
354
|
+
},
|
355
|
+
"comments": 0,
|
356
|
+
"review_comments": 0,
|
357
|
+
"commits": 1,
|
358
|
+
"additions": 193,
|
359
|
+
"deletions": 37,
|
360
|
+
"changed_files": 3
|
361
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'horn_of_plenty/adapters/github/collections/card'
|
3
|
+
require 'rspeckled/spec_helpers/rspeckled'
|
4
|
+
|
5
|
+
module HornOfPlenty
|
6
|
+
module Adapters
|
7
|
+
module Github
|
8
|
+
module Collections
|
9
|
+
describe Card do
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'horn_of_plenty/adapters/github/error'
|
3
|
+
require 'rspeckled/spec_helpers/rspeckled'
|
4
|
+
|
5
|
+
module HornOfPlenty
|
6
|
+
module Adapters
|
7
|
+
module Github
|
8
|
+
describe Error do
|
9
|
+
it 'can understand when there is a bad request' do
|
10
|
+
error = Error.lookup(400, 'This is the error message.')
|
11
|
+
|
12
|
+
expect(error).to be_an Errors::BadRequest
|
13
|
+
expect(error.message).to eql "There was a general issue with your request.\n" \
|
14
|
+
"This is the error message."
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'can understand when there is an authentication failure' do
|
18
|
+
error = Error.lookup(401, 'This is the error message.')
|
19
|
+
|
20
|
+
expect(error).to be_an Errors::AuthenticationFailure
|
21
|
+
expect(error.message).to eql "There was a problem with the credentials you " \
|
22
|
+
"provided.\nThis is the error message."
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'can understand when there is a server error' do
|
26
|
+
error = Error.lookup(500, 'This is the error message.')
|
27
|
+
|
28
|
+
expect(error).to be_an Errors::ServerError
|
29
|
+
expect(error.message).to eql "Something went wrong on the server.\n" \
|
30
|
+
"This is the error message."
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'json'
|
3
|
+
require 'horn_of_plenty/adapters/github/parsers/board'
|
4
|
+
require 'rspeckled/spec_helpers/rspeckled'
|
5
|
+
|
6
|
+
module HornOfPlenty
|
7
|
+
module Adapters
|
8
|
+
module Github
|
9
|
+
module Parsers
|
10
|
+
describe Board do
|
11
|
+
let(:board_json_response_path) { 'spec/fixtures/responses/board_github.json' }
|
12
|
+
let(:board_json_response_file) { Pathname.pwd.join(board_json_response_path) }
|
13
|
+
let(:board_json_response_string) { board_json_response_file.read }
|
14
|
+
let(:board_json) { JSON.load(board_json_response_string) }
|
15
|
+
|
16
|
+
it 'can convert a Github JSON board response to a Board' do
|
17
|
+
board = Board.to_model(board_json)
|
18
|
+
|
19
|
+
# rubocop:disable Metrics/LineLength
|
20
|
+
expect(board).to be_a HornOfPlenty::Models::Board
|
21
|
+
expect(board.id).to eql '1'
|
22
|
+
expect(board.author_id).to eql 'jfelchner'
|
23
|
+
expect(board.title).to eql 'Main'
|
24
|
+
expect(board.description).to eql 'Hello'
|
25
|
+
expect(board.created_at).to eql Time.utc(2016, 10, 13, 2, 49, 33)
|
26
|
+
expect(board.updated_at).to eql Time.utc(2016, 10, 13, 2, 51, 10)
|
27
|
+
# rubocop:enable Metrics/LineLength
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'has access to all of the methods needed to generate the hash' do
|
31
|
+
board = Board.to_model(board_json)
|
32
|
+
|
33
|
+
expect { board.to_h }.not_to raise_error
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|