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 +4 -4
- data/db/samples/stores.rb +3 -1
- data/db/samples/taxons.rb +17 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e132fb1cfcea92ddcb36a82445ce720214381371d945fa2dc985efe7fc99923d
|
4
|
+
data.tar.gz: 568e65ae4a16d3e1bfd1819c1868a55a0ddd029ea6379b07d8359d509e50601d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95c3eb43ab419defdb3bdb206e770ce2087f4e1b24e49c7eb34171461a084f15e9609bd7a1261771b985a74337b4ffaad6723c48d12dfe2e2987cb9f8319212
|
7
|
+
data.tar.gz: a3e143055088d3b450db6f18f67e6ca977cb2f941c13af4e775f08739989012776c26d515c5b86f975a0e757df0ce64e8e316c06085357d5c4f88d8e1f01c43e
|
data/db/samples/stores.rb
CHANGED
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
|
-
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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:
|