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

More specific version for monetize #15

Closed

Conversation

huoxito
Copy link

@huoxito huoxito commented Aug 25, 2018

related solidusio#2826

@kennyadsl
Copy link
Member

Hey @huoxito thanks for your help and great find. Why did you also lock the ransack version?

@huoxito
Copy link
Author

huoxito commented Aug 26, 2018

hey @kennyadsl I think it's seems safer locking to patch versions but I'm not sure what the guidelines are here. Let me revert that.

It would be great to understand that failing spec better too, this could not be the best solution.

@kennyadsl
Copy link
Member

@huoxito I think the issue comes from this PR in the money gem. That code is included in money 6.12 which is now a dependency of monetize 1.9.0. Still not sure how to handle this.

It seems to provide inconsistent results with latest money gem v6.12
  See https://www.rubydoc.info/gems/money/Money#allocate-instance_method

  Splits a given amount in parts without loosing pennies. The left-over pennies
  will be distributed round-robin amongst the parties. This means that parties
  listed first will likely receive more pennies than ones that are listed later.
@huoxito
Copy link
Author

huoxito commented Aug 26, 2018

@kennyadsl locking to monetize 1.8.0 seems the easiest way to get going for now. I created RubyMoney/monetize#118 maybe we get some help there too.

@kennyadsl kennyadsl changed the title More specific version for monetize and ransack More specific version for monetize Aug 27, 2018
kennyadsl added a commit that referenced this pull request Aug 27, 2018
This commit comes from @huoxito work on #15 (Thanks!)

On newer versions monetize requires money 6.12 which has a rewrite of
the Money#allocate method that we use in DistrubutedAmount calculator.

This is the PR that is causing issues: RubyMoney/money#772
This is the issue we need to be solved before relaxing the dependency
again: RubyMoney/monetize#118
@huoxito huoxito closed this Sep 1, 2018
@huoxito huoxito deleted the specific-monetize-ransack branch September 1, 2018 15:10
kennyadsl added a commit that referenced this pull request Sep 12, 2018
This commit comes from @huoxito work on #15 (Thanks!)

On newer versions monetize requires money 6.12 which has a rewrite of
the Money#allocate method that we use in DistrubutedAmount calculator.

This is the PR that is causing issues: RubyMoney/money#772
This is the issue we need to be solved before relaxing the dependency
again: RubyMoney/monetize#118
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.

None yet

2 participants