From fc8401319a1852a4a02812b1cc4cc59bf59f8649 Mon Sep 17 00:00:00 2001 From: Tiago Garcia Date: Mon, 10 Feb 2025 19:10:15 -0800 Subject: [PATCH 1/2] Add Rubycritic Gem --- Gemfile.lock | 86 ++++++++++++++++++++++++++++++++++-------- view_component.gemspec | 1 + 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1bf1bf4be..31d88b5b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,6 +89,10 @@ GEM rake thor (>= 0.14.0) ast (2.4.2) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) base64 (0.2.0) benchmark (0.4.0) benchmark-ips (2.13.0) @@ -110,7 +114,11 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) + childprocess (5.1.0) + logger (~> 1.5) coderay (1.1.3) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) concurrent-ruby (1.3.4) connection_pool (2.5.0) crass (1.0.6) @@ -121,10 +129,12 @@ GEM debug (1.10.0) irb (~> 1.10) reline (>= 0.3.8) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.5.1) docile (1.4.1) drb (2.2.1) - erb_lint (0.8.0) + erb_lint (0.9.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) @@ -137,6 +147,15 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) + flay (2.13.3) + erubi (~> 1.10) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.8.0) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.8) globalid (1.2.1) activesupport (>= 6.1) haml (6.3.0) @@ -145,6 +164,7 @@ GEM tilt i18n (1.14.6) concurrent-ruby (~> 1.0) + ice_nine (0.11.2) io-console (0.8.0) irb (1.14.3) rdoc (>= 4.0.0) @@ -153,7 +173,12 @@ GEM actionview (>= 5.0.0) activesupport (>= 5.0.0) json (2.9.1) + kwalify (0.7.2) language_server-protocol (3.17.0.3) + launchy (3.1.0) + addressable (~> 2.8) + childprocess (~> 5.0) + logger (~> 1.6) lint_roller (1.1.0) logger (1.6.4) loofah (2.24.0) @@ -188,9 +213,10 @@ GEM mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.26.3) - parser (3.3.6.0) + parser (3.2.2.4) ast (~> 2.4.1) racc + path_expander (1.1.3) propshaft (1.1.0) actionpack (>= 7.0.0) activesupport (>= 7.0.0) @@ -247,6 +273,10 @@ GEM rake (13.2.1) rdoc (6.10.0) psych (>= 4.0.0) + reek (6.1.4) + kwalify (~> 0.7.0) + parser (~> 3.2.0) + rainbow (>= 2.0, < 4.0) regexp_parser (2.10.0) reline (0.6.0) io-console (~> 0.5) @@ -268,30 +298,47 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.13.2) - rubocop (1.69.2) + rubocop (1.59.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.3.0.2) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) - parser (>= 3.3.1.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) rubocop-md (1.2.4) rubocop (>= 1.45) - rubocop-performance (1.23.1) + rubocop-performance (1.20.2) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) + ruby_parser (3.21.1) + racc (~> 1.5) + sexp_processor (~> 4.16) + rubycritic (4.9.1) + flay (~> 2.13) + flog (~> 4.7) + launchy (>= 2.5.2) + parser (>= 3.2.2.4) + rainbow (~> 3.1.1) + reek (~> 6.0, < 6.2) + rexml + ruby_parser (~> 3.21) + simplecov (>= 0.22.0) + tty-which (~> 0.5.0) + virtus (~> 2.0) rubyzip (2.4.1) securerandom (0.4.1) selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) + sexp_processor (4.17.3) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) @@ -313,25 +360,27 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - standard (1.43.0) + standard (1.33.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.69.1) + rubocop (~> 1.59.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.6) + standard-performance (~> 1.3) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.6.0) + standard-performance (1.3.1) lint_roller (~> 1.1) - rubocop-performance (~> 1.23.0) + rubocop-performance (~> 1.20.2) stringio (3.1.2) temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) thor (1.3.2) + thread_safe (0.3.6) tilt (2.5.0) timeout (0.4.3) + tty-which (0.5.0) turbo-rails (1.5.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) @@ -341,6 +390,10 @@ GEM unicode-display_width (2.6.0) uri (1.0.2) useragent (0.16.11) + virtus (2.0.0) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) warning (1.5.0) webrick (1.9.1) websocket (1.2.11) @@ -386,6 +439,7 @@ DEPENDENCIES rake (~> 13.0) rspec-rails (~> 5) rubocop-md (~> 1) + rubycritic (~> 4.9.1) selenium-webdriver (= 4.9.0) simplecov (~> 0.22.0) simplecov-console (~> 0.9.1) diff --git a/view_component.gemspec b/view_component.gemspec index 8101cfb8c..903b1d1a6 100644 --- a/view_component.gemspec +++ b/view_component.gemspec @@ -50,6 +50,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake", "~> 13.0" spec.add_development_dependency "rspec-rails", "~> 5" spec.add_development_dependency "rubocop-md", "~> 1" + spec.add_development_dependency "rubycritic", "~> 4.9.1" spec.add_development_dependency "selenium-webdriver", "4.9.0" spec.add_development_dependency "sprockets-rails", "~> 3.4.2" spec.add_development_dependency "standard", "~> 1" From 9705ab1a36e11b0c57542864fb007c5c81e76883 Mon Sep 17 00:00:00 2001 From: Tiago Garcia Date: Mon, 10 Feb 2025 19:17:06 -0800 Subject: [PATCH 2/2] Update CHANGELOG.md --- docs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ac7b9f2a5..20422852c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -51,6 +51,10 @@ nav_order: 5 *Reegan Viljoen* +* Added `Rubycritic` gem. + + *Tiago Menegaz* + ## 3.21.0 * Updates testing docs to include an example of how to use with RSpec.