Skip to content

Change rails to railties dependency#10

Open
langalex wants to merge 4 commits intoDocSpring:mainfrom
upstream:cursor/rails-to-railties-dependency-c04a
Open

Change rails to railties dependency#10
langalex wants to merge 4 commits intoDocSpring:mainfrom
upstream:cursor/rails-to-railties-dependency-c04a

Conversation

@langalex
Copy link

@langalex langalex commented Mar 9, 2026

fix #9

Summary by CodeRabbit

  • Chores
    • Updated core gem dependencies to use Railties instead of Rails
    • Added Ruby 3.4+ compatibility improvements
    • Integrated type checking with Sorbet
    • Expanded development dependencies for enhanced testing and quality assurance tooling

cursoragent and others added 4 commits March 9, 2026 07:25
Co-authored-by: Alexander Lang <langalex@users.noreply.github.com>
Co-authored-by: Alexander Lang <langalex@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Walkthrough

The pull request replaces the Rails gem dependency with Railties across project configuration and expands the Gemfile with explicit component gems and development tooling for testing, linting, documentation, and Ruby 3.4+ compatibility.

Changes

Cohort / File(s) Summary
Dependency Migration
Gemfile, logstruct.gemspec
Replaced Rails dependency with Railties (version ≥ 7.1) to reduce unnecessary gem overhead.
Development & Testing Tooling
Gemfile
Added explicit Rails component gems (activesupport, actionpack, actionview, activemodel, activerecord, activejob, actionmailer, activestorage, actioncable, actiontext, globalid) and foundational gems (bigdecimal, drb, mutex_m, openssl, ostruct) for Ruby 3.4+ compatibility. Introduced Sorbet support and expanded :test/:development groups with minitest, simplecov, Rubocop, and documentation tools.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Rails was grand, but we found a way,
To lighten the load, trim the array,
Railties now leads with a nimble spring,
Fewer dependencies mean a lighter wing,
Hopping forward with focused grace! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Change rails to railties dependency' directly and concisely describes the main change in the pull request, which is replacing the Rails gem dependency with Railties.
Linked Issues check ✅ Passed The pull request successfully addresses issue #9 by replacing the rails dependency with railties in both Gemfile and gemspec, and adding individual Rails components as needed.
Out of Scope Changes check ✅ Passed All changes are focused on the stated objective: replacing rails with railties and adding individual Rails component gems. The foundational gems and tooling additions support this transition and are not out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Gemfile (1)

16-29: Version constraint ~> 8.0.2.1 is unusually restrictive.

The pessimistic constraint ~> 8.0.2.1 only allows versions >= 8.0.2.1 and < 8.0.3. This is very tight and may cause bundle resolution issues when patch releases (e.g., 8.0.3) are published.

Consider using ~> 8.0.2 (allows 8.0.x where x ≥ 2) or ~> 8.0 (allows 8.x.y) for more flexibility while still staying on Rails 8.

💡 Proposed fix for more flexible version constraints
-gem "railties", "~> 8.0.2.1", require: false
+gem "railties", "~> 8.0.2", require: false

 # Individual Rails components needed for testing integrations
-gem "activesupport", "~> 8.0.2.1", require: false
-gem "actionpack", "~> 8.0.2.1", require: false
-gem "actionview", "~> 8.0.2.1", require: false
-gem "activemodel", "~> 8.0.2.1", require: false
-gem "activerecord", "~> 8.0.2.1", require: false
-gem "activejob", "~> 8.0.2.1", require: false
-gem "actionmailer", "~> 8.0.2.1", require: false
-gem "activestorage", "~> 8.0.2.1", require: false
-gem "actioncable", "~> 8.0.2.1", require: false
-gem "actiontext", "~> 8.0.2.1", require: false
+gem "activesupport", "~> 8.0.2", require: false
+gem "actionpack", "~> 8.0.2", require: false
+gem "actionview", "~> 8.0.2", require: false
+gem "activemodel", "~> 8.0.2", require: false
+gem "activerecord", "~> 8.0.2", require: false
+gem "activejob", "~> 8.0.2", require: false
+gem "actionmailer", "~> 8.0.2", require: false
+gem "activestorage", "~> 8.0.2", require: false
+gem "actioncable", "~> 8.0.2", require: false
+gem "actiontext", "~> 8.0.2", require: false
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Gemfile` around lines 16 - 29, The Gemfile pins Rails components with an
overly restrictive pessimistic constraint "~> 8.0.2.1"; update the version
constraints for railties and the individual Rails gems (railties, activesupport,
actionpack, actionview, activemodel, activerecord, activejob, actionmailer,
activestorage, actioncable, actiontext, globalid) to a more flexible constraint
such as "~> 8.0.2" or "~> 8.0" so future patch/minor releases (e.g., 8.0.3 or
8.1.x) can be resolved by bundler while keeping the intended major/minor
stability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Gemfile`:
- Around line 16-29: The Gemfile pins Rails components with an overly
restrictive pessimistic constraint "~> 8.0.2.1"; update the version constraints
for railties and the individual Rails gems (railties, activesupport, actionpack,
actionview, activemodel, activerecord, activejob, actionmailer, activestorage,
actioncable, actiontext, globalid) to a more flexible constraint such as "~>
8.0.2" or "~> 8.0" so future patch/minor releases (e.g., 8.0.3 or 8.1.x) can be
resolved by bundler while keeping the intended major/minor stability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 466e7df6-5122-4b21-862c-22c57ed58a2b

📥 Commits

Reviewing files that changed from the base of the PR and between dd97f5e and ef7aab1.

⛔ Files ignored due to path filters (16)
  • Gemfile.lock is excluded by !**/*.lock
  • sorbet/config is excluded by !sorbet/**
  • sorbet/rbi/annotations/railties.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/actionmailbox@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/actionmailer@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/activejob@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/activerecord@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/activestorage@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/globalid@1.3.0.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/mail@2.9.0.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/net-imap@0.6.3.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/nio4r@2.7.5.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/rails@8.0.2.1.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/timeout@0.4.3.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/timeout@0.6.0.rbi is excluded by !sorbet/**
  • sorbet/rbi/gems/websocket-driver@0.8.0.rbi is excluded by !sorbet/**
📒 Files selected for processing (2)
  • Gemfile
  • logstruct.gemspec

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.

Rails dependency likely not needed

2 participants