Conversation
6bfa30f to
4f6cae1
Compare
yukideluxe
left a comment
There was a problem hiding this comment.
@RubyMoney/core this is ready for review! I could not help doing some housekeeping changes based on changes we've done in the money gem 😳
|
|
||
| computed_currency || fallback_currency || Money.default_currency | ||
| found = computed_currency || fallback_currency || Money.default_currency | ||
| raise Money::Currency::UnknownCurrency unless found |
There was a problem hiding this comment.
@sunny I found the commit that caused this! RubyMoney/money@5c71447
Before adding the @default_currency.nil? condition, the code was initializing a currency with Money::Currency.new(nil) and then the Money::Currency::UnknownCurrency which was causing Money.default_currency to raise that error.
One could argue that we should differentiate between the Money::Currency::NoCurrency and Money::Currency::UnknownCurrency errors but I think this is OK to avoid touching more code and keep backwards compatibility. We are wrapping the error on Monetize::ParseError instead, anyways! 🙏🏻
There was a problem hiding this comment.
Awesome, thanks for looking more into this! 👏🏻
| spec.homepage = 'https://github.com/RubyMoney/monetize' | ||
| spec.license = 'MIT' | ||
| Gem::Specification.new do |s| | ||
| s.name = "monetize" |
There was a problem hiding this comment.
I just thought it would be easier for us if all the gems in this org keep the same structure 😊
Hello @RubyMoney/core!
We are bumping the major version of this gem to release the unreleased changes and enforce it to use the latest version of money! 🙆🏻♀️