spree_core 4.0.0.rc3 → 4.0.0

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: a92eeda37655c24a7921c434a9e7cef57121e16da3457279999d2011f898bea8
4
- data.tar.gz: 85dc63ab6533ea10eb138804558df376e33f1bfe24e0345d5209665a76c3b724
3
+ metadata.gz: a5c784614a14ca9019dd8effe620628917a726c4b173302a4e96a11cd8dde241
4
+ data.tar.gz: d50f4eefd34a384068ccb6eb814badec4e0cc829b52785bcafea37caa09e335a
5
5
  SHA512:
6
- metadata.gz: 368d97922da6dbda108e121097efce68a7393b556a0f3c0d8504db6158be11a42a1177d5a85e77c43d01d29de224f45666928a00ab0e3865274e44c0cb50b4fa
7
- data.tar.gz: 3298b2b794cae1e7c9b8653c581af1d7bb5077cc8a7b199644657b903597f807ec2c8cf2312f78a5a88f01d1c06905016dcd5948bdab77ec000b38ae7e0b79f0
6
+ metadata.gz: 43b7df9743323b445496eb6ca7f8d326ef5f28c01d258455d61ccfcdfcf7ade994ba11fe5fca6bb8a83010f0fd571d40f6514adc416e0aab7332fd93be3d4916
7
+ data.tar.gz: c98509b281dd94ed9bcf13ffdc19bbdc54ac38c3e0027b93b28305f041522d12d23d77cd8cf5299084d7eb8f0b723803d4c1e2aa025299248f37409354f4b77f
@@ -617,6 +617,14 @@ module Spree
617
617
  end
618
618
  end
619
619
 
620
+ def valid_promotions
621
+ order_promotions.where(promotion_id: valid_promotion_ids).uniq(&:promotion_id)
622
+ end
623
+
624
+ def valid_promotion_ids
625
+ all_adjustments.eligible.nonzero.promotion.map { |a| a.source.promotion_id }.uniq
626
+ end
627
+
620
628
  private
621
629
 
622
630
  def link_by_email
@@ -43,7 +43,7 @@ module Spree
43
43
  private
44
44
 
45
45
  def current_tax_zone
46
- current_order.try(:tax_zone) || Spree::Zone.default_tax
46
+ @current_tax_zone ||= current_order.try(:tax_zone) || Spree::Zone.default_tax
47
47
  end
48
48
  end
49
49
  end
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- '4.0.0.rc3'
3
+ '4.0.0'
4
4
  end
5
5
  end
@@ -40,6 +40,7 @@ Gem::Specification.new do |s|
40
40
  s.add_dependency 'state_machines-activemodel', '~> 0.7'
41
41
  s.add_dependency 'stringex'
42
42
  s.add_dependency 'twitter_cldr', '~> 4.3'
43
+ s.add_dependency 'sprockets', '~> 3.7'
43
44
  s.add_dependency 'sprockets-rails'
44
45
  s.add_dependency 'mini_magick', '~> 4.9.4'
45
46
  s.add_dependency 'image_processing', '~> 1.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc3
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -314,6 +314,20 @@ dependencies:
314
314
  - - "~>"
315
315
  - !ruby/object:Gem::Version
316
316
  version: '4.3'
317
+ - !ruby/object:Gem::Dependency
318
+ name: sprockets
319
+ requirement: !ruby/object:Gem::Requirement
320
+ requirements:
321
+ - - "~>"
322
+ - !ruby/object:Gem::Version
323
+ version: '3.7'
324
+ type: :runtime
325
+ prerelease: false
326
+ version_requirements: !ruby/object:Gem::Requirement
327
+ requirements:
328
+ - - "~>"
329
+ - !ruby/object:Gem::Version
330
+ version: '3.7'
317
331
  - !ruby/object:Gem::Dependency
318
332
  name: sprockets-rails
319
333
  requirement: !ruby/object:Gem::Requirement