github_repo_statistics 2.2.17 → 2.2.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8169d892f1d72c50d184868f6857ca0025b01cd15331e686f7df54b6f202aee
4
- data.tar.gz: 9e459684119ab981629054fe8f4c3896f9f4d3dad3901af315ba2bcb4582191c
3
+ metadata.gz: cd943ea94b333a76e1f0996523684e8fb8120fb9a8843cc616507b0947abba5c
4
+ data.tar.gz: 82269628bf2e56aa72145843bd34f0cf70d9bc0084107f8504706a7af087d439
5
5
  SHA512:
6
- metadata.gz: 1564877229312ef1fee2c1fac355fe4e1c6df216523e368665c626f768e5215acf02a934a3785dce7971862d803f5835dc3d0fdc58e670d004eea109d27e9c30
7
- data.tar.gz: 40949fa763572d6c16a12af50019a7c4eb29d4a273808c114bbf451abf5d4c61b2e64df488202bb191069cb18ce941665d3d697fcae60e83070e3f075433298c
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 > BIG_FILE_SIZE.to_i
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
- filtered_top_touched_files.each do |line|
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class GithubRepoStatistics
4
- VERSION = '2.2.17'
4
+ VERSION = '2.2.19'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_repo_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.17
4
+ version: 2.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret