spree_mercado_pago_payment_method 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/javascripts/{admin → spree/admin}/spree_mercado_pago_payment_method.js +0 -0
  3. data/app/assets/javascripts/spree/frontend/spree_mercado_pago_payment_method.js +25 -0
  4. data/app/controllers/spree/mercado_pago_controller.rb +53 -31
  5. data/app/models/mercado_pago/client.rb +63 -0
  6. data/app/models/mercado_pago/client/api.rb +43 -0
  7. data/app/models/mercado_pago/client/authentication.rb +36 -0
  8. data/app/models/mercado_pago/client/preferences.rb +20 -0
  9. data/app/models/mercado_pago/notification.rb +8 -0
  10. data/app/models/mercado_pago/order_preferences_builder.rb +68 -0
  11. data/app/models/spree/payment_method/mercado_pago.rb +46 -0
  12. data/app/services/mercado_pago/handle_received_notification.rb +18 -0
  13. data/app/services/mercado_pago/process_notification.rb +54 -0
  14. data/app/views/spree/checkout/payment/_mercadopago.html.erb +15 -1
  15. data/config/locales/en.yml +3 -12
  16. data/config/locales/es.yml +3 -13
  17. data/config/routes.rb +5 -7
  18. data/lib/generators/spree_mercado_pago_payment_method/install/install_generator.rb +15 -10
  19. data/lib/spree_mercado_pago_payment_method.rb +1 -0
  20. data/lib/spree_mercado_pago_payment_method/engine.rb +1 -2
  21. data/lib/tasks/mercado_user.rake +0 -1
  22. data/spec/controllers/spree/mercado_pago_controller_spec.rb +18 -76
  23. data/spec/dummy/README.rdoc +15 -248
  24. data/spec/dummy/Rakefile +1 -2
  25. data/spec/dummy/app/assets/stylesheets/application.css +5 -3
  26. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  27. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  28. data/spec/dummy/bin/bundle +3 -0
  29. data/spec/dummy/bin/rails +4 -0
  30. data/spec/dummy/bin/rake +4 -0
  31. data/spec/dummy/config.ru +1 -1
  32. data/spec/dummy/config/application.rb +0 -36
  33. data/spec/dummy/config/database.yml +3 -5
  34. data/spec/dummy/config/environment.rb +3 -5
  35. data/spec/dummy/config/environments/development.rb +19 -19
  36. data/spec/dummy/config/environments/production.rb +41 -30
  37. data/spec/dummy/config/environments/test.rb +3 -6
  38. data/spec/dummy/config/initializers/assets.rb +8 -0
  39. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  40. data/spec/dummy/config/initializers/devise.rb +3 -0
  41. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/spec/dummy/config/initializers/inflections.rb +6 -5
  43. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  44. data/spec/dummy/config/initializers/session_store.rb +1 -6
  45. data/spec/dummy/config/initializers/spree.rb +4 -4
  46. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  47. data/spec/dummy/config/locales/en.yml +20 -2
  48. data/spec/dummy/config/routes.rb +8 -2
  49. data/spec/dummy/config/secrets.yml +22 -0
  50. data/spec/dummy/config/spree.yml +1 -1
  51. data/spec/dummy/db/migrate/20141112193407_spree_one_two.spree.rb +482 -0
  52. data/spec/dummy/db/migrate/20141112193408_spree_promo_one_two.spree.rb +46 -0
  53. data/spec/dummy/db/migrate/{20121121030242_add_tax_rate_label.spree.rb → 20141112193409_add_tax_rate_label.spree.rb} +0 -0
  54. data/spec/dummy/db/migrate/{20121121030243_add_toggle_tax_rate_display.spree.rb → 20141112193410_add_toggle_tax_rate_display.spree.rb} +0 -0
  55. data/spec/dummy/db/migrate/20141112193411_remove_unused_preference_columns.spree.rb +9 -0
  56. data/spec/dummy/db/migrate/{20121121030244_add_lock_version_to_variant.spree.rb → 20141112193412_add_lock_version_to_variant.spree.rb} +0 -0
  57. data/spec/dummy/db/migrate/20141112193413_add_states_required_to_countries.spree.rb +6 -0
  58. data/spec/dummy/db/migrate/20141112193414_add_on_demand_to_product_and_variant.spree.rb +7 -0
  59. data/spec/dummy/db/migrate/{20121121030245_remove_not_null_constraint_from_products_on_hand.spree.rb → 20141112193415_remove_not_null_constraint_from_products_on_hand.spree.rb} +0 -0
  60. data/spec/dummy/db/migrate/20141112193416_split_prices_from_variants.spree.rb +32 -0
  61. data/spec/dummy/db/migrate/20141112193417_remove_not_null_from_spree_prices_amount.spree.rb +10 -0
  62. data/spec/dummy/db/migrate/20141112193418_add_currency_to_line_items.spree.rb +6 -0
  63. data/spec/dummy/db/migrate/20141112193419_add_currency_to_orders.spree.rb +6 -0
  64. data/spec/dummy/db/migrate/20141112193420_add_cost_currency_to_variants.spree.rb +6 -0
  65. data/spec/dummy/db/migrate/20141112193421_remove_display_on_from_payment_methods.spree.rb +6 -0
  66. data/spec/dummy/db/migrate/20141112193422_add_position_to_taxonomies.spree.rb +6 -0
  67. data/spec/dummy/db/migrate/20141112193423_add_last_ip_to_spree_orders.spree.rb +6 -0
  68. data/spec/dummy/db/migrate/20141112193424_add_state_to_spree_adjustments.spree.rb +7 -0
  69. data/spec/dummy/db/migrate/20141112193425_add_display_on_to_spree_payment_methods.spree.rb +10 -0
  70. data/spec/dummy/db/migrate/20141112193426_add_position_to_product_properties.spree.rb +7 -0
  71. data/spec/dummy/db/migrate/20141112193427_add_identifier_to_spree_payments.spree.rb +6 -0
  72. data/spec/dummy/db/migrate/20141112193428_add_order_id_index_to_payments.spree.rb +10 -0
  73. data/spec/dummy/db/migrate/20141112193429_add_primary_to_spree_products_taxons.spree.rb +6 -0
  74. data/spec/dummy/db/migrate/20141112193430_create_spree_stock_items.spree.rb +15 -0
  75. data/spec/dummy/db/migrate/20141112193431_create_spree_stock_locations.spree.rb +12 -0
  76. data/spec/dummy/db/migrate/20141112193432_create_default_stock.spree.rb +31 -0
  77. data/spec/dummy/db/migrate/20141112193433_add_order_id_index_to_shipments.spree.rb +6 -0
  78. data/spec/dummy/db/migrate/20141112193434_change_meta_description_on_spree_products_to_text.spree.rb +6 -0
  79. data/spec/dummy/db/migrate/20141112193435_add_stock_location_id_to_spree_shipments.spree.rb +6 -0
  80. data/spec/dummy/db/migrate/20141112193436_add_pending_to_inventory_unit.spree.rb +7 -0
  81. data/spec/dummy/db/migrate/20141112193437_remove_on_demand_from_product_and_variant.spree.rb +7 -0
  82. data/spec/dummy/db/migrate/20141112193438_create_shipping_method_zone.spree.rb +23 -0
  83. data/spec/dummy/db/migrate/20141112193439_remove_shipping_category_id_from_shipping_method.spree.rb +6 -0
  84. data/spec/dummy/db/migrate/20141112193440_create_shipping_method_categories.spree.rb +14 -0
  85. data/spec/dummy/db/migrate/20141112193441_add_tracking_url_to_spree_shipping_methods.spree.rb +6 -0
  86. data/spec/dummy/db/migrate/20141112193442_create_spree_shipping_rates.spree.rb +25 -0
  87. data/spec/dummy/db/migrate/20141112193443_remove_category_match_attributes_from_shipping_method.spree.rb +8 -0
  88. data/spec/dummy/db/migrate/20141112193444_create_stock_movements.spree.rb +13 -0
  89. data/spec/dummy/db/migrate/20141112193445_add_address_fields_to_stock_location.spree.rb +23 -0
  90. data/spec/dummy/db/migrate/20141112193446_add_active_field_to_stock_locations.spree.rb +6 -0
  91. data/spec/dummy/db/migrate/20141112193447_add_backorderable_to_stock_item.spree.rb +6 -0
  92. data/spec/dummy/db/migrate/20141112193448_add_default_quantity_to_stock_movement.spree.rb +6 -0
  93. data/spec/dummy/db/migrate/20141112193449_add_source_and_destination_to_stock_movements.spree.rb +9 -0
  94. data/spec/dummy/db/migrate/20141112193450_change_orders_total_precision.spree.rb +9 -0
  95. data/spec/dummy/db/migrate/20141112193451_change_spree_payments_amount_precision.spree.rb +8 -0
  96. data/spec/dummy/db/migrate/20141112193452_change_spree_return_authorization_amount_precision.spree.rb +8 -0
  97. data/spec/dummy/db/migrate/20141112193453_change_adjustments_amount_precision.spree.rb +8 -0
  98. data/spec/dummy/db/migrate/20141112193454_add_originator_to_stock_movement.spree.rb +8 -0
  99. data/spec/dummy/db/migrate/20141112193455_drop_source_and_destination_from_stock_movement.spree.rb +16 -0
  100. data/spec/dummy/db/migrate/20141112193456_migrate_inventory_unit_sold_to_on_hand.spree.rb +10 -0
  101. data/spec/dummy/db/migrate/20141112193457_add_stock_location_to_rma.spree.rb +6 -0
  102. data/spec/dummy/db/migrate/20141112193458_update_shipment_state_for_canceled_orders.spree.rb +16 -0
  103. data/spec/dummy/db/migrate/20141112193459_add_seo_metas_to_taxons.spree.rb +10 -0
  104. data/spec/dummy/db/migrate/20141112193460_remove_stock_item_and_variant_lock.spree.rb +15 -0
  105. data/spec/dummy/db/migrate/20141112193461_add_name_to_spree_credit_cards.spree.rb +6 -0
  106. data/spec/dummy/db/migrate/20141112193462_update_name_fields_on_spree_credit_cards.spree.rb +14 -0
  107. data/spec/dummy/db/migrate/20141112193463_add_index_to_source_columns_on_adjustments.spree.rb +6 -0
  108. data/spec/dummy/db/migrate/20141112193464_update_adjustment_states.spree.rb +17 -0
  109. data/spec/dummy/db/migrate/20141112193465_add_shipping_rates_to_shipments.spree.rb +16 -0
  110. data/spec/dummy/db/migrate/20141112193466_create_spree_stock_transfers.spree.rb +15 -0
  111. data/spec/dummy/db/migrate/20141112193467_drop_products_count_on_hand.spree.rb +6 -0
  112. data/spec/dummy/db/migrate/20141112193468_set_default_shipping_rate_cost.spree.rb +6 -0
  113. data/spec/dummy/db/migrate/20141112193469_add_number_to_stock_transfer.spree.rb +24 -0
  114. data/spec/dummy/db/migrate/20141112193470_add_sku_index_to_spree_variants.spree.rb +6 -0
  115. data/spec/dummy/db/migrate/20141112193471_add_backorderable_default_to_spree_stock_location.spree.rb +6 -0
  116. data/spec/dummy/db/migrate/20141112193472_add_propage_all_variants_to_spree_stock_location.spree.rb +6 -0
  117. data/spec/dummy/db/migrate/20141112193473_rename_shipping_methods_zones_to_spree_shipping_methods_zones.spree.rb +11 -0
  118. data/spec/dummy/db/migrate/20141112193474_add_user_id_index_to_spree_orders.spree.rb +6 -0
  119. data/spec/dummy/db/migrate/20141112193475_add_updated_at_to_spree_countries.spree.rb +10 -0
  120. data/spec/dummy/db/migrate/20141112193476_add_updated_at_to_spree_states.spree.rb +10 -0
  121. data/spec/dummy/db/migrate/20141112193477_add_cvv_result_code_and_cvv_result_message_to_spree_payments.spree.rb +7 -0
  122. data/spec/dummy/db/migrate/20141112193478_add_unique_index_to_permalink_on_spree_products.spree.rb +6 -0
  123. data/spec/dummy/db/migrate/20141112193479_add_unique_index_to_orders_shipments_and_stock_transfers.spree.rb +8 -0
  124. data/spec/dummy/db/migrate/20141112193480_add_deleted_at_to_spree_tax_rates.spree.rb +6 -0
  125. data/spec/dummy/db/migrate/20141112193481_remove_lock_version_from_inventory_units.spree.rb +7 -0
  126. data/spec/dummy/db/migrate/20141112193482_add_cost_price_to_line_item.spree.rb +6 -0
  127. data/spec/dummy/db/migrate/20141112193483_set_backorderable_to_default_to_false.spree.rb +7 -0
  128. data/spec/dummy/db/migrate/20141112193484_add_created_by_id_to_spree_orders.spree.rb +6 -0
  129. data/spec/dummy/db/migrate/20141112193485_index_completed_at_on_spree_orders.spree.rb +6 -0
  130. data/spec/dummy/db/migrate/20141112193486_add_tax_category_id_to_spree_line_items.spree.rb +6 -0
  131. data/spec/dummy/db/migrate/20141112193487_migrate_tax_categories_to_line_items.spree.rb +11 -0
  132. data/spec/dummy/db/migrate/20141112193488_drop_spree_mail_methods.spree.rb +13 -0
  133. data/spec/dummy/db/migrate/20141112193489_set_default_stock_location_on_shipments.spree.rb +9 -0
  134. data/spec/dummy/db/migrate/20141112193490_upgrade_adjustments.spree.rb +40 -0
  135. data/spec/dummy/db/migrate/20141112193491_rename_adjustment_fields.spree.rb +15 -0
  136. data/spec/dummy/db/migrate/20141112193492_add_admin_name_column_to_spree_shipping_methods.spree.rb +6 -0
  137. data/spec/dummy/db/migrate/20141112193493_add_admin_name_column_to_spree_stock_locations.spree.rb +6 -0
  138. data/spec/dummy/db/migrate/20141112193494_add_shipment_total_to_spree_orders.spree.rb +6 -0
  139. data/spec/dummy/db/migrate/20141112193495_expand_order_number_size.spree.rb +10 -0
  140. data/spec/dummy/db/migrate/20141112193496_rename_activators_to_promotions.spree.rb +6 -0
  141. data/spec/dummy/db/migrate/20141112193497_add_adjustment_total_to_line_items.spree.rb +6 -0
  142. data/spec/dummy/db/migrate/20141112193498_add_adjustment_total_to_shipments.spree.rb +6 -0
  143. data/spec/dummy/db/migrate/20141112193499_add_depth_to_spree_taxons.spree.rb +17 -0
  144. data/spec/dummy/db/migrate/20141112193500_add_tax_total_to_line_items_shipments_and_orders.spree.rb +9 -0
  145. data/spec/dummy/db/migrate/20141112193501_add_shipping_category_to_shipping_methods_and_products.spree.rb +16 -0
  146. data/spec/dummy/db/migrate/20141112193502_migrate_old_shipping_calculators.spree.rb +20 -0
  147. data/spec/dummy/db/migrate/20141112193503_add_code_to_spree_promotion_rules.spree.rb +6 -0
  148. data/spec/dummy/db/migrate/20141112193504_change_states_required_for_countries.spree.rb +10 -0
  149. data/spec/dummy/db/migrate/20141112193505_add_deleted_at_to_spree_stock_items.spree.rb +6 -0
  150. data/spec/dummy/db/migrate/20141112193506_remove_promotions_event_name_field.spree.rb +6 -0
  151. data/spec/dummy/db/migrate/20141112193507_add_promo_total_to_line_items_and_shipments_and_orders.spree.rb +8 -0
  152. data/spec/dummy/db/migrate/20141112193508_remove_unused_credit_card_fields.spree.rb +17 -0
  153. data/spec/dummy/db/migrate/20141112193509_add_track_inventory_to_variant.spree.rb +6 -0
  154. data/spec/dummy/db/migrate/20141112193510_add_tax_category_to_variants.spree.rb +7 -0
  155. data/spec/dummy/db/migrate/20141112193511_add_channel_to_spree_orders.spree.rb +6 -0
  156. data/spec/dummy/db/migrate/20141112193512_add_included_to_adjustments.spree.rb +6 -0
  157. data/spec/dummy/db/migrate/20141112193513_rename_tax_total_fields.spree.rb +12 -0
  158. data/spec/dummy/db/migrate/20141112193514_add_line_item_id_to_spree_inventory_units.spree.rb +22 -0
  159. data/spec/dummy/db/migrate/20141112193515_add_updated_at_to_variants.spree.rb +6 -0
  160. data/spec/dummy/db/migrate/20141112193516_add_position_to_classifications.spree.rb +6 -0
  161. data/spec/dummy/db/migrate/20141112193517_create_spree_orders_promotions.spree.rb +9 -0
  162. data/spec/dummy/db/migrate/20141112193518_unique_shipping_method_categories.spree.rb +25 -0
  163. data/spec/dummy/db/migrate/20141112193519_add_item_count_to_spree_orders.spree.rb +6 -0
  164. data/spec/dummy/db/migrate/20141112193520_remove_value_type_from_spree_preferences.spree.rb +9 -0
  165. data/spec/dummy/db/migrate/20141112193521_rename_permalink_to_slug_for_products.spree.rb +6 -0
  166. data/spec/dummy/db/migrate/20141112193522_add_index_to_variant_id_and_currency_on_prices.spree.rb +6 -0
  167. data/spec/dummy/db/migrate/20141112193523_rename_activator_id_in_rules_and_actions_to_promotion_id.spree.rb +7 -0
  168. data/spec/dummy/db/migrate/20141112193524_add_deleted_at_to_spree_prices.spree.rb +6 -0
  169. data/spec/dummy/db/migrate/20141112193525_add_approver_id_and_approved_at_to_orders.spree.rb +7 -0
  170. data/spec/dummy/db/migrate/20141112193526_add_confirmation_delivered_to_spree_orders.spree.rb +6 -0
  171. data/spec/dummy/db/migrate/20141112193527_add_auto_capture_to_payment_methods.spree.rb +6 -0
  172. data/spec/dummy/db/migrate/20141112193528_create_spree_payment_capture_events.spree.rb +13 -0
  173. data/spec/dummy/db/migrate/20141112193529_add_uncaptured_amount_to_payments.spree.rb +6 -0
  174. data/spec/dummy/db/migrate/20141112193530_default_variant_weight_to_zero.spree.rb +12 -0
  175. data/spec/dummy/db/migrate/20141112193531_add_tax_category_id_to_shipping_methods.spree.rb +6 -0
  176. data/spec/dummy/db/migrate/20141112193532_add_tax_rate_id_to_shipping_rates.spree.rb +6 -0
  177. data/spec/dummy/db/migrate/20141112193533_add_pre_tax_amount_to_line_items_and_shipments.spree.rb +7 -0
  178. data/spec/dummy/db/migrate/20141112193534_add_more_indexes.spree.rb +14 -0
  179. data/spec/dummy/db/migrate/20141112193535_add_considered_risky_to_orders.spree.rb +6 -0
  180. data/spec/dummy/db/migrate/20141112193536_add_preference_store_to_everything.spree.rb +9 -0
  181. data/spec/dummy/db/migrate/20141112193537_add_user_id_to_spree_credit_cards.spree.rb +14 -0
  182. data/spec/dummy/db/migrate/20141112193538_migrate_old_preferences.spree.rb +24 -0
  183. data/spec/dummy/db/migrate/20141112193539_create_spree_stores.spree.rb +26 -0
  184. data/spec/dummy/db/migrate/20141112193540_create_store_from_preferences.spree.rb +31 -0
  185. data/spec/dummy/db/migrate/20141112193541_add_timestamps_to_spree_assets.spree.rb +7 -0
  186. data/spec/dummy/db/migrate/20141112193542_add_additional_store_fields.spree.rb +9 -0
  187. data/spec/dummy/db/migrate/20141112193543_add_many_missing_indexes.spree.rb +19 -0
  188. data/spec/dummy/db/migrate/20141112193544_correct_some_polymorphic_index_and_add_more_missing.spree.rb +67 -0
  189. data/spec/dummy/db/migrate/20141112193545_add_user_id_created_by_id_index_to_order.spree.rb +6 -0
  190. data/spec/dummy/db/migrate/20141112193546_change_spree_price_amount_precision.spree.rb +9 -0
  191. data/spec/dummy/db/migrate/20141112193547_add_token_to_spree_orders.spree.rb +6 -0
  192. data/spec/dummy/db/migrate/20141112193548_move_order_token_from_tokenized_permission.spree.rb +30 -0
  193. data/spec/dummy/db/migrate/20141112193549_set_shipment_total_for_users_upgrading.spree.rb +11 -0
  194. data/spec/dummy/db/migrate/20141112193550_drop_credit_card_first_name_and_last_name.spree.rb +7 -0
  195. data/spec/dummy/db/migrate/20141112193551_add_deleted_at_to_spree_promotion_actions.spree.rb +7 -0
  196. data/spec/dummy/db/migrate/20141112193552_remove_uncaptured_amount_from_spree_payments.spree.rb +6 -0
  197. data/spec/dummy/db/migrate/20141112193553_add_default_to_shipment_cost.spree.rb +11 -0
  198. data/spec/dummy/db/migrate/20141112193554_default_pre_tax_amount_should_be_zero.spree.rb +7 -0
  199. data/spec/dummy/db/migrate/20141112193555_add_state_lock_version_to_order.spree.rb +6 -0
  200. data/spec/dummy/db/migrate/20141112193556_fix_adjustment_order_presence.spree.rb +14 -0
  201. data/spec/dummy/db/migrate/20141112193557_update_classifications_positions.spree.rb +10 -0
  202. data/spec/dummy/db/migrate/20141112193558_add_api_key_to_spree_users.spree_api.rb +8 -0
  203. data/spec/dummy/db/migrate/20141112193559_resize_api_key_field.spree_api.rb +8 -0
  204. data/spec/dummy/db/migrate/20141112193560_rename_api_key_to_spree_api_key.spree_api.rb +8 -0
  205. data/spec/dummy/db/migrate/20141112193561_add_index_to_user_spree_api_key.spree_api.rb +8 -0
  206. data/spec/dummy/db/migrate/{20121121030246_create_users.spree_auth.rb → 20141112193562_create_users.spree_auth.rb} +0 -0
  207. data/spec/dummy/db/migrate/{20121121030247_rename_columns_for_devise.spree_auth.rb → 20141112193563_rename_columns_for_devise.spree_auth.rb} +0 -0
  208. data/spec/dummy/db/migrate/{20121121030248_convert_user_remember_field.spree_auth.rb → 20141112193564_convert_user_remember_field.spree_auth.rb} +0 -0
  209. data/spec/dummy/db/migrate/{20121121030249_add_reset_password_sent_at_to_spree_users.spree_auth.rb → 20141112193565_add_reset_password_sent_at_to_spree_users.spree_auth.rb} +0 -0
  210. data/spec/dummy/db/migrate/{20121121030250_make_users_email_index_unique.spree_auth.rb → 20141112193566_make_users_email_index_unique.spree_auth.rb} +0 -0
  211. data/spec/dummy/db/migrate/20141202172111_create_spree_mercado_pago_notifications.spree_mercado_pago_payment_method_engine.rb +10 -0
  212. data/spec/dummy/db/schema.rb +581 -260
  213. data/spec/dummy/db/seeds.rb +2 -2
  214. data/spec/dummy/db/spree_development.sqlite3 +0 -0
  215. data/spec/dummy/db/spree_test.sqlite3 +0 -0
  216. data/spec/dummy/log/development.log +27822 -1376
  217. data/spec/dummy/log/test.log +87064 -37048
  218. data/spec/dummy/public/404.html +54 -13
  219. data/spec/dummy/public/422.html +54 -13
  220. data/spec/dummy/public/500.html +53 -12
  221. data/spec/dummy/tmp/cache/17E/D61/spree%2Fapp_configuration%2Fdefault_seo_title +1 -0
  222. data/spec/dummy/tmp/cache/2CC/B21/spree%2Fapp_configuration%2Frequire_master_price +1 -0
  223. data/spec/dummy/tmp/cache/334/AA1/spree%2Fapp_configuration%2Fdefault_meta_keywords +1 -0
  224. data/spec/dummy/tmp/cache/397/F31/spree%2Fapp_configuration%2Fbinary_inventory_cache +1 -0
  225. data/spec/dummy/tmp/cache/39C/F91/spree%2Fapp_configuration%2Ftax_using_ship_address +1 -0
  226. data/spec/dummy/tmp/cache/3A7/4A1/spree%2Fapp_configuration%2Faddress_requires_state +1 -0
  227. data/spec/dummy/tmp/cache/3B7/CD1/spree%2Fapp_configuration%2Fredirect_https_to_http +1 -0
  228. data/spec/dummy/tmp/cache/3BE/851/spree%2Fapp_configuration%2Ftrack_inventory_levels +1 -0
  229. data/spec/dummy/tmp/cache/460/D81/spree%2Fapp_configuration%2Fdefault_meta_description +1 -0
  230. data/spec/dummy/tmp/cache/5AE/6A1/spree%2Fapp_configuration%2Falways_include_confirm_step +1 -0
  231. data/spec/dummy/tmp/cache/DD9/320/spree%2Fapp_configuration%2Fsite_url +1 -0
  232. data/spec/dummy/tmp/cache/DDD/2D0/spree%2Fapp_configuration%2Fcurrency +1 -0
  233. data/spec/dummy/tmp/cache/E27/320/spree%2Fapp_configuration%2Fsite_name +1 -0
  234. data/spec/dummy/tmp/cache/E9B/7F0/spree%2Fapp_configuration%2Fmails_from +1 -0
  235. data/spec/dummy/tmp/cache/F01/FD0/spree%2Ffrontend_configuration%2Flocale +1 -0
  236. data/spec/dummy/{app/assets/javascripts/admin → vendor/assets/javascripts/spree/backend}/all.js +2 -1
  237. data/spec/dummy/{app/assets/javascripts/store → vendor/assets/javascripts/spree/frontend}/all.js +2 -1
  238. data/spec/dummy/{app/assets/stylesheets/admin → vendor/assets/stylesheets/spree/backend}/all.css +2 -1
  239. data/spec/dummy/{app/assets/stylesheets/store → vendor/assets/stylesheets/spree/frontend}/all.css +2 -1
  240. data/spec/models/mercado_pago/client_spec.rb +138 -0
  241. data/spec/models/mercado_pago/notification_spec.rb +17 -0
  242. data/spec/models/mercado_pago/order_preferences_builder_spec.rb +66 -0
  243. data/spec/services/mercado_pago/process_notification_spec.rb +57 -0
  244. data/spec/spec_helper.rb +12 -53
  245. metadata +444 -328
  246. data/app/assets/javascripts/store/spree_mercado_pago_payment_method.js +0 -1
  247. data/app/controllers/spree/checkout_controller_decorator.rb +0 -29
  248. data/app/models/payment_method/mercado_pago.rb +0 -33
  249. data/app/models/spree_mercado_pago_client.rb +0 -102
  250. data/app/views/spree/mercado_pago/failure.html.erb +0 -1
  251. data/app/views/spree/mercado_pago/pending.html.erb +0 -1
  252. data/app/views/spree/mercado_pago/success.html.erb +0 -1
  253. data/spec/controllers/spree/checkout_controller_spec.rb +0 -57
  254. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  255. data/spec/dummy/db/migrate/20121121030140_spree_zero_nine_zero.spree.rb +0 -392
  256. data/spec/dummy/db/migrate/20121121030141_create_indexes_for_inventory_units.spree.rb +0 -7
  257. data/spec/dummy/db/migrate/20121121030142_add_count_on_hand_to_variants_and_products.spree.rb +0 -50
  258. data/spec/dummy/db/migrate/20121121030143_change_taxons_to_nested_set.spree.rb +0 -47
  259. data/spec/dummy/db/migrate/20121121030144_move_to_configurable_gateways.spree.rb +0 -55
  260. data/spec/dummy/db/migrate/20121121030145_add_open_id_authentication_tables.spree.rb +0 -16
  261. data/spec/dummy/db/migrate/20121121030146_add_openid_field_to_users.spree.rb +0 -27
  262. data/spec/dummy/db/migrate/20121121030147_change_preference_value_type.spree.rb +0 -11
  263. data/spec/dummy/db/migrate/20121121030148_create_billing_integrations.spree.rb +0 -13
  264. data/spec/dummy/db/migrate/20121121030149_charge_refactoring.spree.rb +0 -40
  265. data/spec/dummy/db/migrate/20121121030150_add_some_indexes.spree.rb +0 -12
  266. data/spec/dummy/db/migrate/20121121030151_checkout_state_machine.spree.rb +0 -6
  267. data/spec/dummy/db/migrate/20121121030152_state_for_shipments.spree.rb +0 -6
  268. data/spec/dummy/db/migrate/20121121030153_make_state_events_polymorphic.spree.rb +0 -13
  269. data/spec/dummy/db/migrate/20121121030154_ship_address_id_for_checkouts.spree.rb +0 -6
  270. data/spec/dummy/db/migrate/20121121030155_shipping_method_id_for_checkouts.spree.rb +0 -6
  271. data/spec/dummy/db/migrate/20121121030156_creditcard_last_four_digits.spree.rb +0 -15
  272. data/spec/dummy/db/migrate/20121121030157_populate_legacy_shipment_state.spree.rb +0 -16
  273. data/spec/dummy/db/migrate/20121121030158_add_cost_price.spree.rb +0 -6
  274. data/spec/dummy/db/migrate/20121121030159_shipment_id_for_inventory_units.spree.rb +0 -26
  275. data/spec/dummy/db/migrate/20121121030160_cim_fields_for_creditcards.spree.rb +0 -7
  276. data/spec/dummy/db/migrate/20121121030161_create_return_authorizations.spree.rb +0 -13
  277. data/spec/dummy/db/migrate/20121121030162_add_return_authorization_to_inventory_units.spree.rb +0 -6
  278. data/spec/dummy/db/migrate/20121121030163_create_trackers.spree.rb +0 -11
  279. data/spec/dummy/db/migrate/20121121030164_creditcard_id_for_creditcard_txns.spree.rb +0 -6
  280. data/spec/dummy/db/migrate/20121121030165_original_creditcard_txn_id_for_creditcard_txns.spree.rb +0 -6
  281. data/spec/dummy/db/migrate/20121121030166_add_test_mode_to_billing_integration.spree.rb +0 -7
  282. data/spec/dummy/db/migrate/20121121030167_create_payment_methods.spree.rb +0 -17
  283. data/spec/dummy/db/migrate/20121121030168_polymorphic_payments.spree.rb +0 -43
  284. data/spec/dummy/db/migrate/20121121030169_change_payments_payment_method_to_belongs_to.spree.rb +0 -12
  285. data/spec/dummy/db/migrate/20121121030170_assign_creditcard_txns_to_payment.spree.rb +0 -24
  286. data/spec/dummy/db/migrate/20121121030171_sti_for_transactions.spree.rb +0 -16
  287. data/spec/dummy/db/migrate/20121121030172_drop_billing_integrations.spree.rb +0 -17
  288. data/spec/dummy/db/migrate/20121121030173_deleted_at_for_payment_methods.spree.rb +0 -15
  289. data/spec/dummy/db/migrate/20121121030174_add_adjustments_index.spree.rb +0 -7
  290. data/spec/dummy/db/migrate/20121121030175_add_alt_text_to_images.spree.rb +0 -6
  291. data/spec/dummy/db/migrate/20121121030176_fix_existing_coupon_credits.spree.rb +0 -14
  292. data/spec/dummy/db/migrate/20121121030177_add_display_to_payment_methods.spree.rb +0 -6
  293. data/spec/dummy/db/migrate/20121121030178_add_addresses_checkouts_indexes.spree.rb +0 -9
  294. data/spec/dummy/db/migrate/20121121030179_add_icon_to_taxons.spree.rb +0 -18
  295. data/spec/dummy/db/migrate/20121121030180_add_description_to_taxons.spree.rb +0 -12
  296. data/spec/dummy/db/migrate/20121121030181_index_for_shipments_number.spree.rb +0 -6
  297. data/spec/dummy/db/migrate/20121121030182_add_index_on_users_persistence_token.spree.rb +0 -8
  298. data/spec/dummy/db/migrate/20121121030183_add_default_to_tax_categories.spree.rb +0 -6
  299. data/spec/dummy/db/migrate/20121121030184_add_display_to_shipping_methods.spree.rb +0 -6
  300. data/spec/dummy/db/migrate/20121121030185_rename_payment_method_display.spree.rb +0 -6
  301. data/spec/dummy/db/migrate/20121121030186_rename_preferences_field.spree.rb +0 -6
  302. data/spec/dummy/db/migrate/20121121030187_add_guest_flag.spree.rb +0 -8
  303. data/spec/dummy/db/migrate/20121121030188_drop_order_token.spree.rb +0 -10
  304. data/spec/dummy/db/migrate/20121121030189_payments_state_and_assigned_to_order_only.spree.rb +0 -15
  305. data/spec/dummy/db/migrate/20121121030190_create_address_keys_for_order.spree.rb +0 -7
  306. data/spec/dummy/db/migrate/20121121030191_payment_total_for_orders.spree.rb +0 -6
  307. data/spec/dummy/db/migrate/20121121030192_shipping_method_id_for_orders.spree.rb +0 -6
  308. data/spec/dummy/db/migrate/20121121030193_add_shipment_and_payment_state.spree.rb +0 -7
  309. data/spec/dummy/db/migrate/20121121030194_refactor_adjustments.spree.rb +0 -30
  310. data/spec/dummy/db/migrate/20121121030195_response_code_and_avs_response_for_payments.spree.rb +0 -7
  311. data/spec/dummy/db/migrate/20121121030196_change_guest_flag_to_anonymous.spree.rb +0 -8
  312. data/spec/dummy/db/migrate/20121121030197_email_for_orders.spree.rb +0 -6
  313. data/spec/dummy/db/migrate/20121121030198_create_mail_methods.spree.rb +0 -11
  314. data/spec/dummy/db/migrate/20121121030199_rename_frozen_to_locked.spree.rb +0 -6
  315. data/spec/dummy/db/migrate/20121121030200_move_special_instructions_to_orders.spree.rb +0 -11
  316. data/spec/dummy/db/migrate/20121121030201_create_log_entries.spree.rb +0 -12
  317. data/spec/dummy/db/migrate/20121121030202_migrate_transactions_to_payment_state.spree.rb +0 -99
  318. data/spec/dummy/db/migrate/20121121030203_delete_in_progress_orders.spree.rb +0 -20
  319. data/spec/dummy/db/migrate/20121121030204_migrate_checkout_to_orders.spree.rb +0 -24
  320. data/spec/dummy/db/migrate/20121121030205_remove_shipped_state.spree.rb +0 -13
  321. data/spec/dummy/db/migrate/20121121030206_prevent_nil_payment_total.spree.rb +0 -9
  322. data/spec/dummy/db/migrate/20121121030207_prevent_nil_email.spree.rb +0 -10
  323. data/spec/dummy/db/migrate/20121121030208_generate_anonymous_users.spree.rb +0 -21
  324. data/spec/dummy/db/migrate/20121121030209_update_order_state.spree.rb +0 -13
  325. data/spec/dummy/db/migrate/20121121030210_cleanup_legacy_tables.spree.rb +0 -12
  326. data/spec/dummy/db/migrate/20121121030211_remove_number_and_cvv_from_credicard.spree.rb +0 -12
  327. data/spec/dummy/db/migrate/20121121030212_drop_anonymous_field_for_user.spree.rb +0 -12
  328. data/spec/dummy/db/migrate/20121121030213_renamed_rma_cancelled_state.spree.rb +0 -10
  329. data/spec/dummy/db/migrate/20121121030214_fix_problematic_index_names.spree.rb +0 -14
  330. data/spec/dummy/db/migrate/20121121030215_add_position_to_variants.spree.rb +0 -6
  331. data/spec/dummy/db/migrate/20121121030216_add_next_state_to_state_events.spree.rb +0 -6
  332. data/spec/dummy/db/migrate/20121121030217_add_position_to_option_types.spree.rb +0 -6
  333. data/spec/dummy/db/migrate/20121121030218_remove_trailing_slashes_in_taxon_permalinks.spree.rb +0 -20
  334. data/spec/dummy/db/migrate/20121121030219_create_activators.spree.rb +0 -15
  335. data/spec/dummy/db/migrate/20121121030220_eligible_for_adjustments.spree.rb +0 -6
  336. data/spec/dummy/db/migrate/20121121030221_namespace_top_level_models.spree.rb +0 -67
  337. data/spec/dummy/db/migrate/20121121030222_migrate_namespaced_polymorphic_models.spree.rb +0 -53
  338. data/spec/dummy/db/migrate/20121121030223_make_adjustments_polymorphic.spree.rb +0 -10
  339. data/spec/dummy/db/migrate/20121121030224_add_company_to_addresses.spree.rb +0 -6
  340. data/spec/dummy/db/migrate/20121121030225_add_inc_tax_to_tax_rates.spree.rb +0 -6
  341. data/spec/dummy/db/migrate/20121121030226_rename_inc_price_attribute.spree.rb +0 -6
  342. data/spec/dummy/db/migrate/20121121030227_add_default_tax_zone.spree.rb +0 -6
  343. data/spec/dummy/db/migrate/20121121030228_associate_shipping_methods_and_shipping_categories.spree.rb +0 -8
  344. data/spec/dummy/db/migrate/20121121030229_add_match_rules_to_shipping_methods.spree.rb +0 -8
  345. data/spec/dummy/db/migrate/20121121030230_new_preferences.spree.rb +0 -49
  346. data/spec/dummy/db/migrate/20121121030231_rename_state_events_to_state_changes.spree.rb +0 -10
  347. data/spec/dummy/db/migrate/20121121030232_add_deleted_at_to_tax_category.spree.rb +0 -6
  348. data/spec/dummy/db/migrate/20121121030233_migrate_images_from_products_to_variants.spree.rb +0 -38
  349. data/spec/dummy/db/migrate/20121121030234_rename_attachment_size_to_attachment_file_size.spree.rb +0 -6
  350. data/spec/dummy/db/migrate/20121121030235_increase_scale_of_tax_rate_amount.spree.rb +0 -10
  351. data/spec/dummy/db/migrate/20121121030236_create_tokenized_permissions_table.spree.rb +0 -17
  352. data/spec/dummy/db/migrate/20121121030237_convert_sales_tax_to_default_tax.spree.rb +0 -10
  353. data/spec/dummy/db/migrate/20121121030238_rename_creditcards_to_credit_cards.spree.rb +0 -12
  354. data/spec/dummy/db/migrate/20121121030239_add_deleted_at_to_spree_shipping_methods.spree.rb +0 -6
  355. data/spec/dummy/db/migrate/20121121030240_remove_credit_total_from_orders.spree.rb +0 -6
  356. data/spec/dummy/db/migrate/20121121030241_add_counter_cache_to_zone_members.spree.rb +0 -15
  357. data/spec/dummy/script/rails +0 -6
  358. data/spec/models/spree_mercado_pago_client_spec.rb +0 -131
data/spec/dummy/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
- #!/usr/bin/env rake
2
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
3
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
3
 
5
4
  require File.expand_path('../config/application', __FILE__)
6
5
 
7
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -5,9 +5,11 @@
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
6
  * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
7
  *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
10
12
  *
11
- *= require_self
12
13
  *= require_tree .
14
+ *= require_self
13
15
  */
@@ -1,3 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
3
5
  end
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", :media => "all" %>
6
- <%= javascript_include_tag "application" %>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
4
+ run Rails.application
@@ -25,16 +25,6 @@ module Dummy
25
25
  # Application configuration should go into files in config/initializers
26
26
  # -- all .rb files in that directory are automatically loaded.
27
27
 
28
- # Custom directories with classes and modules you want to be autoloadable.
29
- # config.autoload_paths += %W(#{config.root}/extras)
30
-
31
- # Only load the plugins named here, in the order given (default is alphabetical).
32
- # :all can be used as a placeholder for all plugins not explicitly named.
33
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
34
-
35
- # Activate observers that should always be running.
36
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
37
-
38
28
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
39
29
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
40
30
  # config.time_zone = 'Central Time (US & Canada)'
@@ -42,32 +32,6 @@ module Dummy
42
32
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
43
33
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
44
34
  # config.i18n.default_locale = :de
45
-
46
- # Configure the default encoding used in templates for Ruby 1.9.
47
- config.encoding = "utf-8"
48
-
49
- # Configure sensitive parameters which will be filtered from the log file.
50
- config.filter_parameters += [:password]
51
-
52
- # Enable escaping HTML in JSON.
53
- config.active_support.escape_html_entities_in_json = true
54
-
55
- # Use SQL instead of Active Record's schema dumper when creating the database.
56
- # This is necessary if your schema can't be completely dumped by the schema dumper,
57
- # like if you have constraints or database-specific column types
58
- # config.active_record.schema_format = :sql
59
-
60
- # Enforce whitelist mode for mass assignment.
61
- # This will create an empty whitelist of attributes available for mass-assignment for all models
62
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
63
- # parameters by using an attr_accessible or attr_protected declaration.
64
- config.active_record.whitelist_attributes = true
65
-
66
- # Enable the asset pipeline
67
- config.assets.enabled = true
68
-
69
- # Version of your assets, change this if you want to expire all your assets
70
- config.assets.version = '1.0'
71
35
  end
72
36
  end
73
37
 
@@ -1,11 +1,9 @@
1
-
2
1
  development:
3
2
  adapter: sqlite3
4
- database: "db/spree_development.sqlite3"
3
+ database: db/spree_development.sqlite3
5
4
  test:
6
5
  adapter: sqlite3
7
- database: "db/spree_test.sqlite3"
6
+ database: db/spree_test.sqlite3
8
7
  production:
9
8
  adapter: sqlite3
10
- database: "db/spree_production.sqlite3"
11
-
9
+ database: db/spree_production.sqlite3
@@ -1,7 +1,5 @@
1
- # Load the rails application
1
+ # Load the Rails application.
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
6
-
7
- ActiveRecord::Base.include_root_in_json = true
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,37 +1,37 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
31
29
 
32
- # Do not compress assets
33
- config.assets.compress = false
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
34
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
37
  end
@@ -1,67 +1,78 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
12
23
  config.serve_static_assets = false
13
24
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
16
28
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
30
  config.assets.compile = false
19
31
 
20
- # Generate digests for assets URLs
32
+ # Generate digests for assets URLs.
21
33
  config.assets.digest = true
22
34
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
35
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
36
 
26
- # Specifies the header that your server uses for sending files
37
+ # Specifies the header that your server uses for sending files.
27
38
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
39
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
40
 
30
41
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
42
  # config.force_ssl = true
32
43
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
44
+ # Set to :debug to see everything in the log.
45
+ config.log_level = :info
35
46
 
36
- # Prepend all log lines with the following tags
47
+ # Prepend all log lines with the following tags.
37
48
  # config.log_tags = [ :subdomain, :uuid ]
38
49
 
39
- # Use a different logger for distributed setups
50
+ # Use a different logger for distributed setups.
40
51
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
52
 
42
- # Use a different cache store in production
53
+ # Use a different cache store in production.
43
54
  # config.cache_store = :mem_cache_store
44
55
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
56
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
46
57
  # config.action_controller.asset_host = "http://assets.example.com"
47
58
 
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
50
-
51
- # Disable delivery errors, bad email addresses will be ignored
59
+ # Ignore bad email addresses and do not raise email delivery errors.
60
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
61
  # config.action_mailer.raise_delivery_errors = false
53
62
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
63
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
64
+ # the I18n.default_locale when a translation cannot be found).
59
65
  config.i18n.fallbacks = true
60
66
 
61
- # Send deprecation notices to registered listeners
67
+ # Send deprecation notices to registered listeners.
62
68
  config.active_support.deprecation = :notify
63
69
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
70
+ # Disable automatic flushing of the log to improve performance.
71
+ # config.autoflush_log = false
72
+
73
+ # Use default logging formatter so that PID and timestamp are not suppressed.
74
+ config.log_formatter = ::Logger::Formatter.new
75
+
76
+ # Do not dump schema after migrations.
77
+ config.active_record.dump_schema_after_migration = false
67
78
  end
@@ -11,13 +11,12 @@ Dummy::Application.configure do
11
11
  config.serve_static_assets = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
14
  # Show full error reports and disable caching
18
15
  config.consider_all_requests_local = true
19
16
  config.action_controller.perform_caching = false
20
17
 
18
+ config.eager_load = false
19
+
21
20
  # Raise exceptions instead of rendering exception templates
22
21
  config.action_dispatch.show_exceptions = false
23
22
 
@@ -28,9 +27,7 @@ Dummy::Application.configure do
28
27
  # The :test delivery method accumulates sent emails in the
29
28
  # ActionMailer::Base.deliveries array.
30
29
  config.action_mailer.delivery_method = :test
31
-
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
30
+ ActionMailer::Base.default :from => "spree@example.com"
34
31
 
35
32
  # Print deprecation notices to the stderr
36
33
  config.active_support.deprecation = :stderr
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,3 @@
1
+ if Object.const_defined?("Devise")
2
+ Devise.secret_key = "48dcd1f167c6d9e2dfed1dadef99d4fc95f334c6bbbb60d2fa13808dd827c8f4a2d753409694d927d76bb605f7a7ab4742d1"
3
+ end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -1,15 +1,16 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
6
7
  # inflect.plural /^(ox)$/i, '\1en'
7
8
  # inflect.singular /^(ox)en/i, '\1'
8
9
  # inflect.irregular 'person', 'people'
9
10
  # inflect.uncountable %w( fish sheep )
10
11
  # end
11
- #
12
+
12
13
  # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
14
15
  # inflect.acronym 'RESTful'
15
16
  # end
@@ -2,4 +2,3 @@
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +1,14 @@
1
1
  # Configure Spree Preferences
2
- #
2
+ #
3
3
  # Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart.
4
4
  # If you would like users to be able to update a setting with the Admin it should NOT be set here.
5
5
  #
6
- # In order to initialize a setting do:
6
+ # In order to initialize a setting do:
7
7
  # config.setting_name = 'new value'
8
8
  Spree.config do |config|
9
9
  # Example:
10
- # Uncomment to override the default site name.
11
- # config.site_name = "Spree Demo Site"
10
+ # Uncomment to stop tracking inventory levels in the application
11
+ # config.track_inventory_levels = false
12
12
  end
13
13
 
14
14
  Spree.user_class = "Spree::LegacyUser"
@@ -1,14 +1,14 @@
1
1
  # Be sure to restart your server when you modify this file.
2
- #
2
+
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters :format => [:json]
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
9
  end
10
10
 
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
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