rubocop_todo_corrector 0.18.1 → 0.18.3

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: 57573b0734b4b32b2c94e04d4735c9560cf302204e7c66b0b5b430dcf2fe8e14
4
- data.tar.gz: fd9861087debb3c34df198419314073847e96b20f0e8caa73ab61287b0eaefab
3
+ metadata.gz: 25ac7e09590def3db785d3533f3fe869a7f77435bbae9c1c9d793f1af4e50eda
4
+ data.tar.gz: 6cb4c47b631d5eaaa20a577ea0d6cce9dec0385c699e7c9268bcbdafe4a64ba3
5
5
  SHA512:
6
- metadata.gz: 90457ae589051d5c16fc4da8381deac6c6b491ac1f8dbb6b13234ace5cc9057f4a0c7d4a264171045432b660437d0fbb9880c535d982a115f6c9287a22f56307
7
- data.tar.gz: '05823f208211ab9e65d6ffc20a8b803e017998a06ef3a0e1ff71687846bd15a47dc928c31ee87f27512922ccea5d8cd06a9eca8fa37f908a970a57018b551a67'
6
+ metadata.gz: 5669d1961eeed46cbe0d94932aee83b5d49bf2c71de04e07b5b13b1eecd28ae5103fd19d5b589e6fd1c2b1d579addd1d01757089e724c556252a96da74b6b894
7
+ data.tar.gz: ce24d57dcf9c4a21a2204f2e8d5d9c8d59edeba738d8ca97f38b072c74807234e935db178d1d9a0387c39fcd661c0491253981f2ceac95531a58b9acf4575ae7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_todo_corrector (0.18.1)
4
+ rubocop_todo_corrector (0.18.3)
5
5
  asciidoctor
6
6
  bundler
7
7
  thor
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
+ require 'shellwords'
4
5
  require 'yaml'
5
6
 
6
7
  module RubocopTodoCorrector
@@ -57,16 +58,11 @@ module RubocopTodoCorrector
57
58
  ::Kernel.system(
58
59
  { 'BUNDLE_GEMFILE' => @temporary_gemfile_path },
59
60
  [
60
- 'bundle exec rubocop --force-exclusion', autocorrect_option, *excluded_file_paths
61
+ 'bundle exec rubocop --force-exclusion', autocorrect_option, paths_option
61
62
  ].join(' ')
62
63
  )
63
64
  end
64
65
 
65
- # @return [String]
66
- def autocorrect_arguments
67
- ::Shellwords.shelljoin(excluded_file_paths)
68
- end
69
-
70
66
  # @return [String]
71
67
  def autocorrect_option
72
68
  if @only_safe
@@ -81,15 +77,19 @@ module RubocopTodoCorrector
81
77
  raise "#{rubocop_todo_pathname.to_s.inspect} does not exist." unless rubocop_todo_pathname.exist?
82
78
  end
83
79
 
84
- # @return [Array<String>]
80
+ # @return [Array<String>, nil]
85
81
  def excluded_file_paths
82
+ return @excluded_file_paths if defined?(@excluded_file_paths)
83
+
86
84
  cop_section = rubocop_todo_sections.grep(/^#{@cop_name}:/).first
87
85
  raise unless cop_section
88
86
 
89
- paths = ::YAML.safe_load(cop_section).dig(@cop_name, 'Exclude')
90
- raise unless paths
87
+ @excluded_file_paths = ::YAML.safe_load(cop_section).dig(@cop_name, 'Exclude')
88
+ end
91
89
 
92
- paths
90
+ # @return [String, nil]
91
+ def paths_option
92
+ ::Shellwords.shelljoin(excluded_file_paths) if excluded_file_paths
93
93
  end
94
94
 
95
95
  # @return [String]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopTodoCorrector
4
- VERSION = '0.18.1'
4
+ VERSION = '0.18.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop_todo_corrector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-03 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor