money 6.11.2 → 6.11.3

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
  SHA1:
3
- metadata.gz: 839ee653922ffdc788d8e2228cb5a1abb45ba8d0
4
- data.tar.gz: 4b088a1a439eb25e919e7866d27d4c005a34820e
3
+ metadata.gz: 1676f3c1841250eb391b20a12e2ae1701455c87b
4
+ data.tar.gz: c0ed79f93a51427b43c6af3bd3094219dbd69fe8
5
5
  SHA512:
6
- metadata.gz: 63c6e4d523b63113dc36c0d243700611078fa16649a12d04cb1a48f8be30cc9799a59363fcb53c71b20d3d94bdfe0eaafe0b72dbe372b99430203d7b24bb25da
7
- data.tar.gz: bb0848ba4f66abac84545a718671d0e7aee2a0a2d836ef4607a2ff807e61cce5cf24324c835b32b59e4773c64bacf6e0f743422798fbf07b9ca43358902923e8
6
+ metadata.gz: cb4a7fa2426f81cfc97fa07e983f12a4427ed891f2f6e2403865e58011c61ecd2244d12c2294d858f731707ae96b41a31e9bfbeb61b49006532bfb881fc6a190
7
+ data.tar.gz: ffaf8bc1eb9cb35d5c5d2017c5f4483d4b8b6ab1decc01ea0803fbb101ef053c3df4f37c8c4706ab7b6c5606aa5e3b8531fcfb9eeef4a626d29d715400b1ff40
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.11.3
4
+ - Fix regression: if enabled use i18n locales in Money#to_s
5
+
3
6
  ## 6.11.2
4
7
  - Fix regression: ignore formatting defaults for Money#to_s
5
8
 
@@ -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 decimal_mark: currency.decimal_mark,
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
@@ -1,3 +1,3 @@
1
1
  class Money
2
- VERSION = '6.11.2'
2
+ VERSION = '6.11.3'
3
3
  end
@@ -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.2
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-03 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n