contribution-checker 1.2.1 → 1.3.0

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: f6ecd5538f10ca9621b4fa836289523aa63976ed
4
- data.tar.gz: 3f8256f68c44955712b5c88941619a224ffcb9ec
3
+ metadata.gz: 93c623a0b2a62aac8d53ba2a929540f84cffdd0e
4
+ data.tar.gz: 02e8cd90d4bb28a23d3fb0289cb708429fa5b504
5
5
  SHA512:
6
- metadata.gz: dc84b1ef6e9a2d17882402647b9957ee68608c76385e6c775b893b731528f4bbfe53f2610a4c68992f7a5532031f9cc2159e5c77507d36f0a39dd35b81d6d104
7
- data.tar.gz: e9b884acb90e6e1c4bf6a54b3f3012fd5efe1e7809ad90662394ac7a792b725832d906fa57b69ff8d652dc2b114a32268432732d9bc91b873923b7486dc759f3
6
+ metadata.gz: a7c2919aaa0c9e35d7b939aaa40e429f2ee4cb0033983b45bf373be81d0ba9ce4d1b059db661076b9c7921fddb3046d0fa2625bd31e1bdfff6b8ca1cb4ebdc15
7
+ data.tar.gz: efe0ad40370c02026581f69199b17f0363a67704a2a33204a8890c45e2055aa348296ba37b044288b3eb7aaedbbc8da235e9e7f6d561afebc416d627373a705a
data/README.md CHANGED
@@ -15,11 +15,12 @@ checker.check
15
15
  => {
16
16
  :contribution => true,
17
17
  :and_criteria => {
18
+ :commit_email_is_not_generic => true,
18
19
  :commit_in_valid_branch => true,
19
20
  :commit_in_last_year => true,
20
21
  :repo_not_a_fork => true,
21
22
  :commit_email_linked_to_user => true,
22
- :commit_email => "example@example.com",
23
+ :commit_email => "me@foo.com",
23
24
  :default_branch => "master"
24
25
  },
25
26
  :or_criteria => {
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["jdennes@gmail.com"]
11
11
  spec.summary = %q{Check whether a commit is counted as a contribution.}
12
12
  spec.description = %q{Check whether a GitHub commit is counted as a contribution for a specific GitHub user.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/jdennes/contribution-checker"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -33,11 +33,12 @@ module ContributionChecker
33
33
  # {
34
34
  # :contribution => true,
35
35
  # :and_criteria => {
36
+ # :commit_email_is_not_generic => true,
36
37
  # :commit_in_valid_branch => true,
37
38
  # :commit_in_last_year => true,
38
39
  # :repo_not_a_fork => true,
39
40
  # :commit_email_linked_to_user => true,
40
- # :commit_email => "example@example.com",
41
+ # :commit_email => "me@foo.com",
41
42
  # :default_branch => "master"
42
43
  # },
43
44
  # :or_criteria => {
@@ -62,6 +63,7 @@ module ContributionChecker
62
63
  @repo = @client.repository @nwo
63
64
  @user = @client.user
64
65
 
66
+ @commit_email_is_not_generic = commit_email_is_not_generic?
65
67
  @commit_in_valid_branch = commit_in_valid_branch?
66
68
  @commit_in_last_year = commit_in_last_year?
67
69
  @repo_not_a_fork = !repository_is_fork?
@@ -75,6 +77,7 @@ module ContributionChecker
75
77
  {
76
78
  :contribution => and_criteria_met? && or_criteria_met?,
77
79
  :and_criteria => {
80
+ :commit_email_is_not_generic => @commit_email_is_not_generic,
78
81
  :commit_in_valid_branch => @commit_in_valid_branch,
79
82
  :commit_in_last_year => @commit_in_last_year,
80
83
  :repo_not_a_fork => @repo_not_a_fork,
@@ -108,6 +111,18 @@ module ContributionChecker
108
111
  end
109
112
  end
110
113
 
114
+ # Checks that the commit was not authored using a non-generic email.
115
+ # For example, this will return false when the commit was authored using
116
+ # emails like me@example.com, me@localhost, me@fake.org, etc.
117
+ #
118
+ # @return [Boolean]
119
+ def commit_email_is_not_generic?
120
+ @commit[:commit][:author][:email] !~ Regexp.union(
121
+ /[@.](example|test|fake|none)\.?(com|net|org)?\z/i,
122
+ /[@.]local\.?(host)?\z/i,
123
+ )
124
+ end
125
+
111
126
  # Checks whether the commit is in a valid branch. A valid branch is defined
112
127
  # as either the default branch of the repository, or the gh-pages branch.
113
128
  #
@@ -254,6 +269,7 @@ module ContributionChecker
254
269
  #
255
270
  # @return [Boolean]
256
271
  def and_criteria_met?
272
+ @commit_email_is_not_generic &&
257
273
  @commit_in_valid_branch &&
258
274
  @commit_in_last_year &&
259
275
  @repo_not_a_fork &&
@@ -1,3 +1,3 @@
1
1
  module ContributionChecker
2
- VERSION = "1.2.1"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -63,6 +63,51 @@ describe ContributionChecker::Checker do
63
63
  end
64
64
  end
65
65
 
66
+ context "when a commit is authored using a generic email address" do
67
+ let(:checker) { checker = ContributionChecker::Checker.new \
68
+ :access_token => "token",
69
+ :commit_url => "https://github.com/jdennes/contribution-checker/commit/731e83d4abf1bd67ac6ab68d18387693482e47cf"
70
+ }
71
+
72
+ before do
73
+ stub_get("/repos/jdennes/contribution-checker/commits/731e83d4abf1bd67ac6ab68d18387693482e47cf").
74
+ to_return(json_response("commit_with_generic_email.json"))
75
+ stub_get("/repos/jdennes/contribution-checker").
76
+ to_return(json_response("repo.json"))
77
+ stub_get("/user").
78
+ to_return(json_response("user.json"))
79
+ stub_get("/repos/jdennes/contribution-checker/compare/master...731e83d4abf1bd67ac6ab68d18387693482e47cf").
80
+ to_return(json_response("default_compare.json"))
81
+ stub_get("/user/emails").
82
+ to_return(json_response("emails.json"))
83
+ stub_get("/user/starred/jdennes/contribution-checker").
84
+ to_return(:status => 404)
85
+ stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&state=all").
86
+ to_return(json_response("issues_and_prs.json"))
87
+ end
88
+
89
+ it "returns the check result" do
90
+ result = checker.check
91
+ expect(result).to be_a(Hash)
92
+
93
+ expect(result[:contribution]).to eq(false)
94
+
95
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(false)
96
+ expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
97
+ expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
98
+ expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
99
+ expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
100
+ expect(result[:and_criteria][:commit_email]).to eq("another@example.com")
101
+ expect(result[:and_criteria][:default_branch]).to eq("master")
102
+
103
+ expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
104
+ expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
105
+ expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
106
+ expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
107
+ expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
108
+ end
109
+ end
110
+
66
111
  context "when a commit is in the default branch and is successfully checked" do
67
112
  let(:checker) { checker = ContributionChecker::Checker.new \
68
113
  :access_token => "token",
@@ -92,11 +137,12 @@ describe ContributionChecker::Checker do
92
137
 
93
138
  expect(result[:contribution]).to eq(true)
94
139
 
140
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
95
141
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
96
142
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
97
143
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
98
144
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
99
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
145
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
100
146
  expect(result[:and_criteria][:default_branch]).to eq("master")
101
147
 
102
148
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -138,11 +184,12 @@ describe ContributionChecker::Checker do
138
184
 
139
185
  expect(result[:contribution]).to eq(true)
140
186
 
187
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
141
188
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
142
189
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
143
190
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
144
191
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
145
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
192
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
146
193
  expect(result[:and_criteria][:default_branch]).to eq("master")
147
194
 
148
195
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -184,11 +231,12 @@ describe ContributionChecker::Checker do
184
231
 
185
232
  expect(result[:contribution]).to eq(true)
186
233
 
234
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
187
235
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
188
236
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
189
237
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
190
238
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
191
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
239
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
192
240
  expect(result[:and_criteria][:default_branch]).to eq("master")
193
241
 
194
242
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -230,11 +278,12 @@ describe ContributionChecker::Checker do
230
278
 
231
279
  expect(result[:contribution]).to eq(false)
232
280
 
281
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
233
282
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(false)
234
283
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
235
284
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
236
285
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
237
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
286
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
238
287
  expect(result[:and_criteria][:default_branch]).to eq("master")
239
288
 
240
289
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -277,11 +326,12 @@ describe ContributionChecker::Checker do
277
326
 
278
327
  expect(result[:contribution]).to eq(true)
279
328
 
329
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
280
330
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
281
331
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
282
332
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
283
333
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
284
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
334
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
285
335
  expect(result[:and_criteria][:default_branch]).to eq("master")
286
336
 
287
337
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -323,11 +373,12 @@ describe ContributionChecker::Checker do
323
373
 
324
374
  expect(result[:contribution]).to eq(true)
325
375
 
376
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
326
377
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
327
378
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
328
379
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
329
380
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
330
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
381
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
331
382
  expect(result[:and_criteria][:default_branch]).to eq("master")
332
383
 
333
384
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -369,11 +420,12 @@ describe ContributionChecker::Checker do
369
420
 
370
421
  expect(result[:contribution]).to eq(true)
371
422
 
423
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
372
424
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
373
425
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
374
426
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
375
427
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
376
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
428
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
377
429
  expect(result[:and_criteria][:default_branch]).to eq("master")
378
430
 
379
431
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -419,11 +471,12 @@ describe ContributionChecker::Checker do
419
471
 
420
472
  expect(result[:contribution]).to eq(true)
421
473
 
474
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
422
475
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
423
476
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
424
477
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
425
478
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
426
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
479
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
427
480
  expect(result[:and_criteria][:default_branch]).to eq("master")
428
481
 
429
482
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -469,11 +522,12 @@ describe ContributionChecker::Checker do
469
522
 
470
523
  expect(result[:contribution]).to eq(true)
471
524
 
525
+ expect(result[:and_criteria][:commit_email_is_not_generic]).to eq(true)
472
526
  expect(result[:and_criteria][:commit_in_valid_branch]).to eq(true)
473
527
  expect(result[:and_criteria][:commit_in_last_year]).to eq(true)
474
528
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
475
529
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
476
- expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
530
+ expect(result[:and_criteria][:commit_email]).to eq("me@foo.com")
477
531
  expect(result[:and_criteria][:default_branch]).to eq("master")
478
532
 
479
533
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
@@ -3,12 +3,12 @@
3
3
  "commit": {
4
4
  "author": {
5
5
  "name": "James Dennes",
6
- "email": "example@example.com",
6
+ "email": "me@foo.com",
7
7
  "date": "2014-06-08T10:25:34Z"
8
8
  },
9
9
  "committer": {
10
10
  "name": "James Dennes",
11
- "email": "example@example.com",
11
+ "email": "me@foo.com",
12
12
  "date": "2014-06-08T10:25:34Z"
13
13
  },
14
14
  "message": "Version 0.0.2",
@@ -0,0 +1,89 @@
1
+ {
2
+ "sha": "731e83d4abf1bd67ac6ab68d18387693482e47cf",
3
+ "commit": {
4
+ "author": {
5
+ "name": "James Dennes",
6
+ "email": "another@example.com",
7
+ "date": "2014-06-08T10:25:34Z"
8
+ },
9
+ "committer": {
10
+ "name": "James Dennes",
11
+ "email": "another@example.com",
12
+ "date": "2014-06-08T10:25:34Z"
13
+ },
14
+ "message": "Version 0.0.2",
15
+ "tree": {
16
+ "sha": "30d937ac96b77183e8df7f319acc1e4387516981",
17
+ "url": "https://api.github.com/repos/jdennes/contribution-checker/git/trees/30d937ac96b77183e8df7f319acc1e4387516981"
18
+ },
19
+ "url": "https://api.github.com/repos/jdennes/contribution-checker/git/commits/731e83d4abf1bd67ac6ab68d18387693482e47cf",
20
+ "comment_count": 0
21
+ },
22
+ "url": "https://api.github.com/repos/jdennes/contribution-checker/commits/731e83d4abf1bd67ac6ab68d18387693482e47cf",
23
+ "html_url": "https://github.com/jdennes/contribution-checker/commit/731e83d4abf1bd67ac6ab68d18387693482e47cf",
24
+ "comments_url": "https://api.github.com/repos/jdennes/contribution-checker/commits/731e83d4abf1bd67ac6ab68d18387693482e47cf/comments",
25
+ "author": {
26
+ "login": "jdennes",
27
+ "id": 65057,
28
+ "avatar_url": "https://avatars.githubusercontent.com/u/65057?",
29
+ "gravatar_id": "55fd031da91ef9af6e6ed88b101416a1",
30
+ "url": "https://api.github.com/users/jdennes",
31
+ "html_url": "https://github.com/jdennes",
32
+ "followers_url": "https://api.github.com/users/jdennes/followers",
33
+ "following_url": "https://api.github.com/users/jdennes/following{/other_user}",
34
+ "gists_url": "https://api.github.com/users/jdennes/gists{/gist_id}",
35
+ "starred_url": "https://api.github.com/users/jdennes/starred{/owner}{/repo}",
36
+ "subscriptions_url": "https://api.github.com/users/jdennes/subscriptions",
37
+ "organizations_url": "https://api.github.com/users/jdennes/orgs",
38
+ "repos_url": "https://api.github.com/users/jdennes/repos",
39
+ "events_url": "https://api.github.com/users/jdennes/events{/privacy}",
40
+ "received_events_url": "https://api.github.com/users/jdennes/received_events",
41
+ "type": "User",
42
+ "site_admin": true
43
+ },
44
+ "committer": {
45
+ "login": "jdennes",
46
+ "id": 65057,
47
+ "avatar_url": "https://avatars.githubusercontent.com/u/65057?",
48
+ "gravatar_id": "55fd031da91ef9af6e6ed88b101416a1",
49
+ "url": "https://api.github.com/users/jdennes",
50
+ "html_url": "https://github.com/jdennes",
51
+ "followers_url": "https://api.github.com/users/jdennes/followers",
52
+ "following_url": "https://api.github.com/users/jdennes/following{/other_user}",
53
+ "gists_url": "https://api.github.com/users/jdennes/gists{/gist_id}",
54
+ "starred_url": "https://api.github.com/users/jdennes/starred{/owner}{/repo}",
55
+ "subscriptions_url": "https://api.github.com/users/jdennes/subscriptions",
56
+ "organizations_url": "https://api.github.com/users/jdennes/orgs",
57
+ "repos_url": "https://api.github.com/users/jdennes/repos",
58
+ "events_url": "https://api.github.com/users/jdennes/events{/privacy}",
59
+ "received_events_url": "https://api.github.com/users/jdennes/received_events",
60
+ "type": "User",
61
+ "site_admin": true
62
+ },
63
+ "parents": [
64
+ {
65
+ "sha": "5514532ab61216d1d7d242fd624a2f215d225a31",
66
+ "url": "https://api.github.com/repos/jdennes/contribution-checker/commits/5514532ab61216d1d7d242fd624a2f215d225a31",
67
+ "html_url": "https://github.com/jdennes/contribution-checker/commit/5514532ab61216d1d7d242fd624a2f215d225a31"
68
+ }
69
+ ],
70
+ "stats": {
71
+ "total": 2,
72
+ "additions": 1,
73
+ "deletions": 1
74
+ },
75
+ "files": [
76
+ {
77
+ "sha": "d8853e79dea5d3235cb470f4ea1de0ec2d17bcb5",
78
+ "filename": "lib/contribution-checker/version.rb",
79
+ "status": "modified",
80
+ "additions": 1,
81
+ "deletions": 1,
82
+ "changes": 2,
83
+ "blob_url": "https://github.com/jdennes/contribution-checker/blob/731e83d4abf1bd67ac6ab68d18387693482e47cf/lib/contribution-checker/version.rb",
84
+ "raw_url": "https://github.com/jdennes/contribution-checker/raw/731e83d4abf1bd67ac6ab68d18387693482e47cf/lib/contribution-checker/version.rb",
85
+ "contents_url": "https://api.github.com/repos/jdennes/contribution-checker/contents/lib/contribution-checker/version.rb?ref=731e83d4abf1bd67ac6ab68d18387693482e47cf",
86
+ "patch": "@@ -1,3 +1,3 @@\n module ContributionChecker\n- VERSION = \"0.0.1\"\n+ VERSION = \"0.0.2\"\n end"
87
+ }
88
+ ]
89
+ }
@@ -9,12 +9,12 @@
9
9
  "commit": {
10
10
  "author": {
11
11
  "name": "James Dennes",
12
- "email": "example@example.com",
12
+ "email": "me@foo.com",
13
13
  "date": "2014-06-08T22:47:15Z"
14
14
  },
15
15
  "committer": {
16
16
  "name": "James Dennes",
17
- "email": "example@example.com",
17
+ "email": "me@foo.com",
18
18
  "date": "2014-06-08T22:47:15Z"
19
19
  },
20
20
  "message": "Add ContributionChecker::InvalidAccessTokenError",
@@ -79,12 +79,12 @@
79
79
  "commit": {
80
80
  "author": {
81
81
  "name": "James Dennes",
82
- "email": "example@example.com",
82
+ "email": "me@foo.com",
83
83
  "date": "2014-06-08T10:25:34Z"
84
84
  },
85
85
  "committer": {
86
86
  "name": "James Dennes",
87
- "email": "example@example.com",
87
+ "email": "me@foo.com",
88
88
  "date": "2014-06-08T10:25:34Z"
89
89
  },
90
90
  "message": "Version 0.0.2",
@@ -9,12 +9,12 @@
9
9
  "commit": {
10
10
  "author": {
11
11
  "name": "James Dennes",
12
- "email": "example@example.com",
12
+ "email": "me@foo.com",
13
13
  "date": "2014-06-08T22:47:15Z"
14
14
  },
15
15
  "committer": {
16
16
  "name": "James Dennes",
17
- "email": "example@example.com",
17
+ "email": "me@foo.com",
18
18
  "date": "2014-06-08T22:47:15Z"
19
19
  },
20
20
  "message": "Add ContributionChecker::InvalidAccessTokenError",
@@ -79,12 +79,12 @@
79
79
  "commit": {
80
80
  "author": {
81
81
  "name": "James Dennes",
82
- "email": "example@example.com",
82
+ "email": "me@foo.com",
83
83
  "date": "2014-06-08T10:25:34Z"
84
84
  },
85
85
  "committer": {
86
86
  "name": "James Dennes",
87
- "email": "example@example.com",
87
+ "email": "me@foo.com",
88
88
  "date": "2014-06-08T10:25:34Z"
89
89
  },
90
90
  "message": "Version 0.0.2",
@@ -1,6 +1,6 @@
1
1
  [
2
2
  {
3
- "email": "example@example.com",
3
+ "email": "me@foo.com",
4
4
  "primary": false,
5
5
  "verified": true
6
6
  },
@@ -9,12 +9,12 @@
9
9
  "commit": {
10
10
  "author": {
11
11
  "name": "James Dennes",
12
- "email": "example@example.com",
12
+ "email": "me@foo.com",
13
13
  "date": "2014-06-08T22:47:15Z"
14
14
  },
15
15
  "committer": {
16
16
  "name": "James Dennes",
17
- "email": "example@example.com",
17
+ "email": "me@foo.com",
18
18
  "date": "2014-06-08T22:47:15Z"
19
19
  },
20
20
  "message": "Add ContributionChecker::InvalidAccessTokenError",
@@ -79,12 +79,12 @@
79
79
  "commit": {
80
80
  "author": {
81
81
  "name": "James Dennes",
82
- "email": "example@example.com",
82
+ "email": "me@foo.com",
83
83
  "date": "2014-06-08T10:25:34Z"
84
84
  },
85
85
  "committer": {
86
86
  "name": "James Dennes",
87
- "email": "example@example.com",
87
+ "email": "me@foo.com",
88
88
  "date": "2014-06-08T10:25:34Z"
89
89
  },
90
90
  "message": "Version 0.0.2",
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.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Dennes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -128,6 +128,7 @@ files:
128
128
  - lib/contribution-checker/version.rb
129
129
  - spec/contribution-checker/checker_spec.rb
130
130
  - spec/fixtures/commit.json
131
+ - spec/fixtures/commit_with_generic_email.json
131
132
  - spec/fixtures/default_compare.json
132
133
  - spec/fixtures/default_compare_ahead.json
133
134
  - spec/fixtures/emails.json
@@ -144,7 +145,7 @@ files:
144
145
  - spec/fixtures/user_fork_not_matching.json
145
146
  - spec/fixtures/user_repos.json
146
147
  - spec/helper.rb
147
- homepage: ''
148
+ homepage: https://github.com/jdennes/contribution-checker
148
149
  licenses:
149
150
  - MIT
150
151
  metadata: {}
@@ -164,13 +165,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  version: '0'
165
166
  requirements: []
166
167
  rubyforge_project:
167
- rubygems_version: 2.2.2
168
+ rubygems_version: 2.2.3
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: Check whether a commit is counted as a contribution.
171
172
  test_files:
172
173
  - spec/contribution-checker/checker_spec.rb
173
174
  - spec/fixtures/commit.json
175
+ - spec/fixtures/commit_with_generic_email.json
174
176
  - spec/fixtures/default_compare.json
175
177
  - spec/fixtures/default_compare_ahead.json
176
178
  - spec/fixtures/emails.json