cline 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/cline.gemspec +8 -10
- data/lib/cline/collectors/feed.rb +63 -0
- data/lib/cline/collectors/github.rb +139 -0
- data/lib/cline/collectors.rb +9 -65
- data/lib/cline/command.rb +15 -6
- data/lib/cline/notification.rb +4 -0
- data/lib/cline/out_streams.rb +13 -6
- data/lib/cline/version.rb +1 -1
- data/spec/fixtures/github/commit_comment_event.json +43 -0
- data/spec/fixtures/github/create_event.json +25 -0
- data/spec/fixtures/github/delete_event.json +26 -0
- data/spec/fixtures/github/follow_event.json +41 -0
- data/spec/fixtures/github/fork_event.json +55 -0
- data/spec/fixtures/github/gist_event.json +43 -0
- data/spec/fixtures/github/gollum_event.json +34 -0
- data/spec/fixtures/github/issue_comment_event.json +69 -0
- data/spec/fixtures/github/issues_event.json +59 -0
- data/spec/fixtures/github/member_event.json +29 -0
- data/spec/fixtures/github/pull_request_event.json +162 -0
- data/spec/fixtures/github/push_event.json +39 -0
- data/spec/fixtures/github/watch_event.json +22 -0
- data/spec/lib/collectors_spec.rb +115 -0
- metadata +74 -32
@@ -0,0 +1,69 @@
|
|
1
|
+
{
|
2
|
+
"type": "IssueCommentEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"gravatar_id": "d41d8cd98f00b204e9800998ecf8427e",
|
6
|
+
"id": 845682,
|
7
|
+
"url": "https://api.github.com/orgs/",
|
8
|
+
"login": "pry"
|
9
|
+
},
|
10
|
+
"created_at": "2011-11-12T02:23:27Z",
|
11
|
+
"payload": {
|
12
|
+
"comment": {
|
13
|
+
"created_at": "2011-11-12T02:23:26Z",
|
14
|
+
"body": "looks pretty interesting! checking it out now, thanks",
|
15
|
+
"updated_at": "2011-11-12T02:23:26Z",
|
16
|
+
"url": "https://api.github.com/repos/pry/pry/issues/comments/2715602",
|
17
|
+
"id": 2715602,
|
18
|
+
"user": {
|
19
|
+
"avatar_url": "https://secure.gravatar.com/avatar/890f7065d081f3a735362b6a1ca74b92?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
20
|
+
"gravatar_id": "890f7065d081f3a735362b6a1ca74b92",
|
21
|
+
"url": "https://api.github.com/users/banister",
|
22
|
+
"id": 17518,
|
23
|
+
"login": "banister"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"action": "created",
|
27
|
+
"issue": {
|
28
|
+
"number": 335,
|
29
|
+
"pull_request": {
|
30
|
+
"diff_url": "https://github.com/pry/pry/pull/335.diff",
|
31
|
+
"patch_url": "https://github.com/pry/pry/pull/335.patch",
|
32
|
+
"html_url": "https://github.com/pry/pry/pull/335"
|
33
|
+
},
|
34
|
+
"created_at": "2011-11-11T15:44:41Z",
|
35
|
+
"title": "Add man page.",
|
36
|
+
"comments": 1,
|
37
|
+
"body": "",
|
38
|
+
"updated_at": "2011-11-12T02:23:26Z",
|
39
|
+
"url": "https://api.github.com/repos/pry/pry/issues/335",
|
40
|
+
"id": 2210461,
|
41
|
+
"assignee": null,
|
42
|
+
"milestone": null,
|
43
|
+
"closed_at": null,
|
44
|
+
"user": {
|
45
|
+
"avatar_url": "https://secure.gravatar.com/avatar/ba5e57a46895592f61b9763d14da7646?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
46
|
+
"gravatar_id": "ba5e57a46895592f61b9763d14da7646",
|
47
|
+
"url": "https://api.github.com/users/rondale-sc",
|
48
|
+
"id": 75710,
|
49
|
+
"login": "rondale-sc"
|
50
|
+
},
|
51
|
+
"html_url": "https://github.com/pry/pry/issues/335",
|
52
|
+
"labels": [
|
53
|
+
|
54
|
+
],
|
55
|
+
"state": "open"
|
56
|
+
}
|
57
|
+
},
|
58
|
+
"repo": {
|
59
|
+
"id": 1145832,
|
60
|
+
"url": "https://api.github.com/repos/pry/pry",
|
61
|
+
"name": "pry/pry"
|
62
|
+
},
|
63
|
+
"actor": {
|
64
|
+
"gravatar_id": "890f7065d081f3a735362b6a1ca74b92",
|
65
|
+
"id": 17518,
|
66
|
+
"url": "https://api.github.com/users/banister",
|
67
|
+
"login": "banister"
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"type": "IssuesEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"gravatar_id": "d41d8cd98f00b204e9800998ecf8427e",
|
6
|
+
"id": 845682,
|
7
|
+
"url": "https://api.github.com/orgs/",
|
8
|
+
"login": "pry"
|
9
|
+
},
|
10
|
+
"created_at": "2011-11-12T03:32:42Z",
|
11
|
+
"payload": {
|
12
|
+
"action": "closed",
|
13
|
+
"issue": {
|
14
|
+
"number": 336,
|
15
|
+
"pull_request": {
|
16
|
+
"diff_url": null,
|
17
|
+
"patch_url": null,
|
18
|
+
"html_url": null
|
19
|
+
},
|
20
|
+
"created_at": "2011-11-12T03:04:58Z",
|
21
|
+
"title": "wherami hook should use run_command",
|
22
|
+
"comments": 1,
|
23
|
+
"body": "currently using process_line, but should use `_pry_.run_command` instead",
|
24
|
+
"updated_at": "2011-11-12T03:32:40Z",
|
25
|
+
"url": "https://api.github.com/repos/pry/pry/issues/336",
|
26
|
+
"id": 2215683,
|
27
|
+
"assignee": null,
|
28
|
+
"milestone": null,
|
29
|
+
"closed_at": "2011-11-12T03:32:40Z",
|
30
|
+
"labels": [
|
31
|
+
{
|
32
|
+
"name": "refactor",
|
33
|
+
"url": "https://api.github.com/repos/pry/pry/labels/refactor",
|
34
|
+
"color": "c235de"
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"html_url": "https://github.com/pry/pry/issues/336",
|
38
|
+
"user": {
|
39
|
+
"gravatar_id": "890f7065d081f3a735362b6a1ca74b92",
|
40
|
+
"avatar_url": "https://secure.gravatar.com/avatar/890f7065d081f3a735362b6a1ca74b92?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
41
|
+
"url": "https://api.github.com/users/banister",
|
42
|
+
"id": 17518,
|
43
|
+
"login": "banister"
|
44
|
+
},
|
45
|
+
"state": "closed"
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"repo": {
|
49
|
+
"id": 1145832,
|
50
|
+
"url": "https://api.github.com/repos/pry/pry",
|
51
|
+
"name": "pry/pry"
|
52
|
+
},
|
53
|
+
"actor": {
|
54
|
+
"gravatar_id": "46d1ebbb28ce0f4a8f2c77b6d3d95829",
|
55
|
+
"id": 94272,
|
56
|
+
"url": "https://api.github.com/users/ConradIrwin",
|
57
|
+
"login": "ConradIrwin"
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"type": "MemberEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"url": "https://api.github.com/orgs/"
|
6
|
+
},
|
7
|
+
"created_at": "2011-11-11T22:04:37Z",
|
8
|
+
"payload": {
|
9
|
+
"action": "added",
|
10
|
+
"member": {
|
11
|
+
"avatar_url": "https://secure.gravatar.com/avatar/bc56e3ab1109d0ac3322d9cdea2bd52c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
12
|
+
"gravatar_id": "bc56e3ab1109d0ac3322d9cdea2bd52c",
|
13
|
+
"url": "https://api.github.com/users/shayarnett",
|
14
|
+
"id": 236,
|
15
|
+
"login": "shayarnett"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"repo": {
|
19
|
+
"id": 716806,
|
20
|
+
"url": "https://api.github.com/repos/paulelliott/fabrication",
|
21
|
+
"name": "paulelliott/fabrication"
|
22
|
+
},
|
23
|
+
"actor": {
|
24
|
+
"gravatar_id": "98292675163b09c369e097cbeef92a10",
|
25
|
+
"id": 58612,
|
26
|
+
"url": "https://api.github.com/users/paulelliott",
|
27
|
+
"login": "paulelliott"
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,162 @@
|
|
1
|
+
{
|
2
|
+
"type": "PullRequestEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"gravatar_id": "253768044712357787be0f6a3a53cc66",
|
6
|
+
"id": 639823,
|
7
|
+
"url": "https://api.github.com/orgs/",
|
8
|
+
"login": "travis-ci"
|
9
|
+
},
|
10
|
+
"created_at": "2011-11-12T02:11:41Z",
|
11
|
+
"payload": {
|
12
|
+
"number": 307,
|
13
|
+
"pull_request": {
|
14
|
+
"head": {
|
15
|
+
"label": "ddollar:webhooks-typo",
|
16
|
+
"repo": {
|
17
|
+
"name": "travis-ci",
|
18
|
+
"master_branch": null,
|
19
|
+
"size": 116,
|
20
|
+
"created_at": "2011-11-12T02:04:46Z",
|
21
|
+
"clone_url": "https://github.com/ddollar/travis-ci.git",
|
22
|
+
"private": false,
|
23
|
+
"updated_at": "2011-11-12T02:05:25Z",
|
24
|
+
"watchers": 1,
|
25
|
+
"url": "https://api.github.com/repos/ddollar/travis-ci",
|
26
|
+
"fork": true,
|
27
|
+
"git_url": "git://github.com/ddollar/travis-ci.git",
|
28
|
+
"language": "JavaScript",
|
29
|
+
"ssh_url": "git@github.com:ddollar/travis-ci.git",
|
30
|
+
"id": 2759819,
|
31
|
+
"pushed_at": "2011-11-12T02:05:23Z",
|
32
|
+
"svn_url": "https://svn.github.com/ddollar/travis-ci",
|
33
|
+
"open_issues": 0,
|
34
|
+
"homepage": "http://travis-ci.org",
|
35
|
+
"description": "A distributed build system for the open source community. See also github.com/travis-ci/travis-worker, github.com/travis-ci/travis-ci.github.com and github.com/travis-ci/travis-cookbooks",
|
36
|
+
"forks": 0,
|
37
|
+
"html_url": "https://github.com/ddollar/travis-ci",
|
38
|
+
"owner": {
|
39
|
+
"gravatar_id": "d7210ed93db93fbfa3de0c2215d83b9a",
|
40
|
+
"avatar_url": "https://secure.gravatar.com/avatar/d7210ed93db93fbfa3de0c2215d83b9a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
41
|
+
"url": "https://api.github.com/users/ddollar",
|
42
|
+
"id": 3308,
|
43
|
+
"login": "ddollar"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"sha": "2710be76d247b9ad33ba2b6a3b89b2a02d86e477",
|
47
|
+
"ref": "webhooks-typo",
|
48
|
+
"user": {
|
49
|
+
"gravatar_id": "d7210ed93db93fbfa3de0c2215d83b9a",
|
50
|
+
"avatar_url": "https://secure.gravatar.com/avatar/d7210ed93db93fbfa3de0c2215d83b9a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
51
|
+
"url": "https://api.github.com/users/ddollar",
|
52
|
+
"id": 3308,
|
53
|
+
"login": "ddollar"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"issue_url": "https://github.com/travis-ci/travis-ci/issues/307",
|
57
|
+
"number": 307,
|
58
|
+
"merged_by": {
|
59
|
+
"gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
|
60
|
+
"avatar_url": "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
61
|
+
"url": "https://api.github.com/users/sferik",
|
62
|
+
"id": 10308,
|
63
|
+
"login": "sferik"
|
64
|
+
},
|
65
|
+
"changed_files": 1,
|
66
|
+
"created_at": "2011-11-12T02:05:49Z",
|
67
|
+
"merged": true,
|
68
|
+
"body": "",
|
69
|
+
"title": "fix typo in default notification rules",
|
70
|
+
"comments": 0,
|
71
|
+
"additions": 2,
|
72
|
+
"diff_url": "https://github.com/travis-ci/travis-ci/pull/307.diff",
|
73
|
+
"updated_at": "2011-11-12T02:11:41Z",
|
74
|
+
"url": "https://api.github.com/repos/travis-ci/travis-ci/pulls/307",
|
75
|
+
"_links": {
|
76
|
+
"html": {
|
77
|
+
"href": "https://github.com/travis-ci/travis-ci/pull/307"
|
78
|
+
},
|
79
|
+
"self": {
|
80
|
+
"href": "https://api.github.com/repos/travis-ci/travis-ci/pulls/307"
|
81
|
+
},
|
82
|
+
"comments": {
|
83
|
+
"href": "https://api.github.com/repos/travis-ci/travis-ci/issues/307/comments"
|
84
|
+
},
|
85
|
+
"review_comments": {
|
86
|
+
"href": "https://api.github.com/repos/travis-ci/travis-ci/pulls/307/comments"
|
87
|
+
}
|
88
|
+
},
|
89
|
+
"id": 488308,
|
90
|
+
"patch_url": "https://github.com/travis-ci/travis-ci/pull/307.patch",
|
91
|
+
"mergeable": null,
|
92
|
+
"commits": 1,
|
93
|
+
"merged_at": "2011-11-12T02:11:41Z",
|
94
|
+
"closed_at": "2011-11-12T02:11:41Z",
|
95
|
+
"html_url": "https://github.com/travis-ci/travis-ci/pull/307",
|
96
|
+
"user": {
|
97
|
+
"gravatar_id": "d7210ed93db93fbfa3de0c2215d83b9a",
|
98
|
+
"avatar_url": "https://secure.gravatar.com/avatar/d7210ed93db93fbfa3de0c2215d83b9a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
|
99
|
+
"url": "https://api.github.com/users/ddollar",
|
100
|
+
"id": 3308,
|
101
|
+
"login": "ddollar"
|
102
|
+
},
|
103
|
+
"deletions": 2,
|
104
|
+
"review_comments": 0,
|
105
|
+
"base": {
|
106
|
+
"label": "travis-ci:master",
|
107
|
+
"repo": {
|
108
|
+
"name": "travis-ci",
|
109
|
+
"master_branch": null,
|
110
|
+
"size": 864,
|
111
|
+
"created_at": "2011-02-28T06:30:40Z",
|
112
|
+
"clone_url": "https://github.com/travis-ci/travis-ci.git",
|
113
|
+
"private": false,
|
114
|
+
"updated_at": "2011-11-12T02:11:40Z",
|
115
|
+
"watchers": 812,
|
116
|
+
"url": "https://api.github.com/repos/travis-ci/travis-ci",
|
117
|
+
"fork": false,
|
118
|
+
"git_url": "git://github.com/travis-ci/travis-ci.git",
|
119
|
+
"language": "JavaScript",
|
120
|
+
"ssh_url": "git@github.com:travis-ci/travis-ci.git",
|
121
|
+
"id": 1420493,
|
122
|
+
"pushed_at": "2011-11-12T02:11:40Z",
|
123
|
+
"svn_url": "https://svn.github.com/travis-ci/travis-ci",
|
124
|
+
"open_issues": 73,
|
125
|
+
"homepage": "http://travis-ci.org",
|
126
|
+
"description": "A distributed build system for the open source community. See also github.com/travis-ci/travis-worker, github.com/travis-ci/travis-ci.github.com and github.com/travis-ci/travis-cookbooks",
|
127
|
+
"forks": 134,
|
128
|
+
"html_url": "https://github.com/travis-ci/travis-ci",
|
129
|
+
"owner": {
|
130
|
+
"gravatar_id": "253768044712357787be0f6a3a53cc66",
|
131
|
+
"avatar_url": "https://secure.gravatar.com/avatar/253768044712357787be0f6a3a53cc66?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png",
|
132
|
+
"url": "https://api.github.com/users/travis-ci",
|
133
|
+
"id": 639823,
|
134
|
+
"login": "travis-ci"
|
135
|
+
}
|
136
|
+
},
|
137
|
+
"sha": "077c9b1a4e91b7634e6a6f70ac6835605ad88dd1",
|
138
|
+
"ref": "master",
|
139
|
+
"user": {
|
140
|
+
"gravatar_id": "253768044712357787be0f6a3a53cc66",
|
141
|
+
"avatar_url": "https://secure.gravatar.com/avatar/253768044712357787be0f6a3a53cc66?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png",
|
142
|
+
"url": "https://api.github.com/users/travis-ci",
|
143
|
+
"id": 639823,
|
144
|
+
"login": "travis-ci"
|
145
|
+
}
|
146
|
+
},
|
147
|
+
"state": "closed"
|
148
|
+
},
|
149
|
+
"action": "closed"
|
150
|
+
},
|
151
|
+
"repo": {
|
152
|
+
"id": 1420493,
|
153
|
+
"url": "https://api.github.com/repos/travis-ci/travis-ci",
|
154
|
+
"name": "travis-ci/travis-ci"
|
155
|
+
},
|
156
|
+
"actor": {
|
157
|
+
"gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
|
158
|
+
"id": 10308,
|
159
|
+
"url": "https://api.github.com/users/sferik",
|
160
|
+
"login": "sferik"
|
161
|
+
}
|
162
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"type": "PushEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"gravatar_id": "253768044712357787be0f6a3a53cc66",
|
6
|
+
"id": 639823,
|
7
|
+
"url": "https://api.github.com/orgs/",
|
8
|
+
"login": "travis-ci"
|
9
|
+
},
|
10
|
+
"created_at": "2011-11-12T02:36:16Z",
|
11
|
+
"payload": {
|
12
|
+
"head": "3f6430ce57b780056318373878a12a1fa10b8c5e",
|
13
|
+
"size": 1,
|
14
|
+
"push_id": 49718248,
|
15
|
+
"ref": "refs/heads/master",
|
16
|
+
"commits": [
|
17
|
+
{
|
18
|
+
"sha": "3f6430ce57b780056318373878a12a1fa10b8c5e",
|
19
|
+
"author": {
|
20
|
+
"name": "Erik Michaels-Ober",
|
21
|
+
"email": "sferik@gmail.com"
|
22
|
+
},
|
23
|
+
"url": "https://api.github.com/repos/travis-ci/travis-ci/commits/3f6430ce57b780056318373878a12a1fa10b8c5e",
|
24
|
+
"message": "Update thin dependency to version 1.3.0"
|
25
|
+
}
|
26
|
+
]
|
27
|
+
},
|
28
|
+
"repo": {
|
29
|
+
"id": 1420493,
|
30
|
+
"url": "https://api.github.com/repos/travis-ci/travis-ci",
|
31
|
+
"name": "travis-ci/travis-ci"
|
32
|
+
},
|
33
|
+
"actor": {
|
34
|
+
"gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
|
35
|
+
"id": 10308,
|
36
|
+
"url": "https://api.github.com/users/sferik",
|
37
|
+
"login": "sferik"
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"type": "WatchEvent",
|
3
|
+
"public": true,
|
4
|
+
"org": {
|
5
|
+
"url": "https://api.github.com/orgs/"
|
6
|
+
},
|
7
|
+
"created_at": "2011-11-12T00:14:11Z",
|
8
|
+
"payload": {
|
9
|
+
"action": "started"
|
10
|
+
},
|
11
|
+
"repo": {
|
12
|
+
"id": 2330932,
|
13
|
+
"url": "https://api.github.com/repos/jasonm/backbone-js-on-rails-talk",
|
14
|
+
"name": "jasonm/backbone-js-on-rails-talk"
|
15
|
+
},
|
16
|
+
"actor": {
|
17
|
+
"gravatar_id": "eabad423977cfc6873b8f5df62b848a6",
|
18
|
+
"id": 12301,
|
19
|
+
"url": "https://api.github.com/users/hsbt",
|
20
|
+
"login": "hsbt"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require_relative '../spec_helper'
|
4
|
+
|
5
|
+
describe Cline::Collectors::Github do
|
6
|
+
shared_examples_for 'created_at should present from github event json' do
|
7
|
+
it { json['created_at'].should_not be_nil }
|
8
|
+
it { json['created_at'].should_not be_empty }
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '.extract_message' do
|
12
|
+
def event_json_string(name)
|
13
|
+
file = CLINE_ROOT.join('spec', 'fixtures', 'github', name)
|
14
|
+
JSON.parse(file.read)
|
15
|
+
end
|
16
|
+
|
17
|
+
subject { Cline::Collectors::Github.new('anonymous').send :extract_message, json }
|
18
|
+
|
19
|
+
context 'CommitCommentEvent' do
|
20
|
+
let(:json) { event_json_string('commit_comment_event.json') }
|
21
|
+
|
22
|
+
it { should == "CommitComment: michaelklishin https://github.com/travis-ci/travis-ci/commit/d57b3e9b83#commitcomment-712684" }
|
23
|
+
|
24
|
+
it_should_behave_like 'created_at should present from github event json'
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'CreateEvent' do
|
28
|
+
let(:json) { event_json_string('create_event.json') }
|
29
|
+
|
30
|
+
it { should == "Create: jugyo https://github.com/jugyo/unicolor" }
|
31
|
+
|
32
|
+
it_should_behave_like 'created_at should present from github event json'
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'FollowEvent' do
|
36
|
+
let(:json) { event_json_string('follow_event.json') }
|
37
|
+
|
38
|
+
it { should == "Follow: miural https://github.com/amachang" }
|
39
|
+
|
40
|
+
it_should_behave_like 'created_at should present from github event json'
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'ForkEvent' do
|
44
|
+
let(:json) { event_json_string('fork_event.json') }
|
45
|
+
|
46
|
+
it { should == "Fork: tricknotes https://github.com/tricknotes/gollum" }
|
47
|
+
|
48
|
+
it_should_behave_like 'created_at should present from github event json'
|
49
|
+
end
|
50
|
+
|
51
|
+
context 'GistEvent' do
|
52
|
+
let(:json) { event_json_string('gist_event.json') }
|
53
|
+
|
54
|
+
it { should == "Gist: wtnabe create https://gist.github.com/1359990" }
|
55
|
+
|
56
|
+
it_should_behave_like 'created_at should present from github event json'
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'GollumEvent' do
|
60
|
+
let(:json) { event_json_string('gollum_event.json') }
|
61
|
+
|
62
|
+
it { should == "Gollum: banister edited https://github.com/pry/pry/wiki/State-navigation" }
|
63
|
+
|
64
|
+
it_should_behave_like 'created_at should present from github event json'
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'IssueCommentEvent' do
|
68
|
+
let(:json) { event_json_string('issue_comment_event.json') }
|
69
|
+
|
70
|
+
it { should == "IssueComment: banister created https://github.com/pry/pry/issues/335" }
|
71
|
+
|
72
|
+
it_should_behave_like 'created_at should present from github event json'
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'IssuesEvent' do
|
76
|
+
let(:json) { event_json_string('issues_event.json') }
|
77
|
+
|
78
|
+
it { should == "Issues: ConradIrwin closed https://github.com/pry/pry/issues/336" }
|
79
|
+
|
80
|
+
it_should_behave_like 'created_at should present from github event json'
|
81
|
+
end
|
82
|
+
|
83
|
+
context 'MemberEvent' do
|
84
|
+
let(:json) { event_json_string('member_event.json') }
|
85
|
+
|
86
|
+
it { should == "Member: paulelliott added https://github.com/shayarnett" }
|
87
|
+
|
88
|
+
it_should_behave_like 'created_at should present from github event json'
|
89
|
+
end
|
90
|
+
|
91
|
+
context 'PullRequestEvent' do
|
92
|
+
let(:json) { event_json_string('pull_request_event.json') }
|
93
|
+
|
94
|
+
it { should == "PullRequest: sferik closed https://github.com/travis-ci/travis-ci/pull/307" }
|
95
|
+
|
96
|
+
it_should_behave_like 'created_at should present from github event json'
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'Push' do
|
100
|
+
let(:json) { event_json_string('push_event.json') }
|
101
|
+
|
102
|
+
it { should == "Push: sferik https://github.com/travis-ci/travis-ci" }
|
103
|
+
|
104
|
+
it_should_behave_like 'created_at should present from github event json'
|
105
|
+
end
|
106
|
+
|
107
|
+
context 'WatchEvent' do
|
108
|
+
let(:json) { event_json_string('watch_event.json') }
|
109
|
+
|
110
|
+
it { should == "Watch: hsbt started https://github.com/jasonm/backbone-js-on-rails-talk" }
|
111
|
+
|
112
|
+
it_should_behave_like 'created_at should present from github event json'
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|