rubocounsel 0.1.0 → 0.1.1

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: 3839fdb133937bd743490942d358cadb5ec5b03380b20755150f1e06ffdc8cf3
4
- data.tar.gz: 618b43fadb08f8896de3f9b70e4638eaac8169c981614f3dc474007db314e44c
3
+ metadata.gz: df8f7f81d3443e7d62fbf3dc59fb31d2f0e491c93fec1b7c9e6d8150266d7517
4
+ data.tar.gz: ea8ffb9483013e9194dd188bc6300ffe5f0009f1cced90330f8099987925a9df
5
5
  SHA512:
6
- metadata.gz: 563a253cd41f2ab816aed6a7241ebb68ab3c4ac12df4fa12c804e6f5b415f228d54004710289201a065cd09c7b6fc74dd313af8de45162b5d9a08a7fc605912f
7
- data.tar.gz: 8c9be74c4d2c0bf342e05e4dfb9cc8aad6c26ab7899e31aef24c7600d5901dcca0dcd7d4b8f5c9a5e5f7e762593bb3e35ce27319dfd232ed25fe48e223073cb8
6
+ metadata.gz: cb5255b7e2f10bb3ed885a1db2e21abff41ef12b90dd553b79a9f153b67abab42de64e3dc20d629c9a64fcc95b493e67d6d9e7e584ccf60f981ec1fdf49b1e51
7
+ data.tar.gz: c11acd191699d9d282e13120277fa125b9b5d02e714b97f54ff7d02495c913faef843d208ff700e2dab9fa3190b52e77821c526247372b41d2e4404e4ac5f7f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.1] - 2026-03-21
4
+
5
+ - Show "Enable" action instead of "Configure" for cops with no configurable attributes
6
+ - Add `inherit_gem` and `plugins` as priority keys in generated `.rubocop.yml`
7
+
3
8
  ## [0.1.0] - 2025-10-26
4
9
 
5
10
  - Initial release
@@ -15,7 +15,7 @@ module RuboCounsel
15
15
  # "Metrics/MethodLength" => { "Max" => 15 }
16
16
  # }
17
17
  class ConfigWriter
18
- PRIORITY_KEYS = ["inherit_from", "inherit_mode", "require", "AllCops"].freeze
18
+ PRIORITY_KEYS = ["inherit_gem", "plugins", "inherit_from", "inherit_mode", "require", "AllCops"].freeze
19
19
 
20
20
  attr_reader :choices
21
21
 
@@ -14,7 +14,8 @@ module RuboCounsel
14
14
  #
15
15
  # Cops that are already configured in .rubocop.yml are skipped by default.
16
16
  class Counselor
17
- ACTIONS = ["Configure", "Disable", "Skip"].freeze
17
+ CONFIGURABLE_ACTIONS = ["Configure", "Disable", "Skip"].freeze
18
+ SIMPLE_ACTIONS = ["Enable", "Disable", "Skip"].freeze
18
19
  FILE_TARGETING_ATTRIBUTES = ["Include", "Exclude"].freeze
19
20
 
20
21
  def initialize(cop_names, catalog: CopCatalog.new, user_config: nil, output: $stdout)
@@ -50,9 +51,12 @@ module RuboCounsel
50
51
 
51
52
  ::CLI::UI::Frame.open(entry.cop_name, color: :blue) do
52
53
  display_cop_info(entry, docstring)
53
- action = ::CLI::UI::Prompt.ask("What would you like to do?", options: ACTIONS)
54
+ actions = entry.configurable_attributes.empty? ? SIMPLE_ACTIONS : CONFIGURABLE_ACTIONS
55
+ action = ::CLI::UI::Prompt.ask("What would you like to do?", options: actions)
54
56
 
55
57
  case action
58
+ when "Enable"
59
+ { "Enabled" => true }
56
60
  when "Disable"
57
61
  { "Enabled" => false }
58
62
  when "Skip"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RuboCounsel
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: rubocounsel
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
  - John DeWyze