minting-rails 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c255e7b90de404e1ae633482997d2b05dbb1719222d7ce773e34ae4a6f196edb
4
- data.tar.gz: eac064a74394e82576b708340a10b2fecce0d33a3035e2bb7562eb1ca811674a
3
+ metadata.gz: a5cbd850d0e142b296ffe9b02554317c3b240a2decea3ecd35177b83fcaab225
4
+ data.tar.gz: e1f2a8b0fc4e9d573f00e8b230773bf7e883c75ecbe134c8c611c460f3203316
5
5
  SHA512:
6
- metadata.gz: 407505ed351c1256d9c8592255838a3bf2d374db1cc83d6964cfaa0581a6c45e4dbe25d86c3abf44f422605d517029d815d0cebe4ad4e035564cdcd9a49645cf
7
- data.tar.gz: 1dab215057864875e629ec1aae07dc1323f94978ed43ddca3d3542a39d9d793207a59301d90fbfa530cddd3908c9216a894ab91eff718a6202fd14f3afd8c4a6
6
+ metadata.gz: 88b6292f0807bb62a93d04a3dc7dbd5ef6139ae215f9659c66a67428f4248d9c32a73762b8837ee69bacc3959b0922393e6d3b4c0c7b7bd13526e0d466ade436
7
+ data.tar.gz: dd0a1fcf55760156015e54a1fe86962af9271f1cb0ff9c8c134a15178e1cacef4fa5ebbd6c3d378f2dce1bdb9d650bc77fc3bffb5f4f2e81ec681f8e447c6149
@@ -39,7 +39,7 @@ module Mint
39
39
  end
40
40
 
41
41
  def self.parse(amount, currency)
42
- case amount
42
+ money = case amount
43
43
  when NilClass
44
44
  nil
45
45
  when Mint::Money
@@ -54,6 +54,8 @@ module Mint
54
54
  end
55
55
  end
56
56
  # puts "parse(#{amount}, #{currency.inspect}) => #{money.inspect}"
57
+ Mint.assert_valid_currency!(currency)
58
+ money
57
59
  end
58
60
  end
59
61
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mint
4
4
  module MoneyAttribute
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minting-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilson Ferraz