rees46_spree 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +15 -0
  4. data/Rakefile +21 -0
  5. data/app/controllers/rees46_spree/recommendations_controller.rb +14 -0
  6. data/app/controllers/spree/checkout_controller_decorator.rb +8 -0
  7. data/app/models/spree/product_decorator.rb +5 -0
  8. data/app/overrides/events.rb +33 -0
  9. data/app/overrides/recommenders.rb +27 -0
  10. data/app/views/rees46_spree/recommendations/_block.html.erb +9 -0
  11. data/app/views/rees46_spree/recommendations/_product.html.erb +7 -0
  12. data/app/views/rees46_spree/recommendations/show.html.erb +1 -0
  13. data/app/views/rees46_spree/recommenders/_cart.html.erb +13 -0
  14. data/app/views/rees46_spree/recommenders/_category.html.erb +27 -0
  15. data/app/views/rees46_spree/recommenders/_home.html.erb +13 -0
  16. data/app/views/rees46_spree/recommenders/_product.html.erb +27 -0
  17. data/app/views/spree/rees46/_init.html.erb +6 -0
  18. data/app/views/spree/rees46/events/_cart.html.erb +14 -0
  19. data/app/views/spree/rees46/events/_purchase.html.erb +13 -0
  20. data/app/views/spree/rees46/events/_remove_from_cart.html.erb +14 -0
  21. data/app/views/spree/rees46/events/_view.html.erb +12 -0
  22. data/config/locales/rees46.en.yml +9 -0
  23. data/config/routes.rb +3 -0
  24. data/lib/generators/rees46_spree/rees46_spree_generator.rb +25 -0
  25. data/lib/generators/rees46_spree/templates/initializer.rb +7 -0
  26. data/lib/rees46_spree.rb +15 -0
  27. data/lib/rees46_spree/configuration.rb +6 -0
  28. data/lib/rees46_spree/engine.rb +17 -0
  29. data/lib/rees46_spree/params_extractor.rb +7 -0
  30. data/lib/rees46_spree/version.rb +3 -0
  31. data/lib/tasks/rees46_spree_tasks.rake +4 -0
  32. data/spec/dummy/README.rdoc +28 -0
  33. data/spec/dummy/Rakefile +6 -0
  34. data/spec/dummy/app/assets/javascripts/admin/all.js +12 -0
  35. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  36. data/spec/dummy/app/assets/javascripts/store/all.js +12 -0
  37. data/spec/dummy/app/assets/stylesheets/admin/all.css +11 -0
  38. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  39. data/spec/dummy/app/assets/stylesheets/store/all.css +11 -0
  40. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  41. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  42. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  43. data/spec/dummy/bin/bundle +3 -0
  44. data/spec/dummy/bin/rails +4 -0
  45. data/spec/dummy/bin/rake +4 -0
  46. data/spec/dummy/config.ru +4 -0
  47. data/spec/dummy/config/application.rb +36 -0
  48. data/spec/dummy/config/boot.rb +5 -0
  49. data/spec/dummy/config/database.yml +25 -0
  50. data/spec/dummy/config/environment.rb +5 -0
  51. data/spec/dummy/config/environments/development.rb +29 -0
  52. data/spec/dummy/config/environments/production.rb +80 -0
  53. data/spec/dummy/config/environments/test.rb +36 -0
  54. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  55. data/spec/dummy/config/initializers/devise.rb +1 -0
  56. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/spec/dummy/config/initializers/inflections.rb +16 -0
  58. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  59. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  60. data/spec/dummy/config/initializers/session_store.rb +3 -0
  61. data/spec/dummy/config/initializers/spree.rb +14 -0
  62. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  63. data/spec/dummy/config/locales/en.yml +23 -0
  64. data/spec/dummy/config/routes.rb +4 -0
  65. data/spec/dummy/config/spree.yml +2 -0
  66. data/spec/dummy/db/schema.rb +702 -0
  67. data/spec/dummy/db/seeds.rb +4 -0
  68. data/spec/dummy/log/development.log +7015 -0
  69. data/spec/dummy/log/test.log +30207 -0
  70. data/spec/dummy/public/404.html +58 -0
  71. data/spec/dummy/public/422.html +58 -0
  72. data/spec/dummy/public/500.html +57 -0
  73. data/spec/dummy/public/favicon.ico +0 -0
  74. data/spec/features/init_script_addition_spec.rb +9 -0
  75. data/spec/features/push_events_spec.rb +13 -0
  76. data/spec/generators/rees46_spree/rees46_spree_generator_spec.rb +13 -0
  77. data/spec/rees46_spree/params_extractor.rb +13 -0
  78. data/spec/rees46_spree_spec.rb +10 -0
  79. data/spec/spec_helper.rb +39 -0
  80. metadata +311 -0
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'fd0dd3d01973d87170cfbbe187b229c504e4922d4f5ec7162ab0f6bd1782894cc6e8f7786db2e0d493a110da30e0b8a82a615460fd82d8240140d16171ebb99d'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Configure Spree Preferences
2
+ #
3
+ # Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart.
4
+ # If you would like users to be able to update a setting with the Admin it should NOT be set here.
5
+ #
6
+ # In order to initialize a setting do:
7
+ # config.setting_name = 'new value'
8
+ Spree.config do |config|
9
+ # Example:
10
+ # Uncomment to override the default site name.
11
+ # config.site_name = "Spree Demo Site"
12
+ end
13
+
14
+ Spree.user_class = "Spree::LegacyUser"
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+ mount Spree::Core::Engine, :at => '/'
3
+ mount Rees46Spree::Engine => "/rees46"
4
+ end
@@ -0,0 +1,2 @@
1
+ ---
2
+ version: 2.1.4
@@ -0,0 +1,702 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140203115534) do
15
+
16
+ create_table "spree_activators", force: true do |t|
17
+ t.string "description"
18
+ t.datetime "expires_at"
19
+ t.datetime "starts_at"
20
+ t.string "name"
21
+ t.string "event_name"
22
+ t.string "type"
23
+ t.integer "usage_limit"
24
+ t.string "match_policy", default: "all"
25
+ t.string "code"
26
+ t.boolean "advertise", default: false
27
+ t.string "path"
28
+ t.datetime "created_at"
29
+ t.datetime "updated_at"
30
+ end
31
+
32
+ create_table "spree_addresses", force: true do |t|
33
+ t.string "firstname"
34
+ t.string "lastname"
35
+ t.string "address1"
36
+ t.string "address2"
37
+ t.string "city"
38
+ t.string "zipcode"
39
+ t.string "phone"
40
+ t.string "state_name"
41
+ t.string "alternative_phone"
42
+ t.string "company"
43
+ t.integer "state_id"
44
+ t.integer "country_id"
45
+ t.datetime "created_at"
46
+ t.datetime "updated_at"
47
+ end
48
+
49
+ add_index "spree_addresses", ["firstname"], name: "index_addresses_on_firstname"
50
+ add_index "spree_addresses", ["lastname"], name: "index_addresses_on_lastname"
51
+
52
+ create_table "spree_adjustments", force: true do |t|
53
+ t.integer "source_id"
54
+ t.string "source_type"
55
+ t.integer "adjustable_id"
56
+ t.string "adjustable_type"
57
+ t.integer "originator_id"
58
+ t.string "originator_type"
59
+ t.decimal "amount", precision: 10, scale: 2
60
+ t.string "label"
61
+ t.boolean "mandatory"
62
+ t.boolean "eligible", default: true
63
+ t.datetime "created_at"
64
+ t.datetime "updated_at"
65
+ t.string "state"
66
+ t.integer "order_id"
67
+ t.boolean "included", default: false
68
+ end
69
+
70
+ add_index "spree_adjustments", ["adjustable_id"], name: "index_adjustments_on_order_id"
71
+ add_index "spree_adjustments", ["order_id"], name: "index_spree_adjustments_on_order_id"
72
+ add_index "spree_adjustments", ["source_type", "source_id"], name: "index_spree_adjustments_on_source_type_and_source_id"
73
+
74
+ create_table "spree_assets", force: true do |t|
75
+ t.integer "viewable_id"
76
+ t.string "viewable_type"
77
+ t.integer "attachment_width"
78
+ t.integer "attachment_height"
79
+ t.integer "attachment_file_size"
80
+ t.integer "position"
81
+ t.string "attachment_content_type"
82
+ t.string "attachment_file_name"
83
+ t.string "type", limit: 75
84
+ t.datetime "attachment_updated_at"
85
+ t.text "alt"
86
+ end
87
+
88
+ add_index "spree_assets", ["viewable_id"], name: "index_assets_on_viewable_id"
89
+ add_index "spree_assets", ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"
90
+
91
+ create_table "spree_calculators", force: true do |t|
92
+ t.string "type"
93
+ t.integer "calculable_id"
94
+ t.string "calculable_type"
95
+ t.datetime "created_at"
96
+ t.datetime "updated_at"
97
+ end
98
+
99
+ create_table "spree_configurations", force: true do |t|
100
+ t.string "name"
101
+ t.string "type", limit: 50
102
+ t.datetime "created_at"
103
+ t.datetime "updated_at"
104
+ end
105
+
106
+ add_index "spree_configurations", ["name", "type"], name: "index_spree_configurations_on_name_and_type"
107
+
108
+ create_table "spree_countries", force: true do |t|
109
+ t.string "iso_name"
110
+ t.string "iso"
111
+ t.string "iso3"
112
+ t.string "name"
113
+ t.integer "numcode"
114
+ t.boolean "states_required", default: false
115
+ t.datetime "updated_at"
116
+ end
117
+
118
+ create_table "spree_credit_cards", force: true do |t|
119
+ t.string "month"
120
+ t.string "year"
121
+ t.string "cc_type"
122
+ t.string "last_digits"
123
+ t.string "first_name"
124
+ t.string "last_name"
125
+ t.integer "address_id"
126
+ t.string "gateway_customer_profile_id"
127
+ t.string "gateway_payment_profile_id"
128
+ t.datetime "created_at"
129
+ t.datetime "updated_at"
130
+ end
131
+
132
+ create_table "spree_gateways", force: true do |t|
133
+ t.string "type"
134
+ t.string "name"
135
+ t.text "description"
136
+ t.boolean "active", default: true
137
+ t.string "environment", default: "development"
138
+ t.string "server", default: "test"
139
+ t.boolean "test_mode", default: true
140
+ t.datetime "created_at"
141
+ t.datetime "updated_at"
142
+ end
143
+
144
+ create_table "spree_inventory_units", force: true do |t|
145
+ t.string "state"
146
+ t.integer "variant_id"
147
+ t.integer "order_id"
148
+ t.integer "shipment_id"
149
+ t.integer "return_authorization_id"
150
+ t.datetime "created_at"
151
+ t.datetime "updated_at"
152
+ t.boolean "pending", default: true
153
+ end
154
+
155
+ add_index "spree_inventory_units", ["order_id"], name: "index_inventory_units_on_order_id"
156
+ add_index "spree_inventory_units", ["shipment_id"], name: "index_inventory_units_on_shipment_id"
157
+ add_index "spree_inventory_units", ["variant_id"], name: "index_inventory_units_on_variant_id"
158
+
159
+ create_table "spree_line_items", force: true do |t|
160
+ t.integer "variant_id"
161
+ t.integer "order_id"
162
+ t.integer "quantity", null: false
163
+ t.decimal "price", precision: 8, scale: 2, null: false
164
+ t.datetime "created_at"
165
+ t.datetime "updated_at"
166
+ t.string "currency"
167
+ t.decimal "cost_price", precision: 8, scale: 2
168
+ t.integer "tax_category_id"
169
+ end
170
+
171
+ add_index "spree_line_items", ["order_id"], name: "index_spree_line_items_on_order_id"
172
+ add_index "spree_line_items", ["variant_id"], name: "index_spree_line_items_on_variant_id"
173
+
174
+ create_table "spree_log_entries", force: true do |t|
175
+ t.integer "source_id"
176
+ t.string "source_type"
177
+ t.text "details"
178
+ t.datetime "created_at"
179
+ t.datetime "updated_at"
180
+ end
181
+
182
+ create_table "spree_option_types", force: true do |t|
183
+ t.string "name", limit: 100
184
+ t.string "presentation", limit: 100
185
+ t.integer "position", default: 0, null: false
186
+ t.datetime "created_at"
187
+ t.datetime "updated_at"
188
+ end
189
+
190
+ create_table "spree_option_types_prototypes", id: false, force: true do |t|
191
+ t.integer "prototype_id"
192
+ t.integer "option_type_id"
193
+ end
194
+
195
+ create_table "spree_option_values", force: true do |t|
196
+ t.integer "position"
197
+ t.string "name"
198
+ t.string "presentation"
199
+ t.integer "option_type_id"
200
+ t.datetime "created_at"
201
+ t.datetime "updated_at"
202
+ end
203
+
204
+ create_table "spree_option_values_variants", id: false, force: true do |t|
205
+ t.integer "variant_id"
206
+ t.integer "option_value_id"
207
+ end
208
+
209
+ add_index "spree_option_values_variants", ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id"
210
+ add_index "spree_option_values_variants", ["variant_id"], name: "index_spree_option_values_variants_on_variant_id"
211
+
212
+ create_table "spree_orders", force: true do |t|
213
+ t.string "number", limit: 32
214
+ t.decimal "item_total", precision: 10, scale: 2, default: 0.0, null: false
215
+ t.decimal "total", precision: 10, scale: 2, default: 0.0, null: false
216
+ t.string "state"
217
+ t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0, null: false
218
+ t.integer "user_id"
219
+ t.datetime "completed_at"
220
+ t.integer "bill_address_id"
221
+ t.integer "ship_address_id"
222
+ t.decimal "payment_total", precision: 10, scale: 2, default: 0.0
223
+ t.integer "shipping_method_id"
224
+ t.string "shipment_state"
225
+ t.string "payment_state"
226
+ t.string "email"
227
+ t.text "special_instructions"
228
+ t.datetime "created_at"
229
+ t.datetime "updated_at"
230
+ t.string "currency"
231
+ t.string "last_ip_address"
232
+ t.integer "created_by_id"
233
+ t.string "channel", default: "spree"
234
+ t.decimal "tax_total", precision: 10, scale: 2, default: 0.0, null: false
235
+ t.date "delivery_date"
236
+ t.string "delivery_time"
237
+ t.text "delivery_instructions"
238
+ end
239
+
240
+ add_index "spree_orders", ["completed_at"], name: "index_spree_orders_on_completed_at"
241
+ add_index "spree_orders", ["number"], name: "index_spree_orders_on_number"
242
+ add_index "spree_orders", ["user_id"], name: "index_spree_orders_on_user_id"
243
+
244
+ create_table "spree_payment_methods", force: true do |t|
245
+ t.string "type"
246
+ t.string "name"
247
+ t.text "description"
248
+ t.boolean "active", default: true
249
+ t.string "environment", default: "development"
250
+ t.datetime "deleted_at"
251
+ t.datetime "created_at"
252
+ t.datetime "updated_at"
253
+ t.string "display_on"
254
+ end
255
+
256
+ create_table "spree_payments", force: true do |t|
257
+ t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false
258
+ t.integer "order_id"
259
+ t.integer "source_id"
260
+ t.string "source_type"
261
+ t.integer "payment_method_id"
262
+ t.string "state"
263
+ t.string "response_code"
264
+ t.string "avs_response"
265
+ t.datetime "created_at"
266
+ t.datetime "updated_at"
267
+ t.string "identifier"
268
+ t.string "cvv_response_code"
269
+ t.string "cvv_response_message"
270
+ end
271
+
272
+ add_index "spree_payments", ["order_id"], name: "index_spree_payments_on_order_id"
273
+
274
+ create_table "spree_preferences", force: true do |t|
275
+ t.text "value"
276
+ t.string "key"
277
+ t.string "value_type"
278
+ t.datetime "created_at"
279
+ t.datetime "updated_at"
280
+ end
281
+
282
+ add_index "spree_preferences", ["key"], name: "index_spree_preferences_on_key", unique: true
283
+
284
+ create_table "spree_prices", force: true do |t|
285
+ t.integer "variant_id", null: false
286
+ t.decimal "amount", precision: 8, scale: 2
287
+ t.string "currency"
288
+ end
289
+
290
+ add_index "spree_prices", ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
291
+
292
+ create_table "spree_product_option_types", force: true do |t|
293
+ t.integer "position"
294
+ t.integer "product_id"
295
+ t.integer "option_type_id"
296
+ t.datetime "created_at"
297
+ t.datetime "updated_at"
298
+ end
299
+
300
+ create_table "spree_product_properties", force: true do |t|
301
+ t.string "value"
302
+ t.integer "product_id"
303
+ t.integer "property_id"
304
+ t.datetime "created_at"
305
+ t.datetime "updated_at"
306
+ t.integer "position", default: 0
307
+ end
308
+
309
+ add_index "spree_product_properties", ["product_id"], name: "index_product_properties_on_product_id"
310
+
311
+ create_table "spree_products", force: true do |t|
312
+ t.string "name", default: "", null: false
313
+ t.text "description"
314
+ t.datetime "available_on"
315
+ t.datetime "deleted_at"
316
+ t.string "permalink"
317
+ t.text "meta_description"
318
+ t.string "meta_keywords"
319
+ t.integer "tax_category_id"
320
+ t.integer "shipping_category_id"
321
+ t.datetime "created_at"
322
+ t.datetime "updated_at"
323
+ end
324
+
325
+ add_index "spree_products", ["available_on"], name: "index_spree_products_on_available_on"
326
+ add_index "spree_products", ["deleted_at"], name: "index_spree_products_on_deleted_at"
327
+ add_index "spree_products", ["name"], name: "index_spree_products_on_name"
328
+ add_index "spree_products", ["permalink"], name: "index_spree_products_on_permalink"
329
+ add_index "spree_products", ["permalink"], name: "permalink_idx_unique", unique: true
330
+
331
+ create_table "spree_products_promotion_rules", id: false, force: true do |t|
332
+ t.integer "product_id"
333
+ t.integer "promotion_rule_id"
334
+ end
335
+
336
+ add_index "spree_products_promotion_rules", ["product_id"], name: "index_products_promotion_rules_on_product_id"
337
+ add_index "spree_products_promotion_rules", ["promotion_rule_id"], name: "index_products_promotion_rules_on_promotion_rule_id"
338
+
339
+ create_table "spree_products_taxons", force: true do |t|
340
+ t.integer "product_id"
341
+ t.integer "taxon_id"
342
+ end
343
+
344
+ add_index "spree_products_taxons", ["product_id"], name: "index_spree_products_taxons_on_product_id"
345
+ add_index "spree_products_taxons", ["taxon_id"], name: "index_spree_products_taxons_on_taxon_id"
346
+
347
+ create_table "spree_promotion_action_line_items", force: true do |t|
348
+ t.integer "promotion_action_id"
349
+ t.integer "variant_id"
350
+ t.integer "quantity", default: 1
351
+ end
352
+
353
+ create_table "spree_promotion_actions", force: true do |t|
354
+ t.integer "activator_id"
355
+ t.integer "position"
356
+ t.string "type"
357
+ end
358
+
359
+ create_table "spree_promotion_rules", force: true do |t|
360
+ t.integer "activator_id"
361
+ t.integer "user_id"
362
+ t.integer "product_group_id"
363
+ t.string "type"
364
+ t.datetime "created_at"
365
+ t.datetime "updated_at"
366
+ end
367
+
368
+ add_index "spree_promotion_rules", ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
369
+ add_index "spree_promotion_rules", ["user_id"], name: "index_promotion_rules_on_user_id"
370
+
371
+ create_table "spree_promotion_rules_users", id: false, force: true do |t|
372
+ t.integer "user_id"
373
+ t.integer "promotion_rule_id"
374
+ end
375
+
376
+ add_index "spree_promotion_rules_users", ["promotion_rule_id"], name: "index_promotion_rules_users_on_promotion_rule_id"
377
+ add_index "spree_promotion_rules_users", ["user_id"], name: "index_promotion_rules_users_on_user_id"
378
+
379
+ create_table "spree_properties", force: true do |t|
380
+ t.string "name"
381
+ t.string "presentation", null: false
382
+ t.datetime "created_at"
383
+ t.datetime "updated_at"
384
+ end
385
+
386
+ create_table "spree_properties_prototypes", id: false, force: true do |t|
387
+ t.integer "prototype_id"
388
+ t.integer "property_id"
389
+ end
390
+
391
+ create_table "spree_prototypes", force: true do |t|
392
+ t.string "name"
393
+ t.datetime "created_at"
394
+ t.datetime "updated_at"
395
+ end
396
+
397
+ create_table "spree_return_authorizations", force: true do |t|
398
+ t.string "number"
399
+ t.string "state"
400
+ t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false
401
+ t.integer "order_id"
402
+ t.text "reason"
403
+ t.datetime "created_at"
404
+ t.datetime "updated_at"
405
+ t.integer "stock_location_id"
406
+ end
407
+
408
+ create_table "spree_roles", force: true do |t|
409
+ t.string "name"
410
+ end
411
+
412
+ create_table "spree_roles_users", id: false, force: true do |t|
413
+ t.integer "role_id"
414
+ t.integer "user_id"
415
+ end
416
+
417
+ add_index "spree_roles_users", ["role_id"], name: "index_spree_roles_users_on_role_id"
418
+ add_index "spree_roles_users", ["user_id"], name: "index_spree_roles_users_on_user_id"
419
+
420
+ create_table "spree_shipments", force: true do |t|
421
+ t.string "tracking"
422
+ t.string "number"
423
+ t.decimal "cost", precision: 8, scale: 2
424
+ t.datetime "shipped_at"
425
+ t.integer "order_id"
426
+ t.integer "address_id"
427
+ t.string "state"
428
+ t.datetime "created_at"
429
+ t.datetime "updated_at"
430
+ t.integer "stock_location_id"
431
+ end
432
+
433
+ add_index "spree_shipments", ["number"], name: "index_shipments_on_number"
434
+ add_index "spree_shipments", ["order_id"], name: "index_spree_shipments_on_order_id"
435
+
436
+ create_table "spree_shipping_categories", force: true do |t|
437
+ t.string "name"
438
+ t.datetime "created_at"
439
+ t.datetime "updated_at"
440
+ end
441
+
442
+ create_table "spree_shipping_method_categories", force: true do |t|
443
+ t.integer "shipping_method_id", null: false
444
+ t.integer "shipping_category_id", null: false
445
+ t.datetime "created_at"
446
+ t.datetime "updated_at"
447
+ end
448
+
449
+ add_index "spree_shipping_method_categories", ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
450
+ add_index "spree_shipping_method_categories", ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
451
+
452
+ create_table "spree_shipping_methods", force: true do |t|
453
+ t.string "name"
454
+ t.string "display_on"
455
+ t.datetime "deleted_at"
456
+ t.datetime "created_at"
457
+ t.datetime "updated_at"
458
+ t.string "tracking_url"
459
+ t.string "admin_name"
460
+ end
461
+
462
+ create_table "spree_shipping_methods_zones", id: false, force: true do |t|
463
+ t.integer "shipping_method_id"
464
+ t.integer "zone_id"
465
+ end
466
+
467
+ create_table "spree_shipping_rates", force: true do |t|
468
+ t.integer "shipment_id"
469
+ t.integer "shipping_method_id"
470
+ t.boolean "selected", default: false
471
+ t.decimal "cost", precision: 8, scale: 2, default: 0.0
472
+ t.datetime "created_at"
473
+ t.datetime "updated_at"
474
+ end
475
+
476
+ add_index "spree_shipping_rates", ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
477
+
478
+ create_table "spree_skrill_transactions", force: true do |t|
479
+ t.string "email"
480
+ t.float "amount"
481
+ t.string "currency"
482
+ t.integer "transaction_id"
483
+ t.integer "customer_id"
484
+ t.string "payment_type"
485
+ t.datetime "created_at"
486
+ t.datetime "updated_at"
487
+ end
488
+
489
+ create_table "spree_state_changes", force: true do |t|
490
+ t.string "name"
491
+ t.string "previous_state"
492
+ t.integer "stateful_id"
493
+ t.integer "user_id"
494
+ t.string "stateful_type"
495
+ t.string "next_state"
496
+ t.datetime "created_at"
497
+ t.datetime "updated_at"
498
+ end
499
+
500
+ create_table "spree_states", force: true do |t|
501
+ t.string "name"
502
+ t.string "abbr"
503
+ t.integer "country_id"
504
+ t.datetime "updated_at"
505
+ end
506
+
507
+ create_table "spree_stock_items", force: true do |t|
508
+ t.integer "stock_location_id"
509
+ t.integer "variant_id"
510
+ t.integer "count_on_hand", default: 0, null: false
511
+ t.datetime "created_at"
512
+ t.datetime "updated_at"
513
+ t.boolean "backorderable", default: false
514
+ t.datetime "deleted_at"
515
+ end
516
+
517
+ add_index "spree_stock_items", ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
518
+ add_index "spree_stock_items", ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
519
+
520
+ create_table "spree_stock_locations", force: true do |t|
521
+ t.string "name"
522
+ t.datetime "created_at"
523
+ t.datetime "updated_at"
524
+ t.string "address1"
525
+ t.string "address2"
526
+ t.string "city"
527
+ t.integer "state_id"
528
+ t.string "state_name"
529
+ t.integer "country_id"
530
+ t.string "zipcode"
531
+ t.string "phone"
532
+ t.boolean "active", default: true
533
+ t.boolean "backorderable_default", default: false
534
+ t.boolean "propagate_all_variants", default: true
535
+ t.string "admin_name"
536
+ end
537
+
538
+ create_table "spree_stock_movements", force: true do |t|
539
+ t.integer "stock_item_id"
540
+ t.integer "quantity", default: 0
541
+ t.string "action"
542
+ t.datetime "created_at"
543
+ t.datetime "updated_at"
544
+ t.integer "originator_id"
545
+ t.string "originator_type"
546
+ end
547
+
548
+ add_index "spree_stock_movements", ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
549
+
550
+ create_table "spree_stock_transfers", force: true do |t|
551
+ t.string "type"
552
+ t.string "reference"
553
+ t.integer "source_location_id"
554
+ t.integer "destination_location_id"
555
+ t.datetime "created_at"
556
+ t.datetime "updated_at"
557
+ t.string "number"
558
+ end
559
+
560
+ add_index "spree_stock_transfers", ["destination_location_id"], name: "index_spree_stock_transfers_on_destination_location_id"
561
+ add_index "spree_stock_transfers", ["number"], name: "index_spree_stock_transfers_on_number"
562
+ add_index "spree_stock_transfers", ["source_location_id"], name: "index_spree_stock_transfers_on_source_location_id"
563
+
564
+ create_table "spree_tax_categories", force: true do |t|
565
+ t.string "name"
566
+ t.string "description"
567
+ t.boolean "is_default", default: false
568
+ t.datetime "deleted_at"
569
+ t.datetime "created_at"
570
+ t.datetime "updated_at"
571
+ end
572
+
573
+ create_table "spree_tax_rates", force: true do |t|
574
+ t.decimal "amount", precision: 8, scale: 5
575
+ t.integer "zone_id"
576
+ t.integer "tax_category_id"
577
+ t.boolean "included_in_price", default: false
578
+ t.datetime "created_at"
579
+ t.datetime "updated_at"
580
+ t.string "name"
581
+ t.boolean "show_rate_in_label", default: true
582
+ t.datetime "deleted_at"
583
+ end
584
+
585
+ create_table "spree_taxonomies", force: true do |t|
586
+ t.string "name", null: false
587
+ t.datetime "created_at"
588
+ t.datetime "updated_at"
589
+ t.integer "position", default: 0
590
+ end
591
+
592
+ create_table "spree_taxons", force: true do |t|
593
+ t.integer "parent_id"
594
+ t.integer "position", default: 0
595
+ t.string "name", null: false
596
+ t.string "permalink"
597
+ t.integer "taxonomy_id"
598
+ t.integer "lft"
599
+ t.integer "rgt"
600
+ t.string "icon_file_name"
601
+ t.string "icon_content_type"
602
+ t.integer "icon_file_size"
603
+ t.datetime "icon_updated_at"
604
+ t.text "description"
605
+ t.datetime "created_at"
606
+ t.datetime "updated_at"
607
+ t.string "meta_title"
608
+ t.string "meta_description"
609
+ t.string "meta_keywords"
610
+ t.integer "depth"
611
+ end
612
+
613
+ add_index "spree_taxons", ["parent_id"], name: "index_taxons_on_parent_id"
614
+ add_index "spree_taxons", ["permalink"], name: "index_taxons_on_permalink"
615
+ add_index "spree_taxons", ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
616
+
617
+ create_table "spree_tokenized_permissions", force: true do |t|
618
+ t.integer "permissable_id"
619
+ t.string "permissable_type"
620
+ t.string "token"
621
+ t.datetime "created_at"
622
+ t.datetime "updated_at"
623
+ end
624
+
625
+ add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], name: "index_tokenized_name_and_type"
626
+
627
+ create_table "spree_trackers", force: true do |t|
628
+ t.string "environment"
629
+ t.string "analytics_id"
630
+ t.boolean "active", default: true
631
+ t.datetime "created_at"
632
+ t.datetime "updated_at"
633
+ end
634
+
635
+ create_table "spree_users", force: true do |t|
636
+ t.string "encrypted_password", limit: 128
637
+ t.string "password_salt", limit: 128
638
+ t.string "email"
639
+ t.string "remember_token"
640
+ t.string "persistence_token"
641
+ t.string "reset_password_token"
642
+ t.string "perishable_token"
643
+ t.integer "sign_in_count", default: 0, null: false
644
+ t.integer "failed_attempts", default: 0, null: false
645
+ t.datetime "last_request_at"
646
+ t.datetime "current_sign_in_at"
647
+ t.datetime "last_sign_in_at"
648
+ t.string "current_sign_in_ip"
649
+ t.string "last_sign_in_ip"
650
+ t.string "login"
651
+ t.integer "ship_address_id"
652
+ t.integer "bill_address_id"
653
+ t.string "authentication_token"
654
+ t.string "unlock_token"
655
+ t.datetime "locked_at"
656
+ t.datetime "reset_password_sent_at"
657
+ t.datetime "created_at"
658
+ t.datetime "updated_at"
659
+ t.string "spree_api_key", limit: 48
660
+ t.datetime "remember_created_at"
661
+ end
662
+
663
+ add_index "spree_users", ["email"], name: "email_idx_unique", unique: true
664
+ add_index "spree_users", ["spree_api_key"], name: "index_spree_users_on_spree_api_key"
665
+
666
+ create_table "spree_variants", force: true do |t|
667
+ t.string "sku", default: "", null: false
668
+ t.decimal "weight", precision: 8, scale: 2
669
+ t.decimal "height", precision: 8, scale: 2
670
+ t.decimal "width", precision: 8, scale: 2
671
+ t.decimal "depth", precision: 8, scale: 2
672
+ t.datetime "deleted_at"
673
+ t.boolean "is_master", default: false
674
+ t.integer "product_id"
675
+ t.decimal "cost_price", precision: 8, scale: 2
676
+ t.integer "position"
677
+ t.string "cost_currency"
678
+ t.boolean "track_inventory", default: true
679
+ t.datetime "updated_at"
680
+ end
681
+
682
+ add_index "spree_variants", ["product_id"], name: "index_spree_variants_on_product_id"
683
+ add_index "spree_variants", ["sku"], name: "index_spree_variants_on_sku"
684
+
685
+ create_table "spree_zone_members", force: true do |t|
686
+ t.integer "zoneable_id"
687
+ t.string "zoneable_type"
688
+ t.integer "zone_id"
689
+ t.datetime "created_at"
690
+ t.datetime "updated_at"
691
+ end
692
+
693
+ create_table "spree_zones", force: true do |t|
694
+ t.string "name"
695
+ t.string "description"
696
+ t.boolean "default_tax", default: false
697
+ t.integer "zone_members_count", default: 0
698
+ t.datetime "created_at"
699
+ t.datetime "updated_at"
700
+ end
701
+
702
+ end