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 old versions of Ruby #817

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Jul 29, 2019

Drops support for Ruby 2.1 (EOL March 31, 2017) and 2.2 (EOL March 31,
2018). They're removed from .travis.yml and the gemspec and RuboCop
configuration have also been updated to the new lower bound.

Most of the diff here are minor updates to styling as required by
RuboCop:

  • String literals are frozen by default, so the .freeze we had
    everywhere is now considered redundant.

  • We can now use Ruby 1.9 style hash syntax with string keys like { "foo": "bar" }.

  • Converted a few heredocs over to use squiggly (leading whitespace
    removed) syntax.

As discussed in Slack, I didn't drop support for Ruby 2.3 (EOL March 31,
2019) as we still have quite a few users on it. As far as I know
dropping it doesn't get us access to any major syntax improvements or
anything, so it's probably not a big deal.

r? @ob-stripe
cc @stripe/api-libraries


Note: Targets the branch integration-v5 in #815 instead of master.

@brandur brandur mentioned this pull request Jul 29, 2019
17 tasks
@brandur-stripe brandur-stripe force-pushed the brandur-drop-old-ruby branch 2 times, most recently from 7da7070 to 5b3c4a3 Compare July 29, 2019 21:42
Drops support for Ruby 2.1 (EOL March 31, 2017) and 2.2 (EOL March 31,
2018). They're removed from `.travis.yml` and the gemspec and RuboCop
configuration have also been updated to the new lower bound.

Most of the diff here are minor updates to styling as required by
RuboCop:

* String literals are frozen by default, so the `.freeze` we had
  everywhere is now considered redundant.

* We can now use Ruby 1.9 style hash syntax with string keys like `{
  "foo": "bar" }`.

* Converted a few heredocs over to use squiggly (leading whitespace
  removed) syntax.

As discussed in Slack, I didn't drop support for Ruby 2.3 (EOL March 31,
2019) as we still have quite a few users on it. As far as I know
dropping it doesn't get us access to any major syntax improvements or
anything, so it's probably not a big deal.
Copy link
Contributor

@ob-stripe ob-stripe left a comment

Choose a reason for hiding this comment

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

LGTM!

lib/stripe/multipart_encoder.rb Show resolved Hide resolved
@ob-stripe
Copy link
Contributor

cc @rattrayalex-stripe. This isn't going to be merged in master right away, but once it is we'll need to update the codegen to not add .freeze to literal strings.

@brandur-stripe
Copy link
Contributor

Thanks OB!

cc @rattrayalex-stripe. This isn't going to be merged in master right away, but once it is we'll need to update the codegen to not add .freeze to literal strings.

Oops, yep, good call mentioning Alex. There was quite a few lines changed in the diff here, but hopefully there will be few needed in the generation code because it's really just the same string in a whole bunch of files.

@brandur-stripe brandur-stripe merged commit 658f318 into integration-v5 Jul 29, 2019
@brandur-stripe brandur-stripe deleted the brandur-drop-old-ruby branch July 29, 2019 23:52
@rattrayalex-stripe
Copy link
Contributor

Nice!!

And yeah thanks for heads-up, as brandur noted should be trivial

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.

5 participants