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

Drop support for EOL Ruby versions (2.5 and 2.6) #2538

Merged

Conversation

nick-mendez
Copy link
Contributor

Summary

I Completed the 3 tasks in Issue #2529

  • removed version checks in test_faker_birthday_in_leap_year.rb and test_faker_id_number.rb
  • Updated Targeted Ruby Version for Rubocop to 2.7
  • Updated spec.required_ruby_version = '>= 2.5' to 2.7

Other Information

Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

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

nice, thanks for working on this!

I left a couple of questions regarding the tests we probably still want to keep.

Comment on lines 33 to 39
assert_raise Date::Error do
::Date.new(@today.year - @min, @today.month, @today.day)
end

assert_raise Date::Error do
::Date.new(@today.year - @max, @today.month, @today.day)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we want to remove the tests for version < 2.7 and we don't need the version checks anymore.

But we still want to keep the tests that check that the error raised is a Date::Error, right? I don't think you need to remove them.

@thdaraujo
Copy link
Contributor

thdaraujo commented Aug 25, 2022

what do you think of also removing Ruby versions older than 2.7 from the test matrix?

Here:

@nick-mendez
Copy link
Contributor Author

@thdaraujo I removed the ruby versions older than 2.7 from the test matrix and fixed the 2 errors from my previous pull request. Thank you for your help

Copy link
Contributor Author

@nick-mendez nick-mendez left a comment

Choose a reason for hiding this comment

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

I revised the two test files to include the errors without the version check. I also removed the older ruby versions ( < 2.7) from the test matrix

Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

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

Thank you, @nickmendezFlatiron this is great! I believe there is a duplicated block to be removed. Could you remove it and then we can approve this? Thanks!

@stefannibrasil
Copy link
Contributor

stefannibrasil commented Aug 28, 2022

@nickmendezFlatiron if you run rubocop -A, it will fix Rubocop offenses for you 👀

Copy link
Contributor Author

@nick-mendez nick-mendez left a comment

Choose a reason for hiding this comment

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

I have made the suggested changes using rubocop and removed the duplicate code from the test file. Thank you for your help

Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

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

LGTM

@thdaraujo thdaraujo changed the title Remove version checks against ruby 2.7 #2529 Drop support for EOL Ruby versions (2.5 and 2.6) Aug 28, 2022
@Zeragamba Zeragamba merged commit 4b17b5c into faker-ruby:master Aug 29, 2022
@stefannibrasil stefannibrasil linked an issue Aug 29, 2022 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove version checks against ruby < 2.7
4 participants