Skip to content

Conversation

@joe-sharp
Copy link
Contributor

@joe-sharp joe-sharp commented May 15, 2025

Address #44

Add support for activerecord 7.2 and 8.0. Drop support for unsupported Rails and Ruby versions. Ruby version requirement is now 3.0+ and activerecord requires 7.1+. This allows for an additional upgrade path for those on older versions of Ruby, but as activerecord 7.2 requires Ruby 3.1+ it is recommended users upgrade to Ruby 3.2+ and activerecord 7.2+.

Todo:

  • update dev depdencies that I listed
  • test in a REAL rails app to ensure functionality in the different rails versions
  • bump the version to 0.8.0
  • update the README.md to reflect the new version requirements
  • update the changelog

- Add support for activerecord 7.2 and 8.0
- Add Ruby 3.1-3.4 and activerrecord 7.2 and 8.0 to test matrix
@joe-sharp joe-sharp marked this pull request as ready for review May 15, 2025 03:07
@urkle urkle linked an issue May 15, 2025 that may be closed by this pull request
Copy link
Member

@urkle urkle left a comment

Choose a reason for hiding this comment

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

Surprised almost nothing had to really be changed.

Some TODOs

  • update dev depdencies that I listed
  • test in a REAL rails app to ensure functionality in the different rails versions
  • bump the version to 0.8.0
  • update the README.md to reflect the new version requirements
  • update the changelog


config.before do
ActiveRecord::Base.clear_all_connections!
ActiveRecord::Base.connection_handler.clear_all_connections!
Copy link
Member

Choose a reason for hiding this comment

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

Was this seriously the only change needed to get it working on 7.1+?

Have you tested it IN a rails application to ensure if fully works in 7.1+? (not wanting to just trust the tests here).

Copy link
Contributor Author

@joe-sharp joe-sharp May 15, 2025

Choose a reason for hiding this comment

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

I plan to test today in a Rails application. It definitely seemed weird but I noticed the code (line 14 in candidate.rb) was already using the connection handler so it seemed plausible it will work. The older AR versions would be supported with maybe some careful changes to their gemfiles. I'll keep you posted.


s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rspec', '~> 3.8'
s.add_development_dependency 'rubocop', '~> 1.28.0'
Copy link
Member

Choose a reason for hiding this comment

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

Lets update to the latest version of rubocop, rubocop-rspec, rspec, and simplecov.

(Or whatever versions will still run with ruby 3.0+)

@urkle urkle assigned urkle and joe-sharp and unassigned urkle May 19, 2025
Copy link
Member

@urkle urkle left a comment

Choose a reason for hiding this comment

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

one small tweak then we are good

### Changed
- dropped support for Ruby < 3.0
- dropped support for AR < 7.1
- add support for Rails 7.1 and 8.0
Copy link
Member

Choose a reason for hiding this comment

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

@joe-sharp a small typo here.. (should be Rails 7.2 and 8.0)

Copy link

Choose a reason for hiding this comment

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

Can we merge this? I can fix the typo if that's the only thing left here.

Copy link
Member

Choose a reason for hiding this comment

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

@ar31an if you can fix the typo and squash the commits down I'll get it merged in.

Copy link

Choose a reason for hiding this comment

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

@urkle Didn't have write access to that repo, so here's the new PR from that fork: #46

Copy link
Contributor Author

@joe-sharp joe-sharp Jun 12, 2025

Choose a reason for hiding this comment

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

Thanks y'all. Got stuck fixing other stuff so we could test on Rails 7.2. I'll report any issues we find in testing.

@urkle
Copy link
Member

urkle commented Jun 11, 2025

Closing as fixes were handled in another PR (#46 )

@urkle urkle closed this Jun 11, 2025
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.

Add support for Rails 7.2 and 8.0

3 participants