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 to Ruby 3.2.0 #7594

Merged
merged 9 commits into from
Jan 11, 2023
Merged

Update to Ruby 3.2.0 #7594

merged 9 commits into from
Jan 11, 2023

Conversation

mitchellhenke
Copy link
Contributor

🛠 Summary of changes

Update to Ruby 3.2.0!

Nokogiri is the remaining piece that's still a release candidate, but I think we could consider moving forward with it if we're comfortable.

@aduth
Copy link
Member

aduth commented Jan 6, 2023

🙃

find app spec -name '*.rb' | xargs perl -pi -e "s/\(([a-z_]+): \1\)/(\1:)/"

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch 8 times, most recently from 109b2ba to 0cc0fd3 Compare January 10, 2023 16:58
@mitchellhenke mitchellhenke marked this pull request as ready for review January 10, 2023 17:25
@mitchellhenke
Copy link
Contributor Author

mitchellhenke commented Jan 10, 2023

🙃

find app spec -name '*.rb' | xargs perl -pi -e "s/\(([a-z_]+): \1\)/(\1:)/"

Happy to explore it in a future PR if 3.2 works 😀

For explicitness, the substitution is to make use of some syntax changes for hashes and keyword arguments released in Ruby 3.1:

  • {x:, y:} is syntax sugar for {x: x, y: y}.
  • foo(x:, y:) is syntax sugar for foo(x: x, y: y).

@aduth
Copy link
Member

aduth commented Jan 10, 2023

Happy to explore it in a future PR if 3.2 works 😀

Yep, totally fair. After I posted the comment, I also realized there's likely a Rubocop cop which can enforce / fix this for us, probably more reliable than command-line substitution.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

Gemfile Outdated
gem 'capybara-webmock', git: 'https://github.com/hashrocket/capybara-webmock.git', ref: '63d790a0'
gem 'data_uri', require: false
gem 'capybara-webmock', git: 'https://github.com/mitchellhenke/capybara-webmock.git',
ref: 'c23b02f'
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the PR has been merged, so I switched back to their repo in our Gemfile

spec/support/data_uri_helper.rb Outdated Show resolved Hide resolved
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch 2 times, most recently from 45fa4fa to 3d0d1c6 Compare January 11, 2023 16:32
@kbighorse kbighorse mentioned this pull request Jan 11, 2023
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch from 3d0d1c6 to c82dac5 Compare January 11, 2023 22:15
@mitchellhenke mitchellhenke merged commit e0a66ca into main Jan 11, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/ruby-3.1 branch January 11, 2023 22:44
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.

3 participants