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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rubocop_todo_corrector/commands/apply.rb +10 -10
- data/lib/rubocop_todo_corrector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25ac7e09590def3db785d3533f3fe869a7f77435bbae9c1c9d793f1af4e50eda
|
4
|
+
data.tar.gz: 6cb4c47b631d5eaaa20a577ea0d6cce9dec0385c699e7c9268bcbdafe4a64ba3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5669d1961eeed46cbe0d94932aee83b5d49bf2c71de04e07b5b13b1eecd28ae5103fd19d5b589e6fd1c2b1d579addd1d01757089e724c556252a96da74b6b894
|
7
|
+
data.tar.gz: ce24d57dcf9c4a21a2204f2e8d5d9c8d59edeba738d8ca97f38b072c74807234e935db178d1d9a0387c39fcd661c0491253981f2ceac95531a58b9acf4575ae7
|
data/Gemfile.lock
CHANGED
@@ -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,
|
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
|
-
|
90
|
-
|
87
|
+
@excluded_file_paths = ::YAML.safe_load(cop_section).dig(@cop_name, 'Exclude')
|
88
|
+
end
|
91
89
|
|
92
|
-
|
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]
|
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.
|
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-
|
11
|
+
date: 2025-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|