spree 0.10.2 → 0.11.0
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 +81 -4
- data/CONTRIBUTORS +18 -10
- data/Rakefile +5 -4
- data/app/controllers/admin/adjustments_controller.rb +17 -3
- data/app/controllers/admin/base_controller.rb +2 -2
- data/app/controllers/admin/checkouts_controller.rb +43 -34
- data/app/controllers/admin/line_items_controller.rb +32 -18
- data/app/controllers/admin/option_types_controller.rb +1 -1
- data/app/controllers/admin/orders_controller.rb +28 -7
- data/app/controllers/admin/payments_controller.rb +7 -7
- data/app/controllers/admin/products_controller.rb +12 -23
- data/app/controllers/admin/reports_controller.rb +19 -7
- data/app/controllers/admin/return_authorizations_controller.rb +1 -1
- data/app/controllers/admin/shipments_controller.rb +9 -9
- data/app/controllers/admin/users_controller.rb +3 -1
- data/app/controllers/admin/variants_controller.rb +2 -2
- data/app/controllers/checkouts_controller.rb +29 -18
- data/app/controllers/content_controller.rb +1 -1
- data/{vendor/extensions/localization/app → app}/controllers/locale_controller.rb +1 -1
- data/app/controllers/orders_controller.rb +33 -30
- data/app/controllers/password_resets_controller.rb +4 -4
- data/app/controllers/products_controller.rb +0 -6
- data/app/controllers/spree/base_controller.rb +9 -2
- data/app/controllers/user_sessions_controller.rb +18 -18
- data/app/controllers/users_controller.rb +2 -2
- data/app/helpers/admin/base_helper.rb +5 -2
- data/app/helpers/admin/navigation_helper.rb +1 -1
- data/app/helpers/admin/orders_helper.rb +0 -13
- data/app/helpers/admin/products_helper.rb +0 -8
- data/app/helpers/checkouts_helper.rb +5 -5
- data/app/helpers/products_helper.rb +0 -12
- data/app/helpers/spree/base_helper.rb +10 -39
- data/app/helpers/taxons_helper.rb +1 -0
- data/app/models/address.rb +6 -1
- data/app/models/app_configuration.rb +15 -14
- data/app/models/calculator/flexi_rate.rb +2 -1
- data/app/models/calculator/vat.rb +1 -1
- data/app/models/checkout.rb +1 -1
- data/app/models/creditcard.rb +26 -20
- data/app/models/inventory_unit.rb +70 -21
- data/app/models/line_item.rb +25 -11
- data/app/models/order.rb +16 -10
- data/app/models/payment.rb +4 -1
- data/app/models/payment_method.rb +14 -5
- data/app/models/product.rb +12 -4
- data/app/models/role.rb +2 -2
- data/app/models/shipment.rb +21 -2
- data/app/models/tax_category.rb +8 -0
- data/app/models/taxon.rb +8 -0
- data/app/models/user.rb +2 -3
- data/app/models/variant.rb +18 -13
- data/config/boot.rb +1 -5
- data/config/cucumber.yml +7 -0
- data/config/database.yml +20 -37
- data/config/database.yml.example +5 -6
- data/config/environment.rb +6 -5
- data/config/environments/cucumber.rb +30 -0
- data/config/environments/production.rb +1 -4
- data/config/environments/staging.rb +3 -0
- data/config/environments/test.rb +1 -1
- data/config/initializers/cookie_verification_secret.rb +7 -0
- data/config/initializers/locales.rb +4 -2
- data/config/initializers/new_rails_defaults.rb +2 -0
- data/config/initializers/spree.rb +1 -0
- data/config/initializers/workarounds_for_ruby19.rb +0 -25
- data/config/locales/{en-US.yml → en_spree.yml} +18 -4
- data/config/routes.rb +2 -1
- data/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
- data/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
- data/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
- data/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
- data/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
- data/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
- data/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
- data/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
- data/db/sample/payment_methods.yml +8 -1
- data/db/sample/shipments.yml +2 -2
- data/db/schema.rb +54 -21
- data/features/checkout.feature +98 -0
- data/features/create_admin_user.feature +18 -0
- data/features/search.feature +35 -0
- data/features/sign_in.feature +25 -0
- data/features/sign_out.feature +12 -0
- data/features/sign_up.feature +20 -0
- data/features/step_definitions/error_steps.rb +3 -0
- data/features/step_definitions/model_steps.rb +3 -0
- data/features/step_definitions/pickle_steps.rb +73 -0
- data/features/step_definitions/role_steps.rb +8 -0
- data/features/step_definitions/session_steps.rb +14 -0
- data/features/step_definitions/user_steps.rb +67 -0
- data/features/step_definitions/web_steps.rb +197 -0
- data/features/support/create_admin_user.rb +6 -0
- data/features/support/env.rb +89 -0
- data/features/support/paths.rb +32 -0
- data/features/support/pickle.rb +24 -0
- data/features/work_with_cart.feature +41 -0
- data/lib/generators/extension_model/extension_model_generator.rb +10 -10
- data/lib/generators/instance/templates/databases/mysql.yml +11 -0
- data/lib/scopes/variant.rb +10 -0
- data/lib/spree.rb +3 -3
- data/lib/spree/extensions.rb +1 -1
- data/lib/tasks/cucumber.rake +47 -0
- data/lib/tasks/database.rake +29 -29
- data/public/images/admin/bg/spree_50.png +0 -0
- data/public/images/tile-header.png +0 -0
- data/public/images/tile-slider.png +0 -0
- data/public/javascripts/admin/checkouts/edit.js +33 -0
- data/public/javascripts/dashboard.js +2 -2
- data/public/javascripts/taxonomy.js +2 -2
- data/public/stylesheets/admin/admin-tables.css +4 -0
- data/public/stylesheets/admin/admin.css +31 -16
- data/public/stylesheets/screen.css +16 -3
- data/script/about +3 -2
- data/script/console +2 -2
- data/script/cucumber +10 -0
- data/script/dbconsole +1 -1
- data/script/destroy +2 -2
- data/script/generate +2 -2
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/plugin +2 -2
- data/script/runner +2 -2
- data/script/server +2 -2
- data/test/fixtures/payment_methods.yml +12 -0
- data/test/functional/admin/checkouts_controller_test.rb +0 -2
- data/test/functional/admin/line_items_controller_test.rb +78 -39
- data/test/functional/admin/products_controller_test.rb +4 -5
- data/test/integration/checkout_test.rb +1 -0
- data/test/test_helper.rb +114 -86
- data/test/unit/creditcard_test.rb +28 -7
- data/test/unit/flexi_rate_calculator_test.rb +75 -0
- data/test/unit/helpers/products_helper_test.rb +4 -4
- data/test/unit/inventory_unit_test.rb +39 -5
- data/test/unit/line_item_test.rb +60 -1
- data/test/unit/order_state_test.rb +85 -58
- data/test/unit/order_test.rb +144 -123
- data/test/unit/product_test.rb +21 -0
- data/test/unit/return_authorization_test.rb +22 -28
- data/test/unit/shipment_test.rb +19 -7
- data/test/unit/variant_test.rb +100 -24
- data/vendor/extensions/api/api_extension.rb +2 -2
- data/vendor/extensions/api/app/controllers/api/base_controller.rb +14 -6
- data/vendor/extensions/api/app/controllers/api/countries_controller.rb +4 -0
- data/vendor/extensions/api/app/controllers/api/orders_controller.rb +4 -4
- data/vendor/extensions/api/app/controllers/api/products_controller.rb +5 -1
- data/vendor/extensions/api/app/controllers/api/shipments_controller.rb +7 -7
- data/vendor/extensions/api/app/controllers/api/states_controller.rb +5 -0
- data/vendor/extensions/api/config/locales/{en-US.yml → en.yml} +2 -2
- data/vendor/extensions/api/config/routes.rb +5 -0
- data/vendor/extensions/api/test/integration/orders_api_test.rb +4 -4
- data/vendor/extensions/overview_dashboard/app/views/admin/overview/index.html.erb +1 -1
- data/vendor/extensions/payment_gateway/app/models/gateway.rb +1 -1
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +41 -29
- data/vendor/extensions/payment_gateway/app/models/gateway/bogus.rb +3 -3
- data/vendor/extensions/payment_gateway/app/models/gateway/eway.rb +11 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/sage_pay.rb +9 -0
- data/vendor/extensions/payment_gateway/config/locales/{en-US.yml → en.yml} +1 -1
- data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +46 -56
- data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +9 -10
- data/vendor/extensions/payment_gateway/test/unit/authorize_net_cim_test.rb +7 -6
- data/vendor/extensions/theme_default/app/stylesheets/_checkout.less +10 -3
- data/vendor/extensions/theme_default/app/views/admin/adjustments/index.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/checkouts/_form.html.erb +31 -5
- data/vendor/extensions/theme_default/app/views/admin/checkouts/show.html.erb +27 -16
- data/vendor/extensions/theme_default/app/views/admin/images/_form.html.erb +4 -0
- data/vendor/extensions/theme_default/app/views/admin/images/index.html.erb +16 -13
- data/vendor/extensions/theme_default/app/views/admin/orders/_add_product.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/orders/_form.html.erb +7 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/index.html.erb +5 -5
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/_form.html.erb +12 -6
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/index.html.erb +22 -11
- data/vendor/extensions/theme_default/app/views/admin/product_groups/update.js.erb +2 -2
- data/vendor/extensions/theme_default/app/views/admin/products/_form.html.erb +6 -4
- data/vendor/extensions/theme_default/app/views/admin/shared/_address_form.html.erb +64 -55
- data/vendor/extensions/theme_default/app/views/admin/shared/_configuration_menu.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shared/_order_tabs.html.erb +11 -3
- data/vendor/extensions/theme_default/app/views/admin/shared/_product_tabs.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shipments/_form.html.erb +32 -29
- data/vendor/extensions/theme_default/app/views/admin/shipments/index.html.erb +2 -1
- data/vendor/extensions/theme_default/app/views/admin/tax_categories/_form.html.erb +6 -3
- data/vendor/extensions/theme_default/app/views/admin/tax_categories/index.html.erb +4 -2
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/_taxon.html.erb +2 -2
- data/vendor/extensions/theme_default/app/views/admin/taxons/_form.html.erb +11 -1
- data/vendor/extensions/theme_default/app/views/admin/taxons/edit.html.erb +2 -2
- data/vendor/extensions/theme_default/app/views/admin/users/_form.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/variants/_form.html.erb +4 -2
- data/vendor/extensions/theme_default/app/views/checkouts/_confirm.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/checkouts/_delivery.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +6 -6
- data/vendor/extensions/theme_default/app/views/checkouts/edit.html.erb +3 -3
- data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +7 -5
- data/vendor/extensions/theme_default/app/views/layouts/spree_application.html.erb +8 -4
- data/vendor/extensions/theme_default/app/views/orders/_line_item.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/products/index.html.erb +0 -1
- data/vendor/extensions/theme_default/app/views/shared/_footer.html.erb +4 -2
- data/vendor/extensions/theme_default/app/views/shared/_products.html.erb +3 -1
- data/vendor/extensions/theme_default/app/views/shared/_user_form.html.erb +1 -1
- data/vendor/extensions/theme_default/public/images/admin/bg/spree_50.png +0 -0
- data/vendor/extensions/theme_default/public/images/tile-header.png +0 -0
- data/vendor/extensions/theme_default/public/images/tile-slider.png +0 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/checkouts/edit.js +50 -0
- data/vendor/extensions/theme_default/public/javascripts/taxonomy.js +2 -2
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin-tables.css +8 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +31 -16
- data/vendor/extensions/theme_default/public/stylesheets/screen.css +16 -3
- data/vendor/plugins/attribute_fu/{tasks → lib/tasks}/attribute_fu_tasks.rake +0 -0
- data/vendor/plugins/enumerable_constants/{tasks → lib/tasks}/enumerable_constants_tasks.rake +0 -0
- data/vendor/plugins/find_by_param/lib/find_by_param.rb +9 -5
- data/vendor/plugins/find_by_param/{tasks → lib/tasks}/find_by_param_tasks.rake +0 -0
- data/vendor/plugins/jrails/{tasks → lib/tasks}/jrails.rake +0 -0
- data/vendor/plugins/jrails_auto_complete/{tasks → lib/tasks}/jrails_auto_complete_tasks.rake +0 -0
- data/vendor/plugins/mail_queue/{tasks → lib/tasks}/mailer_queue_tasks.rake +0 -0
- data/vendor/plugins/open_id_authentication/{tasks → lib/tasks}/open_id_authentication_tasks.rake +0 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb +2 -2
- data/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +7 -7
- data/vendor/plugins/unobtrusive_date_picker/{tasks → lib/tasks}/datepicker_tasks.rake +0 -0
- metadata +82 -342
- data/app/helpers/admin/adjustments_helper.rb +0 -2
- data/app/helpers/admin/checkouts_helper.rb +0 -2
- data/app/helpers/admin/line_items_helper.rb +0 -2
- data/app/helpers/admin/properties_helper.rb +0 -9
- data/app/helpers/admin/prototypes_helper.rb +0 -18
- data/app/helpers/admin/return_authorizations_helper.rb +0 -2
- data/config/locales/cs-CZ.yml +0 -924
- data/config/locales/cs-CZ_rails.yml +0 -202
- data/config/locales/da.yml +0 -924
- data/config/locales/da_rails.yml +0 -197
- data/config/locales/de-CH.yml +0 -924
- data/config/locales/de-CH_rails.yml +0 -142
- data/config/locales/de.yml +0 -924
- data/config/locales/de_rails.yml +0 -140
- data/config/locales/en-AU.yml +0 -924
- data/config/locales/en-AU_rails.yml +0 -202
- data/config/locales/en-GB.yml +0 -924
- data/config/locales/en-GB_rails.yml +0 -196
- data/config/locales/en-US_rails.yml +0 -200
- data/config/locales/es.yml +0 -924
- data/config/locales/es_rails.yml +0 -173
- data/config/locales/fi.yml +0 -924
- data/config/locales/fi_rails.yml +0 -143
- data/config/locales/fr-FR.yml +0 -924
- data/config/locales/fr-FR_rails.yml +0 -123
- data/config/locales/il.yml +0 -924
- data/config/locales/il_rails.yml +0 -103
- data/config/locales/it.yml +0 -924
- data/config/locales/it_rails.yml +0 -146
- data/config/locales/jp.yml +0 -924
- data/config/locales/jp_rails.yml +0 -135
- data/config/locales/mx.yml +0 -924
- data/config/locales/mx_rails.yml +0 -181
- data/config/locales/nb-NO.yml +0 -924
- data/config/locales/nb-NO_rails.yml +0 -105
- data/config/locales/nl-BE.yml +0 -924
- data/config/locales/nl-BE_rails.yml +0 -155
- data/config/locales/nl-NL.yml +0 -924
- data/config/locales/nl-NL_rails.yml +0 -172
- data/config/locales/pl.yml +0 -924
- data/config/locales/pl_rails.yml +0 -118
- data/config/locales/pt-BR.yml +0 -924
- data/config/locales/pt-BR_rails.yml +0 -138
- data/config/locales/pt-PT.yml +0 -924
- data/config/locales/pt-PT_rails.yml +0 -133
- data/config/locales/ru-RU.yml +0 -924
- data/config/locales/ru-RU_rails.yml +0 -206
- data/config/locales/th.yml +0 -924
- data/config/locales/th_rails.yml +0 -195
- data/config/locales/vn.yml +0 -924
- data/config/locales/vn_rails.yml +0 -202
- data/lib/tasks/translation.rake +0 -102
- data/vendor/extensions/localization/README.rdoc +0 -5
- data/vendor/extensions/localization/Rakefile +0 -120
- data/vendor/extensions/localization/app/controllers/admin/localization_controller.rb +0 -2
- data/vendor/extensions/localization/app/helpers/locale_helper.rb +0 -2
- data/vendor/extensions/localization/app/helpers/localization_helper.rb +0 -2
- data/vendor/extensions/localization/app/views/shared/_language_bar.html.erb +0 -8
- data/vendor/extensions/localization/config/routes.rb +0 -4
- data/vendor/extensions/localization/lib/localization/user_preferences.rb +0 -9
- data/vendor/extensions/localization/lib/tasks/localization_extension_tasks.rake +0 -17
- data/vendor/extensions/localization/localization_extension.rb +0 -21
- data/vendor/extensions/localization/public/images/flags/ad.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ae.png +0 -0
- data/vendor/extensions/localization/public/images/flags/af.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ag.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ai.png +0 -0
- data/vendor/extensions/localization/public/images/flags/al.png +0 -0
- data/vendor/extensions/localization/public/images/flags/am.png +0 -0
- data/vendor/extensions/localization/public/images/flags/an.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ao.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ar.png +0 -0
- data/vendor/extensions/localization/public/images/flags/as.png +0 -0
- data/vendor/extensions/localization/public/images/flags/at.png +0 -0
- data/vendor/extensions/localization/public/images/flags/au.png +0 -0
- data/vendor/extensions/localization/public/images/flags/aw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ax.png +0 -0
- data/vendor/extensions/localization/public/images/flags/az.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ba.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bb.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bd.png +0 -0
- data/vendor/extensions/localization/public/images/flags/be.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bi.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bo.png +0 -0
- data/vendor/extensions/localization/public/images/flags/br.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bs.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/by.png +0 -0
- data/vendor/extensions/localization/public/images/flags/bz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ca.png +0 -0
- data/vendor/extensions/localization/public/images/flags/catalonia.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cd.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ch.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ci.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ck.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/co.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cs.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cx.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cy.png +0 -0
- data/vendor/extensions/localization/public/images/flags/cz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/da.png +0 -0
- data/vendor/extensions/localization/public/images/flags/de.png +0 -0
- data/vendor/extensions/localization/public/images/flags/de_CH.png +0 -0
- data/vendor/extensions/localization/public/images/flags/dj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/dm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/do.png +0 -0
- data/vendor/extensions/localization/public/images/flags/dz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ec.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ee.png +0 -0
- data/vendor/extensions/localization/public/images/flags/eg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/eh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/england.png +0 -0
- data/vendor/extensions/localization/public/images/flags/er.png +0 -0
- data/vendor/extensions/localization/public/images/flags/es.png +0 -0
- data/vendor/extensions/localization/public/images/flags/et.png +0 -0
- data/vendor/extensions/localization/public/images/flags/europeanunion.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fam.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fi.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fo.png +0 -0
- data/vendor/extensions/localization/public/images/flags/fr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ga.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gb.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gd.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ge.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gi.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gp.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gq.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gs.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/gy.png +0 -0
- data/vendor/extensions/localization/public/images/flags/hk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/hm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/hn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/hr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ht.png +0 -0
- data/vendor/extensions/localization/public/images/flags/hu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/id.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ie.png +0 -0
- data/vendor/extensions/localization/public/images/flags/il.png +0 -0
- data/vendor/extensions/localization/public/images/flags/in.png +0 -0
- data/vendor/extensions/localization/public/images/flags/io.png +0 -0
- data/vendor/extensions/localization/public/images/flags/iq.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ir.png +0 -0
- data/vendor/extensions/localization/public/images/flags/is.png +0 -0
- data/vendor/extensions/localization/public/images/flags/it.png +0 -0
- data/vendor/extensions/localization/public/images/flags/jm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/jo.png +0 -0
- data/vendor/extensions/localization/public/images/flags/jp.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ke.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ki.png +0 -0
- data/vendor/extensions/localization/public/images/flags/km.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kp.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ky.png +0 -0
- data/vendor/extensions/localization/public/images/flags/kz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/la.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lb.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/li.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ls.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/lv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ly.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ma.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/md.png +0 -0
- data/vendor/extensions/localization/public/images/flags/me.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ml.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mo.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mp.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mq.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ms.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mx.png +0 -0
- data/vendor/extensions/localization/public/images/flags/my.png +0 -0
- data/vendor/extensions/localization/public/images/flags/mz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/na.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ne.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ng.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ni.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/no.png +0 -0
- data/vendor/extensions/localization/public/images/flags/np.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/nz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/om.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pa.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pe.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ph.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ps.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/pw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/py.png +0 -0
- data/vendor/extensions/localization/public/images/flags/qa.png +0 -0
- data/vendor/extensions/localization/public/images/flags/re.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ro.png +0 -0
- data/vendor/extensions/localization/public/images/flags/rs.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ru.png +0 -0
- data/vendor/extensions/localization/public/images/flags/rw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sa.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sb.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/scotland.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sd.png +0 -0
- data/vendor/extensions/localization/public/images/flags/se.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sh.png +0 -0
- data/vendor/extensions/localization/public/images/flags/si.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/so.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/st.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sy.png +0 -0
- data/vendor/extensions/localization/public/images/flags/sz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/td.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/th.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tk.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tl.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/to.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tr.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tv.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tw.png +0 -0
- data/vendor/extensions/localization/public/images/flags/tz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ua.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ug.png +0 -0
- data/vendor/extensions/localization/public/images/flags/um.png +0 -0
- data/vendor/extensions/localization/public/images/flags/us.png +0 -0
- data/vendor/extensions/localization/public/images/flags/uy.png +0 -0
- data/vendor/extensions/localization/public/images/flags/uz.png +0 -0
- data/vendor/extensions/localization/public/images/flags/va.png +0 -0
- data/vendor/extensions/localization/public/images/flags/vc.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ve.png +0 -0
- data/vendor/extensions/localization/public/images/flags/vg.png +0 -0
- data/vendor/extensions/localization/public/images/flags/vi.png +0 -0
- data/vendor/extensions/localization/public/images/flags/vn.png +0 -0
- data/vendor/extensions/localization/public/images/flags/vu.png +0 -0
- data/vendor/extensions/localization/public/images/flags/wales.png +0 -0
- data/vendor/extensions/localization/public/images/flags/wf.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ws.png +0 -0
- data/vendor/extensions/localization/public/images/flags/ye.png +0 -0
- data/vendor/extensions/localization/public/images/flags/yt.png +0 -0
- data/vendor/extensions/localization/public/images/flags/za.png +0 -0
- data/vendor/extensions/localization/public/images/flags/zm.png +0 -0
- data/vendor/extensions/localization/public/images/flags/zw.png +0 -0
- data/vendor/extensions/localization/spec/controllers/admin/localization_controller_spec.rb +0 -10
- data/vendor/extensions/localization/spec/controllers/locale_controller_spec.rb +0 -35
- data/vendor/extensions/localization/spec/helpers/locale_helper_spec.rb +0 -5
- data/vendor/extensions/localization/spec/helpers/localization_helper_spec.rb +0 -5
- data/vendor/extensions/localization/spec/spec.opts +0 -6
- data/vendor/extensions/localization/spec/spec_helper.rb +0 -37
- data/vendor/extensions/payment_gateway/app/models/gateway/protx.rb +0 -9
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/_manage_products.rhtml +0 -31
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/_success.rhtml +0 -1
Binary file
|
Binary file
|
Binary file
|
@@ -41,11 +41,17 @@ jQuery(document).ready(function(){
|
|
41
41
|
}
|
42
42
|
|
43
43
|
$("#customer_search").autocomplete("/admin/users.json", {
|
44
|
+
minChars: 5,
|
45
|
+
delay: 1500,
|
44
46
|
parse: prep_autocomplete_data,
|
45
47
|
formatItem: function(item) {
|
46
48
|
return format_autocomplete(item);
|
47
49
|
}
|
48
50
|
}).result(function(event, data, formatted) {
|
51
|
+
$('#user_id').val(data['id']);
|
52
|
+
$('#guest_checkout_true').removeAttr("checked");
|
53
|
+
$('#guest_checkout_false').attr("checked", "checked");
|
54
|
+
$('#guest_checkout_false').removeAttr("disabled");
|
49
55
|
$('#checkout_email').val(data['email']);
|
50
56
|
|
51
57
|
var addr = data['bill_address'];
|
@@ -80,6 +86,33 @@ jQuery(document).ready(function(){
|
|
80
86
|
show_billing(!this.checked);
|
81
87
|
});
|
82
88
|
|
89
|
+
$('#guest_checkout_true').change(function() {
|
90
|
+
$('#customer_search').val("");
|
91
|
+
$('#user_id').val("");
|
92
|
+
$('#checkout_email').val("");
|
93
|
+
$('#guest_checkout_false').attr("disabled", "true");
|
94
|
+
|
95
|
+
$('#checkout_bill_address_attributes_firstname').val("");
|
96
|
+
$('#checkout_bill_address_attributes_lastname').val("");
|
97
|
+
$('#checkout_bill_address_attributes_address1').val("");
|
98
|
+
$('#checkout_bill_address_attributes_address2').val("");
|
99
|
+
$('#checkout_bill_address_attributes_city').val("");
|
100
|
+
$('#checkout_bill_address_attributes_zipcode').val("");
|
101
|
+
$('#checkout_bill_address_attributes_state_id').val("");
|
102
|
+
$('#checkout_bill_address_attributes_country_id').val("");
|
103
|
+
$('#checkout_bill_address_attributes_phone').val("");
|
104
|
+
|
105
|
+
$('#checkout_ship_address_attributes_firstname').val("");
|
106
|
+
$('#checkout_ship_address_attributes_lastname').val("");
|
107
|
+
$('#checkout_ship_address_attributes_address1').val("");
|
108
|
+
$('#checkout_ship_address_attributes_address2').val("");
|
109
|
+
$('#checkout_ship_address_attributes_city').val("");
|
110
|
+
$('#checkout_ship_address_attributes_zipcode').val("");
|
111
|
+
$('#checkout_ship_address_attributes_state_id').val("");
|
112
|
+
$('#checkout_ship_address_attributes_country_id').val("");
|
113
|
+
$('#checkout_ship_address_attributes_phone').val("");
|
114
|
+
});
|
115
|
+
|
83
116
|
var show_billing = function(show) {
|
84
117
|
if(show) {
|
85
118
|
$('#shipping').show();
|
@@ -64,7 +64,7 @@ jQuery(document).ready(function(){
|
|
64
64
|
fontSize: '10pt',
|
65
65
|
textColor: '#476D9B'
|
66
66
|
},
|
67
|
-
min:
|
67
|
+
min: 0
|
68
68
|
},
|
69
69
|
xaxis:{
|
70
70
|
renderer:$.jqplot.DateAxisRenderer,
|
@@ -140,4 +140,4 @@ jQuery(document).ready(function(){
|
|
140
140
|
});
|
141
141
|
|
142
142
|
|
143
|
-
});
|
143
|
+
});
|
@@ -48,7 +48,7 @@ var handle_created = function(id,result) {
|
|
48
48
|
}
|
49
49
|
|
50
50
|
var handle_rename = function(li, tree, rb) {
|
51
|
-
var name = jQuery(li).children().text();
|
51
|
+
var name = jQuery(li).children(":first").text();
|
52
52
|
name = jQuery.trim(name);
|
53
53
|
|
54
54
|
if (creating){
|
@@ -193,4 +193,4 @@ jQuery(document).ready(function(){
|
|
193
193
|
e.preventDefault();
|
194
194
|
}
|
195
195
|
});
|
196
|
-
});
|
196
|
+
});
|
@@ -34,8 +34,20 @@ p.help-text {
|
|
34
34
|
|
35
35
|
|
36
36
|
body {
|
37
|
-
|
37
|
+
margin-top: 0px;
|
38
|
+
/*background: #ffffff;*/
|
39
|
+
/*background-color: #162F54;*/
|
38
40
|
color: #476D9B; }
|
41
|
+
.tile_bg_img{
|
42
|
+
width:100%;
|
43
|
+
background: #ffffff url(../../images/tile-slider.png) top left repeat-x;
|
44
|
+
}
|
45
|
+
.admin_header_bg{
|
46
|
+
width:100%;
|
47
|
+
|
48
|
+
height:95px;
|
49
|
+
background:url(../../images/tile-header.png) top left repeat-x;
|
50
|
+
}
|
39
51
|
a {
|
40
52
|
color: #4884BD; }
|
41
53
|
a:active,
|
@@ -75,6 +87,9 @@ body {
|
|
75
87
|
#sidebar h3 a {
|
76
88
|
color: #111;
|
77
89
|
text-decoration: none; }
|
90
|
+
#sidebar h5 {
|
91
|
+
margin: 0 10px;
|
92
|
+
float: left;}
|
78
93
|
#sidebar span.sku {
|
79
94
|
display: block;
|
80
95
|
font-weight: normal; }
|
@@ -129,14 +144,14 @@ body {
|
|
129
144
|
color: #fff; }
|
130
145
|
h1.logo {
|
131
146
|
float: left;
|
132
|
-
margin:
|
147
|
+
margin: 10px 10px 10px 10px; }
|
133
148
|
h1.logo a {
|
134
149
|
background: url(../../images/admin/bg/spree_50.png) left center no-repeat;
|
135
|
-
padding-left:
|
150
|
+
padding-left: 190px;
|
136
151
|
display: block;
|
137
|
-
height:
|
152
|
+
height: 82px;
|
138
153
|
text-decoration: none;
|
139
|
-
line-height:
|
154
|
+
line-height: 82px;
|
140
155
|
color: #BBDAFD; }
|
141
156
|
#admin-menu { clear: both; }
|
142
157
|
#admin-menu,
|
@@ -520,26 +535,26 @@ div.product-preview-products {
|
|
520
535
|
/* Product Groups */
|
521
536
|
|
522
537
|
table#product_scopes tr {
|
523
|
-
|
524
|
-
|
538
|
+
background-color: #eee;
|
539
|
+
|
525
540
|
}
|
526
541
|
table#product_scopes tr td {
|
527
|
-
|
528
|
-
|
529
|
-
|
542
|
+
border-top: 4px solid #fff;
|
543
|
+
border-bottom: 1px solid #bbb;
|
544
|
+
padding: 5px 10px;
|
530
545
|
}
|
531
546
|
table#product_scopes tr td.actions {
|
532
547
|
vertical-align: middle;
|
533
548
|
text-align: right;
|
534
549
|
}
|
535
550
|
table#product_scopes tr td table {
|
536
|
-
|
537
|
-
|
551
|
+
margin: 0;
|
552
|
+
width: auto;
|
538
553
|
}
|
539
554
|
table#product_scopes tr td table tr td {
|
540
|
-
|
541
|
-
|
542
|
-
|
555
|
+
padding: 0;
|
556
|
+
border: none;
|
557
|
+
padding-right: 5px;
|
543
558
|
}
|
544
559
|
|
545
560
|
#product_group_forms_container {
|
@@ -548,7 +563,7 @@ table#product_scopes tr td table tr td {
|
|
548
563
|
#new_product_group_form {
|
549
564
|
position: absolute;
|
550
565
|
right: 25px;
|
551
|
-
bottom: 0;
|
566
|
+
bottom: 0;
|
552
567
|
}
|
553
568
|
#new_product_group_form p {
|
554
569
|
text-align: right;
|
@@ -259,8 +259,8 @@ legend {
|
|
259
259
|
border-right: 1px solid #eeeeee;
|
260
260
|
}
|
261
261
|
body {
|
262
|
-
margin-top:
|
263
|
-
background: #ffffff url(../images/
|
262
|
+
margin-top: 0px;
|
263
|
+
background: #ffffff url(../images/tile-slider.png) top left repeat-x;
|
264
264
|
}
|
265
265
|
div.left {
|
266
266
|
float: left;
|
@@ -283,6 +283,12 @@ body.two-col #wrapper { background-image: url(../images/wrapper-back-2.png); }
|
|
283
283
|
overflow: hidden;
|
284
284
|
display: block;
|
285
285
|
}
|
286
|
+
|
287
|
+
.container_bg{
|
288
|
+
width:100%;
|
289
|
+
background:url(../images/tile-header.png) top left repeat-x;
|
290
|
+
}
|
291
|
+
|
286
292
|
#sidebar {
|
287
293
|
display: inline;
|
288
294
|
float: left;
|
@@ -309,7 +315,7 @@ body.two-col #content {
|
|
309
315
|
clear: both;
|
310
316
|
}
|
311
317
|
#header a { color: #2e6ab1; }
|
312
|
-
#header a:hover { color: #
|
318
|
+
#header a:hover { color: #3C7DFB; }
|
313
319
|
#footer {
|
314
320
|
padding-top: 2em;
|
315
321
|
clear: both;
|
@@ -1179,3 +1185,10 @@ div#checkout #payment-methods li.last {
|
|
1179
1185
|
float: left;
|
1180
1186
|
width: 190px;
|
1181
1187
|
}
|
1188
|
+
div#checkout #checkout-summary {
|
1189
|
+
background-color: #c3c9df;
|
1190
|
+
float: right;
|
1191
|
+
margin-top: 10px;
|
1192
|
+
padding: 20px;
|
1193
|
+
width: 180px;
|
1194
|
+
}
|
data/script/about
CHANGED
data/script/console
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/console'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/console'
|
data/script/cucumber
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
4
|
+
if vendored_cucumber_bin
|
5
|
+
load File.expand_path(vendored_cucumber_bin)
|
6
|
+
else
|
7
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
8
|
+
require 'cucumber'
|
9
|
+
load Cucumber::BINARY
|
10
|
+
end
|
data/script/dbconsole
CHANGED
data/script/destroy
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/destroy'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/destroy'
|
data/script/generate
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/generate'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/generate'
|
data/script/performance/profiler
CHANGED
data/script/plugin
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/plugin'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/plugin'
|
data/script/runner
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/runner'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/runner'
|
data/script/server
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.
|
3
|
-
require 'commands/server'
|
2
|
+
require File.expand_path('../../config/boot', __FILE__)
|
3
|
+
require 'commands/server'
|
@@ -16,3 +16,15 @@ check_payment_method:
|
|
16
16
|
environment: test
|
17
17
|
active: false
|
18
18
|
type: PaymentMethod::Check
|
19
|
+
check_payment_method_cucumber:
|
20
|
+
name: Check Payment Type
|
21
|
+
description: Check Payment Type for test.
|
22
|
+
environment: cucumber
|
23
|
+
active: true
|
24
|
+
type: PaymentMethod::Check
|
25
|
+
bogus_cucumber:
|
26
|
+
name: Bogus Test
|
27
|
+
description: Bogus payment gateway for test.
|
28
|
+
environment: cucumber
|
29
|
+
active: true
|
30
|
+
type: Gateway::Bogus
|
@@ -55,7 +55,6 @@ class Admin::CheckoutsControllerTest < ActionController::TestCase
|
|
55
55
|
|
56
56
|
should "render address details" do
|
57
57
|
assert_select "table" do
|
58
|
-
assert_select "th", :text => I18n.t("billing_address")
|
59
58
|
assert_select "input[id='checkout_bill_address_attributes_firstname'][value=?]", @checkout.bill_address.firstname
|
60
59
|
assert_select "input[id='checkout_bill_address_attributes_lastname'][value=?]", @checkout.bill_address.lastname
|
61
60
|
assert_select "input[id='checkout_bill_address_attributes_address1'][value=?]", @checkout.bill_address.address1
|
@@ -69,7 +68,6 @@ class Admin::CheckoutsControllerTest < ActionController::TestCase
|
|
69
68
|
end
|
70
69
|
|
71
70
|
assert_select "table" do
|
72
|
-
assert_select "th", :text => I18n.t("shipping_address")
|
73
71
|
assert_select "input[id='checkout_ship_address_attributes_firstname'][value=?]", @checkout.ship_address.firstname
|
74
72
|
assert_select "input[id='checkout_ship_address_attributes_lastname'][value=?]", @checkout.ship_address.lastname
|
75
73
|
assert_select "input[id='checkout_ship_address_attributes_address1'][value=?]", @checkout.ship_address.address1
|
@@ -10,7 +10,7 @@ class Admin::LineItemsControllerTest < ActionController::TestCase
|
|
10
10
|
@order.shipment.reload
|
11
11
|
@variant = Factory(:variant)
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
context "on POST to :create" do
|
15
15
|
setup do
|
16
16
|
post :create, {
|
@@ -20,33 +20,32 @@ class Admin::LineItemsControllerTest < ActionController::TestCase
|
|
20
20
|
}
|
21
21
|
@order.reload
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
should_assign_to :order
|
25
|
-
should_assign_to :line_item
|
26
25
|
should_respond_with :success
|
27
|
-
|
26
|
+
|
28
27
|
should_change("Order.line_items.size", :by => 1) { @order.line_items.size }
|
29
|
-
|
28
|
+
|
30
29
|
should_change("@order.total", :by => (19.99 * 3)) { @order.item_total.to_f }
|
31
|
-
|
30
|
+
|
32
31
|
should "render a form" do
|
33
32
|
assert_select "form[id='edit_order_#{@order.id}']" do
|
34
33
|
@order.reload.line_items.each do |line_item|
|
35
34
|
assert_select "tr[id='line_item_#{line_item.id}']"
|
36
35
|
end
|
37
|
-
|
36
|
+
|
38
37
|
end
|
39
38
|
end
|
40
|
-
|
39
|
+
|
41
40
|
end
|
42
|
-
|
41
|
+
|
43
42
|
context "with existing line_item" do
|
44
43
|
setup do
|
45
44
|
@line_item = Factory(:line_item, :variant => @variant, :order => @order, :price => 19.99, :quantity => 3)
|
46
45
|
@order.line_items.reload
|
47
46
|
@order.update_totals
|
48
47
|
end
|
49
|
-
|
48
|
+
|
50
49
|
context "on POST to :create" do
|
51
50
|
setup do
|
52
51
|
post :create, {
|
@@ -56,59 +55,59 @@ class Admin::LineItemsControllerTest < ActionController::TestCase
|
|
56
55
|
}
|
57
56
|
@order.reload
|
58
57
|
end
|
59
|
-
|
58
|
+
|
60
59
|
should_assign_to :order
|
61
60
|
should_respond_with :success
|
62
|
-
|
61
|
+
|
63
62
|
should_not_change("Order.line_items.size") { @order.line_items.size }
|
64
|
-
|
63
|
+
|
65
64
|
should_change("@order.line_items.total", :by => (19.99 * 3)) { @order.line_items.total.to_f }
|
66
65
|
should_change("@order.total", :by => (19.99 * 3)) { @order.item_total.to_f }
|
67
|
-
|
66
|
+
|
68
67
|
should "render a form" do
|
69
68
|
assert_select "form[id='edit_order_#{@order.id}']" do
|
70
69
|
@order.reload.line_items.each do |line_item|
|
71
70
|
assert_select "tr[id='line_item_#{line_item.id}']"
|
72
71
|
end
|
73
|
-
|
72
|
+
|
74
73
|
end
|
75
74
|
end
|
76
|
-
|
75
|
+
|
77
76
|
end
|
78
|
-
|
77
|
+
|
79
78
|
context "on PUT to :update with quantity = 2" do
|
80
79
|
setup do
|
81
|
-
|
82
80
|
put :update, {
|
83
81
|
"id" => @line_item.id,
|
84
82
|
"order_id" => @order.number,
|
85
83
|
"line_item" => {
|
86
84
|
"quantity" => 2}
|
87
85
|
}
|
88
|
-
|
86
|
+
|
89
87
|
@order.line_items.reload
|
90
88
|
@order.update_totals
|
89
|
+
@order.reload
|
91
90
|
end
|
92
|
-
|
91
|
+
|
93
92
|
should_assign_to :order
|
94
93
|
should_assign_to :line_item
|
95
94
|
should_respond_with :success
|
96
|
-
|
95
|
+
|
97
96
|
should_not_change("Order.line_items.size") { @order.line_items.size }
|
98
|
-
|
97
|
+
|
99
98
|
should_change("@order.line_items.total", :to => (19.99 * 2)) { @order.line_items.total.to_f }
|
100
99
|
should_change("@order.total", :to => (19.99 * 2)) { @order.total.to_f }
|
101
|
-
|
100
|
+
|
102
101
|
should "render a form" do
|
103
102
|
assert_select "form[id='edit_order_#{@order.id}']" do
|
104
103
|
@order.reload.line_items.each do |line_item|
|
105
104
|
assert_select "tr[id='line_item_#{line_item.id}']"
|
106
105
|
end
|
107
|
-
|
106
|
+
|
108
107
|
end
|
109
108
|
end
|
110
109
|
end
|
111
|
-
|
110
|
+
|
112
111
|
context "on PUT to :update with quantity = 0" do
|
113
112
|
setup do
|
114
113
|
put :update, {
|
@@ -117,61 +116,101 @@ class Admin::LineItemsControllerTest < ActionController::TestCase
|
|
117
116
|
"line_item" => {
|
118
117
|
"quantity" => 0}
|
119
118
|
}
|
120
|
-
|
119
|
+
|
121
120
|
@order.line_items.reload
|
122
121
|
@order.update_totals
|
123
122
|
end
|
124
|
-
|
123
|
+
|
125
124
|
should_assign_to :order
|
126
125
|
should_assign_to :line_item
|
127
126
|
should_respond_with :success
|
128
|
-
|
127
|
+
|
129
128
|
should_change("Order.line_items.size", :by => -1) { @order.line_items.size }
|
130
|
-
|
129
|
+
|
131
130
|
should_change("@order.line_items.total", :by => (19.99 * -3)) { @order.line_items.total.to_f }
|
132
131
|
should_change("@order.total", :by => (19.99 * -3)) { @order.total.to_f }
|
133
|
-
|
132
|
+
|
134
133
|
should "render a form" do
|
135
134
|
assert_select "form[id='edit_order_#{@order.id}']" do
|
136
135
|
@order.reload.line_items.each do |line_item|
|
137
136
|
assert_select "tr[id='line_item_#{line_item.id}']"
|
138
137
|
end
|
139
|
-
|
138
|
+
|
140
139
|
end
|
141
140
|
end
|
142
141
|
end
|
143
|
-
|
142
|
+
|
144
143
|
context "on DELETE to :destroy" do
|
145
144
|
setup do
|
146
145
|
delete :destroy, {
|
147
146
|
"id" => @line_item.id,
|
148
147
|
"order_id" => @order.number
|
149
148
|
}
|
150
|
-
|
149
|
+
|
151
150
|
@order.line_items.reload
|
152
151
|
@order.update_totals
|
153
|
-
|
152
|
+
|
154
153
|
should_assign_to :order
|
155
154
|
should_assign_to :line_item
|
156
155
|
should_respond_with :success
|
157
|
-
|
156
|
+
|
158
157
|
should_change("Order.line_items.size", :by => -1) { @order.line_items.size }
|
159
|
-
|
158
|
+
|
160
159
|
should_change("@order.line_items.total", :by => (19.99 * -3)) { @order.line_items.total.to_f }
|
161
160
|
should_change("@order.total", :by => (19.99 * -3)) { @order.total.to_f }
|
162
|
-
|
161
|
+
|
163
162
|
should "render a form" do
|
164
163
|
assert_select "form[id='edit_order_#{@order.id}']" do
|
165
164
|
@order.reload.line_items.each do |line_item|
|
166
165
|
assert_select "tr[id='line_item_#{line_item.id}']"
|
167
166
|
end
|
168
|
-
|
167
|
+
|
169
168
|
end
|
170
169
|
end
|
171
170
|
end
|
172
171
|
end
|
173
|
-
|
172
|
+
|
173
|
+
end
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
context "given a paid order" do
|
178
|
+
setup do
|
179
|
+
#Spree::Config.set(:auto_capture => true)
|
180
|
+
UserSession.create(Factory(:admin_user))
|
181
|
+
@variant = Factory(:variant)
|
182
|
+
create_paid_order
|
183
|
+
@order.reload
|
174
184
|
end
|
185
|
+
context "with existing line_item" do
|
186
|
+
setup do
|
187
|
+
@order.line_items.destroy_all
|
188
|
+
@order.adjustments.destroy_all
|
189
|
+
@line_item = Factory(:line_item, :variant => @variant, :order => @order, :price => 10.00, :quantity => 1)
|
190
|
+
@order.payments.first.update_attribute(:amount, 10.00)
|
191
|
+
@order.line_items.reload
|
192
|
+
@order.update_totals
|
193
|
+
end
|
194
|
+
context "on PUT to :update with quantity = 4" do
|
195
|
+
setup do
|
196
|
+
put :update, {
|
197
|
+
"id" => @line_item.id,
|
198
|
+
"order_id" => @order.number,
|
199
|
+
"line_item" => {
|
200
|
+
"quantity" => 2}
|
201
|
+
}
|
175
202
|
|
203
|
+
@order.line_items.reload
|
204
|
+
@order.reload
|
205
|
+
end
|
206
|
+
should "update the order total" do
|
207
|
+
assert_equal 20.0, @order.total.to_f
|
208
|
+
end
|
209
|
+
should "change order state to balance_due" do
|
210
|
+
assert @order.balance_due?
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
176
214
|
end
|
215
|
+
|
177
216
|
end
|