money 6.14.0 → 6.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/README.md +2 -2
- data/config/currency_iso.json +1 -1
- data/lib/money/money/formatter.rb +1 -1
- data/lib/money/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 766ce2bf89d38cdc9280a79a77e1e6ccf940d1453a6b3d507e1a9ea81fd1d8ca
|
4
|
+
data.tar.gz: 9fb7990b6742cc6778733f3369a129e8911ac85f6c796f94f3e120af2e7c9794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6f467ccdfac45d2603a7642cf0da25cf0a4057bfa4d03c33a20acb4805b120b8fbe4c9b9cb8bdea6a3cc89d92425c5da19aaf5eef07827e5b16f82d054db13
|
7
|
+
data.tar.gz: 749fc675428631b124ec50da09f76f253c7b76cb350262f82dc53de5f334e30bd4d143c1477ab76305ad747c29fb7750ca91976f5f2562d212580cf65158dde7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## 6.
|
3
|
+
## 6.14.1
|
4
|
+
|
5
|
+
- Fix CHF format regression introduced in v6.14.0
|
6
|
+
- Fix deprecation warning in #format_decimal_part
|
7
|
+
|
8
|
+
## 6.14.0
|
9
|
+
|
10
|
+
- Fix Bahraini dinar symbol
|
11
|
+
- Raise exception when default currency is not set or passed as parameter
|
12
|
+
- Allow specifying default_bank as a lambda
|
13
|
+
- Allow passing a default format in currencies definition only valid without symbol_position
|
14
|
+
- Always allow comparison with zero Money
|
15
|
+
- Rename Money.infinite_precision to default_infinite_precision
|
16
|
+
- Add Currency.reset! method to reload all the default currency definitions
|
4
17
|
- Fix edgecase for Money#allocate when applying to array of all zero values
|
5
18
|
|
6
19
|
## 6.13.8
|
data/README.md
CHANGED
@@ -411,7 +411,7 @@ Money.from_amount(2.34567).format #=> "$2.35"
|
|
411
411
|
To retain the additional precision, you will also need to set `infinite_precision` to `true`.
|
412
412
|
|
413
413
|
```ruby
|
414
|
-
Money.
|
414
|
+
Money.default_infinite_precision = true
|
415
415
|
Money.from_amount(2.34567).format #=> "$2.34567"
|
416
416
|
```
|
417
417
|
|
@@ -423,7 +423,7 @@ To round to the nearest cent (or anything more precise), you can use the `round`
|
|
423
423
|
2.34567.round(2) #=> 2.35
|
424
424
|
|
425
425
|
# Money
|
426
|
-
Money.
|
426
|
+
Money.default_infinite_precision = true
|
427
427
|
Money.new(2.34567).format #=> "$0.0234567"
|
428
428
|
Money.new(2.34567).round.format #=> "$0.02"
|
429
429
|
Money.new(2.34567).round(BigDecimal::ROUND_HALF_UP, 2).format #=> "$0.0235"
|
data/config/currency_iso.json
CHANGED
@@ -347,7 +347,7 @@ class Money
|
|
347
347
|
end
|
348
348
|
|
349
349
|
def format_decimal_part(value)
|
350
|
-
return nil if currency.decimal_places == 0 && !Money.
|
350
|
+
return nil if currency.decimal_places == 0 && !Money.default_infinite_precision
|
351
351
|
return nil if rules[:no_cents]
|
352
352
|
return nil if rules[:no_cents_if_whole] && value.to_i == 0
|
353
353
|
|
data/lib/money/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.14.
|
4
|
+
version: 6.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
8
8
|
- Anthony Dmitriyev
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -144,7 +144,7 @@ metadata:
|
|
144
144
|
changelog_uri: https://github.com/RubyMoney/money/blob/master/CHANGELOG.md
|
145
145
|
source_code_uri: https://github.com/RubyMoney/money/
|
146
146
|
bug_tracker_uri: https://github.com/RubyMoney/money/issues
|
147
|
-
post_install_message:
|
147
|
+
post_install_message:
|
148
148
|
rdoc_options: []
|
149
149
|
require_paths:
|
150
150
|
- lib
|
@@ -159,8 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
163
|
-
signing_key:
|
162
|
+
rubygems_version: 3.1.2
|
163
|
+
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: A Ruby Library for dealing with money and currency conversion.
|
166
166
|
test_files: []
|