solidus_sample 2.9.6 → 2.10.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/db/samples/assets.rb +73 -40
  3. data/db/samples/images/{ror_bag.jpeg → ror_bag.jpg} +0 -0
  4. data/db/samples/images/{ror_baseball.jpeg → ror_baseball.jpg} +0 -0
  5. data/db/samples/images/{ror_baseball_back.jpeg → ror_baseball_back.jpg} +0 -0
  6. data/db/samples/images/{ror_jr_spaghetti.jpeg → ror_jr_spaghetti.jpg} +0 -0
  7. data/db/samples/images/{ror_mug.jpeg → ror_mug.jpg} +0 -0
  8. data/db/samples/images/{ror_mug_back.jpeg → ror_mug_back.jpg} +0 -0
  9. data/db/samples/images/{ror_ringer.jpeg → ror_ringer.jpg} +0 -0
  10. data/db/samples/images/{ror_ringer_back.jpeg → ror_ringer_back.jpg} +0 -0
  11. data/db/samples/images/{ror_stein.jpeg → ror_stein.jpg} +0 -0
  12. data/db/samples/images/{ror_stein_back.jpeg → ror_stein_back.jpg} +0 -0
  13. data/db/samples/images/{ror_tote.jpeg → ror_tote.jpg} +0 -0
  14. data/db/samples/images/{ror_tote_back.jpeg → ror_tote_back.jpg} +0 -0
  15. data/db/samples/images/ruby_hoodie.jpg +0 -0
  16. data/db/samples/images/ruby_hoodie_zip.jpg +0 -0
  17. data/db/samples/images/ruby_mug.jpg +0 -0
  18. data/db/samples/images/ruby_polo.jpg +0 -0
  19. data/db/samples/images/ruby_polo_back.jpg +0 -0
  20. data/db/samples/images/solidus_girly.jpg +0 -0
  21. data/db/samples/images/solidus_girly_black.png +0 -0
  22. data/db/samples/images/solidus_girly_blue.png +0 -0
  23. data/db/samples/images/solidus_girly_white.png +0 -0
  24. data/db/samples/images/solidus_hoodie.jpg +0 -0
  25. data/db/samples/images/solidus_long.jpg +0 -0
  26. data/db/samples/images/solidus_long_back.jpg +0 -0
  27. data/db/samples/images/solidus_long_back_black.png +0 -0
  28. data/db/samples/images/solidus_long_back_blue.png +0 -0
  29. data/db/samples/images/solidus_long_back_white.png +0 -0
  30. data/db/samples/images/solidus_long_black.png +0 -0
  31. data/db/samples/images/solidus_long_blue.png +0 -0
  32. data/db/samples/images/solidus_long_white.png +0 -0
  33. data/db/samples/images/solidus_mug.jpg +0 -0
  34. data/db/samples/images/solidus_snapback_cap.jpg +0 -0
  35. data/db/samples/images/solidus_tshirt.jpg +0 -0
  36. data/db/samples/images/solidus_tshirt_back.jpg +0 -0
  37. data/db/samples/images/solidus_tshirt_back_black.png +0 -0
  38. data/db/samples/images/solidus_tshirt_back_blue.png +0 -0
  39. data/db/samples/images/solidus_tshirt_back_white.png +0 -0
  40. data/db/samples/images/solidus_tshirt_black.png +0 -0
  41. data/db/samples/images/solidus_tshirt_blue.png +0 -0
  42. data/db/samples/images/solidus_tshirt_white.png +0 -0
  43. data/db/samples/images/tote_bag_ruby.jpg +0 -0
  44. data/db/samples/images/tote_bag_solidus.jpg +0 -0
  45. data/db/samples/option_values.rb +13 -1
  46. data/db/samples/orders.rb +3 -3
  47. data/db/samples/product_option_types.rb +3 -3
  48. data/db/samples/product_properties.rb +78 -28
  49. data/db/samples/products.rb +97 -27
  50. data/db/samples/taxons.rb +58 -40
  51. data/db/samples/variants.rb +149 -60
  52. metadata +47 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7942df77a04fbde36f508e291459018390f860fead59dd7cc86ef35f8c94f10
4
- data.tar.gz: d225e6b98fba7d565b8924627c459bf46bc6c9ee32469f79939841fb8af85a69
3
+ metadata.gz: 0bf82b2630704119508659e65cab9b75c29d52f4e31816453a59efb89d6fee0a
4
+ data.tar.gz: 38d7d28f628dc81ea56b34bc3116eaf18bee87da7611732281fe7ad53ce7c7d6
5
5
  SHA512:
6
- metadata.gz: 420ed878d6075914f34a68e9f2fe27e19edd1232f3c0d7351a3762b34f2e06f5f937350042374dcd3d3c1b0311bbdb44dfa0f5bb948ff6cdc55efc435af7dee5
7
- data.tar.gz: c242ff48f63219f0e3e67062e814bcb103310a944b7b81d156434bec419e802e2b7e06dbf1cb2f0a65b3fa765e6a6e33c31a512f7f9e5d91a6c464f968deb7d9
6
+ metadata.gz: 432539a9b8d7a5bc555276c3503f207b6335dc1f1b22b2630700464d8cdc72c923f4bc7cabad2ece781dcdda222750b841e62246c97ef33da363ed1e5e433f29
7
+ data.tar.gz: 5c1864df456f9c3d6eb787ea2249f0115366c4587de0540052c4f158038fa5cde92b917ef4b831bc0a900b376c88e114987b0762fb453ee498b5de60f8131ed9
data/db/samples/assets.rb CHANGED
@@ -4,17 +4,20 @@ Spree::Sample.load_sample("products")
4
4
  Spree::Sample.load_sample("variants")
5
5
 
6
6
  products = {}
7
- products[:ror_baseball_jersey] = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
8
- products[:ror_tote] = Spree::Product.find_by!(name: "Ruby on Rails Tote")
9
- products[:ror_bag] = Spree::Product.find_by!(name: "Ruby on Rails Bag")
10
- products[:ror_jr_spaghetti] = Spree::Product.find_by!(name: "Ruby on Rails Jr. Spaghetti")
11
- products[:ror_mug] = Spree::Product.find_by!(name: "Ruby on Rails Mug")
12
- products[:ror_ringer] = Spree::Product.find_by!(name: "Ruby on Rails Ringer T-Shirt")
13
- products[:ror_stein] = Spree::Product.find_by!(name: "Ruby on Rails Stein")
14
- products[:ruby_baseball_jersey] = Spree::Product.find_by!(name: "Ruby Baseball Jersey")
15
- products[:apache_baseball_jersey] = Spree::Product.find_by!(name: "Apache Baseball Jersey")
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")
10
+ products[:solidus_snapback_cap] = Spree::Product.find_by!(name: "Solidus Snapback Cap")
11
+ products[:solidus_hoodie] = Spree::Product.find_by!(name: "Solidus Hoodie Zip")
12
+ products[:ruby_hoodie] = Spree::Product.find_by!(name: "Ruby Hoodie")
13
+ products[:ruby_hoodie_zip] = Spree::Product.find_by!(name: "Ruby Hoodie Zip")
14
+ products[:ruby_polo] = Spree::Product.find_by!(name: "Ruby Polo")
15
+ products[:solidus_mug] = Spree::Product.find_by!(name: "Solidus Mug")
16
+ products[:ruby_mug] = Spree::Product.find_by!(name: "Ruby Mug")
17
+ products[:solidus_tote] = Spree::Product.find_by!(name: "Solidus Tote")
18
+ products[:ruby_tote] = Spree::Product.find_by!(name: "Ruby Tote")
16
19
 
17
- def image(name, type = "jpeg")
20
+ def image(name, type = "jpg")
18
21
  images_path = Pathname.new(File.dirname(__FILE__)) + "images"
19
22
  path = images_path + "#{name}.#{type}"
20
23
  return false if !File.exist?(path)
@@ -22,81 +25,111 @@ def image(name, type = "jpeg")
22
25
  end
23
26
 
24
27
  images = {
25
- products[:ror_tote].master => [
28
+ products[:solidus_tshirt].master => [
26
29
  {
27
- attachment: image("ror_tote")
30
+ attachment: image("solidus_tshirt")
28
31
  },
29
32
  {
30
- attachment: image("ror_tote_back")
33
+ attachment: image("solidus_tshirt_back")
31
34
  }
32
35
  ],
33
- products[:ror_bag].master => [
36
+ products[:solidus_long].master => [
34
37
  {
35
- attachment: image("ror_bag")
38
+ attachment: image("solidus_long")
39
+ },
40
+ {
41
+ attachment: image("solidus_long_back")
36
42
  }
37
43
  ],
38
- products[:ror_baseball_jersey].master => [
39
- {
40
- attachment: image("ror_baseball")
41
- },
44
+ products[:solidus_snapback_cap].master => [
42
45
  {
43
- attachment: image("ror_baseball_back")
46
+ attachment: image("solidus_snapback_cap")
44
47
  }
45
48
  ],
46
- products[:ror_jr_spaghetti].master => [
49
+ products[:solidus_hoodie].master => [
47
50
  {
48
- attachment: image("ror_jr_spaghetti")
51
+ attachment: image("solidus_hoodie")
49
52
  }
50
53
  ],
51
- products[:ror_mug].master => [
54
+ products[:ruby_hoodie].master => [
52
55
  {
53
- attachment: image("ror_mug")
54
- },
56
+ attachment: image("ruby_hoodie")
57
+ }
58
+ ],
59
+ products[:ruby_hoodie_zip].master => [
55
60
  {
56
- attachment: image("ror_mug_back")
61
+ attachment: image("ruby_hoodie_zip")
57
62
  }
58
63
  ],
59
- products[:ror_ringer].master => [
64
+ products[:ruby_polo].master => [
60
65
  {
61
- attachment: image("ror_ringer")
66
+ attachment: image("ruby_polo")
62
67
  },
63
68
  {
64
- attachment: image("ror_ringer_back")
69
+ attachment: image("ruby_polo_back")
65
70
  }
66
71
  ],
67
- products[:ror_stein].master => [
72
+ products[:solidus_mug].master => [
68
73
  {
69
- attachment: image("ror_stein")
70
- },
74
+ attachment: image("solidus_mug")
75
+ }
76
+ ],
77
+ products[:ruby_mug].master => [
71
78
  {
72
- attachment: image("ror_stein_back")
79
+ attachment: image("ruby_mug")
73
80
  }
74
81
  ],
75
- products[:apache_baseball_jersey].master => [
82
+ products[:solidus_tote].master => [
76
83
  {
77
- attachment: image("apache_baseball", "png")
84
+ attachment: image("tote_bag_solidus")
78
85
  }
79
86
  ],
80
- products[:ruby_baseball_jersey].master => [
87
+ products[:ruby_tote].master => [
81
88
  {
82
- attachment: image("ruby_baseball", "png")
89
+ attachment: image("tote_bag_ruby")
90
+ }
91
+ ],
92
+ products[:solidus_girly].master => [
93
+ {
94
+ attachment: image("solidus_girly")
83
95
  }
84
96
  ]
85
97
  }
86
98
 
87
- products[:ror_baseball_jersey].variants.each do |variant|
99
+ products[:solidus_tshirt].variants.each do |variant|
88
100
  color = variant.option_value("tshirt-color").downcase
89
- main_image = image("ror_baseball_jersey_#{color}", "png")
101
+ main_image = image("solidus_tshirt_#{color}", "png")
90
102
  File.open(main_image) do |f|
91
103
  variant.images.create!(attachment: f)
92
104
  end
93
- back_image = image("ror_baseball_jersey_back_#{color}", "png")
105
+ back_image = image("solidus_tshirt_back_#{color}", "png")
94
106
  next unless back_image
95
107
  File.open(back_image) do |f|
96
108
  variant.images.create!(attachment: f)
97
109
  end
98
110
  end
99
111
 
112
+ products[:solidus_long].variants.each do |variant|
113
+ color = variant.option_value("tshirt-color").downcase
114
+ main_image = image("solidus_long_#{color}", "png")
115
+ File.open(main_image) do |f|
116
+ variant.images.create!(attachment: f)
117
+ end
118
+ back_image = image("solidus_long_back_#{color}", "png")
119
+ next unless back_image
120
+ File.open(back_image) do |f|
121
+ variant.images.create!(attachment: f)
122
+ end
123
+ end
124
+
125
+ products[:solidus_girly].variants.each do |variant|
126
+ color = variant.option_value("tshirt-color").downcase
127
+ main_image = image("solidus_girly_#{color}", "png")
128
+ File.open(main_image) do |f|
129
+ variant.images.create!(attachment: f)
130
+ end
131
+ end
132
+
100
133
  images.each do |variant, attachments|
101
134
  puts "Loading images for #{variant.product.name}"
102
135
  attachments.each do |attachment|
File without changes
File without changes
File without changes
File without changes
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -33,12 +33,24 @@ Spree::OptionValue.create!([
33
33
  {
34
34
  name: "Red",
35
35
  presentation: "Red",
36
- position: 1,
36
+ position: 5,
37
37
  option_type: color
38
38
  },
39
39
  {
40
40
  name: "Green",
41
41
  presentation: "Green",
42
+ position: 4,
43
+ option_type: color
44
+ },
45
+ {
46
+ name: "Black",
47
+ presentation: "Black",
48
+ position: 1,
49
+ option_type: color
50
+ },
51
+ {
52
+ name: "White",
53
+ presentation: "White",
42
54
  position: 2,
43
55
  option_type: color
44
56
  },
data/db/samples/orders.rb CHANGED
@@ -28,20 +28,20 @@ orders << Spree::Order.create!(
28
28
  )
29
29
 
30
30
  orders[0].line_items.create!(
31
- variant: Spree::Product.find_by!(name: "Ruby on Rails Tote").master,
31
+ variant: Spree::Product.find_by!(name: "Solidus Tote").master,
32
32
  quantity: 1,
33
33
  price: 15.99
34
34
  )
35
35
 
36
36
  orders[1].line_items.create!(
37
- variant: Spree::Product.find_by!(name: "Ruby on Rails Bag").master,
37
+ variant: Spree::Product.find_by!(name: "Solidus Snapback Cap").master,
38
38
  quantity: 1,
39
39
  price: 22.99
40
40
  )
41
41
 
42
42
  orders.each do |order|
43
43
  order.payments.create!(payment_method: payment_method)
44
- order.update_attributes(store: store)
44
+ order.update(store: store)
45
45
 
46
46
  order.next! while !order.can_complete?
47
47
  order.complete!
@@ -5,6 +5,6 @@ Spree::Sample.load_sample("products")
5
5
  size = Spree::OptionType.find_by!(presentation: "Size")
6
6
  color = Spree::OptionType.find_by!(presentation: "Color")
7
7
 
8
- ror_baseball_jersey = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
9
- ror_baseball_jersey.option_types = [size, color]
10
- ror_baseball_jersey.save!
8
+ solidus_tshirt = Spree::Product.find_by!(name: "Solidus T-Shirt")
9
+ solidus_tshirt.option_types = [size, color]
10
+ solidus_tshirt.save!
@@ -2,60 +2,110 @@
2
2
 
3
3
  products =
4
4
  {
5
- "Ruby on Rails Baseball Jersey" =>
5
+ "Solidus Tote" =>
6
+ {
7
+ "Type" => "Tote",
8
+ "Size" => %{15" x 18" x 6"},
9
+ "Material" => "Canvas"
10
+ },
11
+ "Ruby Tote" =>
12
+ {
13
+ "Type" => "Tote",
14
+ "Size" => %{15" x 18" x 6"},
15
+ "Material" => "Canvas"
16
+ },
17
+ "Solidus Snapback Cap" =>
18
+ {
19
+ "Type" => "Snapback Cap",
20
+ "Size" => "One Size",
21
+ "Material" => "100% Cotton"
22
+ },
23
+ "Solidus T-Shirt" =>
24
+ {
25
+ "Manufacturer" => "Jerseys",
26
+ "Brand" => "Conditioned",
27
+ "Model" => "TL9002",
28
+ "Shirt Type" => "Ringer T",
29
+ "Sleeve Type" => "Short",
30
+ "Made from" => "100% Cotton",
31
+ "Fit" => "Loose",
32
+ "Gender" => "Men's"
33
+ },
34
+ "Solidus Long Sleeve" =>
6
35
  {
7
36
  "Manufacturer" => "Wilson",
8
37
  "Brand" => "Wannabe Sports",
9
- "Model" => "JK1002",
10
- "Shirt Type" => "Baseball Jersey",
38
+ "Model" => "TL9002",
39
+ "Shirt Type" => "Jersey",
11
40
  "Sleeve Type" => "Long",
12
41
  "Made from" => "100% cotton",
13
42
  "Fit" => "Loose",
14
43
  "Gender" => "Men's"
15
44
  },
16
- "Ruby on Rails Jr. Spaghetti" =>
45
+ "Solidus Hoodie Zip" =>
17
46
  {
18
47
  "Manufacturer" => "Jerseys",
48
+ "Brand" => "Wannabe Sports",
49
+ "Model" => "HD9001",
50
+ "Shirt Type" => "Jersey",
51
+ "Sleeve Type" => "Long",
52
+ "Made from" => "100% cotton",
53
+ "Fit" => "Loose",
54
+ "Gender" => "Unisex"
55
+ },
56
+ "Ruby Hoodie" =>
57
+ {
58
+ "Manufacturer" => "Wilson",
19
59
  "Brand" => "Resiliance",
20
- "Model" => "TL174",
21
- "Shirt Type" => "Jr. Spaghetti T",
22
- "Sleeve Type" => "None",
60
+ "Model" => "HD2001",
61
+ "Shirt Type" => "Baseball",
62
+ "Sleeve Type" => "Long",
23
63
  "Made from" => "90% Cotton, 10% Nylon",
24
- "Fit" => "Form",
25
- "Gender" => "Women's"
64
+ "Fit" => "Loose",
65
+ "Gender" => "Unisex"
26
66
  },
27
- "Ruby on Rails Ringer T-Shirt" =>
67
+ "Ruby Hoodie Zip" =>
28
68
  {
29
69
  "Manufacturer" => "Jerseys",
30
- "Brand" => "Conditioned",
31
- "Model" => "TL9002",
32
- "Shirt Type" => "Ringer T",
33
- "Sleeve Type" => "Short",
34
- "Made from" => "100% Vellum",
70
+ "Brand" => "Wannabe Sports",
71
+ "Model" => "HD9001",
72
+ "Shirt Type" => "Jersey",
73
+ "Sleeve Type" => "Long",
74
+ "Made from" => "100% cotton",
35
75
  "Fit" => "Loose",
36
- "Gender" => "Men's"
76
+ "Gender" => "Unisex"
37
77
  },
38
- "Ruby on Rails Tote" =>
78
+ "Ruby Polo" =>
39
79
  {
40
- "Type" => "Tote",
41
- "Size" => %{15" x 18" x 6"},
42
- "Material" => "Canvas"
80
+ "Manufacturer" => "Wilson",
81
+ "Brand" => "Resiliance",
82
+ "Model" => "PL9001",
83
+ "Shirt Type" => "Ringer T",
84
+ "Sleeve Type" => "Short",
85
+ "Made from" => "100% Cotton",
86
+ "Fit" => "Slim",
87
+ "Gender" => "Men's"
43
88
  },
44
- "Ruby on Rails Bag" =>
89
+ "Solidus Mug" =>
45
90
  {
46
- "Type" => "Messenger",
47
- "Size" => %{14 1/2" x 12" x 5"},
48
- "Material" => "600 Denier Polyester"
91
+ "Type" => "Mug",
92
+ "Size" => %{4.5" tall, 3.25" dia.}
49
93
  },
50
- "Ruby on Rails Mug" =>
94
+ "Ruby Mug" =>
51
95
  {
52
96
  "Type" => "Mug",
53
97
  "Size" => %{4.5" tall, 3.25" dia.}
54
98
  },
55
- "Ruby on Rails Stein" =>
99
+ "Solidus Girly" =>
56
100
  {
57
- "Type" => "Stein",
58
- "Size" => %{6.75" tall, 3.75" dia. base, 3" dia. rim}
101
+ "Manufacturer" => "Jerseys",
102
+ "Brand" => "Conditioned",
103
+ "Model" => "WM6001",
104
+ "Shirt Type" => "Skinny",
105
+ "Sleeve Type" => "Short",
106
+ "Made from" => "90% Cotton, 10% Nylon",
107
+ "Fit" => "Slim",
108
+ "Gender" => "Women's"
59
109
  }
60
110
  }
61
111
 
@@ -22,66 +22,136 @@ default_attrs = {
22
22
 
23
23
  products = [
24
24
  {
25
- name: "Ruby on Rails Tote",
25
+ name: "Solidus T-Shirt",
26
26
  tax_category: tax_category,
27
27
  shipping_category: shipping_category,
28
- price: 15.99,
29
- eur_price: 14
28
+ price: 19.99,
29
+ eur_price: 16,
30
+ weight: 0.5,
31
+ height: 20,
32
+ width: 10,
33
+ depth: 5
30
34
  },
31
35
  {
32
- name: "Ruby on Rails Bag",
36
+ name: "Solidus Long Sleeve",
33
37
  tax_category: tax_category,
34
38
  shipping_category: shipping_category,
35
- price: 22.99,
36
- eur_price: 19
39
+ price: 19.99,
40
+ eur_price: 16,
41
+ weight: 0.5,
42
+ height: 20,
43
+ width: 10,
44
+ depth: 5
37
45
  },
38
46
  {
39
- name: "Ruby on Rails Baseball Jersey",
47
+ name: "Solidus Girly",
40
48
  tax_category: tax_category,
41
49
  shipping_category: shipping_category,
42
50
  price: 19.99,
43
- eur_price: 16
51
+ eur_price: 16,
52
+ weight: 0.5,
53
+ height: 20,
54
+ width: 10,
55
+ depth: 5
44
56
  },
45
57
  {
46
- name: "Ruby on Rails Jr. Spaghetti",
58
+ name: "Solidus Snapback Cap",
47
59
  tax_category: tax_category,
48
60
  shipping_category: shipping_category,
49
- price: 19.99,
50
- eur_price: 16
51
-
61
+ price: 15.99,
62
+ eur_price: 14,
63
+ weight: 0.5,
64
+ height: 5,
65
+ width: 5,
66
+ depth: 5
52
67
  },
53
68
  {
54
- name: "Ruby on Rails Ringer T-Shirt",
69
+ name: "Solidus Hoodie Zip",
70
+ tax_category: tax_category,
55
71
  shipping_category: shipping_category,
72
+ price: 29.99,
73
+ eur_price: 27,
74
+ weight: 1,
75
+ height: 20,
76
+ width: 10,
77
+ depth: 5
78
+ },
79
+ {
80
+ name: "Ruby Hoodie",
56
81
  tax_category: tax_category,
57
- price: 19.99,
58
- eur_price: 16
82
+ shipping_category: shipping_category,
83
+ price: 29.99,
84
+ eur_price: 27,
85
+ weight: 1,
86
+ height: 20,
87
+ width: 10,
88
+ depth: 5
59
89
  },
60
90
  {
61
- name: "Ruby Baseball Jersey",
91
+ name: "Ruby Hoodie Zip",
62
92
  tax_category: tax_category,
63
93
  shipping_category: shipping_category,
64
- price: 19.99,
65
- eur_price: 16
94
+ price: 29.99,
95
+ eur_price: 27,
96
+ weight: 0.8,
97
+ height: 20,
98
+ width: 10,
99
+ depth: 5
66
100
  },
67
101
  {
68
- name: "Apache Baseball Jersey",
102
+ name: "Ruby Polo",
69
103
  tax_category: tax_category,
70
104
  shipping_category: shipping_category,
71
- price: 19.99,
72
- eur_price: 16
105
+ price: 26.99,
106
+ eur_price: 23,
107
+ weight: 0.5,
108
+ height: 20,
109
+ width: 10,
110
+ depth: 5
73
111
  },
74
112
  {
75
- name: "Ruby on Rails Mug",
113
+ name: "Solidus Mug",
114
+ tax_category: tax_category,
115
+ shipping_category: shipping_category,
116
+ price: 9.99,
117
+ eur_price: 7,
118
+ weight: 1,
119
+ height: 5,
120
+ width: 5,
121
+ depth: 5
122
+ },
123
+ {
124
+ name: "Ruby Mug",
125
+ tax_category: tax_category,
126
+ shipping_category: shipping_category,
127
+ price: 9.99,
128
+ eur_price: 7,
129
+ weight: 1,
130
+ height: 5,
131
+ width: 5,
132
+ depth: 5
133
+ },
134
+ {
135
+ name: "Solidus Tote",
136
+ tax_category: tax_category,
76
137
  shipping_category: shipping_category,
77
- price: 13.99,
78
- eur_price: 12
138
+ price: 15.99,
139
+ eur_price: 14,
140
+ weight: 0.5,
141
+ height: 20,
142
+ width: 10,
143
+ depth: 5
79
144
  },
80
145
  {
81
- name: "Ruby on Rails Stein",
146
+ name: "Ruby Tote",
147
+ tax_category: tax_category,
82
148
  shipping_category: shipping_category,
83
- price: 16.99,
84
- eur_price: 14
149
+ price: 15.99,
150
+ eur_price: 14,
151
+ weight: 0.5,
152
+ height: 20,
153
+ width: 10,
154
+ depth: 5
85
155
  }
86
156
  ]
87
157
 
data/db/samples/taxons.rb CHANGED
@@ -7,15 +7,18 @@ categories = Spree::Taxonomy.find_by!(name: "Categories")
7
7
  brands = Spree::Taxonomy.find_by!(name: "Brand")
8
8
 
9
9
  products = {
10
- ror_tote: "Ruby on Rails Tote",
11
- ror_bag: "Ruby on Rails Bag",
12
- ror_mug: "Ruby on Rails Mug",
13
- ror_stein: "Ruby on Rails Stein",
14
- ror_baseball_jersey: "Ruby on Rails Baseball Jersey",
15
- ror_jr_spaghetti: "Ruby on Rails Jr. Spaghetti",
16
- ror_ringer: "Ruby on Rails Ringer T-Shirt",
17
- apache_baseball_jersey: "Apache Baseball Jersey",
18
- ruby_baseball_jersey: "Ruby Baseball Jersey"
10
+ solidus_tshirt: "Solidus T-Shirt",
11
+ solidus_long: "Solidus Long Sleeve",
12
+ solidus_tote: "Solidus Tote",
13
+ ruby_tote: "Ruby Tote",
14
+ solidus_snapback_cap: "Solidus Snapback Cap",
15
+ solidus_hoodie: "Solidus Hoodie Zip",
16
+ ruby_hoodie: "Ruby Hoodie",
17
+ ruby_hoodie_zip: "Ruby Hoodie Zip",
18
+ ruby_polo: "Ruby Polo",
19
+ solidus_mug: "Solidus Mug",
20
+ ruby_mug: "Ruby Mug",
21
+ solidus_girly: "Solidus Girly"
19
22
  }
20
23
 
21
24
  products.each do |key, name|
@@ -29,29 +32,38 @@ taxons = [
29
32
  position: 0
30
33
  },
31
34
  {
32
- name: "Bags",
35
+ name: "Clothing",
36
+ taxonomy: categories,
37
+ parent: "Categories"
38
+ },
39
+ {
40
+ name: "Caps",
33
41
  taxonomy: categories,
34
42
  parent: "Categories",
35
43
  position: 1,
36
44
  products: [
37
- products[:ror_tote],
38
- products[:ror_bag]
45
+ products[:solidus_snapback_cap]
39
46
  ]
40
47
  },
41
48
  {
42
- name: "Mugs",
49
+ name: "Bags",
43
50
  taxonomy: categories,
44
51
  parent: "Categories",
45
52
  position: 2,
46
53
  products: [
47
- products[:ror_mug],
48
- products[:ror_stein]
54
+ products[:solidus_tote],
55
+ products[:ruby_tote]
49
56
  ]
50
57
  },
51
58
  {
52
- name: "Clothing",
59
+ name: "Mugs",
53
60
  taxonomy: categories,
54
- parent: "Categories"
61
+ parent: "Categories",
62
+ position: 3,
63
+ products: [
64
+ products[:solidus_mug],
65
+ products[:ruby_mug]
66
+ ]
55
67
  },
56
68
  {
57
69
  name: "Shirts",
@@ -59,7 +71,20 @@ taxons = [
59
71
  parent: "Clothing",
60
72
  position: 0,
61
73
  products: [
62
- products[:ror_jr_spaghetti]
74
+ products[:solidus_long],
75
+ products[:ruby_polo],
76
+ products[:solidus_girly]
77
+ ]
78
+ },
79
+ {
80
+ name: "Hoodie",
81
+ taxonomy: categories,
82
+ parent: "Clothing",
83
+ position: 0,
84
+ products: [
85
+ products[:solidus_hoodie],
86
+ products[:ruby_hoodie],
87
+ products[:ruby_hoodie_zip]
63
88
  ]
64
89
  },
65
90
  {
@@ -67,10 +92,7 @@ taxons = [
67
92
  taxonomy: categories,
68
93
  parent: "Clothing",
69
94
  products: [
70
- products[:ror_baseball_jersey],
71
- products[:ror_ringer],
72
- products[:apache_baseball_jersey],
73
- products[:ruby_baseball_jersey]
95
+ products[:solidus_tshirt]
74
96
  ],
75
97
  position: 0
76
98
  },
@@ -79,33 +101,29 @@ taxons = [
79
101
  taxonomy: brands
80
102
  },
81
103
  {
82
- name: "Ruby",
83
- taxonomy: brands,
84
- parent: "Brand",
85
- products: [
86
- products[:ruby_baseball_jersey]
87
- ]
88
- },
89
- {
90
- name: "Apache",
104
+ name: "Solidus",
91
105
  taxonomy: brands,
92
106
  parent: "Brand",
93
107
  products: [
94
- products[:apache_baseball_jersey]
108
+ products[:solidus_tshirt],
109
+ products[:solidus_long],
110
+ products[:solidus_snapback_cap],
111
+ products[:solidus_hoodie],
112
+ products[:solidus_mug],
113
+ products[:solidus_tote],
114
+ products[:solidus_girly]
95
115
  ]
96
116
  },
97
117
  {
98
- name: "Rails",
118
+ name: "Ruby",
99
119
  taxonomy: brands,
100
120
  parent: "Brand",
101
121
  products: [
102
- products[:ror_tote],
103
- products[:ror_bag],
104
- products[:ror_mug],
105
- products[:ror_stein],
106
- products[:ror_baseball_jersey],
107
- products[:ror_jr_spaghetti],
108
- products[:ror_ringer]
122
+ products[:ruby_hoodie],
123
+ products[:ruby_hoodie_zip],
124
+ products[:ruby_polo],
125
+ products[:ruby_mug],
126
+ products[:ruby_tote]
109
127
  ]
110
128
  }
111
129
  ]
@@ -3,15 +3,18 @@
3
3
  Spree::Sample.load_sample("option_values")
4
4
  Spree::Sample.load_sample("products")
5
5
 
6
- ror_baseball_jersey = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
7
- ror_tote = Spree::Product.find_by!(name: "Ruby on Rails Tote")
8
- ror_bag = Spree::Product.find_by!(name: "Ruby on Rails Bag")
9
- ror_jr_spaghetti = Spree::Product.find_by!(name: "Ruby on Rails Jr. Spaghetti")
10
- ror_mug = Spree::Product.find_by!(name: "Ruby on Rails Mug")
11
- ror_ringer = Spree::Product.find_by!(name: "Ruby on Rails Ringer T-Shirt")
12
- ror_stein = Spree::Product.find_by!(name: "Ruby on Rails Stein")
13
- ruby_baseball_jersey = Spree::Product.find_by!(name: "Ruby Baseball Jersey")
14
- apache_baseball_jersey = Spree::Product.find_by!(name: "Apache Baseball Jersey")
6
+ solidus_tshirt = Spree::Product.find_by!(name: "Solidus T-Shirt")
7
+ solidus_long = Spree::Product.find_by!(name: "Solidus Long Sleeve")
8
+ solidus_snapback_cap = Spree::Product.find_by!(name: "Solidus Snapback Cap")
9
+ solidus_hoodie = Spree::Product.find_by!(name: "Solidus Hoodie Zip")
10
+ ruby_hoodie = Spree::Product.find_by!(name: "Ruby Hoodie")
11
+ ruby_hoodie_zip = Spree::Product.find_by!(name: "Ruby Hoodie Zip")
12
+ ruby_polo = Spree::Product.find_by!(name: "Ruby Polo")
13
+ solidus_mug = Spree::Product.find_by!(name: "Solidus Mug")
14
+ ruby_mug = Spree::Product.find_by!(name: "Ruby Mug")
15
+ solidus_tote = Spree::Product.find_by!(name: "Solidus Tote")
16
+ ruby_tote = Spree::Product.find_by!(name: "Ruby Tote")
17
+ solidus_girly = Spree::Product.find_by!(name: "Solidus Girly")
15
18
 
16
19
  small = Spree::OptionValue.find_by!(name: "Small")
17
20
  medium = Spree::OptionValue.find_by!(name: "Medium")
@@ -21,105 +24,191 @@ extra_large = Spree::OptionValue.find_by!(name: "Extra Large")
21
24
  red = Spree::OptionValue.find_by!(name: "Red")
22
25
  blue = Spree::OptionValue.find_by!(name: "Blue")
23
26
  green = Spree::OptionValue.find_by!(name: "Green")
27
+ black = Spree::OptionValue.find_by!(name: "Black")
28
+ white = Spree::OptionValue.find_by!(name: "White")
24
29
 
25
30
  variants = [
26
31
  {
27
- product: ror_baseball_jersey,
28
- option_values: [small, red],
29
- sku: "ROR-00001",
32
+ product: solidus_tshirt,
33
+ option_values: [small, blue],
34
+ sku: "SOL-00003",
35
+ cost_price: 17
36
+ },
37
+ {
38
+ product: solidus_tshirt,
39
+ option_values: [small, black],
40
+ sku: "SOL-00002",
41
+ cost_price: 17
42
+ },
43
+ {
44
+ product: solidus_tshirt,
45
+ option_values: [small, white],
46
+ sku: "SOL-00004",
47
+ cost_price: 17
48
+ },
49
+ {
50
+ product: solidus_tshirt,
51
+ option_values: [medium, blue],
52
+ sku: "SOL-00005",
53
+ cost_price: 17
54
+ },
55
+ {
56
+ product: solidus_tshirt,
57
+ option_values: [large, white],
58
+ sku: "SOL-00006",
59
+ cost_price: 17
60
+ },
61
+ {
62
+ product: solidus_tshirt,
63
+ option_values: [large, black],
64
+ sku: "SOL-00007",
65
+ cost_price: 17
66
+ },
67
+ {
68
+ product: solidus_tshirt,
69
+ option_values: [extra_large, blue],
70
+ sku: "SOL-0008",
71
+ cost_price: 17
72
+ },
73
+ {
74
+ product: solidus_long,
75
+ option_values: [small, black],
76
+ sku: "SOL-LS02",
30
77
  cost_price: 17
31
78
  },
32
79
  {
33
- product: ror_baseball_jersey,
80
+ product: solidus_long,
81
+ option_values: [small, white],
82
+ sku: "SOL-LS01",
83
+ cost_price: 17
84
+ },
85
+ {
86
+ product: solidus_long,
34
87
  option_values: [small, blue],
35
- sku: "ROR-00002",
88
+ sku: "SOL-LS03",
36
89
  cost_price: 17
37
90
  },
38
91
  {
39
- product: ror_baseball_jersey,
40
- option_values: [small, green],
41
- sku: "ROR-00003",
92
+ product: solidus_long,
93
+ option_values: [medium, white],
94
+ sku: "SOL-LS04",
42
95
  cost_price: 17
43
96
  },
44
97
  {
45
- product: ror_baseball_jersey,
46
- option_values: [medium, red],
47
- sku: "ROR-00004",
98
+ product: solidus_long,
99
+ option_values: [medium, black],
100
+ sku: "SOL-LS05",
48
101
  cost_price: 17
49
102
  },
50
103
  {
51
- product: ror_baseball_jersey,
104
+ product: solidus_long,
52
105
  option_values: [medium, blue],
53
- sku: "ROR-00005",
106
+ sku: "SOL-LS06",
54
107
  cost_price: 17
55
108
  },
56
109
  {
57
- product: ror_baseball_jersey,
58
- option_values: [medium, green],
59
- sku: "ROR-00006",
110
+ product: solidus_long,
111
+ option_values: [large, white],
112
+ sku: "SOL-LS07",
60
113
  cost_price: 17
61
114
  },
62
115
  {
63
- product: ror_baseball_jersey,
64
- option_values: [large, red],
65
- sku: "ROR-00007",
116
+ product: solidus_long,
117
+ option_values: [large, black],
118
+ sku: "SOL-LS08",
66
119
  cost_price: 17
67
120
  },
68
121
  {
69
- product: ror_baseball_jersey,
122
+ product: solidus_long,
70
123
  option_values: [large, blue],
71
- sku: "ROR-00008",
124
+ sku: "SOL-LS09",
125
+ cost_price: 17
126
+ },
127
+ {
128
+ product: solidus_girly,
129
+ option_values: [small, black],
130
+ sku: "SOL-WM001",
131
+ cost_price: 17
132
+ },
133
+ {
134
+ product: solidus_girly,
135
+ option_values: [small, blue],
136
+ sku: "SOL-WM002",
72
137
  cost_price: 17
73
138
  },
74
139
  {
75
- product: ror_baseball_jersey,
76
- option_values: [large, green],
77
- sku: "ROR-00009",
140
+ product: solidus_girly,
141
+ option_values: [small, white],
142
+ sku: "SOL-WM003",
78
143
  cost_price: 17
79
144
  },
80
145
  {
81
- product: ror_baseball_jersey,
82
- option_values: [extra_large, green],
83
- sku: "ROR-00010",
146
+ product: solidus_girly,
147
+ option_values: [medium, blue],
148
+ sku: "SOL-WM004",
149
+ cost_price: 17
150
+ },
151
+ {
152
+ product: solidus_girly,
153
+ option_values: [medium, white],
154
+ sku: "SOL-WM005",
155
+ cost_price: 17
156
+ },
157
+ {
158
+ product: solidus_girly,
159
+ option_values: [medium, black],
160
+ sku: "SOL-WM006",
84
161
  cost_price: 17
85
162
  }
86
163
  ]
87
164
 
88
165
  masters = {
89
- ror_baseball_jersey => {
90
- sku: "ROR-001",
166
+ solidus_tote => {
167
+ sku: "SOL-TOT01",
91
168
  cost_price: 17
92
169
  },
93
- ror_tote => {
94
- sku: "ROR-00011",
170
+ ruby_tote => {
171
+ sku: "RUB-TOT01",
95
172
  cost_price: 17
96
173
  },
97
- ror_bag => {
98
- sku: "ROR-00012",
99
- cost_price: 21
100
- },
101
- ror_jr_spaghetti => {
102
- sku: "ROR-00013",
174
+ solidus_snapback_cap => {
175
+ sku: "SOL-SNC01",
103
176
  cost_price: 17
104
177
  },
105
- ror_mug => {
106
- sku: "ROR-00014",
107
- cost_price: 11
178
+ solidus_tshirt => {
179
+ sku: "SOL-00001",
180
+ cost_price: 17
108
181
  },
109
- ror_ringer => {
110
- sku: "ROR-00015",
182
+ solidus_long => {
183
+ sku: "SOL-LS00",
111
184
  cost_price: 17
112
185
  },
113
- ror_stein => {
114
- sku: "ROR-00016",
115
- cost_price: 15
186
+ solidus_hoodie => {
187
+ sku: "SOL-HD00",
188
+ cost_price: 27
116
189
  },
117
- apache_baseball_jersey => {
118
- sku: "APC-00001",
119
- cost_price: 17
190
+ ruby_hoodie => {
191
+ sku: "RUB-HD01",
192
+ cost_price: 27
193
+ },
194
+ ruby_hoodie_zip => {
195
+ sku: "RUB-HD00",
196
+ cost_price: 27
197
+ },
198
+ ruby_polo => {
199
+ sku: "RUB-PL01",
200
+ cost_price: 23
201
+ },
202
+ solidus_mug => {
203
+ sku: "SOL-MG01",
204
+ cost_price: 7
205
+ },
206
+ ruby_mug => {
207
+ sku: "RUB-MG01",
208
+ cost_price: 7
120
209
  },
121
- ruby_baseball_jersey => {
122
- sku: "RUB-00001",
210
+ solidus_girly => {
211
+ sku: "SOL-WM00",
123
212
  cost_price: 17
124
213
  }
125
214
  }
@@ -127,5 +216,5 @@ masters = {
127
216
  Spree::Variant.create!(variants)
128
217
 
129
218
  masters.each do |product, variant_attrs|
130
- product.master.update_attributes!(variant_attrs)
219
+ product.master.update!(variant_attrs)
131
220
  end
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.9.6
4
+ version: 2.10.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2019-09-19 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.9.6
19
+ version: 2.10.0.beta1
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.9.6
26
+ version: 2.10.0.beta1
27
27
  description: Sample data (including images) for use with Solidus.
28
28
  email: contact@solidus.io
29
29
  executables: []
@@ -37,25 +37,55 @@ files:
37
37
  - db/samples/addresses.rb
38
38
  - db/samples/assets.rb
39
39
  - db/samples/images/apache_baseball.png
40
- - db/samples/images/ror_bag.jpeg
41
- - db/samples/images/ror_baseball.jpeg
42
- - db/samples/images/ror_baseball_back.jpeg
40
+ - db/samples/images/ror_bag.jpg
41
+ - db/samples/images/ror_baseball.jpg
42
+ - db/samples/images/ror_baseball_back.jpg
43
43
  - db/samples/images/ror_baseball_jersey_back_blue.png
44
44
  - db/samples/images/ror_baseball_jersey_back_green.png
45
45
  - db/samples/images/ror_baseball_jersey_back_red.png
46
46
  - db/samples/images/ror_baseball_jersey_blue.png
47
47
  - db/samples/images/ror_baseball_jersey_green.png
48
48
  - db/samples/images/ror_baseball_jersey_red.png
49
- - db/samples/images/ror_jr_spaghetti.jpeg
50
- - db/samples/images/ror_mug.jpeg
51
- - db/samples/images/ror_mug_back.jpeg
52
- - db/samples/images/ror_ringer.jpeg
53
- - db/samples/images/ror_ringer_back.jpeg
54
- - db/samples/images/ror_stein.jpeg
55
- - db/samples/images/ror_stein_back.jpeg
56
- - db/samples/images/ror_tote.jpeg
57
- - db/samples/images/ror_tote_back.jpeg
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
58
  - db/samples/images/ruby_baseball.png
59
+ - db/samples/images/ruby_hoodie.jpg
60
+ - db/samples/images/ruby_hoodie_zip.jpg
61
+ - db/samples/images/ruby_mug.jpg
62
+ - db/samples/images/ruby_polo.jpg
63
+ - db/samples/images/ruby_polo_back.jpg
64
+ - db/samples/images/solidus_girly.jpg
65
+ - db/samples/images/solidus_girly_black.png
66
+ - db/samples/images/solidus_girly_blue.png
67
+ - db/samples/images/solidus_girly_white.png
68
+ - db/samples/images/solidus_hoodie.jpg
69
+ - db/samples/images/solidus_long.jpg
70
+ - db/samples/images/solidus_long_back.jpg
71
+ - db/samples/images/solidus_long_back_black.png
72
+ - db/samples/images/solidus_long_back_blue.png
73
+ - db/samples/images/solidus_long_back_white.png
74
+ - db/samples/images/solidus_long_black.png
75
+ - db/samples/images/solidus_long_blue.png
76
+ - db/samples/images/solidus_long_white.png
77
+ - db/samples/images/solidus_mug.jpg
78
+ - db/samples/images/solidus_snapback_cap.jpg
79
+ - db/samples/images/solidus_tshirt.jpg
80
+ - db/samples/images/solidus_tshirt_back.jpg
81
+ - db/samples/images/solidus_tshirt_back_black.png
82
+ - db/samples/images/solidus_tshirt_back_blue.png
83
+ - db/samples/images/solidus_tshirt_back_white.png
84
+ - db/samples/images/solidus_tshirt_black.png
85
+ - db/samples/images/solidus_tshirt_blue.png
86
+ - db/samples/images/solidus_tshirt_white.png
87
+ - db/samples/images/tote_bag_ruby.jpg
88
+ - db/samples/images/tote_bag_solidus.jpg
59
89
  - db/samples/option_types.rb
60
90
  - db/samples/option_values.rb
61
91
  - db/samples/orders.rb
@@ -101,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
131
  version: 1.8.23
102
132
  requirements:
103
133
  - none
104
- rubygems_version: 3.0.3
134
+ rubygems_version: 3.0.6
105
135
  signing_key:
106
136
  specification_version: 4
107
137
  summary: Sample data (including images) for use with Solidus.