contribution-checker 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a24d5ff8cc0ea269b69ea05e9eb6f1cbd2e61b3
4
- data.tar.gz: 4adee37427cea31f5a7d4b724a5dead3a3dd1327
3
+ metadata.gz: b53c2d214e32833f4d29bce6cb92e80aca93d8c0
4
+ data.tar.gz: a9f049fffe0b7b9588d395fa6065110d9de58b6c
5
5
  SHA512:
6
- metadata.gz: 6256fb06674af1b3761baa6cd37063604497ed5f3033fba361f4210b352469948c50d9ef37f42d107681f09f00fafac0274fda2bc4e11ef9633b02ef944e7a63
7
- data.tar.gz: 8cb2678f1fe52dea1c75c49057493e992688c43e141e561498cff1b0a01959bced069c3eece0023ffd75bcfd58adc4088db4f1c50a9994032ec25b8910e6bb07
6
+ metadata.gz: cbed0c684ff3e978033a2fc042250156b286e059891589890c0dfb0626600ba38e6d1b8012bce05681fefc1fcb413cffd15d4cf9e4fb5cfaec2b208df1951304
7
+ data.tar.gz: bdb16902d2c6d5210257c91ce2a9bb1647943e85e24f170ba3580abeb52084455a6b78aaccfbd82fc5eac73a5a0e507e1d082314b010565d1008c92d7989daad
data/README.md CHANGED
@@ -19,7 +19,8 @@ checker.check
19
19
  :commit_in_last_year => true,
20
20
  :repo_not_a_fork => true,
21
21
  :commit_email_linked_to_user => true,
22
- :commit_email => "example@example.com"
22
+ :commit_email => "example@example.com",
23
+ :default_branch => "master"
23
24
  },
24
25
  :or_criteria => {
25
26
  :user_has_starred_repo => false,
@@ -32,7 +33,7 @@ checker.check
32
33
 
33
34
  You might also like to try out the [Contribution Checker][app] app built on top of this library:
34
35
 
35
- ![checker](https://cloud.githubusercontent.com/assets/65057/3230693/8b10fb9c-f0a5-11e3-8223-45fd47c34aa6.png)
36
+ ![checker](https://cloud.githubusercontent.com/assets/65057/3352063/2a90d4b4-fa31-11e3-8733-c52d5df05bad.png)
36
37
 
37
38
  Created by [@izuzak][izuzak] and [@jdennes][jdennes] at the [Hamburg Hackathon][hamburg-hackathon], June 2014.
38
39
 
@@ -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", "~> 3.1"
21
+ spec.add_dependency "octokit", "~> 3.3"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
@@ -38,6 +38,7 @@ module ContributionChecker
38
38
  # :repo_not_a_fork => true,
39
39
  # :commit_email_linked_to_user => true,
40
40
  # :commit_email => "example@example.com",
41
+ # :default_branch => "master"
41
42
  # },
42
43
  # :or_criteria => {
43
44
  # :user_has_starred_repo => false,
@@ -75,6 +76,7 @@ module ContributionChecker
75
76
  :repo_not_a_fork => @repo_not_a_fork,
76
77
  :commit_email_linked_to_user => @commit_email_linked_to_user,
77
78
  :commit_email => @commit[:commit][:author][:email],
79
+ :default_branch => @repo[:default_branch],
78
80
  },
79
81
  :or_criteria => {
80
82
  :user_has_starred_repo => @user_has_starred_repo,
@@ -1,3 +1,3 @@
1
1
  module ContributionChecker
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -22,7 +22,7 @@ describe ContributionChecker::Checker do
22
22
  }
23
23
 
24
24
  before do
25
- stub_request(:get, "https://api.github.com/repos/commits/").to_return(
25
+ stub_request(:get, "https://api.github.com/commits/").to_return(
26
26
  :status => 404, :body => "")
27
27
  end
28
28
 
@@ -79,6 +79,7 @@ describe ContributionChecker::Checker do
79
79
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
80
80
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
81
81
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
82
+ expect(result[:and_criteria][:default_branch]).to eq("master")
82
83
 
83
84
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
84
85
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -121,6 +122,7 @@ describe ContributionChecker::Checker do
121
122
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
122
123
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
123
124
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
125
+ expect(result[:and_criteria][:default_branch]).to eq("master")
124
126
 
125
127
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
126
128
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -163,6 +165,7 @@ describe ContributionChecker::Checker do
163
165
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
164
166
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
165
167
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
168
+ expect(result[:and_criteria][:default_branch]).to eq("master")
166
169
 
167
170
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
168
171
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -205,6 +208,7 @@ describe ContributionChecker::Checker do
205
208
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
206
209
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
207
210
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
211
+ expect(result[:and_criteria][:default_branch]).to eq("master")
208
212
 
209
213
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
210
214
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -248,6 +252,7 @@ describe ContributionChecker::Checker do
248
252
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
249
253
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
250
254
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
255
+ expect(result[:and_criteria][:default_branch]).to eq("master")
251
256
 
252
257
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
253
258
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -290,6 +295,7 @@ describe ContributionChecker::Checker do
290
295
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
291
296
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
292
297
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
298
+ expect(result[:and_criteria][:default_branch]).to eq("master")
293
299
 
294
300
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
295
301
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -332,6 +338,7 @@ describe ContributionChecker::Checker do
332
338
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
333
339
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
334
340
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
341
+ expect(result[:and_criteria][:default_branch]).to eq("master")
335
342
 
336
343
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
337
344
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -378,6 +385,7 @@ describe ContributionChecker::Checker do
378
385
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
379
386
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
380
387
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
388
+ expect(result[:and_criteria][:default_branch]).to eq("master")
381
389
 
382
390
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
383
391
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
@@ -424,6 +432,7 @@ describe ContributionChecker::Checker do
424
432
  expect(result[:and_criteria][:repo_not_a_fork]).to eq(true)
425
433
  expect(result[:and_criteria][:commit_email_linked_to_user]).to eq(true)
426
434
  expect(result[:and_criteria][:commit_email]).to eq("example@example.com")
435
+ expect(result[:and_criteria][:default_branch]).to eq("master")
427
436
 
428
437
  expect(result[:or_criteria][:user_has_starred_repo]).to eq(false)
429
438
  expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contribution-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2014-06-22 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '3.3'
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: '3.1'
26
+ version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.6'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coveralls
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: Check whether a GitHub commit is counted as a contribution for a specific
@@ -116,7 +116,7 @@ executables: []
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - .gitignore
119
+ - ".gitignore"
120
120
  - Gemfile
121
121
  - LICENSE.txt
122
122
  - README.md
@@ -153,17 +153,17 @@ require_paths:
153
153
  - lib
154
154
  required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - '>='
156
+ - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - '>='
161
+ - - ">="
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 2.0.3
166
+ rubygems_version: 2.2.2
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Check whether a commit is counted as a contribution.