solidus_sample 2.9.6 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/db/samples/addresses.rb +5 -8
  3. data/db/samples/assets.rb +79 -40
  4. data/db/samples/images/ruby_hoodie.jpg +0 -0
  5. data/db/samples/images/ruby_hoodie_zip.jpg +0 -0
  6. data/db/samples/images/ruby_mug.jpg +0 -0
  7. data/db/samples/images/ruby_polo.jpg +0 -0
  8. data/db/samples/images/ruby_polo_back.jpg +0 -0
  9. data/db/samples/images/solidus_girly.jpg +0 -0
  10. data/db/samples/images/solidus_girly_black.png +0 -0
  11. data/db/samples/images/solidus_girly_blue.png +0 -0
  12. data/db/samples/images/solidus_girly_white.png +0 -0
  13. data/db/samples/images/solidus_hoodie.jpg +0 -0
  14. data/db/samples/images/solidus_long.jpg +0 -0
  15. data/db/samples/images/solidus_long_back.jpg +0 -0
  16. data/db/samples/images/solidus_long_back_black.png +0 -0
  17. data/db/samples/images/solidus_long_back_blue.png +0 -0
  18. data/db/samples/images/solidus_long_back_white.png +0 -0
  19. data/db/samples/images/solidus_long_black.png +0 -0
  20. data/db/samples/images/solidus_long_blue.png +0 -0
  21. data/db/samples/images/solidus_long_white.png +0 -0
  22. data/db/samples/images/solidus_mug.jpg +0 -0
  23. data/db/samples/images/solidus_snapback_cap.jpg +0 -0
  24. data/db/samples/images/solidus_tshirt.jpg +0 -0
  25. data/db/samples/images/solidus_tshirt_back.jpg +0 -0
  26. data/db/samples/images/solidus_tshirt_back_black.png +0 -0
  27. data/db/samples/images/solidus_tshirt_back_blue.png +0 -0
  28. data/db/samples/images/solidus_tshirt_back_white.png +0 -0
  29. data/db/samples/images/solidus_tshirt_black.png +0 -0
  30. data/db/samples/images/solidus_tshirt_blue.png +0 -0
  31. data/db/samples/images/solidus_tshirt_white.png +0 -0
  32. data/db/samples/images/tote_bag_ruby.jpg +0 -0
  33. data/db/samples/images/tote_bag_solidus.jpg +0 -0
  34. data/db/samples/option_values.rb +13 -1
  35. data/db/samples/orders.rb +3 -3
  36. data/db/samples/product_option_types.rb +3 -3
  37. data/db/samples/product_properties.rb +78 -28
  38. data/db/samples/products.rb +97 -27
  39. data/db/samples/reimbursements.rb +35 -12
  40. data/db/samples/taxons.rb +58 -40
  41. data/db/samples/variants.rb +149 -62
  42. data/solidus_sample.gemspec +5 -5
  43. metadata +40 -33
  44. data/db/samples/images/apache_baseball.png +0 -0
  45. data/db/samples/images/ror_bag.jpeg +0 -0
  46. data/db/samples/images/ror_baseball.jpeg +0 -0
  47. data/db/samples/images/ror_baseball_back.jpeg +0 -0
  48. data/db/samples/images/ror_baseball_jersey_back_blue.png +0 -0
  49. data/db/samples/images/ror_baseball_jersey_back_green.png +0 -0
  50. data/db/samples/images/ror_baseball_jersey_back_red.png +0 -0
  51. data/db/samples/images/ror_baseball_jersey_blue.png +0 -0
  52. data/db/samples/images/ror_baseball_jersey_green.png +0 -0
  53. data/db/samples/images/ror_baseball_jersey_red.png +0 -0
  54. data/db/samples/images/ror_jr_spaghetti.jpeg +0 -0
  55. data/db/samples/images/ror_mug.jpeg +0 -0
  56. data/db/samples/images/ror_mug_back.jpeg +0 -0
  57. data/db/samples/images/ror_ringer.jpeg +0 -0
  58. data/db/samples/images/ror_ringer_back.jpeg +0 -0
  59. data/db/samples/images/ror_stein.jpeg +0 -0
  60. data/db/samples/images/ror_stein_back.jpeg +0 -0
  61. data/db/samples/images/ror_tote.jpeg +0 -0
  62. data/db/samples/images/ror_tote_back.jpeg +0 -0
  63. data/db/samples/images/ruby_baseball.png +0 -0
  64. data/spec/lib/load_sample_spec.rb +0 -12
  65. data/spec/spec_helper.rb +0 -41
@@ -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
 
@@ -2,22 +2,45 @@
2
2
 
3
3
  Spree::Sample.load_sample("orders")
4
4
 
5
- order = Spree::Order.last
6
- inventory_unit = order.inventory_units.first
5
+ order = Spree::Order.last
6
+ inventory_unit = order.inventory_units.take!
7
7
  stock_location = inventory_unit.find_stock_item.stock_location
8
+ return_reason = Spree::ReturnReason.active.take!
9
+ preferred_reimbursement_type = Spree::ReimbursementType.where(name: 'Original').take!
10
+ admin_user = if defined?(Spree::Auth)
11
+ Spree.user_class.admin.take!
12
+ else
13
+ Spree.user_class.find_or_create_by!(email: 'admin@example.com')
14
+ end
8
15
 
9
- return_item = Spree::ReturnItem.create(inventory_unit: inventory_unit)
16
+ # Mark the order paid and shipped
17
+ order.payments.pending.each(&:complete)
18
+ order.shipments.each do |shipment|
19
+ shipment.suppress_mailer = false
20
+ shipment.ship!
21
+ end
10
22
 
11
- return_item.exchange_variant = return_item.eligible_exchange_variants.last
12
- return_item.build_exchange_inventory_unit
13
- return_item.accept!
23
+ # Create a return authorization
24
+ return_item = Spree::ReturnItem.new(
25
+ inventory_unit: inventory_unit,
26
+ preferred_reimbursement_type: preferred_reimbursement_type
27
+ )
14
28
 
15
- customer_return = Spree::CustomerReturn.create(
16
- stock_location: stock_location,
17
- return_items: [return_item]
29
+ order.return_authorizations.create!(
30
+ reason: return_reason,
31
+ return_items: [return_item],
32
+ stock_location: stock_location
18
33
  )
19
34
 
20
- order.reimbursements.create(
21
- customer_return: customer_return,
22
- return_items: [return_item]
35
+ # Create a customer return and mark it as received
36
+ customer_return = Spree::CustomerReturn.create!(
37
+ return_items: [return_item],
38
+ stock_location: stock_location
23
39
  )
40
+ return_item.reload
41
+ return_item.receive!
42
+ customer_return.process_return!
43
+
44
+ # Accept the customer return and reimburse it
45
+ reimbursement = Spree::Reimbursement.build_from_customer_return(customer_return)
46
+ reimbursement.return_all(created_by: admin_user)
@@ -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,123 +3,210 @@
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")
18
21
  large = Spree::OptionValue.find_by!(name: "Large")
19
22
  extra_large = Spree::OptionValue.find_by!(name: "Extra Large")
20
23
 
21
- red = Spree::OptionValue.find_by!(name: "Red")
22
24
  blue = Spree::OptionValue.find_by!(name: "Blue")
23
- green = Spree::OptionValue.find_by!(name: "Green")
25
+ black = Spree::OptionValue.find_by!(name: "Black")
26
+ white = Spree::OptionValue.find_by!(name: "White")
24
27
 
25
28
  variants = [
26
29
  {
27
- product: ror_baseball_jersey,
28
- option_values: [small, red],
29
- sku: "ROR-00001",
30
+ product: solidus_tshirt,
31
+ option_values: [small, blue],
32
+ sku: "SOL-00003",
33
+ cost_price: 17
34
+ },
35
+ {
36
+ product: solidus_tshirt,
37
+ option_values: [small, black],
38
+ sku: "SOL-00002",
39
+ cost_price: 17
40
+ },
41
+ {
42
+ product: solidus_tshirt,
43
+ option_values: [small, white],
44
+ sku: "SOL-00004",
45
+ cost_price: 17
46
+ },
47
+ {
48
+ product: solidus_tshirt,
49
+ option_values: [medium, blue],
50
+ sku: "SOL-00005",
51
+ cost_price: 17
52
+ },
53
+ {
54
+ product: solidus_tshirt,
55
+ option_values: [large, white],
56
+ sku: "SOL-00006",
57
+ cost_price: 17
58
+ },
59
+ {
60
+ product: solidus_tshirt,
61
+ option_values: [large, black],
62
+ sku: "SOL-00007",
63
+ cost_price: 17
64
+ },
65
+ {
66
+ product: solidus_tshirt,
67
+ option_values: [extra_large, blue],
68
+ sku: "SOL-0008",
69
+ cost_price: 17
70
+ },
71
+ {
72
+ product: solidus_long,
73
+ option_values: [small, black],
74
+ sku: "SOL-LS02",
30
75
  cost_price: 17
31
76
  },
32
77
  {
33
- product: ror_baseball_jersey,
78
+ product: solidus_long,
79
+ option_values: [small, white],
80
+ sku: "SOL-LS01",
81
+ cost_price: 17
82
+ },
83
+ {
84
+ product: solidus_long,
34
85
  option_values: [small, blue],
35
- sku: "ROR-00002",
86
+ sku: "SOL-LS03",
36
87
  cost_price: 17
37
88
  },
38
89
  {
39
- product: ror_baseball_jersey,
40
- option_values: [small, green],
41
- sku: "ROR-00003",
90
+ product: solidus_long,
91
+ option_values: [medium, white],
92
+ sku: "SOL-LS04",
42
93
  cost_price: 17
43
94
  },
44
95
  {
45
- product: ror_baseball_jersey,
46
- option_values: [medium, red],
47
- sku: "ROR-00004",
96
+ product: solidus_long,
97
+ option_values: [medium, black],
98
+ sku: "SOL-LS05",
48
99
  cost_price: 17
49
100
  },
50
101
  {
51
- product: ror_baseball_jersey,
102
+ product: solidus_long,
52
103
  option_values: [medium, blue],
53
- sku: "ROR-00005",
104
+ sku: "SOL-LS06",
54
105
  cost_price: 17
55
106
  },
56
107
  {
57
- product: ror_baseball_jersey,
58
- option_values: [medium, green],
59
- sku: "ROR-00006",
108
+ product: solidus_long,
109
+ option_values: [large, white],
110
+ sku: "SOL-LS07",
60
111
  cost_price: 17
61
112
  },
62
113
  {
63
- product: ror_baseball_jersey,
64
- option_values: [large, red],
65
- sku: "ROR-00007",
114
+ product: solidus_long,
115
+ option_values: [large, black],
116
+ sku: "SOL-LS08",
66
117
  cost_price: 17
67
118
  },
68
119
  {
69
- product: ror_baseball_jersey,
120
+ product: solidus_long,
70
121
  option_values: [large, blue],
71
- sku: "ROR-00008",
122
+ sku: "SOL-LS09",
123
+ cost_price: 17
124
+ },
125
+ {
126
+ product: solidus_girly,
127
+ option_values: [small, black],
128
+ sku: "SOL-WM001",
129
+ cost_price: 17
130
+ },
131
+ {
132
+ product: solidus_girly,
133
+ option_values: [small, blue],
134
+ sku: "SOL-WM002",
72
135
  cost_price: 17
73
136
  },
74
137
  {
75
- product: ror_baseball_jersey,
76
- option_values: [large, green],
77
- sku: "ROR-00009",
138
+ product: solidus_girly,
139
+ option_values: [small, white],
140
+ sku: "SOL-WM003",
78
141
  cost_price: 17
79
142
  },
80
143
  {
81
- product: ror_baseball_jersey,
82
- option_values: [extra_large, green],
83
- sku: "ROR-00010",
144
+ product: solidus_girly,
145
+ option_values: [medium, blue],
146
+ sku: "SOL-WM004",
147
+ cost_price: 17
148
+ },
149
+ {
150
+ product: solidus_girly,
151
+ option_values: [medium, white],
152
+ sku: "SOL-WM005",
153
+ cost_price: 17
154
+ },
155
+ {
156
+ product: solidus_girly,
157
+ option_values: [medium, black],
158
+ sku: "SOL-WM006",
84
159
  cost_price: 17
85
160
  }
86
161
  ]
87
162
 
88
163
  masters = {
89
- ror_baseball_jersey => {
90
- sku: "ROR-001",
164
+ solidus_tote => {
165
+ sku: "SOL-TOT01",
91
166
  cost_price: 17
92
167
  },
93
- ror_tote => {
94
- sku: "ROR-00011",
168
+ ruby_tote => {
169
+ sku: "RUB-TOT01",
95
170
  cost_price: 17
96
171
  },
97
- ror_bag => {
98
- sku: "ROR-00012",
99
- cost_price: 21
100
- },
101
- ror_jr_spaghetti => {
102
- sku: "ROR-00013",
172
+ solidus_snapback_cap => {
173
+ sku: "SOL-SNC01",
103
174
  cost_price: 17
104
175
  },
105
- ror_mug => {
106
- sku: "ROR-00014",
107
- cost_price: 11
176
+ solidus_tshirt => {
177
+ sku: "SOL-00001",
178
+ cost_price: 17
108
179
  },
109
- ror_ringer => {
110
- sku: "ROR-00015",
180
+ solidus_long => {
181
+ sku: "SOL-LS00",
111
182
  cost_price: 17
112
183
  },
113
- ror_stein => {
114
- sku: "ROR-00016",
115
- cost_price: 15
184
+ solidus_hoodie => {
185
+ sku: "SOL-HD00",
186
+ cost_price: 27
116
187
  },
117
- apache_baseball_jersey => {
118
- sku: "APC-00001",
119
- cost_price: 17
188
+ ruby_hoodie => {
189
+ sku: "RUB-HD01",
190
+ cost_price: 27
191
+ },
192
+ ruby_hoodie_zip => {
193
+ sku: "RUB-HD00",
194
+ cost_price: 27
195
+ },
196
+ ruby_polo => {
197
+ sku: "RUB-PL01",
198
+ cost_price: 23
199
+ },
200
+ solidus_mug => {
201
+ sku: "SOL-MG01",
202
+ cost_price: 7
203
+ },
204
+ ruby_mug => {
205
+ sku: "RUB-MG01",
206
+ cost_price: 7
120
207
  },
121
- ruby_baseball_jersey => {
122
- sku: "RUB-00001",
208
+ solidus_girly => {
209
+ sku: "SOL-WM00",
123
210
  cost_price: 17
124
211
  }
125
212
  }
@@ -127,5 +214,5 @@ masters = {
127
214
  Spree::Variant.create!(variants)
128
215
 
129
216
  masters.each do |product, variant_attrs|
130
- product.master.update_attributes!(variant_attrs)
217
+ product.master.update!(variant_attrs)
131
218
  end