contribution-checker 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/README.md +17 -1
- data/contribution-checker.gemspec +1 -1
- data/lib/contribution-checker/version.rb +1 -1
- data/script/bootstrap +12 -0
- data/script/cibuild +7 -0
- data/script/test +18 -0
- data/spec/fixtures/commit.json +2 -2
- data/spec/fixtures/commit_with_generic_email.json +2 -2
- data/spec/fixtures/default_compare.json +4 -4
- data/spec/fixtures/default_compare_ahead.json +4 -4
- data/spec/fixtures/gh-pages_compare.json +4 -4
- data/spec/fixtures/org_owned_repo.json +3 -3
- data/spec/fixtures/potential_fork.json +3 -3
- data/spec/fixtures/repo.json +3 -3
- data/spec/fixtures/repo_forks.json +3 -3
- data/spec/fixtures/repo_with_forks.json +3 -3
- data/spec/fixtures/repo_with_too_many_forks.json +3 -3
- data/spec/fixtures/user.json +1 -1
- data/spec/fixtures/user_fork.json +3 -3
- data/spec/fixtures/user_fork_not_matching.json +3 -3
- data/spec/fixtures/user_repos.json +3 -3
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b097b1562c7634b82cea1137f09d792c63cdb5aa
|
4
|
+
data.tar.gz: a11773c3a3915641fef5d4b4146ba7ad5f284580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65107f41e803a4685d6c96a9df1e7b81cd986aceb048efbcec0d1ee7ef8cce6928867a516728c4eececdcfcc916bd1eae8e9d46b7aea609551982bf2c41e6f61
|
7
|
+
data.tar.gz: a4172b33c8ba5b87bea90c062891348b9f381d9bf2c965f398b5ba801f830f081fc765bb0543524fac3e7e307977025106d55abcac1a9bb493f704d5722b31e0
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
People :heart: GitHub Contributions. However, it's not always simple to tell why a commit isn't [counted as a contribution][contributions]. This library lets you check whether a specific commit qualifies as a contribution.
|
4
4
|
|
5
|
+
## Developing
|
6
|
+
|
7
|
+
To start working on the project:
|
8
|
+
|
9
|
+
```sh
|
10
|
+
script/bootstrap
|
11
|
+
```
|
12
|
+
|
13
|
+
To run the specs:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
script/test
|
17
|
+
```
|
18
|
+
|
5
19
|
## Usage
|
6
20
|
|
7
21
|
```ruby
|
@@ -33,7 +47,9 @@ checker.check
|
|
33
47
|
}
|
34
48
|
```
|
35
49
|
|
36
|
-
|
50
|
+
## App
|
51
|
+
|
52
|
+
You might like to try out the [Contribution Checker][app] app built on top of this library:
|
37
53
|
|
38
54
|
![checker](https://cloud.githubusercontent.com/assets/65057/6320756/b32c9328-bae6-11e4-9ba1-48ced9a5fb6e.png)
|
39
55
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "octokit", "~>
|
21
|
+
spec.add_dependency "octokit", "~> 4.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
24
24
|
spec.add_development_dependency "rake"
|
data/script/bootstrap
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# script/bootstrap: Resolve all dependencies required by the project.
|
4
|
+
|
5
|
+
set -e
|
6
|
+
|
7
|
+
cd "$(dirname "$0")/.."
|
8
|
+
|
9
|
+
echo "==> Installing gem dependencies..."
|
10
|
+
bundle check --path vendor/gems 2>&1 > /dev/null || {
|
11
|
+
bundle install --path vendor/gems --quiet --without production
|
12
|
+
}
|
data/script/cibuild
ADDED
data/script/test
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# script/test: Run the tests for the project.
|
4
|
+
|
5
|
+
set -e
|
6
|
+
|
7
|
+
cd "$(dirname "$0")/.."
|
8
|
+
|
9
|
+
script/bootstrap
|
10
|
+
|
11
|
+
echo "==> Running tests..."
|
12
|
+
|
13
|
+
if [ -n "$1" ]; then
|
14
|
+
# pass arguments to test call. This is useful for calling a single test.
|
15
|
+
bundle exec rake test "$1"
|
16
|
+
else
|
17
|
+
bundle exec rake test
|
18
|
+
fi
|
data/spec/fixtures/commit.json
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
"author": {
|
5
5
|
"name": "James Dennes",
|
6
6
|
"email": "me@foo.com",
|
7
|
-
"date": "
|
7
|
+
"date": "2015-06-08T10:25:34Z"
|
8
8
|
},
|
9
9
|
"committer": {
|
10
10
|
"name": "James Dennes",
|
11
11
|
"email": "me@foo.com",
|
12
|
-
"date": "
|
12
|
+
"date": "2015-06-08T10:25:34Z"
|
13
13
|
},
|
14
14
|
"message": "Version 0.0.2",
|
15
15
|
"tree": {
|
@@ -4,12 +4,12 @@
|
|
4
4
|
"author": {
|
5
5
|
"name": "James Dennes",
|
6
6
|
"email": "another@example.com",
|
7
|
-
"date": "
|
7
|
+
"date": "2015-06-08T10:25:34Z"
|
8
8
|
},
|
9
9
|
"committer": {
|
10
10
|
"name": "James Dennes",
|
11
11
|
"email": "another@example.com",
|
12
|
-
"date": "
|
12
|
+
"date": "2015-06-08T10:25:34Z"
|
13
13
|
},
|
14
14
|
"message": "Version 0.0.2",
|
15
15
|
"tree": {
|
@@ -10,12 +10,12 @@
|
|
10
10
|
"author": {
|
11
11
|
"name": "James Dennes",
|
12
12
|
"email": "me@foo.com",
|
13
|
-
"date": "
|
13
|
+
"date": "2015-06-08T22:47:15Z"
|
14
14
|
},
|
15
15
|
"committer": {
|
16
16
|
"name": "James Dennes",
|
17
17
|
"email": "me@foo.com",
|
18
|
-
"date": "
|
18
|
+
"date": "2015-06-08T22:47:15Z"
|
19
19
|
},
|
20
20
|
"message": "Add ContributionChecker::InvalidAccessTokenError",
|
21
21
|
"tree": {
|
@@ -80,12 +80,12 @@
|
|
80
80
|
"author": {
|
81
81
|
"name": "James Dennes",
|
82
82
|
"email": "me@foo.com",
|
83
|
-
"date": "
|
83
|
+
"date": "2015-06-08T10:25:34Z"
|
84
84
|
},
|
85
85
|
"committer": {
|
86
86
|
"name": "James Dennes",
|
87
87
|
"email": "me@foo.com",
|
88
|
-
"date": "
|
88
|
+
"date": "2015-06-08T10:25:34Z"
|
89
89
|
},
|
90
90
|
"message": "Version 0.0.2",
|
91
91
|
"tree": {
|
@@ -10,12 +10,12 @@
|
|
10
10
|
"author": {
|
11
11
|
"name": "James Dennes",
|
12
12
|
"email": "me@foo.com",
|
13
|
-
"date": "
|
13
|
+
"date": "2015-06-08T22:47:15Z"
|
14
14
|
},
|
15
15
|
"committer": {
|
16
16
|
"name": "James Dennes",
|
17
17
|
"email": "me@foo.com",
|
18
|
-
"date": "
|
18
|
+
"date": "2015-06-08T22:47:15Z"
|
19
19
|
},
|
20
20
|
"message": "Add ContributionChecker::InvalidAccessTokenError",
|
21
21
|
"tree": {
|
@@ -80,12 +80,12 @@
|
|
80
80
|
"author": {
|
81
81
|
"name": "James Dennes",
|
82
82
|
"email": "me@foo.com",
|
83
|
-
"date": "
|
83
|
+
"date": "2015-06-08T10:25:34Z"
|
84
84
|
},
|
85
85
|
"committer": {
|
86
86
|
"name": "James Dennes",
|
87
87
|
"email": "me@foo.com",
|
88
|
-
"date": "
|
88
|
+
"date": "2015-06-08T10:25:34Z"
|
89
89
|
},
|
90
90
|
"message": "Version 0.0.2",
|
91
91
|
"tree": {
|
@@ -10,12 +10,12 @@
|
|
10
10
|
"author": {
|
11
11
|
"name": "James Dennes",
|
12
12
|
"email": "me@foo.com",
|
13
|
-
"date": "
|
13
|
+
"date": "2015-06-08T22:47:15Z"
|
14
14
|
},
|
15
15
|
"committer": {
|
16
16
|
"name": "James Dennes",
|
17
17
|
"email": "me@foo.com",
|
18
|
-
"date": "
|
18
|
+
"date": "2015-06-08T22:47:15Z"
|
19
19
|
},
|
20
20
|
"message": "Add ContributionChecker::InvalidAccessTokenError",
|
21
21
|
"tree": {
|
@@ -80,12 +80,12 @@
|
|
80
80
|
"author": {
|
81
81
|
"name": "James Dennes",
|
82
82
|
"email": "me@foo.com",
|
83
|
-
"date": "
|
83
|
+
"date": "2015-06-08T10:25:34Z"
|
84
84
|
},
|
85
85
|
"committer": {
|
86
86
|
"name": "James Dennes",
|
87
87
|
"email": "me@foo.com",
|
88
|
-
"date": "
|
88
|
+
"date": "2015-06-08T10:25:34Z"
|
89
89
|
},
|
90
90
|
"message": "Version 0.0.2",
|
91
91
|
"tree": {
|
@@ -61,9 +61,9 @@
|
|
61
61
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
62
62
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
63
63
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
64
|
-
"created_at": "
|
65
|
-
"updated_at": "
|
66
|
-
"pushed_at": "
|
64
|
+
"created_at": "2015-06-05T08:16:43Z",
|
65
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
66
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
67
67
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
68
68
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
69
69
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
@@ -64,9 +64,9 @@
|
|
64
64
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
65
65
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
66
66
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
67
|
-
"created_at": "
|
68
|
-
"updated_at": "
|
69
|
-
"pushed_at": "
|
67
|
+
"created_at": "2015-06-05T08:16:43Z",
|
68
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
69
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
70
70
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
71
71
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
72
72
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
data/spec/fixtures/repo.json
CHANGED
@@ -61,9 +61,9 @@
|
|
61
61
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
62
62
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
63
63
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
64
|
-
"created_at": "
|
65
|
-
"updated_at": "
|
66
|
-
"pushed_at": "
|
64
|
+
"created_at": "2015-06-05T08:16:43Z",
|
65
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
66
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
67
67
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
68
68
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
69
69
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
@@ -62,9 +62,9 @@
|
|
62
62
|
"notifications_url": "https://api.github.com/repos/romansky/linguist/notifications{?since,all,participating}",
|
63
63
|
"labels_url": "https://api.github.com/repos/romansky/linguist/labels{/name}",
|
64
64
|
"releases_url": "https://api.github.com/repos/romansky/linguist/releases{/id}",
|
65
|
-
"created_at": "
|
66
|
-
"updated_at": "
|
67
|
-
"pushed_at": "
|
65
|
+
"created_at": "2015-06-14T11:06:13Z",
|
66
|
+
"updated_at": "2015-06-14T11:06:14Z",
|
67
|
+
"pushed_at": "2015-06-11T21:03:01Z",
|
68
68
|
"git_url": "git://github.com/romansky/linguist.git",
|
69
69
|
"ssh_url": "git@github.com:romansky/linguist.git",
|
70
70
|
"clone_url": "https://github.com/romansky/linguist.git",
|
@@ -61,9 +61,9 @@
|
|
61
61
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
62
62
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
63
63
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
64
|
-
"created_at": "
|
65
|
-
"updated_at": "
|
66
|
-
"pushed_at": "
|
64
|
+
"created_at": "2015-06-05T08:16:43Z",
|
65
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
66
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
67
67
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
68
68
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
69
69
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
@@ -61,9 +61,9 @@
|
|
61
61
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
62
62
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
63
63
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
64
|
-
"created_at": "
|
65
|
-
"updated_at": "
|
66
|
-
"pushed_at": "
|
64
|
+
"created_at": "2015-06-05T08:16:43Z",
|
65
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
66
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
67
67
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
68
68
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
69
69
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
data/spec/fixtures/user.json
CHANGED
@@ -64,9 +64,9 @@
|
|
64
64
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
65
65
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
66
66
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
67
|
-
"created_at": "
|
68
|
-
"updated_at": "
|
69
|
-
"pushed_at": "
|
67
|
+
"created_at": "2015-06-05T08:16:43Z",
|
68
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
69
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
70
70
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
71
71
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
72
72
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
@@ -64,9 +64,9 @@
|
|
64
64
|
"notifications_url": "https://api.github.com/repos/jdennes/contribution-checker/notifications{?since,all,participating}",
|
65
65
|
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/labels{/name}",
|
66
66
|
"releases_url": "https://api.github.com/repos/jdennes/contribution-checker/releases{/id}",
|
67
|
-
"created_at": "
|
68
|
-
"updated_at": "
|
69
|
-
"pushed_at": "
|
67
|
+
"created_at": "2015-06-05T08:16:43Z",
|
68
|
+
"updated_at": "2015-06-08T22:47:25Z",
|
69
|
+
"pushed_at": "2015-06-08T22:47:22Z",
|
70
70
|
"git_url": "git://github.com/jdennes/contribution-checker.git",
|
71
71
|
"ssh_url": "git@github.com:jdennes/contribution-checker.git",
|
72
72
|
"clone_url": "https://github.com/jdennes/contribution-checker.git",
|
@@ -62,9 +62,9 @@
|
|
62
62
|
"notifications_url": "https://api.github.com/repos/romansky/linguist/notifications{?since,all,participating}",
|
63
63
|
"labels_url": "https://api.github.com/repos/romansky/linguist/labels{/name}",
|
64
64
|
"releases_url": "https://api.github.com/repos/romansky/linguist/releases{/id}",
|
65
|
-
"created_at": "
|
66
|
-
"updated_at": "
|
67
|
-
"pushed_at": "
|
65
|
+
"created_at": "2015-06-14T11:06:13Z",
|
66
|
+
"updated_at": "2015-06-14T11:06:14Z",
|
67
|
+
"pushed_at": "2015-06-11T21:03:01Z",
|
68
68
|
"git_url": "git://github.com/romansky/linguist.git",
|
69
69
|
"ssh_url": "git@github.com:romansky/linguist.git",
|
70
70
|
"clone_url": "https://github.com/romansky/linguist.git",
|
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.3.
|
4
|
+
version: 1.3.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: 2015-
|
11
|
+
date: 2015-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,6 +117,7 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".gitignore"
|
120
|
+
- ".travis.yml"
|
120
121
|
- Gemfile
|
121
122
|
- LICENSE.txt
|
122
123
|
- README.md
|
@@ -126,6 +127,9 @@ files:
|
|
126
127
|
- lib/contribution-checker/checker.rb
|
127
128
|
- lib/contribution-checker/error.rb
|
128
129
|
- lib/contribution-checker/version.rb
|
130
|
+
- script/bootstrap
|
131
|
+
- script/cibuild
|
132
|
+
- script/test
|
129
133
|
- spec/contribution-checker/checker_spec.rb
|
130
134
|
- spec/fixtures/commit.json
|
131
135
|
- spec/fixtures/commit_with_generic_email.json
|