github_repo_statistics 2.2.26 → 2.2.28

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: fe90e8eefeb5f9b22cbd14a6bceb5868fe2f1bbbc7d46bd31482da2df8633e88
4
- data.tar.gz: 25e1ca4829be2bb25d3f8e768a225402bdccebe4543b9201d78a022cc75d3abd
3
+ metadata.gz: b5ac1d146486a2054b687baa929f806e6ba28538ed754d519863225a333e25bb
4
+ data.tar.gz: 341a0815ee930eacc8a8907491fe0b97d85926e2253d911c2ea934c1f8aaad21
5
5
  SHA512:
6
- metadata.gz: 4de4437a89cfa6d52ec70f629fe384008122a59eaf12a1c51d6910c3bd2afb4e01d6ebd82dfafbd050142046fbb3d131578d9b81881b8d0ed8fe1ff3508b599d
7
- data.tar.gz: 73bf82949318a30d167959e16999231c41d27409d18731e244b6f541db63367e2d9fc52f6e53edf2c13a169ef7fbe66e624b7b049f7eca839aabc086e4822143
6
+ metadata.gz: ce70326d2860322b6cef2f0732c9decb713478f68b8d6277ac6f302db49e4ff491d159aebc3caeabe7918b9fd4d69ff3448b1b5ff9dca89782a3a2715ff0a82c
7
+ data.tar.gz: 9a199a3ea3b90f8a75880b0f71d9ca6e9a27df8d759734cf75751d83d30301047550545caf49877c7c7c59f8fc2dbd1bb6608ab0db5a7a46522701ebfbd4a988
@@ -192,7 +192,6 @@ class GithubRepoStatistics
192
192
  filename = File.basename(file)
193
193
  commit_count = git_commit_count(file:, start_date:, end_date:).to_i
194
194
  git_log = git_commit_info(file:, start_date:, end_date:).split("\n")
195
- puts git_log if @debug
196
195
  teams = git_log.map do |team|
197
196
  team.match(/#{TEAM_REGEX}/)[0].upcase
198
197
  end.reject { |e| EXCLUSIONS&.include?(e) }
@@ -226,8 +225,8 @@ class GithubRepoStatistics
226
225
 
227
226
  def contribution_message
228
227
  duration_in_days = @duration_in_days.to_i
229
- start_date = @begin_time.to_time.to_i - duration_in_days * 86_400 - 30 * 86_400
230
- end_date = @begin_time.to_time.to_i - 30 * 86_400
228
+ start_date = @begin_time.to_time.to_i - duration_in_days * 86_400
229
+ end_date = @begin_time.to_time.to_i
231
230
  git_ls = git_files(directory_path: @directory_path)
232
231
  file_count = filter_existing_code_files(git_ls.split).count
233
232
  all_files_with_changes = files_with_changes(directory_path: @directory_path, start_date:, end_date:).split.sort
@@ -350,9 +349,9 @@ class GithubRepoStatistics
350
349
 
351
350
  return unless @steps.positive?
352
351
 
353
- system("git checkout `git rev-list -1 --before='#{(@begin_time - 115).strftime('%B %d %Y')}' HEAD`",
352
+ system("git checkout `git rev-list -1 --before='#{(@begin_time - duration_in_days).strftime('%B %d %Y')}' HEAD`",
354
353
  %i[out err] => File::NULL)
355
- @begin_time -= 115
354
+ @begin_time -= duration_in_days
356
355
  contribution_message
357
356
  end
358
357
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class GithubRepoStatistics
4
- VERSION = '2.2.26'
4
+ VERSION = '2.2.28'
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.26
4
+ version: 2.2.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret