Skip to content

chore: 開発用 Ruby 4.0.9 と RuboCop 1.92 を追従 - #22

Merged
YouheiNozaki merged 2 commits into
mainfrom
cursor/ruby-b2ed
Nov 12, 2026
Merged

YouheiNozaki merged 2 commits into
mainfrom
cursor/ruby-b2ed

Conversation

@cursor

@cursor cursor Bot commented Nov 12, 2026

Copy link
Copy Markdown

公開 gem としての互換性を維持しつつ、開発環境の gem 制約と開発用 Ruby を現行の安定版に追従させます。
更新前の main で bin/setup / bundle exec rubocop / bundle exec rspec を実行し、既存の検証失敗はありませんでした。同じ問題を扱う Open な Pull Request もないため、事前修正用の Pull Request は作っていません。

概要

  • 開発用 Ruby(.ruby-version と devcontainer イメージ)を、CI 最新系列の安定パッチ 4.0.9 に追従させます
  • rubocop の制約を、既に解決されている安定マイナー 1.92 に揃えます
  • Gemfile.lock は .gitignore 対象のため追加していません

何をアップデートしたか

対象 変更
開発用 Ruby 4.0.6 → 4.0.9(.ruby-version / ghcr.io/rails/devcontainer/images/ruby:4.0.9)
rubocop ~> 1.90 → ~> 1.92(解決 1.92.2)

CI のテストマトリクスは 3.4 と 4.0 のままです。ruby/setup-ruby が系列の最新パッチを使うため、ワークフローの変更は不要です。lint ジョブは .ruby-version を使います。

Breaking Changes / Migration

  • Ruby 4.0.7 / 4.0.8 / 4.0.9: 4.0.6 からの定例バグフィックスです。4.0.9 は正規表現のコンパイル不具合の修正を含みます。ソース・テスト・設定の変更は不要でした
  • rubocop 1.90 → 1.92: 1.x 内の制約底上げです。~> 1.90 でも 1.92.2 は解決されますが、検証済みのマイナーを下限に揃えます。1.91 / 1.92 の changelog に、このリポジトリの設定(NewCops: enable、TargetRubyVersion: 2.6)を壊す Breaking Change はありません。新規 cop や Lint/CopDirectiveSyntax のデフォルト有効化も、設定緩和なしでオフェンス 0 でした。実行時 Ruby 要件は >= 2.7 で、CI の 3.4 / 4.0 と両立します
  • ソース・テスト・.rubocop.yml の変更はありません

見送り

  • microcms.gemspec の add_dependency(ostruct): 公開パッケージ互換のため対象外
  • required_ruby_version / TargetRubyVersion / CI マトリクスからのバージョン削除: サポート下限を変えない
  • パッケージ VERSION / GitHub Actions: 対象外
  • Gemfile.lock の新規追加: .gitignore 済みのため追加しない
  • rake: ~> 13.4 のまま(解決 13.4.2 が latest)
  • rspec: ~> 3.13 のまま(解決 3.13.2 が latest stable)。RSpec 4.0.0.beta1 は実験的リリースで、Ruby < 3.0 のサポート終了とグローバル DSL の削除を含む大規模な Breaking Changes がある
  • Ruby 4.1: 4.1.0-preview1 のみで安定版ではない。CI に新しいメジャーは追加しない

検証

更新前の main を Ruby 4.0.6 と Ruby 4.0.9 で実行し、すべて成功しました。
変更後は Ruby 4.0.9(CI 最新系列)と Ruby 3.4.12(CI 下限系列の安定パッチ)の両方で実行し、すべて成功しました。

  • bin/setup(bundle install)
  • bundle exec rubocop(9 files, no offenses)
  • bundle exec rspec(9 examples, 0 failures)
Open in Web View Automation 

cursoragent and others added 2 commits November 12, 2026 01:07
Keep the development Ruby patch and the RuboCop minor floor on the current stable line used by CI.
Co-authored-by: Cursor <cursoragent@cursor.com>
@YouheiNozaki
YouheiNozaki merged commit a7c9d86 into main Nov 12, 2026
3 checks passed
@YouheiNozaki
YouheiNozaki deleted the cursor/ruby-b2ed branch November 12, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants