elixirmoney / money

Elixir library for working with Money safer, easier, and fun... Is an interpretation of the Fowler's Money pattern in fun.prog.
https://hex.pm/packages/money/
MIT License
826 stars 139 forks source link

updated Money.parse/1 to work with decimal ~> 1.2 and ~> 2.0 #227

Closed gabrielperales closed 2 months ago

gabrielperales commented 2 months ago

Closes #213

I had to use Blend to test Money with decimal 1.2 and 2.0.

Now, there is a blend.exs file with the differents supported versions of decimal. You can install and run different dependencies versions using the BLEND environment variable as it is described here.

I have also updated the GitHub action to run the tests with both versions :).

gabrielperales commented 2 months ago

Thanks for the fix. I don't like that this will make our tests 2x slower, but we'll leave your option for now

We can run only the Money.parse tests for decimal 1.2.

gabrielperales commented 2 months ago

Thanks for the fix. I don't like that this will make our tests 2x slower, but we'll leave your option for now

I have updated the CI to run only the test wich uses Decimal with decimal ~> 1.2, so that should save a few seconds 😅

Nitrino commented 2 months ago

@gabrielperales Thanks for all your contributions ❤️

gabrielperales commented 1 month ago

@Nitrino You are welcome! I'm an Elixir newbie and contributing to open-source projects always helps to catch up on good practices 💪 . On the other hand, the new feature for configuring currency display options is going to be helpful for our projects :)