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

Remove eol Ruby 2.6 #2878

Merged
merged 5 commits into from
Jul 11, 2022
Merged

Remove eol Ruby 2.6 #2878

merged 5 commits into from
Jul 11, 2022

Conversation

pgwillia
Copy link
Member

@pgwillia pgwillia commented Jun 8, 2022

Context

We're currently running 2.7.6 in production (introduced April 2022).

Some of our dependencies have removed Ruby 2.6 from their support now too so CI fails (eg. #2873).

What's New

Update mentions of Ruby 2.6 to 2.7 in readme, ci, gemfile, asdf tool-versions and docker.

@pgwillia
Copy link
Member Author

pgwillia commented Jun 8, 2022

Removed 2.6 from required status checks

image

@pgwillia pgwillia marked this pull request as ready for review June 8, 2022 22:32
We're currently running 2.7.6 in production (introduced April 2022).

Some of our dependencies have removed Ruby 2.6 from their support now too so CI fails (eg. #2873).
Use ENV.fetch('RAILS_ENV') or ENV.fetch('RAILS_ENV', nil) instead of ENV['RAILS_ENV']. (https://rubystyle.guide/#hash-fetch-defaults)
Use filter_map instead.

This cop identifies places where map { …​ }.compact can be replaced by filter_map.

This cop’s autocorrection is unsafe because map { …​ }.compact that is not compatible with filter_map.
`warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call`

In Ruby 2.7, the way it handles the positional arguments and keyword arguments is changed, aiming to provide a smooth transition to Ruby 3.

If you were passing a Hash as a keyword argument, now you'd need to update your code to use the double splat  `**` operator.

https://bloggie.io/@kinopyo/how-to-fix-ruby-2-7-warning-using-the-last-argument-as-keyword-parameters-is-deprecated
@pgwillia pgwillia requested a review from a user July 7, 2022 15:43
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@lagoan lagoan left a comment

Choose a reason for hiding this comment

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

LGTM!

@pgwillia pgwillia merged commit c7233eb into master Jul 11, 2022
@pgwillia pgwillia deleted the update_ci_ruby_2.7 branch July 11, 2022 16:56
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