git_ownership_insights 1.0.0 → 1.0.2

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: 4bca095a91102d5a60161e08921ba7af125dfc7a5ee528bd527ab57720814d62
4
- data.tar.gz: 39e9afe47d9af3c4e1b49a084001c52bef8b55f8f8ee9057bd264c000e466fba
3
+ metadata.gz: 2fa8a6909c32117aee3b0472a09e345027761f5e76ba9a3802b3207ec6305dc7
4
+ data.tar.gz: add3ba1c16614cf20908fdc71188e9ec1b16f672a9953727c78e87171ae1fed9
5
5
  SHA512:
6
- metadata.gz: 207a6053d21c89408c33ca31068ae8d2fb2a88b7bf4bd63d5cdbdafbcbffc6e3df05bee91142adb88030cb2befe7cbfe48258a9a70fd4a952cfa0f3ef2601aed
7
- data.tar.gz: 10f59df955f3a5321cf046761303befc0260490069a81cbe40d505ffa82a19dd03d2b03896f7cdd882a39b3a29cc686c6cf911ff1c196abaceb7607ddacaab59
6
+ metadata.gz: e0b2d324e4063100bb30851dc221034d5caab9c1a80c5164ef23dd38e81ed8614f80b901e2f6f307cfd739b4a6481b1146575c340671a8a8a8b35ab01def9ed9
7
+ data.tar.gz: 0fcb12355a628464d748e191068b67c3e7c09aac0ce3088c70fc3fb3409d55dd54bc2f5d877e871283c6296ea475533ecf69759876f0e84ddf9fe42d30866b04
@@ -172,14 +172,18 @@ def contribution_message(directory_path:, duration_in_days:, begin_time:, debug:
172
172
  end_date = begin_time.to_time.to_i
173
173
  file_count = `git ls-tree -r --name-only $(git rev-list -1 --since="#{start_date}" --until="#{end_date}" HEAD) -- "#{directory_path}" | wc -l`.to_i
174
174
  all_files_with_changes = `git log --name-only --pretty=format:"" --since="#{start_date}" --until="#{end_date}" "#{directory_path}"`.split.sort
175
- excluded_patterns = EXCLUDED_FILES.split(',')
175
+ excluded_patterns = EXCLUDED_FILES.split(',') if EXCLUDED_FILES
176
176
 
177
177
  code_files_with_changes = all_files_with_changes.select {|f|
178
178
  extension = File.extname(f)
179
179
  valid_extensions = CODE_EXTENSIONS
180
180
  valid_extensions.include?(extension)
181
- }.reject do |file|
182
- excluded_patterns.any? { |pattern| file.include?(pattern) }
181
+ }
182
+
183
+ if EXCLUDED_FILES
184
+ code_files_with_changes = code_files_with_changes.reject do |file|
185
+ excluded_patterns.any? { |pattern| file.include?(pattern) }
186
+ end
183
187
  end
184
188
 
185
189
  uniq_code_files_with_changes = code_files_with_changes.uniq
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitOwnershipInsights
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_ownership_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret