Skip to content

Commit 3fc25e2

Browse files
committed
refactor: fix some rubocops
1 parent c4170fe commit 3fc25e2

9 files changed

Lines changed: 36 additions & 8 deletions

File tree

.rubocop.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
AllCops:
22
TargetRubyVersion: 3.0
3+
NewCops: enable
4+
Exclude:
5+
- "web-console/**/*"
6+
- "pkg/**/*"
7+
- "vendor/**/*"
8+
- "node_modules/**/*"
9+
- "tmp/**/*"
10+
- "public/**/*"
11+
- "lib/command_deck/assets/**/*"
312

413
Style/StringLiterals:
514
EnforcedStyle: double_quotes

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## [0.1.1] - 2025-09-10
4+
5+
### Fixed
6+
7+
- Fix RuboCop offenses.
8+
39
## [0.1.0] - 2025-09-10
410

511
### Added

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ gem "rake", "~> 13.0"
1010
gem "minitest", "~> 5.16"
1111

1212
gem "rubocop", "~> 1.21"
13+
gem "rubocop-minitest", "~> 0.38.2"
14+
gem "rubocop-rake", "~> 0.7.1"
1315

1416
group :test do
1517
gem "simplecov", "~> 0.22", require: false

Gemfile.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ GEM
138138
rubocop-ast (1.46.0)
139139
parser (>= 3.3.7.2)
140140
prism (~> 1.4)
141+
rubocop-minitest (0.38.2)
142+
lint_roller (~> 1.1)
143+
rubocop (>= 1.75.0, < 2.0)
144+
rubocop-ast (>= 1.38.0, < 2.0)
145+
rubocop-rake (0.7.1)
146+
lint_roller (~> 1.1)
147+
rubocop (>= 1.72.1)
141148
ruby-progressbar (1.13.0)
142149
securerandom (0.4.1)
143150
simplecov (0.22.0)
@@ -172,6 +179,8 @@ DEPENDENCIES
172179
minitest (~> 5.16)
173180
rake (~> 13.0)
174181
rubocop (~> 1.21)
182+
rubocop-minitest (~> 0.38.2)
183+
rubocop-rake (~> 0.7.1)
175184
simplecov (~> 0.22)
176185

177186
BUNDLED WITH

app/controllers/command_deck/base_controller.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# frozen_string_literal: true
22

33
module CommandDeck
4+
# Base controller for the Command Deck engine.
5+
#
6+
# Dev-only: requests are guarded via `ensure_development!` and CSRF is skipped
7+
# because forms are internal to the overlay UI and this engine is intended for
8+
# development environments only.
49
class BaseController < ActionController::Base
5-
# POC: dev-only
610
before_action :ensure_development!
7-
8-
# Simpler for the POC; we can wire CSRF later if needed.
911
skip_forgery_protection
1012

1113
private

lib/command_deck/executor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def self.coerce_value(type, value)
3030
end
3131
end
3232

33-
def self.coerce_boolean(value)
33+
def self.coerce_boolean(value) # rubocop:disable Naming/PredicateMethod
3434
boolean_true?(value)
3535
end
3636

lib/command_deck/railtie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module CommandDeck
77
class Railtie < ::Rails::Railtie
88
initializer "command_deck.load_panels", after: :load_config_initializers do
99
path = Rails.root.join("app/command_deck")
10-
Dir[path.join("**/*.rb")].sort.each { |f| load f } if Dir.exist?(path)
10+
Dir[path.join("**/*.rb")].each { |f| load f } if Dir.exist?(path)
1111
end
1212
end
1313
end

lib/command_deck/registry.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def build
9797
end
9898
end
9999

100-
def self.panel(title, **opts, &blk)
101-
Registry.panel(title, **opts, &blk)
100+
def self.panel(title, ...)
101+
Registry.panel(title, ...)
102102
end
103103
end

lib/command_deck/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module CommandDeck
4-
VERSION = "0.1.0"
4+
VERSION = "0.1.1"
55
end

0 commit comments

Comments
 (0)