rubocop_todo_corrector 0.1.0 → 0.1.1

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: e0469c24b40b24ad6fca4beffd146ec75a86e8281fd921583b2d21272a8fe6b5
4
- data.tar.gz: 71d344067d08cd32030426a584d36d3d86ab7ee68e3286388abee5c1bb94cbcb
3
+ metadata.gz: 1b3400e2c32ebba2820631095ea0a4468f81145edd4328472b13901f40fa1909
4
+ data.tar.gz: b6922a0b1da93adec490cabd5a59870d0412f2ef7bbd412173ca093b42e8f363
5
5
  SHA512:
6
- metadata.gz: 7017b6fbe186c776d52f4e2be3034a6a731b4fee473715bdf452fb4040bf86b4266d7cd228fea91ee5736db11dd86368bf474f52c24f3b0970f952bfab794185
7
- data.tar.gz: e649442fb1953bc08512196cb597b6c201e47719fa862d0054289b956e3eef739c9467490f6c83e11a27bc88f66d0a1506094ce473483cb62224d2980f2193ad
6
+ metadata.gz: 4fe20782d6f29b60c55f6f0478345029fa73df46515e9d117aa640969c2683a684977943a2c63bbcf08b57be3e05531e468bd08837683e3139328f95f9db2643
7
+ data.tar.gz: de6bd6fd3f51f3004ad8f1e83c470ca630a71d0bf8489a6469bd49471fdfac649f898b477a058e78fed84a2a445af8be190a9396d7a7091eca19c9c2a834cbc1
data/CHANGELOG.md CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 0.1.0
5
+ ## 0.1.1 - 2022-05-15
6
+
7
+ ### Changed
8
+
9
+ - Abort if no cop was picked on `pick` command.
10
+
11
+ ### Fixed
12
+
13
+ - Fix bug that `pick` cannot find any cop on rubocop >= 1.26.
14
+
15
+ ## 0.1.0 - 2022-05-15
6
16
 
7
17
  ### Added
8
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_todo_corrector (0.1.0)
4
+ rubocop_todo_corrector (0.1.1)
5
5
  bundler
6
6
  thor
7
7
  yard
@@ -30,7 +30,11 @@ module RubocopTodoCorrector
30
30
  def call
31
31
  check_rubocop_todo_existence
32
32
  cop_name = picked_cop&.[](:name)
33
- ::Kernel.puts cop_name if cop_name
33
+ if cop_name
34
+ ::Kernel.puts(cop_name)
35
+ else
36
+ ::Kernel.abort('No cop was picked.')
37
+ end
34
38
  end
35
39
 
36
40
  private
@@ -28,9 +28,9 @@ module RubocopTodoCorrector
28
28
 
29
29
  # @return [Boolean]
30
30
  def auto_correctable?
31
- @content.include?('# Cop supports --auto-correct.') ||
32
- @content.include?('# Cop supports safe auto-correction.') ||
33
- @content.include?('# Cop supports unsafe auto-correction.')
31
+ @content.include?('# Cop supports --auto-correct') ||
32
+ @content.include?('# This cop supports safe auto-correction') ||
33
+ @content.include?('# This cop supports unsafe auto-correction')
34
34
  end
35
35
 
36
36
  # @return [String, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopTodoCorrector
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop_todo_corrector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura