postgresql_cursor
postgresql_cursor copied to clipboard
Modernize supported dependencies + Fix CI
This PR drops support for EOL Rubies (i.e. Ruby < 2.7) and EOL Rails (i.e. Rails < 6.0). It also adds every minor Ruby and Rails version to the test matrix. Travis wouldn't let me run tests on my fork since I don't have a paid plain but I updated the Travis config anyway. The propagation of exceptions from transactions changed a bit between Rails 6.x and Rails 7 so I had to tweak a few tests.
Wow, thanks! I started looking to port this to Github actions as the old Travis isn't doing free tier anymore. I'll look at this more later when I have a block of time for it.
My policy, with history of this project, had been to let unsupported ruby/rails versions accept updates for this gem as long as it has been reported as working, hence the old Rails 3.1 requirement. If they need the update and it works for them, fine. (I know firsthand that not everyone has the luxury of an updated stack--I have a internal rails 2.3 app on ruby 1.8.6 still running!) However, this project is now 12 years old (14 years since the original rails plugin version, remember those?), and given the low-churn of the project, it may be time to move forward again in this new age of Ruby being ushered in.
Your call on whether or not you want to drop support for EOL Rubies and Rails. My main motivation was really to make sure there's test coverage for Rails 6.0, 6.1 and 7.0 and dropping the old versions kept the test matrix a bit more manageable. I can rollback the removals if you want though.
I took a shot at setting up GitHub Actions based CI. It was pretty straightforward but I had to make the Postgres connection a bit more configurable to enable a connection from the tests to the Docker Postgres container. The Postgres utilities don't work in this configuration so I switched to setting up the database schema in Ruby test code.