-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
…add support back for older Ruby versions
There was a problem hiding this 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 inrexml
’sgemspec
ruby/rexml@072b02f. - We added Ruby 3.4 support in February: 816e5b6 by updating
webmock
to3.20.0
.webmock
version3.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 addedbase64
as a dependency in thegemspec
because Ruby 3.4 removed thebase64
default gem because it became bundled.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great contrib ⭐
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:
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 inrexml
’sgemspec
ruby/rexml@072b02f.webmock
to3.20.0
.webmock
version3.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 downgradewebmock
back to its' previous version and addedbase64
as a dependency in thegemspec
.match?
.match?
wasn’t added until Ruby 2.4. I replaced those instances withmatch
, 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