spree_core 2.1.12 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/spree/base_helper.rb +4 -7
  3. data/app/helpers/spree/products_helper.rb +11 -9
  4. data/app/helpers/spree/store_helper.rb +5 -0
  5. data/app/models/spree/ability.rb +4 -0
  6. data/app/models/spree/address.rb +6 -6
  7. data/app/models/spree/adjustment.rb +40 -61
  8. data/app/models/spree/app_configuration.rb +1 -14
  9. data/app/models/spree/calculator.rb +12 -4
  10. data/app/models/spree/calculator/default_tax.rb +42 -38
  11. data/app/models/spree/calculator/flat_percent_item_total.rb +2 -4
  12. data/app/models/spree/calculator/free_shipping.rb +5 -2
  13. data/app/models/spree/calculator/percent_on_line_item.rb +15 -0
  14. data/app/models/spree/calculator/percent_per_item.rb +3 -0
  15. data/app/models/spree/classification.rb +3 -2
  16. data/app/models/spree/credit_card.rb +7 -25
  17. data/app/models/spree/gateway/bogus.rb +5 -5
  18. data/app/models/spree/gateway/bogus_simple.rb +0 -8
  19. data/app/models/spree/image.rb +0 -9
  20. data/app/models/spree/inventory_unit.rb +10 -4
  21. data/app/models/spree/item_adjustments.rb +65 -0
  22. data/app/models/spree/legacy_user.rb +1 -0
  23. data/app/models/spree/line_item.rb +33 -13
  24. data/app/models/spree/option_type.rb +2 -2
  25. data/app/models/spree/option_value.rb +1 -1
  26. data/app/models/spree/order.rb +109 -89
  27. data/app/models/spree/order/checkout.rb +48 -0
  28. data/app/models/spree/order_contents.rb +72 -37
  29. data/app/models/spree/order_inventory.rb +65 -68
  30. data/app/models/spree/order_populator.rb +3 -17
  31. data/app/models/spree/order_updater.rb +63 -44
  32. data/app/models/spree/payment.rb +20 -5
  33. data/app/models/spree/payment/processing.rb +19 -25
  34. data/app/models/spree/payment_capture_event.rb +9 -0
  35. data/app/models/spree/payment_method/check.rb +0 -2
  36. data/app/models/spree/price.rb +1 -1
  37. data/app/models/spree/product.rb +14 -16
  38. data/app/models/spree/product/scopes.rb +4 -6
  39. data/app/models/spree/product_option_type.rb +2 -2
  40. data/app/models/spree/product_property.rb +2 -2
  41. data/app/models/spree/promotion.rb +71 -50
  42. data/app/models/spree/promotion/actions/create_adjustment.rb +31 -32
  43. data/app/models/spree/promotion/actions/create_item_adjustments.rb +83 -0
  44. data/app/models/spree/promotion/actions/free_shipping.rb +36 -0
  45. data/app/models/spree/promotion/rules/first_order.rb +4 -0
  46. data/app/models/spree/promotion/rules/item_total.rb +5 -1
  47. data/app/models/spree/promotion/rules/product.rb +4 -0
  48. data/app/models/spree/promotion/rules/user.rb +5 -6
  49. data/app/models/spree/promotion/rules/user_logged_in.rb +4 -0
  50. data/app/models/spree/promotion_action.rb +1 -5
  51. data/app/models/spree/promotion_handler/cart.rb +38 -0
  52. data/app/models/spree/promotion_handler/coupon.rb +76 -0
  53. data/app/models/spree/promotion_handler/free_shipping.rb +31 -0
  54. data/app/models/spree/promotion_handler/page.rb +24 -0
  55. data/app/models/spree/promotion_rule.rb +15 -7
  56. data/app/models/spree/property.rb +1 -1
  57. data/app/models/spree/return_authorization.rb +7 -1
  58. data/app/models/spree/shipment.rb +113 -49
  59. data/app/models/spree/shipping_calculator.rb +4 -5
  60. data/app/models/spree/shipping_category.rb +2 -2
  61. data/app/models/spree/shipping_method.rb +12 -6
  62. data/app/models/spree/shipping_rate.rb +27 -7
  63. data/app/models/spree/stock/availability_validator.rb +1 -1
  64. data/app/models/spree/stock/estimator.rb +13 -1
  65. data/app/models/spree/stock/package.rb +11 -7
  66. data/app/models/spree/stock/packer.rb +3 -3
  67. data/app/models/spree/stock/quantifier.rb +9 -1
  68. data/app/models/spree/stock_item.rb +11 -6
  69. data/app/models/spree/stock_movement.rb +1 -2
  70. data/app/models/spree/tax_category.rb +6 -1
  71. data/app/models/spree/tax_rate.rb +57 -49
  72. data/app/models/spree/taxon.rb +10 -5
  73. data/app/models/spree/taxonomy.rb +5 -2
  74. data/app/models/spree/variant.rb +33 -16
  75. data/app/models/spree/zone.rb +24 -24
  76. data/app/views/spree/shared/_routes.html.erb +3 -0
  77. data/config/locales/en.yml +42 -26
  78. data/db/migrate/20130213191427_create_default_stock.rb +3 -3
  79. data/db/migrate/20130413230529_add_name_to_spree_credit_cards.rb +5 -0
  80. data/db/migrate/20130414000512_update_name_fields_on_spree_credit_cards.rb +13 -0
  81. data/db/migrate/20130417120035_update_adjustment_states.rb +2 -2
  82. data/db/migrate/20130417123427_add_shipping_rates_to_shipments.rb +1 -1
  83. data/db/migrate/20130509115210_add_number_to_stock_transfer.rb +1 -1
  84. data/db/migrate/20130611054351_rename_shipping_methods_zones_to_spree_shipping_methods_zones.rb +0 -5
  85. data/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb +7 -5
  86. data/db/migrate/20130807024301_upgrade_adjustments.rb +39 -0
  87. data/db/migrate/20130807024302_rename_adjustment_fields.rb +17 -0
  88. data/db/migrate/20130813004002_add_shipment_total_to_spree_orders.rb +5 -0
  89. data/db/migrate/20130813232134_rename_activators_to_promotions.rb +5 -0
  90. data/db/migrate/20130815000406_add_adjustment_total_to_line_items.rb +5 -0
  91. data/db/migrate/20130815024413_add_adjustment_total_to_shipments.rb +5 -0
  92. data/db/migrate/20130828234942_add_tax_total_to_line_items_shipments_and_orders.rb +8 -0
  93. data/db/migrate/20130830001159_migrate_old_shipping_calculators.rb +1 -1
  94. data/db/migrate/20130903183026_add_code_to_spree_promotion_rules.rb +5 -0
  95. data/db/migrate/20130917024658_remove_promotions_event_name_field.rb +5 -0
  96. data/db/migrate/20130924040529_add_promo_total_to_line_items_and_shipments_and_orders.rb +7 -0
  97. data/db/migrate/20131001013410_remove_unused_credit_card_fields.rb +7 -3
  98. data/db/migrate/20131107132123_add_tax_category_to_variants.rb +6 -0
  99. data/db/migrate/20131118043959_add_included_to_adjustments.rb +5 -0
  100. data/db/migrate/20131118050234_rename_tax_total_fields.rb +11 -0
  101. data/db/migrate/20131118183431_add_line_item_id_to_spree_inventory_units.rb +21 -0
  102. data/db/migrate/20131127001002_add_position_to_classifications.rb +5 -0
  103. data/db/migrate/20131211112807_create_spree_orders_promotions.rb +8 -0
  104. data/db/migrate/20131218054603_add_item_count_to_spree_orders.rb +5 -0
  105. data/db/migrate/20140106224208_rename_permalink_to_slug_for_products.rb +5 -0
  106. data/db/migrate/20140124023232_rename_activator_id_in_rules_and_actions_to_promotion_id.rb +6 -0
  107. data/db/migrate/20140203161722_add_approver_id_and_approved_at_to_orders.rb +6 -0
  108. data/db/migrate/20140204115338_add_confirmation_delivered_to_spree_orders.rb +5 -0
  109. data/db/migrate/20140205120320_create_spree_payment_capture_events.rb +12 -0
  110. data/db/migrate/20140205144710_add_uncaptured_amount_to_payments.rb +5 -0
  111. data/db/migrate/20140207085910_add_tax_category_id_to_shipping_methods.rb +5 -0
  112. data/db/migrate/20140207093021_add_tax_rate_id_to_shipping_rates.rb +5 -0
  113. data/db/migrate/20140211040159_add_pre_tax_amount_to_line_items_and_shipments.rb +6 -0
  114. data/db/migrate/20140213184916_add_more_indexes.rb +13 -0
  115. data/db/migrate/20140219060952_add_considered_risky_to_orders.rb +5 -0
  116. data/lib/generators/spree/dummy/dummy_generator.rb +1 -6
  117. data/lib/generators/spree/install/install_generator.rb +6 -6
  118. data/lib/generators/spree/install/templates/{app/assets/javascripts/admin → vendor/assets/javascripts/spree/backend}/all.js +3 -3
  119. data/lib/generators/spree/install/templates/{app/assets/javascripts/store → vendor/assets/javascripts/spree/frontend}/all.js +3 -3
  120. data/lib/generators/spree/install/templates/{app/assets/stylesheets/store → vendor/assets/stylesheets/spree/backend}/all.css +3 -3
  121. data/lib/generators/spree/install/templates/{app/assets/stylesheets/admin → vendor/assets/stylesheets/spree/frontend}/all.css +3 -3
  122. data/lib/spree/core.rb +21 -8
  123. data/lib/spree/core/calculated_adjustments.rb +0 -40
  124. data/lib/spree/core/controller_helpers.rb +5 -0
  125. data/lib/spree/core/controller_helpers/auth.rb +2 -2
  126. data/lib/spree/core/controller_helpers/common.rb +0 -5
  127. data/lib/spree/core/controller_helpers/order.rb +8 -9
  128. data/lib/spree/core/engine.rb +10 -17
  129. data/lib/spree/core/permalinks.rb +1 -1
  130. data/lib/spree/core/product_duplicator.rb +3 -8
  131. data/lib/spree/core/user_address.rb +1 -1
  132. data/lib/spree/core/validators/email.rb +23 -1
  133. data/lib/spree/core/version.rb +1 -1
  134. data/lib/spree/money.rb +1 -1
  135. data/lib/spree/permitted_attributes.rb +2 -2
  136. data/lib/spree/testing_support/caching.rb +47 -0
  137. data/lib/spree/testing_support/factories/adjustment_factory.rb +11 -2
  138. data/lib/spree/testing_support/factories/credit_card_factory.rb +2 -1
  139. data/lib/spree/testing_support/factories/order_factory.rb +10 -5
  140. data/lib/spree/testing_support/factories/payment_factory.rb +2 -2
  141. data/lib/spree/testing_support/factories/payment_method_factory.rb +3 -3
  142. data/lib/spree/testing_support/factories/promotion_factory.rb +16 -1
  143. data/lib/spree/testing_support/factories/shipment_factory.rb +8 -4
  144. data/lib/spree/testing_support/factories/shipping_method_factory.rb +1 -3
  145. data/lib/spree/testing_support/factories/stock_factory.rb +1 -1
  146. data/lib/spree/testing_support/factories/tax_rate_factory.rb +2 -2
  147. data/lib/spree/testing_support/order_walkthrough.rb +1 -1
  148. data/lib/tasks/core.rake +2 -2
  149. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  150. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  151. data/vendor/assets/fonts/fontawesome-webfont.svg +399 -0
  152. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  153. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  154. data/vendor/assets/stylesheets/font-awesome.scss +1475 -0
  155. metadata +73 -44
  156. data/app/assets/javascripts/admin/handlebar_extensions.js +0 -9
  157. data/app/helpers/spree/admin/adjustments_helper.rb +0 -26
  158. data/app/helpers/spree/admin/images_helper.rb +0 -18
  159. data/app/helpers/spree/promotion_rules_helper.rb +0 -13
  160. data/app/models/spree/activator.rb +0 -29
  161. data/app/models/spree/calculator/per_item.rb +0 -41
  162. data/app/models/spree/stock/remaining_packer.rb +0 -22
  163. data/app/views/spree/payments/_payment.html.erb +0 -18
  164. data/db/migrate/20131118041203_add_tax_total_to_spree_orders.rb +0 -5
  165. data/db/migrate/20131118043021_add_order_id_to_spree_adjustments.rb +0 -6
  166. data/db/migrate/20131118074808_add_included_to_spree_adjustments.rb +0 -5
  167. data/db/migrate/20140415041315_add_user_id_created_by_id_index_to_order.rb +0 -5
  168. data/lib/spree/core/gateway_error.rb +0 -5
  169. data/lib/spree/core/preference_rescue.rb +0 -25
  170. data/lib/spree/core/s3_support.rb +0 -25
  171. data/lib/spree/promo/coupon_applicator.rb +0 -71
  172. data/lib/spree/testing_support/factories/activator_factory.rb +0 -8
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.12
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.43.1
19
+ version: 1.42.3
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: 1.43.1
26
+ version: 1.42.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: acts_as_list
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.16'
111
+ - !ruby/object:Gem::Dependency
112
+ name: friendly_id
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 5.0.3
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 5.0.3
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: highline
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -164,20 +178,6 @@ dependencies:
164
178
  - - "~>"
165
179
  - !ruby/object:Gem::Version
166
180
  version: 0.15.0
167
- - !ruby/object:Gem::Dependency
168
- name: monetize
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :runtime
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: paperclip
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -212,26 +212,26 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 4.0.12
215
+ version: 4.0.3
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 4.0.12
222
+ version: 4.0.3
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: ransack
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - '='
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
229
  version: 1.1.0
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - '='
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: 1.1.0
237
237
  - !ruby/object:Gem::Dependency
@@ -287,16 +287,12 @@ files:
287
287
  - app/assets/images/noimage/mini.png
288
288
  - app/assets/images/noimage/product.png
289
289
  - app/assets/images/noimage/small.png
290
- - app/assets/javascripts/admin/handlebar_extensions.js
291
290
  - app/assets/javascripts/spree.js.coffee
292
291
  - app/controllers/spree/base_controller.rb
293
- - app/helpers/spree/admin/adjustments_helper.rb
294
- - app/helpers/spree/admin/images_helper.rb
295
292
  - app/helpers/spree/base_helper.rb
296
293
  - app/helpers/spree/checkout_helper.rb
297
294
  - app/helpers/spree/orders_helper.rb
298
295
  - app/helpers/spree/products_helper.rb
299
- - app/helpers/spree/promotion_rules_helper.rb
300
296
  - app/helpers/spree/store_helper.rb
301
297
  - app/helpers/spree/taxons_helper.rb
302
298
  - app/mailers/spree/base_mailer.rb
@@ -304,7 +300,6 @@ files:
304
300
  - app/mailers/spree/shipment_mailer.rb
305
301
  - app/mailers/spree/test_mailer.rb
306
302
  - app/models/spree/ability.rb
307
- - app/models/spree/activator.rb
308
303
  - app/models/spree/address.rb
309
304
  - app/models/spree/adjustment.rb
310
305
  - app/models/spree/alert.rb
@@ -317,7 +312,7 @@ files:
317
312
  - app/models/spree/calculator/flat_rate.rb
318
313
  - app/models/spree/calculator/flexi_rate.rb
319
314
  - app/models/spree/calculator/free_shipping.rb
320
- - app/models/spree/calculator/per_item.rb
315
+ - app/models/spree/calculator/percent_on_line_item.rb
321
316
  - app/models/spree/calculator/percent_per_item.rb
322
317
  - app/models/spree/calculator/price_sack.rb
323
318
  - app/models/spree/calculator/shipping/flat_percent_item_total.rb
@@ -334,6 +329,7 @@ files:
334
329
  - app/models/spree/gateway/bogus_simple.rb
335
330
  - app/models/spree/image.rb
336
331
  - app/models/spree/inventory_unit.rb
332
+ - app/models/spree/item_adjustments.rb
337
333
  - app/models/spree/legacy_user.rb
338
334
  - app/models/spree/line_item.rb
339
335
  - app/models/spree/log_entry.rb
@@ -347,6 +343,7 @@ files:
347
343
  - app/models/spree/order_updater.rb
348
344
  - app/models/spree/payment.rb
349
345
  - app/models/spree/payment/processing.rb
346
+ - app/models/spree/payment_capture_event.rb
350
347
  - app/models/spree/payment_method.rb
351
348
  - app/models/spree/payment_method/check.rb
352
349
  - app/models/spree/preference.rb
@@ -362,7 +359,9 @@ files:
362
359
  - app/models/spree/product_scope/scopes.rb
363
360
  - app/models/spree/promotion.rb
364
361
  - app/models/spree/promotion/actions/create_adjustment.rb
362
+ - app/models/spree/promotion/actions/create_item_adjustments.rb
365
363
  - app/models/spree/promotion/actions/create_line_items.rb
364
+ - app/models/spree/promotion/actions/free_shipping.rb
366
365
  - app/models/spree/promotion/rules/first_order.rb
367
366
  - app/models/spree/promotion/rules/item_total.rb
368
367
  - app/models/spree/promotion/rules/product.rb
@@ -370,6 +369,10 @@ files:
370
369
  - app/models/spree/promotion/rules/user_logged_in.rb
371
370
  - app/models/spree/promotion_action.rb
372
371
  - app/models/spree/promotion_action_line_item.rb
372
+ - app/models/spree/promotion_handler/cart.rb
373
+ - app/models/spree/promotion_handler/coupon.rb
374
+ - app/models/spree/promotion_handler/free_shipping.rb
375
+ - app/models/spree/promotion_handler/page.rb
373
376
  - app/models/spree/promotion_rule.rb
374
377
  - app/models/spree/property.rb
375
378
  - app/models/spree/prototype.rb
@@ -393,7 +396,6 @@ files:
393
396
  - app/models/spree/stock/packer.rb
394
397
  - app/models/spree/stock/prioritizer.rb
395
398
  - app/models/spree/stock/quantifier.rb
396
- - app/models/spree/stock/remaining_packer.rb
397
399
  - app/models/spree/stock/splitter/backordered.rb
398
400
  - app/models/spree/stock/splitter/base.rb
399
401
  - app/models/spree/stock/splitter/shipping_category.rb
@@ -415,7 +417,6 @@ files:
415
417
  - app/views/spree/admin/orders/customer_details/_autocomplete.js.erb
416
418
  - app/views/spree/order_mailer/cancel_email.text.erb
417
419
  - app/views/spree/order_mailer/confirm_email.text.erb
418
- - app/views/spree/payments/_payment.html.erb
419
420
  - app/views/spree/shared/_error_messages.html.erb
420
421
  - app/views/spree/shared/_routes.html.erb
421
422
  - app/views/spree/shipment_mailer/shipped_email.text.erb
@@ -481,6 +482,8 @@ files:
481
482
  - db/migrate/20130328130308_update_shipment_state_for_canceled_orders.rb
482
483
  - db/migrate/20130328195253_add_seo_metas_to_taxons.rb
483
484
  - db/migrate/20130329134939_remove_stock_item_and_variant_lock.rb
485
+ - db/migrate/20130413230529_add_name_to_spree_credit_cards.rb
486
+ - db/migrate/20130414000512_update_name_fields_on_spree_credit_cards.rb
484
487
  - db/migrate/20130417120034_add_index_to_source_columns_on_adjustments.rb
485
488
  - db/migrate/20130417120035_update_adjustment_states.rb
486
489
  - db/migrate/20130417123427_add_shipping_rates_to_shipments.rb
@@ -508,27 +511,51 @@ files:
508
511
  - db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb
509
512
  - db/migrate/20130806022521_drop_spree_mail_methods.rb
510
513
  - db/migrate/20130806145853_set_default_stock_location_on_shipments.rb
514
+ - db/migrate/20130807024301_upgrade_adjustments.rb
515
+ - db/migrate/20130807024302_rename_adjustment_fields.rb
511
516
  - db/migrate/20130809164245_add_admin_name_column_to_spree_shipping_methods.rb
512
517
  - db/migrate/20130809164330_add_admin_name_column_to_spree_stock_locations.rb
518
+ - db/migrate/20130813004002_add_shipment_total_to_spree_orders.rb
513
519
  - db/migrate/20130813140619_expand_order_number_size.rb
520
+ - db/migrate/20130813232134_rename_activators_to_promotions.rb
521
+ - db/migrate/20130815000406_add_adjustment_total_to_line_items.rb
522
+ - db/migrate/20130815024413_add_adjustment_total_to_shipments.rb
514
523
  - db/migrate/20130826062534_add_depth_to_spree_taxons.rb
524
+ - db/migrate/20130828234942_add_tax_total_to_line_items_shipments_and_orders.rb
515
525
  - db/migrate/20130830001033_add_shipping_category_to_shipping_methods_and_products.rb
516
526
  - db/migrate/20130830001159_migrate_old_shipping_calculators.rb
527
+ - db/migrate/20130903183026_add_code_to_spree_promotion_rules.rb
517
528
  - db/migrate/20130909115621_change_states_required_for_countries.rb
518
529
  - db/migrate/20130915032339_add_deleted_at_to_spree_stock_items.rb
530
+ - db/migrate/20130917024658_remove_promotions_event_name_field.rb
531
+ - db/migrate/20130924040529_add_promo_total_to_line_items_and_shipments_and_orders.rb
519
532
  - db/migrate/20131001013410_remove_unused_credit_card_fields.rb
520
533
  - db/migrate/20131026154747_add_track_inventory_to_variant.rb
534
+ - db/migrate/20131107132123_add_tax_category_to_variants.rb
521
535
  - db/migrate/20131113035136_add_channel_to_spree_orders.rb
522
- - db/migrate/20131118041203_add_tax_total_to_spree_orders.rb
523
- - db/migrate/20131118043021_add_order_id_to_spree_adjustments.rb
524
- - db/migrate/20131118074808_add_included_to_spree_adjustments.rb
536
+ - db/migrate/20131118043959_add_included_to_adjustments.rb
537
+ - db/migrate/20131118050234_rename_tax_total_fields.rb
538
+ - db/migrate/20131118183431_add_line_item_id_to_spree_inventory_units.rb
525
539
  - db/migrate/20131120234456_add_updated_at_to_variants.rb
540
+ - db/migrate/20131127001002_add_position_to_classifications.rb
541
+ - db/migrate/20131211112807_create_spree_orders_promotions.rb
526
542
  - db/migrate/20131211192741_unique_shipping_method_categories.rb
543
+ - db/migrate/20131218054603_add_item_count_to_spree_orders.rb
544
+ - db/migrate/20140106224208_rename_permalink_to_slug_for_products.rb
527
545
  - db/migrate/20140120160805_add_index_to_variant_id_and_currency_on_prices.rb
546
+ - db/migrate/20140124023232_rename_activator_id_in_rules_and_actions_to_promotion_id.rb
528
547
  - db/migrate/20140129024326_add_deleted_at_to_spree_prices.rb
548
+ - db/migrate/20140203161722_add_approver_id_and_approved_at_to_orders.rb
549
+ - db/migrate/20140204115338_add_confirmation_delivered_to_spree_orders.rb
529
550
  - db/migrate/20140204192230_add_auto_capture_to_payment_methods.rb
551
+ - db/migrate/20140205120320_create_spree_payment_capture_events.rb
552
+ - db/migrate/20140205144710_add_uncaptured_amount_to_payments.rb
530
553
  - db/migrate/20140205181631_default_variant_weight_to_zero.rb
531
- - db/migrate/20140415041315_add_user_id_created_by_id_index_to_order.rb
554
+ - db/migrate/20140207085910_add_tax_category_id_to_shipping_methods.rb
555
+ - db/migrate/20140207093021_add_tax_rate_id_to_shipping_rates.rb
556
+ - db/migrate/20140211040159_add_pre_tax_amount_to_line_items_and_shipments.rb
557
+ - db/migrate/20140213184916_add_more_indexes.rb
558
+ - db/migrate/20140219060952_add_considered_risky_to_orders.rb
532
559
  - db/seeds.rb
533
560
  - lib/generators/spree/custom_user/custom_user_generator.rb
534
561
  - lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
@@ -543,11 +570,11 @@ files:
543
570
  - lib/generators/spree/dummy/templates/rails/script/rails
544
571
  - lib/generators/spree/dummy/templates/rails/test.rb
545
572
  - lib/generators/spree/install/install_generator.rb
546
- - lib/generators/spree/install/templates/app/assets/javascripts/admin/all.js
547
- - lib/generators/spree/install/templates/app/assets/javascripts/store/all.js
548
- - lib/generators/spree/install/templates/app/assets/stylesheets/admin/all.css
549
- - lib/generators/spree/install/templates/app/assets/stylesheets/store/all.css
550
573
  - lib/generators/spree/install/templates/config/initializers/spree.rb
574
+ - lib/generators/spree/install/templates/vendor/assets/javascripts/spree/backend/all.js
575
+ - lib/generators/spree/install/templates/vendor/assets/javascripts/spree/frontend/all.js
576
+ - lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/backend/all.css
577
+ - lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/frontend/all.css
551
578
  - lib/spree/core.rb
552
579
  - lib/spree/core/calculated_adjustments.rb
553
580
  - lib/spree/core/controller_helpers.rb
@@ -563,16 +590,13 @@ files:
563
590
  - lib/spree/core/environment.rb
564
591
  - lib/spree/core/environment/calculators.rb
565
592
  - lib/spree/core/environment_extension.rb
566
- - lib/spree/core/gateway_error.rb
567
593
  - lib/spree/core/mail_interceptor.rb
568
594
  - lib/spree/core/mail_method.rb
569
595
  - lib/spree/core/mail_settings.rb
570
596
  - lib/spree/core/permalinks.rb
571
- - lib/spree/core/preference_rescue.rb
572
597
  - lib/spree/core/product_duplicator.rb
573
598
  - lib/spree/core/product_filters.rb
574
599
  - lib/spree/core/routes.rb
575
- - lib/spree/core/s3_support.rb
576
600
  - lib/spree/core/search/base.rb
577
601
  - lib/spree/core/token_resource.rb
578
602
  - lib/spree/core/user_address.rb
@@ -584,18 +608,17 @@ files:
584
608
  - lib/spree/migrations.rb
585
609
  - lib/spree/money.rb
586
610
  - lib/spree/permitted_attributes.rb
587
- - lib/spree/promo/coupon_applicator.rb
588
611
  - lib/spree/promo/environment.rb
589
612
  - lib/spree/responder.rb
590
613
  - lib/spree/testing_support/ability_helpers.rb
591
614
  - lib/spree/testing_support/authorization_helpers.rb
592
615
  - lib/spree/testing_support/bar_ability.rb
616
+ - lib/spree/testing_support/caching.rb
593
617
  - lib/spree/testing_support/capybara_ext.rb
594
618
  - lib/spree/testing_support/common_rake.rb
595
619
  - lib/spree/testing_support/controller_requests.rb
596
620
  - lib/spree/testing_support/extension_rake.rb
597
621
  - lib/spree/testing_support/factories.rb
598
- - lib/spree/testing_support/factories/activator_factory.rb
599
622
  - lib/spree/testing_support/factories/address_factory.rb
600
623
  - lib/spree/testing_support/factories/adjustment_factory.rb
601
624
  - lib/spree/testing_support/factories/calculator_factory.rb
@@ -640,6 +663,11 @@ files:
640
663
  - lib/spree/testing_support/url_helpers.rb
641
664
  - lib/spree_core.rb
642
665
  - lib/tasks/core.rake
666
+ - vendor/assets/fonts/FontAwesome.otf
667
+ - vendor/assets/fonts/fontawesome-webfont.eot
668
+ - vendor/assets/fonts/fontawesome-webfont.svg
669
+ - vendor/assets/fonts/fontawesome-webfont.ttf
670
+ - vendor/assets/fonts/fontawesome-webfont.woff
643
671
  - vendor/assets/javascripts/jquery-migrate-1.0.0.js
644
672
  - vendor/assets/javascripts/jquery.payment.js
645
673
  - vendor/assets/javascripts/jquery.validate/localization/messages_et.js
@@ -656,6 +684,7 @@ files:
656
684
  - vendor/assets/javascripts/jquery.validate/localization/messages_zh.js
657
685
  - vendor/assets/javascripts/jquery.validate/localization/messages_zh_TW.js
658
686
  - vendor/assets/javascripts/jsuri.js
687
+ - vendor/assets/stylesheets/font-awesome.scss
659
688
  - vendor/assets/stylesheets/normalize.css
660
689
  - vendor/assets/stylesheets/skeleton.css
661
690
  homepage: http://spreecommerce.com
@@ -678,7 +707,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
678
707
  version: '0'
679
708
  requirements: []
680
709
  rubyforge_project:
681
- rubygems_version: 2.2.2
710
+ rubygems_version: 2.2.0
682
711
  signing_key:
683
712
  specification_version: 4
684
713
  summary: The bare bones necessary for Spree.
@@ -1,9 +0,0 @@
1
- //= require handlebars
2
- Handlebars.registerHelper("t", function(key) {
3
- if (Spree.translations[key]) {
4
- return Spree.translations[key]
5
- } else {
6
- console.error("No translation found for " + key + ". Does it exist within spree/admin/shared/_translations.html.erb?")
7
- }
8
- });
9
-
@@ -1,26 +0,0 @@
1
- module Spree
2
- module Admin
3
- module AdjustmentsHelper
4
- def link_to_toggle_adjustment_state(order, adjustment, options={})
5
- return if adjustment.finalized?
6
- icon = { closed: 'icon-unlock', open: 'icon-lock' }
7
- alt_text = adjustment.immutable? ? Spree.t(:open) : Spree.t(:close)
8
- link_to_with_icon(icon[adjustment.state.to_sym], alt_text, toggle_state_admin_order_adjustment_url(order, adjustment), options)
9
- end
10
-
11
- def adjustment_state(adjustment)
12
- state = adjustment.state.to_sym
13
- if adjustment.finalized?
14
- Spree.t(state)
15
- else
16
- icon_for(state)
17
- end
18
- end
19
-
20
- def icon_for(adjustment_state)
21
- icon = { closed: 'icon-lock', open: 'icon-unlock' }
22
- content_tag(:span, '', class: icon[adjustment_state])
23
- end
24
- end
25
- end
26
- end
@@ -1,18 +0,0 @@
1
- module Spree
2
- module Admin
3
- module ImagesHelper
4
- def options_text_for(image)
5
- if image.viewable.is_a?(Spree::Variant)
6
- if image.viewable.is_master?
7
- Spree.t(:all)
8
- else
9
- image.viewable.sku_and_options_text
10
- end
11
- else
12
- Spree.t(:all)
13
- end
14
- end
15
- end
16
- end
17
- end
18
-
@@ -1,13 +0,0 @@
1
- module Spree
2
- module PromotionRulesHelper
3
-
4
- def options_for_promotion_rule_types(promotion)
5
- existing = promotion.rules.map { |rule| rule.class.name }
6
- rule_names = Rails.application.config.spree.promotions.rules.map(&:name).reject{ |r| existing.include? r }
7
- options = rule_names.map { |name| [ Spree.t("promotion_rule_types.#{name.demodulize.underscore}.name"), name] }
8
- options_for_select(options)
9
- end
10
-
11
- end
12
- end
13
-
@@ -1,29 +0,0 @@
1
- module Spree
2
- class Activator < ActiveRecord::Base
3
- cattr_accessor :event_names
4
-
5
- self.event_names = [
6
- 'spree.cart.add',
7
- 'spree.order.contents_changed',
8
- 'spree.user.signup'
9
- ]
10
-
11
- def self.register_event_name(name)
12
- self.event_names << name
13
- end
14
-
15
- scope :event_name_starts_with, ->(name) { where('event_name LIKE ?', "#{name}%") }
16
-
17
- def self.active
18
- where('starts_at IS NULL OR starts_at < ?', Time.now).
19
- where('expires_at IS NULL OR expires_at > ?', Time.now)
20
- end
21
-
22
- def activate(payload)
23
- end
24
-
25
- def expired?
26
- starts_at && Time.now < starts_at || expires_at && Time.now > expires_at
27
- end
28
- end
29
- end
@@ -1,41 +0,0 @@
1
- require_dependency 'spree/calculator'
2
-
3
- module Spree
4
- class Calculator::PerItem < Calculator
5
- preference :amount, :decimal, default: 0
6
- preference :currency, :string, default: Spree::Config[:currency]
7
-
8
- def self.description
9
- Spree.t(:flat_rate_per_item)
10
- end
11
-
12
- def compute(object=nil)
13
- return 0 if object.nil?
14
- self.preferred_amount * object.line_items.reduce(0) do |sum, value|
15
- if matching_products.blank? || matching_products.include?(value.product)
16
- value_to_add = value.quantity
17
- else
18
- value_to_add = 0
19
- end
20
- sum + value_to_add
21
- end
22
- end
23
-
24
- # Returns all products that match this calculator, but only if the calculator
25
- # is attached to a promotion. If attached to a ShippingMethod, nil is returned.
26
- def matching_products
27
- # Regression check for #1596
28
- # Calculator::PerItem can be used in two cases.
29
- # The first is in a typical promotion, providing a discount per item of a particular item
30
- # The second is a ShippingMethod, where it applies to an entire order
31
- #
32
- # Shipping methods do not have promotions attached, but promotions do
33
- # Therefore we must check for promotions
34
- if self.calculable.respond_to?(:promotion)
35
- self.calculable.promotion.rules.map do |rule|
36
- rule.respond_to?(:products) ? rule.products : []
37
- end.flatten
38
- end
39
- end
40
- end
41
- end