moolah 5.6.0 → 5.7.0

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: 0cfb80941d30fee4042a1186672a5463fc99d2e0b4700f1ef6138862ce5b7a19
4
- data.tar.gz: ab463d36b7d644ad8f6ec3adb4a1d8104e1348623558997c7f5c66a0133166bc
3
+ metadata.gz: 642cfed3ddab0155c90c5c283aa400e4814a7ccfcaff40ba33349f0192267fbb
4
+ data.tar.gz: a18e5d28b65c719a1f09779df3fd54c33ad24c806b58aaf06a6a6c0c29cba911
5
5
  SHA512:
6
- metadata.gz: '0889eaa959a7730ddbad5775f94d13b80cd316d5d6abf873d77fa9407cc43e2ab37c4d6f0f66ded04e4e49cb704bc81fa6931214b0864418d3cf70cee7364cf1'
7
- data.tar.gz: 6898f7b1ea7d4ce11c885215653cac18149120f845a47f5463994a2bfa2a787f5b30409552771bc87ab57757ce64ac98c53f5df2beb861270e8f7ed73ca9d837
6
+ metadata.gz: 10403a45a27a97ed52c8ccd5d402bc6af220e7869cb3cefa0aee1cef8a65db0e5df03702b93a4c082f5509583bc1a76f38700eed611a5c4f23d93fc5538678f7
7
+ data.tar.gz: f78ec1432d700e5cbffe0c440b6224bd22d37c8452a8f9b51b10317940389ea52d76f49198bbf1a419a92806fa312dc3089fc719874e74056298e7e4d1930223
data/lib/moolah/money.rb CHANGED
@@ -14,7 +14,7 @@ module Moolah
14
14
  attribute :fx_rate, BigDecimal
15
15
 
16
16
  def initialize(args = {})
17
- args = args.transform_keys(&:to_sym)
17
+ args = args.transform_keys(&:to_sym) unless args.is_a?(Money)
18
18
 
19
19
  args[:currency] = 'AUD' if args[:currency].blank?
20
20
  args[:fx_rate] = '1.0000' if args[:currency] == 'AUD'
@@ -1,6 +1,6 @@
1
1
  module Moolah
2
2
  MAJOR = 5
3
- MINOR = 6
3
+ MINOR = 7
4
4
  PATCH = ENV['PATCH_VERSION'] || 0
5
5
 
6
6
  private_constant :MAJOR, :MINOR, :PATCH
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moolah
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.0
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Lee
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-09-07 00:00:00.000000000 Z
12
+ date: 2022-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler