From cb34f0ca7778f808a5e34a6b7e3fedc75ee5c206 Mon Sep 17 00:00:00 2001 From: dadachi Date: Fri, 6 Mar 2026 18:07:58 +0900 Subject: [PATCH 1/2] Update Ruby from 3.4.1 to 4.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update RuboCop gems for Ruby 4.0 support and fix renamed cop (PredicateName → PredicatePrefix). Co-Authored-By: Claude Opus 4.6 --- .rubocop.yml | 2 +- .ruby-version | 2 +- CLAUDE.md | 4 ++-- Gemfile.lock | 66 +++++++++++++++++++++++++++++++-------------------- 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0053887..2b786f2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -943,7 +943,7 @@ Naming/MethodName: Naming/MethodParameterName: Enabled: false -Naming/PredicateName: +Naming/PredicatePrefix: Enabled: false Naming/RescuedExceptionsVariableName: diff --git a/.ruby-version b/.ruby-version index 47b322c..1454f6e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.1 +4.0.1 diff --git a/CLAUDE.md b/CLAUDE.md index 97606d1..5016f1e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -This is a Rails 7.1.5.1 API application that serves as the backend for NativeAppTemplate iOS/Android mobile applications. It's a multi-tenant SaaS application with token-based authentication, role-based authorization, and RESTful API endpoints. +This is a Rails 7.2 API application that serves as the backend for NativeAppTemplate iOS/Android mobile applications. It's a multi-tenant SaaS application with token-based authentication, role-based authorization, and RESTful API endpoints. Ruby 4.0.1, PostgreSQL, Redis, Sidekiq. ## Development Commands @@ -28,7 +28,7 @@ bin/rails test test/path/to/test.rb:42 # Run specific test line ### Linting & Security ```bash bin/rubocop # Ruby code linting -bundle exec erblint --lint-all # ERB template linting +bundle exec erb_lint --lint-all # ERB template linting bin/brakeman # Security vulnerability scanning ``` diff --git a/Gemfile.lock b/Gemfile.lock index 84b9f5b..ab3fd1c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -93,7 +93,7 @@ GEM after_commit_everywhere (1.5.0) activerecord (>= 4.2) activesupport - ast (2.4.2) + ast (2.4.3) base64 (0.3.0) bcrypt (3.1.20) benchmark (0.5.0) @@ -161,6 +161,7 @@ GEM rubocop (>= 1) smart_properties erubi (1.13.1) + ffi (1.17.1) ffi (1.17.1-aarch64-linux-gnu) ffi (1.17.1-arm-linux-gnu) ffi (1.17.1-arm64-darwin) @@ -193,10 +194,14 @@ GEM activesupport (>= 5.0.0) jsbundling-rails (1.3.1) railties (>= 6.0.0) - json (2.9.1) + json (2.19.0) + json-schema (6.2.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) jsonapi-serializer (2.2.0) activesupport (>= 4.2) - language_server-protocol (3.17.0.4) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) logger (1.7.0) loofah (2.25.0) crass (~> 1.0.2) @@ -213,6 +218,8 @@ GEM turbo-rails marcel (1.1.0) matrix (0.4.2) + mcp (0.8.0) + json-schema (>= 4.1) mini_magick (4.13.2) mini_mime (1.1.5) mini_portile2 (2.8.9) @@ -248,14 +255,15 @@ GEM iniparse (~> 1.4) rexml (>= 3.3.9) pagy (9.3.3) - parallel (1.26.3) - parser (3.3.7.1) + parallel (1.27.0) + parser (3.3.10.2) ast (~> 2.4.1) racc pg (1.5.9) pp (0.6.3) prettyprint prettyprint (0.2.0) + prism (1.9.0) propshaft (1.1.0) actionpack (>= 7.0.0) activesupport (>= 7.0.0) @@ -270,7 +278,7 @@ GEM pundit (2.4.0) activesupport (>= 3.0.0) racc (1.8.1) - rack (3.2.4) + rack (3.2.5) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-cors (2.0.2) @@ -323,36 +331,42 @@ GEM redis-client (>= 0.22.0) redis-client (0.23.2) connection_pool - regexp_parser (2.10.0) + regexp_parser (2.11.3) reline (0.6.3) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) rexml (3.4.0) - rubocop (1.71.2) + rubocop (1.85.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.0) - parser (>= 3.3.1.0) - rubocop-minitest (0.36.0) - rubocop (>= 1.61, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.29.1) + rubocop-ast (1.49.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-minitest (0.39.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.34.3) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) rubocop-rails-omakase (1.0.0) rubocop rubocop-minitest @@ -391,9 +405,9 @@ GEM railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) useragent (0.16.11) valid_email2 (7.0.0) activemodel (>= 6.0) @@ -473,7 +487,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 3.4.1p0 + ruby 4.0.1 BUNDLED WITH - 2.6.2 + 4.0.3 From 28730bba01205431d04bf201bd98a30625c81522 Mon Sep 17 00:00:00 2001 From: dadachi Date: Fri, 6 Mar 2026 18:13:48 +0900 Subject: [PATCH 2/2] Rename erblint to erb_lint in CI workflow Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95734db..00188e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,8 @@ jobs: - name: Lint code for consistent style run: bin/rubocop -f github - - name: Erblint - run: bundle exec erblint --lint-all + - name: Erb Lint + run: bundle exec erb_lint --lint-all test: timeout-minutes: 10