Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Ruby and gem versions #135

Merged
merged 6 commits into from
Aug 24, 2023
Merged

Conversation

nicolas-fricke
Copy link
Member

@nicolas-fricke nicolas-fricke commented Aug 24, 2023

To ensure a maintainable state of this gem, we need to ensure that it relies on up-to-date versions of its dependencies. This includes the Ruby version, as well as runtime dependencies and development dependencies. Therefore, multiple steps were taken to update this gem:

Drop support for Ruby 2.6 and use 3.0 for development

Ruby 2.6 has reached its EOL on April 12th 2022. This gem is committed to keep supporting versions until one year past their end of life. Therefore, dropping support for Ruby 2.6 and setting the minimum supported version to Ruby 2.7.

Also, bump the development version up to 3.0 and add Ruby 3.2 to the test grid to ensure compatibility.

Test against newer DB versions

MySQL 8.1 and Postgres 15 have been released. To ensure compatibility with these newer versions, add them to the testgrid.

Raise minimum supported ActiveRecord version to 6.0

Rails 5.2 and with it ActiveRecord 5.2 has reached its end of life (EOL) on June 1st 2022. This gem is committed to support versions up to one year past their EOL. Therefore, the minimum required activerecord version has now been bumped to 6.0 which has an EOL of June 1st 2023.

Update development dependencies

To ensure we're developing our code with up-to-date libraries, update the development dependencies and remove the version locks from the Gemfile.

Rubocop will require a few code fixes, therefore its update will be done in a separate commit.

Update rubocop to latest version

Version 1.56.1 of Rubocop complained about Style/RedundantConstantBase within some tests. Therefore, adjust the spec files accordingly and then update to the latest Rubocop gem version.

Fix Github actions workflows and deprecate Ubuntu 18 env

Given that the 18.04 Ubuntu image has been deprecated by Github, upgrade the Rubocop and Postgres jobs to run on Ubuntu 22.

For MySQL this is a bit more complicated since newer versions of Ubuntu are incompatible with MySQL 5.7 but we still need to keep support for 5.7 as it still is a maintained MySQL version.

Therefore, use MacOS for testing against MySQL 5.7 and Ubuntu to test MySQL 8.

But since MacOS does not allow to install the pg gem unless Postgres is installed on the machine, remove the pg gem from the main Gemfile and install it only in the Postgres test flow via a custom Gemfile. The mysql gem is used for local testing and will therefore stay in the main Gemfile for now.

@nicolas-fricke nicolas-fricke force-pushed the update-ruby-and-gem-versions branch 4 times, most recently from 2d0d369 to 6e8e5b0 Compare August 24, 2023 10:56
Ruby 2.6 has reached its EOL on April 12th 2022. This gem is committed
to keep supporting versions until one year past their end of life.
Therefore, dropping support for Ruby 2.6 and setting the minimum
supported version to Ruby 2.7.

Also, bump the development version up to 3.0 and add Ruby 3.2 to the
test grid to ensure compatibility.
Postgres 15 has been released. To ensure compatibility
with this newer version, add it to the testgrid.
Rails 5.2 and with it ActiveRecord 5.2 has reached its end of life
(EOL) on June 1st 2022. This gem is committed to support versions up to
one year past their EOL. Therefore, the minimum required `activerecord`
version has now been bumped to 6.0 which has an EOL of June 1st 2023.
To ensure we're developing our code with up-to-date libraries, update
the development dependencies and remove the version locks from the
Gemfile.

Rubocop will require a few code fixes, therefore its update will be done
in a separate commit.
Version 1.56.1 of Rubocop complained about `Style/RedundantConstantBase`
within some tests. Therefore, adjust the spec files accordingly and then
update to the latest Rubocop gem version.
@nicolas-fricke nicolas-fricke force-pushed the update-ruby-and-gem-versions branch 2 times, most recently from 2fe5e11 to 10d627a Compare August 24, 2023 11:29
Given that the 18.04 Ubuntu image has been deprecated by Github, upgrade
the Rubocop and Postgres jobs to run on Ubuntu 22.

For MySQL this is a bit more complicated since newer versions of Ubuntu
are incompatible with MySQL 5.7 but we still need to keep support for
5.7 as it still is a maintained MySQL version.

Therefore, use MacOS for testing against MySQL 5.7 and Ubuntu to test
MySQL 8.

But since MacOS does not allow to install the `pg` gem unless Postgres
is installed on the machine, remove the `pg` gem from the main Gemfile
and install it only in the Postgres test flow via a custom Gemfile. The
`mysql` gem is used for local testing and will therefore stay in the
main Gemfile for now.
@nicolas-fricke nicolas-fricke merged commit 3e56f1f into master Aug 24, 2023
24 checks passed
@nicolas-fricke nicolas-fricke deleted the update-ruby-and-gem-versions branch August 24, 2023 11:50
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