solidus_core 1.1.4 → 1.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/logo/solidus_logo.png +0 -0
  3. data/app/helpers/spree/base_helper.rb +2 -3
  4. data/app/models/concerns/spree/adjustment_source.rb +1 -1
  5. data/app/models/concerns/spree/default_price.rb +3 -1
  6. data/app/models/concerns/spree/named_type.rb +1 -1
  7. data/app/models/concerns/spree/user_methods.rb +10 -0
  8. data/app/models/spree/adjustment.rb +1 -1
  9. data/app/models/spree/adjustment_reason.rb +2 -4
  10. data/app/models/spree/app_configuration.rb +36 -0
  11. data/app/models/spree/base.rb +10 -1
  12. data/app/models/spree/calculator/tiered_percent.rb +2 -1
  13. data/app/models/spree/classification.rb +1 -1
  14. data/app/models/spree/country.rb +3 -3
  15. data/app/models/spree/credit_card.rb +2 -2
  16. data/app/models/spree/customer_return.rb +3 -4
  17. data/app/models/spree/inventory_unit.rb +13 -24
  18. data/app/models/spree/item_adjustments.rb +5 -5
  19. data/app/models/spree/line_item.rb +6 -15
  20. data/app/models/spree/log_entry.rb +1 -1
  21. data/app/models/spree/option_type.rb +4 -2
  22. data/app/models/spree/option_type_prototype.rb +6 -0
  23. data/app/models/spree/option_value.rb +1 -1
  24. data/app/models/spree/order.rb +18 -63
  25. data/app/models/spree/order/checkout.rb +4 -2
  26. data/app/models/spree/order_cancellations.rb +52 -1
  27. data/app/models/spree/order_contents.rb +1 -1
  28. data/app/models/spree/order_merger.rb +143 -0
  29. data/app/models/spree/order_shipping.rb +3 -3
  30. data/app/models/spree/order_update_attributes.rb +42 -0
  31. data/app/models/spree/order_updater.rb +1 -1
  32. data/app/models/spree/payment.rb +16 -10
  33. data/app/models/spree/payment_create.rb +68 -0
  34. data/app/models/spree/payment_method.rb +0 -1
  35. data/app/models/spree/preference.rb +1 -1
  36. data/app/models/spree/price.rb +1 -8
  37. data/app/models/spree/product.rb +9 -44
  38. data/app/models/spree/product/scopes.rb +9 -7
  39. data/app/models/spree/promotion/rules/nth_order.rb +1 -1
  40. data/app/models/spree/promotion/rules/taxon.rb +2 -1
  41. data/app/models/spree/promotion_chooser.rb +1 -0
  42. data/app/models/spree/promotion_code.rb +1 -1
  43. data/app/models/spree/promotion_rule_taxon.rb +6 -0
  44. data/app/models/spree/property.rb +2 -1
  45. data/app/models/spree/property_prototype.rb +6 -0
  46. data/app/models/spree/prototype.rb +6 -2
  47. data/app/models/spree/reimbursement.rb +10 -0
  48. data/app/models/spree/return_item/eligibility_validator/time_since_purchase.rb +1 -1
  49. data/app/models/spree/return_reason.rb +1 -7
  50. data/app/models/spree/role_user.rb +3 -5
  51. data/app/models/spree/shipment.rb +6 -11
  52. data/app/models/spree/shipping_method.rb +1 -7
  53. data/app/models/spree/shipping_rate.rb +3 -14
  54. data/app/models/spree/stock/coordinator.rb +48 -4
  55. data/app/models/spree/stock/estimator.rb +3 -6
  56. data/app/models/spree/stock/packer.rb +18 -2
  57. data/app/models/spree/stock/shipping_rate_selector.rb +16 -0
  58. data/app/models/spree/stock/shipping_rate_sorter.rb +16 -0
  59. data/app/models/spree/stock_item.rb +19 -15
  60. data/app/models/spree/stock_location.rb +2 -12
  61. data/app/models/spree/stock_transfer.rb +3 -3
  62. data/app/models/spree/store_credit.rb +2 -2
  63. data/app/models/spree/tax_category.rb +3 -2
  64. data/app/models/spree/tax_rate.rb +7 -14
  65. data/app/models/spree/taxon.rb +4 -1
  66. data/app/models/spree/taxonomy.rb +1 -1
  67. data/app/models/spree/transfer_item.rb +2 -2
  68. data/app/models/spree/unit_cancel.rb +2 -0
  69. data/app/models/spree/variant.rb +9 -14
  70. data/app/models/spree/zone.rb +6 -0
  71. data/app/models/spree/zone_member.rb +1 -4
  72. data/app/views/spree/order_mailer/cancel_email.text.erb +0 -0
  73. data/config/locales/en.yml +7 -5
  74. data/db/default/spree/countries.rb +1 -1
  75. data/db/default/spree/zones.rb +5 -11
  76. data/db/migrate/20130213191427_create_default_stock.rb +1 -1
  77. data/db/migrate/20130306181701_add_address_fields_to_stock_location.rb +1 -1
  78. data/db/migrate/20140309033438_create_store_from_preferences.rb +5 -2
  79. data/db/migrate/20141009204607_add_store_id_to_orders.rb +6 -2
  80. data/db/migrate/20141215235502_remove_extra_products_slug_index.rb +5 -0
  81. data/db/migrate/20141217215630_update_product_slug_index.rb +6 -0
  82. data/db/migrate/20150225205344_move_promotion_code_to_promotion_code_value.rb +2 -2
  83. data/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb +10 -0
  84. data/db/migrate/20151117063249_convert_habtm_to_hmt_for_properties_prototypes.rb +17 -0
  85. data/db/migrate/20151124062500_convert_habtm_to_hmt_for_option_type_prototypes.rb +17 -0
  86. data/db/migrate/20151126063028_convert_habtm_to_hmt_for_taxons_promotion_rules.rb +15 -0
  87. data/db/migrate/20151219020209_add_stock_item_unique_index.rb +9 -0
  88. data/lib/generators/spree/dummy/dummy_generator.rb +1 -1
  89. data/lib/generators/spree/dummy/templates/rails/database.yml +1 -1
  90. data/lib/generators/spree/install/templates/config/initializers/spree.rb +25 -1
  91. data/lib/generators/spree/install/templates/vendor/assets/javascripts/spree/backend/all.js +3 -0
  92. data/lib/generators/spree/install/templates/vendor/assets/javascripts/spree/frontend/all.js +3 -0
  93. data/lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/backend/all.css +3 -0
  94. data/lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +3 -0
  95. data/lib/spree/core/controller_helpers/common.rb +1 -1
  96. data/lib/spree/core/controller_helpers/order.rb +1 -1
  97. data/lib/spree/core/controller_helpers/payment_parameters.rb +104 -5
  98. data/lib/spree/core/engine.rb +3 -2
  99. data/lib/spree/core/stock_configuration.rb +11 -0
  100. data/lib/spree/core/unreturned_item_charger.rb +4 -4
  101. data/lib/spree/core/version.rb +9 -1
  102. data/lib/spree/permission_sets/restricted_stock_transfer_management.rb +15 -24
  103. data/lib/spree/permitted_attributes.rb +3 -1
  104. data/lib/spree/testing_support/capybara_ext.rb +14 -40
  105. data/lib/spree/testing_support/factories.rb +0 -15
  106. data/lib/spree/testing_support/factories/address_factory.rb +3 -0
  107. data/lib/spree/testing_support/factories/adjustment_factory.rb +9 -1
  108. data/lib/spree/testing_support/factories/carton_factory.rb +4 -1
  109. data/lib/spree/testing_support/factories/customer_return_factory.rb +4 -0
  110. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +5 -0
  111. data/lib/spree/testing_support/factories/line_item_factory.rb +3 -0
  112. data/lib/spree/testing_support/factories/option_type_factory.rb +6 -0
  113. data/lib/spree/testing_support/factories/{options_factory.rb → option_value_factory.rb} +0 -5
  114. data/lib/spree/testing_support/factories/order_factory.rb +13 -3
  115. data/lib/spree/testing_support/factories/order_promotion_factory.rb +3 -0
  116. data/lib/spree/testing_support/factories/payment_factory.rb +13 -5
  117. data/lib/spree/testing_support/factories/price_factory.rb +2 -0
  118. data/lib/spree/testing_support/factories/product_factory.rb +7 -1
  119. data/lib/spree/testing_support/factories/product_option_type_factory.rb +3 -0
  120. data/lib/spree/testing_support/factories/product_property_factory.rb +3 -0
  121. data/lib/spree/testing_support/factories/promotion_code_factory.rb +3 -0
  122. data/lib/spree/testing_support/factories/promotion_factory.rb +3 -0
  123. data/lib/spree/testing_support/factories/prototype_factory.rb +2 -0
  124. data/lib/spree/testing_support/factories/refund_factory.rb +10 -5
  125. data/lib/spree/testing_support/factories/refund_reason_factory.rb +5 -0
  126. data/lib/spree/testing_support/factories/reimbursement_factory.rb +2 -0
  127. data/lib/spree/testing_support/factories/return_authorization_factory.rb +4 -4
  128. data/lib/spree/testing_support/factories/return_item_factory.rb +4 -0
  129. data/lib/spree/testing_support/factories/return_reason_factory.rb +5 -0
  130. data/lib/spree/testing_support/factories/shipment_factory.rb +6 -1
  131. data/lib/spree/testing_support/factories/shipping_method_factory.rb +22 -10
  132. data/lib/spree/testing_support/factories/shipping_rate_factory.rb +9 -0
  133. data/lib/spree/testing_support/factories/state_factory.rb +2 -0
  134. data/lib/spree/testing_support/factories/stock_item_factory.rb +4 -1
  135. data/lib/spree/testing_support/factories/stock_location_factory.rb +8 -0
  136. data/lib/spree/testing_support/factories/stock_movement_factory.rb +2 -0
  137. data/lib/spree/testing_support/factories/{stock_factory.rb → stock_package_factory.rb} +5 -10
  138. data/lib/spree/testing_support/factories/stock_packer_factory.rb +13 -0
  139. data/lib/spree/testing_support/factories/stock_transfer_factory.rb +2 -2
  140. data/lib/spree/testing_support/factories/store_credit_event_factory.rb +4 -1
  141. data/lib/spree/testing_support/factories/store_credit_factory.rb +10 -6
  142. data/lib/spree/testing_support/factories/tax_category_factory.rb +2 -0
  143. data/lib/spree/testing_support/factories/tax_rate_factory.rb +4 -0
  144. data/lib/spree/testing_support/factories/taxon_factory.rb +2 -0
  145. data/lib/spree/testing_support/factories/user_factory.rb +6 -2
  146. data/lib/spree/testing_support/factories/variant_factory.rb +5 -0
  147. data/lib/spree/testing_support/factories/variant_property_rule_condition_factory.rb +3 -0
  148. data/lib/spree/testing_support/factories/variant_property_rule_factory.rb +4 -0
  149. data/lib/spree/testing_support/factories/variant_property_rule_value_factory.rb +3 -0
  150. data/lib/spree/testing_support/factories/zone_factory.rb +6 -0
  151. data/lib/spree/testing_support/sequences.rb +9 -0
  152. data/lib/tasks/exchanges.rake +4 -3
  153. data/lib/tasks/migrations/copy_shipped_shipments_to_cartons.rake +2 -2
  154. data/solidus_core.gemspec +4 -5
  155. data/spec/helpers/base_helper_spec.rb +6 -6
  156. data/spec/helpers/order_helper_spec.rb +1 -1
  157. data/spec/helpers/products_helper_spec.rb +2 -2
  158. data/spec/helpers/taxons_helper_spec.rb +1 -1
  159. data/spec/lib/spree/core/controller_helpers/payment_parameters_spec.rb +107 -7
  160. data/spec/lib/spree/core/importer/order_spec.rb +1 -1
  161. data/spec/lib/spree/core/stock_configuration_spec.rb +16 -0
  162. data/spec/lib/spree/core/testing_support/factories/address_factory_spec.rb +24 -0
  163. data/spec/lib/spree/core/testing_support/factories/adjustment_factory_spec.rb +18 -0
  164. data/spec/lib/spree/core/testing_support/factories/adjustment_reason_factory_spec.rb +12 -0
  165. data/spec/lib/spree/core/testing_support/factories/calculator_factory_spec.rb +42 -0
  166. data/spec/lib/spree/core/testing_support/factories/carton_factory_spec.rb +12 -0
  167. data/spec/lib/spree/core/testing_support/factories/country_factory_spec.rb +12 -0
  168. data/spec/lib/spree/core/testing_support/factories/credit_card_factory_spec.rb +12 -0
  169. data/spec/lib/spree/core/testing_support/factories/customer_return_factory_spec.rb +28 -0
  170. data/spec/lib/spree/core/testing_support/factories/image_factory_spec.rb +12 -0
  171. data/spec/lib/spree/core/testing_support/factories/inventory_unit_factory_spec.rb +12 -0
  172. data/spec/lib/spree/core/testing_support/factories/line_item_factory_spec.rb +12 -0
  173. data/spec/lib/spree/core/testing_support/factories/option_type_factory_spec.rb +12 -0
  174. data/spec/lib/spree/core/testing_support/factories/option_value_factory_spec.rb +12 -0
  175. data/spec/lib/spree/core/testing_support/factories/order_factory_spec.rb +49 -0
  176. data/spec/lib/spree/core/testing_support/factories/order_promotion_factory_spec.rb +12 -0
  177. data/spec/lib/spree/core/testing_support/factories/payment_factory_spec.rb +24 -0
  178. data/spec/lib/spree/core/testing_support/factories/payment_method_factory_spec.rb +30 -0
  179. data/spec/lib/spree/core/testing_support/factories/price_factory_spec.rb +12 -0
  180. data/spec/lib/spree/core/testing_support/factories/product_factory_spec.rb +30 -0
  181. data/spec/lib/spree/core/testing_support/factories/product_option_type_factory_spec.rb +12 -0
  182. data/spec/lib/spree/core/testing_support/factories/product_property_factory_spec.rb +12 -0
  183. data/spec/lib/spree/core/testing_support/factories/promotion_category_factory_spec.rb +12 -0
  184. data/spec/lib/spree/core/testing_support/factories/promotion_code_factory_spec.rb +12 -0
  185. data/spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb +30 -0
  186. data/spec/lib/spree/core/testing_support/factories/property_factory_spec.rb +12 -0
  187. data/spec/lib/spree/core/testing_support/factories/prototype_factory_spec.rb +12 -0
  188. data/spec/lib/spree/core/testing_support/factories/refund_factory_spec.rb +12 -0
  189. data/spec/lib/spree/core/testing_support/factories/refund_reason_factory_spec.rb +12 -0
  190. data/spec/lib/spree/core/testing_support/factories/reimbursement_factory_spec.rb +12 -0
  191. data/spec/lib/spree/core/testing_support/factories/reimbursement_type_factory_spec.rb +12 -0
  192. data/spec/lib/spree/core/testing_support/factories/return_authorization_factory_spec.rb +12 -0
  193. data/spec/lib/spree/core/testing_support/factories/return_item_factory_spec.rb +18 -0
  194. data/spec/lib/spree/core/testing_support/factories/return_reason_factory_spec.rb +12 -0
  195. data/spec/lib/spree/core/testing_support/factories/role_factory_spec.rb +18 -0
  196. data/spec/lib/spree/core/testing_support/factories/shipment_factory_spec.rb +12 -0
  197. data/spec/lib/spree/core/testing_support/factories/shipping_category_factory_spec.rb +12 -0
  198. data/spec/lib/spree/core/testing_support/factories/shipping_method_factory_spec.rb +28 -0
  199. data/spec/lib/spree/core/testing_support/factories/shipping_rate_factory_spec.rb +12 -0
  200. data/spec/lib/spree/core/testing_support/factories/state_factory_spec.rb +12 -0
  201. data/spec/lib/spree/core/testing_support/factories/stock_item_factory_spec.rb +12 -0
  202. data/spec/lib/spree/core/testing_support/factories/stock_location_factory_spec.rb +24 -0
  203. data/spec/lib/spree/core/testing_support/factories/stock_movement_factory_spec.rb +12 -0
  204. data/spec/lib/spree/core/testing_support/factories/stock_package_factory_spec.rb +26 -0
  205. data/spec/lib/spree/core/testing_support/factories/stock_packer_factory_spec.rb +16 -0
  206. data/spec/lib/spree/core/testing_support/factories/stock_transfer_factory_spec.rb +12 -0
  207. data/spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb +12 -0
  208. data/spec/lib/spree/core/testing_support/factories/store_credit_event_factory_spec.rb +42 -0
  209. data/spec/lib/spree/core/testing_support/factories/store_credit_factory_spec.rb +12 -0
  210. data/spec/lib/spree/core/testing_support/factories/store_credit_type_factory_spec.rb +18 -0
  211. data/spec/lib/spree/core/testing_support/factories/store_credit_update_reason_factory_spec.rb +12 -0
  212. data/spec/lib/spree/core/testing_support/factories/store_factory_spec.rb +12 -0
  213. data/spec/lib/spree/core/testing_support/factories/tax_category_factory_spec.rb +12 -0
  214. data/spec/lib/spree/core/testing_support/factories/tax_rate_factory_spec.rb +12 -0
  215. data/spec/lib/spree/core/testing_support/factories/taxon_factory_spec.rb +12 -0
  216. data/spec/lib/spree/core/testing_support/factories/taxonomy_factory_spec.rb +12 -0
  217. data/spec/lib/spree/core/testing_support/factories/tracker_factory_spec.rb +12 -0
  218. data/spec/lib/spree/core/testing_support/factories/user_factory_spec.rb +22 -0
  219. data/spec/lib/spree/core/testing_support/factories/variant_factory_spec.rb +36 -0
  220. data/spec/lib/spree/core/testing_support/factories/variant_property_rule_condition_factory_spec.rb +12 -0
  221. data/spec/lib/spree/core/testing_support/factories/variant_property_rule_factory_spec.rb +12 -0
  222. data/spec/lib/spree/core/testing_support/factories/variant_property_rule_value_factory_spec.rb +12 -0
  223. data/spec/lib/spree/core/testing_support/factories/zone_factory_spec.rb +18 -0
  224. data/spec/lib/spree/core/unreturned_item_charger_spec.rb +1 -1
  225. data/spec/lib/spree/core/version_spec.rb +17 -0
  226. data/spec/lib/spree/money_spec.rb +1 -1
  227. data/spec/mailers/carton_mailer_spec.rb +1 -1
  228. data/spec/mailers/order_mailer_spec.rb +1 -1
  229. data/spec/mailers/reimbursement_mailer_spec.rb +1 -3
  230. data/spec/mailers/test_mailer_spec.rb +1 -3
  231. data/spec/models/spree/address_spec.rb +4 -4
  232. data/spec/models/spree/adjustment_reason_spec.rb +1 -3
  233. data/spec/models/spree/app_configuration_spec.rb +4 -0
  234. data/spec/models/spree/calculator/price_sack_spec.rb +3 -3
  235. data/spec/models/spree/calculator/shipping/price_sack_spec.rb +3 -3
  236. data/spec/models/spree/calculator/tiered_percent_spec.rb +86 -10
  237. data/spec/models/spree/carton_spec.rb +3 -1
  238. data/spec/models/spree/classification_spec.rb +3 -3
  239. data/spec/models/spree/credit_card_spec.rb +16 -16
  240. data/spec/models/spree/customer_return_spec.rb +1 -1
  241. data/spec/models/spree/gateway/bogus_simple.rb +1 -1
  242. data/spec/models/spree/inventory_unit_spec.rb +3 -3
  243. data/spec/models/spree/item_adjustments_spec.rb +1 -1
  244. data/spec/models/spree/line_item_spec.rb +2 -2
  245. data/spec/models/spree/option_type_spec.rb +2 -2
  246. data/spec/models/spree/option_value_spec.rb +2 -2
  247. data/spec/models/spree/order/callbacks_spec.rb +1 -1
  248. data/spec/models/spree/order/checkout_spec.rb +16 -11
  249. data/spec/models/spree/order/payment_spec.rb +24 -22
  250. data/spec/models/spree/order/state_machine_spec.rb +1 -1
  251. data/spec/models/spree/order/validations_spec.rb +1 -1
  252. data/spec/models/spree/order_cancellations_spec.rb +63 -0
  253. data/spec/models/spree/order_contents_spec.rb +1 -1
  254. data/spec/models/spree/order_merger_spec.rb +133 -0
  255. data/spec/models/spree/order_spec.rb +39 -159
  256. data/spec/models/spree/order_update_attributes_spec.rb +82 -0
  257. data/spec/models/spree/order_updater_spec.rb +6 -4
  258. data/spec/models/spree/payment_create_spec.rb +131 -0
  259. data/spec/models/spree/payment_spec.rb +130 -48
  260. data/spec/models/spree/permission_sets/restricted_stock_transfer_management_spec.rb +91 -33
  261. data/spec/models/spree/product_filter_spec.rb +3 -3
  262. data/spec/models/spree/product_spec.rb +80 -26
  263. data/spec/models/spree/promotion/actions/create_adjustment_spec.rb +1 -1
  264. data/spec/models/spree/promotion/actions/create_item_adjustments_spec.rb +2 -2
  265. data/spec/models/spree/promotion/rules/nth_order_spec.rb +1 -1
  266. data/spec/models/spree/promotion/rules/user_spec.rb +2 -2
  267. data/spec/models/spree/promotion_handler/coupon_spec.rb +2 -2
  268. data/spec/models/spree/promotion_spec.rb +18 -18
  269. data/spec/models/spree/reimbursement_spec.rb +22 -0
  270. data/spec/models/spree/return_item_spec.rb +2 -2
  271. data/spec/models/spree/shipment_spec.rb +28 -12
  272. data/spec/models/spree/shipping_method_spec.rb +2 -2
  273. data/spec/models/spree/shipping_rate_spec.rb +3 -3
  274. data/spec/models/spree/stock/coordinator_spec.rb +5 -0
  275. data/spec/models/spree/stock/estimator_spec.rb +35 -1
  276. data/spec/models/spree/stock/package_spec.rb +1 -1
  277. data/spec/models/spree/stock/packer_spec.rb +2 -3
  278. data/spec/models/spree/stock/shipping_rate_selector_spec.rb +16 -0
  279. data/spec/models/spree/stock/shipping_rate_sorter_spec.rb +16 -0
  280. data/spec/models/spree/stock_item_spec.rb +5 -7
  281. data/spec/models/spree/stock_location_spec.rb +5 -9
  282. data/spec/models/spree/stock_transfer_spec.rb +33 -13
  283. data/spec/models/spree/store_credit_event_spec.rb +1 -1
  284. data/spec/models/spree/store_credit_spec.rb +1 -1
  285. data/spec/models/spree/tax_rate_spec.rb +381 -120
  286. data/spec/models/spree/taxon_spec.rb +3 -3
  287. data/spec/models/spree/transfer_item_spec.rb +4 -4
  288. data/spec/models/spree/unit_cancel_spec.rb +1 -1
  289. data/spec/models/spree/variant_spec.rb +3 -3
  290. data/spec/models/spree/zone_spec.rb +35 -1
  291. data/spec/support/concerns/working_factories.rb +9 -0
  292. data/vendor/assets/javascripts/jquery-migrate-1.0.0.js +498 -0
  293. data/vendor/assets/javascripts/jquery.payment.js +231 -80
  294. metadata +103 -27
  295. data/app/models/spree/order/currency_updater.rb +0 -40
  296. data/spec/models/spree/order/currency_updater_spec.rb +0 -32
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2016-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.10'
83
- - !ruby/object:Gem::Dependency
84
- name: deface
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 1.0.0
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 1.0.0
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: ffaker
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +114,14 @@ dependencies:
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 5.0.4
117
+ version: '5.0'
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: 5.0.4
124
+ version: '5.0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: highline
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -218,14 +204,14 @@ dependencies:
218
204
  requirements:
219
205
  - - "~>"
220
206
  - !ruby/object:Gem::Version
221
- version: 2.1.0
207
+ version: 2.1.4
222
208
  type: :runtime
223
209
  prerelease: false
224
210
  version_requirements: !ruby/object:Gem::Requirement
225
211
  requirements:
226
212
  - - "~>"
227
213
  - !ruby/object:Gem::Version
228
- version: 2.1.0
214
+ version: 2.1.4
229
215
  - !ruby/object:Gem::Dependency
230
216
  name: premailer-rails
231
217
  requirement: !ruby/object:Gem::Requirement
@@ -447,24 +433,27 @@ files:
447
433
  - app/models/spree/line_item_action.rb
448
434
  - app/models/spree/log_entry.rb
449
435
  - app/models/spree/option_type.rb
436
+ - app/models/spree/option_type_prototype.rb
450
437
  - app/models/spree/option_value.rb
451
438
  - app/models/spree/option_values_variant.rb
452
439
  - app/models/spree/order.rb
453
440
  - app/models/spree/order/checkout.rb
454
- - app/models/spree/order/currency_updater.rb
455
441
  - app/models/spree/order/payments.rb
456
442
  - app/models/spree/order_cancellations.rb
457
443
  - app/models/spree/order_capturing.rb
458
444
  - app/models/spree/order_contents.rb
459
445
  - app/models/spree/order_inventory.rb
446
+ - app/models/spree/order_merger.rb
460
447
  - app/models/spree/order_mutex.rb
461
448
  - app/models/spree/order_promotion.rb
462
449
  - app/models/spree/order_shipping.rb
463
450
  - app/models/spree/order_stock_location.rb
451
+ - app/models/spree/order_update_attributes.rb
464
452
  - app/models/spree/order_updater.rb
465
453
  - app/models/spree/payment.rb
466
454
  - app/models/spree/payment/processing.rb
467
455
  - app/models/spree/payment_capture_event.rb
456
+ - app/models/spree/payment_create.rb
468
457
  - app/models/spree/payment_method.rb
469
458
  - app/models/spree/payment_method/check.rb
470
459
  - app/models/spree/payment_method/store_credit.rb
@@ -509,8 +498,10 @@ files:
509
498
  - app/models/spree/promotion_handler/free_shipping.rb
510
499
  - app/models/spree/promotion_handler/page.rb
511
500
  - app/models/spree/promotion_rule.rb
501
+ - app/models/spree/promotion_rule_taxon.rb
512
502
  - app/models/spree/promotion_rule_user.rb
513
503
  - app/models/spree/property.rb
504
+ - app/models/spree/property_prototype.rb
514
505
  - app/models/spree/prototype.rb
515
506
  - app/models/spree/prototype_taxon.rb
516
507
  - app/models/spree/refund.rb
@@ -564,6 +555,8 @@ files:
564
555
  - app/models/spree/stock/packer.rb
565
556
  - app/models/spree/stock/prioritizer.rb
566
557
  - app/models/spree/stock/quantifier.rb
558
+ - app/models/spree/stock/shipping_rate_selector.rb
559
+ - app/models/spree/stock/shipping_rate_sorter.rb
567
560
  - app/models/spree/stock/splitter/backordered.rb
568
561
  - app/models/spree/stock/splitter/base.rb
569
562
  - app/models/spree/stock/splitter/shipping_category.rb
@@ -813,6 +806,8 @@ files:
813
806
  - db/migrate/20141101231208_fix_adjustment_order_presence.rb
814
807
  - db/migrate/20141105213646_update_classifications_positions.rb
815
808
  - db/migrate/20141120135441_add_guest_token_index_to_spree_orders.rb
809
+ - db/migrate/20141215235502_remove_extra_products_slug_index.rb
810
+ - db/migrate/20141217215630_update_product_slug_index.rb
816
811
  - db/migrate/20141231151320_add_default_column_to_price.rb
817
812
  - db/migrate/20150112194216_add_position_to_stock_location.rb
818
813
  - db/migrate/20150113002122_create_spree_promotion_codes.rb
@@ -895,6 +890,10 @@ files:
895
890
  - db/migrate/20151015203732_add_foreign_keys_for_product_promotion_rules.rb
896
891
  - db/migrate/20151021113730_add_sale_to_spree_promotions.rb
897
892
  - db/migrate/20151021163309_convert_sale_promotions.rb
893
+ - db/migrate/20151117063249_convert_habtm_to_hmt_for_properties_prototypes.rb
894
+ - db/migrate/20151124062500_convert_habtm_to_hmt_for_option_type_prototypes.rb
895
+ - db/migrate/20151126063028_convert_habtm_to_hmt_for_taxons_promotion_rules.rb
896
+ - db/migrate/20151219020209_add_stock_item_unique_index.rb
898
897
  - db/seeds.rb
899
898
  - lib/generators/spree/custom_user/custom_user_generator.rb
900
899
  - lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
@@ -941,6 +940,7 @@ files:
941
940
  - lib/spree/core/routes.rb
942
941
  - lib/spree/core/search/base.rb
943
942
  - lib/spree/core/search/variant.rb
943
+ - lib/spree/core/stock_configuration.rb
944
944
  - lib/spree/core/unreturned_item_charger.rb
945
945
  - lib/spree/core/validators/email.rb
946
946
  - lib/spree/core/version.rb
@@ -998,7 +998,8 @@ files:
998
998
  - lib/spree/testing_support/factories/image_factory.rb
999
999
  - lib/spree/testing_support/factories/inventory_unit_factory.rb
1000
1000
  - lib/spree/testing_support/factories/line_item_factory.rb
1001
- - lib/spree/testing_support/factories/options_factory.rb
1001
+ - lib/spree/testing_support/factories/option_type_factory.rb
1002
+ - lib/spree/testing_support/factories/option_value_factory.rb
1002
1003
  - lib/spree/testing_support/factories/order_factory.rb
1003
1004
  - lib/spree/testing_support/factories/order_promotion_factory.rb
1004
1005
  - lib/spree/testing_support/factories/payment_factory.rb
@@ -1013,19 +1014,23 @@ files:
1013
1014
  - lib/spree/testing_support/factories/property_factory.rb
1014
1015
  - lib/spree/testing_support/factories/prototype_factory.rb
1015
1016
  - lib/spree/testing_support/factories/refund_factory.rb
1017
+ - lib/spree/testing_support/factories/refund_reason_factory.rb
1016
1018
  - lib/spree/testing_support/factories/reimbursement_factory.rb
1017
1019
  - lib/spree/testing_support/factories/reimbursement_type_factory.rb
1018
1020
  - lib/spree/testing_support/factories/return_authorization_factory.rb
1019
1021
  - lib/spree/testing_support/factories/return_item_factory.rb
1022
+ - lib/spree/testing_support/factories/return_reason_factory.rb
1020
1023
  - lib/spree/testing_support/factories/role_factory.rb
1021
1024
  - lib/spree/testing_support/factories/shipment_factory.rb
1022
1025
  - lib/spree/testing_support/factories/shipping_category_factory.rb
1023
1026
  - lib/spree/testing_support/factories/shipping_method_factory.rb
1027
+ - lib/spree/testing_support/factories/shipping_rate_factory.rb
1024
1028
  - lib/spree/testing_support/factories/state_factory.rb
1025
- - lib/spree/testing_support/factories/stock_factory.rb
1026
1029
  - lib/spree/testing_support/factories/stock_item_factory.rb
1027
1030
  - lib/spree/testing_support/factories/stock_location_factory.rb
1028
1031
  - lib/spree/testing_support/factories/stock_movement_factory.rb
1032
+ - lib/spree/testing_support/factories/stock_package_factory.rb
1033
+ - lib/spree/testing_support/factories/stock_packer_factory.rb
1029
1034
  - lib/spree/testing_support/factories/stock_transfer_factory.rb
1030
1035
  - lib/spree/testing_support/factories/store_credit_category_factory.rb
1031
1036
  - lib/spree/testing_support/factories/store_credit_event_factory.rb
@@ -1048,6 +1053,7 @@ files:
1048
1053
  - lib/spree/testing_support/i18n.rb
1049
1054
  - lib/spree/testing_support/order_walkthrough.rb
1050
1055
  - lib/spree/testing_support/preferences.rb
1056
+ - lib/spree/testing_support/sequences.rb
1051
1057
  - lib/spree/testing_support/url_helpers.rb
1052
1058
  - lib/spree_core.rb
1053
1059
  - lib/tasks/core.rake
@@ -1078,8 +1084,72 @@ files:
1078
1084
  - spec/lib/spree/core/delegate_belongs_to_spec.rb
1079
1085
  - spec/lib/spree/core/importer/order_spec.rb
1080
1086
  - spec/lib/spree/core/role_configuration_spec.rb
1087
+ - spec/lib/spree/core/stock_configuration_spec.rb
1088
+ - spec/lib/spree/core/testing_support/factories/address_factory_spec.rb
1089
+ - spec/lib/spree/core/testing_support/factories/adjustment_factory_spec.rb
1090
+ - spec/lib/spree/core/testing_support/factories/adjustment_reason_factory_spec.rb
1091
+ - spec/lib/spree/core/testing_support/factories/calculator_factory_spec.rb
1092
+ - spec/lib/spree/core/testing_support/factories/carton_factory_spec.rb
1093
+ - spec/lib/spree/core/testing_support/factories/country_factory_spec.rb
1094
+ - spec/lib/spree/core/testing_support/factories/credit_card_factory_spec.rb
1095
+ - spec/lib/spree/core/testing_support/factories/customer_return_factory_spec.rb
1096
+ - spec/lib/spree/core/testing_support/factories/image_factory_spec.rb
1097
+ - spec/lib/spree/core/testing_support/factories/inventory_unit_factory_spec.rb
1098
+ - spec/lib/spree/core/testing_support/factories/line_item_factory_spec.rb
1099
+ - spec/lib/spree/core/testing_support/factories/option_type_factory_spec.rb
1100
+ - spec/lib/spree/core/testing_support/factories/option_value_factory_spec.rb
1101
+ - spec/lib/spree/core/testing_support/factories/order_factory_spec.rb
1102
+ - spec/lib/spree/core/testing_support/factories/order_promotion_factory_spec.rb
1103
+ - spec/lib/spree/core/testing_support/factories/payment_factory_spec.rb
1104
+ - spec/lib/spree/core/testing_support/factories/payment_method_factory_spec.rb
1105
+ - spec/lib/spree/core/testing_support/factories/price_factory_spec.rb
1106
+ - spec/lib/spree/core/testing_support/factories/product_factory_spec.rb
1107
+ - spec/lib/spree/core/testing_support/factories/product_option_type_factory_spec.rb
1108
+ - spec/lib/spree/core/testing_support/factories/product_property_factory_spec.rb
1109
+ - spec/lib/spree/core/testing_support/factories/promotion_category_factory_spec.rb
1110
+ - spec/lib/spree/core/testing_support/factories/promotion_code_factory_spec.rb
1111
+ - spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
1112
+ - spec/lib/spree/core/testing_support/factories/property_factory_spec.rb
1113
+ - spec/lib/spree/core/testing_support/factories/prototype_factory_spec.rb
1114
+ - spec/lib/spree/core/testing_support/factories/refund_factory_spec.rb
1115
+ - spec/lib/spree/core/testing_support/factories/refund_reason_factory_spec.rb
1116
+ - spec/lib/spree/core/testing_support/factories/reimbursement_factory_spec.rb
1117
+ - spec/lib/spree/core/testing_support/factories/reimbursement_type_factory_spec.rb
1118
+ - spec/lib/spree/core/testing_support/factories/return_authorization_factory_spec.rb
1119
+ - spec/lib/spree/core/testing_support/factories/return_item_factory_spec.rb
1120
+ - spec/lib/spree/core/testing_support/factories/return_reason_factory_spec.rb
1121
+ - spec/lib/spree/core/testing_support/factories/role_factory_spec.rb
1122
+ - spec/lib/spree/core/testing_support/factories/shipment_factory_spec.rb
1123
+ - spec/lib/spree/core/testing_support/factories/shipping_category_factory_spec.rb
1124
+ - spec/lib/spree/core/testing_support/factories/shipping_method_factory_spec.rb
1125
+ - spec/lib/spree/core/testing_support/factories/shipping_rate_factory_spec.rb
1126
+ - spec/lib/spree/core/testing_support/factories/state_factory_spec.rb
1127
+ - spec/lib/spree/core/testing_support/factories/stock_item_factory_spec.rb
1128
+ - spec/lib/spree/core/testing_support/factories/stock_location_factory_spec.rb
1129
+ - spec/lib/spree/core/testing_support/factories/stock_movement_factory_spec.rb
1130
+ - spec/lib/spree/core/testing_support/factories/stock_package_factory_spec.rb
1131
+ - spec/lib/spree/core/testing_support/factories/stock_packer_factory_spec.rb
1132
+ - spec/lib/spree/core/testing_support/factories/stock_transfer_factory_spec.rb
1133
+ - spec/lib/spree/core/testing_support/factories/store_credit_category_factory_spec.rb
1134
+ - spec/lib/spree/core/testing_support/factories/store_credit_event_factory_spec.rb
1135
+ - spec/lib/spree/core/testing_support/factories/store_credit_factory_spec.rb
1136
+ - spec/lib/spree/core/testing_support/factories/store_credit_type_factory_spec.rb
1137
+ - spec/lib/spree/core/testing_support/factories/store_credit_update_reason_factory_spec.rb
1138
+ - spec/lib/spree/core/testing_support/factories/store_factory_spec.rb
1139
+ - spec/lib/spree/core/testing_support/factories/tax_category_factory_spec.rb
1140
+ - spec/lib/spree/core/testing_support/factories/tax_rate_factory_spec.rb
1141
+ - spec/lib/spree/core/testing_support/factories/taxon_factory_spec.rb
1142
+ - spec/lib/spree/core/testing_support/factories/taxonomy_factory_spec.rb
1143
+ - spec/lib/spree/core/testing_support/factories/tracker_factory_spec.rb
1144
+ - spec/lib/spree/core/testing_support/factories/user_factory_spec.rb
1145
+ - spec/lib/spree/core/testing_support/factories/variant_factory_spec.rb
1146
+ - spec/lib/spree/core/testing_support/factories/variant_property_rule_condition_factory_spec.rb
1147
+ - spec/lib/spree/core/testing_support/factories/variant_property_rule_factory_spec.rb
1148
+ - spec/lib/spree/core/testing_support/factories/variant_property_rule_value_factory_spec.rb
1149
+ - spec/lib/spree/core/testing_support/factories/zone_factory_spec.rb
1081
1150
  - spec/lib/spree/core/unreturned_item_charger_spec.rb
1082
1151
  - spec/lib/spree/core/validators/email_spec.rb
1152
+ - spec/lib/spree/core/version_spec.rb
1083
1153
  - spec/lib/spree/localized_number_spec.rb
1084
1154
  - spec/lib/spree/migrations_spec.rb
1085
1155
  - spec/lib/spree/money_spec.rb
@@ -1132,7 +1202,6 @@ files:
1132
1202
  - spec/models/spree/order/adjustments_spec.rb
1133
1203
  - spec/models/spree/order/callbacks_spec.rb
1134
1204
  - spec/models/spree/order/checkout_spec.rb
1135
- - spec/models/spree/order/currency_updater_spec.rb
1136
1205
  - spec/models/spree/order/finalizing_spec.rb
1137
1206
  - spec/models/spree/order/payment_spec.rb
1138
1207
  - spec/models/spree/order/risk_assessment_spec.rb
@@ -1145,12 +1214,15 @@ files:
1145
1214
  - spec/models/spree/order_capturing_spec.rb
1146
1215
  - spec/models/spree/order_contents_spec.rb
1147
1216
  - spec/models/spree/order_inventory_spec.rb
1217
+ - spec/models/spree/order_merger_spec.rb
1148
1218
  - spec/models/spree/order_mutex_spec.rb
1149
1219
  - spec/models/spree/order_promotion_spec.rb
1150
1220
  - spec/models/spree/order_shipping_spec.rb
1151
1221
  - spec/models/spree/order_spec.rb
1152
1222
  - spec/models/spree/order_stock_location_spec.rb
1223
+ - spec/models/spree/order_update_attributes_spec.rb
1153
1224
  - spec/models/spree/order_updater_spec.rb
1225
+ - spec/models/spree/payment_create_spec.rb
1154
1226
  - spec/models/spree/payment_method/store_credit_spec.rb
1155
1227
  - spec/models/spree/payment_method_spec.rb
1156
1228
  - spec/models/spree/payment_spec.rb
@@ -1249,6 +1321,8 @@ files:
1249
1321
  - spec/models/spree/stock/packer_spec.rb
1250
1322
  - spec/models/spree/stock/prioritizer_spec.rb
1251
1323
  - spec/models/spree/stock/quantifier_spec.rb
1324
+ - spec/models/spree/stock/shipping_rate_selector_spec.rb
1325
+ - spec/models/spree/stock/shipping_rate_sorter_spec.rb
1252
1326
  - spec/models/spree/stock/splitter/backordered_spec.rb
1253
1327
  - spec/models/spree/stock/splitter/base_spec.rb
1254
1328
  - spec/models/spree/stock/splitter/shipping_category_spec.rb
@@ -1279,8 +1353,10 @@ files:
1279
1353
  - spec/spec_helper.rb
1280
1354
  - spec/support/big_decimal.rb
1281
1355
  - spec/support/concerns/default_price.rb
1356
+ - spec/support/concerns/working_factories.rb
1282
1357
  - spec/support/dummy_ability.rb
1283
1358
  - spec/support/test_gateway.rb
1359
+ - vendor/assets/javascripts/jquery-migrate-1.0.0.js
1284
1360
  - vendor/assets/javascripts/jquery.payment.js
1285
1361
  - vendor/assets/javascripts/jsuri.js
1286
1362
  - vendor/assets/stylesheets/normalize.css
@@ -1300,12 +1376,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
1300
1376
  version: 2.1.0
1301
1377
  required_rubygems_version: !ruby/object:Gem::Requirement
1302
1378
  requirements:
1303
- - - ">="
1379
+ - - ">"
1304
1380
  - !ruby/object:Gem::Version
1305
- version: '0'
1381
+ version: 1.3.1
1306
1382
  requirements: []
1307
1383
  rubyforge_project:
1308
- rubygems_version: 2.6.11
1384
+ rubygems_version: 2.5.1
1309
1385
  signing_key:
1310
1386
  specification_version: 4
1311
1387
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
@@ -1,40 +0,0 @@
1
- module Spree
2
- class Order < Spree::Base
3
- module CurrencyUpdater
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
-
8
- def homogenize_line_item_currencies
9
- update_line_item_currencies!
10
- update!
11
- end
12
-
13
- end
14
-
15
- # Updates prices of order's line items
16
- def update_line_item_currencies!
17
- line_items.where('currency != ?', currency).each do |line_item|
18
- update_line_item_price!(line_item)
19
- end
20
- end
21
-
22
- # Returns the price object from given item
23
- def price_from_line_item(line_item)
24
- line_item.variant.prices.where(currency: currency).first
25
- end
26
-
27
- # Updates price from given line item
28
- def update_line_item_price!(line_item)
29
- price = price_from_line_item(line_item)
30
-
31
- if price
32
- line_item.update_attributes!(currency: price.currency, price: price.amount)
33
- else
34
- raise RuntimeError, "no #{currency} price found for #{line_item.product.name} (#{line_item.variant.sku})"
35
- end
36
- end
37
-
38
- end
39
- end
40
- end
@@ -1,32 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spree::Order, :type => :model do
4
- context 'CurrencyUpdater' do
5
- context "when changing order currency" do
6
- let!(:line_item) { create(:line_item) }
7
- let!(:euro_price) { create(:price, variant: line_item.variant, amount: 8, currency: 'EUR') }
8
-
9
- context "#homogenize_line_item_currencies" do
10
- it "succeeds without error" do
11
- expect { line_item.order.update_attributes!(currency: 'EUR') }.to_not raise_error
12
- end
13
-
14
- it "changes the line_item currencies" do
15
- expect { line_item.order.update_attributes!(currency: 'EUR') }.to change{ line_item.reload.currency }.from('USD').to('EUR')
16
- end
17
-
18
- it "changes the line_item amounts" do
19
- expect { line_item.order.update_attributes!(currency: 'EUR') }.to change{ line_item.reload.amount }.to(8)
20
- end
21
-
22
- it "fails to change the order currency when no prices are available in that currency" do
23
- expect { line_item.order.update_attributes!(currency: 'GBP') }.to raise_error RuntimeError
24
- end
25
-
26
- it "calculates the item total in the order.currency" do
27
- expect { line_item.order.update_attributes!(currency: 'EUR') }.to change{ line_item.order.item_total }.to(8)
28
- end
29
- end
30
- end
31
- end
32
- end