rubocop_todo_corrector 0.10.0 → 0.11.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a5761497cb2e78d59de2fed8ce2abc7edd84bc318f6d70483ea1f4f9363a4a4
|
|
4
|
+
data.tar.gz: 1f310cfb7f1479f454914e3cbe1e40b065851c4e6978b484f2d617cd69df7d6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 227d12206f9b090ba98cae89ac3e960c1f6e1d61a8bcffe501c093ccffca1dd68b7121659977bc7835f1270994c3f63914f0e14bcd5cd040b66d699926339620
|
|
7
|
+
data.tar.gz: d88f4a1733519d7e0f5659ae62474bd0c37c2b06d0284b64fdd94d3a210ac99655a666ce3ab8bdb67cce6118c7f57edcaba7f83cb5de13e52a30523c4b9957b7
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -30,33 +30,9 @@ module RubocopTodoCorrector
|
|
|
30
30
|
def call
|
|
31
31
|
::Kernel.system(
|
|
32
32
|
{ 'BUNDLE_GEMFILE' => @temporary_gemfile_path },
|
|
33
|
-
|
|
33
|
+
'bundle exec rubocop --regenerate-todo'
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
|
-
|
|
37
|
-
private
|
|
38
|
-
|
|
39
|
-
# @return [String]
|
|
40
|
-
def rubocop_command
|
|
41
|
-
rubocop_command_from_todo || 'rubocop --auto-gen-config'
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# @return [String, nil]
|
|
45
|
-
def rubocop_command_from_todo
|
|
46
|
-
return unless rubocop_todo_pathname.exist?
|
|
47
|
-
|
|
48
|
-
RubocopTodoParser.call(content: rubocop_todo_content)[:previous_rubocop_command]
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# @return [String]
|
|
52
|
-
def rubocop_todo_content
|
|
53
|
-
rubocop_todo_pathname.read
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# @return [Pathname]
|
|
57
|
-
def rubocop_todo_pathname
|
|
58
|
-
@rubocop_todo_pathname ||= ::Pathname.new(@rubocop_todo_path)
|
|
59
|
-
end
|
|
60
36
|
end
|
|
61
37
|
end
|
|
62
38
|
end
|
|
@@ -27,10 +27,7 @@ module RubocopTodoCorrector
|
|
|
27
27
|
|
|
28
28
|
# @return [Hash]
|
|
29
29
|
def call
|
|
30
|
-
{
|
|
31
|
-
cops:,
|
|
32
|
-
previous_rubocop_command:
|
|
33
|
-
}
|
|
30
|
+
{ cops: }
|
|
34
31
|
end
|
|
35
32
|
|
|
36
33
|
private
|
|
@@ -42,13 +39,6 @@ module RubocopTodoCorrector
|
|
|
42
39
|
end
|
|
43
40
|
end
|
|
44
41
|
|
|
45
|
-
def previous_rubocop_command
|
|
46
|
-
@content[
|
|
47
|
-
/`(.+)`/,
|
|
48
|
-
1
|
|
49
|
-
]
|
|
50
|
-
end
|
|
51
|
-
|
|
52
42
|
# @return [Array<String>]
|
|
53
43
|
def cop_sections
|
|
54
44
|
@content.split("\n\n").grep(COP_NAME_LINE_REGEXP)
|
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.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-07-
|
|
11
|
+
date: 2022-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|