8000 Bring back support of Ruby 2.3, 2.4 and 2.5 by torresga · Pull Request #155 · fastruby/next_rails · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bring back support of Ruby 2.3, 2.4 and 2.5 #155

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

Merged
merged 6 commits into from
May 22, 2025
Merged

Conversation

torresga
Copy link
@torresga torresga commented May 16, 2025

Description

This PR attempts to add back support of Ruby 2.3, 2.4, and 2.5 as requested in #135.

To add back the support for the older Ruby versions, I had to make the following changes:

  • Several months ago, rexml was updated in this commit e50e05a . I had to downgrade it to 3.2.5, as 3.2.6 and above set Ruby 2.5 as the minimum requirement as seen in rexml’s gemspec ruby/rexml@072b02f.
  • We added Ruby 3.4 support in February: 816e5b6 by updating webmock to 3.20.0. webmock version 3.20.0 is incompatible with Ruby versions below 2.5. To keep support for both Ruby 3.4 and Ruby 2.5 and below, I decided to downgrade webmock back to its' previous version and added base64 as a dependency in the gemspec.
  • We had a few instances of match?. match? wasn’t added until Ruby 2.4. I replaced those instances with match, which is also compatible with Ruby 2.3.

Motivation and Context

How Has This Been Tested?

Ruby 2.3 and 2.4 have been added to the CI and the tests pass in all versions.

Screenshots:

I will abide by the code of conduct

@torresga torresga changed the title Adds back old ruby versions Bring back support of Ruby 2.3, 2.4 and 2.5 May 16, 2025
@torresga torresga marked this pull request as ready for review May 20, 2025 12:44
Copy link
8000
Member
@JuanVqz JuanVqz left a comment

Choose a reason for hiding this comment

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

@torresga This looks great! can you please resolve my feedback then we can merge it

spec.add_development_dependency "webmock", "3.20.0"
spec.add_development_dependency "rexml", "3.2.5" # limited on purpose, new versions don't work with old rubies
spec.add_development_dependency "webmock", "3.16.2"
spec.add_development_dependency "base64"
Copy link
Member

Choose a reason for hiding this comment

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

@torresga why is this gem needed? can you please add a reference?

Copy link
Author
@torresga torresga May 22, 2025

Choose a reason for hiding this comment

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

@JuanVqz which gem are you referring to specifically? I have this in the description (edited it a bit in case the original description wasn't clear):

  • Several months ago, rexml was updated to 3.3.8 . I had to downgrade it from 3.3.8 to 3.2.5, as 3.2.6 and above set Ruby 2.5 as the minimum requirement as seen in rexml’s gemspec ruby/rexml@072b02f.
  • We added Ruby 3.4 support in February: 816e5b6 by updating webmock to 3.20.0. webmock version 3.20.0 is incompatible with Ruby versions below 2.5.
  • To keep support for both Ruby 3.4 and Ruby 2.5 and below, I decided to downgrade webmock back to its' previous version and added base64 as a dependency in the gemspec because Ruby 3.4 removed the base64 default gem because it became bundled.

Copy link
Member

Choose a reason for hiding this comment

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

sorry, I missed the explanation for the base64 in the description :S

raise ArgumentError, "Invalid Rails version format. Example: --rails-version=5.0.7"
end

if arg.start_with?("--ruby-version") && !arg.match?(/--ruby-version=+\d+(\.\d+)*$/)
if arg.start_with?("--ruby-version") && !/--ruby-version=+\d+(\.\d+)*$/.match(arg)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Co-authored-by: Juan Vásquez <juan@ombulabs.com>
@torresga torresga requested a review from JuanVqz May 22, 2025 17:04
Copy link
Member
@JuanVqz JuanVqz left a comment

Choose a reason for hiding this comment

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

great contrib ⭐

@torresga torresga merged commit c244360 into main May 22, 2025
10 checks passed
@torresga torresga deleted the STJ-20-old-ruby-support branch May 22, 2025 17:16
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
0