Skip to content

Modernize: Ruby 4.0.1, clean up dev dependencies, and fix test suite#37

Closed
andyw8 wants to merge 8 commits intorenuo:mainfrom
andyw8:modernize
Closed

Modernize: Ruby 4.0.1, clean up dev dependencies, and fix test suite#37
andyw8 wants to merge 8 commits intorenuo:mainfrom
andyw8:modernize

Conversation

@andyw8
Copy link
Copy Markdown

@andyw8 andyw8 commented Feb 28, 2026

Note

This PR was co-authored with Claude Code. I have carefully verified it.

Summary

  • Update Ruby to 4.0.1 (update `.ruby-version`)
  • Update minimum required Ruby to 3.2 and Rails to 7.2
  • Drop support for EOL Rails versions (6.1, 7.0, 7.1 — all past end-of-life) and remove their CI jobs
  • Remove pinned version constraints from all dev dependencies (`sqlite3`, `pg`, `mysql2`, `standard`, `rake`, `appraisal`, `byebug`)
  • Remove deprecated `rails/tasks/statistics.rake` from `Rakefile` (removed in Rails 8.2)
  • Fix the test suite: `rake` was silently a no-op locally because the `:spec` task was never defined. Added `rspec-rails`, `webmock`, and `ammeter` which were missing from the gemspec, wired up `RSpec::Core::RakeTask`, and fixed test isolation (records were leaking between specs)
  • Align CI with local: Semaphore now uses `bundle exec rake` (which handles migrations) and `db:prepare`

andyw8 and others added 5 commits February 27, 2026 21:04
- Update Ruby to 4.0.1 (add mise.toml)
- Remove pinned version constraints from all dev dependencies
- Remove byebug
- Remove deprecated rails/tasks/statistics.rake from Rakefile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace require "rake/testtask" with rspec/core/rake_task in Rakefile
- Run db:migrate before specs in rake task
- Add rspec-rails, webmock, ammeter to gemspec (were missing)
- Add transactional fixtures and before hook to clean log tables
- Fix specs using spec_helper instead of rails_helper for DB specs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andyw8 andyw8 changed the title Modernize: update to Ruby 4.0.1 and clean up dev dependencies Modernize: Ruby 4.0.1, clean up dev dependencies, and fix test suite Feb 28, 2026
andyw8 and others added 3 commits February 27, 2026 21:21
Aligns CI with local development - rake now handles migrations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rails 6.1, 7.0, and 7.1 are all past end-of-life. Update minimum
supported Rails to 7.2 and Ruby to 3.2, and remove EOL CI jobs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andyw8 andyw8 marked this pull request as ready for review February 28, 2026 02:27
@coorasse coorasse self-assigned this Apr 7, 2026
Copy link
Copy Markdown
Member

@coorasse coorasse left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. I left some initial comments.

Comment thread .semaphore/semaphore.yml
- bin/rails db:create db:migrate
- bundle exec rspec
- bin/rails db:prepare
- bundle exec rake
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer to keep rspec explicitly here

Comment thread .semaphore/semaphore.yml
- sem-service start postgres 14
- bin/rails db:create db:migrate
- bundle exec rspec
- bin/rails db:prepare
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's the advantage?

Comment thread .semaphore/semaphore.yml
- sem-service start postgres 14
- bin/rails db:create db:migrate
- bundle exec rspec
- name: tests postgres separate db and separate target | rails 6.1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is support for rails 6 dropped?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's been EOL since 2024.

@andyw8 andyw8 closed this Apr 18, 2026
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