Skip to content

Commit

Permalink
Bump version to 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Apr 9, 2018
1 parent 6a9f3ab commit 38b449e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changelog for Money v2.5.0

This is the changelog for Money v2.5.0 released on ____, 2018. For older changelogs please consult the release tag on [GitHub](https://github.com/kipcole9/money/tags)
This is the changelog for Money v2.5.0 released on April 9th, 2018. For older changelogs please consult the release tag on [GitHub](https://github.com/kipcole9/money/tags)

### Enhancements

Adds basic support for Postgres aggregation functions using the `Money.Ecto.Composite.Type` type definition. This allows expression in Ecto such as:
* Adds support for ISO4217 "X" currency codes. Currency codes that start with "X" followed by two alphabetic characters are considered valid currency codes. Some codes are defined, like "XAU" for "Gold". The undefined codes are available for application-specific usage. Note that from a `Cldr` perspective these codes are considered valid, but unknown. This means they can be used anywhere as a currency for `Money`. But `Cldr.known_currency?/1` will return `false` for these codes since there is no definition for them in `CLDR`.

* Adds basic support for Postgres aggregation functions using the `Money.Ecto.Composite.Type` type definition. This allows expression in Ecto such as:

```elixir
iex> q = Ecto.Query.select Ledger, [l], type(sum(l.amount), l.amount)
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Money.Mixfile do
use Mix.Project

@version "2.5.0-dev"
@version "2.5.0"

def project do
[
Expand Down Expand Up @@ -80,8 +80,8 @@ defmodule Money.Mixfile do

defp deps do
[
{:ex_cldr, "~> 1.5"},
{:ex_cldr_numbers, "~> 1.4"},
{:ex_cldr, "~> 1.5.2"},
{:ex_cldr_numbers, "~> 1.4.2"},
{:decimal, "~> 1.4"},
{:ecto, "~> 2.1", optional: true},
{:phoenix_html, "~> 2.0", optional: true},
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], []},
"earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], []},
"ecto": {:hex, :ecto, "2.2.9", "031d55df9bb430cb118e6f3026a87408d9ce9638737bda3871e5d727a3594aae", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, optional: true]}]},
"ex_cldr": {:hex, :ex_cldr, "1.5.0", "56f8301140c29fdf7f627abb2ed458479d776a56368f745903fe47f2126e2701", [:mix], [{:abnf2, "~> 0.1", [hex: :abnf2, optional: false]}, {:decimal, "~> 1.4", [hex: :decimal, optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, optional: true]}, {:jason, "~> 1.0", [hex: :jason, optional: true]}, {:phoenix, "~> 1.3", [hex: :phoenix, optional: true]}, {:plug, "~> 1.4", [hex: :plug, optional: true]}, {:poison, "~> 2.1 or ~> 3.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, optional: true]}]},
"ex_cldr_numbers": {:hex, :ex_cldr_numbers, "1.4.0", "5abe287bd326d1dacd67a2ffbd0f4757ef5521beffb80ad5e41b899a5e3cfa30", [:mix], [{:decimal, "~> 1.4", [hex: :decimal, optional: false]}, {:ex_cldr, "~> 1.5.0", [hex: :ex_cldr, optional: false]}, {:jason, "~> 1.0", [hex: :jason, optional: true]}, {:poison, "~> 2.1 or ~> 3.1", [hex: :poison, optional: true]}]},
"ex_cldr": {:hex, :ex_cldr, "1.5.2", "5c8fe295fef680a821b9e0c19242ea34037af11eb59e6d98f194e6c9c3b4252e", [:mix], [{:abnf2, "~> 0.1", [hex: :abnf2, optional: false]}, {:decimal, "~> 1.4", [hex: :decimal, optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, optional: true]}, {:jason, "~> 1.0", [hex: :jason, optional: true]}, {:phoenix, "~> 1.3", [hex: :phoenix, optional: true]}, {:plug, "~> 1.4", [hex: :plug, optional: true]}, {:poison, "~> 2.1 or ~> 3.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, optional: true]}]},
"ex_cldr_numbers": {:hex, :ex_cldr_numbers, "1.4.2", "8bb279e601dac4278e1860dd6c2bbb9ee00f6a1300240073f13a75a73ed9f817", [:mix], [{:decimal, "~> 1.4", [hex: :decimal, optional: false]}, {:ex_cldr, "~> 1.5.2", [hex: :ex_cldr, optional: false]}, {:jason, "~> 1.0", [hex: :jason, optional: true]}, {:poison, "~> 2.1 or ~> 3.1", [hex: :poison, optional: true]}]},
"ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, optional: true]}]},
"mime": {:hex, :mime, "1.2.0", "78adaa84832b3680de06f88f0997e3ead3b451a440d183d688085be2d709b534", [:mix], []},
Expand Down
4 changes: 2 additions & 2 deletions test/money_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ defmodule MoneyTest do
end

test "creating a money struct with an invalid atom currency code returns error tuple" do
assert Money.new(:XYZ, 100) ==
{:error, {Money.UnknownCurrencyError, "The currency :XYZ is invalid"}}
assert Money.new(:ZYZ, 100) ==
{:error, {Money.UnknownCurrencyError, "The currency :ZYZ is invalid"}}
end

test "creating a money struct with an invalid binary currency code returns error tuple" do
Expand Down

0 comments on commit 38b449e

Please sign in to comment.