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
data/app/models/role.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
class Role < ActiveRecord::Base
|
2
|
-
|
3
|
-
end
|
2
|
+
has_and_belongs_to_many :users
|
3
|
+
end
|
data/app/models/shipment.rb
CHANGED
@@ -8,13 +8,22 @@ class Shipment < ActiveRecord::Base
|
|
8
8
|
has_many :state_events, :as => :stateful
|
9
9
|
has_many :inventory_units
|
10
10
|
before_create :generate_shipment_number
|
11
|
+
after_create :set_correct_state
|
11
12
|
after_save :create_shipping_charge
|
13
|
+
after_destroy :release_inventory_units
|
12
14
|
|
13
15
|
attr_accessor :special_instructions
|
14
16
|
accepts_nested_attributes_for :address
|
15
17
|
accepts_nested_attributes_for :inventory_units
|
16
18
|
|
17
|
-
validates_presence_of :inventory_units, :if => Proc.new { |unit|
|
19
|
+
validates_presence_of :inventory_units, :if => Proc.new { |unit| !%w(in_progress canceled).include?(unit.order.state) }
|
20
|
+
make_permalink :field => :number
|
21
|
+
|
22
|
+
def to_param
|
23
|
+
self.number if self.number
|
24
|
+
generate_shipment_number unless self.number
|
25
|
+
self.number.parameterize.to_s.upcase
|
26
|
+
end
|
18
27
|
|
19
28
|
def shipped=(value)
|
20
29
|
return unless value == "1" && shipped_at.nil?
|
@@ -87,11 +96,17 @@ class Shipment < ActiveRecord::Base
|
|
87
96
|
return self.number unless self.number.blank?
|
88
97
|
record = true
|
89
98
|
while record
|
90
|
-
random = Array.new(11){rand(9)}.join
|
99
|
+
random = "H" + Array.new(11){rand(9)}.join
|
91
100
|
record = Shipment.find(:first, :conditions => ["number = ?", random])
|
92
101
|
end
|
93
102
|
self.number = random
|
94
103
|
end
|
104
|
+
|
105
|
+
def set_correct_state
|
106
|
+
if pending? and order.checkout_complete and !order.outstanding_balance?
|
107
|
+
ready
|
108
|
+
end
|
109
|
+
end
|
95
110
|
|
96
111
|
def description_for_shipping_charge
|
97
112
|
"#{I18n.t(:shipping)} (#{shipping_method.name})"
|
@@ -109,4 +124,8 @@ class Shipment < ActiveRecord::Base
|
|
109
124
|
end
|
110
125
|
end
|
111
126
|
|
127
|
+
def release_inventory_units
|
128
|
+
inventory_units.each {|unit| unit.update_attribute(:shipment_id, nil)}
|
129
|
+
end
|
130
|
+
|
112
131
|
end
|
data/app/models/tax_category.rb
CHANGED
@@ -3,4 +3,12 @@ class TaxCategory < ActiveRecord::Base
|
|
3
3
|
validates_uniqueness_of :name
|
4
4
|
|
5
5
|
has_many :tax_rates
|
6
|
+
|
7
|
+
def before_save
|
8
|
+
#set existing default tax category to false if this one has been marked as default
|
9
|
+
|
10
|
+
if is_default && tax_category = TaxCategory.find(:first, :conditions => {:is_default => true})
|
11
|
+
tax_category.update_attribute(:is_default, false)
|
12
|
+
end
|
13
|
+
end
|
6
14
|
end
|
data/app/models/taxon.rb
CHANGED
@@ -6,6 +6,14 @@ class Taxon < ActiveRecord::Base
|
|
6
6
|
before_create :set_permalink
|
7
7
|
before_save :ensure_trailing_slash
|
8
8
|
|
9
|
+
validates_presence_of :name
|
10
|
+
has_attached_file :icon,
|
11
|
+
:styles => { :mini => '32x32>', :normal => '128x128>' },
|
12
|
+
:default_style => :mini,
|
13
|
+
:url => "/assets/taxons/:id/:style/:basename.:extension",
|
14
|
+
:path => ":rails_root/public/assets/taxons/:id/:style/:basename.:extension",
|
15
|
+
:default_url => "/images/default_taxon.png"
|
16
|
+
|
9
17
|
# indicate which filters should be used for a taxon
|
10
18
|
# this method should be customized to your own site
|
11
19
|
include ::ProductFilters # for detailed defs of filters
|
data/app/models/user.rb
CHANGED
@@ -36,9 +36,8 @@ class User < ActiveRecord::Base
|
|
36
36
|
|
37
37
|
# has_role? simply needs to return true or false whether a user has a role or not.
|
38
38
|
def has_role?(role_in_question)
|
39
|
-
|
40
|
-
|
41
|
-
end
|
39
|
+
roles.any? { |role| role.name == role_in_question.to_s }
|
40
|
+
end
|
42
41
|
|
43
42
|
private
|
44
43
|
def password_required?
|
data/app/models/variant.rb
CHANGED
@@ -13,6 +13,7 @@ class Variant < ActiveRecord::Base
|
|
13
13
|
|
14
14
|
before_save :touch_product
|
15
15
|
|
16
|
+
include ::Scopes::Variant
|
16
17
|
# default variant scope only lists non-deleted variants
|
17
18
|
named_scope :active, :conditions => "variants.deleted_at is null"
|
18
19
|
named_scope :deleted, :conditions => "not variants.deleted_at is null"
|
@@ -25,23 +26,27 @@ class Variant < ActiveRecord::Base
|
|
25
26
|
|
26
27
|
# Returns number of inventory units for this variant (new records haven't been saved to database, yet)
|
27
28
|
def on_hand
|
28
|
-
self.count_on_hand
|
29
|
+
Spree::Config[:track_inventory_levels] ? self.count_on_hand : nil
|
29
30
|
end
|
30
31
|
|
31
32
|
# Adjusts the inventory units to match the given new level.
|
32
33
|
def on_hand=(new_level)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
iu
|
40
|
-
|
34
|
+
if Spree::Config[:track_inventory_levels]
|
35
|
+
delta_units = new_level.to_i - on_hand
|
36
|
+
|
37
|
+
# increase Inventory when positive delta
|
38
|
+
if delta_units > 0
|
39
|
+
# fill backordered orders before creating new units
|
40
|
+
inventory_units.with_state("backordered").slice(0, delta_units).each do |iu|
|
41
|
+
iu.fill_backorder
|
42
|
+
delta_units -= 1
|
43
|
+
end
|
41
44
|
end
|
42
|
-
end
|
43
45
|
|
44
|
-
|
46
|
+
self.count_on_hand += delta_units
|
47
|
+
else
|
48
|
+
raise "Cannot set on_hand value when Spree::Config[:track_inventory_levels] is false"
|
49
|
+
end
|
45
50
|
end
|
46
51
|
|
47
52
|
# returns number of units currently on backorder for this variant.
|
@@ -51,7 +56,7 @@ class Variant < ActiveRecord::Base
|
|
51
56
|
|
52
57
|
# returns true if at least one inventory unit of this variant is "on_hand"
|
53
58
|
def in_stock?
|
54
|
-
on_hand > 0
|
59
|
+
Spree::Config[:track_inventory_levels] ? on_hand > 0 : true
|
55
60
|
end
|
56
61
|
alias in_stock in_stock?
|
57
62
|
|
@@ -65,7 +70,7 @@ class Variant < ActiveRecord::Base
|
|
65
70
|
|
66
71
|
# returns true if this variant is allowed to be placed on a new order
|
67
72
|
def available?
|
68
|
-
Spree::Config[:allow_backorders] || self.in_stock?
|
73
|
+
Spree::Config[:track_inventory_levels] ? (Spree::Config[:allow_backorders] || self.in_stock?) : true
|
69
74
|
end
|
70
75
|
|
71
76
|
def options_text
|
data/config/boot.rb
CHANGED
@@ -42,10 +42,6 @@ module Spree
|
|
42
42
|
exit 1
|
43
43
|
end
|
44
44
|
|
45
|
-
# Temporary workaround for annoying RubyGems warning. This can be removed once Rails 2.3.6 is released.
|
46
|
-
# See http://railsdog.lighthouseapp.com/projects/31096-spree/tickets/1209
|
47
|
-
Gem::Dependency.warned_version_requirement = true
|
48
|
-
|
49
45
|
rescue LoadError
|
50
46
|
$stderr.puts %(Spree requires RubyGems >= 1.3.6. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
51
47
|
exit 1
|
@@ -59,7 +55,7 @@ module Spree
|
|
59
55
|
class Boot
|
60
56
|
include Spree::RubyGemsLoader
|
61
57
|
def run
|
62
|
-
load_rails("2.3.
|
58
|
+
load_rails("2.3.8") # note: spree requires this specific version of rails (change at your own risk)
|
63
59
|
load_initializer
|
64
60
|
Spree::Initializer.run(:set_load_path)
|
65
61
|
end
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: --drb <%= std_opts %>
|
7
|
+
wip: --drb --tags @wip:3 --wip features
|
data/config/database.yml
CHANGED
@@ -1,41 +1,24 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
# There is no gem for Windows. Install mysql.so from RubyForApache.
|
4
|
-
# http://rubyforge.org/projects/rubyforapache
|
5
|
-
#
|
6
|
-
# And be sure to use new-style password hashing:
|
7
|
-
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
1
|
+
# Default database configuration
|
2
|
+
|
8
3
|
development:
|
9
|
-
adapter:
|
10
|
-
database:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
15
9
|
# development:
|
16
|
-
# adapter:
|
10
|
+
# adapter: mysql
|
17
11
|
# database: spree_dev
|
18
|
-
# username:
|
19
|
-
#
|
20
|
-
#
|
21
|
-
|
22
|
-
# development:
|
23
|
-
# adapter: sqlite3
|
24
|
-
# database: db/development.sqlite3.db
|
25
|
-
|
26
|
-
# Warning: The database defined as 'test' will be erased and
|
27
|
-
# re-generated from your development database when you run 'rake'.
|
28
|
-
# Do not set this db to the same as development or production.
|
29
|
-
test:
|
30
|
-
adapter: mysql
|
31
|
-
database: spree_test
|
32
|
-
username: root
|
33
|
-
password:
|
34
|
-
host: localhost
|
12
|
+
# username: root
|
13
|
+
# pool: 5
|
14
|
+
# timeout: 5000
|
35
15
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
16
|
+
#
|
17
|
+
# test:
|
18
|
+
# adapter: mysql
|
19
|
+
# database: spree_test
|
20
|
+
# username: root
|
21
|
+
#
|
22
|
+
# cucumber:
|
23
|
+
# adapter: sqlite3
|
24
|
+
# database: db/test.sqlite3
|
data/config/database.yml.example
CHANGED
@@ -8,11 +8,10 @@ test:
|
|
8
8
|
adapter: sqlite3
|
9
9
|
database: db/test.sqlite3
|
10
10
|
|
11
|
-
|
11
|
+
cucumber:
|
12
12
|
adapter: sqlite3
|
13
|
-
database: db/
|
14
|
-
|
15
|
-
|
16
|
-
demo:
|
13
|
+
database: db/cucumber.sqlite3
|
14
|
+
|
15
|
+
production:
|
17
16
|
adapter: sqlite3
|
18
|
-
database: db/production.sqlite3
|
17
|
+
database: db/production.sqlite3
|
data/config/environment.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
6
|
|
7
7
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
SPREE_GEM_VERSION = '0.
|
8
|
+
SPREE_GEM_VERSION = '0.11.0' unless defined? SPREE_GEM_VERSION
|
9
9
|
|
10
10
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
11
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -27,7 +27,7 @@ Spree::Initializer.run do |config|
|
|
27
27
|
# config.gem "aws-s3", :lib => "aws/s3"
|
28
28
|
|
29
29
|
config.gem "highline", :version => '1.5.1'
|
30
|
-
config.gem 'authlogic', :version => '
|
30
|
+
config.gem 'authlogic', :version => '2.1.3'
|
31
31
|
config.gem 'authlogic-oid', :lib => "authlogic_openid", :version => '1.0.4'
|
32
32
|
config.gem "activemerchant", :lib => "active_merchant", :version => '1.5.1'
|
33
33
|
config.gem 'activerecord-tableless', :lib => 'tableless', :version => '0.1.0'
|
@@ -36,10 +36,11 @@ Spree::Initializer.run do |config|
|
|
36
36
|
config.gem 'chronic', :version => '0.2.3'
|
37
37
|
config.gem 'whenever', :lib => false, :version => '0.3.7'
|
38
38
|
config.gem 'searchlogic', :version => '2.3.5'
|
39
|
-
config.gem 'will_paginate', :lib => 'will_paginate', :version => '2.3.
|
39
|
+
config.gem 'will_paginate', :lib => 'will_paginate', :version => '2.3.14'
|
40
40
|
config.gem 'state_machine', :lib => 'state_machine', :version => '0.8.0'
|
41
41
|
config.gem "faker", :version => '0.3.1'
|
42
42
|
config.gem 'paperclip', :version => '>=2.3.1.1'
|
43
|
+
config.gem 'ruby-openid', :lib => "openid", :version => '>=2.0.4'
|
43
44
|
|
44
45
|
# Only load the plugins named here, in the order given. By default, all plugins
|
45
46
|
# in vendor/plugins are loaded in alphabetical order.
|
@@ -52,7 +53,7 @@ Spree::Initializer.run do |config|
|
|
52
53
|
# yourself, this is an optional Spree file. For example:
|
53
54
|
# SPREE_EXTENSIONS_LOAD_ORDER = [:theme_default, :all, :site]
|
54
55
|
# For more details see http://railsdog.lighthouseapp.com/projects/31096/tickets/595
|
55
|
-
|
56
|
+
|
56
57
|
# Add additional load paths for your own custom dirs
|
57
58
|
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
58
59
|
|
@@ -77,7 +78,7 @@ Spree::Initializer.run do |config|
|
|
77
78
|
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
78
79
|
# All files from config/locales/*.rb,yml are added automatically.
|
79
80
|
#config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
|
80
|
-
config.i18n.default_locale = :'en
|
81
|
+
config.i18n.default_locale = :'en'
|
81
82
|
|
82
83
|
end
|
83
84
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Edit at your own peril - it's recommended to regenerate this file
|
2
|
+
# in the future when you upgrade to a newer version of Cucumber.
|
3
|
+
|
4
|
+
# IMPORTANT: Setting config.cache_classes to false is known to
|
5
|
+
# break Cucumber's use_transactional_fixtures method.
|
6
|
+
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
19
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
20
|
+
# The :test delivery method accumulates sent emails in the
|
21
|
+
# ActionMailer::Base.deliveries array.
|
22
|
+
config.action_mailer.delivery_method = :test
|
23
|
+
|
24
|
+
config.gem 'cucumber-rails', :lib => false, :version => '>=0.2.4'
|
25
|
+
config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3'
|
26
|
+
config.gem 'capybara', :lib => false, :version => '>=0.3.0'
|
27
|
+
config.gem 'spork', :lib => false, :version => '>=0.7.5'
|
28
|
+
config.gem "factory_girl", :lib => "factory_girl", :version => "1.2.3"
|
29
|
+
config.gem "pickle", :lib => false, :version => "0.2.1"
|
30
|
+
config.gem "rack-test", :lib => false, :version => ">=0.5.4"
|
@@ -15,7 +15,4 @@ config.action_controller.perform_caching = true
|
|
15
15
|
# config.action_controller.asset_host = "http://assets.example.com"
|
16
16
|
|
17
17
|
# Disable delivery errors, bad email addresses will be ignored
|
18
|
-
# config.action_mailer.raise_delivery_errors = false
|
19
|
-
|
20
|
-
# Uncomment the line below if you want to use the gateway in test mode while deployed in production
|
21
|
-
#ActiveMerchant::Billing::Base.gateway_mode = :test
|
18
|
+
# config.action_mailer.raise_delivery_errors = false
|
data/config/environments/test.rb
CHANGED
@@ -23,4 +23,4 @@ config.action_controller.allow_forgery_protection = false
|
|
23
23
|
|
24
24
|
config.gem "shoulda", :lib => "shoulda", :version => "2.10.2"
|
25
25
|
config.gem "factory_girl", :lib => "factory_girl", :version => "1.2.3"
|
26
|
-
config.gem 'test-unit', :lib => 'test/unit', :version => '~>2.0.
|
26
|
+
config.gem 'test-unit', :lib => 'test/unit', :version => '~>2.0.9' if RUBY_VERSION.to_f >= 1.9
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
ActionController::Base.cookie_verifier_secret = '8fda71d70002a456b9578745c9b16535d20adb5b6fe26d3418d6881811d6d08fe76102f94d634b7174674391d400ed42cea20a2e495a449a98b08cf3dffd3ac9';
|
@@ -10,11 +10,13 @@ all_locale_paths.each do |path|
|
|
10
10
|
if File.exists? path
|
11
11
|
locales = Dir.new(path).entries.collect do |x|
|
12
12
|
x =~ /^[^\.].+\.yml$/ ? x.sub(/\.yml/,"") : nil
|
13
|
-
end.compact.each_with_object({}) do |str, hsh|
|
13
|
+
end.compact.each_with_object({}) do |str, hsh|
|
14
14
|
locale_file = YAML.load_file(path + "/" + str + ".yml")
|
15
|
+
str = str.gsub("_spree", "")
|
15
16
|
hsh[str] = locale_file[str]["this_file_language"] if locale_file.has_key? str
|
16
17
|
end.freeze
|
17
|
-
|
18
18
|
AVAILABLE_LOCALES.merge! locales
|
19
19
|
end
|
20
|
+
|
21
|
+
|
20
22
|
end
|
@@ -11,6 +11,8 @@ if defined?(ActiveRecord)
|
|
11
11
|
ActiveRecord::Base.store_full_sti_class = true
|
12
12
|
end
|
13
13
|
|
14
|
+
ActionController::Routing.generate_best_match = false
|
15
|
+
|
14
16
|
# Use ISO 8601 format for JSON serialized times and dates.
|
15
17
|
ActiveSupport.use_standard_json_time_format = true
|
16
18
|
|
@@ -98,30 +98,5 @@ if RUBY_VERSION.to_f >= 1.9
|
|
98
98
|
alias each_hash each_hash_utf8
|
99
99
|
end
|
100
100
|
end
|
101
|
-
|
102
|
-
module I18n
|
103
|
-
module Backend
|
104
|
-
class Simple
|
105
|
-
protected
|
106
|
-
|
107
|
-
def lookup(locale, key, scope = [])
|
108
|
-
return unless key
|
109
|
-
init_translations unless initialized?
|
110
|
-
keys = I18n.send(:normalize_translation_keys, locale, key, scope)
|
111
|
-
begin
|
112
|
-
keys.inject(translations) do |result, k|
|
113
|
-
if (x = result[k.to_sym]).nil?
|
114
|
-
return nil
|
115
|
-
else
|
116
|
-
x
|
117
|
-
end
|
118
|
-
end
|
119
|
-
rescue
|
120
|
-
return nil
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
101
|
|
127
102
|
end
|