spree_sample 4.2.0.rc4 → 4.2.0.rc5

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: e7c5aa9819368da91e4497f12737ebbb0a9db31d5e6f296e38f5bbbe507fa95f
4
- data.tar.gz: ccea45e032ed0bf8cece7c54434e4fc010d8897268602c1d03f703b8f3306131
3
+ metadata.gz: e132fb1cfcea92ddcb36a82445ce720214381371d945fa2dc985efe7fc99923d
4
+ data.tar.gz: 568e65ae4a16d3e1bfd1819c1868a55a0ddd029ea6379b07d8359d509e50601d
5
5
  SHA512:
6
- metadata.gz: 431a2894da689dad2287f43df58aa212eb98b5daff2fc42ce43f7405cad6837f5a20b86d0dc8d022e0e32468c08c4278c1b676e2ac9f01183089385dc81f1029
7
- data.tar.gz: 51a72583bd9ba2a8abd9873d20152fe75a8830b79fd502feedf5013a583dc43e46a1132d217be8ed25ed0daa959a574ba6c6252d16653b2a23e522f9c0b67a17
6
+ metadata.gz: d95c3eb43ab419defdb3bdb206e770ce2087f4e1b24e49c7eb34171461a084f15e9609bd7a1261771b985a74337b4ffaad6723c48d12dfe2e2987cb9f8319212
7
+ data.tar.gz: a3e143055088d3b450db6f18f67e6ca977cb2f941c13af4e775f08739989012776c26d515c5b86f975a0e757df0ce64e8e316c06085357d5c4f88d8e1f01c43e
data/db/samples/stores.rb CHANGED
@@ -33,4 +33,6 @@ Spree::Price.where(currency: 'USD').each do |price|
33
33
  end
34
34
  end
35
35
 
36
- Spree::Config[:show_store_selector] = true
36
+ Spree::PaymentMethod.all.each do |payment_method|
37
+ payment_method.stores = Spree::Store.all
38
+ end
data/db/samples/taxons.rb CHANGED
@@ -2,6 +2,10 @@ require 'csv'
2
2
 
3
3
  Spree::Sample.load_sample('taxonomies')
4
4
 
5
+ ADDITIONAL_TAXONS = ['Bestsellers', 'Trending', 'Streetstyle', 'Summer Sale'].freeze
6
+
7
+ SPECIAL_TAXONS = { 'New Collection': 'Summer 2021', 'Special Offers': '30% Off' }.freeze
8
+
5
9
  CHILDREN_TAXON_NAMES = CSV.read(File.join(__dir__, 'variants.csv')).map do |(parent_name, taxon_name, _product_name, _color_name)|
6
10
  [parent_name, taxon_name]
7
11
  end.uniq
@@ -31,9 +35,21 @@ taxon.permalink = taxon.permalink.gsub('categories/', '')
31
35
  taxon.taxonomy = categories
32
36
  taxon.save!
33
37
 
34
- ['Bestsellers', 'Trending', 'Streetstyle', 'Summer Sale'].each do |taxon_name|
38
+ ADDITIONAL_TAXONS.each do |taxon_name|
35
39
  taxon = categories_taxon.children.where(name: taxon_name).first_or_create!
36
40
  taxon.permalink = taxon.permalink.gsub('categories/', '')
37
41
  taxon.taxonomy = categories
38
42
  taxon.save!
39
43
  end
44
+
45
+ SPECIAL_TAXONS.each do |parent_name, taxon_name|
46
+ parent = categories_taxon.children.where(name: parent_name.to_s).first_or_create!
47
+ parent.permalink = parent.permalink.gsub('categories/', '')
48
+ parent.taxonomy = categories
49
+ parent.save!
50
+
51
+ taxon = parent.children.where(name: taxon_name).first_or_create!
52
+ taxon.permalink = taxon.permalink.gsub('categories/', '')
53
+ taxon.taxonomy = categories
54
+ taxon.save!
55
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.rc4
4
+ version: 4.2.0.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-20 00:00:00.000000000 Z
12
+ date: 2021-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 4.2.0.rc4
20
+ version: 4.2.0.rc5
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 4.2.0.rc4
27
+ version: 4.2.0.rc5
28
28
  description: Required dependency for Spree
29
29
  email: hello@spreecommerce.org
30
30
  executables: []
@@ -101,9 +101,9 @@ licenses:
101
101
  - BSD-3-Clause
102
102
  metadata:
103
103
  bug_tracker_uri: https://github.com/spree/spree/issues
104
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc4
104
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc5
105
105
  documentation_uri: https://guides.spreecommerce.org/
106
- source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc4
106
+ source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc5
107
107
  post_install_message:
108
108
  rdoc_options: []
109
109
  require_paths: