git_stats 1.0.7 → 1.0.8
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.
- data/.gitignore +6 -1
- data/README.md +36 -1
- data/bin/git_stats +1 -2
- data/config/locales/de.yml +60 -0
- data/config/locales/de_default.yml +224 -0
- data/git_stats.gemspec +1 -1
- data/lib/git_stats/cli.rb +11 -20
- data/lib/git_stats/version.rb +1 -1
- metadata +5 -3
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -20,8 +20,43 @@ It browses the repository and outputs html page with statistics.
|
|
20
20
|
|
21
21
|
### Generator
|
22
22
|
|
23
|
+
#### Print help
|
24
|
+
|
23
25
|
$ git_stats
|
24
|
-
|
26
|
+
Commands:
|
27
|
+
git_stats generate # Generates the statistics of a repository
|
28
|
+
git_stats help [COMMAND] # Describe available commands or one specific command
|
29
|
+
|
30
|
+
#### Print help of the generate command
|
31
|
+
|
32
|
+
$ git_stats help generate
|
33
|
+
Usage:
|
34
|
+
git_stats generate
|
35
|
+
|
36
|
+
Options:
|
37
|
+
p, [--path=PATH] # Path to repository from which statistics should be generated.
|
38
|
+
# Default: .
|
39
|
+
o, [--output=OUTPUT] # Output path where statistics should be written.
|
40
|
+
# Default: ./git_stats
|
41
|
+
l, [--language=LANGUAGE] # Language of written statistics.
|
42
|
+
# Default: en
|
43
|
+
f, [--from=FROM] # Commit from where statistics should start.
|
44
|
+
t, [--to=TO] # Commit where statistics should stop.
|
45
|
+
# Default: HEAD
|
46
|
+
|
47
|
+
#### Start generator with default settings
|
48
|
+
|
49
|
+
$ git_stats generate
|
50
|
+
git rev-list --pretty=format:'%h|%at|%ai|%aE' HEAD | grep -v commit
|
51
|
+
git shortlog -se HEAD
|
52
|
+
...
|
53
|
+
|
54
|
+
#### Start generator with some parameters in long and short form.
|
55
|
+
|
56
|
+
$ git_stats generate -o stats --langugage de
|
57
|
+
git rev-list --pretty=format:'%h|%at|%ai|%aE' HEAD | grep -v commit
|
58
|
+
git shortlog -se HEAD
|
59
|
+
...
|
25
60
|
|
26
61
|
### API usage example
|
27
62
|
|
data/bin/git_stats
CHANGED
@@ -0,0 +1,60 @@
|
|
1
|
+
de:
|
2
|
+
project_name: Projektname
|
3
|
+
project_version: Generiert aus commit
|
4
|
+
generated_at: Generiert am
|
5
|
+
generator: Generiert durch
|
6
|
+
report_period: Berichtsperiode
|
7
|
+
total_files: Gesamtanzahl der Dateien
|
8
|
+
total_lines: Gesamtanzahl der Zeilen
|
9
|
+
total_commits: Gesamtanzahl der Commits
|
10
|
+
authors: Autoren
|
11
|
+
commits: Commits
|
12
|
+
commits_by_hour: Commits in der Stunde
|
13
|
+
files: Dateien
|
14
|
+
lines: Zeilen
|
15
|
+
files_by_date: Dateien nach Datum
|
16
|
+
lines_by_date: Zeilen nach Datum
|
17
|
+
files_by_extension: Dateien nach Erweiterungen
|
18
|
+
lines_by_extension: Zeilen nach Erweiterungen
|
19
|
+
hour_of_day: Tagesstunden
|
20
|
+
hour: Stunde
|
21
|
+
percentage: Prozent
|
22
|
+
day: Tag
|
23
|
+
day_of_week: Wochentagen
|
24
|
+
hour_of_week: Tagesstunden und Woche
|
25
|
+
month: Monat
|
26
|
+
month_of_year: Monaten im Jahr
|
27
|
+
year_month: Monaten und Jahr
|
28
|
+
commits_by_wday: Commits am Wochentag
|
29
|
+
commits_by_month: Commits im Monat
|
30
|
+
commits_by_year_month: Commits nach Jahr und Monat
|
31
|
+
commits_by_month_of_year: Commits pro Monat des Jahres
|
32
|
+
year: Jahr
|
33
|
+
commits_by_year: Commits im Jahr
|
34
|
+
activity: Aktivitäten
|
35
|
+
activity_by_date: Datum
|
36
|
+
commits_by_date: Commits am Datum
|
37
|
+
insertions_by_author: Zeilen hinzufügt von Autor
|
38
|
+
deletions_by_author: Zeilen gelöscht von Autor
|
39
|
+
changed_lines_by_author: Geänderte Zeilen von Autor
|
40
|
+
best_authors_shown: aktivsten Autoren werden angezeigt
|
41
|
+
commits_count_by_author: Commits eines Autors
|
42
|
+
commits_sum_by_author_by_date: Commits nach Autor und Datum
|
43
|
+
insertions_by_author_by_date: Hinzugefügte Zeilen pro Autor und Datum
|
44
|
+
deletions_by_author_by_date: Gelöschte Zeilen pro Autor und Datum
|
45
|
+
changed_lines_by_author_by_date: Geänderte Zeilen pro Autor und Datum
|
46
|
+
best_authors: Aktivste Autoren
|
47
|
+
insertions: Zeilen hinzugefügt
|
48
|
+
deletions: Zeilen gelöscht
|
49
|
+
first_commit: Erster commit
|
50
|
+
last_commit: Letzter commit
|
51
|
+
author: Autor
|
52
|
+
show_more: Mehr
|
53
|
+
close: Schliessen
|
54
|
+
binary: Binär
|
55
|
+
text: Text
|
56
|
+
general: Allgemein
|
57
|
+
details: Details
|
58
|
+
insertions_by_date: Zeilen hinzugefügt pro Datum
|
59
|
+
deletions_by_date: Zeilen gelöscht pro Datum
|
60
|
+
changed_lines_by_date: Geänderte Zeilen pro Datum
|
@@ -0,0 +1,224 @@
|
|
1
|
+
de:
|
2
|
+
date:
|
3
|
+
abbr_day_names:
|
4
|
+
- So
|
5
|
+
- Mo
|
6
|
+
- Di
|
7
|
+
- Mi
|
8
|
+
- Do
|
9
|
+
- Fr
|
10
|
+
- Sa
|
11
|
+
abbr_month_names:
|
12
|
+
-
|
13
|
+
- Jan
|
14
|
+
- Feb
|
15
|
+
- Mär
|
16
|
+
- Apr
|
17
|
+
- Mai
|
18
|
+
- Jun
|
19
|
+
- Jul
|
20
|
+
- Aug
|
21
|
+
- Sep
|
22
|
+
- Okt
|
23
|
+
- Nov
|
24
|
+
- Dez
|
25
|
+
day_names:
|
26
|
+
- Sonntag
|
27
|
+
- Montag
|
28
|
+
- Dienstag
|
29
|
+
- Mittwoch
|
30
|
+
- Donnerstag
|
31
|
+
- Freitag
|
32
|
+
- Samstag
|
33
|
+
formats:
|
34
|
+
default: ! '%d. %m. %Y'
|
35
|
+
long: ! '%d. %B %Y'
|
36
|
+
short: ! '%d %b'
|
37
|
+
month_names:
|
38
|
+
-
|
39
|
+
- Januar
|
40
|
+
- Februar
|
41
|
+
- März
|
42
|
+
- April
|
43
|
+
- Mai
|
44
|
+
- Juni
|
45
|
+
- Juli
|
46
|
+
- August
|
47
|
+
- September
|
48
|
+
- Oktober
|
49
|
+
- November
|
50
|
+
- Dezember
|
51
|
+
order:
|
52
|
+
- :day
|
53
|
+
- :month
|
54
|
+
- :year
|
55
|
+
datetime:
|
56
|
+
distance_in_words:
|
57
|
+
about_x_hours:
|
58
|
+
few: wenige %{count} Stunden
|
59
|
+
one: eine Stunde
|
60
|
+
other: '%{count} Stunden'
|
61
|
+
many: '%{count} Stunden'
|
62
|
+
about_x_months:
|
63
|
+
few: wenige %{count} Monate
|
64
|
+
one: ein Monat
|
65
|
+
other: '%{count} Monate'
|
66
|
+
many: '%{count} Monate'
|
67
|
+
about_x_years:
|
68
|
+
few: wenige %{count} Jahre
|
69
|
+
one: ein Jahr
|
70
|
+
other: '%{count} Jahre'
|
71
|
+
many: '%{count} Jahre'
|
72
|
+
almost_x_years:
|
73
|
+
few: fast %{count} Jahre
|
74
|
+
one: fast ein Jahr
|
75
|
+
other: fast %{count} Jahre'
|
76
|
+
many: fast %{count} Jahre
|
77
|
+
half_a_minute: eine halbe Minute
|
78
|
+
less_than_x_minutes:
|
79
|
+
few: weniger als %{count} Minuten
|
80
|
+
one: weniger als eine Minute
|
81
|
+
other: weniger als %{count} Minuten
|
82
|
+
many: weniger als %{count} Minuten
|
83
|
+
less_than_x_seconds:
|
84
|
+
few: weniger als %{count} Sekunden
|
85
|
+
one: weniger als eine Sekunde
|
86
|
+
other: weniger als %{count} Sekunden
|
87
|
+
many: weniger als %{count} Sekunden
|
88
|
+
over_x_years:
|
89
|
+
few: mehr als %{count} Jahre
|
90
|
+
one: mehr als ein Jahr
|
91
|
+
other: mehr als %{count} Jahre
|
92
|
+
many: mehr als %{count} Jahre
|
93
|
+
x_days:
|
94
|
+
few: ! '%{count} Tage'
|
95
|
+
one: 1 Tag
|
96
|
+
other: ! '%{count} Tage'
|
97
|
+
many: ! '%{count} Tage'
|
98
|
+
x_minutes:
|
99
|
+
few: ! '%{count} Minuten'
|
100
|
+
one: 1 Minute
|
101
|
+
other: ! '%{count} Minuten'
|
102
|
+
many: ! '%{count} Minuten'
|
103
|
+
x_months:
|
104
|
+
few: ! '%{count} Monate'
|
105
|
+
one: 1 Monat
|
106
|
+
other: ! '%{count} Monate'
|
107
|
+
many: ! '%{count} Monate'
|
108
|
+
x_seconds:
|
109
|
+
few: ! '%{count} Sekunden'
|
110
|
+
one: 1 Sekunde
|
111
|
+
other: ! '%{count} Sekunden'
|
112
|
+
many: ! '%{count} Sekunden'
|
113
|
+
prompts:
|
114
|
+
day: Tag
|
115
|
+
hour: Stunde
|
116
|
+
minute: Minute
|
117
|
+
month: Monat
|
118
|
+
second: Sekunde
|
119
|
+
year: Jahr
|
120
|
+
errors: &errors
|
121
|
+
format: ! '%{attribute} %{message}'
|
122
|
+
messages:
|
123
|
+
accepted: Muss akzeptiert werden
|
124
|
+
blank: Darf nicht leer sein
|
125
|
+
confirmation: Stimmt nicht mit der Bestätigung überein
|
126
|
+
empty: Darf nicht leer sein
|
127
|
+
equal_to: Muss gleich %{count} sein
|
128
|
+
even: Muss gerade sein
|
129
|
+
exclusion: Ist reserviert
|
130
|
+
greater_than: Muss größer als %{count} sein
|
131
|
+
greater_than_or_equal_to: Muss größer oder gleich %{count} sein
|
132
|
+
inclusion: Ist nicht auf der Liste der zulässigen Werte
|
133
|
+
invalid: Ist ungültig
|
134
|
+
less_than: Muss kleiner sein als %{count}
|
135
|
+
less_than_or_equal_to: Muss kleiner oder gleich %{count} sein
|
136
|
+
not_a_number: Ist keine Zahl
|
137
|
+
not_an_integer: Ist keine ganze Zahl
|
138
|
+
odd: Muss ungerade sein
|
139
|
+
record_invalid: ! 'Eintrag ungültig: %{errors}'
|
140
|
+
taken: bereits in Verwendung
|
141
|
+
too_long: Ist zu lang (Darf nicht länger als %{count} Zeichen sein)
|
142
|
+
too_short: Ist zu kurz (Darf nicht kürzer als %{count} Zeichen sein)
|
143
|
+
wrong_length: Falsche länge (Sollte %{count} Zeichen lang sein)
|
144
|
+
template:
|
145
|
+
body: ! 'Błędy dotyczą następujących pól:'
|
146
|
+
header:
|
147
|
+
one: ! '%{model} nie został zachowany z powodu jednego błędu'
|
148
|
+
few: ! '%{model} nie został zachowany z powodu %{count} błędów'
|
149
|
+
other: ! '%{model} nie został zachowany z powodu %{count} błędów'
|
150
|
+
helpers:
|
151
|
+
select:
|
152
|
+
prompt: Bitte wählen sie
|
153
|
+
submit:
|
154
|
+
create: Erstellen %{model}
|
155
|
+
submit: Speichern %{model}
|
156
|
+
update: Aktualisieren %{model}
|
157
|
+
number:
|
158
|
+
currency:
|
159
|
+
format:
|
160
|
+
delimiter: ! ' '
|
161
|
+
format: ! '%u %n'
|
162
|
+
precision: 2
|
163
|
+
separator: ! ','
|
164
|
+
significant: false
|
165
|
+
strip_insignificant_zeros: true
|
166
|
+
unit: EUR
|
167
|
+
format:
|
168
|
+
delimiter: ! ' '
|
169
|
+
precision: 3
|
170
|
+
separator: ! ','
|
171
|
+
significant: false
|
172
|
+
strip_insignificant_zeros: false
|
173
|
+
human:
|
174
|
+
decimal_units:
|
175
|
+
format: ! '%n %u'
|
176
|
+
units:
|
177
|
+
billion: Billion
|
178
|
+
million: Million
|
179
|
+
quadrillion: Billard
|
180
|
+
thousand: Tausend
|
181
|
+
trillion: Billionen
|
182
|
+
unit: ''
|
183
|
+
format:
|
184
|
+
delimiter: ''
|
185
|
+
precision: 3
|
186
|
+
significant: true
|
187
|
+
strip_insignificant_zeros: true
|
188
|
+
storage_units:
|
189
|
+
format: ! '%n %u'
|
190
|
+
units:
|
191
|
+
byte:
|
192
|
+
one: Byte
|
193
|
+
few: Bytes
|
194
|
+
many: Bytes
|
195
|
+
other: Bytes
|
196
|
+
gb: GB
|
197
|
+
kb: KB
|
198
|
+
mb: MB
|
199
|
+
tb: TB
|
200
|
+
percentage:
|
201
|
+
format:
|
202
|
+
delimiter: ''
|
203
|
+
precision:
|
204
|
+
format:
|
205
|
+
delimiter: ''
|
206
|
+
support:
|
207
|
+
array:
|
208
|
+
last_word_connector: ! ' und '
|
209
|
+
two_words_connector: ! ' - '
|
210
|
+
words_connector: ! ', '
|
211
|
+
time:
|
212
|
+
am: vormittags
|
213
|
+
formats:
|
214
|
+
default: ! '%a, %d. %b %Y %H:%M:%S %z'
|
215
|
+
long: ! '%d. %B %Y %H:%M'
|
216
|
+
short: ! '%d. %b %H:%M'
|
217
|
+
pm: nachmittags
|
218
|
+
# remove these aliases after 'activemodel' and 'activerecord' namespaces are removed from Rails repository
|
219
|
+
activemodel:
|
220
|
+
errors:
|
221
|
+
<<: *errors
|
222
|
+
activerecord:
|
223
|
+
errors:
|
224
|
+
<<: *errors
|
data/git_stats.gemspec
CHANGED
data/lib/git_stats/cli.rb
CHANGED
@@ -1,27 +1,18 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
require "git_stats"
|
3
|
-
require "
|
3
|
+
require "thor"
|
4
4
|
|
5
|
-
class GitStats::CLI
|
5
|
+
class GitStats::CLI < Thor
|
6
|
+
option :path, :aliases => :p, :default => '.', :desc => 'Path to repository from which statistics should be generated.'
|
7
|
+
option :output, :aliases => :o, :default => './git_stats', :desc => 'Output path where statistics should be written.'
|
8
|
+
option :language, :aliases => :l, :default => 'en', :desc => 'Language of written statistics.'
|
9
|
+
option :from, :aliases => :f, :desc => 'Commit from where statistics should start.'
|
10
|
+
option :to, :aliases => :t, :default => 'HEAD', :desc => 'Commit where statistics should stop.'
|
6
11
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
q.validate = lambda { |p| GitStats::Validator.new.valid_repo_path?(p) }
|
12
|
-
q.responses[:not_valid] = "Given path is not a git repository, try again"
|
13
|
-
}
|
14
|
-
|
15
|
-
out_path = ask("Output dir? ") { |q| q.default = "./git_stats" }
|
16
|
-
I18n.locale = ask("Language? ") { |q| q.default = "en"; q.answer_type = Symbol }
|
17
|
-
specify_range = agree("Want to specify commits range? ") { |q| q.default = "no" }
|
18
|
-
|
19
|
-
if specify_range
|
20
|
-
first_commit_sha = ask("Starting commit sha? ") { |q| q.default = nil }
|
21
|
-
last_commit_sha = ask("Ending commit sha? ") { |q| q.default = "HEAD" }
|
22
|
-
end
|
23
|
-
|
24
|
-
GitStats::Generator.new(repo_path, out_path, first_commit_sha, last_commit_sha) { |g|
|
12
|
+
desc 'generate', 'Generates the statistics of a repository'
|
13
|
+
def generate
|
14
|
+
I18n.locale = options[:language]
|
15
|
+
GitStats::Generator.new(options[:path], options[:output], options[:from], options[:to]) { |g|
|
25
16
|
g.add_command_observer { |command, result| puts "#{command}" }
|
26
17
|
}.render_all
|
27
18
|
end
|
data/lib/git_stats/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
111
|
+
name: thor
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
@@ -139,6 +139,8 @@ files:
|
|
139
139
|
- README.md
|
140
140
|
- Rakefile
|
141
141
|
- bin/git_stats
|
142
|
+
- config/locales/de.yml
|
143
|
+
- config/locales/de_default.yml
|
142
144
|
- config/locales/en.yml
|
143
145
|
- config/locales/pl.yml
|
144
146
|
- config/locales/pl_default.yml
|