git_find_committer 0.1.0 → 0.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 +4 -4
- data/README.md +15 -1
- data/lib/git_find_committer/committer.rb +2 -1
- data/lib/git_find_committer/configuration.rb +2 -1
- data/lib/git_find_committer/filter.rb +11 -0
- data/lib/git_find_committer/response.rb +14 -0
- data/lib/git_find_committer/version.rb +1 -1
- data/lib/git_find_committer.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dd5f8b98e480753a6c9cf4325c5932e9a760a03
|
4
|
+
data.tar.gz: 92361ee8dd217f7645f629235e7931d2493ccef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64b76addb68157834fd877c7539bd0dabbfd9f57f1bff81bf3ae19ee217e2924f2b1b7e6017790c3b7240d7824810e8be81ec95a18109f4c74ff8332dc5a0f92
|
7
|
+
data.tar.gz: 476e4808599fe701535fe14b88316b48683cd1e7a8b05de349db0117511154d56845be201793dfadefbe1f351f00bf811b6dd37b057afddcec9fd1f04f31ed88
|
data/README.md
CHANGED
@@ -23,8 +23,12 @@ Or install it yourself as:
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
```ruby
|
26
|
-
|
26
|
+
require 'git_find_committer'
|
27
|
+
|
28
|
+
committer = GitFindCommitter.search(repo: 'balloonbros/sutekki', branch: 'add-ui')
|
27
29
|
=> [{:name=>"Shohei Yamasaki", :commit_count=>51}, {:name=>"keitakawamoto", :commit_count=>21}]
|
30
|
+
committer.names(1)
|
31
|
+
=> ["Shohei Yamasaki"]
|
28
32
|
```
|
29
33
|
|
30
34
|
## Working with GitHub Enterprise
|
@@ -38,6 +42,16 @@ GitFindCommitter.configure do |c|
|
|
38
42
|
end
|
39
43
|
```
|
40
44
|
|
45
|
+
## Filtering
|
46
|
+
|
47
|
+
You can filter the committers.
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
GitFindCommitter.configure do |c|
|
51
|
+
c.available_committer_name = %w(shoyan)
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
41
55
|
## Development
|
42
56
|
|
43
57
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -19,9 +19,10 @@ module GitFindCommitter
|
|
19
19
|
end
|
20
20
|
end.sort { |(k1, v1), (k2, v2)| v2 <=> v1 }.to_h
|
21
21
|
|
22
|
-
result.each_with_object([]) do |(key,val),arr|
|
22
|
+
result = result.each_with_object([]) do |(key,val),arr|
|
23
23
|
arr << {name: key, commit_count: val}
|
24
24
|
end
|
25
|
+
Response.new(result)
|
25
26
|
end
|
26
27
|
|
27
28
|
def find(file)
|
@@ -7,8 +7,9 @@ module GitFindCommitter
|
|
7
7
|
@access_token = nil
|
8
8
|
@url = "https://github.com"
|
9
9
|
@tmp_repo_dir = '/tmp/git_find_committer'
|
10
|
+
@available_committer_names = nil
|
10
11
|
end
|
11
|
-
attr_accessor :owner, :repo, :repo_name, :branch, :access_token, :url, :tmp_repo_dir
|
12
|
+
attr_accessor :owner, :repo, :repo_name, :branch, :access_token, :url, :tmp_repo_dir, :available_committer_names
|
12
13
|
|
13
14
|
def set_repo(repo)
|
14
15
|
@repo = repo
|
data/lib/git_find_committer.rb
CHANGED
@@ -2,6 +2,8 @@ require "git_find_committer/version"
|
|
2
2
|
require "git_find_committer/committer"
|
3
3
|
require "git_find_committer/configuration"
|
4
4
|
require "git_find_committer/repository"
|
5
|
+
require "git_find_committer/filter"
|
6
|
+
require "git_find_committer/response"
|
5
7
|
|
6
8
|
module GitFindCommitter
|
7
9
|
def self.configuration
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_find_committer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shohei Yamasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,7 +89,9 @@ files:
|
|
89
89
|
- lib/git_find_committer.rb
|
90
90
|
- lib/git_find_committer/committer.rb
|
91
91
|
- lib/git_find_committer/configuration.rb
|
92
|
+
- lib/git_find_committer/filter.rb
|
92
93
|
- lib/git_find_committer/repository.rb
|
94
|
+
- lib/git_find_committer/response.rb
|
93
95
|
- lib/git_find_committer/version.rb
|
94
96
|
homepage: https://github.com/shoyan/git_find_committer
|
95
97
|
licenses:
|