rubocop-changes 0.8.0 → 0.8.1

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: '09daace2e31cf1451cba68fe23ac1c6ab439f281b23d1634c004fe316b67cd8e'
4
- data.tar.gz: dc982a2074301f56ad4658c97cd09b9e2f657498476d52c60d2bea242f60b32e
3
+ metadata.gz: 50ba12f7f5d19c871a2d3ea88b3e04f08dc568e3c662d6250c32e4a524d5bf9f
4
+ data.tar.gz: c1b438aeea0f9796093617663b00c737a6bc1325fe4e0593125318de005f0422
5
5
  SHA512:
6
- metadata.gz: cc9ccaf62d221526a6405f8e57a8b4c7b5ede8963a43b5793ab4013914da4eca6535f4c00c55d32038dddde15e7966f5e7c280615ab8900f57fdfb308db19f2c
7
- data.tar.gz: a1d648e0776098ceb27e23d0f3efb6742d7b71fef4cfb28e628e8e0f9f4cd5d64daf829a8782196306519322cba50afa6c2c2585c896612595674b2f85e6565a
6
+ metadata.gz: 598a1939a20f292b1ece470057e7ba633ce5721a3c0950efa45aef16e138fe0f89e4d4c910d46052ba51da5d13af8d64e26820a72bab55c466e491796dfc1127
7
+ data.tar.gz: 56193641cd04df8b28c120ed3bf638da9dddcaae43b8a86f3e9621d3672c4454b38307a1ffec3d9335e6baaa30b8a57c5c2ca374f339419ceb8e4ed32ce00c47
@@ -73,11 +73,7 @@ module Rubocop
73
73
 
74
74
  def ruby_changed_files_from_pwd
75
75
  ruby_changed_files.map do |path|
76
- if path_prefix
77
- path.gsub(/^#{path_prefix}\//, '')
78
- else
79
- path
80
- end
76
+ from_pwd_path(path)
81
77
  end
82
78
  end
83
79
 
@@ -110,7 +106,7 @@ module Rubocop
110
106
 
111
107
  def checks
112
108
  @checks ||= ruby_changed_files.map do |file|
113
- analysis = rubocop_json.files.find { |item| item.path == file }
109
+ analysis = rubocop_json.files.find { |item| item.path == from_pwd_path(file) }
114
110
  patch = patches.find { |item| item.file == file }
115
111
 
116
112
  next unless analysis
@@ -169,6 +165,14 @@ module Rubocop
169
165
 
170
166
  formatter.file_finished(check.path, offenses)
171
167
  end
168
+
169
+ def from_pwd_path(path)
170
+ if path_prefix
171
+ path.gsub(/^#{path_prefix}\//, '')
172
+ else
173
+ path
174
+ end
175
+ end
172
176
  end
173
177
  end
174
178
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Changes
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-changes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferran Basora
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-24 00:00:00.000000000 Z
11
+ date: 2023-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git_diff_parser