spree_core 4.1.0 → 4.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: 3057b4eecebae24385eed939c3236d14177222693d927f85e7fac5ac775cbdec
4
- data.tar.gz: 8f5f40c80e021a02bb985b119f9c6f5e90d268392b81984df85d0f738208866e
3
+ metadata.gz: f0c46fae6279b3cdf251b8a40b119657c8caadaa17303780cb8d156294dd8ae7
4
+ data.tar.gz: ffb59060c4a5bc4519ccf32d9c36304daf793bdfced97c29904bcf468603c20f
5
5
  SHA512:
6
- metadata.gz: a495af06eebc663bb6c69ccf12b411989f8283ac36edd633b21421bf0b152dbc91315515ea1c5189a1c4b43f45d397fd1d076ad9e35c08e35bdf8f6df573d50e
7
- data.tar.gz: e559d035f7ef2359141281dbc4d42dd2f0791ac0c42f7ecc47a638ba0f1dd1bffab385e35389b70409ce1bf856c609a4dabf7edbbb428778f05545e12269b726
6
+ metadata.gz: 6dd61df3b304c7a44120c0390e815cea1188660753af20dd98792e0322288fc3a54d20a31879ced1e8ac06fe95639822a9ed9262066b13f42c1d05139f99bc9a
7
+ data.tar.gz: 52599c5170cbc0d2bfae5e6de7d5731b0be566b78d287f47d692a6dc7176ae2898da9bf0a6b9b98a312170733d0d53543a92c3834a3e6f4ffd63f771d9244f48
@@ -95,6 +95,8 @@ module Spree
95
95
  end
96
96
 
97
97
  def pretty_time(time)
98
+ return '' if time.blank?
99
+
98
100
  [I18n.l(time.to_date, format: :long), time.strftime('%l:%M %p')].join(' ')
99
101
  end
100
102
 
@@ -58,9 +58,13 @@ module Spree
58
58
  end
59
59
 
60
60
  def cache_key_for_products(products = @products, additional_cache_key = nil)
61
- count = products.count
61
+ ids = if products.is_a?(Array)
62
+ products.map(&:id)
63
+ else
64
+ products.ids
65
+ end.join('-')
62
66
  max_updated_at = (products.maximum(:updated_at) || Date.today).to_s(:number)
63
- products_cache_keys = "spree/products/all-#{params[:page]}-#{params[:sort_by]}-#{max_updated_at}-#{count}-#{@taxon&.id}"
67
+ products_cache_keys = "spree/products/#{ids}-#{params[:page]}-#{params[:sort_by]}-#{max_updated_at}-#{@taxon&.id}"
64
68
  (common_product_cache_keys + [products_cache_keys] + [additional_cache_key]).compact.join('/')
65
69
  end
66
70
 
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- '4.1.0'
3
+ '4.1.1'
4
4
  end
5
5
  end
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.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant