github_repo_statistics 2.2.17 → 2.2.19
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd943ea94b333a76e1f0996523684e8fb8120fb9a8843cc616507b0947abba5c
|
4
|
+
data.tar.gz: 82269628bf2e56aa72145843bd34f0cf70d9bc0084107f8504706a7af087d439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366fb57664251fe8aa708e6e2c1af6cebbab3299d0757a8e6a8bfd242d1e7421343dd3410efe124a88cc95a6060071c6430ca111382632d671c9fa6a4095f0cd
|
7
|
+
data.tar.gz: e1aec28c13d79b17da825803ea0d11875939d129fc475a004ab4b0e37edc1761bbbcc2f33006cc3b4685a9f82af95db6ae9186ea39505353d7fd6c22ef8afc7f
|
@@ -214,12 +214,12 @@ class GithubRepoStatistics
|
|
214
214
|
file_team_map]
|
215
215
|
end
|
216
216
|
|
217
|
-
def filter_files(file_team_map:)
|
217
|
+
def filter_files(file_team_map:, size: BIG_FILE_SIZE)
|
218
218
|
file_team_map.select do |file_path|
|
219
219
|
next unless File.exist?(file_path)
|
220
220
|
|
221
221
|
# Check if the file size is more than BIG_FILE_SIZE lines (excluding empty and commented lines)
|
222
|
-
File.foreach(file_path).reject { |line| line.match(%r{^\s*(//|/\*.*\*/|\s*$)}) }.count >
|
222
|
+
File.foreach(file_path).reject { |line| line.match(%r{^\s*(//|/\*.*\*/|\s*$)}) }.count > size.to_i
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
@@ -316,7 +316,7 @@ class GithubRepoStatistics
|
|
316
316
|
if HOTSPOT
|
317
317
|
hotspot_output = []
|
318
318
|
|
319
|
-
|
319
|
+
filter_files(file_team_map: file_team_map, size: 0).each do |line|
|
320
320
|
file = line.first
|
321
321
|
contributors = line.last.first
|
322
322
|
lines_of_code = count_lines_of_code(file)
|
@@ -326,7 +326,7 @@ class GithubRepoStatistics
|
|
326
326
|
hotspot_output << [file.gsub(@directory_path, ''), contributors, lines_of_code, commits, owner]
|
327
327
|
end
|
328
328
|
|
329
|
-
hotspot_output.sort_by! { |row| row[2] }
|
329
|
+
hotspot_output.sort_by! { |row| -row[2] }
|
330
330
|
|
331
331
|
if FILE_OUTPUT
|
332
332
|
CSV.open('hotspot.csv', 'w') do |csv|
|