goca-spree-sample 3.1.14.rails.5.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.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -0
  3. data/LICENSE +26 -0
  4. data/Rakefile +15 -0
  5. data/db/samples/addresses.rb +26 -0
  6. data/db/samples/adjustments.rb +20 -0
  7. data/db/samples/assets.rb +159 -0
  8. data/db/samples/images/apache_baseball.png +0 -0
  9. data/db/samples/images/ror_bag.jpeg +0 -0
  10. data/db/samples/images/ror_baseball.jpeg +0 -0
  11. data/db/samples/images/ror_baseball_back.jpeg +0 -0
  12. data/db/samples/images/ror_baseball_jersey_back_blue.png +0 -0
  13. data/db/samples/images/ror_baseball_jersey_back_green.png +0 -0
  14. data/db/samples/images/ror_baseball_jersey_back_red.png +0 -0
  15. data/db/samples/images/ror_baseball_jersey_blue.png +0 -0
  16. data/db/samples/images/ror_baseball_jersey_green.png +0 -0
  17. data/db/samples/images/ror_baseball_jersey_red.png +0 -0
  18. data/db/samples/images/ror_jr_spaghetti.jpeg +0 -0
  19. data/db/samples/images/ror_mug.jpeg +0 -0
  20. data/db/samples/images/ror_mug_back.jpeg +0 -0
  21. data/db/samples/images/ror_ringer.jpeg +0 -0
  22. data/db/samples/images/ror_ringer_back.jpeg +0 -0
  23. data/db/samples/images/ror_stein.jpeg +0 -0
  24. data/db/samples/images/ror_stein_back.jpeg +0 -0
  25. data/db/samples/images/ror_tote.jpeg +0 -0
  26. data/db/samples/images/ror_tote_back.jpeg +0 -0
  27. data/db/samples/images/ruby_baseball.png +0 -0
  28. data/db/samples/images/spree_bag.jpeg +0 -0
  29. data/db/samples/images/spree_jersey.jpeg +0 -0
  30. data/db/samples/images/spree_jersey_back.jpeg +0 -0
  31. data/db/samples/images/spree_mug.jpeg +0 -0
  32. data/db/samples/images/spree_mug_back.jpeg +0 -0
  33. data/db/samples/images/spree_ringer_t.jpeg +0 -0
  34. data/db/samples/images/spree_ringer_t_back.jpeg +0 -0
  35. data/db/samples/images/spree_spaghetti.jpeg +0 -0
  36. data/db/samples/images/spree_stein.jpeg +0 -0
  37. data/db/samples/images/spree_stein_back.jpeg +0 -0
  38. data/db/samples/images/spree_tote_back.jpeg +0 -0
  39. data/db/samples/images/spree_tote_front.jpeg +0 -0
  40. data/db/samples/option_types.rb +12 -0
  41. data/db/samples/option_values.rb +49 -0
  42. data/db/samples/orders.rb +38 -0
  43. data/db/samples/payment_methods.rb +15 -0
  44. data/db/samples/payments.rb +22 -0
  45. data/db/samples/product_option_types.rb +12 -0
  46. data/db/samples/product_properties.rb +118 -0
  47. data/db/samples/products.rb +137 -0
  48. data/db/samples/prototypes.rb +21 -0
  49. data/db/samples/shipping_categories.rb +1 -0
  50. data/db/samples/shipping_methods.rb +60 -0
  51. data/db/samples/stock.rb +12 -0
  52. data/db/samples/store_credit_categories.rb +1 -0
  53. data/db/samples/tax_categories.rb +2 -0
  54. data/db/samples/tax_rates.rb +9 -0
  55. data/db/samples/taxonomies.rb +8 -0
  56. data/db/samples/taxons.rb +145 -0
  57. data/db/samples/variants.rb +164 -0
  58. data/db/samples.rb +2 -0
  59. data/lib/spree/sample.rb +23 -0
  60. data/lib/spree_sample.rb +32 -0
  61. data/lib/tasks/sample.rake +24 -0
  62. data/spree_sample.gemspec +21 -0
  63. metadata +119 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 751ce24fe4e72f24f018fc2b421b477e9092f04a
4
+ data.tar.gz: 5250d453996c3b59724afae0a4eb44e9a54d8c2d
5
+ SHA512:
6
+ metadata.gz: 339ad621c077e568f879318088e5199f2b0e661856912bc0694ae11692e9d01bc3489c9d6597e422bda291439ec60a9f246fa51bfe655546cfc8b4807798364f
7
+ data.tar.gz: c0a6833406008d904bc684e8477a56d54466a3d58e0b3666f94d01e2333986a1175838c4b5af6d3ed155c1f5f4a83e298655dbbb69e0278cde93b5ce69f56209
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ eval(File.read(File.dirname(__FILE__) + '/../common_spree_dependencies.rb'))
2
+
3
+ gem 'spree_core', :path => '../core'
4
+
5
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2007-2015, Spree Commerce, Inc. and other contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rspec/core/rake_task'
5
+ require 'spree/testing_support/common_rake'
6
+
7
+ RSpec::Core::RakeTask.new
8
+
9
+ task default: :spec
10
+
11
+ desc "Generates a dummy app for testing"
12
+ task :test_app do
13
+ ENV['LIB_NAME'] = 'spree/sample'
14
+ Rake::Task['common:test_app'].invoke
15
+ end
@@ -0,0 +1,26 @@
1
+ united_states = Spree::Country.find_by_iso!("US")
2
+ new_york = Spree::State.find_by_name!("New York")
3
+
4
+ # Billing address
5
+ Spree::Address.create!(
6
+ firstname: FFaker::Name.first_name,
7
+ lastname: FFaker::Name.last_name,
8
+ address1: FFaker::Address.street_address,
9
+ address2: FFaker::Address.secondary_address,
10
+ city: FFaker::Address.city,
11
+ state: new_york,
12
+ zipcode: 16804,
13
+ country: united_states,
14
+ phone: FFaker::PhoneNumber.phone_number)
15
+
16
+ #Shipping address
17
+ Spree::Address.create!(
18
+ firstname: FFaker::Name.first_name,
19
+ lastname: FFaker::Name.last_name,
20
+ address1: FFaker::Address.street_address,
21
+ address2: FFaker::Address.secondary_address,
22
+ city: FFaker::Address.city,
23
+ state: new_york,
24
+ zipcode: 16804,
25
+ country: united_states,
26
+ phone: FFaker::PhoneNumber.phone_number)
@@ -0,0 +1,20 @@
1
+ Spree::Sample.load_sample("orders")
2
+
3
+ first_order = Spree::Order.find_by_number!("R123456789")
4
+ last_order = Spree::Order.find_by_number!("R987654321")
5
+
6
+ first_order.adjustments.create!(
7
+ :amount => 0,
8
+ :source => Spree::TaxRate.find_by_name!("North America"),
9
+ :order => first_order,
10
+ :label => "Tax",
11
+ :state => "open",
12
+ :mandatory => true)
13
+
14
+ last_order.adjustments.create!(
15
+ :amount => 0,
16
+ :source => Spree::TaxRate.find_by_name!("North America"),
17
+ :order => last_order,
18
+ :label => "Tax",
19
+ :state => "open",
20
+ :mandatory => true)
@@ -0,0 +1,159 @@
1
+ Spree::Sample.load_sample("products")
2
+ Spree::Sample.load_sample("variants")
3
+
4
+ products = {}
5
+ products[:ror_baseball_jersey] = Spree::Product.find_by_name!("Ruby on Rails Baseball Jersey")
6
+ products[:ror_tote] = Spree::Product.find_by_name!("Ruby on Rails Tote")
7
+ products[:ror_bag] = Spree::Product.find_by_name!("Ruby on Rails Bag")
8
+ products[:ror_jr_spaghetti] = Spree::Product.find_by_name!("Ruby on Rails Jr. Spaghetti")
9
+ products[:ror_mug] = Spree::Product.find_by_name!("Ruby on Rails Mug")
10
+ products[:ror_ringer] = Spree::Product.find_by_name!("Ruby on Rails Ringer T-Shirt")
11
+ products[:ror_stein] = Spree::Product.find_by_name!("Ruby on Rails Stein")
12
+ products[:spree_baseball_jersey] = Spree::Product.find_by_name!("Spree Baseball Jersey")
13
+ products[:spree_stein] = Spree::Product.find_by_name!("Spree Stein")
14
+ products[:spree_jr_spaghetti] = Spree::Product.find_by_name!("Spree Jr. Spaghetti")
15
+ products[:spree_mug] = Spree::Product.find_by_name!("Spree Mug")
16
+ products[:spree_ringer] = Spree::Product.find_by_name!("Spree Ringer T-Shirt")
17
+ products[:spree_tote] = Spree::Product.find_by_name!("Spree Tote")
18
+ products[:spree_bag] = Spree::Product.find_by_name!("Spree Bag")
19
+ products[:ruby_baseball_jersey] = Spree::Product.find_by_name!("Ruby Baseball Jersey")
20
+ products[:apache_baseball_jersey] = Spree::Product.find_by_name!("Apache Baseball Jersey")
21
+
22
+
23
+ def image(name, type="jpeg")
24
+ images_path = Pathname.new(File.dirname(__FILE__)) + "images"
25
+ path = images_path + "#{name}.#{type}"
26
+ return false if !File.exist?(path)
27
+ File.open(path)
28
+ end
29
+
30
+ images = {
31
+ products[:ror_tote].master => [
32
+ {
33
+ :attachment => image("ror_tote")
34
+ },
35
+ {
36
+ :attachment => image("ror_tote_back")
37
+ }
38
+ ],
39
+ products[:ror_bag].master => [
40
+ {
41
+ :attachment => image("ror_bag")
42
+ }
43
+ ],
44
+ products[:ror_baseball_jersey].master => [
45
+ {
46
+ :attachment => image("ror_baseball")
47
+ },
48
+ {
49
+ :attachment => image("ror_baseball_back")
50
+ }
51
+ ],
52
+ products[:ror_jr_spaghetti].master => [
53
+ {
54
+ :attachment => image("ror_jr_spaghetti")
55
+ }
56
+ ],
57
+ products[:ror_mug].master => [
58
+ {
59
+ :attachment => image("ror_mug")
60
+ },
61
+ {
62
+ :attachment => image("ror_mug_back")
63
+ }
64
+ ],
65
+ products[:ror_ringer].master => [
66
+ {
67
+ :attachment => image("ror_ringer")
68
+ },
69
+ {
70
+ :attachment => image("ror_ringer_back")
71
+ }
72
+ ],
73
+ products[:ror_stein].master => [
74
+ {
75
+ :attachment => image("ror_stein")
76
+ },
77
+ {
78
+ :attachment => image("ror_stein_back")
79
+ }
80
+ ],
81
+ products[:apache_baseball_jersey].master => [
82
+ {
83
+ :attachment => image("apache_baseball", "png")
84
+ },
85
+ ],
86
+ products[:ruby_baseball_jersey].master => [
87
+ {
88
+ :attachment => image("ruby_baseball", "png")
89
+ },
90
+ ],
91
+ products[:spree_bag].master => [
92
+ {
93
+ :attachment => image("spree_bag")
94
+ },
95
+ ],
96
+ products[:spree_tote].master => [
97
+ {
98
+ :attachment => image("spree_tote_front")
99
+ },
100
+ {
101
+ :attachment => image("spree_tote_back")
102
+ }
103
+ ],
104
+ products[:spree_ringer].master => [
105
+ {
106
+ :attachment => image("spree_ringer_t")
107
+ },
108
+ {
109
+ :attachment => image("spree_ringer_t_back")
110
+ }
111
+ ],
112
+ products[:spree_jr_spaghetti].master => [
113
+ {
114
+ :attachment => image("spree_spaghetti")
115
+ }
116
+ ],
117
+ products[:spree_baseball_jersey].master => [
118
+ {
119
+ :attachment => image("spree_jersey")
120
+ },
121
+ {
122
+ :attachment => image("spree_jersey_back")
123
+ }
124
+ ],
125
+ products[:spree_stein].master => [
126
+ {
127
+ :attachment => image("spree_stein")
128
+ },
129
+ {
130
+ :attachment => image("spree_stein_back")
131
+ }
132
+ ],
133
+ products[:spree_mug].master => [
134
+ {
135
+ :attachment => image("spree_mug")
136
+ },
137
+ {
138
+ :attachment => image("spree_mug_back")
139
+ }
140
+ ],
141
+ }
142
+
143
+ products[:ror_baseball_jersey].variants.each do |variant|
144
+ color = variant.option_value("tshirt-color").downcase
145
+ main_image = image("ror_baseball_jersey_#{color}", "png")
146
+ variant.images.create!(:attachment => main_image)
147
+ back_image = image("ror_baseball_jersey_back_#{color}", "png")
148
+ if back_image
149
+ variant.images.create!(:attachment => back_image)
150
+ end
151
+ end
152
+
153
+ images.each do |variant, attachments|
154
+ puts "Loading images for #{variant.product.name}"
155
+ attachments.each do |attachment|
156
+ variant.images.create!(attachment)
157
+ end
158
+ end
159
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ Spree::OptionType.create!([
2
+ {
3
+ :name => "tshirt-size",
4
+ :presentation => "Size",
5
+ :position => 1
6
+ },
7
+ {
8
+ :name => "tshirt-color",
9
+ :presentation => "Color",
10
+ :position => 2
11
+ }
12
+ ])
@@ -0,0 +1,49 @@
1
+ Spree::Sample.load_sample("option_types")
2
+
3
+ size = Spree::OptionType.find_by_presentation!("Size")
4
+ color = Spree::OptionType.find_by_presentation!("Color")
5
+
6
+ Spree::OptionValue.create!([
7
+ {
8
+ :name => "Small",
9
+ :presentation => "S",
10
+ :position => 1,
11
+ :option_type => size
12
+ },
13
+ {
14
+ :name => "Medium",
15
+ :presentation => "M",
16
+ :position => 2,
17
+ :option_type => size
18
+ },
19
+ {
20
+ :name => "Large",
21
+ :presentation => "L",
22
+ :position => 3,
23
+ :option_type => size
24
+ },
25
+ {
26
+ :name => "Extra Large",
27
+ :presentation => "XL",
28
+ :position => 4,
29
+ :option_type => size
30
+ },
31
+ {
32
+ :name => "Red",
33
+ :presentation => "Red",
34
+ :position => 1,
35
+ :option_type => color,
36
+ },
37
+ {
38
+ :name => "Green",
39
+ :presentation => "Green",
40
+ :position => 2,
41
+ :option_type => color,
42
+ },
43
+ {
44
+ :name => "Blue",
45
+ :presentation => "Blue",
46
+ :position => 3,
47
+ :option_type => color
48
+ }
49
+ ])
@@ -0,0 +1,38 @@
1
+ Spree::Sample.load_sample("addresses")
2
+
3
+ orders = []
4
+ orders << Spree::Order.create!(
5
+ :number => "R123456789",
6
+ :email => "spree@example.com",
7
+ :item_total => 150.95,
8
+ :adjustment_total => 150.95,
9
+ :total => 301.90,
10
+ :shipping_address => Spree::Address.first,
11
+ :billing_address => Spree::Address.last)
12
+
13
+ orders << Spree::Order.create!(
14
+ :number => "R987654321",
15
+ :email => "spree@example.com",
16
+ :item_total => 15.95,
17
+ :adjustment_total => 15.95,
18
+ :total => 31.90,
19
+ :shipping_address => Spree::Address.first,
20
+ :billing_address => Spree::Address.last)
21
+
22
+ orders[0].line_items.create!(
23
+ :variant => Spree::Product.find_by_name!("Ruby on Rails Tote").master,
24
+ :quantity => 1,
25
+ :price => 15.99)
26
+
27
+ orders[1].line_items.create!(
28
+ :variant => Spree::Product.find_by_name!("Ruby on Rails Bag").master,
29
+ :quantity => 1,
30
+ :price => 22.99)
31
+
32
+ orders.each(&:create_proposed_shipments)
33
+
34
+ orders.each do |order|
35
+ order.state = "complete"
36
+ order.completed_at = Time.current - 1.day
37
+ order.save!
38
+ end
@@ -0,0 +1,15 @@
1
+ Spree::Gateway::Bogus.create!(
2
+ {
3
+ name: "Credit Card",
4
+ description: "Bogus payment gateway.",
5
+ active: true
6
+ }
7
+ )
8
+
9
+ Spree::PaymentMethod::Check.create!(
10
+ {
11
+ name: "Check",
12
+ description: "Pay by check.",
13
+ active: true
14
+ }
15
+ )
@@ -0,0 +1,22 @@
1
+ # create payments based on the totals since they can't be known in YAML (quantities are random)
2
+ method = Spree::PaymentMethod.where(:name => 'Credit Card', :active => true).first
3
+
4
+ # Hack the current method so we're able to return a gateway without a RAILS_ENV
5
+ Spree::Gateway.class_eval do
6
+ def self.current
7
+ Spree::Gateway::Bogus.new
8
+ end
9
+ end
10
+
11
+ # This table was previously called spree_creditcards, and older migrations
12
+ # reference it as such. Make it explicit here that this table has been renamed.
13
+ Spree::CreditCard.table_name = 'spree_credit_cards'
14
+
15
+ creditcard = Spree::CreditCard.create(:cc_type => 'visa', :month => 12, :year => 2.years.from_now.year, :last_digits => '1111',
16
+ :name => 'Sean Schofield', :gateway_customer_profile_id => 'BGS-1234')
17
+
18
+ Spree::Order.all.each_with_index do |order, index|
19
+ order.update_with_updater!
20
+ payment = order.payments.create!(:amount => order.total, :source => creditcard.clone, :payment_method => method)
21
+ payment.update_columns(:state => 'pending', :response_code => '12345')
22
+ end
@@ -0,0 +1,12 @@
1
+ Spree::Sample.load_sample("products")
2
+
3
+ size = Spree::OptionType.find_by_presentation!("Size")
4
+ color = Spree::OptionType.find_by_presentation!("Color")
5
+
6
+ ror_baseball_jersey = Spree::Product.find_by_name!("Ruby on Rails Baseball Jersey")
7
+ ror_baseball_jersey.option_types = [size, color]
8
+ ror_baseball_jersey.save!
9
+
10
+ spree_baseball_jersey = Spree::Product.find_by_name!("Spree Baseball Jersey")
11
+ spree_baseball_jersey.option_types = [size, color]
12
+ spree_baseball_jersey.save!
@@ -0,0 +1,118 @@
1
+ products =
2
+ {
3
+ "Ruby on Rails Baseball Jersey" =>
4
+ {
5
+ "Manufacturer" => "Wilson",
6
+ "Brand" => "Wannabe Sports",
7
+ "Model" => "JK1002",
8
+ "Shirt Type" => "Baseball Jersey",
9
+ "Sleeve Type" => "Long",
10
+ "Made from" => "100% cotton",
11
+ "Fit" => "Loose",
12
+ "Gender" => "Men's"
13
+ },
14
+ "Ruby on Rails Jr. Spaghetti" =>
15
+ {
16
+ "Manufacturer" => "Jerseys",
17
+ "Brand" => "Resiliance",
18
+ "Model" => "TL174",
19
+ "Shirt Type" => "Jr. Spaghetti T",
20
+ "Sleeve Type" => "None",
21
+ "Made from" => "90% Cotton, 10% Nylon",
22
+ "Fit" => "Form",
23
+ "Gender" => "Women's"
24
+ },
25
+ "Ruby on Rails Ringer T-Shirt" =>
26
+ {
27
+ "Manufacturer" => "Jerseys",
28
+ "Brand" => "Conditioned",
29
+ "Model" => "TL9002",
30
+ "Shirt Type" => "Ringer T",
31
+ "Sleeve Type" => "Short",
32
+ "Made from" => "100% Vellum",
33
+ "Fit" => "Loose",
34
+ "Gender" => "Men's"
35
+ },
36
+ "Ruby on Rails Tote" =>
37
+ {
38
+ "Type" => "Tote",
39
+ "Size" => %Q{15" x 18" x 6"},
40
+ "Material" => "Canvas"
41
+ },
42
+ "Ruby on Rails Bag" =>
43
+ {
44
+ "Type" => "Messenger",
45
+ "Size" => %Q{14 1/2" x 12" x 5"},
46
+ "Material" => "600 Denier Polyester"
47
+ },
48
+ "Ruby on Rails Mug" =>
49
+ {
50
+ "Type" => "Mug",
51
+ "Size" => %Q{4.5" tall, 3.25" dia.}
52
+ },
53
+ "Ruby on Rails Stein" =>
54
+ {
55
+ "Type" => "Stein",
56
+ "Size" => %Q{6.75" tall, 3.75" dia. base, 3" dia. rim}
57
+ },
58
+ "Spree Stein" =>
59
+ {
60
+ "Type" => "Stein",
61
+ "Size" => %Q{6.75" tall, 3.75" dia. base, 3" dia. rim}
62
+ },
63
+ "Spree Mug" =>
64
+ {
65
+ "Type" => "Mug",
66
+ "Size" => %Q{4.5" tall, 3.25" dia.}
67
+ },
68
+ "Spree Tote" =>
69
+ {
70
+ "Type" => "Tote",
71
+ "Size" => %Q{15" x 18" x 6"}
72
+ },
73
+ "Spree Bag" =>
74
+ {
75
+ "Type" => "Messenger",
76
+ "Size" => %Q{14 1/2" x 12" x 5"}
77
+ },
78
+ "Spree Baseball Jersey" =>
79
+ {
80
+ "Manufacturer" => "Wilson",
81
+ "Brand" => "Wannabe Sports",
82
+ "Model" => "JK1002",
83
+ "Shirt Type" => "Baseball Jersey",
84
+ "Sleeve Type" => "Long",
85
+ "Made from" => "100% cotton",
86
+ "Fit" => "Loose",
87
+ "Gender" => "Men's"
88
+ },
89
+ "Spree Jr. Spaghetti" =>
90
+ {
91
+ "Manufacturer" => "Jerseys",
92
+ "Brand" => "Resiliance",
93
+ "Model" => "TL174",
94
+ "Shirt Type" => "Jr. Spaghetti T",
95
+ "Sleeve Type" => "None",
96
+ "Made from" => "90% Cotton, 10% Nylon",
97
+ "Fit" => "Form",
98
+ "Gender" => "Women's"
99
+ },
100
+ "Spree Ringer T-Shirt" =>
101
+ {
102
+ "Manufacturer" => "Jerseys",
103
+ "Brand" => "Conditioned",
104
+ "Model" => "TL9002",
105
+ "Shirt Type" => "Ringer T",
106
+ "Sleeve Type" => "Short",
107
+ "Made from" => "100% Vellum",
108
+ "Fit" => "Loose",
109
+ "Gender" => "Men's"
110
+ },
111
+ }
112
+
113
+ products.each do |name, properties|
114
+ product = Spree::Product.find_by_name(name)
115
+ properties.each do |prop_name, prop_value|
116
+ product.set_property(prop_name, prop_value)
117
+ end
118
+ end