git_fame 2.5.0 → 3.0.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.
metadata CHANGED
@@ -1,234 +1,220 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_fame
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander
8
- autorequire:
9
- bindir: bin
8
+ autorequire:
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2021-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: progressbar
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.0
19
+ version: '7.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: 0.21.0
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: trollop
28
+ name: dry-initializer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.2
33
+ version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.1.2
40
+ version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: hirb
42
+ name: dry-struct
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.7.3
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.7.3
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: scrub_rb
56
+ name: dry-types
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.1
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.1
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: memoist
70
+ name: neatjson
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.14.0
75
+ version: '0.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.14.0
82
+ version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
- name: method_profiler
84
+ name: rugged
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 2.0.1
89
+ version: '1.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 2.0.1
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec
98
+ name: tty-box
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 3.4.0
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 3.4.0
111
- - !ruby/object:Gem::Dependency
112
- name: rspec-collection_matchers
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 1.1.2
118
- type: :development
103
+ version: '0.5'
104
+ type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: 1.1.2
110
+ version: '0.5'
125
111
  - !ruby/object:Gem::Dependency
126
- name: rake
112
+ name: tty-option
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 10.4.2
132
- type: :development
117
+ version: '0.2'
118
+ type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: 10.4.2
124
+ version: '0.2'
139
125
  - !ruby/object:Gem::Dependency
140
- name: coveralls
126
+ name: tty-screen
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 0.8.1
146
- type: :development
131
+ version: '0.5'
132
+ type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 0.8.1
138
+ version: '0.5'
153
139
  - !ruby/object:Gem::Dependency
154
- name: json
140
+ name: tty-spinner
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
143
  - - "~>"
158
144
  - !ruby/object:Gem::Version
159
- version: 1.8.3
160
- type: :development
145
+ version: '0.9'
146
+ type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
150
  - - "~>"
165
151
  - !ruby/object:Gem::Version
166
- version: 1.8.3
152
+ version: '0.9'
167
153
  - !ruby/object:Gem::Dependency
168
- name: tins
154
+ name: tty-table
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
- - - "~>"
157
+ - - ">="
172
158
  - !ruby/object:Gem::Version
173
- version: 1.6.0
174
- type: :development
159
+ version: 0.10.0
160
+ type: :runtime
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
- - - "~>"
164
+ - - ">="
179
165
  - !ruby/object:Gem::Version
180
- version: 1.6.0
166
+ version: 0.10.0
181
167
  - !ruby/object:Gem::Dependency
182
- name: term-ansicolor
168
+ name: zeitwerk
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
171
  - - "~>"
186
172
  - !ruby/object:Gem::Version
187
- version: 1.3.2
188
- type: :development
173
+ version: '2.0'
174
+ type: :runtime
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
178
  - - "~>"
193
179
  - !ruby/object:Gem::Version
194
- version: 1.3.2
195
- description: Generates awesome stats from git-blame
180
+ version: '2.0'
181
+ description: |
182
+ A command-line tool that helps you summarize and
183
+ pretty-print collaborators in a git repository
184
+ based on contributions
185
+
186
+ Generates stats like:
187
+ - Number of files changed by a user
188
+ - Number of commits by user
189
+ - Lines of code by a user'
196
190
  email:
197
- - linus@oleander.nu
191
+ - oleander@users.noreply.github.com
198
192
  executables:
199
193
  - git-fame
200
194
  extensions: []
201
195
  extra_rdoc_files: []
202
196
  files:
203
- - ".gitignore"
204
- - ".gitmodules"
205
- - ".rspec"
206
- - ".travis.yml"
207
- - Gemfile
208
- - LICENSE
209
- - README.md
210
- - Rakefile
211
- - bin/git-fame
212
- - git_fame.gemspec
197
+ - exe/git-fame
213
198
  - lib/git_fame.rb
214
199
  - lib/git_fame/author.rb
215
200
  - lib/git_fame/base.rb
216
- - lib/git_fame/blame_parser.rb
217
- - lib/git_fame/commit_range.rb
218
- - lib/git_fame/errors.rb
219
- - lib/git_fame/file.rb
220
- - lib/git_fame/helper.rb
201
+ - lib/git_fame/collector.rb
202
+ - lib/git_fame/command.rb
203
+ - lib/git_fame/contribution.rb
204
+ - lib/git_fame/diff.rb
205
+ - lib/git_fame/error.rb
206
+ - lib/git_fame/extension.rb
207
+ - lib/git_fame/filter.rb
208
+ - lib/git_fame/render.rb
209
+ - lib/git_fame/render/extension.rb
221
210
  - lib/git_fame/result.rb
222
- - lib/git_fame/silent_progressbar.rb
211
+ - lib/git_fame/types.rb
223
212
  - lib/git_fame/version.rb
224
- - spec/bin_spec.rb
225
- - spec/git_fame_spec.rb
226
- - spec/spec_helper.rb
227
- - spec/support/startup.rb
228
213
  homepage: https://github.com/oleander/git-fame-rb
229
214
  licenses: []
230
- metadata: {}
231
- post_install_message:
215
+ metadata:
216
+ rubygems_mfa_required: 'true'
217
+ post_install_message:
232
218
  rdoc_options: []
233
219
  require_paths:
234
220
  - lib
@@ -236,22 +222,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
222
  requirements:
237
223
  - - ">="
238
224
  - !ruby/object:Gem::Version
239
- version: 1.9.2
225
+ version: 2.7.0
240
226
  required_rubygems_version: !ruby/object:Gem::Requirement
241
227
  requirements:
242
228
  - - ">="
243
229
  - !ruby/object:Gem::Version
244
230
  version: '0'
245
231
  requirements: []
246
- rubyforge_project:
247
- rubygems_version: 2.5.1
248
- signing_key:
232
+ rubygems_version: 3.3.3
233
+ signing_key:
249
234
  specification_version: 4
250
- summary: 'Generates awesome stats from git-blame A Ruby wrapper for git-blame. Generates
251
- data like: - Number of files changed by a user - Number of commits by user - Lines
252
- of code by a user'
253
- test_files:
254
- - spec/bin_spec.rb
255
- - spec/git_fame_spec.rb
256
- - spec/spec_helper.rb
257
- - spec/support/startup.rb
235
+ summary: git-fame is a command-line tool that helps you summarize and pretty-print
236
+ collaborators in a git repository based on contributions. A Ruby wrapper for git-blame
237
+ if you will.
238
+ test_files: []
data/.gitignore DELETED
@@ -1,20 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- .byebug_history
19
- .tags
20
- .tags1
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "spec/fixtures/gash"]
2
- path = spec/fixtures/gash
3
- url = git://github.com/water/gash.git
data/.rspec DELETED
@@ -1,7 +0,0 @@
1
- --color
2
- -I lib
3
- -I spec
4
- --require spec_helper
5
- --exclude-pattern spec/fixtures/**/*_spec.rb
6
- --tty
7
- --format documentation
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.1
4
- - 2.2.0
5
- - 2.1.0
6
- - 2.0.0
7
- - 1.9.3
8
- script:
9
- - 'rspec spec'
10
- notifications:
11
- webhooks:
12
- urls:
13
- - https://webhooks.gitter.im/e/e2b034ea2dbc919b02f7
14
- on_success: change # options: [always|never|change] default: always
15
- on_failure: change # options: [always|never|change] default: always
16
- on_start: false # default: false
17
- before_install:
18
- - sudo add-apt-repository ppa:git-core/ppa -y
19
- - sudo apt-get update -q
20
- - sudo apt-get install git -y
21
- - gem install bundler
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in git_fame.gemspec
4
- gemspec
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2012 Linus Oleander
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,137 +0,0 @@
1
- # GitFame
2
- [![Gem](https://img.shields.io/gem/dt/git_fame.svg)](https://rubygems.org/gems/git_fame)
3
- [![Gitter](https://img.shields.io/gitter/room/oleander/git-fame-rb.svg)](https://gitter.im/oleander/git-fame-rb)
4
- [![Travis](https://img.shields.io/travis/oleander/git-fame-rb.svg)](https://travis-ci.org/oleander/git-fame-rb)
5
- [![Coveralls](https://img.shields.io/coveralls/oleander/git-fame-rb.svg)](https://coveralls.io/github/oleander/git-fame-rb)
6
-
7
- Pretty-print collaborators sorted by contributions.
8
-
9
- ## Output
10
-
11
- ```
12
- Statistics based on master
13
- Active files: 21
14
- Active lines: 967
15
- Total commits: 109
16
-
17
- Note: Files matching MIME type image, binary has been ignored
18
-
19
- +----------------+-----+---------+-------+---------------------+
20
- | name | loc | commits | files | distribution (%) |
21
- +----------------+-----+---------+-------+---------------------+
22
- | Linus Oleander | 914 | 106 | 21 | 94.5 / 97.2 / 100.0 |
23
- | f1yegor | 47 | 2 | 7 | 4.9 / 1.8 / 33.3 |
24
- | David Selassie | 6 | 1 | 2 | 0.6 / 0.9 / 9.5 |
25
- +----------------+-----+---------+-------+---------------------+
26
- ```
27
-
28
- ## Installation
29
-
30
- `[sudo] gem install git_fame`
31
-
32
- ## Usage
33
-
34
- ### Console
35
-
36
- From a git repository run `git fame`.
37
-
38
- #### Options
39
-
40
- - `git fame --by-type` Group line counts by file extension (i.e. .rb, .erb, .yml). See the *by type* section below.
41
- - `git fame --exclude=path1/*,path2/*` Comma separated, [glob](https://en.wikipedia.org/wiki/Glob_(programming)) file path to exclude.
42
- - `git fame --include=path1/*,path2/*` Comma separated, [glob](https://en.wikipedia.org/wiki/Glob_(programming)) file path to include.
43
- - `git fame --sort=loc` Order table by `loc`. Available options are: `loc`, `files` and `commits`. Default is `loc`.
44
- - `git fame --hide-progressbar` Hide progressbar.
45
- - `git fame --whitespace` Ignore whitespace changes when blaming files. [More about git blame and whitespace](https://coderwall.com/p/x8xbnq/git-don-t-blame-people-for-changing-whitespaces-or-moving-code).
46
- - `git fame --repository=/path/to/repo` Git repository to be used. Default is the current folder.
47
- - `git fame --branch=master` Branch to run on. Default is what `HEAD` points to.
48
- - `git fame --format=output` Output format. Default is `pretty`. Additional: `csv`.
49
- - `git fame --after=2010-01-01` Only use commits after this date. Format: yyyy-mm-dd. Note that the given date is included.
50
- - `git fame --before=2016-02-01` Only use commits before this date. Format: yyyy-mm-dd. Note that the given date is included.
51
- - `git fame --verbose` Print shell commands used by `git-fame`.
52
- - `git fame --everything` Images and binaries are ignored by default. Include them as well.
53
- - `git fame --timeout` Set timeout in seconds for each git command.
54
-
55
- #### By type
56
-
57
- `--by-type` adds extra columns file types.
58
-
59
- ```
60
- +----------------+-----+---------+-------+---------------------+---------+-----+----+---------+-----+
61
- | name | loc | commits | files | distribution (%) | unknown | yml | md | gemspec | rb |
62
- +----------------+-----+---------+-------+---------------------+---------+-----+----+---------+-----+
63
- | Linus Oleander | 914 | 106 | 21 | 94.5 / 97.2 / 100.0 | 32 | 5 | 61 | 23 | 257 |
64
- | f1yegor | 47 | 2 | 7 | 4.9 / 1.8 / 33.3 | 3 | 5 | 6 | 1 | 10 |
65
- | David Selassie | 6 | 1 | 2 | 0.6 / 0.9 / 9.5 | 2 | 0 | 3 | 0 | 0 |
66
- +----------------+-----+---------+-------+---------------------+---------+-----+----+---------+-----+
67
- ```
68
-
69
- ### Programmatically
70
-
71
- Want to work with the data before using it? Here's how.
72
-
73
- #### Constructor arguments
74
-
75
- `options` is a hash with most of the arguments passed to the binary defined above.
76
- Take a look at the [bin/git-fame](bin/git-fame) file for more information.
77
-
78
- ``` ruby
79
- repository = GitFame::Base.new(options)
80
- ```
81
-
82
- #### Print table
83
-
84
- `repository.pretty_puts` outputs the statistics as an ascii table.
85
-
86
-
87
- #### Print csv table to console
88
-
89
- `repository.csv_puts` outputs the statistics as csv.
90
-
91
- #### Statistics
92
-
93
- ##### GitFame
94
-
95
- - `repository.loc` (Fixnum) Total number of lines.
96
- - `repository.commits` (Fixnum) Total number of commits.
97
- - `repository.files` (Fixnum) Total number of files.
98
- - `repository.authors` (Array< Author >) All authors.
99
-
100
- ##### Author
101
-
102
- `author = repository.authors.first`
103
-
104
- - Formated
105
- - `author.loc` (String) Number of lines.
106
- - `author.commits` (String) Number of commits.
107
- - `author.files` (String) Number of files changed.
108
- - Non formated
109
- - `author.distribution` (String) Distribution (in %) between users (loc/commits/files)
110
- - `author.raw_loc` (Fixnum) Number of lines.
111
- - `author.raw_commits` (Fixnum) Number of commits.
112
- - `author.raw_files` (Fixnum) Number of files changed.
113
- - `author.file_type_counts` (Array) File types (k) and loc (v)
114
-
115
- ## Testing
116
-
117
- 1. Download fixtures (`spec/fixtures`) using `git submodule update --init`.
118
- 2. Run rspec using `bundle exec rspec`.
119
-
120
- Note that `puts` has been disabled to avoid unnecessary output during testing.
121
- Visit `spec/spec_helper.rb` to enable it again.
122
-
123
- ## Contributing
124
-
125
- 1. Fork it
126
- 2. Create your feature branch (`git checkout -b my-new-feature`)
127
- 3. Commit your changes (`git commit -am 'Added some feature'`)
128
- 4. Push to the branch (`git push origin my-new-feature`)
129
- 5. Create new Pull Request
130
-
131
- ## Requirements
132
-
133
- *GitFame* should work on all Unix based operating system with Git installed.
134
-
135
- ## License
136
-
137
- *GitFame* is released under the *MIT license*.
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env rake
2
-
3
- require "bundler/gem_tasks"
4
- require "method_profiler"
5
- require "git_fame"
6
-
7
- task :profile do
8
- profiler = MethodProfiler.observe(GitFame::Base)
9
-
10
- GitFame::Base.new({
11
- repository: "spec/fixtures/gash"
12
- })
13
-
14
- puts profiler.report
15
- end
data/bin/git-fame DELETED
@@ -1,58 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
4
-
5
- require "git_fame"
6
- require "trollop"
7
-
8
- opts = Trollop::options do
9
- version "git-fame #{GitFame::VERSION} (c) 2012-#{Date.today.year} Linus Oleander"
10
- opt :repository, "What git repository should be used?", default: "."
11
- opt :sort, "What should the printed table be sorted by? #{GitFame::SORT.join(", ")}", default: "loc", type: String
12
- opt :"hide-progressbar", "Hide progressbar", default: false
13
- opt :whitespace, "Ignore whitespace changes", default: false
14
- opt :"by-type", "Group line counts by file extension (i.e. .rb, .erb, .yml)", default: false
15
- opt :include, "Comma separated, glob file path to include. I.e path/*.rb", default: "", type: String
16
- opt :exclude, "Comma separated, glob file path to exclude. I.e any/**/path/*", default: "", type: String
17
- opt :extension, "Comma-separated list of extensions to consider, leave blank for all", default: "", type: String
18
- opt :branch, "Branch to run on", default: "master", type: String
19
- opt :format, "Format (pretty/csv)", default: "pretty", type: String
20
- opt :after, "Only use commmits after this date. Format: yyyy-mm-dd. Note that the given date is included", type: String
21
- opt :before, "Only use commits before this date. Format: yyyy-mm-dd. Note that the given date is included", type: String
22
- opt :verbose, "Print shell commands used by git-fame", default: false
23
- opt :timeout, "Set timeout in seconds for each git command. Turn off by using -1", type: Integer, default: GitFame::CMD_TIMEOUT
24
- opt :everything, "Images and binaries are ignored by default. Include them as well", default: false
25
- end
26
-
27
- unless GitFame::SORT.include?(opts[:sort])
28
- Trollop::die :sort, "must be one of the following; #{GitFame::SORT.join(", ")}"
29
- end
30
-
31
- if opts[:timeout] != -1 and opts[:timeout] <= 0
32
- Trollop::die :timeout, "must be positive"
33
- end
34
-
35
- begin
36
- fame = GitFame::Base.new({
37
- repository: opts[:repository],
38
- progressbar: ! opts[:"hide-progressbar"],
39
- sort: opts[:sort],
40
- whitespace: opts[:whitespace],
41
- by_type: opts[:"by-type"],
42
- include: opts[:include],
43
- exclude: opts[:exclude],
44
- extensions: opts[:extension],
45
- branch: opts[:branch],
46
- after: opts[:after],
47
- before: opts[:before],
48
- verbose: opts[:verbose],
49
- everything: opts[:everything],
50
- timeout: opts[:timeout]
51
- })
52
-
53
- opts[:format] == "csv" ? fame.csv_puts : fame.pretty_puts
54
- rescue GitFame::Error => e
55
- Trollop::die e.message
56
- rescue Timeout::Error
57
- Trollop::die "Maximum timeout of #{opts[:timeout]} sec exceed. Try passing --timeout=<sec> or -1 for no timeout"
58
- end
data/git_fame.gemspec DELETED
@@ -1,43 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/git_fame/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Linus Oleander"]
6
- gem.email = ["linus@oleander.nu"]
7
- gem.description = %q{Generates awesome stats from git-blame}
8
- gem.summary = %q{
9
- Generates awesome stats from git-blame
10
-
11
- A Ruby wrapper for git-blame.
12
- Generates data like:
13
- - Number of files changed by a user
14
- - Number of commits by user
15
- - Lines of code by a user
16
- }
17
-
18
- gem.homepage = "https://github.com/oleander/git-fame-rb"
19
-
20
- gem.files = `git ls-files`.split($\)
21
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
22
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
23
- gem.name = "git_fame"
24
- gem.require_paths = ["lib"]
25
- gem.version = GitFame::VERSION
26
-
27
- gem.add_dependency("progressbar", "~> 0.21.0")
28
- gem.add_dependency("trollop", "~> 2.1.2")
29
- gem.add_dependency("hirb", "~> 0.7.3")
30
- gem.add_dependency("scrub_rb", "~> 1.0.1")
31
- gem.add_dependency("memoist", "~> 0.14.0")
32
- gem.add_dependency("method_profiler", "~> 2.0.1")
33
-
34
- gem.add_development_dependency("rspec", "~> 3.4.0")
35
- gem.add_development_dependency("rspec-collection_matchers", "~> 1.1.2")
36
- gem.add_development_dependency("rake", "~> 10.4.2")
37
- gem.add_development_dependency("coveralls", "~> 0.8.1")
38
- gem.add_development_dependency("json", "~> 1.8.3")
39
- gem.add_development_dependency("tins", "~> 1.6.0")
40
- gem.add_development_dependency("term-ansicolor", "~> 1.3.2")
41
-
42
- gem.required_ruby_version = ">= 1.9.2"
43
- end