money 6.16.0 → 6.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/money/money/formatter.rb +13 -2
- data/lib/money/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77a263720ab3ec11aa09efafd92db24699bb94a6c1dbde3ef4091919d4d9f6f
|
4
|
+
data.tar.gz: 740a688dd466867db5b75a12f6f937401097bfb3961a6767238cab977b6a6e18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea34a12312f4dc1c356dd2feef065c282e0c4a6452ad9c85cb594dead220bd2cdd7fbe2294e9252f8ab4805f1c75f652572012ff28b93d3fccdf5f7738eeb0b7
|
7
|
+
data.tar.gz: cb819df21f0b5177c3f28ad20adc831dff9e153e51efb1077725eaa1f80e67446de8eb4bcb8e20600c52cde575c776cb6858b50d794874b955cac558d3de8896
|
data/CHANGELOG.md
CHANGED
@@ -124,11 +124,14 @@ class Money
|
|
124
124
|
# the currency should be delimited by the specified character or ','
|
125
125
|
#
|
126
126
|
# @example
|
127
|
-
# # If
|
127
|
+
# # If a falsey value is specified, no thousands_separator is used.
|
128
128
|
# Money.new(100000, "USD").format(thousands_separator: false) #=> "1000.00"
|
129
129
|
# Money.new(100000, "USD").format(thousands_separator: nil) #=> "1000.00"
|
130
130
|
# Money.new(100000, "USD").format(thousands_separator: "") #=> "1000.00"
|
131
131
|
#
|
132
|
+
# # If true is specified, the locale or default thousands_separator is used.
|
133
|
+
# Money.new(100000, "USD").format(thousands_separator: true) #=> "1,000.00"
|
134
|
+
#
|
132
135
|
# # If a string is specified, it's value is used.
|
133
136
|
# Money.new(100000, "USD").format(thousands_separator: ".") #=> "$1.000.00"
|
134
137
|
#
|
@@ -241,7 +244,11 @@ class Money
|
|
241
244
|
end
|
242
245
|
|
243
246
|
def thousands_separator
|
244
|
-
lookup :thousands_separator
|
247
|
+
val = lookup :thousands_separator
|
248
|
+
|
249
|
+
return val unless val == true
|
250
|
+
|
251
|
+
lookup_default :thousands_separator
|
245
252
|
end
|
246
253
|
|
247
254
|
def decimal_mark
|
@@ -371,6 +378,10 @@ class Money
|
|
371
378
|
def lookup(key)
|
372
379
|
return rules[key] || DEFAULTS[key] if rules.has_key?(key)
|
373
380
|
|
381
|
+
lookup_default key
|
382
|
+
end
|
383
|
+
|
384
|
+
def lookup_default(key)
|
374
385
|
(Money.locale_backend && Money.locale_backend.lookup(key, currency)) || DEFAULTS[key]
|
375
386
|
end
|
376
387
|
|
data/lib/money/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
162
|
+
rubygems_version: 3.5.3
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: A Ruby Library for dealing with money and currency conversion.
|