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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 020a26aff536b7d54d8c1b06b3018b52eda8c4085e87817f9a40f5245ed59d74
4
- data.tar.gz: efe3d99e59baeda27fef40583b2e13fdcfb7608771aee5091a6a1663977fe1f9
3
+ metadata.gz: 9a7f2b9021ba467f633adc6c9de99a2506450e64a559e80216b3ec9f4aa0d8b8
4
+ data.tar.gz: 7065a07189dabcefbe4493e9246057c16da5184e63ff152eb63964c7e292f6f0
5
5
  SHA512:
6
- metadata.gz: 356eba9a2f547cc8c65f8f9fc0c5464fecc23670fa4bfdb6ed4ae39bd5080e89ec4be947f4ce6a04da51676e89bfbfdf4adefe590566b97993025b496274e145
7
- data.tar.gz: d9cea15b3214c263d8318c13355c9c08fc6d38d86bb265a7f2d68cd91ee29284c41814882230f6e87891cba00e6e7e486a9505ef1373af878363689c9048963b
6
+ metadata.gz: 0b0ccd3b682176447b01ffe0513710fb490621eb9abae6078ea88464012320f766972c7dc71f02dc733fdd9e593199e9f2f594e1155f1e1aa03e5fc9ce9352b3
7
+ data.tar.gz: c92da07d7d83e040ac283b1bf62031077506616ddc6e78dd901472977b5df984db521c135cc550d84aa0902a9d972d2a8c450a9a55ee552e653a3904dc2ac135
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-money (3.1.0)
4
+ shopify-money (3.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/money/config.rb CHANGED
@@ -16,6 +16,10 @@ class Money
16
16
  @legacy_json_format = true
17
17
  end
18
18
 
19
+ def experimental_crypto_currencies!
20
+ @experimental_crypto_currencies = true
21
+ end
22
+
19
23
  def initialize
20
24
  @default_currency = nil
21
25
  @legacy_json_format = false
data/lib/money/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Money
4
- VERSION = "3.1.0"
4
+ VERSION = "3.1.1"
5
5
  end
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 = experimental_crypto_currencies unless experimental_crypto_currencies.nil?
84
+ config.experimental_crypto_currencies! if experimental_crypto_currencies
85
85
  end
86
86
  yield
87
87
  ensure
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Inc