spree 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
- data/CHANGELOG +457 -425
- data/{README.markdown → README.md} +4 -0
- data/Rakefile +2 -2
- data/app/controllers/admin/adjustments_controller.rb +8 -9
- data/app/controllers/admin/checkouts_controller.rb +10 -2
- data/app/controllers/admin/line_items_controller.rb +0 -1
- data/app/controllers/admin/payments_controller.rb +8 -7
- data/app/controllers/admin/shipments_controller.rb +1 -1
- data/app/controllers/checkouts_controller.rb +16 -5
- data/app/controllers/spree/base_controller.rb +2 -2
- data/app/helpers/admin/navigation_helper.rb +1 -1
- data/app/helpers/checkouts_helper.rb +1 -1
- data/app/helpers/products_helper.rb +1 -1
- data/app/helpers/taxons_helper.rb +1 -1
- data/app/models/address.rb +9 -0
- data/app/models/checkout.rb +13 -7
- data/app/models/creditcard.rb +2 -2
- data/app/models/model_cache_cleaner.rb +13 -0
- data/app/models/order.rb +6 -8
- data/app/models/payment.rb +18 -17
- data/app/models/payment_method.rb +2 -2
- data/app/models/product.rb +1 -2
- data/app/models/return_authorization.rb +3 -1
- data/app/models/shipping_method.rb +16 -6
- data/app/models/zone.rb +34 -3
- data/config/database.yml +4 -21
- data/config/environment.rb +6 -6
- data/config/environments/test.rb +1 -0
- data/config/locales/en_spree.yml +10 -9
- data/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
- data/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
- data/db/sample/orders.yml +3 -3
- data/db/sample/payments.rb +6 -5
- data/db/sample/products.rb +2 -2
- data/db/schema.rb +9 -27
- data/lib/easy_role_requirement_system.rb +1 -1
- data/lib/generators/extension/extension_generator.rb +7 -22
- data/lib/generators/extension/templates/functional_test.rb +1 -1
- data/lib/generators/extension/templates/tasks.rake +2 -2
- data/lib/generators/extension_controller/extension_controller_generator.rb +1 -1
- data/lib/generators/extension_model/extension_model_generator.rb +1 -1
- data/lib/generators/instance/instance_generator.rb +24 -24
- data/lib/generators/instance/templates/instance_generate +1 -1
- data/lib/generators/theme/theme_generator.rb +6 -10
- data/lib/plugins/extension_patches/lib/asset_copy.rb +2 -2
- data/lib/spree.rb +1 -1
- data/lib/spree/initializer.rb +15 -15
- data/lib/spree/search.rb +1 -1
- data/lib/tasks/cucumber.rake +1 -1
- data/lib/tasks/extensions.rake +6 -6
- data/lib/tasks/framework.rake +1 -1
- data/lib/tasks/instance.rake +6 -6
- data/lib/validation_group.rb +16 -16
- data/script/extension +2 -2
- data/test/functional/products_controller_test.rb +13 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/checkout_test.rb +18 -9
- data/vendor/extensions/README +1 -1
- data/vendor/extensions/api/Rakefile +2 -2
- data/vendor/extensions/api/lib/tasks/api_extension_tasks.rake +2 -2
- data/vendor/extensions/overview_dashboard/Rakefile +2 -2
- data/vendor/extensions/overview_dashboard/app/views/admin/overview/index.html.erb +5 -5
- data/vendor/extensions/overview_dashboard/lib/tasks/overview_dashboard_extension_tasks.rake +2 -2
- data/vendor/extensions/payment_gateway/Rakefile +2 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +6 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/braintree.rb +88 -0
- data/vendor/extensions/payment_gateway/config/locales/en.yml +2 -1
- data/vendor/extensions/payment_gateway/lib/active_merchant/billing/authorize_net_cim.rb +4 -2
- data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +1 -1
- data/vendor/extensions/payment_gateway/lib/tasks/payment_gateway_extension_tasks.rake +2 -2
- data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +1 -0
- data/vendor/extensions/payment_gateway/test/unit/authorize_net_cim_test.rb +2 -1
- data/vendor/extensions/payment_gateway/test/unit/braintree_test.rb +200 -0
- data/vendor/extensions/theme_default/Rakefile +2 -2
- data/vendor/extensions/theme_default/app/stylesheets/_buttons.less +7 -2
- data/vendor/extensions/theme_default/app/stylesheets/_colors.less +1 -1
- data/vendor/extensions/theme_default/app/stylesheets/_layout.less +7 -2
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/_form.html.erb +3 -4
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/index.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shared/_additional_field.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shared/_calculator_fields.html.erb +6 -6
- data/vendor/extensions/theme_default/app/views/admin/shared/_configuration_menu.html.erb +13 -13
- data/vendor/extensions/theme_default/app/views/admin/shared/_product_tabs.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/_form.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/index.html.erb +2 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_address.html.erb +7 -9
- data/vendor/extensions/theme_default/app/views/checkouts/_payment.html.erb +4 -4
- data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +4 -4
- data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +36 -35
- data/vendor/extensions/theme_default/app/views/products/_thumbnails.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/shared/_head.html.erb +2 -2
- data/vendor/extensions/theme_default/app/views/shared/_products.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/states/index.js.erb +1 -1
- data/vendor/extensions/theme_default/lib/tasks/theme_default_extension_tasks.rake +2 -2
- data/vendor/extensions/theme_default/public/favicon.ico +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/header.png +0 -0
- data/vendor/extensions/theme_default/public/javascripts/calculator.js +3 -1
- data/vendor/extensions/theme_default/public/javascripts/checkout.js +44 -18
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +29 -24
- data/vendor/extensions/theme_default/public/stylesheets/screen.css +9 -7
- data/vendor/plugins/attribute_fu/init.rb +2 -2
- data/vendor/plugins/delegate_belongs_to/spec/spec_helper.rb +1 -1
- data/vendor/plugins/jrails/install.rb +1 -1
- data/vendor/plugins/jrails/lib/tasks/jrails.rake +2 -2
- data/vendor/plugins/jrails_auto_complete/install.rb +1 -1
- data/vendor/plugins/jrails_auto_complete/uninstall.rb +1 -1
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication.rb +1 -1
- metadata +59 -659
- data/lib/generators/extension/templates/RSpecRakefile +0 -137
- data/lib/generators/extension/templates/spec.opts +0 -6
- data/lib/generators/extension/templates/spec_helper.rb +0 -37
- data/lib/generators/extension_controller/templates/controller_spec.rb +0 -23
- data/lib/generators/extension_controller/templates/helper_spec.rb +0 -11
- data/lib/generators/extension_controller/templates/view_spec.rb +0 -12
- data/lib/generators/extension_model/templates/model_spec.rb +0 -11
- data/lib/tasks/rspec.rake +0 -182
- data/public/images/add-to-cart.png +0 -0
- data/public/images/admin/bg/active-tab.png +0 -0
- data/public/images/admin/bg/admin_tab_back.png +0 -0
- data/public/images/admin/bg/admin_tab_selected_back.png +0 -0
- data/public/images/admin/bg/content-back-blue.png +0 -0
- data/public/images/admin/bg/content-back-green.png +0 -0
- data/public/images/admin/bg/content-back.png +0 -0
- data/public/images/admin/bg/flash-error.png +0 -0
- data/public/images/admin/bg/flash-notice.png +0 -0
- data/public/images/admin/bg/green-stripes.gif +0 -0
- data/public/images/admin/bg/green-stripes.png +0 -0
- data/public/images/admin/bg/grid_header_back.png +0 -0
- data/public/images/admin/bg/grid_header_back_green.png +0 -0
- data/public/images/admin/bg/header-bg.png +0 -0
- data/public/images/admin/bg/header_bg.jpg +0 -0
- data/public/images/admin/bg/menu-current.png +0 -0
- data/public/images/admin/bg/red-stripes.gif +0 -0
- data/public/images/admin/bg/red-stripes.png +0 -0
- data/public/images/admin/bg/spree_50.png +0 -0
- data/public/images/admin/bg/subnav-divider.png +0 -0
- data/public/images/admin/bg/subnav.png +0 -0
- data/public/images/admin/bg/tab-back.png +0 -0
- data/public/images/admin/buttons/blue/left_01.png +0 -0
- data/public/images/admin/buttons/blue/right_01.png +0 -0
- data/public/images/admin/buttons/drag-handle-green.png +0 -0
- data/public/images/admin/buttons/green/left_01.png +0 -0
- data/public/images/admin/buttons/green/right_01.png +0 -0
- data/public/images/admin/buttons/left_01.png +0 -0
- data/public/images/admin/buttons/left_01_small.png +0 -0
- data/public/images/admin/buttons/orange/left_03.png +0 -0
- data/public/images/admin/buttons/orange/right_03.png +0 -0
- data/public/images/admin/buttons/right_01.png +0 -0
- data/public/images/admin/buttons/right_01_small.png +0 -0
- data/public/images/admin/icons/16x16/1.png +0 -0
- data/public/images/admin/icons/16x16/10.png +0 -0
- data/public/images/admin/icons/16x16/2.png +0 -0
- data/public/images/admin/icons/16x16/3.png +0 -0
- data/public/images/admin/icons/16x16/4.png +0 -0
- data/public/images/admin/icons/16x16/5.png +0 -0
- data/public/images/admin/icons/16x16/6.png +0 -0
- data/public/images/admin/icons/16x16/7.png +0 -0
- data/public/images/admin/icons/16x16/8.png +0 -0
- data/public/images/admin/icons/16x16/9.png +0 -0
- data/public/images/admin/icons/32x32/1.png +0 -0
- data/public/images/admin/icons/32x32/10.png +0 -0
- data/public/images/admin/icons/32x32/11.png +0 -0
- data/public/images/admin/icons/32x32/2.png +0 -0
- data/public/images/admin/icons/32x32/3.png +0 -0
- data/public/images/admin/icons/32x32/4.png +0 -0
- data/public/images/admin/icons/32x32/5.png +0 -0
- data/public/images/admin/icons/32x32/6.png +0 -0
- data/public/images/admin/icons/32x32/7.png +0 -0
- data/public/images/admin/icons/32x32/8.png +0 -0
- data/public/images/admin/icons/32x32/9.png +0 -0
- data/public/images/admin/icons/accept.png +0 -0
- data/public/images/admin/icons/add.gif +0 -0
- data/public/images/admin/icons/add.png +0 -0
- data/public/images/admin/icons/arrow-down.gif +0 -0
- data/public/images/admin/icons/cross.png +0 -0
- data/public/images/admin/icons/delete.gif +0 -0
- data/public/images/admin/icons/delete.png +0 -0
- data/public/images/admin/icons/drag.gif +0 -0
- data/public/images/admin/icons/edit.gif +0 -0
- data/public/images/admin/icons/edit.png +0 -0
- data/public/images/admin/icons/email.png +0 -0
- data/public/images/admin/icons/error.png +0 -0
- data/public/images/admin/icons/exclamation.png +0 -0
- data/public/images/admin/icons/feed.png +0 -0
- data/public/images/admin/icons/pdf.png +0 -0
- data/public/images/admin/icons/reorder.gif +0 -0
- data/public/images/admin/icons/search.gif +0 -0
- data/public/images/admin/icons/send-email.png +0 -0
- data/public/images/admin/icons/stop.png +0 -0
- data/public/images/admin/icons/tick.png +0 -0
- data/public/images/admin/icons/up.gif +0 -0
- data/public/images/admin/icons/xls.png +0 -0
- data/public/images/admin/tabs/off-left.png +0 -0
- data/public/images/admin/tabs/off-right.png +0 -0
- data/public/images/admin/tabs/on-left.png +0 -0
- data/public/images/admin/tabs/on-right.png +0 -0
- data/public/images/ajax_loader.gif +0 -0
- data/public/images/amex_cid.gif +0 -0
- data/public/images/bg-button-hover.png +0 -0
- data/public/images/bg-button-pressed.png +0 -0
- data/public/images/bg-button.gif +0 -0
- data/public/images/bg-button.png +0 -0
- data/public/images/blue/left_01.png +0 -0
- data/public/images/blue/right_01.png +0 -0
- data/public/images/body-back.png +0 -0
- data/public/images/bottom_shine.png +0 -0
- data/public/images/breadcrumb.gif +0 -0
- data/public/images/button-dark-hover.png +0 -0
- data/public/images/button-dark.png +0 -0
- data/public/images/buttons/bg-button-hover.png +0 -0
- data/public/images/buttons/bg-button-pressed.png +0 -0
- data/public/images/buttons/bg-button.gif +0 -0
- data/public/images/buttons/bg-button.png +0 -0
- data/public/images/buttons/blue/left_01.png +0 -0
- data/public/images/buttons/blue/right_01.png +0 -0
- data/public/images/buttons/button-dark-hover.png +0 -0
- data/public/images/buttons/button-dark.png +0 -0
- data/public/images/buttons/drag-handle-green.png +0 -0
- data/public/images/buttons/green/left_01.png +0 -0
- data/public/images/buttons/green/right_01.png +0 -0
- data/public/images/buttons/left_01.png +0 -0
- data/public/images/buttons/left_01_small.png +0 -0
- data/public/images/buttons/orange/left_03.png +0 -0
- data/public/images/buttons/orange/right_03.png +0 -0
- data/public/images/buttons/right_01.png +0 -0
- data/public/images/buttons/right_01_small.png +0 -0
- data/public/images/buttons/sxsw-ribbon-v1.png +0 -0
- data/public/images/buttons/top-shine.png +0 -0
- data/public/images/calendar_date_select/calendar.gif +0 -0
- data/public/images/cart-empty.png +0 -0
- data/public/images/cart-empty_x32.png +0 -0
- data/public/images/cart-full.png +0 -0
- data/public/images/cart-full_x32.png +0 -0
- data/public/images/checkout.png +0 -0
- data/public/images/creditcard.gif +0 -0
- data/public/images/datepicker/backstripes.gif +0 -0
- data/public/images/datepicker/bg_header.jpg +0 -0
- data/public/images/datepicker/bullet1.gif +0 -0
- data/public/images/datepicker/bullet2.gif +0 -0
- data/public/images/datepicker/cal.gif +0 -0
- data/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
- data/public/images/discover_cid.gif +0 -0
- data/public/images/drag-handle-green.png +0 -0
- data/public/images/flags/ad.png +0 -0
- data/public/images/flags/ae.png +0 -0
- data/public/images/flags/af.png +0 -0
- data/public/images/flags/ag.png +0 -0
- data/public/images/flags/ai.png +0 -0
- data/public/images/flags/al.png +0 -0
- data/public/images/flags/am.png +0 -0
- data/public/images/flags/an.png +0 -0
- data/public/images/flags/ao.png +0 -0
- data/public/images/flags/ar.png +0 -0
- data/public/images/flags/as.png +0 -0
- data/public/images/flags/at.png +0 -0
- data/public/images/flags/au.png +0 -0
- data/public/images/flags/aw.png +0 -0
- data/public/images/flags/ax.png +0 -0
- data/public/images/flags/az.png +0 -0
- data/public/images/flags/ba.png +0 -0
- data/public/images/flags/bb.png +0 -0
- data/public/images/flags/bd.png +0 -0
- data/public/images/flags/be.png +0 -0
- data/public/images/flags/bf.png +0 -0
- data/public/images/flags/bg.png +0 -0
- data/public/images/flags/bh.png +0 -0
- data/public/images/flags/bi.png +0 -0
- data/public/images/flags/bj.png +0 -0
- data/public/images/flags/bm.png +0 -0
- data/public/images/flags/bn.png +0 -0
- data/public/images/flags/bo.png +0 -0
- data/public/images/flags/br.png +0 -0
- data/public/images/flags/bs.png +0 -0
- data/public/images/flags/bt.png +0 -0
- data/public/images/flags/bv.png +0 -0
- data/public/images/flags/bw.png +0 -0
- data/public/images/flags/by.png +0 -0
- data/public/images/flags/bz.png +0 -0
- data/public/images/flags/ca.png +0 -0
- data/public/images/flags/catalonia.png +0 -0
- data/public/images/flags/cc.png +0 -0
- data/public/images/flags/cd.png +0 -0
- data/public/images/flags/cf.png +0 -0
- data/public/images/flags/cg.png +0 -0
- data/public/images/flags/ch.png +0 -0
- data/public/images/flags/ci.png +0 -0
- data/public/images/flags/ck.png +0 -0
- data/public/images/flags/cl.png +0 -0
- data/public/images/flags/cm.png +0 -0
- data/public/images/flags/cn.png +0 -0
- data/public/images/flags/co.png +0 -0
- data/public/images/flags/cr.png +0 -0
- data/public/images/flags/cs.png +0 -0
- data/public/images/flags/cu.png +0 -0
- data/public/images/flags/cv.png +0 -0
- data/public/images/flags/cx.png +0 -0
- data/public/images/flags/cy.png +0 -0
- data/public/images/flags/cz.png +0 -0
- data/public/images/flags/da.png +0 -0
- data/public/images/flags/de.png +0 -0
- data/public/images/flags/de_CH.png +0 -0
- data/public/images/flags/dj.png +0 -0
- data/public/images/flags/dm.png +0 -0
- data/public/images/flags/do.png +0 -0
- data/public/images/flags/dz.png +0 -0
- data/public/images/flags/ec.png +0 -0
- data/public/images/flags/ee.png +0 -0
- data/public/images/flags/eg.png +0 -0
- data/public/images/flags/eh.png +0 -0
- data/public/images/flags/england.png +0 -0
- data/public/images/flags/er.png +0 -0
- data/public/images/flags/es.png +0 -0
- data/public/images/flags/et.png +0 -0
- data/public/images/flags/europeanunion.png +0 -0
- data/public/images/flags/fam.png +0 -0
- data/public/images/flags/fi.png +0 -0
- data/public/images/flags/fj.png +0 -0
- data/public/images/flags/fk.png +0 -0
- data/public/images/flags/fm.png +0 -0
- data/public/images/flags/fo.png +0 -0
- data/public/images/flags/fr.png +0 -0
- data/public/images/flags/ga.png +0 -0
- data/public/images/flags/gb.png +0 -0
- data/public/images/flags/gd.png +0 -0
- data/public/images/flags/ge.png +0 -0
- data/public/images/flags/gf.png +0 -0
- data/public/images/flags/gh.png +0 -0
- data/public/images/flags/gi.png +0 -0
- data/public/images/flags/gl.png +0 -0
- data/public/images/flags/gm.png +0 -0
- data/public/images/flags/gn.png +0 -0
- data/public/images/flags/gp.png +0 -0
- data/public/images/flags/gq.png +0 -0
- data/public/images/flags/gr.png +0 -0
- data/public/images/flags/gs.png +0 -0
- data/public/images/flags/gt.png +0 -0
- data/public/images/flags/gu.png +0 -0
- data/public/images/flags/gw.png +0 -0
- data/public/images/flags/gy.png +0 -0
- data/public/images/flags/hk.png +0 -0
- data/public/images/flags/hm.png +0 -0
- data/public/images/flags/hn.png +0 -0
- data/public/images/flags/hr.png +0 -0
- data/public/images/flags/ht.png +0 -0
- data/public/images/flags/hu.png +0 -0
- data/public/images/flags/id.png +0 -0
- data/public/images/flags/ie.png +0 -0
- data/public/images/flags/il.png +0 -0
- data/public/images/flags/in.png +0 -0
- data/public/images/flags/io.png +0 -0
- data/public/images/flags/iq.png +0 -0
- data/public/images/flags/ir.png +0 -0
- data/public/images/flags/is.png +0 -0
- data/public/images/flags/it.png +0 -0
- data/public/images/flags/jm.png +0 -0
- data/public/images/flags/jo.png +0 -0
- data/public/images/flags/jp.png +0 -0
- data/public/images/flags/ke.png +0 -0
- data/public/images/flags/kg.png +0 -0
- data/public/images/flags/kh.png +0 -0
- data/public/images/flags/ki.png +0 -0
- data/public/images/flags/km.png +0 -0
- data/public/images/flags/kn.png +0 -0
- data/public/images/flags/kp.png +0 -0
- data/public/images/flags/kr.png +0 -0
- data/public/images/flags/kw.png +0 -0
- data/public/images/flags/ky.png +0 -0
- data/public/images/flags/kz.png +0 -0
- data/public/images/flags/la.png +0 -0
- data/public/images/flags/lb.png +0 -0
- data/public/images/flags/lc.png +0 -0
- data/public/images/flags/li.png +0 -0
- data/public/images/flags/lk.png +0 -0
- data/public/images/flags/lr.png +0 -0
- data/public/images/flags/ls.png +0 -0
- data/public/images/flags/lt.png +0 -0
- data/public/images/flags/lu.png +0 -0
- data/public/images/flags/lv.png +0 -0
- data/public/images/flags/ly.png +0 -0
- data/public/images/flags/ma.png +0 -0
- data/public/images/flags/mc.png +0 -0
- data/public/images/flags/md.png +0 -0
- data/public/images/flags/me.png +0 -0
- data/public/images/flags/mg.png +0 -0
- data/public/images/flags/mh.png +0 -0
- data/public/images/flags/mk.png +0 -0
- data/public/images/flags/ml.png +0 -0
- data/public/images/flags/mm.png +0 -0
- data/public/images/flags/mn.png +0 -0
- data/public/images/flags/mo.png +0 -0
- data/public/images/flags/mp.png +0 -0
- data/public/images/flags/mq.png +0 -0
- data/public/images/flags/mr.png +0 -0
- data/public/images/flags/ms.png +0 -0
- data/public/images/flags/mt.png +0 -0
- data/public/images/flags/mu.png +0 -0
- data/public/images/flags/mv.png +0 -0
- data/public/images/flags/mw.png +0 -0
- data/public/images/flags/mx.png +0 -0
- data/public/images/flags/my.png +0 -0
- data/public/images/flags/mz.png +0 -0
- data/public/images/flags/na.png +0 -0
- data/public/images/flags/nc.png +0 -0
- data/public/images/flags/ne.png +0 -0
- data/public/images/flags/nf.png +0 -0
- data/public/images/flags/ng.png +0 -0
- data/public/images/flags/ni.png +0 -0
- data/public/images/flags/nl.png +0 -0
- data/public/images/flags/no.png +0 -0
- data/public/images/flags/np.png +0 -0
- data/public/images/flags/nr.png +0 -0
- data/public/images/flags/nu.png +0 -0
- data/public/images/flags/nz.png +0 -0
- data/public/images/flags/om.png +0 -0
- data/public/images/flags/pa.png +0 -0
- data/public/images/flags/pe.png +0 -0
- data/public/images/flags/pf.png +0 -0
- data/public/images/flags/pg.png +0 -0
- data/public/images/flags/ph.png +0 -0
- data/public/images/flags/pk.png +0 -0
- data/public/images/flags/pl.png +0 -0
- data/public/images/flags/pm.png +0 -0
- data/public/images/flags/pn.png +0 -0
- data/public/images/flags/pr.png +0 -0
- data/public/images/flags/ps.png +0 -0
- data/public/images/flags/pt.png +0 -0
- data/public/images/flags/pw.png +0 -0
- data/public/images/flags/py.png +0 -0
- data/public/images/flags/qa.png +0 -0
- data/public/images/flags/re.png +0 -0
- data/public/images/flags/ro.png +0 -0
- data/public/images/flags/rs.png +0 -0
- data/public/images/flags/ru.png +0 -0
- data/public/images/flags/rw.png +0 -0
- data/public/images/flags/sa.png +0 -0
- data/public/images/flags/sb.png +0 -0
- data/public/images/flags/sc.png +0 -0
- data/public/images/flags/scotland.png +0 -0
- data/public/images/flags/sd.png +0 -0
- data/public/images/flags/se.png +0 -0
- data/public/images/flags/sg.png +0 -0
- data/public/images/flags/sh.png +0 -0
- data/public/images/flags/si.png +0 -0
- data/public/images/flags/sj.png +0 -0
- data/public/images/flags/sk.png +0 -0
- data/public/images/flags/sl.png +0 -0
- data/public/images/flags/sm.png +0 -0
- data/public/images/flags/sn.png +0 -0
- data/public/images/flags/so.png +0 -0
- data/public/images/flags/sr.png +0 -0
- data/public/images/flags/st.png +0 -0
- data/public/images/flags/sv.png +0 -0
- data/public/images/flags/sy.png +0 -0
- data/public/images/flags/sz.png +0 -0
- data/public/images/flags/tc.png +0 -0
- data/public/images/flags/td.png +0 -0
- data/public/images/flags/tf.png +0 -0
- data/public/images/flags/tg.png +0 -0
- data/public/images/flags/th.png +0 -0
- data/public/images/flags/tj.png +0 -0
- data/public/images/flags/tk.png +0 -0
- data/public/images/flags/tl.png +0 -0
- data/public/images/flags/tm.png +0 -0
- data/public/images/flags/tn.png +0 -0
- data/public/images/flags/to.png +0 -0
- data/public/images/flags/tr.png +0 -0
- data/public/images/flags/tt.png +0 -0
- data/public/images/flags/tv.png +0 -0
- data/public/images/flags/tw.png +0 -0
- data/public/images/flags/tz.png +0 -0
- data/public/images/flags/ua.png +0 -0
- data/public/images/flags/ug.png +0 -0
- data/public/images/flags/um.png +0 -0
- data/public/images/flags/us.png +0 -0
- data/public/images/flags/uy.png +0 -0
- data/public/images/flags/uz.png +0 -0
- data/public/images/flags/va.png +0 -0
- data/public/images/flags/vc.png +0 -0
- data/public/images/flags/ve.png +0 -0
- data/public/images/flags/vg.png +0 -0
- data/public/images/flags/vi.png +0 -0
- data/public/images/flags/vn.png +0 -0
- data/public/images/flags/vu.png +0 -0
- data/public/images/flags/wales.png +0 -0
- data/public/images/flags/wf.png +0 -0
- data/public/images/flags/ws.png +0 -0
- data/public/images/flags/ye.png +0 -0
- data/public/images/flags/yt.png +0 -0
- data/public/images/flags/za.png +0 -0
- data/public/images/flags/zm.png +0 -0
- data/public/images/flags/zw.png +0 -0
- data/public/images/green/left_01.png +0 -0
- data/public/images/green/right_01.png +0 -0
- data/public/images/grid.png +0 -0
- data/public/images/left_01.png +0 -0
- data/public/images/left_01_small.png +0 -0
- data/public/images/master_cid.jpg +0 -0
- data/public/images/menu-current.png +0 -0
- data/public/images/menu-hover.png +0 -0
- data/public/images/noimage/mini.jpg +0 -0
- data/public/images/noimage/product.jpg +0 -0
- data/public/images/noimage/small.jpg +0 -0
- data/public/images/openid-inputicon.gif +0 -0
- data/public/images/orange/left_03.png +0 -0
- data/public/images/orange/right_03.png +0 -0
- data/public/images/progress.gif +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/right_01.png +0 -0
- data/public/images/right_01_small.png +0 -0
- data/public/images/separator.png +0 -0
- data/public/images/shadow-top.png +0 -0
- data/public/images/shadow_top.png +0 -0
- data/public/images/spinner.gif +0 -0
- data/public/images/spree.jpg +0 -0
- data/public/images/spree/progress.gif +0 -0
- data/public/images/spree/spinner.gif +0 -0
- data/public/images/spree/spree.jpg +0 -0
- data/public/images/step-progress/completed-completed.gif +0 -0
- data/public/images/step-progress/completed-current.gif +0 -0
- data/public/images/step-progress/completed-first.gif +0 -0
- data/public/images/step-progress/current-first.gif +0 -0
- data/public/images/step-progress/current-incomplete.gif +0 -0
- data/public/images/step-progress/current-right.gif +0 -0
- data/public/images/step-progress/incomplete-incomplete.gif +0 -0
- data/public/images/step-progress/incomplete-right.gif +0 -0
- data/public/images/steps/1.png +0 -0
- data/public/images/steps/1_small.png +0 -0
- data/public/images/steps/2.png +0 -0
- data/public/images/steps/2_small.png +0 -0
- data/public/images/steps/3.png +0 -0
- data/public/images/steps/3_small.png +0 -0
- data/public/images/steps/4.png +0 -0
- data/public/images/steps/4_small.png +0 -0
- data/public/images/steps/5.png +0 -0
- data/public/images/steps/5_small.png +0 -0
- data/public/images/steps/6.png +0 -0
- data/public/images/steps/6_small.png +0 -0
- data/public/images/sxsw-ribbon-v1.png +0 -0
- data/public/images/tab_bottom.gif +0 -0
- data/public/images/tile-header.png +0 -0
- data/public/images/tile-slider.png +0 -0
- data/public/images/top-shine.png +0 -0
- data/public/images/tree-nav-icons/bullet.gif +0 -0
- data/public/images/tree-nav-icons/minus.gif +0 -0
- data/public/images/tree-nav-icons/plus.gif +0 -0
- data/public/images/tree-nav-icons/treeview-loading.gif +0 -0
- data/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
- data/public/images/update.png +0 -0
- data/public/images/visa_cid.gif +0 -0
- data/public/images/wrapper-back-2.png +0 -0
- data/public/images/wrapper-back.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-menuitem_checkbox.png +0 -0
- data/public/images/yui-menuitem_checkbox_disabled.png +0 -0
- data/public/images/yui-menuitem_submenuindicator.png +0 -0
- data/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-sprite.png +0 -0
- data/public/javascripts/additional-methods.js +0 -236
- data/public/javascripts/admin/address_states.js +0 -25
- data/public/javascripts/admin/checkouts/edit.js +0 -129
- data/public/javascripts/admin/orders/edit.js +0 -96
- data/public/javascripts/admin/orders/edit_form.js +0 -17
- data/public/javascripts/admin/payments/new.js +0 -9
- data/public/javascripts/admin/unobtrusive_handlers.js +0 -15
- data/public/javascripts/calculator.js +0 -13
- data/public/javascripts/checkout.js +0 -65
- data/public/javascripts/dashboard.js +0 -143
- data/public/javascripts/datepicker.js +0 -1445
- data/public/javascripts/gateway.js +0 -13
- data/public/javascripts/jqPlot/excanvas.min.js +0 -1
- data/public/javascripts/jqPlot/jquery.jqplot.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +0 -14
- data/public/javascripts/jquery-1.3.2.min.js +0 -19
- data/public/javascripts/jquery-and-plugins.js +0 -36
- data/public/javascripts/jquery-ui.js +0 -188
- data/public/javascripts/jquery.alerts/images/help.gif +0 -0
- data/public/javascripts/jquery.alerts/images/important.gif +0 -0
- data/public/javascripts/jquery.alerts/images/info.gif +0 -0
- data/public/javascripts/jquery.alerts/images/title.gif +0 -0
- data/public/javascripts/jquery.alerts/jquery.alerts.css +0 -57
- data/public/javascripts/jquery.alerts/jquery.alerts.js +0 -235
- data/public/javascripts/jquery.alerts/jquery.alerts.spree.css +0 -30
- data/public/javascripts/jquery.autocomplete.min.js +0 -13
- data/public/javascripts/jquery.js +0 -19
- data/public/javascripts/jquery.suggest.js +0 -276
- data/public/javascripts/jquery.template.js +0 -255
- data/public/javascripts/jquery.validate.min.js +0 -16
- data/public/javascripts/jrails.autocomplete.js +0 -274
- data/public/javascripts/jrails.js +0 -1
- data/public/javascripts/jsTree/jquery.tree.js +0 -2058
- data/public/javascripts/jsTree/plugins/jquery.tree.contextmenu.js +0 -129
- data/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
- data/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
- data/public/javascripts/jsTree/themes/apple/icons.png +0 -0
- data/public/javascripts/jsTree/themes/apple/style.css +0 -34
- data/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
- data/public/javascripts/lang/af.js +0 -40
- data/public/javascripts/lang/ar.js +0 -50
- data/public/javascripts/lang/de.js +0 -40
- data/public/javascripts/lang/du.js +0 -40
- data/public/javascripts/lang/en.js +0 -42
- data/public/javascripts/lang/es.js +0 -41
- data/public/javascripts/lang/fi.js +0 -40
- data/public/javascripts/lang/fr.js +0 -44
- data/public/javascripts/lang/gr.js +0 -40
- data/public/javascripts/lang/he.js +0 -49
- data/public/javascripts/lang/it.js +0 -13
- data/public/javascripts/lang/nl.js +0 -40
- data/public/javascripts/lang/no.js +0 -40
- data/public/javascripts/lang/pt.js +0 -50
- data/public/javascripts/lang/ro.js +0 -40
- data/public/javascripts/lang/ru.js +0 -40
- data/public/javascripts/lang/sp.js +0 -40
- data/public/javascripts/lang/sv.js +0 -41
- data/public/javascripts/lang/ua.js +0 -40
- data/public/javascripts/localization/messages_cn.js +0 -24
- data/public/javascripts/localization/messages_cs.js +0 -23
- data/public/javascripts/localization/messages_da.js +0 -21
- data/public/javascripts/localization/messages_de.js +0 -21
- data/public/javascripts/localization/messages_es.js +0 -24
- data/public/javascripts/localization/messages_fr.js +0 -23
- data/public/javascripts/localization/messages_hu.js +0 -21
- data/public/javascripts/localization/messages_it.js +0 -26
- data/public/javascripts/localization/messages_kk.js +0 -23
- data/public/javascripts/localization/messages_nl.js +0 -23
- data/public/javascripts/localization/messages_no.js +0 -23
- data/public/javascripts/localization/messages_pl.js +0 -23
- data/public/javascripts/localization/messages_ptbr.js +0 -30
- data/public/javascripts/localization/messages_ro.js +0 -24
- data/public/javascripts/localization/messages_ru.js +0 -23
- data/public/javascripts/localization/messages_se.js +0 -23
- data/public/javascripts/localization/messages_sk.js +0 -21
- data/public/javascripts/localization/messages_tr.js +0 -24
- data/public/javascripts/localization/messages_tw.js +0 -24
- data/public/javascripts/localization/messages_ua.js +0 -24
- data/public/javascripts/nested-attribute.js +0 -25
- data/public/javascripts/open_id.js +0 -15
- data/public/javascripts/product.js +0 -49
- data/public/javascripts/spree.js +0 -53
- data/public/javascripts/taxonomy.js +0 -196
- data/public/javascripts/zone.js +0 -40
- data/public/stylesheets/admin/admin-forms.css +0 -159
- data/public/stylesheets/admin/admin-reset.css +0 -67
- data/public/stylesheets/admin/admin-tables.css +0 -39
- data/public/stylesheets/admin/admin-typography.css +0 -117
- data/public/stylesheets/admin/admin.css +0 -571
- data/public/stylesheets/admin/dashboard.css +0 -143
- data/public/stylesheets/admin/edit_checkouts.css +0 -57
- data/public/stylesheets/admin/edit_orders.css +0 -65
- data/public/stylesheets/admin/grids.css +0 -314
- data/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +0 -7
- data/public/stylesheets/admin/yui-includes.css +0 -14
- data/public/stylesheets/datepicker.css +0 -263
- data/public/stylesheets/jquery.autocomplete.css +0 -48
- data/public/stylesheets/scaffold.css +0 -54
- data/public/stylesheets/screen.css +0 -1194
- data/script/autospec +0 -5
- data/script/breakpointer +0 -3
- data/script/performance/request +0 -3
- data/script/spec +0 -5
- data/script/spec_server +0 -125
- data/spec/controllers/admin/configurations_controller_spec.rb +0 -9
- data/spec/controllers/admin/mail_settings_controller_spec.rb +0 -24
- data/spec/controllers/admin/shipping_categories_controller_spec.rb +0 -10
- data/spec/controllers/admin/shipping_methods_controller_spec.rb +0 -10
- data/spec/controllers/countries_controller_spec.rb +0 -24
- data/spec/controllers/orders_controller_spec.rb +0 -35
- data/spec/controllers/products_controller_spec.rb +0 -16
- data/spec/controllers/states_controller_spec.rb +0 -18
- data/spec/controllers/taxons_controller_spec.rb +0 -18
- data/spec/fixtures/app_configurations.yml +0 -7
- data/spec/fixtures/countries.yml +0 -3
- data/spec/fixtures/gateways.yml +0 -8
- data/spec/fixtures/preferences.yml +0 -15
- data/spec/fixtures/roles.yml +0 -2
- data/spec/fixtures/states.yml +0 -2
- data/spec/fixtures/tax_categories.yml +0 -4
- data/spec/fixtures/users.yml +0 -5
- data/spec/fixtures/zone_members.yml +0 -7
- data/spec/fixtures/zones.yml +0 -4
- data/spec/lib/easy_role_requirement_system_spec.rb +0 -140
- data/spec/models/address_spec.rb +0 -79
- data/spec/models/app_configuration_spec.rb +0 -13
- data/spec/models/creditcard_payment_spec.rb +0 -17
- data/spec/models/creditcard_spec.rb +0 -43
- data/spec/models/inventory_unit_spec.rb +0 -18
- data/spec/models/option_type_spec.rb +0 -36
- data/spec/models/option_value_spec.rb +0 -39
- data/spec/models/order_spec.rb +0 -207
- data/spec/models/payment_sepc.rb +0 -29
- data/spec/models/product_option_type_spec.rb +0 -38
- data/spec/models/product_property_spec.rb +0 -29
- data/spec/models/property_spec.rb +0 -37
- data/spec/models/prototype_spec.rb +0 -35
- data/spec/models/shipment_spec.rb +0 -8
- data/spec/models/shipping_category_spec.rb +0 -8
- data/spec/models/shipping_order_spec.rb +0 -113
- data/spec/models/tax_category_spec.rb +0 -11
- data/spec/models/taxon_spec.rb +0 -50
- data/spec/models/taxonomy_spec.rb +0 -37
- data/spec/models/zone_member_spec.rb +0 -5
- data/spec/models/zone_spec.rb +0 -137
- data/spec/rcov.opts +0 -2
- data/spec/spec.opts +0 -4
- data/spec/spec_helper.rb +0 -79
- data/vendor/extensions/overview_dashboard/spec/spec.opts +0 -6
- data/vendor/extensions/overview_dashboard/spec/spec_helper.rb +0 -37
- data/vendor/extensions/payment_gateway/spec/helpers/admin/gateways_helper_spec.rb +0 -6
- data/vendor/extensions/payment_gateway/spec/models/creditcard_spec.rb +0 -15
- data/vendor/extensions/payment_gateway/spec/models/gateway_spec.rb +0 -11
- data/vendor/extensions/payment_gateway/spec/models/order_spec.rb +0 -45
- data/vendor/extensions/payment_gateway/spec/spec.opts +0 -6
- data/vendor/extensions/payment_gateway/spec/spec_helper.rb +0 -37
- data/vendor/extensions/theme_default/spec/spec.opts +0 -6
- data/vendor/extensions/theme_default/spec/spec_helper.rb +0 -37
@@ -23,8 +23,8 @@ class PaymentMethod < ActiveRecord::Base
|
|
23
23
|
raise "You must implement payment_source_class method for this gateway."
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.available(
|
27
|
-
PaymentMethod.all.select { |p| p.active && (p.
|
26
|
+
def self.available(display_on=nil)
|
27
|
+
PaymentMethod.all.select { |p| p.active && (p.display_on == display_on.to_s || p.display_on.blank?) && (p.environment == ENV['RAILS_ENV'] || p.environment.blank?) }
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.active?
|
data/app/models/product.rb
CHANGED
@@ -20,7 +20,6 @@
|
|
20
20
|
class Product < ActiveRecord::Base
|
21
21
|
has_many :product_option_types, :dependent => :destroy
|
22
22
|
has_many :option_types, :through => :product_option_types
|
23
|
-
has_many :variants, :dependent => :destroy
|
24
23
|
has_many :product_properties, :dependent => :destroy, :attributes => true
|
25
24
|
has_many :properties, :through => :product_properties
|
26
25
|
has_many :images, :as => :viewable, :order => :position, :dependent => :destroy
|
@@ -193,7 +192,7 @@ class Product < ActiveRecord::Base
|
|
193
192
|
# allows extensions to override deleted? if they want to provide
|
194
193
|
# their own definition.
|
195
194
|
def deleted?
|
196
|
-
deleted_at
|
195
|
+
!!deleted_at
|
197
196
|
end
|
198
197
|
|
199
198
|
# split variants list into hash which shows mapping of opt value onto matching variants
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class ReturnAuthorization < ActiveRecord::Base
|
2
2
|
belongs_to :order
|
3
3
|
has_many :inventory_units
|
4
|
-
|
4
|
+
before_create :generate_number
|
5
5
|
|
6
6
|
validates_presence_of :order
|
7
7
|
validates_numericality_of :amount
|
@@ -51,6 +51,8 @@ class ReturnAuthorization < ActiveRecord::Base
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def generate_number
|
54
|
+
return if self.number
|
55
|
+
|
54
56
|
record = true
|
55
57
|
while record
|
56
58
|
random = "RMA#{Array.new(9){rand(9)}.join}"
|
@@ -1,4 +1,5 @@
|
|
1
1
|
class ShippingMethod < ActiveRecord::Base
|
2
|
+
DISPLAY = [:both, :front_end, :back_end]
|
2
3
|
belongs_to :zone
|
3
4
|
has_many :shipping_rates
|
4
5
|
has_many :shipments
|
@@ -21,16 +22,25 @@ class ShippingMethod < ActiveRecord::Base
|
|
21
22
|
return(calculated_costs)
|
22
23
|
end
|
23
24
|
|
24
|
-
def available?(order)
|
25
|
-
calculator.available?(order)
|
25
|
+
def available?(order, display_on=nil)
|
26
|
+
(self.display_on == display_on.to_s || self.display_on.blank?) && calculator.available?(order)
|
26
27
|
end
|
27
28
|
|
28
|
-
def available_to_order?(order)
|
29
|
-
|
29
|
+
def available_to_order?(order, display_on=nil)
|
30
|
+
_zone = Zone.cached.detect {|zone| zone.id == self.zone_id }
|
31
|
+
available?(order, display_on) && _zone && _zone.include?(order.ship_address)
|
30
32
|
end
|
31
33
|
|
32
|
-
def self.all_available(order)
|
33
|
-
|
34
|
+
def self.all_available(order, display_on=nil)
|
35
|
+
cached.select { |method| method.available_to_order?(order,display_on)}
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.cached
|
39
|
+
if Rails.configuration.cache_classes
|
40
|
+
Rails.cache.fetch("ShippingMethod.all") { ShippingMethod.all(:include => :calculator) }
|
41
|
+
else
|
42
|
+
ShippingMethod.all(:include => :calculator)
|
43
|
+
end
|
34
44
|
end
|
35
45
|
|
36
46
|
end
|
data/app/models/zone.rb
CHANGED
@@ -35,9 +35,10 @@ class Zone < ActiveRecord::Base
|
|
35
35
|
|
36
36
|
def include?(address)
|
37
37
|
return false unless address
|
38
|
+
_zone_members = Zone.cached.detect {|zone| zone.id == self.id }.zone_members
|
38
39
|
|
39
40
|
# NOTE: This is complicated by the fact that include? for HMP is broken in Rails 2.1 (so we use awkward index method)
|
40
|
-
|
41
|
+
_zone_members.any? do |zone_member|
|
41
42
|
case zone_member.zoneable_type
|
42
43
|
when "Zone"
|
43
44
|
zone_member.zoneable.include?(address)
|
@@ -51,20 +52,50 @@ class Zone < ActiveRecord::Base
|
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
55
|
+
def self.cached
|
56
|
+
if Rails.configuration.cache_classes
|
57
|
+
Rails.cache.fetch("Zone.all") { Zone.all(:include => {:zone_members => :zoneable}) }
|
58
|
+
else
|
59
|
+
Zone.all()
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
54
63
|
def self.match(address)
|
55
|
-
|
64
|
+
cached.select {|zone| zone.include?(address)}
|
65
|
+
end
|
66
|
+
|
67
|
+
# convenience method for returning the states contained within a zone (different then the states method which only
|
68
|
+
# returns the zones children and does not consider the grand children if the children themselves are zones)
|
69
|
+
def state_list
|
70
|
+
_zone_members = Zone.cached.detect {|zone| zone.id == self.id }.zone_members
|
71
|
+
_zone_members.map {|zone_member|
|
72
|
+
case zone_member.zoneable_type
|
73
|
+
when "Zone"
|
74
|
+
zone_member.zoneable.state_list
|
75
|
+
when "Country"
|
76
|
+
zone_member.zoneable.states
|
77
|
+
when "State"
|
78
|
+
zone_member.zoneable
|
79
|
+
else
|
80
|
+
nil
|
81
|
+
end
|
82
|
+
}.flatten.compact.uniq
|
56
83
|
end
|
57
84
|
|
58
85
|
# convenience method for returning the countries contained within a zone (different then the countries method which only
|
59
86
|
# returns the zones children and does not consider the grand children if the children themselves are zones)
|
60
87
|
def country_list
|
61
|
-
|
88
|
+
_zone_members = Zone.cached.detect {|zone| zone.id == self.id }.zone_members
|
89
|
+
country_ids = []
|
90
|
+
_zone_members.map {|zone_member|
|
62
91
|
case zone_member.zoneable_type
|
63
92
|
when "Zone"
|
64
93
|
zone_member.zoneable.country_list
|
65
94
|
when "Country"
|
66
95
|
zone_member.zoneable
|
67
96
|
when "State"
|
97
|
+
next if country_ids.include?(zone_member.zoneable.country_id)
|
98
|
+
country_ids << zone_member.zoneable.country_id
|
68
99
|
zone_member.zoneable.country
|
69
100
|
else
|
70
101
|
nil
|
data/config/database.yml
CHANGED
@@ -1,24 +1,7 @@
|
|
1
|
-
# Default database configuration
|
2
|
-
|
3
1
|
development:
|
4
2
|
adapter: sqlite3
|
5
|
-
database: db/
|
6
|
-
pool: 5
|
7
|
-
timeout: 5000
|
8
|
-
|
9
|
-
# development:
|
10
|
-
# adapter: mysql
|
11
|
-
# database: spree_dev
|
12
|
-
# username: root
|
13
|
-
# pool: 5
|
14
|
-
# timeout: 5000
|
3
|
+
database: db/dev.sqlite3
|
15
4
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# database: spree_test
|
20
|
-
# username: root
|
21
|
-
#
|
22
|
-
# cucumber:
|
23
|
-
# adapter: sqlite3
|
24
|
-
# database: db/test.sqlite3
|
5
|
+
test:
|
6
|
+
adapter: sqlite3
|
7
|
+
database: db/test.sqlite3
|
data/config/environment.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
6
|
|
7
7
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
SPREE_GEM_VERSION = '0.11.
|
8
|
+
SPREE_GEM_VERSION = '0.11.1' unless defined? SPREE_GEM_VERSION
|
9
9
|
|
10
10
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
11
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -27,9 +27,9 @@ Spree::Initializer.run do |config|
|
|
27
27
|
# config.gem "aws-s3", :lib => "aws/s3"
|
28
28
|
|
29
29
|
config.gem "highline", :version => '1.5.1'
|
30
|
-
config.gem 'authlogic', :version => '2.1.3'
|
30
|
+
config.gem 'authlogic', :version => '>=2.1.3'
|
31
31
|
config.gem 'authlogic-oid', :lib => "authlogic_openid", :version => '1.0.4'
|
32
|
-
config.gem "activemerchant", :lib => "active_merchant", :version => '1.
|
32
|
+
config.gem "activemerchant", :lib => "active_merchant", :version => '1.7.0'
|
33
33
|
config.gem 'activerecord-tableless', :lib => 'tableless', :version => '0.1.0'
|
34
34
|
config.gem 'less', :version => '1.2.20'
|
35
35
|
config.gem 'stringex', :lib => 'stringex', :version => '1.0.3'
|
@@ -37,7 +37,7 @@ Spree::Initializer.run do |config|
|
|
37
37
|
config.gem 'whenever', :lib => false, :version => '0.3.7'
|
38
38
|
config.gem 'searchlogic', :version => '2.3.5'
|
39
39
|
config.gem 'will_paginate', :lib => 'will_paginate', :version => '2.3.14'
|
40
|
-
config.gem 'state_machine', :lib => 'state_machine', :version => '0.
|
40
|
+
config.gem 'state_machine', :lib => 'state_machine', :version => '0.9.2'
|
41
41
|
config.gem "faker", :version => '0.3.1'
|
42
42
|
config.gem 'paperclip', :version => '>=2.3.1.1'
|
43
43
|
config.gem 'ruby-openid', :lib => "openid", :version => '>=2.0.4'
|
@@ -73,11 +73,11 @@ Spree::Initializer.run do |config|
|
|
73
73
|
|
74
74
|
# Activate observers that should always be running
|
75
75
|
# config.active_record.observers = :cacher, :garbage_collector
|
76
|
-
config.active_record.observers = :state_monitor
|
76
|
+
config.active_record.observers = :state_monitor, :model_cache_cleaner
|
77
77
|
|
78
78
|
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
79
79
|
# All files from config/locales/*.rb,yml are added automatically.
|
80
|
-
#config.i18n.load_path << Dir[
|
80
|
+
#config.i18n.load_path << Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
81
81
|
config.i18n.default_locale = :'en'
|
82
82
|
|
83
83
|
end
|
data/config/environments/test.rb
CHANGED
@@ -24,3 +24,4 @@ config.action_controller.allow_forgery_protection = false
|
|
24
24
|
config.gem "shoulda", :lib => "shoulda", :version => "2.10.2"
|
25
25
|
config.gem "factory_girl", :lib => "factory_girl", :version => "1.2.3"
|
26
26
|
config.gem 'test-unit', :lib => 'test/unit', :version => '~>2.0.9' if RUBY_VERSION.to_f >= 1.9
|
27
|
+
config.gem "rspec", :lib => 'spec'
|
data/config/locales/en_spree.yml
CHANGED
@@ -231,7 +231,7 @@ en:
|
|
231
231
|
allow_backorders: "Allow Backorders"
|
232
232
|
allow_ssl_to_be_used_when_in_developement_and_test_modes: Allow SSL to be used when in development and test modes
|
233
233
|
allow_ssl_to_be_used_when_in_production_mode: Allow SSL to be used in production mode
|
234
|
-
allowed_ssl_in_production_mode: "SSL will {
|
234
|
+
allowed_ssl_in_production_mode: "SSL will %{not} be used in production"
|
235
235
|
already_registered: Already Registered?
|
236
236
|
alternative_phone: Alternative Phone
|
237
237
|
amount: Amount
|
@@ -253,7 +253,7 @@ en:
|
|
253
253
|
back_end: Back End
|
254
254
|
back_to_store: "Go Back To Store"
|
255
255
|
backordered: Backordered
|
256
|
-
backordering_is_allowed: "Backordering {
|
256
|
+
backordering_is_allowed: "Backordering %{not} allowed"
|
257
257
|
balance_due: "Balance Due"
|
258
258
|
best_selling_products: "Best Selling Products"
|
259
259
|
best_selling_taxons: "Best Selling Taxons"
|
@@ -309,7 +309,7 @@ en:
|
|
309
309
|
copy_all_mails_to: Copy All Mails To
|
310
310
|
cost_price: "Cost Price"
|
311
311
|
count: Count
|
312
|
-
count_of_reduced_by: "count of
|
312
|
+
count_of_reduced_by: "count of %{name}' reduced by %{count}"
|
313
313
|
country: Country
|
314
314
|
country_based: "Country Based"
|
315
315
|
coupon: Coupon
|
@@ -526,6 +526,7 @@ en:
|
|
526
526
|
none: None
|
527
527
|
none_available: "None Available"
|
528
528
|
not: not
|
529
|
+
not_shown: "Not Shown"
|
529
530
|
note: Note
|
530
531
|
notice_messages:
|
531
532
|
option_type_removed: "Succesfully removed option type."
|
@@ -556,7 +557,7 @@ en:
|
|
556
557
|
order_processed_but_following_items_are_out_of_stock: "Your order has been processed, but following items are out of stock:"
|
557
558
|
order_processed_successfully: "Your order has been processed successfully"
|
558
559
|
order_summary: Order Summary
|
559
|
-
order_sure_want_to: "Are you sure you want to {
|
560
|
+
order_sure_want_to: "Are you sure you want to %{event} this order?"
|
560
561
|
order_total: "Order Total"
|
561
562
|
order_total_message: "The total amount charged to your card will be"
|
562
563
|
order_updated: "Order Updated"
|
@@ -596,7 +597,7 @@ en:
|
|
596
597
|
preview: Preview
|
597
598
|
previous: Previous
|
598
599
|
price: Price
|
599
|
-
price_with_vat_included: "{
|
600
|
+
price_with_vat_included: "%{price} (inc. VAT)"
|
600
601
|
problem_authorizing_card: "Problem authorizing credit card"
|
601
602
|
problem_capturing_card: "Problem capturing credit card"
|
602
603
|
problems_processing_order: "We had problems processing your order"
|
@@ -720,7 +721,7 @@ en:
|
|
720
721
|
name: "With property value"
|
721
722
|
sentence: with property <em>%s</em> and value <em>%s</em>
|
722
723
|
products: Products
|
723
|
-
products_with_zero_inventory_display: "Products with a zero inventory will {
|
724
|
+
products_with_zero_inventory_display: "Products with a zero inventory will %{not} be displayed"
|
724
725
|
properties: Properties
|
725
726
|
property: Property
|
726
727
|
prototype: Prototype
|
@@ -772,7 +773,7 @@ en:
|
|
772
773
|
scope: Scope
|
773
774
|
scopes: Scopes
|
774
775
|
search: Search
|
775
|
-
search_results: "Search results for '{
|
776
|
+
search_results: "Search results for '%{keywords}'"
|
776
777
|
secure_connection_type: Secure Connection Type
|
777
778
|
secure_creditcard: Secure Creditcard
|
778
779
|
select: Select
|
@@ -807,7 +808,7 @@ en:
|
|
807
808
|
shipping_rates: "Shipping Rates"
|
808
809
|
shipping_rates_description: "Manage shipping rates"
|
809
810
|
shipping_total: "Shipping Total"
|
810
|
-
shop_by_taxonomy: "Shop by {
|
811
|
+
shop_by_taxonomy: "Shop by %{taxonomy}"
|
811
812
|
shopping_cart: "Shopping Cart"
|
812
813
|
show: Show
|
813
814
|
show_active: "Show Active"
|
@@ -816,7 +817,7 @@ en:
|
|
816
817
|
show_only_complete_orders: "Only show complete orders"
|
817
818
|
show_out_of_stock_products: "Show out-of-stock products"
|
818
819
|
show_price_inc_vat: "Show price including VAT"
|
819
|
-
showing_first_n: "Showing first {
|
820
|
+
showing_first_n: "Showing first %{n}"
|
820
821
|
sign_up: "Sign up"
|
821
822
|
site_name: "Site Name"
|
822
823
|
site_url: "Site URL"
|
data/db/sample/orders.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
<%
|
1
|
+
<%
|
2
2
|
order_date = Time.now
|
3
|
-
1.upto(100) do |i|
|
3
|
+
1.upto(100) do |i|
|
4
4
|
order_date -= rand(12).hours
|
5
5
|
item_total = "#{1 + rand(400)}.#{rand(100)}".to_f
|
6
6
|
charges_total = "#{1 + rand(30)}.#{rand(100)}".to_f
|
@@ -8,7 +8,7 @@ order_date = Time.now
|
|
8
8
|
order_<%= i %>:
|
9
9
|
user: user_<%= rand(500) + 1%>
|
10
10
|
number: <%= "R#{Array.new(9){rand(9)}.join}" %>
|
11
|
-
state:
|
11
|
+
state: in_progress
|
12
12
|
item_total: <%= item_total %>
|
13
13
|
created_at: <%=order_date.to_s(:db)%>
|
14
14
|
completed_at: <%=order_date.to_s(:db)%>
|
data/db/sample/payments.rb
CHANGED
@@ -14,12 +14,13 @@ creditcard = Creditcard.create(:cc_type => "visa", :month => 12, :year => 2014,
|
|
14
14
|
|
15
15
|
Order.all.each_with_index do |order,index|
|
16
16
|
printf "\rProcessing order #{index}"
|
17
|
-
STDOUT.flush
|
17
|
+
STDOUT.flush
|
18
18
|
order.update_totals!
|
19
|
-
payment = order.checkout.payments.create(:amount => order.outstanding_balance,
|
20
|
-
:source => creditcard.clone,
|
19
|
+
payment = order.checkout.payments.create(:amount => order.outstanding_balance,
|
20
|
+
:source => creditcard.clone,
|
21
21
|
:payment_method => method)
|
22
|
-
|
23
|
-
order.
|
22
|
+
|
23
|
+
order.checkout.state = 'confirm'
|
24
|
+
order.checkout.next
|
24
25
|
end
|
25
26
|
puts
|
data/db/sample/products.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'find'
|
2
2
|
# make sure the product images directory exists
|
3
|
-
FileUtils.mkdir_p "#{
|
3
|
+
FileUtils.mkdir_p "#{Rails.root}/public/assets/products/"
|
4
4
|
|
5
5
|
# make product images available to the app
|
6
|
-
target = "#{
|
6
|
+
target = "#{Rails.root}/public/assets/products/"
|
7
7
|
source = "#{SPREE_ROOT}/lib/tasks/sample/products/"
|
8
8
|
|
9
9
|
Find.find(source) do |f|
|
data/db/schema.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
#
|
10
10
|
# It's strongly recommended to check this file into your version control system.
|
11
11
|
|
12
|
-
ActiveRecord::Schema.define(:version =>
|
12
|
+
ActiveRecord::Schema.define(:version => 20100624123336) do
|
13
13
|
|
14
14
|
create_table "addresses", :force => true do |t|
|
15
15
|
t.string "firstname"
|
@@ -132,34 +132,14 @@ ActiveRecord::Schema.define(:version => 20100605152042) do
|
|
132
132
|
t.string "gateway_payment_profile_id"
|
133
133
|
end
|
134
134
|
|
135
|
-
create_table "gateway_configurations", :force => true do |t|
|
136
|
-
t.integer "gateway_id"
|
137
|
-
t.datetime "created_at"
|
138
|
-
t.datetime "updated_at"
|
139
|
-
end
|
140
|
-
|
141
|
-
create_table "gateway_option_values", :force => true do |t|
|
142
|
-
t.integer "gateway_configuration_id"
|
143
|
-
t.integer "gateway_option_id"
|
144
|
-
t.text "value"
|
145
|
-
t.datetime "created_at"
|
146
|
-
t.datetime "updated_at"
|
147
|
-
end
|
148
|
-
|
149
|
-
create_table "gateway_options", :force => true do |t|
|
150
|
-
t.string "name"
|
151
|
-
t.text "description"
|
152
|
-
t.integer "gateway_id"
|
153
|
-
t.boolean "textarea", :default => false
|
154
|
-
t.datetime "created_at"
|
155
|
-
t.datetime "updated_at"
|
156
|
-
end
|
157
|
-
|
158
135
|
create_table "gateways", :force => true do |t|
|
159
|
-
t.string "
|
136
|
+
t.string "type"
|
160
137
|
t.string "name"
|
161
138
|
t.text "description"
|
162
|
-
t.boolean "active"
|
139
|
+
t.boolean "active", :default => true
|
140
|
+
t.string "environment", :default => "development"
|
141
|
+
t.string "server", :default => "test"
|
142
|
+
t.boolean "test_mode", :default => true
|
163
143
|
t.datetime "created_at"
|
164
144
|
t.datetime "updated_at"
|
165
145
|
end
|
@@ -260,7 +240,7 @@ ActiveRecord::Schema.define(:version => 20100605152042) do
|
|
260
240
|
t.datetime "created_at"
|
261
241
|
t.datetime "updated_at"
|
262
242
|
t.datetime "deleted_at"
|
263
|
-
t.string "
|
243
|
+
t.string "display_on"
|
264
244
|
end
|
265
245
|
|
266
246
|
create_table "payments", :force => true do |t|
|
@@ -425,6 +405,7 @@ ActiveRecord::Schema.define(:version => 20100605152042) do
|
|
425
405
|
t.string "name"
|
426
406
|
t.datetime "created_at"
|
427
407
|
t.datetime "updated_at"
|
408
|
+
t.string "display_on"
|
428
409
|
end
|
429
410
|
|
430
411
|
create_table "shipping_rates", :force => true do |t|
|
@@ -534,6 +515,7 @@ ActiveRecord::Schema.define(:version => 20100605152042) do
|
|
534
515
|
t.integer "ship_address_id"
|
535
516
|
t.integer "bill_address_id"
|
536
517
|
t.string "openid_identifier"
|
518
|
+
t.string "api_key", :limit => 40
|
537
519
|
end
|
538
520
|
|
539
521
|
add_index "users", ["openid_identifier"], :name => "index_users_on_openid_identifier"
|