git_stats 1.0.15 → 1.0.16
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/config/locales/en.yml +0 -2
- data/lib/git_stats/git_data/repo.rb +3 -50
- data/lib/git_stats/stats_view/charts/charts.rb +1 -1
- data/lib/git_stats/stats_view/charts/repo_charts.rb +0 -20
- data/lib/git_stats/version.rb +1 -1
- data/templates/files/_files.haml +0 -4
- data/templates/lines/_lines.haml +0 -4
- metadata +3 -5
- data/templates/files/by_extension_by_date.haml +0 -1
- data/templates/lines/by_extension_by_date.haml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3a003685f7b47cb6b6256a7951099ec368bf6a7
|
4
|
+
data.tar.gz: 883ae7b7b08353c91578dec6e6fc86ceb1ad46fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3643fba4be11cec8f41b44d8c5a3f41da82dc6e5db46b33ed3834c7a6f6e75f72407c95e0d27856b2821979cb5a862ea54a9500143e23f6d505dbe73b98a0066
|
7
|
+
data.tar.gz: e9e29ff480c83991064e5d4c855a00959896692d485383a5e4d57a18cbac94f7f49e0976f35dd6a56f0315a20b488ff40abea08df21af02c9659d92f53e31940
|
data/config/locales/en.yml
CHANGED
@@ -39,10 +39,6 @@ module GitStats
|
|
39
39
|
@tree ||= Tree.new(repo: self, relative_path: @tree_path)
|
40
40
|
end
|
41
41
|
|
42
|
-
def command_memoization
|
43
|
-
@command_memoization_map ||= {}
|
44
|
-
end
|
45
|
-
|
46
42
|
def authors
|
47
43
|
@authors ||= run_and_parse("git shortlog -se #{commit_range} #{tree_path}").map do |author|
|
48
44
|
Author.new(repo: self, name: author[:name], email: author[:email])
|
@@ -99,44 +95,6 @@ module GitStats
|
|
99
95
|
}].fill_empty_days!(aggregated: true)
|
100
96
|
end
|
101
97
|
|
102
|
-
def files_by_extension_by_date
|
103
|
-
file_counts_by_date_by_extension = {}
|
104
|
-
extensions_sums = {}
|
105
|
-
commits.map do |commit|
|
106
|
-
commit.files_by_extension_count.map do |ext, count|
|
107
|
-
extensions_sums[ext] ||= 0;
|
108
|
-
extensions_sums[ext] = count;
|
109
|
-
file_counts_by_date_by_extension[ext] ||= {};
|
110
|
-
file_counts_by_date_by_extension[ext][commit.date.to_date] = extensions_sums[ext]
|
111
|
-
end
|
112
|
-
end
|
113
|
-
@multi_data_file_counts_by_date ||= file_counts_by_date_by_extension.map { |ext, data|
|
114
|
-
{
|
115
|
-
name: ext || "NO EXTENSION",
|
116
|
-
data: data.fill_empty_days!(aggregated:true)
|
117
|
-
}
|
118
|
-
}
|
119
|
-
end
|
120
|
-
|
121
|
-
def lines_by_extension_by_date
|
122
|
-
lines_by_date_by_extension = {}
|
123
|
-
extensions_sums = {}
|
124
|
-
commits.map do |commit|
|
125
|
-
commit.lines_by_extension.map do |ext, count|
|
126
|
-
extensions_sums[ext] ||= 0;
|
127
|
-
extensions_sums[ext] = count;
|
128
|
-
lines_by_date_by_extension[ext] ||= {};
|
129
|
-
lines_by_date_by_extension[ext][commit.date.to_date] = extensions_sums[ext]
|
130
|
-
end
|
131
|
-
end
|
132
|
-
@multi_data_lines_by_date ||= lines_by_date_by_extension.map { |ext, data|
|
133
|
-
{
|
134
|
-
name: ext || "NO EXTENSION",
|
135
|
-
data: data.fill_empty_days!(aggregated:true)
|
136
|
-
}
|
137
|
-
}
|
138
|
-
end
|
139
|
-
|
140
98
|
def last_commit
|
141
99
|
commits.last
|
142
100
|
end
|
@@ -166,14 +124,9 @@ module GitStats
|
|
166
124
|
end
|
167
125
|
|
168
126
|
def run(command)
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
result = command_runner.run(path, command)
|
173
|
-
invoke_command_observers(command, result)
|
174
|
-
command_memoization[command] = result
|
175
|
-
result
|
176
|
-
end
|
127
|
+
result = command_runner.run(path, command)
|
128
|
+
invoke_command_observers(command, result)
|
129
|
+
result
|
177
130
|
end
|
178
131
|
|
179
132
|
def run_and_parse(command)
|
@@ -3,7 +3,7 @@ module GitStats
|
|
3
3
|
module StatsView
|
4
4
|
module Charts
|
5
5
|
class All
|
6
|
-
delegate :files_by_extension, :
|
6
|
+
delegate :files_by_extension, :lines_by_extension, :files_by_date, :lines_by_date, :comments_by_date, to: :repo_charts
|
7
7
|
|
8
8
|
delegate :commits_sum_by_author_by_date, :changed_lines_by_author_by_date,
|
9
9
|
:insertions_by_author_by_date, :deletions_by_author_by_date, to: :authors_charts
|
@@ -27,26 +27,6 @@ module GitStats
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def files_by_extension_by_date
|
31
|
-
Chart.new do |f|
|
32
|
-
f.multi_date_chart(
|
33
|
-
data: @repo.files_by_extension_by_date,
|
34
|
-
title: :files_by_extension_by_date.t,
|
35
|
-
y_text: :files.t
|
36
|
-
)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def lines_by_extension_by_date
|
41
|
-
Chart.new do |f|
|
42
|
-
f.multi_date_chart(
|
43
|
-
data: @repo.lines_by_extension_by_date,
|
44
|
-
title: :lines_by_extension_by_date.t,
|
45
|
-
y_text: :files.t
|
46
|
-
)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
30
|
def files_by_date
|
51
31
|
Chart.new do |f|
|
52
32
|
f.date_chart(
|
data/lib/git_stats/version.rb
CHANGED
data/templates/files/_files.haml
CHANGED
@@ -4,8 +4,6 @@
|
|
4
4
|
%a{:href => 'by_date.html'}= :files_by_date.t
|
5
5
|
%li{class: page == :files_by_extension ? "active" : ""}
|
6
6
|
%a{:href => 'by_extension.html'}= :files_by_extension.t
|
7
|
-
%li{class: page == :files_by_extension_by_date ? "active" : ""}
|
8
|
-
%a{:href => 'by_extension_by_date.html'}= :files_by_extension_by_date.t
|
9
7
|
|
10
8
|
.tab-content
|
11
9
|
.tab-pane.active
|
@@ -15,5 +13,3 @@
|
|
15
13
|
= high_stock("files_by_date", charts.files_by_date)
|
16
14
|
- elsif page == :files_by_extension
|
17
15
|
= high_chart("files_by_extension", charts.files_by_extension)
|
18
|
-
- elsif page == :files_by_extension_by_date
|
19
|
-
= high_stock("files_by_extension_by_date", charts.files_by_extension_by_date)
|
data/templates/lines/_lines.haml
CHANGED
@@ -4,8 +4,6 @@
|
|
4
4
|
%a{:href => 'by_date.html'}= :lines_by_date.t
|
5
5
|
%li{class: page == :lines_by_extension ? "active" : ""}
|
6
6
|
%a{:href => 'by_extension.html'}= :lines_by_extension.t
|
7
|
-
%li{class: page == :lines_by_extension_by_date ? "active" : ""}
|
8
|
-
%a{:href => 'by_extension_by_date.html'}= :lines_by_extension_by_date.t
|
9
7
|
|
10
8
|
.tab-content
|
11
9
|
.tab-pane.active
|
@@ -15,5 +13,3 @@
|
|
15
13
|
= high_stock("lines_by_date", charts.lines_by_date)
|
16
14
|
- elsif page == :lines_by_extension
|
17
15
|
= high_chart("lines_by_extension", charts.lines_by_extension)
|
18
|
-
- elsif page == :lines_by_extension_by_date
|
19
|
-
= high_stock("lines_by_extension_by_date", charts.lines_by_extension_by_date)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Gieniusz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -235,13 +235,11 @@ files:
|
|
235
235
|
- templates/files/_files.haml
|
236
236
|
- templates/files/by_date.haml
|
237
237
|
- templates/files/by_extension.haml
|
238
|
-
- templates/files/by_extension_by_date.haml
|
239
238
|
- templates/general.haml
|
240
239
|
- templates/layout.haml
|
241
240
|
- templates/lines/_lines.haml
|
242
241
|
- templates/lines/by_date.haml
|
243
242
|
- templates/lines/by_extension.haml
|
244
|
-
- templates/lines/by_extension_by_date.haml
|
245
243
|
- templates/static/index.html
|
246
244
|
homepage: https://github.com/tomgi/git_stats
|
247
245
|
licenses: []
|
@@ -262,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
260
|
version: '0'
|
263
261
|
requirements: []
|
264
262
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.6.
|
263
|
+
rubygems_version: 2.6.14
|
266
264
|
signing_key:
|
267
265
|
specification_version: 4
|
268
266
|
summary: HTML statistics generator from git repository
|
@@ -1 +0,0 @@
|
|
1
|
-
= render_partial('files/_files', page: :files_by_extension_by_date)
|
@@ -1 +0,0 @@
|
|
1
|
-
= render_partial('lines/_lines', page: :lines_by_extension_by_date)
|