money 6.11.2 → 6.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/money/money.rb +1 -2
- data/lib/money/version.rb +1 -1
- data/spec/money_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1676f3c1841250eb391b20a12e2ae1701455c87b
|
4
|
+
data.tar.gz: c0ed79f93a51427b43c6af3bd3094219dbd69fe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4a7fa2426f81cfc97fa07e983f12a4427ed891f2f6e2403865e58011c61ecd2244d12c2294d858f731707ae96b41a31e9bfbeb61b49006532bfb881fc6a190
|
7
|
+
data.tar.gz: ffaf8bc1eb9cb35d5c5d2017c5f4483d4b8b6ab1decc01ea0803fbb101ef053c3df4f37c8c4706ab7b6c5606aa5e3b8531fcfb9eeef4a626d29d715400b1ff40
|
data/CHANGELOG.md
CHANGED
data/lib/money/money.rb
CHANGED
@@ -351,8 +351,7 @@ class Money
|
|
351
351
|
# @example
|
352
352
|
# Money.ca_dollar(100).to_s #=> "1.00"
|
353
353
|
def to_s
|
354
|
-
format
|
355
|
-
thousands_separator: '',
|
354
|
+
format thousands_separator: '',
|
356
355
|
no_cents_if_whole: currency.decimal_places == 0,
|
357
356
|
symbol: false,
|
358
357
|
ignore_defaults: true
|
data/lib/money/version.rb
CHANGED
data/spec/money_spec.rb
CHANGED
@@ -482,6 +482,15 @@ YAML
|
|
482
482
|
expect(Money.new(10_00, "BRL").to_s).to eq "10,00"
|
483
483
|
end
|
484
484
|
|
485
|
+
context "using i18n" do
|
486
|
+
before { I18n.backend.store_translations(:en, number: { format: { separator: "." } }) }
|
487
|
+
after { reset_i18n }
|
488
|
+
|
489
|
+
it "respects decimal mark" do
|
490
|
+
expect(Money.new(10_00, "BRL").to_s).to eq "10.00"
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
485
494
|
context "with defaults set" do
|
486
495
|
before { Money.default_formatting_rules = { with_currency: true } }
|
487
496
|
after { Money.default_formatting_rules = nil }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.11.
|
4
|
+
version: 6.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|