contribution-checker 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b53c2d214e32833f4d29bce6cb92e80aca93d8c0
4
- data.tar.gz: a9f049fffe0b7b9588d395fa6065110d9de58b6c
3
+ metadata.gz: 4c129f3407bbeb442ecd2002f9fadbca15dff589
4
+ data.tar.gz: 57559b50a1ea7bb8c15aa4358dc3ec3c8f3e2171
5
5
  SHA512:
6
- metadata.gz: cbed0c684ff3e978033a2fc042250156b286e059891589890c0dfb0626600ba38e6d1b8012bce05681fefc1fcb413cffd15d4cf9e4fb5cfaec2b208df1951304
7
- data.tar.gz: bdb16902d2c6d5210257c91ce2a9bb1647943e85e24f170ba3580abeb52084455a6b78aaccfbd82fc5eac73a5a0e507e1d082314b010565d1008c92d7989daad
6
+ metadata.gz: b3ef530dc6204ae16ff3334b495602351a3caa33102a22a34e8b2bca3b9f2f02a447b0411e83bfbacb874c617b257b03a61ee4188351e40981688801c50b4db2
7
+ data.tar.gz: d2bcc6cf147512af14a7bf8ad1ac470b1f6e2c4ac4082a180a56c6f918ab0296f9efdcc7ed323152c12d000097773f0dbb20f02ffd063b2b9403d5cb86ed0d45
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 James Dennes
1
+ Copyright (c) 2015 James Dennes
2
2
 
3
3
  MIT License
4
4
 
@@ -166,7 +166,9 @@ module ContributionChecker
166
166
  #
167
167
  # @return [Boolean]
168
168
  def user_has_starred_repo?
169
- @client.starred?(@nwo)
169
+ @client.auto_paginate = true
170
+ starred = @client.starred @user.login
171
+ starred.map { |s| s.full_name }.include? @nwo
170
172
  end
171
173
 
172
174
  # Checks whether the authenticated user is a member of the organization
@@ -1,3 +1,3 @@
1
1
  module ContributionChecker
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -64,8 +64,8 @@ describe ContributionChecker::Checker do
64
64
  to_return(json_response("default_compare.json"))
65
65
  stub_get("/user/emails").
66
66
  to_return(json_response("emails.json"))
67
- stub_get("/user/starred/jdennes/contribution-checker").
68
- to_return(:status => 404)
67
+ stub_get("/user/starred?per_page=100").
68
+ to_return(json_response("starred.json"))
69
69
  end
70
70
 
71
71
  it "returns the check result" do
@@ -107,8 +107,8 @@ describe ContributionChecker::Checker do
107
107
  to_return(json_response("gh-pages_compare.json"))
108
108
  stub_get("/user/emails").
109
109
  to_return(json_response("emails.json"))
110
- stub_get("/user/starred/jdennes/contribution-checker").
111
- to_return(:status => 404)
110
+ stub_get("/user/starred?per_page=100").
111
+ to_return(json_response("starred.json"))
112
112
  end
113
113
 
114
114
  it "returns the check result" do
@@ -150,8 +150,8 @@ describe ContributionChecker::Checker do
150
150
  to_return(json_response("gh-pages_compare.json"))
151
151
  stub_get("/user/emails").
152
152
  to_return(json_response("emails.json"))
153
- stub_get("/user/starred/jdennes/contribution-checker").
154
- to_return(:status => 404)
153
+ stub_get("/user/starred?per_page=100").
154
+ to_return(json_response("starred.json"))
155
155
  end
156
156
 
157
157
  it "returns the check result" do
@@ -193,8 +193,8 @@ describe ContributionChecker::Checker do
193
193
  to_return(:status => 404)
194
194
  stub_get("/user/emails").
195
195
  to_return(json_response("emails.json"))
196
- stub_get("/user/starred/jdennes/contribution-checker").
197
- to_return(:status => 404)
196
+ stub_get("/user/starred?per_page=100").
197
+ to_return(json_response("starred.json"))
198
198
  end
199
199
 
200
200
  it "returns the check result" do
@@ -235,8 +235,8 @@ describe ContributionChecker::Checker do
235
235
  to_return(json_response("default_compare.json"))
236
236
  stub_get("/user/emails").
237
237
  to_return(json_response("emails.json"))
238
- stub_get("/user/starred/jdennes/contribution-checker").
239
- to_return(:status => 404)
238
+ stub_get("/user/starred?per_page=100").
239
+ to_return(json_response("starred.json"))
240
240
  stub_get("/orgs/github/members/jdennes").
241
241
  to_return(:status => 204)
242
242
  end
@@ -278,8 +278,8 @@ describe ContributionChecker::Checker do
278
278
  to_return(json_response("default_compare.json"))
279
279
  stub_get("/user/emails").
280
280
  to_return(json_response("emails.json"))
281
- stub_get("/user/starred/jdennes/contribution-checker").
282
- to_return(:status => 404)
281
+ stub_get("/user/starred?per_page=100").
282
+ to_return(json_response("starred.json"))
283
283
  stub_get("/repos/jdennes/contribution-checker/forks?per_page=100").
284
284
  to_return(json_response("repo_forks.json"))
285
285
  end
@@ -321,8 +321,8 @@ describe ContributionChecker::Checker do
321
321
  to_return(json_response("default_compare.json"))
322
322
  stub_get("/user/emails").
323
323
  to_return(json_response("emails.json"))
324
- stub_get("/user/starred/someone/contribution-checker").
325
- to_return(:status => 404)
324
+ stub_get("/user/starred?per_page=100").
325
+ to_return(json_response("starred.json"))
326
326
  stub_get("/repos/jdennes/contribution-checker").
327
327
  to_return(json_response("potential_fork.json"))
328
328
  end
@@ -364,8 +364,8 @@ describe ContributionChecker::Checker do
364
364
  to_return(json_response("default_compare.json"))
365
365
  stub_get("/user/emails").
366
366
  to_return(json_response("emails.json"))
367
- stub_get("/user/starred/someone/contribution-checker").
368
- to_return(:status => 404)
367
+ stub_get("/user/starred?per_page=100").
368
+ to_return(json_response("starred.json"))
369
369
  stub_get("/repos/jdennes/contribution-checker").
370
370
  to_return(:status => 404)
371
371
  stub_get("/user/repos?per_page=100").
@@ -411,8 +411,8 @@ describe ContributionChecker::Checker do
411
411
  to_return(json_response("default_compare.json"))
412
412
  stub_get("/user/emails").
413
413
  to_return(json_response("emails.json"))
414
- stub_get("/user/starred/someone/contribution-checker").
415
- to_return(:status => 404)
414
+ stub_get("/user/starred?per_page=100").
415
+ to_return(json_response("starred.json"))
416
416
  stub_get("/repos/jdennes/contribution-checker").
417
417
  to_return(:status => 404)
418
418
  stub_get("/user/repos?per_page=100").
@@ -0,0 +1,186 @@
1
+ [
2
+ {
3
+ "id": 16283275,
4
+ "name": "geo_pattern",
5
+ "full_name": "jasonlong/geo_pattern",
6
+ "owner": {
7
+ "login": "jasonlong",
8
+ "id": 6104,
9
+ "avatar_url": "https://avatars.githubusercontent.com/u/6104?v=3",
10
+ "gravatar_id": "",
11
+ "url": "https://api.github.com/users/jasonlong",
12
+ "html_url": "https://github.com/jasonlong",
13
+ "followers_url": "https://api.github.com/users/jasonlong/followers",
14
+ "following_url": "https://api.github.com/users/jasonlong/following{/other_user}",
15
+ "gists_url": "https://api.github.com/users/jasonlong/gists{/gist_id}",
16
+ "starred_url": "https://api.github.com/users/jasonlong/starred{/owner}{/repo}",
17
+ "subscriptions_url": "https://api.github.com/users/jasonlong/subscriptions",
18
+ "organizations_url": "https://api.github.com/users/jasonlong/orgs",
19
+ "repos_url": "https://api.github.com/users/jasonlong/repos",
20
+ "events_url": "https://api.github.com/users/jasonlong/events{/privacy}",
21
+ "received_events_url": "https://api.github.com/users/jasonlong/received_events",
22
+ "type": "User",
23
+ "site_admin": true
24
+ },
25
+ "private": false,
26
+ "html_url": "https://github.com/jasonlong/geo_pattern",
27
+ "description": "Create beautiful generative geometric background images from a string.",
28
+ "fork": false,
29
+ "url": "https://api.github.com/repos/jasonlong/geo_pattern",
30
+ "forks_url": "https://api.github.com/repos/jasonlong/geo_pattern/forks",
31
+ "keys_url": "https://api.github.com/repos/jasonlong/geo_pattern/keys{/key_id}",
32
+ "collaborators_url": "https://api.github.com/repos/jasonlong/geo_pattern/collaborators{/collaborator}",
33
+ "teams_url": "https://api.github.com/repos/jasonlong/geo_pattern/teams",
34
+ "hooks_url": "https://api.github.com/repos/jasonlong/geo_pattern/hooks",
35
+ "issue_events_url": "https://api.github.com/repos/jasonlong/geo_pattern/issues/events{/number}",
36
+ "events_url": "https://api.github.com/repos/jasonlong/geo_pattern/events",
37
+ "assignees_url": "https://api.github.com/repos/jasonlong/geo_pattern/assignees{/user}",
38
+ "branches_url": "https://api.github.com/repos/jasonlong/geo_pattern/branches{/branch}",
39
+ "tags_url": "https://api.github.com/repos/jasonlong/geo_pattern/tags",
40
+ "blobs_url": "https://api.github.com/repos/jasonlong/geo_pattern/git/blobs{/sha}",
41
+ "git_tags_url": "https://api.github.com/repos/jasonlong/geo_pattern/git/tags{/sha}",
42
+ "git_refs_url": "https://api.github.com/repos/jasonlong/geo_pattern/git/refs{/sha}",
43
+ "trees_url": "https://api.github.com/repos/jasonlong/geo_pattern/git/trees{/sha}",
44
+ "statuses_url": "https://api.github.com/repos/jasonlong/geo_pattern/statuses/{sha}",
45
+ "languages_url": "https://api.github.com/repos/jasonlong/geo_pattern/languages",
46
+ "stargazers_url": "https://api.github.com/repos/jasonlong/geo_pattern/stargazers",
47
+ "contributors_url": "https://api.github.com/repos/jasonlong/geo_pattern/contributors",
48
+ "subscribers_url": "https://api.github.com/repos/jasonlong/geo_pattern/subscribers",
49
+ "subscription_url": "https://api.github.com/repos/jasonlong/geo_pattern/subscription",
50
+ "commits_url": "https://api.github.com/repos/jasonlong/geo_pattern/commits{/sha}",
51
+ "git_commits_url": "https://api.github.com/repos/jasonlong/geo_pattern/git/commits{/sha}",
52
+ "comments_url": "https://api.github.com/repos/jasonlong/geo_pattern/comments{/number}",
53
+ "issue_comment_url": "https://api.github.com/repos/jasonlong/geo_pattern/issues/comments/{number}",
54
+ "contents_url": "https://api.github.com/repos/jasonlong/geo_pattern/contents/{+path}",
55
+ "compare_url": "https://api.github.com/repos/jasonlong/geo_pattern/compare/{base}...{head}",
56
+ "merges_url": "https://api.github.com/repos/jasonlong/geo_pattern/merges",
57
+ "archive_url": "https://api.github.com/repos/jasonlong/geo_pattern/{archive_format}{/ref}",
58
+ "downloads_url": "https://api.github.com/repos/jasonlong/geo_pattern/downloads",
59
+ "issues_url": "https://api.github.com/repos/jasonlong/geo_pattern/issues{/number}",
60
+ "pulls_url": "https://api.github.com/repos/jasonlong/geo_pattern/pulls{/number}",
61
+ "milestones_url": "https://api.github.com/repos/jasonlong/geo_pattern/milestones{/number}",
62
+ "notifications_url": "https://api.github.com/repos/jasonlong/geo_pattern/notifications{?since,all,participating}",
63
+ "labels_url": "https://api.github.com/repos/jasonlong/geo_pattern/labels{/name}",
64
+ "releases_url": "https://api.github.com/repos/jasonlong/geo_pattern/releases{/id}",
65
+ "created_at": "2014-01-27T15:38:07Z",
66
+ "updated_at": "2015-01-09T22:05:40Z",
67
+ "pushed_at": "2015-01-09T22:05:40Z",
68
+ "git_url": "git://github.com/jasonlong/geo_pattern.git",
69
+ "ssh_url": "git@github.com:jasonlong/geo_pattern.git",
70
+ "clone_url": "https://github.com/jasonlong/geo_pattern.git",
71
+ "svn_url": "https://github.com/jasonlong/geo_pattern",
72
+ "homepage": "",
73
+ "size": 1885,
74
+ "stargazers_count": 584,
75
+ "watchers_count": 584,
76
+ "language": "Ruby",
77
+ "has_issues": true,
78
+ "has_downloads": true,
79
+ "has_wiki": true,
80
+ "has_pages": true,
81
+ "forks_count": 31,
82
+ "mirror_url": null,
83
+ "open_issues_count": 2,
84
+ "forks": 31,
85
+ "open_issues": 2,
86
+ "watchers": 584,
87
+ "default_branch": "master",
88
+ "permissions": {
89
+ "admin": false,
90
+ "push": false,
91
+ "pull": true
92
+ }
93
+ },
94
+ {
95
+ "id": 9639981,
96
+ "name": "xctool",
97
+ "full_name": "facebook/xctool",
98
+ "owner": {
99
+ "login": "facebook",
100
+ "id": 69631,
101
+ "avatar_url": "https://avatars.githubusercontent.com/u/69631?v=3",
102
+ "gravatar_id": "",
103
+ "url": "https://api.github.com/users/facebook",
104
+ "html_url": "https://github.com/facebook",
105
+ "followers_url": "https://api.github.com/users/facebook/followers",
106
+ "following_url": "https://api.github.com/users/facebook/following{/other_user}",
107
+ "gists_url": "https://api.github.com/users/facebook/gists{/gist_id}",
108
+ "starred_url": "https://api.github.com/users/facebook/starred{/owner}{/repo}",
109
+ "subscriptions_url": "https://api.github.com/users/facebook/subscriptions",
110
+ "organizations_url": "https://api.github.com/users/facebook/orgs",
111
+ "repos_url": "https://api.github.com/users/facebook/repos",
112
+ "events_url": "https://api.github.com/users/facebook/events{/privacy}",
113
+ "received_events_url": "https://api.github.com/users/facebook/received_events",
114
+ "type": "Organization",
115
+ "site_admin": false
116
+ },
117
+ "private": false,
118
+ "html_url": "https://github.com/facebook/xctool",
119
+ "description": "A replacement for Apple's xcodebuild that makes it easier to build and test iOS or OSX apps.",
120
+ "fork": false,
121
+ "url": "https://api.github.com/repos/facebook/xctool",
122
+ "forks_url": "https://api.github.com/repos/facebook/xctool/forks",
123
+ "keys_url": "https://api.github.com/repos/facebook/xctool/keys{/key_id}",
124
+ "collaborators_url": "https://api.github.com/repos/facebook/xctool/collaborators{/collaborator}",
125
+ "teams_url": "https://api.github.com/repos/facebook/xctool/teams",
126
+ "hooks_url": "https://api.github.com/repos/facebook/xctool/hooks",
127
+ "issue_events_url": "https://api.github.com/repos/facebook/xctool/issues/events{/number}",
128
+ "events_url": "https://api.github.com/repos/facebook/xctool/events",
129
+ "assignees_url": "https://api.github.com/repos/facebook/xctool/assignees{/user}",
130
+ "branches_url": "https://api.github.com/repos/facebook/xctool/branches{/branch}",
131
+ "tags_url": "https://api.github.com/repos/facebook/xctool/tags",
132
+ "blobs_url": "https://api.github.com/repos/facebook/xctool/git/blobs{/sha}",
133
+ "git_tags_url": "https://api.github.com/repos/facebook/xctool/git/tags{/sha}",
134
+ "git_refs_url": "https://api.github.com/repos/facebook/xctool/git/refs{/sha}",
135
+ "trees_url": "https://api.github.com/repos/facebook/xctool/git/trees{/sha}",
136
+ "statuses_url": "https://api.github.com/repos/facebook/xctool/statuses/{sha}",
137
+ "languages_url": "https://api.github.com/repos/facebook/xctool/languages",
138
+ "stargazers_url": "https://api.github.com/repos/facebook/xctool/stargazers",
139
+ "contributors_url": "https://api.github.com/repos/facebook/xctool/contributors",
140
+ "subscribers_url": "https://api.github.com/repos/facebook/xctool/subscribers",
141
+ "subscription_url": "https://api.github.com/repos/facebook/xctool/subscription",
142
+ "commits_url": "https://api.github.com/repos/facebook/xctool/commits{/sha}",
143
+ "git_commits_url": "https://api.github.com/repos/facebook/xctool/git/commits{/sha}",
144
+ "comments_url": "https://api.github.com/repos/facebook/xctool/comments{/number}",
145
+ "issue_comment_url": "https://api.github.com/repos/facebook/xctool/issues/comments/{number}",
146
+ "contents_url": "https://api.github.com/repos/facebook/xctool/contents/{+path}",
147
+ "compare_url": "https://api.github.com/repos/facebook/xctool/compare/{base}...{head}",
148
+ "merges_url": "https://api.github.com/repos/facebook/xctool/merges",
149
+ "archive_url": "https://api.github.com/repos/facebook/xctool/{archive_format}{/ref}",
150
+ "downloads_url": "https://api.github.com/repos/facebook/xctool/downloads",
151
+ "issues_url": "https://api.github.com/repos/facebook/xctool/issues{/number}",
152
+ "pulls_url": "https://api.github.com/repos/facebook/xctool/pulls{/number}",
153
+ "milestones_url": "https://api.github.com/repos/facebook/xctool/milestones{/number}",
154
+ "notifications_url": "https://api.github.com/repos/facebook/xctool/notifications{?since,all,participating}",
155
+ "labels_url": "https://api.github.com/repos/facebook/xctool/labels{/name}",
156
+ "releases_url": "https://api.github.com/repos/facebook/xctool/releases{/id}",
157
+ "created_at": "2013-04-24T05:18:44Z",
158
+ "updated_at": "2015-01-13T13:34:34Z",
159
+ "pushed_at": "2014-12-09T01:35:35Z",
160
+ "git_url": "git://github.com/facebook/xctool.git",
161
+ "ssh_url": "git@github.com:facebook/xctool.git",
162
+ "clone_url": "https://github.com/facebook/xctool.git",
163
+ "svn_url": "https://github.com/facebook/xctool",
164
+ "homepage": "",
165
+ "size": 20633,
166
+ "stargazers_count": 3740,
167
+ "watchers_count": 3740,
168
+ "language": "Objective-C",
169
+ "has_issues": true,
170
+ "has_downloads": true,
171
+ "has_wiki": true,
172
+ "has_pages": false,
173
+ "forks_count": 398,
174
+ "mirror_url": null,
175
+ "open_issues_count": 64,
176
+ "forks": 398,
177
+ "open_issues": 64,
178
+ "watchers": 3740,
179
+ "default_branch": "master",
180
+ "permissions": {
181
+ "admin": false,
182
+ "push": false,
183
+ "pull": true
184
+ }
185
+ }
186
+ ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contribution-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Dennes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-19 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -138,6 +138,7 @@ files:
138
138
  - spec/fixtures/repo_forks.json
139
139
  - spec/fixtures/repo_with_forks.json
140
140
  - spec/fixtures/repo_with_too_many_forks.json
141
+ - spec/fixtures/starred.json
141
142
  - spec/fixtures/user.json
142
143
  - spec/fixtures/user_fork.json
143
144
  - spec/fixtures/user_fork_not_matching.json
@@ -180,6 +181,7 @@ test_files:
180
181
  - spec/fixtures/repo_forks.json
181
182
  - spec/fixtures/repo_with_forks.json
182
183
  - spec/fixtures/repo_with_too_many_forks.json
184
+ - spec/fixtures/starred.json
183
185
  - spec/fixtures/user.json
184
186
  - spec/fixtures/user_fork.json
185
187
  - spec/fixtures/user_fork_not_matching.json