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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78ebb6430a735647bdf5174b57e594385e52238e041622590771e0fe433b725f
4
- data.tar.gz: d8bba18c545e8cae9ef03d271d432df33277e2c7ba92d578139d9425dd10cdc4
3
+ metadata.gz: 86fbfcf2dc8bc54f4a72ce5c802c55063ca925e55174bdcc56ca9194fb9bade1
4
+ data.tar.gz: 7e95e96cbdffea5a2e8706fc496218a8f00288255a7cd32015a55589922cd642
5
5
  SHA512:
6
- metadata.gz: 3eee8ffc0e2f7df0837613b06e65231b0c7013b69dae419ec7842f92354c350a7608a8ec0f9c8ba1a757b4308c90f5f7bcbe073ab49196e91c9295e11b0bcfb8
7
- data.tar.gz: 47e6a365002f3c8e3e551f1020647e95e2dad184c3a561685ce56667cb773c9334d0bab2d72c23f650cb849a1c3c7d831ce3fbd499ca0558373e11ebfed772aa
6
+ metadata.gz: b1baced0e45b00f3419ec85125d023737d1ca33af3ae642f175bcba37b275c517050f283974b63291ab432683a45fbb891f9a961ea17cc4fa86e825d9bf35654
7
+ data.tar.gz: 807219d3418b38e8383e40b557ccc93b1e685d6011c669407bab48364eabd3d3bd9f0efa35319b50ee7055e4af798f73b4d4b1ad09a76495bedcb5e9d04c2e84
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.0 - 2022-07-23
6
+
7
+ ### Added
8
+
9
+ - Add `clean` command.
10
+
5
11
  ## 0.7.1 - 2022-05-28
6
12
 
7
13
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_todo_corrector (0.7.1)
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.27)
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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopTodoCorrector
4
- VERSION = '0.7.1'
4
+ VERSION = '0.8.0'
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.7.1
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-05-27 00:00:00.000000000 Z
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