Skip to content

Releases: kipcole9/money

Money version 2.12.2

22 Oct 22:09
Compare
Choose a tag to compare

Bug Fixes

  • Sometimes Mix.Dep.cached/0 returns a structure which doesn't identify the version of the dependency loaded. Therefore in this version we just check if the function Ecto.Migrator.migrations_path/0 exists. Thanks to @hl for the issue. Closes #86.

Money version 2.12.1

22 Oct 05:58
Compare
Choose a tag to compare

Bug Fixes

  • Fixed error which assumed that Mix.Dep.loaded_by_name/2 was renamed in Elixir 1.6 but in fact it was renamed to Mix.Dep.loaded_by_name/2 in Elixir 1.7.

  • Fix and error in defining compiler paths for tests to ensure compatibility for Elixir 1.5, 1.6 and 1.7

Money version 2.12.0

22 Oct 02:42
Compare
Choose a tag to compare

Enhancements

Supports Ecto version 3.x (ecto_sql) release candidate. When upgrading from Ecto 2 to Ecto 3 the following configuration changes are applied:

In config.exs you would likely have:

defp deps do
  [
    {:ecto, "~> 2.1"},
    {:postgrex, "> 0.0.0"},
    {:ex_money, "~> 2.6"},
    {:jason, "~> 1.0"}
    ...
  ]
end

With Ecto 3 (ecto_sql) the configuration would be:

# Change to the release versions when
# available on hex
defp deps do
  [
    {:ecto_sql, "~> 3.0-rc"},
    {:postgrex, "~> 0.14-rc"},
    {:ex_money, "~> 2.12"},
    {:jason, "~> 1.0"}
    ...
  ]
end

Note that :ecto_sql uses :db_connection version 2.0 which has its own connection pooling and :poolboy is no longer required.

Money version 2.11.0

17 Oct 22:03
Compare
Choose a tag to compare

Enhancements

  • Updated dependency on ex_cldr to version 1.8 which uses CLDR version 34 data.

Money version 2.10.0

16 Oct 23:05
Compare
Choose a tag to compare

Enhancements

Adds an optional parameter options to Money.new/2 which is now Money.new/3. options is a keyword list of options. Only one option is valid, :locale which, if specified must be in Cldr.known_locales The locale is used to transform any binary amounts passed to Money.new/3 such that localised grouping characters and decimal characters are normalised to the Elixir requirements. For example before this change the following example would error because the decimal point is a separator in the "de" locale and the decimal character , is invalid in Elixir number literals.

iex> Money.new("1.000,99", :EUR)
{:error, {Money.InvalidAmountError, "Amount cannot be converted to a number: \"1.000,99\""}}

Using the :locale parameter it is now possible to specify the locale transform for number string literals:

iex> Money.new("1.000,99", :EUR, locale: "de")
#Money<:EUR, 1000.99>

Thanks to @f34nk for the suggestion.

Money version 2.8.0

28 Aug 22:37
Compare
Choose a tag to compare

Enhancements

  • Separates the caching of etags from the caching of exchange rates. Previously the same cache behaviour (and therefore each implementation) was expected to support a key/value store but this is an unreasonable assumption. Etags are now cached in an ets table separate from the exchange rates cache. As a result, the get/1 and put/2 functions are removed from the Money.ExchangeRates.Cache behaviour. Thanks to @LostKobrakai. Closes #74.

Money version 2.7.3

28 Aug 10:41
Compare
Choose a tag to compare

Bug Fixes

  • Fixes the implementation of Money.ExchangeRates.last_update/0 to match the documentation. Thanks to @xavier. Closes #77.

  • Updates ex_doc dependency.

Money version 2.7.2

20 Aug 23:25
Compare
Choose a tag to compare

Bug Fixes

  • Converting from currency to a binary to_currency is a no-op as it already is for an atom to_currency. Thanks to @LostKobrakai. Closes #76.

Money version 2.7.1

15 Aug 21:50
Compare
Choose a tag to compare

Bug Fixes

  • Correct the name of the Subscription exception modules. Thanks to @Joe-noh. Closes #75.

Money version 2.7.0

19 Jul 22:33
Compare
Choose a tag to compare

Enhancements

  • Added tests for Gingotts.Protocol

  • Separates the Ecto migrations from the SQL contained therein so that non-Ecto users can leverage the DDL to create/drop the money_with_currency type and the creation/deletion of aggregate functions for money_with_currency. See the module Money.DDL.