Skip to content

bigdecimal 2 support #370

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

Merged
merged 2 commits into from
Sep 9, 2020
Merged

bigdecimal 2 support #370

merged 2 commits into from
Sep 9, 2020

Conversation

dpep
Copy link
Contributor

@dpep dpep commented Aug 21, 2020

BigDecimal 2.0 no longer supports .new. looks like json_api_client uses both BigDecimal(x) and BigDecimal.new(x) - mind if we upgrade these last few calls?

@dpep dpep changed the title bigdecimal 2 bigdecimal 2 support Aug 21, 2020
BigDecimal 2.0 no longer supports `.new`.  looks like this gem uses both `BigDecimal(x)` and `BigDecimal.new(x)` - mind if we upgrade these last few calls?
@sharshenov
Copy link
Contributor

@dpep I suppose, you are suggesting these changes because of error on upgrading to ruby 2.7.x. Could you please also add 2.7.1 entry here and exclude it from build matrix with old activesupport versions like it is done for 2.6.0?

BTW ruby 2.7 also raises deprecation warnings on kwargs for create and update methods in Requestor. Removing curly braces resolves the warning.

@dpep
Copy link
Contributor Author

dpep commented Aug 30, 2020

@sharshenov Thanks for jumping in to help! I pulled in a gem that depended on BigDecimal v2, which caused the trouble. Similarly, Ruby 2.7 ships with that version, which looks like it breaks activesupport 3 and 4 also. I updated the travis matrix per your request

Details: https://github.com/ruby/bigdecimal#which-version-should-you-select

I'll look into the create/update deprecation warning and may follow up in a separate PR if that's ok? Anything else you want to see here?

dpep added a commit to dpep/json_api_client that referenced this pull request Aug 30, 2020
Ruby 2.7 deprecates automatic conversion from a hash to keyword arguments
https://blog.saeloun.com/2019/10/07/ruby-2-7-keyword-arguments-redesign.html

fixing those up, plus one more I noticed in the logs from JsonApiClient#370 (comment)

https://travis-ci.org/github/JsonApiClient/json_api_client/jobs/722402404

thanks @sharshenov
@dpep dpep mentioned this pull request Aug 30, 2020
@dpep
Copy link
Contributor Author

dpep commented Aug 30, 2020

@sharshenov fixed those warning in #371

@sharshenov
Copy link
Contributor

Huge thanks! I was investigating the BigDecimal problem with ruby 2.7 and was going to push my fix, but then I saw your PR 🥇

@dpep
Copy link
Contributor Author

dpep commented Sep 9, 2020

@gaorlov : mind taking a look at this change as well? any changes you'd like to see here?

Copy link
Collaborator

@gaorlov gaorlov left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, @dpep!

We usually bump the version and changelog in master. Next time!

Thanks again!

@gaorlov gaorlov merged commit bae9d1f into JsonApiClient:master Sep 9, 2020
@gaorlov
Copy link
Collaborator

gaorlov commented Sep 9, 2020

@dpep @sharshenov 1.17.1 is now live

@dpep dpep deleted the bigdecimal-2 branch September 9, 2020 04:41
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