shopify-money 3.1.0 → 3.1.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/money/config.rb +4 -0
- data/lib/money/version.rb +1 -1
- data/spec/config_spec.rb +18 -0
- data/spec/spec_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a7f2b9021ba467f633adc6c9de99a2506450e64a559e80216b3ec9f4aa0d8b8
|
4
|
+
data.tar.gz: 7065a07189dabcefbe4493e9246057c16da5184e63ff152eb63964c7e292f6f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b0ccd3b682176447b01ffe0513710fb490621eb9abae6078ea88464012320f766972c7dc71f02dc733fdd9e593199e9f2f594e1155f1e1aa03e5fc9ce9352b3
|
7
|
+
data.tar.gz: c92da07d7d83e040ac283b1bf62031077506616ddc6e78dd901472977b5df984db521c135cc550d84aa0902a9d972d2a8c450a9a55ee552e653a3904dc2ac135
|
data/Gemfile.lock
CHANGED
data/lib/money/config.rb
CHANGED
data/lib/money/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
@@ -72,7 +72,25 @@ RSpec.describe "Money::Config" do
|
|
72
72
|
it 'can be set to true' do
|
73
73
|
config = Money::Config.new
|
74
74
|
config.experimental_crypto_currencies = true
|
75
|
+
expect(config.experimental_crypto_currencies).to be(true)
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'can be set to true using the bang method' do
|
79
|
+
config = Money::Config.new
|
80
|
+
config.experimental_crypto_currencies!
|
75
81
|
expect(config.experimental_crypto_currencies).to eq(true)
|
76
82
|
end
|
77
83
|
end
|
84
|
+
|
85
|
+
describe 'legacy_json_format' do
|
86
|
+
it 'defaults to false' do
|
87
|
+
expect(Money::Config.new.legacy_json_format).to eq(false)
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'can be set to true using the bang method' do
|
91
|
+
config = Money::Config.new
|
92
|
+
config.legacy_json_format!
|
93
|
+
expect(config.legacy_json_format).to eq(true)
|
94
|
+
end
|
95
|
+
end
|
78
96
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -81,7 +81,7 @@ def configure(default_currency: nil, legacy_json_format: nil, legacy_deprecation
|
|
81
81
|
config.legacy_json_format! if legacy_json_format
|
82
82
|
config.legacy_deprecations! if legacy_deprecations
|
83
83
|
config.legacy_default_currency! if legacy_default_currency
|
84
|
-
config.experimental_crypto_currencies
|
84
|
+
config.experimental_crypto_currencies! if experimental_crypto_currencies
|
85
85
|
end
|
86
86
|
yield
|
87
87
|
ensure
|