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
@@ -49,7 +49,7 @@ module EasyRoleRequirementSystem
|
|
49
49
|
|
50
50
|
module ClassMethods
|
51
51
|
def role_permissions_file_path
|
52
|
-
@role_permissions_file_path ||= "#{
|
52
|
+
@role_permissions_file_path ||= "#{Rails.root}/config/spree_permissions.yml"
|
53
53
|
end
|
54
54
|
|
55
55
|
def has_role_requirements?
|
@@ -1,6 +1,4 @@
|
|
1
1
|
class ExtensionGenerator < Rails::Generator::NamedBase
|
2
|
-
default_options :with_test_unit => false
|
3
|
-
|
4
2
|
attr_reader :extension_path, :extension_file_name
|
5
3
|
|
6
4
|
def initialize(runtime_args, runtime_options = {})
|
@@ -25,27 +23,16 @@ class ExtensionGenerator < Rails::Generator::NamedBase
|
|
25
23
|
m.template 'extension.rb', "#{extension_path}/#{extension_file_name}.rb"
|
26
24
|
m.template 'extension_hooks.rb', "#{extension_path}/#{file_name}_hooks.rb"
|
27
25
|
m.template 'tasks.rake', "#{extension_path}/lib/tasks/#{extension_file_name}_tasks.rake"
|
28
|
-
m.template 'routes.rb', "#{extension_path}/config/routes.rb"
|
26
|
+
m.template 'routes.rb', "#{extension_path}/config/routes.rb"
|
29
27
|
m.template 'seeds.rb', "#{extension_path}/db/seeds.rb"
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
m.directory "#{extension_path}/test/unit"
|
35
|
-
|
36
|
-
m.template 'Rakefile', "#{extension_path}/Rakefile"
|
37
|
-
m.template 'test_helper.rb', "#{extension_path}/test/test_helper.rb"
|
38
|
-
m.template 'functional_test.rb', "#{extension_path}/test/functional/#{extension_file_name}_test.rb"
|
39
|
-
else
|
40
|
-
m.directory "#{extension_path}/spec/controllers"
|
41
|
-
m.directory "#{extension_path}/spec/models"
|
42
|
-
m.directory "#{extension_path}/spec/views"
|
43
|
-
m.directory "#{extension_path}/spec/helpers"
|
29
|
+
m.directory "#{extension_path}/test/fixtures"
|
30
|
+
m.directory "#{extension_path}/test/functional"
|
31
|
+
m.directory "#{extension_path}/test/unit"
|
44
32
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
33
|
+
m.template 'Rakefile', "#{extension_path}/Rakefile"
|
34
|
+
m.template 'test_helper.rb', "#{extension_path}/test/test_helper.rb"
|
35
|
+
m.template 'functional_test.rb', "#{extension_path}/test/functional/#{extension_file_name}_test.rb"
|
49
36
|
end
|
50
37
|
end
|
51
38
|
|
@@ -60,7 +47,5 @@ class ExtensionGenerator < Rails::Generator::NamedBase
|
|
60
47
|
def add_options!(opt)
|
61
48
|
opt.separator ''
|
62
49
|
opt.separator 'Options:'
|
63
|
-
opt.on("--with-test-unit",
|
64
|
-
"Use Test::Unit for this extension instead of RSpec") { |v| options[:with_test_unit] = v }
|
65
50
|
end
|
66
51
|
end
|
@@ -8,7 +8,7 @@ class <%= class_name %>Test < Test::Unit::TestCase
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def test_initialization
|
11
|
-
assert_equal File.join(File.expand_path(
|
11
|
+
assert_equal File.join(File.expand_path(Rails.root), 'vendor', 'extensions', '<%= file_name %>'), <%= class_name %>.root
|
12
12
|
assert_equal '<%= extension_name %>', <%= class_name %>.extension_name
|
13
13
|
end
|
14
14
|
|
@@ -8,8 +8,8 @@ namespace :spree do
|
|
8
8
|
path = file.sub(<%= class_name %>.root, '')
|
9
9
|
directory = File.dirname(path)
|
10
10
|
puts "Copying #{path}..."
|
11
|
-
mkdir_p
|
12
|
-
cp file,
|
11
|
+
mkdir_p Rails.root + directory
|
12
|
+
cp file, Rails.root + path
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -11,9 +11,9 @@ require 'lib/plugins/string_extensions/lib/string_extensions'
|
|
11
11
|
class InstanceGenerator < Rails::Generator::Base
|
12
12
|
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
|
13
13
|
Config::CONFIG['ruby_install_name'])
|
14
|
-
|
14
|
+
|
15
15
|
DATABASES = %w( mysql postgresql sqlite3 sqlserver )
|
16
|
-
|
16
|
+
|
17
17
|
MYSQL_SOCKET_LOCATIONS = [
|
18
18
|
"/tmp/mysql.sock", # default
|
19
19
|
"/var/run/mysqld/mysqld.sock", # debian/gentoo
|
@@ -24,7 +24,7 @@ class InstanceGenerator < Rails::Generator::Base
|
|
24
24
|
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
|
25
25
|
"/opt/local/var/run/mysql5/mysqld.sock" # mac + darwinports + mysql5
|
26
26
|
]
|
27
|
-
|
27
|
+
|
28
28
|
default_options :db => "sqlite3", :shebang => DEFAULT_SHEBANG, :freeze => false
|
29
29
|
|
30
30
|
def initialize(runtime_args, runtime_options = {})
|
@@ -32,11 +32,11 @@ class InstanceGenerator < Rails::Generator::Base
|
|
32
32
|
usage if args.empty?
|
33
33
|
usage("Databases supported for preconfiguration are: #{DATABASES.join(", ")}") if (options[:db] && !DATABASES.include?(options[:db]))
|
34
34
|
@destination_root = args.shift
|
35
|
-
@app_name = File.basename(File.expand_path(@destination_root))
|
35
|
+
@app_name = File.basename(File.expand_path(@destination_root))
|
36
36
|
end
|
37
37
|
|
38
38
|
def manifest
|
39
|
-
|
39
|
+
|
40
40
|
md5 = Digest::MD5.new
|
41
41
|
now = Time.now
|
42
42
|
md5 << now.to_s
|
@@ -44,34 +44,34 @@ class InstanceGenerator < Rails::Generator::Base
|
|
44
44
|
md5 << String(rand(0))
|
45
45
|
md5 << String($$)
|
46
46
|
md5 << @app_name
|
47
|
-
|
47
|
+
|
48
48
|
# Do our best to generate a secure secret key for CookieStore
|
49
49
|
secret = ActiveSupport::SecureRandom.hex(64)
|
50
|
-
|
50
|
+
|
51
51
|
# The absolute location of the Spree files
|
52
|
-
root = File.expand_path(SPREE_ROOT)
|
53
|
-
|
52
|
+
root = File.expand_path(SPREE_ROOT)
|
53
|
+
|
54
54
|
# Use /usr/bin/env if no special shebang was specified
|
55
55
|
script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
|
56
56
|
dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }
|
57
|
-
|
57
|
+
|
58
58
|
record do |m|
|
59
59
|
# Root directory
|
60
60
|
m.directory ""
|
61
|
-
|
61
|
+
|
62
62
|
# Standard files and directories
|
63
63
|
base_dirs = %w(config config/environments config/initializers db log script public vendor/plugins vendor/extensions)
|
64
|
-
text_files = %w(CHANGELOG CONTRIBUTORS LICENSE INSTALL README.
|
64
|
+
text_files = %w(CHANGELOG CONTRIBUTORS LICENSE INSTALL README.md)
|
65
65
|
environments = Dir["#{root}/config/environments/*.rb"]
|
66
66
|
scripts = Dir["#{root}/script/**/*"].reject { |f| f =~ /(destroy|generate)$/ }
|
67
67
|
public_files = ["public/.htaccess.example"] + Dir["#{root}/public/**/*"]
|
68
68
|
frozen_gems = Dir["#{root}/vendor/gems/**/*"]
|
69
|
-
|
69
|
+
|
70
70
|
files = base_dirs + text_files + environments + scripts + public_files + frozen_gems
|
71
71
|
files.map! { |f| f = $1 if f =~ %r{^#{root}/(.+)$}; f }
|
72
|
-
|
72
|
+
|
73
73
|
files.sort!
|
74
|
-
|
74
|
+
|
75
75
|
files.each do |file|
|
76
76
|
case
|
77
77
|
when File.directory?("#{root}/#{file}")
|
@@ -87,10 +87,10 @@ class InstanceGenerator < Rails::Generator::Base
|
|
87
87
|
m.file spree_root(file), file
|
88
88
|
end
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
# script/generate
|
92
92
|
m.file "instance_generate", "script/generate", script_options
|
93
|
-
|
93
|
+
|
94
94
|
# database.yml and .htaccess
|
95
95
|
m.template "databases/#{options[:db]}.yml", "config/database.yml", :assigns => {
|
96
96
|
:app_name => File.basename(File.expand_path(@destination_root)),
|
@@ -107,23 +107,23 @@ class InstanceGenerator < Rails::Generator::Base
|
|
107
107
|
m.file "../../../../config/boot.rb", "config/boot.rb"
|
108
108
|
m.template "session_store.rb", "config/initializers/session_store.rb", :assigns => { :app_name => @app_name, :app_secret_key_to_be_replaced_in_real_app_by_generator => secret }
|
109
109
|
%w{backtrace_silencers inflections locales mime_types new_rails_defaults paperclip spree}.each do |initializer|
|
110
|
-
m.file "../../../../config/initializers/#{initializer}.rb", "config/initializers/#{initializer}.rb"
|
110
|
+
m.file "../../../../config/initializers/#{initializer}.rb", "config/initializers/#{initializer}.rb"
|
111
111
|
end
|
112
112
|
m.file "../../../../config/spree_permissions.yml", "config/spree_permissions.yml"
|
113
|
-
|
113
|
+
|
114
114
|
# Demo Configuration
|
115
115
|
if options[:demo]
|
116
116
|
m.file "demo_mongrel_cluster.yml", "config/mongrel_cluster.yml"
|
117
117
|
m.file "demo_robots.txt", "public/robots.txt"
|
118
118
|
end
|
119
119
|
end
|
120
|
-
end
|
121
|
-
|
120
|
+
end
|
121
|
+
|
122
122
|
def after_generate
|
123
123
|
Rails::Generator::Scripts::Generate.new.run(%w{extension site}, :destination => "#{@destination_root}/")
|
124
124
|
File.rename("#{@destination_root}/config/initializers/session_store.rb", "#{@destination_root}/vendor/extensions/site/config/initializers/session_store.rb")
|
125
125
|
puts File.read("#{@destination_root}/INSTALL") unless options[:pretend]
|
126
|
-
end
|
126
|
+
end
|
127
127
|
|
128
128
|
protected
|
129
129
|
|
@@ -141,7 +141,7 @@ class InstanceGenerator < Rails::Generator::Base
|
|
141
141
|
"Preconfigure for selected database (options: #{DATABASES.join(", ")}).",
|
142
142
|
"Default: mysql") { |v| options[:db] = v }
|
143
143
|
end
|
144
|
-
|
144
|
+
|
145
145
|
def mysql_socket_location
|
146
146
|
RUBY_PLATFORM =~ /mswin32/ ? MYSQL_SOCKET_LOCATIONS.find { |f| File.exists?(f) } : nil
|
147
147
|
end
|
@@ -151,5 +151,5 @@ class InstanceGenerator < Rails::Generator::Base
|
|
151
151
|
def spree_root(filename = '')
|
152
152
|
File.join("..", "..", "..", "..", filename)
|
153
153
|
end
|
154
|
-
|
154
|
+
|
155
155
|
end
|
@@ -8,7 +8,7 @@ class ThemeGenerator < Rails::Generator::NamedBase
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def manifest
|
11
|
-
|
11
|
+
|
12
12
|
record do |m|
|
13
13
|
m.directory "#{theme_path}/app/views"
|
14
14
|
m.directory "#{theme_path}/lib/tasks"
|
@@ -17,18 +17,14 @@ class ThemeGenerator < Rails::Generator::NamedBase
|
|
17
17
|
m.directory "#{theme_path}/public/images"
|
18
18
|
|
19
19
|
m.template 'README.markdown', "#{theme_path}/README.markdown"
|
20
|
-
|
20
|
+
|
21
21
|
# slight hack so we don't have to keep two copies (themes are extensions after all)
|
22
22
|
m.template '../../extension/templates/extension.rb', "#{theme_path}/#{theme_file_name}.rb"
|
23
23
|
m.template '../../extension/templates/extension_hooks.rb', "#{theme_path}/#{extension_name.downcase}_hooks.rb"
|
24
24
|
|
25
|
-
#if options[:with_test_unit]
|
26
|
-
|
27
|
-
|
28
|
-
#end
|
29
25
|
theme_default = '../../../../vendor/extensions/theme_default'
|
30
26
|
|
31
|
-
# eventually we should make this optional plus include admin css etc.
|
27
|
+
# eventually we should make this optional plus include admin css etc.
|
32
28
|
m.template "#{theme_default}/public/stylesheets/screen.css", "#{theme_path}/public/stylesheets/screen.css"
|
33
29
|
end
|
34
30
|
end
|
@@ -45,12 +41,12 @@ class ThemeGenerator < Rails::Generator::NamedBase
|
|
45
41
|
opt.separator ''
|
46
42
|
opt.separator 'Generates a new theme with compiled CSS by default'
|
47
43
|
opt.separator ''
|
48
|
-
|
44
|
+
|
49
45
|
# TODO - eventually implement these (tricky b/c manifest wants explicit list of files, not just directories)
|
50
|
-
|
46
|
+
|
51
47
|
# opt.separator 'Options:'
|
52
48
|
# opt.on("--views", "Copy the views from default theme") { |v| options[:views] = v }
|
53
49
|
# opt.on("--everything", "Complete copy of the default theme") { |v| options[:everything] = v }
|
54
|
-
# opt.on("--less", "Copy everything from the default theme") { |v| options[:views] = v }
|
50
|
+
# opt.on("--less", "Copy everything from the default theme") { |v| options[:views] = v }
|
55
51
|
end
|
56
52
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# copy the assets from extensions public dir into #{
|
2
|
-
destination = "#{
|
1
|
+
# copy the assets from extensions public dir into #{Rails.root}/public
|
2
|
+
destination = "#{Rails.root}/public"
|
3
3
|
paths_to_mirror = Spree::ExtensionLoader.instance.load_extension_roots
|
4
4
|
|
5
5
|
paths_to_mirror.each do |extension_path|
|
data/lib/spree.rb
CHANGED
data/lib/spree/initializer.rb
CHANGED
@@ -15,7 +15,7 @@ module Spree
|
|
15
15
|
attr_accessor :extensions
|
16
16
|
attr_accessor :view_paths
|
17
17
|
|
18
|
-
def initialize
|
18
|
+
def initialize
|
19
19
|
self.view_paths = []
|
20
20
|
self.extension_paths = default_extension_paths
|
21
21
|
self.extensions = Spree::Extensions.load_order
|
@@ -24,7 +24,7 @@ module Spree
|
|
24
24
|
|
25
25
|
def default_extension_paths
|
26
26
|
env = ENV["RAILS_ENV"] || RAILS_ENV
|
27
|
-
paths = [SPREE_ROOT + '/vendor/extensions',
|
27
|
+
paths = [SPREE_ROOT + '/vendor/extensions', Rails.root.to_s + '/vendor/extensions'].uniq
|
28
28
|
# There's no other way it will work, config/environments/test.rb loads too late
|
29
29
|
# TODO: Should figure out how to include this extension path only for the tests that need it
|
30
30
|
paths.unshift(SPREE_ROOT + "/test/fixtures/extensions") if env == "test"
|
@@ -37,12 +37,12 @@ module Spree
|
|
37
37
|
Dir["#{SPREE_ROOT}/vendor/*/lib"]
|
38
38
|
end
|
39
39
|
|
40
|
-
def framework_root_path
|
41
|
-
|
40
|
+
def framework_root_path
|
41
|
+
File.join(Rails.root, '/vendor/extensions')
|
42
42
|
end
|
43
43
|
|
44
44
|
# Provide the load paths for the Spree installation
|
45
|
-
def default_load_paths
|
45
|
+
def default_load_paths
|
46
46
|
paths = ["#{SPREE_ROOT}/test/mocks/#{environment}"]
|
47
47
|
|
48
48
|
# Add the app's controller directory
|
@@ -65,12 +65,12 @@ module Spree
|
|
65
65
|
).map { |dir| "#{SPREE_ROOT}/#{dir}" }.select { |dir| File.directory?(dir) }
|
66
66
|
|
67
67
|
paths.concat builtin_directories
|
68
|
-
paths.concat library_directories
|
68
|
+
paths.concat library_directories
|
69
69
|
end
|
70
70
|
|
71
71
|
def default_plugin_paths
|
72
72
|
[
|
73
|
-
"#{
|
73
|
+
"#{Rails.root}/vendor/plugins",
|
74
74
|
"#{SPREE_ROOT}/lib/plugins",
|
75
75
|
"#{SPREE_ROOT}/vendor/plugins"
|
76
76
|
]
|
@@ -97,7 +97,7 @@ module Spree
|
|
97
97
|
def install_gem_spec_stubs
|
98
98
|
#TODO - provide meaningful implementation (commented out for now so we can start server)
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
101
|
def set_autoload_paths
|
102
102
|
extension_loader.add_extension_paths
|
103
103
|
super
|
@@ -135,18 +135,18 @@ module Spree
|
|
135
135
|
# Add the default view paths
|
136
136
|
arr.concat configuration.view_paths
|
137
137
|
# Add the extension view paths
|
138
|
-
arr.concat extension_loader.view_paths
|
138
|
+
arr.concat extension_loader.view_paths
|
139
139
|
# Reverse the list so extensions come first
|
140
140
|
arr.reverse!
|
141
141
|
end
|
142
|
-
|
143
|
-
ActionMailer::Base.template_root = view_paths if configuration.frameworks.include?(:action_mailer)
|
142
|
+
|
143
|
+
ActionMailer::Base.template_root = view_paths if configuration.frameworks.include?(:action_mailer)
|
144
144
|
ActionController::Base.view_paths = view_paths if configuration.frameworks.include?(:action_controller)
|
145
145
|
|
146
|
-
|
147
|
-
|
146
|
+
if defined?(ActionMailer::QueueMailer)
|
147
|
+
ActionMailer::QueueMailer.template_root = view_paths if configuration.frameworks.include?(:action_mailer) end
|
148
148
|
end
|
149
|
-
|
149
|
+
|
150
150
|
def initialize_i18n
|
151
151
|
extension_loader.add_locale_paths
|
152
152
|
spree_locale_paths = Dir[File.join(SPREE_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
@@ -174,7 +174,7 @@ module Spree
|
|
174
174
|
def extension_loader
|
175
175
|
ExtensionLoader.instance {|l| l.initializer = self }
|
176
176
|
end
|
177
|
-
|
177
|
+
|
178
178
|
end
|
179
179
|
|
180
180
|
end
|
data/lib/spree/search.rb
CHANGED
@@ -12,7 +12,7 @@ module Spree::Search
|
|
12
12
|
params[:page] = 1 if (params[:page].to_i <= 0)
|
13
13
|
|
14
14
|
# Prepare a search within the parameters
|
15
|
-
Spree::Config.searcher.prepare(params)
|
15
|
+
Spree::Config.searcher.prepare(params) unless @keywords.blank?
|
16
16
|
|
17
17
|
if !params[:order_by_price].blank?
|
18
18
|
@product_group = ProductGroup.new.from_route([params[:order_by_price]+"_by_master_price"])
|
data/lib/tasks/cucumber.rake
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
9
9
|
|
10
|
-
vendored_cucumber_bin = Dir["#{
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
11
11
|
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
12
12
|
|
13
13
|
begin
|
data/lib/tasks/extensions.rake
CHANGED
@@ -165,9 +165,9 @@ namespace :spec do
|
|
165
165
|
if File.directory?(File.join(directory, 'spec'))
|
166
166
|
chdir directory do
|
167
167
|
if RUBY_PLATFORM =~ /win32/
|
168
|
-
system "rake.cmd spec SPREE_ENV_FILE=#{
|
168
|
+
system "rake.cmd spec SPREE_ENV_FILE=#{Rails.root}/config/environment"
|
169
169
|
else
|
170
|
-
system "rake spec SPREE_ENV_FILE=#{
|
170
|
+
system "rake spec SPREE_ENV_FILE=#{Rails.root}/config/environment"
|
171
171
|
end
|
172
172
|
result += $?.exitstatus
|
173
173
|
end
|
@@ -187,7 +187,7 @@ namespace :extensions do
|
|
187
187
|
extension_roots.each do |directory|
|
188
188
|
if File.directory?(File.join(directory, 'test/functional'))
|
189
189
|
chdir directory do
|
190
|
-
system "rake test:functionals SPREE_ENV_FILE=#{
|
190
|
+
system "rake test:functionals SPREE_ENV_FILE=#{Rails.root}/config/environment"
|
191
191
|
result += $?.exitstatus
|
192
192
|
end
|
193
193
|
end
|
@@ -202,7 +202,7 @@ namespace :extensions do
|
|
202
202
|
extension_roots.each do |directory|
|
203
203
|
if File.directory?(File.join(directory, 'test/unit'))
|
204
204
|
chdir directory do
|
205
|
-
system "rake test:units SPREE_ENV_FILE=#{
|
205
|
+
system "rake test:units SPREE_ENV_FILE=#{Rails.root}/config/environment"
|
206
206
|
result += $?.exitstatus
|
207
207
|
end
|
208
208
|
end
|
@@ -219,7 +219,7 @@ namespace :extensions do
|
|
219
219
|
extension_roots.each do |directory|
|
220
220
|
if File.directory?(File.join(directory, 'test'))
|
221
221
|
chdir directory do
|
222
|
-
system "rake test SPREE_ENV_FILE=#{
|
222
|
+
system "rake test SPREE_ENV_FILE=#{Rails.root}/config/environment"
|
223
223
|
result += $?.exitstatus
|
224
224
|
end
|
225
225
|
end
|
@@ -230,6 +230,6 @@ namespace :extensions do
|
|
230
230
|
end
|
231
231
|
|
232
232
|
# Load any custom rakefiles from extensions
|
233
|
-
[
|
233
|
+
[Rails.root.to_s, SPREE_ROOT].uniq.each do |root|
|
234
234
|
Dir[root + '/vendor/extensions/*/lib/tasks/*.rake'].sort.each { |ext| load ext }
|
235
235
|
end
|