rubocop_todo_corrector 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/README.md +11 -0
- data/lib/rubocop_todo_corrector/cli.rb +7 -0
- data/lib/rubocop_todo_corrector/commands/clean.rb +35 -0
- data/lib/rubocop_todo_corrector/commands.rb +1 -0
- data/lib/rubocop_todo_corrector/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86fbfcf2dc8bc54f4a72ce5c802c55063ca925e55174bdcc56ca9194fb9bade1
|
4
|
+
data.tar.gz: 7e95e96cbdffea5a2e8706fc496218a8f00288255a7cd32015a55589922cd642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1baced0e45b00f3419ec85125d023737d1ca33af3ae642f175bcba37b275c517050f283974b63291ab432683a45fbb891f9a961ea17cc4fa86e825d9bf35654
|
7
|
+
data.tar.gz: 807219d3418b38e8383e40b557ccc93b1e685d6011c669407bab48364eabd3d3bd9f0efa35319b50ee7055e4af798f73b4d4b1ad09a76495bedcb5e9d04c2e84
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop_todo_corrector (0.
|
4
|
+
rubocop_todo_corrector (0.8.0)
|
5
5
|
bundler
|
6
6
|
thor
|
7
7
|
yard
|
@@ -50,7 +50,7 @@ GEM
|
|
50
50
|
thor (1.2.1)
|
51
51
|
unicode-display_width (2.1.0)
|
52
52
|
webrick (1.7.0)
|
53
|
-
yard (0.9.
|
53
|
+
yard (0.9.28)
|
54
54
|
webrick (~> 1.7.0)
|
55
55
|
|
56
56
|
PLATFORMS
|
data/README.md
CHANGED
@@ -25,6 +25,7 @@ gem install rubocop_todo_corrector
|
|
25
25
|
$ rubocop_todo_corrector
|
26
26
|
Commands:
|
27
27
|
rubocop_todo_corrector bundle # Run `bundle install` to install RuboCop related gems.
|
28
|
+
rubocop_todo_corrector clean # Remove temporary files.
|
28
29
|
rubocop_todo_corrector correct # Run `rubocop --auto-correct-all`.
|
29
30
|
rubocop_todo_corrector describe --cop-name=COP_NAME # Output Markdown description for specified cop.
|
30
31
|
rubocop_todo_corrector generate # Run `rubocop --auto-gen-config` to generate .rubocop_todo.yml.
|
@@ -43,6 +44,16 @@ Usage:
|
|
43
44
|
Run `bundle install` to install RuboCop related gems.
|
44
45
|
```
|
45
46
|
|
47
|
+
### Clean
|
48
|
+
|
49
|
+
```console
|
50
|
+
$ rubocop_todo_corrector help clean
|
51
|
+
Usage:
|
52
|
+
rubocop_todo_corrector clean
|
53
|
+
|
54
|
+
Remove temporary files.
|
55
|
+
```
|
56
|
+
|
46
57
|
### correct
|
47
58
|
|
48
59
|
```console
|
@@ -14,6 +14,13 @@ module RubocopTodoCorrector
|
|
14
14
|
)
|
15
15
|
end
|
16
16
|
|
17
|
+
desc 'clean', 'Remove temporary files.'
|
18
|
+
def clean
|
19
|
+
Commands::Clean.call(
|
20
|
+
temporary_gemfile_path: 'tmp/Gemfile_rubocop_todo_corrector.rb'
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
17
24
|
desc 'correct', 'Run `rubocop --auto-correct(-all)`.'
|
18
25
|
option(
|
19
26
|
:only_safe,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
module RubocopTodoCorrector
|
6
|
+
module Commands
|
7
|
+
class Clean
|
8
|
+
class << self
|
9
|
+
# @param [String] temporary_gemfile_path
|
10
|
+
def call(
|
11
|
+
temporary_gemfile_path:
|
12
|
+
)
|
13
|
+
new(
|
14
|
+
temporary_gemfile_path:
|
15
|
+
).call
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize(
|
20
|
+
temporary_gemfile_path:
|
21
|
+
)
|
22
|
+
@temporary_gemfile_path = temporary_gemfile_path
|
23
|
+
end
|
24
|
+
|
25
|
+
def call
|
26
|
+
::FileUtils.rm_f(
|
27
|
+
[
|
28
|
+
@temporary_gemfile_path,
|
29
|
+
"#{@temporary_gemfile_path}.lock"
|
30
|
+
]
|
31
|
+
)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module RubocopTodoCorrector
|
4
4
|
module Commands
|
5
5
|
autoload :Bundle, 'rubocop_todo_corrector/commands/bundle'
|
6
|
+
autoload :Clean, 'rubocop_todo_corrector/commands/clean'
|
6
7
|
autoload :Correct, 'rubocop_todo_corrector/commands/correct'
|
7
8
|
autoload :Describe, 'rubocop_todo_corrector/commands/describe'
|
8
9
|
autoload :Generate, 'rubocop_todo_corrector/commands/generate'
|
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.8.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-
|
11
|
+
date: 2022-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- lib/rubocop_todo_corrector/cli.rb
|
76
76
|
- lib/rubocop_todo_corrector/commands.rb
|
77
77
|
- lib/rubocop_todo_corrector/commands/bundle.rb
|
78
|
+
- lib/rubocop_todo_corrector/commands/clean.rb
|
78
79
|
- lib/rubocop_todo_corrector/commands/correct.rb
|
79
80
|
- lib/rubocop_todo_corrector/commands/describe.rb
|
80
81
|
- lib/rubocop_todo_corrector/commands/generate.rb
|