solidus_sample 2.10.0.beta1 → 2.10.0
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 +4 -4
- data/db/samples/assets.rb +10 -4
- data/db/samples/images/solidus_tshirt_back_white.png +0 -0
- data/db/samples/images/solidus_tshirt_black.png +0 -0
- data/db/samples/images/solidus_tshirt_blue.png +0 -0
- data/db/samples/images/solidus_tshirt_white.png +0 -0
- data/db/samples/variants.rb +0 -2
- data/solidus_sample.gemspec +1 -1
- metadata +6 -26
- data/db/samples/images/apache_baseball.png +0 -0
- data/db/samples/images/ror_bag.jpg +0 -0
- data/db/samples/images/ror_baseball.jpg +0 -0
- data/db/samples/images/ror_baseball_back.jpg +0 -0
- data/db/samples/images/ror_baseball_jersey_back_blue.png +0 -0
- data/db/samples/images/ror_baseball_jersey_back_green.png +0 -0
- data/db/samples/images/ror_baseball_jersey_back_red.png +0 -0
- data/db/samples/images/ror_baseball_jersey_blue.png +0 -0
- data/db/samples/images/ror_baseball_jersey_green.png +0 -0
- data/db/samples/images/ror_baseball_jersey_red.png +0 -0
- data/db/samples/images/ror_jr_spaghetti.jpg +0 -0
- data/db/samples/images/ror_mug.jpg +0 -0
- data/db/samples/images/ror_mug_back.jpg +0 -0
- data/db/samples/images/ror_ringer.jpg +0 -0
- data/db/samples/images/ror_ringer_back.jpg +0 -0
- data/db/samples/images/ror_stein.jpg +0 -0
- data/db/samples/images/ror_stein_back.jpg +0 -0
- data/db/samples/images/ror_tote.jpg +0 -0
- data/db/samples/images/ror_tote_back.jpg +0 -0
- data/db/samples/images/ruby_baseball.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3de9e1814a31405febadb1b0dcac122d28cb87fafdf71b66216c679e433b324a
|
4
|
+
data.tar.gz: 19ce4cb62d6a719c5094a1c93e691e15b66f6bc120b586b5ce542a7d4b764694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23225cfc3ff674ce7afa933529d243a1220275f168c313ad8d0c242e1b9d8634044750cabd6f2846415fb6867904b28a22ee71221628d6b2a844c38b151bae06
|
7
|
+
data.tar.gz: 8a3eda85135b14e4942cac20e4fb61b509d8ef20756c1b1896a0816ca9260d54a49a34f2d35a2c7aea89c5a2ee6b418c915a17e9750ca3a57e0aef431655d425
|
data/db/samples/assets.rb
CHANGED
@@ -4,9 +4,9 @@ Spree::Sample.load_sample("products")
|
|
4
4
|
Spree::Sample.load_sample("variants")
|
5
5
|
|
6
6
|
products = {}
|
7
|
-
products[:solidus_tshirt] = Spree::Product.find_by!(name: "Solidus T-Shirt")
|
8
|
-
products[:solidus_long] = Spree::Product.find_by!(name: "Solidus Long Sleeve")
|
9
|
-
products[:solidus_girly] = Spree::Product.find_by!(name: "Solidus Girly")
|
7
|
+
products[:solidus_tshirt] = Spree::Product.includes(variants: [:option_values]).find_by!(name: "Solidus T-Shirt")
|
8
|
+
products[:solidus_long] = Spree::Product.includes(variants: [:option_values]).find_by!(name: "Solidus Long Sleeve")
|
9
|
+
products[:solidus_girly] = Spree::Product.includes(variants: [:option_values]).find_by!(name: "Solidus Girly")
|
10
10
|
products[:solidus_snapback_cap] = Spree::Product.find_by!(name: "Solidus Snapback Cap")
|
11
11
|
products[:solidus_hoodie] = Spree::Product.find_by!(name: "Solidus Hoodie Zip")
|
12
12
|
products[:ruby_hoodie] = Spree::Product.find_by!(name: "Ruby Hoodie")
|
@@ -20,7 +20,9 @@ products[:ruby_tote] = Spree::Product.find_by!(name: "Ruby Tote")
|
|
20
20
|
def image(name, type = "jpg")
|
21
21
|
images_path = Pathname.new(File.dirname(__FILE__)) + "images"
|
22
22
|
path = images_path + "#{name}.#{type}"
|
23
|
+
|
23
24
|
return false if !File.exist?(path)
|
25
|
+
|
24
26
|
path
|
25
27
|
end
|
26
28
|
|
@@ -103,7 +105,9 @@ products[:solidus_tshirt].variants.each do |variant|
|
|
103
105
|
variant.images.create!(attachment: f)
|
104
106
|
end
|
105
107
|
back_image = image("solidus_tshirt_back_#{color}", "png")
|
108
|
+
|
106
109
|
next unless back_image
|
110
|
+
|
107
111
|
File.open(back_image) do |f|
|
108
112
|
variant.images.create!(attachment: f)
|
109
113
|
end
|
@@ -116,13 +120,15 @@ products[:solidus_long].variants.each do |variant|
|
|
116
120
|
variant.images.create!(attachment: f)
|
117
121
|
end
|
118
122
|
back_image = image("solidus_long_back_#{color}", "png")
|
123
|
+
|
119
124
|
next unless back_image
|
125
|
+
|
120
126
|
File.open(back_image) do |f|
|
121
127
|
variant.images.create!(attachment: f)
|
122
128
|
end
|
123
129
|
end
|
124
130
|
|
125
|
-
products[:solidus_girly].variants.each do |variant|
|
131
|
+
products[:solidus_girly].reload.variants.each do |variant|
|
126
132
|
color = variant.option_value("tshirt-color").downcase
|
127
133
|
main_image = image("solidus_girly_#{color}", "png")
|
128
134
|
File.open(main_image) do |f|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/db/samples/variants.rb
CHANGED
@@ -21,9 +21,7 @@ medium = Spree::OptionValue.find_by!(name: "Medium")
|
|
21
21
|
large = Spree::OptionValue.find_by!(name: "Large")
|
22
22
|
extra_large = Spree::OptionValue.find_by!(name: "Extra Large")
|
23
23
|
|
24
|
-
red = Spree::OptionValue.find_by!(name: "Red")
|
25
24
|
blue = Spree::OptionValue.find_by!(name: "Blue")
|
26
|
-
green = Spree::OptionValue.find_by!(name: "Green")
|
27
25
|
black = Spree::OptionValue.find_by!(name: "Black")
|
28
26
|
white = Spree::OptionValue.find_by!(name: "White")
|
29
27
|
|
data/solidus_sample.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.require_path = 'lib'
|
19
19
|
s.requirements << 'none'
|
20
20
|
|
21
|
-
s.required_ruby_version = '>= 2.
|
21
|
+
s.required_ruby_version = '>= 2.4.0'
|
22
22
|
s.required_rubygems_version = '>= 1.8.23'
|
23
23
|
|
24
24
|
s.add_dependency 'solidus_core', s.version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_sample
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.0
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.10.0
|
19
|
+
version: 2.10.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.10.0
|
26
|
+
version: 2.10.0
|
27
27
|
description: Sample data (including images) for use with Solidus.
|
28
28
|
email: contact@solidus.io
|
29
29
|
executables: []
|
@@ -36,26 +36,6 @@ files:
|
|
36
36
|
- db/samples.rb
|
37
37
|
- db/samples/addresses.rb
|
38
38
|
- db/samples/assets.rb
|
39
|
-
- db/samples/images/apache_baseball.png
|
40
|
-
- db/samples/images/ror_bag.jpg
|
41
|
-
- db/samples/images/ror_baseball.jpg
|
42
|
-
- db/samples/images/ror_baseball_back.jpg
|
43
|
-
- db/samples/images/ror_baseball_jersey_back_blue.png
|
44
|
-
- db/samples/images/ror_baseball_jersey_back_green.png
|
45
|
-
- db/samples/images/ror_baseball_jersey_back_red.png
|
46
|
-
- db/samples/images/ror_baseball_jersey_blue.png
|
47
|
-
- db/samples/images/ror_baseball_jersey_green.png
|
48
|
-
- db/samples/images/ror_baseball_jersey_red.png
|
49
|
-
- db/samples/images/ror_jr_spaghetti.jpg
|
50
|
-
- db/samples/images/ror_mug.jpg
|
51
|
-
- db/samples/images/ror_mug_back.jpg
|
52
|
-
- db/samples/images/ror_ringer.jpg
|
53
|
-
- db/samples/images/ror_ringer_back.jpg
|
54
|
-
- db/samples/images/ror_stein.jpg
|
55
|
-
- db/samples/images/ror_stein_back.jpg
|
56
|
-
- db/samples/images/ror_tote.jpg
|
57
|
-
- db/samples/images/ror_tote_back.jpg
|
58
|
-
- db/samples/images/ruby_baseball.png
|
59
39
|
- db/samples/images/ruby_hoodie.jpg
|
60
40
|
- db/samples/images/ruby_hoodie_zip.jpg
|
61
41
|
- db/samples/images/ruby_mug.jpg
|
@@ -123,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
103
|
requirements:
|
124
104
|
- - ">="
|
125
105
|
- !ruby/object:Gem::Version
|
126
|
-
version: 2.
|
106
|
+
version: 2.4.0
|
127
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
108
|
requirements:
|
129
109
|
- - ">="
|
@@ -131,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
111
|
version: 1.8.23
|
132
112
|
requirements:
|
133
113
|
- none
|
134
|
-
rubygems_version: 3.0.
|
114
|
+
rubygems_version: 3.0.3
|
135
115
|
signing_key:
|
136
116
|
specification_version: 4
|
137
117
|
summary: Sample data (including images) for use with Solidus.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|