workarea-core 3.4.12 → 3.4.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 562d72c278817488a6eaed96978ec06e8b26c741ac2189703dc867e3d71636c4
4
- data.tar.gz: cfcc399242dfd9c7ae236e3dbd41991c9dce481310c0b39df3e0b561e86c1042
3
+ metadata.gz: ffa285c221664ee81b35ebac98cd0c91206f5fa79bd699da8a1f9e106c131bf2
4
+ data.tar.gz: 8f2de8bf414fc6aebbb0ad679a364c4bb96275964b1f189e9dd77e0bc6e17a6f
5
5
  SHA512:
6
- metadata.gz: 7c621877b8499b9aae4cea3c8689b8dbfe2e09a7a0c11dfb01409e94c6ae2754ae30ec04dcd0a4ffe9c8a2eaffd88bc4a83fa08f561a41ca09bf9fdcc4394b06
7
- data.tar.gz: a080344a194e13c400f7a9aef2ccd835c66cc57018449e3dcd280e9a08d6447e0e920641a44bff4a67d4fb9c75397c95d45d54dd607f967fe944c6df694392eb
6
+ metadata.gz: 1b99d10ded2a1570195209a98ad147b7d4e93917fe91d3ebf171d2f9f3ea0faa7d874aa75edea612b037599d8e48121eb2db34c57ab7eece9cd5080608e2f122
7
+ data.tar.gz: 933c4c1a786bc973e6762e20f59655a438029352b158fff021536a019c94a5fec0005b2aa646dc94272bcfb1b21b1a0f8f55cc8bab695c333368ee8235fb1142
@@ -6,8 +6,8 @@ module Workarea
6
6
  # This will be the order id
7
7
  field :_id, type: String, default: -> { BSON::ObjectId.new.to_s }
8
8
  field :created_by_id, type: String
9
- field :subtotal_adjustment, type: Money, default: 0.to_m
10
- field :shipping_adjustment, type: Money, default: 0.to_m
9
+ field :subtotal_adjustment, type: Money, default: 0
10
+ field :shipping_adjustment, type: Money, default: 0
11
11
  field :item_prices, type: Hash, default: {}
12
12
 
13
13
  def has_adjustments?
@@ -1,6 +1,6 @@
1
1
  module Workarea
2
2
  class ProductsSeeds
3
- SAMPLE_IMAGES_BASE_URL = "https://api.github.com/repos/workarea-commerce/workarea/contents/core/data/product_images"
3
+ SAMPLE_IMAGES_BASE_URL = "https://github.com/workarea-commerce/workarea/raw/master/core/data/product_images"
4
4
  SAMPLE_IMAGES = (0..39).map { |i| "#{i}.jpg" }
5
5
 
6
6
  def perform
@@ -2,7 +2,7 @@ module Workarea
2
2
  module VERSION
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 12
5
+ PATCH = 13
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
@@ -54,6 +54,14 @@ module Workarea
54
54
  assert_nil(override.item_price_for_id('1234'))
55
55
  assert_equal(2.to_m, override.item_price_for_id('5678'))
56
56
  end
57
+
58
+ def test_handles_currency_changes
59
+ aud = Money::Currency.new('AUD')
60
+ Money.default_currency = aud
61
+ override = Pricing::Override.new
62
+
63
+ assert_equal(aud, override.subtotal_adjustment.currency)
64
+ end
57
65
  end
58
66
  end
59
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.12
4
+ version: 3.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -2578,7 +2578,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2578
2578
  - !ruby/object:Gem::Version
2579
2579
  version: '0'
2580
2580
  requirements: []
2581
- rubygems_version: 3.0.4
2581
+ rubygems_version: 3.0.6
2582
2582
  signing_key:
2583
2583
  specification_version: 4
2584
2584
  summary: Core of the Workarea Commerce Platform