rubocop_todo_corrector 0.2.0 → 0.5.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: c417bdeb50548dfac237a4360a258e4e49d20fbb5b0eedc3912e4fae7bcf9197
4
- data.tar.gz: 73549fca6bd871bd64a908c63a31776c5d7cef57cce9173e25981139634f406c
3
+ metadata.gz: 0f41cc52c87afb8d1971ed4dbf006acd3471c42183e3c9947e588870a6bff7f3
4
+ data.tar.gz: dba2c971d07471a2b2da8b76eaf6ae1b8a27cde13698a116a97c7edfab2cdeb6
5
5
  SHA512:
6
- metadata.gz: 4844bfb173d37e49fe941924155c854ebc760ed2fbfa6708eb674acd9a819683b67a44e46d5f9f1a3fab23e50813eea6f6139109aaa0f5ebd133b130b58ea50a
7
- data.tar.gz: 936d187e8abfa84ae37062473a05c4acc74868e97c6982b1572f866701f1efd0c60f36ef5c50f1cfb0b93e49e8354d00952e043bff49d5032936c2853f36c572
6
+ metadata.gz: 455f57a51dbd813148f3fde5d6c00f813e0edc47e2d5644b53efbe2bd3dda354fc4b6c52e952ca33b214309dc97ffe33a47f20fb5137759b224dcb4743fd11f5
7
+ data.tar.gz: 5d47b50b46c2fb7d79488ba0ef66bef0050483bb9c82ae346159ae69ba6b6e7145e2520658e41a914996e9d6bb6a17e4f125b1ce758c385326305cb8d6f8f2df
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ require:
4
4
 
5
5
  AllCops:
6
6
  NewCops: enable
7
- TargetRubyVersion: 3.0
7
+ TargetRubyVersion: 3.1
8
8
 
9
9
  Metrics:
10
10
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.5.0 - 2022-05-16
6
+
7
+ ### Changed
8
+
9
+ - Change required ruby version from 3.0 to 3.1.
10
+
11
+ ## 0.4.0 - 2022-05-16
12
+
13
+ ### Fixed
14
+
15
+ - Fix misspell: `occured` -> `occurred`.
16
+
17
+ ## 0.3.0 - 2022-05-15
18
+
19
+ ### Changed
20
+
21
+ - Change `describe` output so that commit-message-ready text is described.
22
+
5
23
  ## 0.2.0 - 2022-05-15
6
24
 
7
25
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_todo_corrector (0.1.1)
4
+ rubocop_todo_corrector (0.5.0)
5
5
  bundler
6
6
  thor
7
7
  yard
@@ -54,6 +54,7 @@ GEM
54
54
  webrick (~> 1.7.0)
55
55
 
56
56
  PLATFORMS
57
+ x86_64-darwin-21
57
58
  x86_64-linux
58
59
 
59
60
  DEPENDENCIES
data/README.md CHANGED
@@ -86,7 +86,7 @@ Usage:
86
86
  Options:
87
87
  [--mode=MODE]
88
88
  # Default: random
89
- # Possible values: first, last, least_occured, most_occured, random
89
+ # Possible values: first, last, least_occurred, most_occurred, random
90
90
 
91
91
  Output an auto-correctable Cop from .rubocop_todo.yml.
92
92
  ```
@@ -12,8 +12,8 @@ module RubocopTodoCorrector
12
12
  temporary_gemfile_path:
13
13
  )
14
14
  new(
15
- gem_specifications: gem_specifications,
16
- temporary_gemfile_path: temporary_gemfile_path
15
+ gem_specifications:,
16
+ temporary_gemfile_path:
17
17
  ).call
18
18
  end
19
19
  end
@@ -49,8 +49,8 @@ module RubocopTodoCorrector
49
49
  enum: %w[
50
50
  first
51
51
  last
52
- least_occured
53
- most_occured
52
+ least_occurred
53
+ most_occurred
54
54
  random
55
55
  ],
56
56
  type: :string
@@ -13,9 +13,9 @@ module RubocopTodoCorrector
13
13
  temporary_gemfile_path:
14
14
  )
15
15
  new(
16
- rubocop_configuration_path: rubocop_configuration_path,
17
- gemfile_lock_path: gemfile_lock_path,
18
- temporary_gemfile_path: temporary_gemfile_path
16
+ rubocop_configuration_path:,
17
+ gemfile_lock_path:,
18
+ temporary_gemfile_path:
19
19
  ).call
20
20
  end
21
21
  end
@@ -32,7 +32,7 @@ module RubocopTodoCorrector
32
32
 
33
33
  def call
34
34
  BundleInstaller.call(
35
- gem_specifications: gem_specifications,
35
+ gem_specifications:,
36
36
  temporary_gemfile_path: @temporary_gemfile_path
37
37
  )
38
38
  end
@@ -51,9 +51,9 @@ module RubocopTodoCorrector
51
51
  def gem_specifications
52
52
  gem_names.map do |gem_name|
53
53
  {
54
- gem_name: gem_name,
54
+ gem_name:,
55
55
  gem_version: GemVersionDetector.call(
56
- gem_name: gem_name,
56
+ gem_name:,
57
57
  gemfile_lock_path: @gemfile_lock_path
58
58
  )
59
59
  }
@@ -9,7 +9,7 @@ module RubocopTodoCorrector
9
9
  temporary_gemfile_path:
10
10
  )
11
11
  new(
12
- temporary_gemfile_path: temporary_gemfile_path
12
+ temporary_gemfile_path:
13
13
  ).call
14
14
  end
15
15
  end
@@ -11,8 +11,8 @@ module RubocopTodoCorrector
11
11
  temporary_gemfile_path:
12
12
  )
13
13
  new(
14
- cop_name: cop_name,
15
- temporary_gemfile_path: temporary_gemfile_path
14
+ cop_name:,
15
+ temporary_gemfile_path:
16
16
  ).call
17
17
  end
18
18
  end
@@ -36,9 +36,9 @@ module RubocopTodoCorrector
36
36
  return unless cop_document
37
37
 
38
38
  description = DescriptionRenderer.call(
39
- cop_document: cop_document,
39
+ cop_document:,
40
40
  cop_name: @cop_name,
41
- cop_source_path: cop_source_path
41
+ cop_source_path:
42
42
  )
43
43
  ::Kernel.puts(description)
44
44
  end
@@ -13,8 +13,8 @@ module RubocopTodoCorrector
13
13
  temporary_gemfile_path:
14
14
  )
15
15
  new(
16
- rubocop_todo_path: rubocop_todo_path,
17
- temporary_gemfile_path: temporary_gemfile_path
16
+ rubocop_todo_path:,
17
+ temporary_gemfile_path:
18
18
  ).call
19
19
  end
20
20
  end
@@ -13,8 +13,8 @@ module RubocopTodoCorrector
13
13
  rubocop_todo_path:
14
14
  )
15
15
  new(
16
- mode: mode,
17
- rubocop_todo_path: rubocop_todo_path
16
+ mode:,
17
+ rubocop_todo_path:
18
18
  ).call
19
19
  end
20
20
  end
@@ -57,11 +57,11 @@ module RubocopTodoCorrector
57
57
  auto_correctable_cops.first
58
58
  when 'last'
59
59
  auto_correctable_cops.last
60
- when 'least_occured'
60
+ when 'least_occurred'
61
61
  auto_correctable_cops.min_by do |cop|
62
62
  cop[:offenses_count]
63
63
  end
64
- when 'most_occured'
64
+ when 'most_occurred'
65
65
  auto_correctable_cops.max_by do |cop|
66
66
  cop[:offenses_count]
67
67
  end
@@ -13,8 +13,8 @@ module RubocopTodoCorrector
13
13
  rubocop_todo_path:
14
14
  )
15
15
  new(
16
- cop_name: cop_name,
17
- rubocop_todo_path: rubocop_todo_path
16
+ cop_name:,
17
+ rubocop_todo_path:
18
18
  ).call
19
19
  end
20
20
  end
@@ -11,7 +11,7 @@ module RubocopTodoCorrector
11
11
  source_path:
12
12
  )
13
13
  new(
14
- source_path: source_path
14
+ source_path:
15
15
  ).call
16
16
  end
17
17
  end
@@ -13,8 +13,8 @@ module RubocopTodoCorrector
13
13
  temporary_gemfile_path:
14
14
  )
15
15
  new(
16
- cop_name: cop_name,
17
- temporary_gemfile_path: temporary_gemfile_path
16
+ cop_name:,
17
+ temporary_gemfile_path:
18
18
  ).call
19
19
  end
20
20
  end
@@ -17,9 +17,9 @@ module RubocopTodoCorrector
17
17
  cop_source_path:
18
18
  )
19
19
  new(
20
- cop_document: cop_document,
21
- cop_name: cop_name,
22
- cop_source_path: cop_source_path
20
+ cop_document:,
21
+ cop_name:,
22
+ cop_source_path:
23
23
  ).call
24
24
  end
25
25
  end
@@ -8,7 +8,7 @@ module RubocopTodoCorrector
8
8
  # @param [String] rubocop_configuration_path
9
9
  # @return [Array<String>]
10
10
  def call(rubocop_configuration_path:)
11
- new(rubocop_configuration_path: rubocop_configuration_path).call
11
+ new(rubocop_configuration_path:).call
12
12
  end
13
13
  end
14
14
 
@@ -10,8 +10,8 @@ module RubocopTodoCorrector
10
10
  # @return [String, nil]
11
11
  def call(gemfile_lock_path:, gem_name:)
12
12
  new(
13
- gemfile_lock_path: gemfile_lock_path,
14
- gem_name: gem_name
13
+ gemfile_lock_path:,
14
+ gem_name:
15
15
  ).call
16
16
  end
17
17
  end
@@ -16,7 +16,7 @@ module RubocopTodoCorrector
16
16
  # @param [String] content
17
17
  def call(content:)
18
18
  new(
19
- content: content
19
+ content:
20
20
  ).call
21
21
  end
22
22
  end
@@ -28,8 +28,8 @@ module RubocopTodoCorrector
28
28
  # @return [Hash]
29
29
  def call
30
30
  {
31
- cops: cops,
32
- previous_rubocop_command: previous_rubocop_command
31
+ cops:,
32
+ previous_rubocop_command:
33
33
  }
34
34
  end
35
35
 
@@ -6,7 +6,7 @@ module RubocopTodoCorrector
6
6
  # @param [String] content
7
7
  def call(content:)
8
8
  new(
9
- content: content
9
+ content:
10
10
  ).call
11
11
  end
12
12
  end
@@ -19,8 +19,8 @@ module RubocopTodoCorrector
19
19
  def call
20
20
  {
21
21
  auto_correctable: auto_correctable?,
22
- name: name,
23
- offenses_count: offenses_count
22
+ name:,
23
+ offenses_count:
24
24
  }
25
25
  end
26
26
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopTodoCorrector
4
- VERSION = '0.2.0'
4
+ VERSION = '0.5.0'
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Auto-correct offenses defined in .rubocop_todo.yml.'
12
12
  spec.homepage = 'https://github.com/r7kamura/rubocop_todo_corrector'
13
13
  spec.license = 'MIT'
14
- spec.required_ruby_version = '>= 3.0'
14
+ spec.required_ruby_version = '>= 3.1'
15
15
 
16
16
  spec.metadata['homepage_uri'] = spec.homepage
17
17
  spec.metadata['source_code_uri'] = spec.homepage
@@ -1,3 +1,5 @@
1
+ Auto-correct <%= @cop_name %>
2
+
1
3
  ## Summary
2
4
 
3
5
  Auto-corrected [<%= @cop_name %>](<%= cop_url %>).
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.2.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '3.0'
109
+ version: '3.1'
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - ">="