spree 0.2.0 → 0.4.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 +22 -0
- data/CONTRIBUTORS +18 -1
- data/README.markdown +68 -9
- data/app/controllers/account_controller.rb +4 -18
- data/app/controllers/addresses_controller.rb +53 -0
- data/app/controllers/admin/base_controller.rb +0 -2
- data/app/controllers/admin/configurations_controller.rb +10 -0
- data/app/controllers/admin/images_controller.rb +10 -9
- data/app/controllers/admin/inventory_units_controller.rb +1 -25
- data/app/controllers/admin/mail_settings_controller.rb +14 -0
- data/app/controllers/admin/option_types_controller.rb +53 -61
- data/app/controllers/admin/orders_controller.rb +38 -250
- data/app/controllers/admin/product_properties_controller.rb +7 -0
- data/app/controllers/admin/products_controller.rb +38 -148
- data/app/controllers/admin/properties_controller.rb +25 -0
- data/app/controllers/admin/prototypes_controller.rb +49 -0
- data/app/controllers/admin/states_controller.rb +26 -0
- data/app/controllers/admin/tax_categories_controller.rb +11 -0
- data/app/controllers/admin/taxonomies_controller.rb +26 -0
- data/app/controllers/admin/taxons_controller.rb +137 -0
- data/app/controllers/admin/users_controller.rb +3 -0
- data/app/controllers/admin/variants_controller.rb +25 -0
- data/app/controllers/admin/zones_controller.rb +49 -0
- data/app/controllers/application.rb +9 -6
- data/app/controllers/countries_controller.rb +11 -0
- data/app/controllers/creditcard_payments_controller.rb +63 -0
- data/app/controllers/line_items_controller.rb +6 -0
- data/app/controllers/orders_controller.rb +70 -0
- data/app/controllers/products_controller.rb +33 -0
- data/app/controllers/spree/base_controller.rb +18 -23
- data/app/controllers/states_controller.rb +10 -0
- data/app/controllers/taxons_controller.rb +19 -0
- data/app/controllers/users_controller.rb +16 -7
- data/app/helpers/admin/base_helper.rb +7 -10
- data/app/helpers/admin/configurations_helper.rb +2 -0
- data/app/helpers/admin/mail_settings_helper.rb +2 -0
- data/app/helpers/admin/orders_helper.rb +18 -6
- data/app/helpers/admin/product_properties_helper.rb +13 -0
- data/app/helpers/admin/products_helper.rb +13 -1
- data/app/helpers/admin/properties_helper.rb +9 -0
- data/app/helpers/admin/prototypes_helper.rb +18 -0
- data/app/helpers/admin/taxonomies_helper.rb +62 -0
- data/app/helpers/admin/taxons_helper.rb +5 -0
- data/app/helpers/admin/variants_helper.rb +2 -0
- data/app/helpers/admin/zones_helper.rb +11 -0
- data/app/helpers/application_helper.rb +11 -0
- data/app/helpers/orders_helper.rb +14 -0
- data/app/helpers/payments_helper.rb +2 -0
- data/app/helpers/products_helper.rb +34 -0
- data/app/helpers/spree/base_helper.rb +10 -12
- data/app/helpers/store_helper.rb +0 -19
- data/app/helpers/tax_categories_helper.rb +2 -0
- data/app/helpers/taxons_helper.rb +31 -0
- data/app/models/address.rb +7 -2
- data/app/models/app_configuration.rb +27 -0
- data/app/models/configuration.rb +3 -0
- data/app/models/country.rb +1 -0
- data/app/models/creditcard.rb +6 -0
- data/app/models/creditcard_payment.rb +40 -0
- data/app/models/creditcard_txn.rb +6 -0
- data/app/models/image.rb +1 -2
- data/app/models/inventory_unit.rb +22 -9
- data/app/models/line_item.rb +21 -8
- data/app/models/option_type.rb +2 -2
- data/app/models/order.rb +105 -62
- data/app/models/order_filter.rb +25 -0
- data/app/models/order_mailer.rb +9 -4
- data/app/models/preference.rb +51 -0
- data/app/models/product.rb +63 -10
- data/app/models/product_property.rb +15 -0
- data/app/models/property.rb +18 -0
- data/app/models/prototype.rb +4 -0
- data/app/models/state.rb +3 -0
- data/app/models/state_event.rb +8 -0
- data/app/models/tax_category.rb +3 -0
- data/app/models/taxon.rb +5 -0
- data/app/models/taxonomy.rb +5 -0
- data/app/models/user.rb +10 -15
- data/app/models/variant.rb +38 -13
- data/app/models/variants.rb +2 -0
- data/app/models/zone.rb +37 -0
- data/app/models/zone_member.rb +4 -0
- data/app/presenters/payment_presenter.rb +4 -0
- data/app/views/account/login.html.erb +14 -0
- data/app/views/addresses/_form.html.erb +48 -0
- data/app/views/addresses/_states.html.erb +8 -0
- data/app/views/addresses/edit.html.erb +8 -0
- data/app/views/addresses/new.html.erb +8 -0
- data/app/views/admin/configurations/index.html.erb +42 -0
- data/app/views/admin/configurations/new.html.erb +13 -0
- data/app/views/admin/extensions/index.html.erb +22 -22
- data/app/views/admin/images/new.html.erb +3 -3
- data/app/views/admin/inventory_units/adjust.html.erb +27 -26
- data/app/views/admin/mail_settings/edit.html.erb +85 -0
- data/app/views/admin/mail_settings/show.html.erb +45 -0
- data/app/views/admin/option_types/_form.html.erb +37 -0
- data/app/views/admin/option_types/_option_value.html.erb +5 -0
- data/app/views/admin/option_types/available.html.erb +32 -0
- data/app/views/admin/option_types/edit.html.erb +8 -0
- data/app/views/admin/option_types/index.html.erb +38 -0
- data/app/views/admin/option_types/new.html.erb +8 -0
- data/app/views/admin/option_types/selected.html.erb +38 -0
- data/app/views/admin/orders/{_address.rhtml → _address.html.erb} +0 -0
- data/app/views/admin/orders/index.html.erb +95 -0
- data/app/views/admin/orders/show.html.erb +76 -0
- data/app/views/admin/overview/index.html.erb +3 -0
- data/app/views/admin/product_properties/_product_property.html.erb +22 -0
- data/app/views/admin/product_properties/index.html.erb +39 -0
- data/app/views/admin/products/_form.html.erb +58 -0
- data/app/views/admin/products/_images.html.erb +45 -0
- data/app/views/admin/products/{_option_types.rhtml → _option_types.html.erb} +0 -0
- data/app/views/admin/products/edit.html.erb +7 -0
- data/app/views/admin/products/index.html.erb +59 -0
- data/app/views/admin/products/new.html.erb +7 -0
- data/app/views/admin/products/show.html.erb +4 -0
- data/app/views/admin/properties/_form.html.erb +14 -0
- data/app/views/admin/properties/edit.html.erb +9 -0
- data/app/views/admin/properties/filtered.html.erb +1 -0
- data/app/views/admin/properties/index.html.erb +36 -0
- data/app/views/admin/properties/new.html.erb +9 -0
- data/app/views/admin/prototypes/_form.html.erb +21 -0
- data/app/views/admin/prototypes/available.html.erb +27 -0
- data/app/views/admin/prototypes/edit.html.erb +9 -0
- data/app/views/admin/prototypes/index.html.erb +34 -0
- data/app/views/admin/prototypes/new.html.erb +9 -0
- data/app/views/admin/prototypes/select.rjs +5 -0
- data/app/views/admin/reports/index.html.erb +28 -0
- data/app/views/admin/reports/sales_total.html.erb +28 -0
- data/app/views/admin/states/_form.html.erb +10 -0
- data/app/views/admin/states/_state_list.html.erb +25 -0
- data/app/views/admin/states/edit.html.erb +10 -0
- data/app/views/admin/states/index.html.erb +18 -0
- data/app/views/admin/states/new.html.erb +10 -0
- data/app/views/admin/tax_categories/_form.html.erb +11 -0
- data/app/views/admin/tax_categories/edit.html.erb +10 -0
- data/app/views/admin/tax_categories/index.html.erb +27 -0
- data/app/views/admin/tax_categories/new.html.erb +10 -0
- data/{foozah/README → app/views/admin/tax_categories/show.html.erb} +0 -0
- data/app/views/admin/taxonomies/_form.html.erb +9 -0
- data/app/views/admin/taxonomies/_list.html.erb +18 -0
- data/app/views/admin/taxonomies/_manage_products.rhtml +31 -0
- data/app/views/admin/taxonomies/_success.rhtml +1 -0
- data/app/views/admin/taxonomies/_yui_head.html.erb +31 -0
- data/app/views/admin/taxonomies/edit.html.erb +16 -0
- data/app/views/admin/taxonomies/index.html.erb +7 -0
- data/app/views/admin/taxonomies/new.html.erb +9 -0
- data/app/views/admin/taxons/_taxon_table.html.erb +28 -0
- data/app/views/admin/taxons/available.js.erb +36 -0
- data/app/views/admin/taxons/remove.html.erb +1 -0
- data/app/views/admin/taxons/select.html.erb +1 -0
- data/app/views/admin/taxons/selected.html.erb +24 -0
- data/app/views/admin/users/_form.html.erb +22 -0
- data/app/views/admin/users/edit.html.erb +9 -0
- data/app/views/admin/users/index.html.erb +21 -0
- data/app/views/admin/users/new.html.erb +11 -0
- data/app/views/admin/users/show.html.erb +11 -0
- data/app/views/admin/variants/_form.html.erb +32 -0
- data/app/views/admin/variants/edit.html.erb +9 -0
- data/app/views/admin/variants/index.html.erb +48 -0
- data/app/views/admin/variants/new.html.erb +8 -0
- data/app/views/admin/zones/_country.html.erb +15 -0
- data/app/views/admin/zones/_form.html.erb +68 -0
- data/app/views/admin/zones/_function.rjs +11 -0
- data/app/views/admin/zones/_state.html.erb +15 -0
- data/app/views/admin/zones/_zone.html.erb +15 -0
- data/app/views/admin/zones/edit.html.erb +10 -0
- data/app/views/admin/zones/index.html.erb +26 -0
- data/app/views/admin/zones/index.js.erb +1 -0
- data/app/views/admin/zones/new.html.erb +10 -0
- data/app/views/admin/zones/show.html.erb +4 -0
- data/app/views/countries/index.js.erb +1 -0
- data/app/views/creditcard_payments/_form_billing.html.erb +49 -0
- data/app/views/creditcard_payments/_form_credit_card.html.erb +30 -0
- data/app/views/creditcard_payments/_states.html.erb +8 -0
- data/app/views/creditcard_payments/cvv.html.erb +15 -0
- data/app/views/creditcard_payments/new.html.erb +17 -0
- data/app/views/layouts/admin.html.erb +67 -0
- data/app/views/layouts/application.html.erb +79 -0
- data/app/views/line_items/index.html.erb +1 -0
- data/app/views/order_mailer/cancel.html.erb +15 -0
- data/app/views/order_mailer/confirm.html.erb +18 -0
- data/app/views/orders/_form.html.erb +15 -0
- data/app/views/orders/_line_item.html.erb +20 -0
- data/app/views/orders/edit.html.erb +20 -0
- data/app/views/orders/new.html.erb +6 -0
- data/app/views/orders/show.html.erb +11 -0
- data/app/views/{store → products}/_image.html.erb +0 -0
- data/app/views/products/_products.html.erb +10 -0
- data/app/views/products/_thumbnails.html.erb +8 -0
- data/app/views/products/index.html.erb +11 -0
- data/app/views/products/show.html.erb +60 -0
- data/app/views/shared/_edit_resource_links.html.erb +1 -0
- data/app/views/shared/_footer.html.erb +5 -0
- data/app/views/shared/_new_resource_links.html.erb +1 -0
- data/app/views/shared/_order_details.html.erb +35 -0
- data/app/views/shared/_paginate.html.erb +34 -0
- data/app/views/shared/_product_sub_menu.html.erb +10 -0
- data/app/views/shared/_product_tabs.html.erb +29 -0
- data/app/views/shared/_products.html.erb +13 -0
- data/app/views/shared/_report_criteria.html.erb +33 -0
- data/app/views/shared/_show_resource_links.html.erb +3 -0
- data/app/views/shared/_store_menu.html.erb +5 -0
- data/app/views/shared/_taxonomies.html.erb +8 -0
- data/app/views/states/index.js.erb +1 -0
- data/app/views/taxons/_taxon.html.erb +5 -0
- data/app/views/taxons/show.html.erb +8 -0
- data/app/views/users/_form.html.erb +8 -6
- data/app/views/users/edit.html.erb +3 -3
- data/app/views/users/index.html.erb +16 -16
- data/app/views/users/new.html.erb +3 -5
- data/app/views/users/show.html.erb +3 -3
- data/bin/spree +9 -3
- data/config/boot.rb +62 -53
- data/config/database.yml +32 -10
- data/config/easy_role_permissions.yml +75 -0
- data/config/environment.rb +51 -72
- data/config/environments/development.rb +3 -1
- data/config/environments/staging.rb +13 -0
- data/config/environments/test.rb +4 -1
- data/config/initializers/mime_types.rb +8 -0
- data/config/initializers/spree.rb +40 -0
- data/config/routes.rb +39 -9
- data/db/migrate/20080620113300_create_taxonomies.rb +13 -0
- data/db/migrate/20080620113400_create_taxons.rb +16 -0
- data/db/migrate/20080622173128_drop_extension_meta.rb +13 -0
- data/db/migrate/20080622194800_create_prototypes.rb +13 -0
- data/db/migrate/20080622194830_create_properties.rb +13 -0
- data/db/migrate/20080622195000_create_properties_prototypes.rb +12 -0
- data/db/migrate/20080622195100_create_property_values.rb +14 -0
- data/db/migrate/20080630003326_create_zones.rb +13 -0
- data/db/migrate/20080630150630_create_preferences.rb +19 -0
- data/db/migrate/20080630152702_add_iso_country_information.rb +248 -0
- data/db/migrate/20080630154400_create_countries_zones.rb +12 -0
- data/db/migrate/20080630215310_create_zone_members.rb +13 -0
- data/db/migrate/20080703184654_update_country_rename_name.rb +20 -0
- data/db/migrate/20080704181428_create_app_configurations.rb +12 -0
- data/db/migrate/20080704190355_add_permalink_and_published_to_products.rb +15 -0
- data/db/migrate/20080706233224_create_eu_vat_zone.rb +19 -0
- data/db/migrate/20080707002329_create_tax_categories.rb +21 -0
- data/db/migrate/20080708170103_remove_login.rb +9 -0
- data/db/migrate/20080715014028_add_optimistic_locking_to_cart.rb +13 -0
- data/db/migrate/20080716155613_products_taxons.rb +12 -0
- data/db/migrate/20080720190623_rename_txn_table.rb +9 -0
- data/db/migrate/20080729213052_drop_categories.rb +8 -0
- data/db/migrate/20080803010846_remove_prototype_presentation.rb +13 -0
- data/db/migrate/20080807214829_create_product_property.rb +15 -0
- data/db/migrate/20080815173251_remove_cart.rb +10 -0
- data/db/migrate/20080830173354_add_checkout_state_to_order.rb +13 -0
- data/db/migrate/20080901002711_address_refactor.rb +14 -0
- data/db/migrate/20080902001408_create_creditcard_payments.rb +17 -0
- data/db/migrate/20080904150723_refactor_order_state.rb +33 -0
- data/db/migrate/20080904234457_create_state_events.rb +15 -0
- data/db/migrate/20080905012833_add_inventory_state.rb +13 -0
- data/db/migrate/20080906174748_change_inventory_state_type.rb +8 -0
- data/db/migrate/20080909100504_add_state_name_to_address.rb +9 -0
- data/db/migrate/20080915211650_remove_user_address.rb +10 -0
- data/db/migrate/20080918083321_remove_presentation_from_taxonomy.rb +11 -0
- data/db/migrate/20080918140438_rename_app_configuration.rb +16 -0
- data/db/sample/addresses.yml +8 -7
- data/db/sample/creditcard_payments.yml +10 -0
- data/db/sample/creditcard_txns.yml +7 -0
- data/db/sample/images.yml +51 -1
- data/db/sample/inventory_units.yml +19 -24
- data/db/sample/orders.yml +2 -4
- data/db/sample/product_properties.yml +136 -0
- data/db/sample/products.yml +26 -7
- data/db/sample/properties.yml +39 -0
- data/db/sample/prototypes.yml +9 -0
- data/db/sample/states.yml +52 -2
- data/db/sample/tax_categories.yml +6 -0
- data/db/sample/taxonomies.yml +4 -0
- data/db/sample/taxons.yml +61 -0
- data/db/sample/users.yml +0 -1
- data/db/sample/variants.yml +9 -1
- data/lang/ui/de-DE.yml +207 -0
- data/lang/ui/en-US.yml +225 -0
- data/lang/ui/es-ES.yml +202 -0
- data/lang/ui/it-IT.yml +194 -0
- data/lang/ui/pl-PL.yml +213 -0
- data/lang/ui/pt-BR.yml +219 -0
- data/lib/authenticated_system.rb +3 -3
- data/lib/authenticated_test_helper.rb +1 -1
- data/lib/commands/extension.rb +250 -0
- data/lib/easy_role_requirement_system.rb +1 -1
- data/lib/gateway_error.rb +1 -0
- data/lib/generators/extension/extension_generator.rb +11 -10
- data/lib/generators/extension/templates/{README → README.markdown} +0 -0
- data/lib/generators/extension/templates/Rakefile +0 -0
- data/lib/generators/extension/templates/tasks.rake +1 -12
- data/lib/generators/extension_controller/extension_controller_generator.rb +19 -19
- data/lib/generators/extension_controller/templates/{view.rhtml → view.html.erb} +0 -0
- data/lib/generators/instance/instance_generator.rb +24 -8
- data/lib/plugins/extension_patches/init.rb +2 -1
- data/lib/plugins/extension_patches/lib/asset_copy.rb +63 -0
- data/lib/plugins/extension_patches/lib/routing_extension.rb +1 -1
- data/lib/preference_access.rb +27 -0
- data/lib/profiler/add_to_cart_profiler.rb +2 -0
- data/lib/profiler/product_details_profiler.rb +2 -0
- data/lib/role_requirement_system.rb +10 -8
- data/lib/spree.rb +1 -1
- data/lib/spree/config.rb +20 -0
- data/lib/spree/gateway_error.rb +3 -0
- data/lib/spree/initializer.rb +19 -16
- data/lib/spree/preferences/mail_settings.rb +57 -0
- data/lib/spree/preferences/model_hooks.rb +290 -0
- data/lib/spree/preferences/preference_definition.rb +53 -0
- data/lib/spree/setup.rb +9 -29
- data/lib/spree/support/core_extensions/array.rb +23 -0
- data/lib/spree/support/core_extensions/string.rb +18 -0
- data/lib/tasks/database.rake +13 -22
- data/lib/tasks/extensions.rake +65 -59
- data/lib/tasks/framework.rake +34 -31
- data/lib/tasks/release.rake +4 -1
- data/lib/tasks/sample/products/0000/1004/apache_baseball.png +0 -0
- data/lib/tasks/sample/products/0000/1004/apache_baseball_mini.png +0 -0
- data/lib/tasks/sample/products/0000/1004/apache_baseball_product.png +0 -0
- data/lib/tasks/sample/products/0000/1004/apache_baseball_small.png +0 -0
- data/lib/tasks/sample/products/0000/1008/ruby_baseball.png +0 -0
- data/lib/tasks/sample/products/0000/1008/ruby_baseball_mini.png +0 -0
- data/lib/tasks/sample/products/0000/1008/ruby_baseball_product.png +0 -0
- data/lib/tasks/sample/products/0000/1008/ruby_baseball_small.png +0 -0
- data/public/{.htaccess → .htaccess.example} +0 -0
- data/public/images/breadcrumb.gif +0 -0
- data/public/images/flags/ad.png +0 -0
- data/public/images/flags/ae.png +0 -0
- data/public/images/flags/af.png +0 -0
- data/public/images/flags/ag.png +0 -0
- data/public/images/flags/ai.png +0 -0
- data/public/images/flags/al.png +0 -0
- data/public/images/flags/am.png +0 -0
- data/public/images/flags/an.png +0 -0
- data/public/images/flags/ao.png +0 -0
- data/public/images/flags/ar.png +0 -0
- data/public/images/flags/as.png +0 -0
- data/public/images/flags/at.png +0 -0
- data/public/images/flags/au.png +0 -0
- data/public/images/flags/aw.png +0 -0
- data/public/images/flags/ax.png +0 -0
- data/public/images/flags/az.png +0 -0
- data/public/images/flags/ba.png +0 -0
- data/public/images/flags/bb.png +0 -0
- data/public/images/flags/bd.png +0 -0
- data/public/images/flags/be.png +0 -0
- data/public/images/flags/bf.png +0 -0
- data/public/images/flags/bg.png +0 -0
- data/public/images/flags/bh.png +0 -0
- data/public/images/flags/bi.png +0 -0
- data/public/images/flags/bj.png +0 -0
- data/public/images/flags/bm.png +0 -0
- data/public/images/flags/bn.png +0 -0
- data/public/images/flags/bo.png +0 -0
- data/public/images/flags/br.png +0 -0
- data/public/images/flags/bs.png +0 -0
- data/public/images/flags/bt.png +0 -0
- data/public/images/flags/bv.png +0 -0
- data/public/images/flags/bw.png +0 -0
- data/public/images/flags/by.png +0 -0
- data/public/images/flags/bz.png +0 -0
- data/public/images/flags/ca.png +0 -0
- data/public/images/flags/catalonia.png +0 -0
- data/public/images/flags/cc.png +0 -0
- data/public/images/flags/cd.png +0 -0
- data/public/images/flags/cf.png +0 -0
- data/public/images/flags/cg.png +0 -0
- data/public/images/flags/ch.png +0 -0
- data/public/images/flags/ci.png +0 -0
- data/public/images/flags/ck.png +0 -0
- data/public/images/flags/cl.png +0 -0
- data/public/images/flags/cm.png +0 -0
- data/public/images/flags/cn.png +0 -0
- data/public/images/flags/co.png +0 -0
- data/public/images/flags/cr.png +0 -0
- data/public/images/flags/cs.png +0 -0
- data/public/images/flags/cu.png +0 -0
- data/public/images/flags/cv.png +0 -0
- data/public/images/flags/cx.png +0 -0
- data/public/images/flags/cy.png +0 -0
- data/public/images/flags/cz.png +0 -0
- data/public/images/flags/de.png +0 -0
- data/public/images/flags/dj.png +0 -0
- data/public/images/flags/dk.png +0 -0
- data/public/images/flags/dm.png +0 -0
- data/public/images/flags/do.png +0 -0
- data/public/images/flags/dz.png +0 -0
- data/public/images/flags/ec.png +0 -0
- data/public/images/flags/ee.png +0 -0
- data/public/images/flags/eg.png +0 -0
- data/public/images/flags/eh.png +0 -0
- data/public/images/flags/england.png +0 -0
- data/public/images/flags/er.png +0 -0
- data/public/images/flags/es.png +0 -0
- data/public/images/flags/et.png +0 -0
- data/public/images/flags/europeanunion.png +0 -0
- data/public/images/flags/fam.png +0 -0
- data/public/images/flags/fi.png +0 -0
- data/public/images/flags/fj.png +0 -0
- data/public/images/flags/fk.png +0 -0
- data/public/images/flags/fm.png +0 -0
- data/public/images/flags/fo.png +0 -0
- data/public/images/flags/fr.png +0 -0
- data/public/images/flags/ga.png +0 -0
- data/public/images/flags/gb.png +0 -0
- data/public/images/flags/gd.png +0 -0
- data/public/images/flags/ge.png +0 -0
- data/public/images/flags/gf.png +0 -0
- data/public/images/flags/gh.png +0 -0
- data/public/images/flags/gi.png +0 -0
- data/public/images/flags/gl.png +0 -0
- data/public/images/flags/gm.png +0 -0
- data/public/images/flags/gn.png +0 -0
- data/public/images/flags/gp.png +0 -0
- data/public/images/flags/gq.png +0 -0
- data/public/images/flags/gr.png +0 -0
- data/public/images/flags/gs.png +0 -0
- data/public/images/flags/gt.png +0 -0
- data/public/images/flags/gu.png +0 -0
- data/public/images/flags/gw.png +0 -0
- data/public/images/flags/gy.png +0 -0
- data/public/images/flags/hk.png +0 -0
- data/public/images/flags/hm.png +0 -0
- data/public/images/flags/hn.png +0 -0
- data/public/images/flags/hr.png +0 -0
- data/public/images/flags/ht.png +0 -0
- data/public/images/flags/hu.png +0 -0
- data/public/images/flags/id.png +0 -0
- data/public/images/flags/ie.png +0 -0
- data/public/images/flags/il.png +0 -0
- data/public/images/flags/in.png +0 -0
- data/public/images/flags/io.png +0 -0
- data/public/images/flags/iq.png +0 -0
- data/public/images/flags/ir.png +0 -0
- data/public/images/flags/is.png +0 -0
- data/public/images/flags/it.png +0 -0
- data/public/images/flags/jm.png +0 -0
- data/public/images/flags/jo.png +0 -0
- data/public/images/flags/jp.png +0 -0
- data/public/images/flags/ke.png +0 -0
- data/public/images/flags/kg.png +0 -0
- data/public/images/flags/kh.png +0 -0
- data/public/images/flags/ki.png +0 -0
- data/public/images/flags/km.png +0 -0
- data/public/images/flags/kn.png +0 -0
- data/public/images/flags/kp.png +0 -0
- data/public/images/flags/kr.png +0 -0
- data/public/images/flags/kw.png +0 -0
- data/public/images/flags/ky.png +0 -0
- data/public/images/flags/kz.png +0 -0
- data/public/images/flags/la.png +0 -0
- data/public/images/flags/lb.png +0 -0
- data/public/images/flags/lc.png +0 -0
- data/public/images/flags/li.png +0 -0
- data/public/images/flags/lk.png +0 -0
- data/public/images/flags/lr.png +0 -0
- data/public/images/flags/ls.png +0 -0
- data/public/images/flags/lt.png +0 -0
- data/public/images/flags/lu.png +0 -0
- data/public/images/flags/lv.png +0 -0
- data/public/images/flags/ly.png +0 -0
- data/public/images/flags/ma.png +0 -0
- data/public/images/flags/mc.png +0 -0
- data/public/images/flags/md.png +0 -0
- data/public/images/flags/me.png +0 -0
- data/public/images/flags/mg.png +0 -0
- data/public/images/flags/mh.png +0 -0
- data/public/images/flags/mk.png +0 -0
- data/public/images/flags/ml.png +0 -0
- data/public/images/flags/mm.png +0 -0
- data/public/images/flags/mn.png +0 -0
- data/public/images/flags/mo.png +0 -0
- data/public/images/flags/mp.png +0 -0
- data/public/images/flags/mq.png +0 -0
- data/public/images/flags/mr.png +0 -0
- data/public/images/flags/ms.png +0 -0
- data/public/images/flags/mt.png +0 -0
- data/public/images/flags/mu.png +0 -0
- data/public/images/flags/mv.png +0 -0
- data/public/images/flags/mw.png +0 -0
- data/public/images/flags/mx.png +0 -0
- data/public/images/flags/my.png +0 -0
- data/public/images/flags/mz.png +0 -0
- data/public/images/flags/na.png +0 -0
- data/public/images/flags/nc.png +0 -0
- data/public/images/flags/ne.png +0 -0
- data/public/images/flags/nf.png +0 -0
- data/public/images/flags/ng.png +0 -0
- data/public/images/flags/ni.png +0 -0
- data/public/images/flags/nl.png +0 -0
- data/public/images/flags/no.png +0 -0
- data/public/images/flags/np.png +0 -0
- data/public/images/flags/nr.png +0 -0
- data/public/images/flags/nu.png +0 -0
- data/public/images/flags/nz.png +0 -0
- data/public/images/flags/om.png +0 -0
- data/public/images/flags/pa.png +0 -0
- data/public/images/flags/pe.png +0 -0
- data/public/images/flags/pf.png +0 -0
- data/public/images/flags/pg.png +0 -0
- data/public/images/flags/ph.png +0 -0
- data/public/images/flags/pk.png +0 -0
- data/public/images/flags/pl.png +0 -0
- data/public/images/flags/pm.png +0 -0
- data/public/images/flags/pn.png +0 -0
- data/public/images/flags/pr.png +0 -0
- data/public/images/flags/ps.png +0 -0
- data/public/images/flags/pt.png +0 -0
- data/public/images/flags/pw.png +0 -0
- data/public/images/flags/py.png +0 -0
- data/public/images/flags/qa.png +0 -0
- data/public/images/flags/re.png +0 -0
- data/public/images/flags/ro.png +0 -0
- data/public/images/flags/rs.png +0 -0
- data/public/images/flags/ru.png +0 -0
- data/public/images/flags/rw.png +0 -0
- data/public/images/flags/sa.png +0 -0
- data/public/images/flags/sb.png +0 -0
- data/public/images/flags/sc.png +0 -0
- data/public/images/flags/scotland.png +0 -0
- data/public/images/flags/sd.png +0 -0
- data/public/images/flags/se.png +0 -0
- data/public/images/flags/sg.png +0 -0
- data/public/images/flags/sh.png +0 -0
- data/public/images/flags/si.png +0 -0
- data/public/images/flags/sj.png +0 -0
- data/public/images/flags/sk.png +0 -0
- data/public/images/flags/sl.png +0 -0
- data/public/images/flags/sm.png +0 -0
- data/public/images/flags/sn.png +0 -0
- data/public/images/flags/so.png +0 -0
- data/public/images/flags/sr.png +0 -0
- data/public/images/flags/st.png +0 -0
- data/public/images/flags/sv.png +0 -0
- data/public/images/flags/sy.png +0 -0
- data/public/images/flags/sz.png +0 -0
- data/public/images/flags/tc.png +0 -0
- data/public/images/flags/td.png +0 -0
- data/public/images/flags/tf.png +0 -0
- data/public/images/flags/tg.png +0 -0
- data/public/images/flags/th.png +0 -0
- data/public/images/flags/tj.png +0 -0
- data/public/images/flags/tk.png +0 -0
- data/public/images/flags/tl.png +0 -0
- data/public/images/flags/tm.png +0 -0
- data/public/images/flags/tn.png +0 -0
- data/public/images/flags/to.png +0 -0
- data/public/images/flags/tr.png +0 -0
- data/public/images/flags/tt.png +0 -0
- data/public/images/flags/tv.png +0 -0
- data/public/images/flags/tw.png +0 -0
- data/public/images/flags/tz.png +0 -0
- data/public/images/flags/ua.png +0 -0
- data/public/images/flags/ug.png +0 -0
- data/public/images/flags/um.png +0 -0
- data/public/images/flags/us.png +0 -0
- data/public/images/flags/uy.png +0 -0
- data/public/images/flags/uz.png +0 -0
- data/public/images/flags/va.png +0 -0
- data/public/images/flags/vc.png +0 -0
- data/public/images/flags/ve.png +0 -0
- data/public/images/flags/vg.png +0 -0
- data/public/images/flags/vi.png +0 -0
- data/public/images/flags/vn.png +0 -0
- data/public/images/flags/vu.png +0 -0
- data/public/images/flags/wales.png +0 -0
- data/public/images/flags/wf.png +0 -0
- data/public/images/flags/ws.png +0 -0
- data/public/images/flags/ye.png +0 -0
- data/public/images/flags/yt.png +0 -0
- data/public/images/flags/za.png +0 -0
- data/public/images/flags/zm.png +0 -0
- data/public/images/flags/zw.png +0 -0
- data/public/images/pp_checkout.gif +0 -0
- data/public/images/tab_bottom.gif +0 -0
- data/public/images/tree-nav-icons/bullet.gif +0 -0
- data/public/images/tree-nav-icons/minus.gif +0 -0
- data/public/images/tree-nav-icons/plus.gif +0 -0
- data/public/javascripts/controls.js +484 -354
- data/public/javascripts/dragdrop.js +88 -58
- data/public/javascripts/effects.js +396 -364
- data/public/javascripts/prototype.js +132 -91
- data/public/javascripts/spree-yui.js +693 -0
- data/public/javascripts/spree.js +9 -0
- data/public/stylesheets/application.css +4 -1
- data/public/stylesheets/orders/_controller.css +105 -1
- data/public/stylesheets/prototypes/_controller.css +9 -0
- data/public/stylesheets/spree-admin.css +174 -4
- data/public/stylesheets/spree.css +142 -42
- data/script/about +0 -0
- data/script/breakpointer +0 -0
- data/script/console +0 -0
- data/script/dbconsole +3 -0
- data/script/destroy +0 -0
- data/script/extension +3 -0
- data/script/generate +0 -0
- data/{vendor/rails/railties/bin → script}/performance/request +0 -0
- data/script/plugin +0 -0
- data/script/runner +0 -0
- data/script/server +0 -0
- data/script/spec +0 -0
- data/script/spec_server +0 -0
- data/spec/controllers/admin/configurations_controller_spec.rb +9 -0
- data/spec/controllers/admin/mail_settings_controller_spec.rb +24 -0
- data/spec/controllers/orders_controller_spec.rb +30 -0
- data/spec/controllers/tax_categories_routing_spec.rb +61 -0
- data/spec/controllers/zones_routing_spec.rb +61 -0
- data/spec/fixtures/app_configurations.yml +7 -0
- data/spec/fixtures/preferences.yml +7 -0
- data/spec/fixtures/tax_categories.yml +4 -0
- data/spec/fixtures/users.yml +1 -2
- data/spec/fixtures/zone_members.yml +7 -0
- data/spec/fixtures/zones.yml +4 -0
- data/spec/helpers/admin/configurations_helper_spec.rb +11 -0
- data/spec/helpers/admin/mail_settings_helper_spec.rb +11 -0
- data/spec/helpers/products_helper_spec.rb +12 -0
- data/spec/helpers/spree/base_helper_spec.rb +25 -1
- data/spec/helpers/tax_categories_helper_spec.rb +11 -0
- data/spec/models/app_configuration_spec.rb +13 -0
- data/spec/models/creditcard_payment_spec.rb +12 -0
- data/spec/models/line_item_spec.rb +66 -21
- data/spec/models/order_spec.rb +80 -25
- data/spec/models/preference_definition_spec.rb +185 -0
- data/spec/models/preference_spec.rb +185 -0
- data/spec/models/product_spec.rb +74 -2
- data/spec/models/state_event_spec.rb +12 -0
- data/spec/models/tax_category_spec.rb +11 -0
- data/spec/models/zone_member_spec.rb +5 -0
- data/spec/models/zone_spec.rb +113 -0
- data/spec/preference_factory.rb +58 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/views/admin/configurations/index.html.erb_spec.rb +8 -0
- data/spec/views/admin/mail_settings/edit.html.erb_spec.rb +14 -0
- data/spec/views/admin/mail_settings/show.html.erb_spec.rb +12 -0
- data/{vendor/rails/railties/helpers → test}/test_helper.rb +0 -0
- data/vendor/extensions/localization/README.rdoc +5 -0
- data/vendor/extensions/localization/Rakefile +120 -0
- data/vendor/extensions/localization/app/controllers/admin/localization_controller.rb +6 -0
- data/vendor/extensions/localization/app/controllers/locale_controller.rb +12 -0
- data/vendor/extensions/localization/app/helpers/locale_helper.rb +2 -0
- data/vendor/extensions/localization/app/helpers/localization_helper.rb +2 -0
- data/vendor/extensions/localization/app/views/shared/_language_bar.html.erb +10 -0
- data/vendor/extensions/localization/lang/ui/de-DE.yml +2 -0
- data/vendor/extensions/localization/lang/ui/en-US.yml +2 -0
- data/vendor/extensions/localization/lang/ui/es-ES.yml +2 -0
- data/vendor/extensions/localization/lang/ui/it-IT.yml +2 -0
- data/vendor/extensions/localization/lib/localization.rb +93 -0
- data/vendor/extensions/localization/lib/localization/user_preferences.rb +9 -0
- data/vendor/extensions/localization/lib/tasks/localization_extension_tasks.rake +17 -0
- data/vendor/extensions/localization/localization_extension.rb +37 -0
- 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/de.png +0 -0
- data/vendor/extensions/localization/public/images/flags/dj.png +0 -0
- data/vendor/extensions/localization/public/images/flags/dk.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 +10 -0
- data/vendor/extensions/localization/spec/controllers/locale_controller_spec.rb +35 -0
- data/vendor/extensions/localization/spec/helpers/locale_helper_spec.rb +5 -0
- data/vendor/extensions/localization/spec/helpers/localization_helper_spec.rb +5 -0
- data/vendor/{plugins/rspec_on_rails/generators/rspec/templates → extensions/localization/spec}/spec.opts +0 -0
- data/vendor/extensions/localization/spec/spec_helper.rb +37 -0
- data/vendor/extensions/payment_gateway/README_PAYPAL.markdown +21 -0
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_configurations_controller.rb +2 -0
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb +2 -0
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateways_controller.rb +1 -0
- data/vendor/extensions/payment_gateway/app/views/admin/gateway_configurations/_form.html.erb +3 -3
- data/vendor/extensions/payment_gateway/db/migrate/{001_create_gateway_configurations.rb → 20080620120002_create_gateway_configurations.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/{002_create_gateways.rb → 20080620120003_create_gateways.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/{003_create_gateway_options.rb → 20080620120004_create_gateway_options.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/{004_create_gateway_option_values.rb → 20080620120005_create_gateway_option_values.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/{005_create_bogus_gateway.rb → 20080620120006_create_bogus_gateway.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/{006_create_linkpoint_gateway.rb → 20080620120007_create_linkpoint_gateway.rb} +0 -0
- data/vendor/extensions/payment_gateway/db/migrate/20080703120008_create_paypal_gateway.rb +19 -0
- data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +60 -2
- data/vendor/extensions/payment_gateway/lib/tasks/payment_gateway_extension_tasks.rake +1 -11
- data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +9 -2
- data/vendor/extensions/payment_gateway/spec/helpers/admin/gateways_helper_spec.rb +0 -5
- data/vendor/extensions/payment_gateway/spec/models/creditcard_payment_spec.rb +24 -0
- data/vendor/extensions/payment_gateway/spec/models/order_spec.rb +42 -0
- data/vendor/extensions/tax_calculator/app/controllers/admin/tax_rates_controller.rb +19 -3
- data/vendor/extensions/tax_calculator/app/models/tax_rate.rb +7 -4
- data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/_form.html.erb +14 -4
- data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/edit.html.erb +2 -1
- data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/index.html.erb +14 -10
- data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/new.html.erb +3 -5
- data/vendor/extensions/tax_calculator/db/migrate/20080620100001_create_tax_rates.rb +13 -0
- data/vendor/extensions/tax_calculator/db/migrate/20080704192456_update_tax_rates_add_zones_etc.rb +17 -0
- data/vendor/extensions/tax_calculator/lang/en-US.yml +11 -0
- data/vendor/extensions/tax_calculator/lang/pt-BR.yml +11 -0
- data/vendor/extensions/tax_calculator/lib/spree/sales_tax_calculator.rb +23 -0
- data/vendor/extensions/tax_calculator/lib/spree/tax/config.rb +22 -0
- data/vendor/extensions/tax_calculator/lib/spree/tax_calculator.rb +15 -14
- data/vendor/extensions/tax_calculator/lib/spree/vat_calculator.rb +47 -0
- data/vendor/extensions/tax_calculator/lib/tasks/tax_calculator_extension_tasks.rake +0 -10
- data/vendor/extensions/tax_calculator/lib/tax_configuration.rb +7 -0
- data/vendor/extensions/tax_calculator/spec/controllers/tax_calculator_spec.rb +3 -20
- data/vendor/extensions/tax_calculator/spec/helpers/admin/tax_rates_helper_spec.rb +1 -6
- data/vendor/extensions/tax_calculator/spec/helpers/products_helper_spec.rb +85 -0
- data/vendor/extensions/tax_calculator/spec/models/order_spec.rb +22 -0
- data/vendor/extensions/tax_calculator/spec/models/sales_tax_calculator_spec.rb +53 -0
- data/vendor/extensions/tax_calculator/spec/models/tax_calculator_spec.rb +54 -0
- data/vendor/extensions/tax_calculator/spec/models/tax_rate_spec.rb +5 -14
- data/vendor/extensions/tax_calculator/spec/models/vat_calculator_spec.rb +56 -0
- data/vendor/extensions/tax_calculator/tax_calculator_extension.rb +29 -3
- data/vendor/gems/active_presenter-0.0.4/LICENSE +22 -0
- data/vendor/gems/active_presenter-0.0.4/README +75 -0
- data/vendor/gems/active_presenter-0.0.4/Rakefile +10 -0
- data/vendor/gems/active_presenter-0.0.4/lib/active_presenter.rb +7 -0
- data/vendor/gems/active_presenter-0.0.4/lib/active_presenter/base.rb +174 -0
- data/vendor/gems/active_presenter-0.0.4/lib/active_presenter/version.rb +9 -0
- data/vendor/gems/active_presenter-0.0.4/lib/tasks/doc.rake +19 -0
- data/vendor/gems/active_presenter-0.0.4/lib/tasks/gem.rake +62 -0
- data/vendor/gems/active_presenter-0.0.4/test/base_test.rb +152 -0
- data/vendor/gems/active_presenter-0.0.4/test/test_helper.rb +38 -0
- data/vendor/plugins/acts_as_adjacency_list/MIT-LICENSE +20 -0
- data/vendor/plugins/acts_as_adjacency_list/README +13 -0
- data/vendor/plugins/acts_as_adjacency_list/Rakefile +22 -0
- data/vendor/plugins/acts_as_adjacency_list/init.rb +9 -0
- data/vendor/{rails/railties/lib/rails_generator/generators/components/plugin/templates → plugins/acts_as_adjacency_list}/install.rb +0 -0
- data/vendor/plugins/acts_as_adjacency_list/lib/active_record/acts/adjacency_list.rb +237 -0
- data/vendor/plugins/acts_as_adjacency_list/tasks/acts_as_adjacency_list_tasks.rake +4 -0
- data/vendor/plugins/acts_as_adjacency_list/test/acts_as_adjacency_list_test.rb +293 -0
- data/vendor/{rails/railties/lib/rails_generator/generators/components/plugin/templates → plugins/acts_as_adjacency_list}/uninstall.rb +0 -0
- data/vendor/plugins/attachment_fu/CHANGELOG +12 -1
- data/vendor/plugins/attachment_fu/README +25 -1
- data/vendor/plugins/attachment_fu/init.rb +3 -1
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb +171 -108
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb +8 -4
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb +6 -12
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/core_image_processor.rb +59 -0
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/gd2_processor.rb +54 -0
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +1 -1
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +12 -9
- data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +5 -4
- data/vendor/plugins/attachment_fu/test/backends/remote/s3_test.rb +17 -1
- data/vendor/plugins/attachment_fu/test/base_attachment_tests.rb +20 -0
- data/vendor/plugins/attachment_fu/test/basic_test.rb +6 -0
- data/vendor/plugins/attachment_fu/test/extra_attachment_test.rb +10 -0
- data/vendor/plugins/attachment_fu/test/fixtures/attachment.rb +22 -1
- data/vendor/plugins/attachment_fu/test/processors/core_image_test.rb +37 -0
- data/vendor/plugins/attachment_fu/test/processors/gd2_test.rb +31 -0
- data/vendor/plugins/attachment_fu/test/processors/rmagick_test.rb +19 -5
- data/vendor/plugins/attachment_fu/test/schema.rb +22 -0
- data/vendor/plugins/attachment_fu/test/test_helper.rb +10 -2
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb +27 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb +31 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/perspective.rb +25 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/quality.rb +25 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/scale.rb +47 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/watermark.rb +32 -0
- data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/processor.rb +123 -0
- data/vendor/plugins/attribute_fu/MIT-LICENSE +20 -0
- data/vendor/plugins/attribute_fu/README +115 -0
- data/vendor/plugins/attribute_fu/Rakefile +22 -0
- data/vendor/plugins/attribute_fu/init.rb +4 -0
- data/vendor/plugins/attribute_fu/lib/attribute_fu.rb +2 -0
- data/vendor/plugins/attribute_fu/lib/attribute_fu/associated_form_helper.rb +139 -0
- data/vendor/plugins/attribute_fu/lib/attribute_fu/associations.rb +124 -0
- data/vendor/plugins/attribute_fu/tasks/attribute_fu_tasks.rake +4 -0
- data/vendor/{rails/railties/fresh_rakefile → plugins/attribute_fu/test/Rakefile} +0 -0
- data/vendor/plugins/attribute_fu/test/app/controllers/application.rb +10 -0
- data/vendor/{rails/railties → plugins/attribute_fu/test/app}/helpers/application_helper.rb +0 -0
- data/vendor/plugins/attribute_fu/test/app/models/comment.rb +8 -0
- data/vendor/plugins/attribute_fu/test/app/models/photo.rb +3 -0
- data/vendor/plugins/attribute_fu/test/config/boot.rb +97 -0
- data/vendor/plugins/attribute_fu/test/config/database.yml +15 -0
- data/vendor/plugins/attribute_fu/test/config/environment.rb +15 -0
- data/vendor/plugins/attribute_fu/test/config/environments/development.rb +18 -0
- data/vendor/{rails/railties → plugins/attribute_fu/test/config}/environments/test.rb +0 -0
- data/vendor/{rails/railties/configs → plugins/attribute_fu/test/config}/routes.rb +0 -0
- data/vendor/plugins/attribute_fu/test/db/migrate/001_create_photos.rb +14 -0
- data/vendor/plugins/attribute_fu/test/db/migrate/002_create_comments.rb +15 -0
- data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/console +0 -0
- data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/destroy +0 -0
- data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/generate +0 -0
- data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/server +0 -0
- data/vendor/plugins/attribute_fu/test/test/test_helper.rb +6 -0
- data/vendor/plugins/attribute_fu/test/test/unit/associated_form_helper_test.rb +376 -0
- data/vendor/plugins/attribute_fu/test/test/unit/comment_test.rb +6 -0
- data/vendor/plugins/attribute_fu/test/test/unit/photo_test.rb +149 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/init.rb +3 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda.rb +20 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/active_record_helpers.rb +338 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/context.rb +143 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/general.rb +119 -0
- data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/private_helpers.rb +17 -0
- data/vendor/plugins/attribute_fu/uninstall.rb +1 -0
- data/vendor/plugins/auto_complete/README +23 -0
- data/vendor/plugins/auto_complete/Rakefile +22 -0
- data/vendor/plugins/auto_complete/init.rb +2 -0
- data/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
- data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +142 -0
- data/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
- data/vendor/plugins/enumerable_constants/lib/enumerable_constants.rb +4 -0
- data/vendor/plugins/find_by_param/MIT-LICENSE +20 -0
- data/vendor/plugins/find_by_param/README +48 -0
- data/vendor/plugins/find_by_param/Rakefile +22 -0
- data/vendor/plugins/find_by_param/init.rb +18 -0
- data/vendor/plugins/find_by_param/install.rb +1 -0
- data/vendor/plugins/find_by_param/lib/find_by_param.rb +143 -0
- data/vendor/plugins/find_by_param/tasks/find_by_param_tasks.rake +4 -0
- data/vendor/plugins/find_by_param/test/find_by_param_test.rb +74 -0
- data/vendor/plugins/find_by_param/test/schema.rb +16 -0
- data/vendor/plugins/find_by_param/test/test_helper.rb +17 -0
- data/vendor/plugins/find_by_param/uninstall.rb +1 -0
- data/vendor/plugins/globalite/CHANGELOG +22 -0
- data/vendor/plugins/globalite/README +199 -0
- data/vendor/plugins/globalite/README.rdoc +199 -0
- data/vendor/plugins/globalite/Rakefile +32 -0
- data/vendor/plugins/globalite/globalite.gemspec +14 -0
- data/vendor/plugins/globalite/init.rb +1 -0
- data/vendor/plugins/globalite/install.rb +1 -0
- data/vendor/plugins/globalite/lang/rails/de-DE.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/en-UK.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/en-US.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/es-AR.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/es-ES.yml +359 -0
- data/vendor/plugins/globalite/lang/rails/fi-FI.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/fr-FR.yml +359 -0
- data/vendor/plugins/globalite/lang/rails/hu-HU.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/it.yml +358 -0
- data/vendor/plugins/globalite/lang/rails/nl-NL.yml +347 -0
- data/vendor/plugins/globalite/lang/rails/pl-PL.yml +358 -0
- data/vendor/plugins/globalite/lang/rails/pt-BR.yml +324 -0
- data/vendor/plugins/globalite/lang/rails/pt-PT.yml +324 -0
- data/vendor/plugins/globalite/lang/rails/ru-RU.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/sr-CP.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/sr-SR.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/tr.yml +186 -0
- data/vendor/plugins/globalite/lang/rails/zh-CN.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/zh-HK.yml +357 -0
- data/vendor/plugins/globalite/lang/rails/zh-TW.yml +357 -0
- data/vendor/plugins/globalite/lib/globalite.rb +28 -0
- data/vendor/plugins/globalite/lib/globalite/l10n.rb +302 -0
- data/vendor/plugins/globalite/lib/globalite/locale.rb +56 -0
- data/vendor/plugins/globalite/lib/rails/core_ext.rb +19 -0
- data/vendor/plugins/globalite/lib/rails/localization.rb +58 -0
- data/vendor/plugins/globalite/lib/rails/localized_action_view.rb +211 -0
- data/vendor/plugins/globalite/lib/rails/localized_active_record.rb +80 -0
- data/vendor/plugins/globalite/spec/core_localization_spec.rb +116 -0
- data/vendor/plugins/globalite/spec/helpers/spec_helper.rb +16 -0
- data/vendor/plugins/globalite/spec/l10n_spec.rb +251 -0
- data/vendor/plugins/globalite/spec/lang/rails/zz.yml +13 -0
- data/vendor/plugins/globalite/spec/lang/ui/en-UK.yml +3 -0
- data/vendor/plugins/globalite/spec/lang/ui/en-US.yml +3 -0
- data/vendor/plugins/globalite/spec/lang/ui/es.yml +3 -0
- data/vendor/plugins/globalite/spec/lang/ui/fr-FR.yml +8 -0
- data/vendor/plugins/globalite/tasks/cruise.rake +4 -0
- data/vendor/plugins/globalite/tasks/globalite_tasks.rake +47 -0
- data/vendor/plugins/globalite/uninstall.rb +1 -0
- data/vendor/plugins/in_place_editing/lib/in_place_macros_helper.rb +7 -1
- data/vendor/plugins/in_place_editing/test/in_place_editing_test.rb +25 -5
- data/vendor/plugins/resource_controller/LICENSE +1 -1
- data/vendor/plugins/resource_controller/README.rdoc +282 -0
- data/vendor/plugins/resource_controller/Rakefile +14 -1
- data/vendor/plugins/resource_controller/TODO +1 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/scaffold_resource_generator.rb +99 -34
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/functional_spec.rb +255 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/helper_spec.rb +11 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/routing_spec.rb +61 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/unit_spec.rb +11 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/edit_spec.rb +28 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/index_spec.rb +26 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/new_spec.rb +30 -0
- data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/show_spec.rb +25 -0
- data/vendor/plugins/resource_controller/init.rb +1 -6
- data/vendor/plugins/resource_controller/lib/resource_controller.rb +15 -6
- data/vendor/plugins/resource_controller/lib/resource_controller/accessors.rb +11 -14
- data/vendor/plugins/resource_controller/lib/resource_controller/action_options.rb +12 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/class_methods.rb +3 -1
- data/vendor/plugins/resource_controller/lib/resource_controller/controller.rb +10 -4
- data/vendor/plugins/resource_controller/lib/resource_controller/failable_action_options.rb +9 -1
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/current_objects.rb +11 -1
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb +19 -2
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/nested.rb +27 -3
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/singleton_customizations.rb +60 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/urls.rb +6 -2
- data/vendor/plugins/resource_controller/lib/resource_controller/response_collector.rb +6 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/singleton.rb +15 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/version.rb +9 -0
- data/vendor/plugins/resource_controller/rails/init.rb +6 -0
- data/vendor/plugins/resource_controller/resource_controller.gemspec +343 -0
- data/vendor/plugins/resource_controller/test/Rakefile +10 -0
- data/vendor/plugins/resource_controller/test/app/controllers/accounts_controller.rb +6 -0
- data/vendor/plugins/resource_controller/test/app/controllers/application.rb +7 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/options_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/products_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/comments_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/images_controller.rb +4 -0
- data/vendor/plugins/resource_controller/test/app/controllers/options_controller.rb +8 -0
- data/vendor/plugins/resource_controller/test/app/controllers/people_controller.rb +9 -0
- data/vendor/plugins/resource_controller/test/app/controllers/photos_controller.rb +11 -0
- data/vendor/plugins/resource_controller/test/app/controllers/posts_controller.rb +10 -0
- data/vendor/plugins/resource_controller/test/app/controllers/projects_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/somethings_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/tags_controller.rb +13 -0
- data/vendor/plugins/resource_controller/test/app/controllers/users_controller.rb +12 -0
- data/vendor/plugins/resource_controller/test/app/helpers/accounts_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/application_helper.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/helpers/cms/products_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/comments_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/images_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/options_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/people_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/photos_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/posts_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/projects_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/somethings_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/tags_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/users_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/account.rb +4 -0
- data/vendor/plugins/resource_controller/test/app/models/comment.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/image.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/option.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/photo.rb +4 -0
- data/vendor/plugins/resource_controller/test/app/models/post.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/product.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/project.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/something.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/tag.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/user.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/_form.html.erb +4 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/edit.html.erb +14 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/show.html.erb +5 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/edit.rhtml +27 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/index.rhtml +24 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/new.rhtml +26 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/show.rhtml +18 -0
- data/vendor/plugins/resource_controller/test/app/views/images/_form.html.erb +4 -0
- data/vendor/plugins/resource_controller/test/app/views/images/edit.html.erb +14 -0
- data/vendor/plugins/resource_controller/test/app/views/images/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/application.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/comments.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/options.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/people.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/photos.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/projects.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/somethings.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/tags.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/options/_form.html.erb +8 -0
- data/vendor/plugins/resource_controller/test/app/views/options/edit.html.erb +16 -0
- data/vendor/plugins/resource_controller/test/app/views/options/index.html.erb +21 -0
- data/vendor/plugins/resource_controller/test/app/views/options/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/options/show.html.erb +10 -0
- data/vendor/plugins/resource_controller/test/app/views/people/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/people/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/people/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/people/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/edit.rhtml +22 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/index.rhtml +22 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/new.rhtml +21 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/show.rhtml +13 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/index.rhtml +20 -0
- data/{foozah/public/favicon.ico → vendor/plugins/resource_controller/test/app/views/tags/index.rjs} +0 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/users/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/users/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/users/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/users/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/config/boot.rb +109 -0
- data/vendor/plugins/resource_controller/test/config/environment.rb +64 -0
- data/vendor/plugins/resource_controller/test/config/environments/development.rb +21 -0
- data/{foozah → vendor/plugins/resource_controller/test}/config/environments/test.rb +0 -0
- data/vendor/plugins/resource_controller/test/config/routes.rb +58 -0
- data/vendor/plugins/resource_controller/test/db/migrate/001_create_posts.rb +12 -0
- data/vendor/plugins/resource_controller/test/db/migrate/002_create_products.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/003_create_comments.rb +13 -0
- data/vendor/plugins/resource_controller/test/db/migrate/004_create_options.rb +13 -0
- data/vendor/plugins/resource_controller/test/db/migrate/005_create_photos.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/006_create_tags.rb +17 -0
- data/vendor/plugins/resource_controller/test/db/migrate/007_create_somethings.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/008_create_accounts.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/009_add_account_id_to_photos.rb +9 -0
- data/vendor/plugins/resource_controller/test/db/migrate/010_create_projects.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/011_create_images.rb +12 -0
- data/vendor/plugins/resource_controller/test/db/migrate/012_create_users.rb +11 -0
- data/{foozah → vendor/plugins/resource_controller/test}/script/console +0 -0
- data/vendor/plugins/resource_controller/test/script/destroy +3 -0
- data/vendor/plugins/resource_controller/test/script/generate +3 -0
- data/{foozah → vendor/plugins/resource_controller/test}/script/server +0 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/accounts.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/comments.yml +11 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/images.yml +6 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/options.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/photos.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/photos_tags.yml +3 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/posts.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/products.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/projects.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/somethings.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/tags.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/users.yml +5 -0
- data/vendor/plugins/resource_controller/test/test/functional/cms/options_controller_test.rb +23 -0
- data/vendor/plugins/resource_controller/test/test/functional/cms/products_controller_test.rb +23 -0
- data/vendor/plugins/resource_controller/test/test/functional/comments_controller_test.rb +26 -0
- data/vendor/plugins/resource_controller/test/test/functional/images_controller_test.rb +37 -0
- data/vendor/plugins/resource_controller/test/test/functional/people_controller_test.rb +34 -0
- data/vendor/plugins/resource_controller/test/test/functional/photos_controller_test.rb +130 -0
- data/vendor/plugins/resource_controller/test/test/functional/posts_controller_test.rb +34 -0
- data/vendor/plugins/resource_controller/test/test/functional/projects_controller_test.rb +18 -0
- data/vendor/plugins/resource_controller/test/test/functional/somethings_controller_test.rb +28 -0
- data/vendor/plugins/resource_controller/test/test/functional/tags_controller_test.rb +64 -0
- data/vendor/plugins/resource_controller/test/test/functional/users_controller_test.rb +24 -0
- data/vendor/plugins/resource_controller/test/test/test_helper.rb +12 -0
- data/vendor/plugins/resource_controller/test/test/unit/accessors_test.rb +110 -0
- data/vendor/plugins/resource_controller/test/test/unit/account_test.rb +7 -0
- data/vendor/plugins/resource_controller/test/test/unit/action_options_test.rb +109 -0
- data/vendor/plugins/resource_controller/test/test/unit/base_test.rb +11 -0
- data/vendor/plugins/resource_controller/test/test/unit/comment_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/failable_action_options_test.rb +77 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/current_objects_test.rb +133 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/internal_test.rb +106 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/nested_test.rb +86 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_current_objects_test.rb +68 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_nested_test.rb +77 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_urls_test.rb +67 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/urls_test.rb +75 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers_test.rb +25 -0
- data/vendor/plugins/resource_controller/test/test/unit/image_test.rb +7 -0
- data/vendor/plugins/resource_controller/test/test/unit/option_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/photo_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/post_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/project_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/response_collector_test.rb +49 -0
- data/vendor/plugins/resource_controller/test/test/unit/something_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/tag_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/urligence_test.rb +203 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/Rakefile +32 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/bin/convert_to_should_syntax +40 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/init.rb +3 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda.rb +43 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/active_record_helpers.rb +580 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/color.rb +77 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/controller_tests.rb +467 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/html.rb +201 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/xml.rb +170 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/proc_extensions.rb +14 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb +239 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/general.rb +118 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/private_helpers.rb +22 -0
- data/vendor/plugins/rspec-rails/CHANGES +26 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/MIT-LICENSE +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/README +0 -0
- data/vendor/plugins/rspec-rails/Rakefile +64 -0
- data/vendor/plugins/rspec-rails/UPGRADE +7 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/CHANGES +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/rspec_generator.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/all_stories.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/previous_failures.txt +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/rcov.opts +0 -0
- data/{foozah → vendor/plugins/rspec-rails/generators/rspec/templates}/script/spec +0 -0
- data/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server +116 -0
- data/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts +4 -0
- data/vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb +47 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/stories_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/USAGE +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/rspec_controller_generator.rb +0 -0
- data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb +25 -0
- data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb +12 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/USAGE +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/rspec_model_generator.rb +0 -0
- data/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb +15 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +166 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb +327 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +26 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb +27 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb +61 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb +23 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/init.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/autotest/discover.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb +81 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails.rb +52 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example.rb +46 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/assigns_hash_proxy.rb +43 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/controller_example_group.rb +271 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/functional_example_group.rb +59 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/helper_example_group.rb +164 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/model_example_group.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb +29 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/render_observer.rb +90 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/view_example_group.rb +178 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/base.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/rescue.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/test_response.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_view/base.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/active_record/base.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/object.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/example/configuration.rb +71 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/spec/matchers/have.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers.rb +30 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/assert_select.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/have_text.rb +57 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/include_text.rb +54 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/redirect_to.rb +113 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/render_template.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb +126 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/story_adapter.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/version.rb +39 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/autotest/mappings_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/autotest/rails_rspec_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/example/assigns_hash_proxy_spec.rb +60 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/configuration_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/example/controller_isolation_spec.rb +62 -0
- data/vendor/plugins/rspec-rails/spec/rails/example/controller_spec_spec.rb +206 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/example_group_factory_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/example/helper_spec_spec.rb +161 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/model_spec_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/shared_behaviour_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/test_unit_assertion_accessibility_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/example/view_spec_spec.rb +272 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_view_base_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/active_record_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/matchers/assert_select_spec.rb +806 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/description_generation_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/errors_on_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/have_text_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/matchers/include_text_spec.rb +70 -0
- data/vendor/plugins/rspec-rails/spec/rails/matchers/redirect_to_spec.rb +209 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/render_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/ar_classes.rb +10 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/mock_model_spec.rb +64 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/stub_model_spec.rb +79 -0
- data/vendor/plugins/rspec-rails/spec/rails/sample_modified_fixture.rb +8 -0
- data/vendor/plugins/rspec-rails/spec/rails/sample_spec.rb +8 -0
- data/vendor/plugins/rspec-rails/spec/rails/spec_server_spec.rb +96 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/spec_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails_suite.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/spec_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/action_view_base_spec_controller.rb +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/controllers/controller_spec_controller.rb +68 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/redirect_spec_controller.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/render_spec_controller.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/rjs_spec_controller.rb +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/helpers/explicit_helper.rb +34 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/more_explicit_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/plugin_application_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/view_spec_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_template.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.js.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/_replacement_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_div.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_page_element.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/insert_html.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_effect.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/no_tags.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_spacer.rhtml +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml +5 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/entry_form.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/explicit_helper.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/foo/show.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/implicit_helper.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/multiple_helpers.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/all.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/steps/people.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback.rb +0 -0
- data/vendor/plugins/rspec-rails/tasks/rspec.rake +137 -0
- data/vendor/plugins/rspec/CHANGES +59 -0
- data/vendor/plugins/rspec/MIT-LICENSE +1 -1
- data/vendor/plugins/rspec/README +9 -44
- data/vendor/plugins/rspec/Rakefile +34 -51
- data/vendor/plugins/rspec/TODO +0 -1
- data/vendor/plugins/rspec/bin/autospec +3 -0
- data/vendor/plugins/rspec/bin/spec +0 -0
- data/vendor/plugins/rspec/bin/spec_translator +0 -0
- data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +0 -0
- data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +1 -0
- data/vendor/plugins/rspec/examples/stories/calculator.rb +1 -1
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +1 -1
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +17 -17
- data/vendor/plugins/rspec/lib/autotest/discover.rb +1 -1
- data/vendor/plugins/rspec/lib/autotest/rspec.rb +7 -9
- data/vendor/plugins/rspec/lib/spec.rb +10 -9
- data/vendor/plugins/rspec/lib/spec/adapters.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine.rb +26 -0
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/mri.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/rubinius.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/example.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/example/configuration.rb +30 -16
- data/vendor/plugins/rspec/lib/spec/example/example_group.rb +2 -1
- data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +23 -21
- data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +23 -7
- data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +2 -0
- data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/example/module_inclusion_warnings.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +4 -12
- data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/extensions.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +7 -0
- data/vendor/plugins/rspec/lib/spec/extensions/object.rb +0 -4
- data/vendor/plugins/rspec/lib/spec/matchers/change.rb +14 -10
- data/vendor/plugins/rspec/lib/spec/matchers/has.rb +1 -11
- data/vendor/plugins/rspec/lib/spec/matchers/have.rb +5 -1
- data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +53 -30
- data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +113 -10
- data/vendor/plugins/rspec/lib/spec/mocks.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +5 -1
- data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +34 -1
- data/vendor/plugins/rspec/lib/spec/mocks/extensions.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/mocks/framework.rb +15 -0
- data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +30 -7
- data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +13 -7
- data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +26 -12
- data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +18 -26
- data/vendor/plugins/rspec/lib/spec/runner.rb +3 -4
- data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +2 -3
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +4 -8
- data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +18 -14
- data/vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb +65 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +4 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +5 -1
- data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +48 -15
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +69 -12
- data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +17 -15
- data/vendor/plugins/rspec/lib/spec/runner/options.rb +38 -15
- data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +15 -11
- data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/runner.rb +9 -5
- data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +15 -1
- data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +20 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +3 -1
- data/vendor/plugins/rspec/lib/spec/story/step.rb +43 -31
- data/vendor/plugins/rspec/lib/spec/story/story.rb +8 -11
- data/vendor/plugins/rspec/lib/spec/story/world.rb +6 -3
- data/vendor/plugins/rspec/lib/spec/version.rb +2 -2
- data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +2 -0
- data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +140 -129
- data/vendor/plugins/rspec/spec/spec/adapters/ruby_engine_spec.rb +16 -0
- data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +0 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group/described_module_spec.rb +20 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group/warning_messages_spec.rb +76 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +117 -102
- data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +102 -19
- data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +13 -1
- data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +28 -6
- data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +12 -0
- data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +11 -0
- data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +0 -0
- data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +27 -9
- data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +24 -0
- data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +4 -6
- data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +58 -37
- data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +16 -0
- data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +7 -5
- data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +11 -1
- data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +124 -0
- data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +64 -2
- data/vendor/plugins/rspec/spec/spec/mocks/{bug_report_10263.rb → bug_report_10263_spec.rb} +0 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +2 -0
- data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +15 -0
- data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +32 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +62 -43
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +41 -5
- data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +1 -1
- data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +7 -1
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +3 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +30 -25
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +0 -3
- data/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb +333 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +12 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +2 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +110 -78
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +28 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +214 -1
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -28
- data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +65 -49
- data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +103 -17
- data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +10 -7
- data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +1 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +10 -4
- data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +14 -13
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +124 -52
- data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +12 -2
- data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +23 -6
- data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +40 -2
- data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +59 -72
- data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +53 -3
- data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +2 -2
- data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +1 -1
- data/vendor/plugins/rspec/stories/all.rb +1 -1
- data/vendor/plugins/rspec/stories/mock_framework_integration/stories.rb +7 -0
- data/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story +9 -0
- data/vendor/plugins/rspec/stories/resources/spec/spec_with_flexmock.rb +18 -0
- data/vendor/plugins/rspec/stories/stories/multiline_steps.story +23 -0
- data/vendor/plugins/rspec/stories/stories/steps/multiline_steps.rb +13 -0
- data/vendor/plugins/rspec/stories/stories/stories.rb +6 -0
- data/vendor/plugins/state_machine/CHANGELOG.rdoc +97 -0
- data/vendor/plugins/state_machine/LICENSE +20 -0
- data/vendor/plugins/state_machine/README.rdoc +182 -0
- data/vendor/plugins/state_machine/Rakefile +88 -0
- data/vendor/plugins/state_machine/init.rb +1 -0
- data/vendor/plugins/state_machine/lib/state_machine.rb +129 -0
- data/vendor/plugins/state_machine/lib/state_machine/event.rb +116 -0
- data/vendor/plugins/state_machine/lib/state_machine/machine.rb +412 -0
- data/vendor/plugins/state_machine/lib/state_machine/transition.rb +227 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/auto_shop.rb +34 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/car.rb +19 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/highway.rb +3 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/motorcycle.rb +3 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/switch.rb +23 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/switch_observer.rb +20 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/toggle_switch.rb +2 -0
- data/vendor/plugins/state_machine/test/app_root/app/models/vehicle.rb +78 -0
- data/vendor/plugins/state_machine/test/app_root/config/environment.rb +7 -0
- data/vendor/plugins/state_machine/test/app_root/db/migrate/001_create_switches.rb +12 -0
- data/vendor/plugins/state_machine/test/app_root/db/migrate/002_create_auto_shops.rb +13 -0
- data/vendor/plugins/state_machine/test/app_root/db/migrate/003_create_highways.rb +11 -0
- data/vendor/plugins/state_machine/test/app_root/db/migrate/004_create_vehicles.rb +16 -0
- data/vendor/plugins/state_machine/test/factory.rb +73 -0
- data/vendor/plugins/state_machine/test/functional/state_machine_test.rb +499 -0
- data/vendor/plugins/state_machine/test/test_helper.rb +13 -0
- data/vendor/plugins/state_machine/test/unit/event_test.rb +235 -0
- data/vendor/plugins/state_machine/test/unit/invalid_transition_test.rb +7 -0
- data/vendor/plugins/state_machine/test/unit/machine_test.rb +306 -0
- data/vendor/plugins/state_machine/test/unit/state_machine_test.rb +130 -0
- data/vendor/plugins/state_machine/test/unit/transition_test.rb +633 -0
- metadata +1607 -2266
- data/app/controllers/admin/categories_controller.rb +0 -59
- data/app/controllers/cart_controller.rb +0 -44
- data/app/controllers/checkout_controller.rb +0 -173
- data/app/controllers/store_controller.rb +0 -27
- data/app/helpers/admin/categories_helper.rb +0 -3
- data/app/helpers/cart_helper.rb +0 -6
- data/app/helpers/checkout_helper.rb +0 -14
- data/app/models/cart_item.rb +0 -29
- data/app/models/category.rb +0 -22
- data/app/models/credit_card.rb +0 -24
- data/app/models/inventory_level.rb +0 -19
- data/app/models/order_operation.rb +0 -7
- data/app/models/payment.rb +0 -49
- data/app/models/search_criteria.rb +0 -27
- data/app/models/txn.rb +0 -7
- data/app/views/account/index.rhtml +0 -3
- data/app/views/account/login.rhtml +0 -12
- data/app/views/account/signup.rhtml +0 -16
- data/app/views/admin/categories/_form.rhtml +0 -10
- data/app/views/admin/categories/edit.rhtml +0 -9
- data/app/views/admin/categories/list.rhtml +0 -47
- data/app/views/admin/categories/new.rhtml +0 -8
- data/app/views/admin/option_types/_form.rhtml +0 -16
- data/app/views/admin/option_types/_new_option_value.rhtml +0 -13
- data/app/views/admin/option_types/_option_values.rhtml +0 -43
- data/app/views/admin/option_types/edit.rhtml +0 -8
- data/app/views/admin/option_types/index.rhtml +0 -23
- data/app/views/admin/option_types/new.rhtml +0 -8
- data/app/views/admin/option_types/select.rhtml +0 -28
- data/app/views/admin/orders/index.rhtml +0 -99
- data/app/views/admin/orders/show.rhtml +0 -72
- data/app/views/admin/overview/index.rhtml +0 -3
- data/app/views/admin/products/_form.rhtml +0 -59
- data/app/views/admin/products/_menu.rhtml +0 -7
- data/app/views/admin/products/_new_variant.rhtml +0 -11
- data/app/views/admin/products/_variants.rhtml +0 -52
- data/app/views/admin/products/edit.rhtml +0 -8
- data/app/views/admin/products/index.rhtml +0 -63
- data/app/views/admin/products/new.rhtml +0 -9
- data/app/views/admin/reports/index.rhtml +0 -29
- data/app/views/admin/reports/sales_total.rhtml +0 -28
- data/app/views/cart/index.rhtml +0 -49
- data/app/views/checkout/_address.rhtml +0 -51
- data/app/views/checkout/_address_ro.rhtml +0 -18
- data/app/views/checkout/_cart_item.rhtml +0 -5
- data/app/views/checkout/_extra.rhtml +0 -1
- data/app/views/checkout/addresses.rhtml +0 -51
- data/app/views/checkout/cvv.rhtml +0 -15
- data/app/views/checkout/empty_cart.rhtml +0 -4
- data/app/views/checkout/final_confirmation.rhtml +0 -92
- data/app/views/checkout/incomplete.rhtml +0 -7
- data/app/views/checkout/thank_you.rhtml +0 -11
- data/app/views/layouts/admin.rhtml +0 -71
- data/app/views/layouts/application.rhtml +0 -64
- data/app/views/layouts/products.rhtml +0 -19
- data/app/views/order_mailer/cancel.rhtml +0 -15
- data/app/views/order_mailer/confirm.rhtml +0 -18
- data/app/views/shared/_images.html.erb +0 -43
- data/app/views/shared/_order_details.rhtml +0 -35
- data/app/views/shared/_paginate.rhtml +0 -34
- data/app/views/shared/_report_criteria.rhtml +0 -32
- data/app/views/shared/_store_menu.rhtml +0 -6
- data/app/views/store/_products.rhtml +0 -10
- data/app/views/store/_thumbnails.html.erb +0 -9
- data/app/views/store/list.rhtml +0 -12
- data/app/views/store/show.rhtml +0 -62
- data/db/development_structure.sql +0 -294
- data/db/sample/categories.yml +0 -35
- data/db/sample/countries.yml +0 -3
- data/db/sample/credit_cards.yml +0 -12
- data/db/sample/txns.yml +0 -7
- data/foozah/CHANGELOG +0 -47
- data/foozah/CONTRIBUTORS +0 -27
- data/foozah/INSTALL +0 -27
- data/foozah/LICENSE +0 -26
- data/foozah/README.markdown +0 -88
- data/foozah/Rakefile +0 -3
- data/foozah/config/boot.rb +0 -148
- data/foozah/config/database.yml +0 -16
- data/foozah/config/environment.rb +0 -106
- data/foozah/config/environments/development.rb +0 -24
- data/foozah/config/environments/production.rb +0 -21
- data/foozah/config/routes.rb +0 -1
- data/foozah/db/development.sqlite3.db +0 -0
- data/foozah/public/404.html +0 -30
- data/foozah/public/500.html +0 -30
- data/foozah/public/dispatch.cgi +0 -10
- data/foozah/public/dispatch.fcgi +0 -24
- data/foozah/public/dispatch.rb +0 -10
- data/foozah/public/images/amex_cid.gif +0 -0
- data/foozah/public/images/calendar_date_select/calendar.gif +0 -0
- data/foozah/public/images/creditcard.gif +0 -0
- data/foozah/public/images/discover_cid.gif +0 -0
- data/foozah/public/images/master_cid.jpg +0 -0
- data/foozah/public/images/rails.png +0 -0
- data/foozah/public/images/spinner.gif +0 -0
- data/foozah/public/images/spree.jpg +0 -0
- data/foozah/public/images/spree/progress.gif +0 -0
- data/foozah/public/images/spree/spinner.gif +0 -0
- data/foozah/public/images/spree/spree.jpg +0 -0
- data/foozah/public/images/visa_cid.gif +0 -0
- data/foozah/public/javascripts/application.js +0 -2
- data/foozah/public/javascripts/calendar_date_select/calendar_date_select.js +0 -439
- data/foozah/public/javascripts/calendar_date_select/format_american.js +0 -34
- data/foozah/public/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
- data/foozah/public/javascripts/calendar_date_select/format_finnish.js +0 -24
- data/foozah/public/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
- data/foozah/public/javascripts/calendar_date_select/format_italian.js +0 -24
- data/foozah/public/javascripts/controls.js +0 -833
- data/foozah/public/javascripts/dragdrop.js +0 -942
- data/foozah/public/javascripts/effects.js +0 -1088
- data/foozah/public/javascripts/prototype.js +0 -4184
- data/foozah/public/plugin_assets/README +0 -5
- data/foozah/public/plugin_assets/calendar_date_select/images/calendar_date_select/calendar.gif +0 -0
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js +0 -439
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_american.js +0 -34
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_finnish.js +0 -24
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_italian.js +0 -24
- data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/locale/fi.js +0 -10
- data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/blue.css +0 -130
- data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/default.css +0 -135
- data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/plain.css +0 -128
- data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/red.css +0 -135
- data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/silver.css +0 -133
- data/foozah/public/plugin_assets/spree/404.html +0 -30
- data/foozah/public/plugin_assets/spree/500.html +0 -30
- data/foozah/public/plugin_assets/spree/dispatch.cgi +0 -10
- data/foozah/public/plugin_assets/spree/dispatch.fcgi +0 -24
- data/foozah/public/plugin_assets/spree/dispatch.rb +0 -10
- data/foozah/public/plugin_assets/spree/favicon.ico +0 -0
- data/foozah/public/plugin_assets/spree/images/amex_cid.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/creditcard.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/discover_cid.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/master_cid.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_bag.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_baseball_jersey.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_jr_spaghetti.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_mug.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_ringer_tshirt.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_stein.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/products/ror_tote.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/rails.png +0 -0
- data/foozah/public/plugin_assets/spree/images/spinner.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/spree/progress.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/spree/spinner.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/spree/spree.jpg +0 -0
- data/foozah/public/plugin_assets/spree/images/spree/spree_logo142x65.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/spree/spree_logo245x112.gif +0 -0
- data/foozah/public/plugin_assets/spree/images/visa_cid.gif +0 -0
- data/foozah/public/plugin_assets/spree/javascripts/application.js +0 -2
- data/foozah/public/plugin_assets/spree/javascripts/controls.js +0 -833
- data/foozah/public/plugin_assets/spree/javascripts/dragdrop.js +0 -942
- data/foozah/public/plugin_assets/spree/javascripts/effects.js +0 -1088
- data/foozah/public/plugin_assets/spree/javascripts/lowpro.js +0 -307
- data/foozah/public/plugin_assets/spree/javascripts/prototype.js +0 -2515
- data/foozah/public/plugin_assets/spree/robots.txt +0 -1
- data/foozah/public/plugin_assets/spree/stylesheets/cart/_controller.css +0 -71
- data/foozah/public/plugin_assets/spree/stylesheets/checkout/_controller.css +0 -31
- data/foozah/public/plugin_assets/spree/stylesheets/fullscreen.css +0 -63
- data/foozah/public/plugin_assets/spree/stylesheets/orders/_controller.css +0 -3
- data/foozah/public/plugin_assets/spree/stylesheets/products/_controller.css +0 -38
- data/foozah/public/plugin_assets/spree/stylesheets/spree-admin.css +0 -355
- data/foozah/public/plugin_assets/spree/stylesheets/spree.css +0 -66
- data/foozah/public/plugin_assets/spree/stylesheets/store/_controller.css +0 -23
- data/foozah/public/robots.txt +0 -1
- data/foozah/public/stylesheets/application.css +0 -4
- data/foozah/public/stylesheets/calendar_date_select/blue.css +0 -130
- data/foozah/public/stylesheets/calendar_date_select/default.css +0 -135
- data/foozah/public/stylesheets/calendar_date_select/plain.css +0 -128
- data/foozah/public/stylesheets/calendar_date_select/red.css +0 -135
- data/foozah/public/stylesheets/calendar_date_select/silver.css +0 -133
- data/foozah/public/stylesheets/cart/_controller.css +0 -71
- data/foozah/public/stylesheets/checkout/_controller-override.css +0 -13
- data/foozah/public/stylesheets/checkout/_controller.css +0 -31
- data/foozah/public/stylesheets/fullscreen.css +0 -63
- data/foozah/public/stylesheets/orders/_controller.css +0 -3
- data/foozah/public/stylesheets/products/_controller.css +0 -38
- data/foozah/public/stylesheets/spree-admin.css +0 -355
- data/foozah/public/stylesheets/spree.css +0 -296
- data/foozah/public/stylesheets/store/_controller.css +0 -23
- data/foozah/script/about +0 -3
- data/foozah/script/breakpointer +0 -3
- data/foozah/script/generate +0 -16
- data/foozah/script/performance/benchmarker +0 -3
- data/foozah/script/performance/profiler +0 -3
- data/foozah/script/process/inspector +0 -3
- data/foozah/script/process/reaper +0 -3
- data/foozah/script/process/spawner +0 -3
- data/foozah/script/runner +0 -3
- data/foozah/script/spec_server +0 -102
- data/lib/easy_role_permissions.yml +0 -76
- data/lib/generators/instance/templates/instance_boot.rb +0 -148
- data/lib/generators/instance/templates/instance_environment.rb +0 -106
- data/lib/spree/extension_migrator.rb +0 -47
- data/login.patch +0 -55
- data/public/plugin_assets/README +0 -5
- data/public/plugin_assets/calendar_date_select/images/calendar_date_select/calendar.gif +0 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js +0 -439
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_american.js +0 -34
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_finnish.js +0 -24
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_italian.js +0 -24
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/locale/fi.js +0 -10
- data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/blue.css +0 -130
- data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/default.css +0 -135
- data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/plain.css +0 -128
- data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/red.css +0 -135
- data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/silver.css +0 -133
- data/public/plugin_assets/spree/404.html +0 -30
- data/public/plugin_assets/spree/500.html +0 -30
- data/public/plugin_assets/spree/dispatch.cgi +0 -10
- data/public/plugin_assets/spree/dispatch.fcgi +0 -24
- data/public/plugin_assets/spree/dispatch.rb +0 -10
- data/public/plugin_assets/spree/favicon.ico +0 -0
- data/public/plugin_assets/spree/images/amex_cid.gif +0 -0
- data/public/plugin_assets/spree/images/creditcard.gif +0 -0
- data/public/plugin_assets/spree/images/discover_cid.gif +0 -0
- data/public/plugin_assets/spree/images/master_cid.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_bag.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_baseball_jersey.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_jr_spaghetti.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_mug.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_ringer_tshirt.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_stein.jpg +0 -0
- data/public/plugin_assets/spree/images/products/ror_tote.jpg +0 -0
- data/public/plugin_assets/spree/images/rails.png +0 -0
- data/public/plugin_assets/spree/images/spinner.gif +0 -0
- data/public/plugin_assets/spree/images/spree/progress.gif +0 -0
- data/public/plugin_assets/spree/images/spree/spinner.gif +0 -0
- data/public/plugin_assets/spree/images/spree/spree.jpg +0 -0
- data/public/plugin_assets/spree/images/spree/spree_logo142x65.gif +0 -0
- data/public/plugin_assets/spree/images/spree/spree_logo245x112.gif +0 -0
- data/public/plugin_assets/spree/images/visa_cid.gif +0 -0
- data/public/plugin_assets/spree/javascripts/application.js +0 -2
- data/public/plugin_assets/spree/javascripts/controls.js +0 -833
- data/public/plugin_assets/spree/javascripts/dragdrop.js +0 -942
- data/public/plugin_assets/spree/javascripts/effects.js +0 -1088
- data/public/plugin_assets/spree/javascripts/lowpro.js +0 -307
- data/public/plugin_assets/spree/javascripts/prototype.js +0 -2515
- data/public/plugin_assets/spree/robots.txt +0 -1
- data/public/plugin_assets/spree/stylesheets/cart/_controller.css +0 -71
- data/public/plugin_assets/spree/stylesheets/checkout/_controller.css +0 -31
- data/public/plugin_assets/spree/stylesheets/fullscreen.css +0 -63
- data/public/plugin_assets/spree/stylesheets/orders/_controller.css +0 -3
- data/public/plugin_assets/spree/stylesheets/products/_controller.css +0 -38
- data/public/plugin_assets/spree/stylesheets/spree-admin.css +0 -355
- data/public/plugin_assets/spree/stylesheets/spree.css +0 -66
- data/public/plugin_assets/spree/stylesheets/store/_controller.css +0 -23
- data/public/stylesheets/cart/_controller.css +0 -71
- data/public/stylesheets/checkout/_controller-override.css +0 -13
- data/public/stylesheets/checkout/_controller.css +0 -31
- data/public/stylesheets/products/_controller.css +0 -38
- data/public/stylesheets/store/_controller.css +0 -23
- data/spec/models/cart_item_spec.rb +0 -50
- data/spec/models/cart_spec.rb +0 -51
- data/spree.tmproj +0 -800
- data/vendor/extensions/payment_gateway/spec/controllers/payment_gateway_spec.rb +0 -19
- data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/show.html.erb +0 -4
- data/vendor/extensions/tax_calculator/db/migrate/001_create_tax_rates.rb +0 -13
- data/vendor/extensions/tax_calculator/spec/fixtures/tax_rates.yml +0 -3
- data/vendor/plugins/active_merchant/CHANGELOG +0 -345
- data/vendor/plugins/active_merchant/CONTRIBUTERS +0 -69
- data/vendor/plugins/active_merchant/MIT-LICENSE +0 -20
- data/vendor/plugins/active_merchant/README +0 -127
- data/vendor/plugins/active_merchant/Rakefile +0 -160
- data/vendor/plugins/active_merchant/gem-public_cert.pem +0 -20
- data/vendor/plugins/active_merchant/generators/gateway/USAGE +0 -5
- data/vendor/plugins/active_merchant/generators/gateway/gateway_generator.rb +0 -61
- data/vendor/plugins/active_merchant/generators/gateway/templates/gateway.rb +0 -77
- data/vendor/plugins/active_merchant/generators/gateway/templates/gateway_test.rb +0 -49
- data/vendor/plugins/active_merchant/generators/gateway/templates/remote_gateway_test.rb +0 -57
- data/vendor/plugins/active_merchant/generators/integration/USAGE +0 -5
- data/vendor/plugins/active_merchant/generators/integration/integration_generator.rb +0 -68
- data/vendor/plugins/active_merchant/generators/integration/templates/helper.rb +0 -34
- data/vendor/plugins/active_merchant/generators/integration/templates/helper_test.rb +0 -54
- data/vendor/plugins/active_merchant/generators/integration/templates/integration.rb +0 -18
- data/vendor/plugins/active_merchant/generators/integration/templates/module_test.rb +0 -9
- data/vendor/plugins/active_merchant/generators/integration/templates/notification.rb +0 -100
- data/vendor/plugins/active_merchant/generators/integration/templates/notification_test.rb +0 -41
- data/vendor/plugins/active_merchant/init.rb +0 -3
- data/vendor/plugins/active_merchant/lib/active_merchant.rb +0 -70
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/avs_result.rb +0 -95
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/base.rb +0 -57
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/check.rb +0 -61
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card.rb +0 -157
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card_formatting.rb +0 -21
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card_methods.rb +0 -125
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/cvv_result.rb +0 -38
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/expiry_date.rb +0 -28
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateway.rb +0 -162
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways.rb +0 -3
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/authorize_net.rb +0 -633
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/authorize_net_cim.rb +0 -697
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/bogus.rb +0 -86
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/braintree.rb +0 -205
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/card_stream.rb +0 -235
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/cyber_source.rb +0 -406
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/data_cash.rb +0 -595
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/efsnet.rb +0 -229
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/eway.rb +0 -272
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/exact.rb +0 -222
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/linkpoint.rb +0 -396
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/moneris.rb +0 -205
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/net_registry.rb +0 -189
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/netbilling.rb +0 -168
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/pay_junction.rb +0 -386
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/pay_secure.rb +0 -120
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow.rb +0 -236
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +0 -213
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +0 -39
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +0 -13
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express.rb +0 -138
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express_nv.rb +0 -181
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -15
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv.rb +0 -234
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_express_nv_response.rb +0 -39
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_nv_common_api.rb +0 -227
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_nv_response.rb +0 -28
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_uk.rb +0 -21
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payment_express.rb +0 -242
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal.rb +0 -108
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +0 -314
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +0 -38
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal_express.rb +0 -130
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal_express_common.rb +0 -20
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/plugnpay.rb +0 -292
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/protx.rb +0 -284
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/psigate.rb +0 -214
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/psl_card.rb +0 -302
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/quickpay.rb +0 -183
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/realex.rb +0 -200
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay.rb +0 -31
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay_au.rb +0 -155
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay_tech.rb +0 -113
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/skip_jack.rb +0 -437
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/trans_first.rb +0 -127
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/trust_commerce.rb +0 -414
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/usa_epay.rb +0 -194
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/verifi.rb +0 -228
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/viaklix.rb +0 -165
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations.rb +0 -15
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/action_view_helper.rb +0 -65
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus.rb +0 -22
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/helper.rb +0 -17
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/notification.rb +0 -11
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/return.rb +0 -10
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay.rb +0 -22
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/helper.rb +0 -81
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/notification.rb +0 -156
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/return.rb +0 -10
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay.rb +0 -26
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/common.rb +0 -42
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -70
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/notification.rb +0 -83
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/return.rb +0 -10
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/helper.rb +0 -93
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust.rb +0 -26
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/helper.rb +0 -58
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/notification.rb +0 -57
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/return.rb +0 -67
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex.rb +0 -87
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/helper.rb +0 -68
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/notification.rb +0 -94
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/return.rb +0 -10
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/notification.rb +0 -53
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal.rb +0 -40
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/helper.rb +0 -118
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/notification.rb +0 -154
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/return.rb +0 -10
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/return.rb +0 -35
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout.rb +0 -23
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/helper.rb +0 -59
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/notification.rb +0 -114
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/return.rb +0 -17
- data/vendor/plugins/active_merchant/lib/active_merchant/billing/response.rb +0 -32
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/country.rb +0 -298
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/error.rb +0 -4
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/post_data.rb +0 -22
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/posts_data.rb +0 -80
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/requires_parameters.rb +0 -16
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/utils.rb +0 -18
- data/vendor/plugins/active_merchant/lib/active_merchant/lib/validateable.rb +0 -76
- data/vendor/plugins/active_merchant/lib/certs/cacert.pem +0 -7815
- data/vendor/plugins/active_merchant/lib/support/gateway_support.rb +0 -58
- data/vendor/plugins/active_merchant/lib/tasks/cia.rb +0 -90
- data/vendor/plugins/active_merchant/script/destroy +0 -14
- data/vendor/plugins/active_merchant/script/generate +0 -14
- data/vendor/plugins/active_merchant/test/extra/binding_of_caller.rb +0 -80
- data/vendor/plugins/active_merchant/test/extra/breakpoint.rb +0 -547
- data/vendor/plugins/active_merchant/test/fixtures.yml +0 -277
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_authorize_net_cim_test.rb +0 -458
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_authorize_net_test.rb +0 -145
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_braintree_test.rb +0 -125
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_card_stream_test.rb +0 -148
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_cyber_source_test.rb +0 -144
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_data_cash_test.rb +0 -357
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_efsnet_test.rb +0 -81
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_eway_test.rb +0 -74
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_exact_test.rb +0 -60
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_linkpoint_test.rb +0 -112
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_moneris_test.rb +0 -82
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_net_registry_test.rb +0 -85
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_netbilling_test.rb +0 -70
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_pay_junction_test.rb +0 -143
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_pay_secure_test.rb +0 -39
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_express_nv_test.rb +0 -51
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_express_test.rb +0 -50
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_nv_test.rb +0 -237
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_test.rb +0 -237
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_uk_test.rb +0 -173
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_payment_express_test.rb +0 -126
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_paypal_express_test.rb +0 -49
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_paypal_test.rb +0 -167
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_plugnpay_test.rb +0 -72
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_protx_test.rb +0 -184
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_psigate_test.rb +0 -50
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_psl_card_test.rb +0 -106
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_quickpay_test.rb +0 -182
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_realex_test.rb +0 -224
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_au_test.rb +0 -40
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_tech_test.rb +0 -37
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_test.rb +0 -28
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_skipjack_test.rb +0 -105
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_trans_first_test.rb +0 -34
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_trust_commerce_test.rb +0 -152
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_usa_epay_test.rb +0 -46
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_verifi_test.rb +0 -107
- data/vendor/plugins/active_merchant/test/remote/gateways/remote_viaklix_test.rb +0 -43
- data/vendor/plugins/active_merchant/test/remote/integrations/remote_gestpay_integration_test.rb +0 -37
- data/vendor/plugins/active_merchant/test/remote/integrations/remote_paypal_integration_test.rb +0 -14
- data/vendor/plugins/active_merchant/test/test_helper.rb +0 -173
- data/vendor/plugins/active_merchant/test/unit/avs_result_test.rb +0 -59
- data/vendor/plugins/active_merchant/test/unit/base_test.rb +0 -55
- data/vendor/plugins/active_merchant/test/unit/check_test.rb +0 -76
- data/vendor/plugins/active_merchant/test/unit/country_code_test.rb +0 -33
- data/vendor/plugins/active_merchant/test/unit/country_test.rb +0 -64
- data/vendor/plugins/active_merchant/test/unit/credit_card_formatting_test.rb +0 -19
- data/vendor/plugins/active_merchant/test/unit/credit_card_methods_test.rb +0 -170
- data/vendor/plugins/active_merchant/test/unit/credit_card_test.rb +0 -311
- data/vendor/plugins/active_merchant/test/unit/cvv_result_test.rb +0 -33
- data/vendor/plugins/active_merchant/test/unit/expiry_date_test.rb +0 -21
- data/vendor/plugins/active_merchant/test/unit/gateways/authorize_net_cim_test.rb +0 -640
- data/vendor/plugins/active_merchant/test/unit/gateways/authorize_net_test.rb +0 -280
- data/vendor/plugins/active_merchant/test/unit/gateways/bogus_test.rb +0 -42
- data/vendor/plugins/active_merchant/test/unit/gateways/braintree_test.rb +0 -119
- data/vendor/plugins/active_merchant/test/unit/gateways/card_stream_test.rb +0 -90
- data/vendor/plugins/active_merchant/test/unit/gateways/cyber_source_test.rb +0 -188
- data/vendor/plugins/active_merchant/test/unit/gateways/data_cash_test.rb +0 -132
- data/vendor/plugins/active_merchant/test/unit/gateways/efsnet_test.rb +0 -123
- data/vendor/plugins/active_merchant/test/unit/gateways/eway_test.rb +0 -118
- data/vendor/plugins/active_merchant/test/unit/gateways/exact_test.rb +0 -156
- data/vendor/plugins/active_merchant/test/unit/gateways/gateway_test.rb +0 -41
- data/vendor/plugins/active_merchant/test/unit/gateways/linkpoint_test.rb +0 -167
- data/vendor/plugins/active_merchant/test/unit/gateways/moneris_test.rb +0 -158
- data/vendor/plugins/active_merchant/test/unit/gateways/net_registry_test.rb +0 -416
- data/vendor/plugins/active_merchant/test/unit/gateways/netbilling_test.rb +0 -54
- data/vendor/plugins/active_merchant/test/unit/gateways/pay_junction_test.rb +0 -123
- data/vendor/plugins/active_merchant/test/unit/gateways/pay_secure_test.rb +0 -71
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_nv_test.rb +0 -156
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_test.rb +0 -173
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_uk_test.rb +0 -14
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_nv_test.rb +0 -237
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_test.rb +0 -301
- data/vendor/plugins/active_merchant/test/unit/gateways/payflow_uk_test.rb +0 -30
- data/vendor/plugins/active_merchant/test/unit/gateways/payment_express_test.rb +0 -195
- data/vendor/plugins/active_merchant/test/unit/gateways/paypal_express_test.rb +0 -333
- data/vendor/plugins/active_merchant/test/unit/gateways/paypal_test.rb +0 -380
- data/vendor/plugins/active_merchant/test/unit/gateways/plugnpay_test.rb +0 -86
- data/vendor/plugins/active_merchant/test/unit/gateways/protx_test.rb +0 -122
- data/vendor/plugins/active_merchant/test/unit/gateways/psigate_test.rb +0 -169
- data/vendor/plugins/active_merchant/test/unit/gateways/psl_card_test.rb +0 -64
- data/vendor/plugins/active_merchant/test/unit/gateways/quickpay_test.rb +0 -112
- data/vendor/plugins/active_merchant/test/unit/gateways/realex_test.rb +0 -151
- data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_au_test.rb +0 -150
- data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_tech_test.rb +0 -44
- data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_test.rb +0 -87
- data/vendor/plugins/active_merchant/test/unit/gateways/skip_jack_test.rb +0 -125
- data/vendor/plugins/active_merchant/test/unit/gateways/trans_first_test.rb +0 -112
- data/vendor/plugins/active_merchant/test/unit/gateways/trust_commerce_test.rb +0 -78
- data/vendor/plugins/active_merchant/test/unit/gateways/usa_epay_test.rb +0 -128
- data/vendor/plugins/active_merchant/test/unit/gateways/verifi_test.rb +0 -96
- data/vendor/plugins/active_merchant/test/unit/gateways/viaklix_test.rb +0 -78
- data/vendor/plugins/active_merchant/test/unit/generators/test_gateway_generator.rb +0 -46
- data/vendor/plugins/active_merchant/test/unit/generators/test_generator_helper.rb +0 -20
- data/vendor/plugins/active_merchant/test/unit/generators/test_integration_generator.rb +0 -53
- data/vendor/plugins/active_merchant/test/unit/integrations/action_view_helper_test.rb +0 -47
- data/vendor/plugins/active_merchant/test/unit/integrations/bogus_module_test.rb +0 -20
- data/vendor/plugins/active_merchant/test/unit/integrations/chronopay_module_test.rb +0 -13
- data/vendor/plugins/active_merchant/test/unit/integrations/gestpay_module_test.rb +0 -14
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/bogus_helper_test.rb +0 -28
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/chronopay_helper_test.rb +0 -67
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/gestpay_helper_test.rb +0 -100
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/hi_trust_helper_test.rb +0 -16
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/nochex_helper_test.rb +0 -53
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/paypal_helper_test.rb +0 -162
- data/vendor/plugins/active_merchant/test/unit/integrations/helpers/two_checkout_helper_test.rb +0 -92
- data/vendor/plugins/active_merchant/test/unit/integrations/hi_trust_module_test.rb +0 -13
- data/vendor/plugins/active_merchant/test/unit/integrations/nochex_module_test.rb +0 -13
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/chronopay_notification_test.rb +0 -66
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/gestpay_notification_test.rb +0 -60
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/hi_trust_notification_test.rb +0 -38
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/nochex_notification_test.rb +0 -51
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/notification_test.rb +0 -41
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/paypal_notification_test.rb +0 -85
- data/vendor/plugins/active_merchant/test/unit/integrations/notifications/two_checkout_notification_test.rb +0 -55
- data/vendor/plugins/active_merchant/test/unit/integrations/paypal_module_test.rb +0 -28
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/chronopay_return_test.rb +0 -11
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/gestpay_return_test.rb +0 -10
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/hi_trust_return_test.rb +0 -24
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/nochex_return_test.rb +0 -10
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/paypal_return_test.rb +0 -10
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/return_test.rb +0 -11
- data/vendor/plugins/active_merchant/test/unit/integrations/returns/two_checkout_return_test.rb +0 -24
- data/vendor/plugins/active_merchant/test/unit/integrations/two_checkout_module_test.rb +0 -13
- data/vendor/plugins/active_merchant/test/unit/post_data_test.rb +0 -55
- data/vendor/plugins/active_merchant/test/unit/posts_data_test.rb +0 -86
- data/vendor/plugins/active_merchant/test/unit/response_test.rb +0 -28
- data/vendor/plugins/active_merchant/test/unit/utils_test.rb +0 -7
- data/vendor/plugins/active_merchant/test/unit/validateable_test.rb +0 -60
- data/vendor/plugins/attachment_fu/test/amazon_s3.yml +0 -6
- data/vendor/plugins/resource_controller/README +0 -276
- data/vendor/plugins/resource_controller/release.rb +0 -24
- data/vendor/plugins/rspec/UPGRADE +0 -31
- data/vendor/plugins/rspec/autotest/discover.rb +0 -6
- data/vendor/plugins/rspec/autotest/rspec.rb +0 -1
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +0 -4
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +0 -50
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +0 -54
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +0 -111
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +0 -313
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +0 -15
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +0 -36
- data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +0 -3
- data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +0 -11
- data/vendor/plugins/rspec/report.html +0 -4358
- data/vendor/plugins/rspec_on_rails/Rakefile +0 -9
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +0 -4
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +0 -102
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +0 -39
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +0 -25
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +0 -12
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +0 -167
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +0 -313
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +0 -25
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +0 -26
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +0 -61
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +0 -81
- data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +0 -51
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +0 -47
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +0 -42
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +0 -255
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +0 -66
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -82
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/ivar_proxy.rb +0 -62
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +0 -68
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +0 -90
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +0 -171
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +0 -66
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +0 -29
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +0 -55
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +0 -113
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +0 -23
- data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +0 -55
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +0 -43
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +0 -187
- data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +0 -118
- data/vendor/plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +0 -64
- data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +0 -263
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +0 -783
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +0 -203
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +0 -65
- data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +0 -7
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +0 -89
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +0 -56
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +0 -10
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +0 -3
- data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +0 -137
- data/vendor/rails/TAG_rel_2-0-2 +0 -0
- data/vendor/rails/actionmailer/CHANGELOG +0 -325
- data/vendor/rails/actionmailer/MIT-LICENSE +0 -21
- data/vendor/rails/actionmailer/README +0 -145
- data/vendor/rails/actionmailer/Rakefile +0 -96
- data/vendor/rails/actionmailer/install.rb +0 -30
- data/vendor/rails/actionmailer/lib/action_mailer.rb +0 -52
- data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +0 -30
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +0 -603
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +0 -111
- data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +0 -19
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +0 -110
- data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +0 -51
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +0 -59
- data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +0 -59
- data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +0 -67
- data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +0 -8
- data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +0 -14
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +0 -1466
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +0 -4
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +0 -19
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +0 -245
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +0 -47
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +0 -52
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +0 -39
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +0 -71
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +0 -67
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +0 -481
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb +0 -552
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +0 -931
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/info.rb +0 -35
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +0 -540
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/loader.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +0 -462
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +0 -435
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mbox.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +0 -282
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +0 -137
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +0 -1475
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +0 -381
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/port.rb +0 -379
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +0 -142
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +0 -43
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +0 -263
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +0 -279
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/tmail.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +0 -281
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +0 -38
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +0 -9
- data/vendor/rails/actionmailer/lib/actionmailer.rb +0 -1
- data/vendor/rails/actionmailer/test/abstract_unit.rb +0 -49
- data/vendor/rails/actionmailer/test/delivery_method_test.rb +0 -51
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +0 -5
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +0 -5
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_base64_decoded_string +0 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_base64_encoded_string +0 -1
- data/vendor/rails/actionmailer/test/fixtures/raw_email +0 -14
- data/vendor/rails/actionmailer/test/fixtures/raw_email10 +0 -20
- data/vendor/rails/actionmailer/test/fixtures/raw_email12 +0 -32
- data/vendor/rails/actionmailer/test/fixtures/raw_email13 +0 -29
- data/vendor/rails/actionmailer/test/fixtures/raw_email2 +0 -114
- data/vendor/rails/actionmailer/test/fixtures/raw_email3 +0 -70
- data/vendor/rails/actionmailer/test/fixtures/raw_email4 +0 -59
- data/vendor/rails/actionmailer/test/fixtures/raw_email5 +0 -19
- data/vendor/rails/actionmailer/test/fixtures/raw_email6 +0 -20
- data/vendor/rails/actionmailer/test/fixtures/raw_email7 +0 -66
- data/vendor/rails/actionmailer/test/fixtures/raw_email8 +0 -47
- data/vendor/rails/actionmailer/test/fixtures/raw_email9 +0 -28
- data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +0 -14
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +0 -104
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +0 -100
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +0 -14
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +0 -3
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +0 -6
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +0 -6
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +0 -10
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +0 -2
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +0 -2
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +0 -2
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +0 -3
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +0 -5
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -0
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +0 -95
- data/vendor/rails/actionmailer/test/mail_render_test.rb +0 -122
- data/vendor/rails/actionmailer/test/mail_service_test.rb +0 -939
- data/vendor/rails/actionmailer/test/quoting_test.rb +0 -111
- data/vendor/rails/actionmailer/test/test_helper_test.rb +0 -117
- data/vendor/rails/actionmailer/test/tmail_test.rb +0 -22
- data/vendor/rails/actionmailer/test/url_test.rb +0 -76
- data/vendor/rails/actionpack/CHANGELOG +0 -4606
- data/vendor/rails/actionpack/MIT-LICENSE +0 -21
- data/vendor/rails/actionpack/README +0 -469
- data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +0 -24
- data/vendor/rails/actionpack/Rakefile +0 -153
- data/vendor/rails/actionpack/install.rb +0 -30
- data/vendor/rails/actionpack/lib/action_controller.rb +0 -79
- data/vendor/rails/actionpack/lib/action_controller/assertions.rb +0 -69
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +0 -39
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +0 -19
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +0 -166
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +0 -143
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +0 -640
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +0 -130
- data/vendor/rails/actionpack/lib/action_controller/base.rb +0 -1295
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +0 -94
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +0 -683
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +0 -16
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +0 -106
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +0 -22
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +0 -73
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +0 -23
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +0 -221
- data/vendor/rails/actionpack/lib/action_controller/components.rb +0 -165
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +0 -84
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +0 -195
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +0 -767
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +0 -177
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +0 -204
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +0 -126
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +0 -581
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +0 -326
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +0 -170
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +0 -163
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +0 -20
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +0 -88
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +0 -91
- data/vendor/rails/actionpack/lib/action_controller/request.rb +0 -730
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +0 -132
- data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +0 -138
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +0 -258
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +0 -529
- data/vendor/rails/actionpack/lib/action_controller/response.rb +0 -76
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +0 -1499
- data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +0 -119
- data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +0 -336
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +0 -164
- data/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb +0 -32
- data/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb +0 -35
- data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +0 -98
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +0 -151
- data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +0 -88
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +0 -141
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +0 -24
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +0 -26
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +0 -11
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +0 -29
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +0 -2
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +0 -10
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +0 -21
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +0 -2
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +0 -53
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +0 -520
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +0 -135
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +0 -68
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +0 -530
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +0 -173
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +0 -828
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +0 -105
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +0 -11
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +0 -114
- data/vendor/rails/actionpack/lib/action_pack.rb +0 -24
- data/vendor/rails/actionpack/lib/action_pack/version.rb +0 -9
- data/vendor/rails/actionpack/lib/action_view.rb +0 -37
- data/vendor/rails/actionpack/lib/action_view/base.rb +0 -642
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +0 -69
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +0 -255
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +0 -548
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +0 -111
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +0 -31
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +0 -39
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +0 -162
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +0 -689
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +0 -31
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +0 -689
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +0 -425
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +0 -432
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +0 -217
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +0 -963
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +0 -972
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +0 -1120
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +0 -4225
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +0 -179
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +0 -1268
- data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +0 -20
- data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +0 -59
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +0 -223
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +0 -199
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +0 -133
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +0 -479
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +0 -524
- data/vendor/rails/actionpack/lib/action_view/partials.rb +0 -200
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +0 -102
- data/vendor/rails/actionpack/lib/action_view/template_handler.rb +0 -17
- data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +0 -19
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +0 -21
- data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +0 -14
- data/vendor/rails/actionpack/lib/actionpack.rb +0 -1
- data/vendor/rails/actionpack/test/abstract_unit.rb +0 -36
- data/vendor/rails/actionpack/test/action_view_test.rb +0 -44
- data/vendor/rails/actionpack/test/active_record_unit.rb +0 -108
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +0 -142
- data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +0 -74
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +0 -492
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +0 -43
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +0 -682
- data/vendor/rails/actionpack/test/controller/base_test.rb +0 -134
- data/vendor/rails/actionpack/test/controller/benchmark_test.rb +0 -33
- data/vendor/rails/actionpack/test/controller/caching_test.rb +0 -349
- data/vendor/rails/actionpack/test/controller/capture_test.rb +0 -89
- data/vendor/rails/actionpack/test/controller/cgi_test.rb +0 -115
- data/vendor/rails/actionpack/test/controller/components_test.rb +0 -140
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +0 -139
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +0 -135
- data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +0 -41
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +0 -37
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +0 -123
- data/vendor/rails/actionpack/test/controller/fake_controllers.rb +0 -16
- data/vendor/rails/actionpack/test/controller/fake_models.rb +0 -5
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +0 -43
- data/vendor/rails/actionpack/test/controller/filters_test.rb +0 -856
- data/vendor/rails/actionpack/test/controller/flash_test.rb +0 -146
- data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +0 -47
- data/vendor/rails/actionpack/test/controller/helper_test.rb +0 -206
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +0 -124
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +0 -69
- data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +0 -250
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +0 -239
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +0 -51
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +0 -125
- data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +0 -54
- data/vendor/rails/actionpack/test/controller/integration_test.rb +0 -255
- data/vendor/rails/actionpack/test/controller/layout_test.rb +0 -239
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +0 -506
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +0 -55
- data/vendor/rails/actionpack/test/controller/new_render_test.rb +0 -832
- data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +0 -98
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +0 -103
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +0 -258
- data/vendor/rails/actionpack/test/controller/render_test.rb +0 -464
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +0 -217
- data/vendor/rails/actionpack/test/controller/request_test.rb +0 -836
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +0 -501
- data/vendor/rails/actionpack/test/controller/resources_test.rb +0 -787
- data/vendor/rails/actionpack/test/controller/routing_test.rb +0 -2203
- data/vendor/rails/actionpack/test/controller/selector_test.rb +0 -628
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +0 -127
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +0 -246
- data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +0 -182
- data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +0 -89
- data/vendor/rails/actionpack/test/controller/session_management_test.rb +0 -156
- data/vendor/rails/actionpack/test/controller/test_test.rb +0 -623
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +0 -246
- data/vendor/rails/actionpack/test/controller/verification_test.rb +0 -253
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +0 -137
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +0 -184
- data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/companies.yml +0 -24
- data/vendor/rails/actionpack/test/fixtures/company.rb +0 -9
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +0 -1
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +0 -1
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +0 -43
- data/vendor/rails/actionpack/test/fixtures/developer.rb +0 -9
- data/vendor/rails/actionpack/test/fixtures/developers.yml +0 -21
- data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +0 -13
- data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +0 -5
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +0 -3
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +0 -3
- data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +0 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +0 -3
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +0 -5
- data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +0 -10
- data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +0 -5
- data/vendor/rails/actionpack/test/fixtures/multipart/text_file +0 -10
- data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/project.rb +0 -3
- data/vendor/rails/actionpack/test/fixtures/projects.yml +0 -7
- data/vendor/rails/actionpack/test/fixtures/public/404.html +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/500.html +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +0 -1
- data/vendor/rails/actionpack/test/fixtures/replies.yml +0 -15
- data/vendor/rails/actionpack/test/fixtures/reply.rb +0 -6
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +0 -1
- data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +0 -3
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_person.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/block_content_for.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +0 -4
- data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +0 -3
- data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +0 -6
- data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.erb +0 -2
- data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/hello.builder +0 -4
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +0 -3
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +0 -4
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +0 -11
- data/vendor/rails/actionpack/test/fixtures/test/list.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +0 -4
- data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +0 -4
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +0 -9
- data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +0 -1
- data/vendor/rails/actionpack/test/fixtures/topic.rb +0 -3
- data/vendor/rails/actionpack/test/fixtures/topics.yml +0 -22
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +0 -251
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +0 -438
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +0 -101
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +0 -72
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +0 -193
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +0 -1438
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +0 -56
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +0 -792
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +0 -1296
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +0 -238
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +0 -115
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +0 -93
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +0 -627
- data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +0 -49
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +0 -96
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +0 -80
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +0 -335
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +0 -536
- data/vendor/rails/actionpack/test/testing_sandbox.rb +0 -11
- data/vendor/rails/activerecord/CHANGELOG +0 -5527
- data/vendor/rails/activerecord/MIT-LICENSE +0 -20
- data/vendor/rails/activerecord/README +0 -346
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +0 -33
- data/vendor/rails/activerecord/Rakefile +0 -248
- data/vendor/rails/activerecord/examples/associations.png +0 -0
- data/vendor/rails/activerecord/install.rb +0 -30
- data/vendor/rails/activerecord/lib/active_record.rb +0 -76
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +0 -180
- data/vendor/rails/activerecord/lib/active_record/associations.rb +0 -1769
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +0 -240
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +0 -160
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +0 -56
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +0 -50
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +0 -164
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +0 -174
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +0 -284
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +0 -96
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +0 -328
- data/vendor/rails/activerecord/lib/active_record/base.rb +0 -2471
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +0 -267
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +0 -341
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +0 -308
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +0 -171
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +0 -87
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +0 -69
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +0 -472
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +0 -306
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +0 -172
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +0 -496
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +0 -847
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +0 -34
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +0 -391
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +0 -1034
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +0 -144
- data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +0 -77
- data/vendor/rails/activerecord/lib/active_record/migration.rb +0 -417
- data/vendor/rails/activerecord/lib/active_record/observer.rb +0 -181
- data/vendor/rails/activerecord/lib/active_record/query_cache.rb +0 -21
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +0 -219
- data/vendor/rails/activerecord/lib/active_record/schema.rb +0 -58
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +0 -171
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +0 -98
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +0 -71
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +0 -315
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +0 -41
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +0 -132
- data/vendor/rails/activerecord/lib/active_record/validations.rb +0 -1025
- data/vendor/rails/activerecord/lib/active_record/vendor/db2.rb +0 -362
- data/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb +0 -1214
- data/vendor/rails/activerecord/lib/active_record/version.rb +0 -9
- data/vendor/rails/activerecord/lib/activerecord.rb +0 -1
- data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +0 -72
- data/vendor/rails/activerecord/test/abstract_unit.rb +0 -84
- data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +0 -43
- data/vendor/rails/activerecord/test/adapter_test.rb +0 -105
- data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +0 -95
- data/vendor/rails/activerecord/test/aggregations_test.rb +0 -128
- data/vendor/rails/activerecord/test/all.sh +0 -8
- data/vendor/rails/activerecord/test/ar_schema_test.rb +0 -33
- data/vendor/rails/activerecord/test/association_inheritance_reload.rb +0 -14
- data/vendor/rails/activerecord/test/associations/callbacks_test.rb +0 -147
- data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +0 -110
- data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +0 -145
- data/vendor/rails/activerecord/test/associations/eager_test.rb +0 -442
- data/vendor/rails/activerecord/test/associations/extension_test.rb +0 -47
- data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +0 -88
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +0 -559
- data/vendor/rails/activerecord/test/associations_test.rb +0 -2147
- data/vendor/rails/activerecord/test/attribute_methods_test.rb +0 -146
- data/vendor/rails/activerecord/test/base_test.rb +0 -1745
- data/vendor/rails/activerecord/test/binary_test.rb +0 -32
- data/vendor/rails/activerecord/test/calculations_test.rb +0 -251
- data/vendor/rails/activerecord/test/callbacks_test.rb +0 -400
- data/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb +0 -32
- data/vendor/rails/activerecord/test/column_alias_test.rb +0 -17
- data/vendor/rails/activerecord/test/connection_test_firebird.rb +0 -8
- data/vendor/rails/activerecord/test/connection_test_mysql.rb +0 -30
- data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +0 -25
- data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +0 -26
- data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +0 -27
- data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +0 -27
- data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +0 -21
- data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +0 -27
- data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +0 -23
- data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +0 -25
- data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +0 -25
- data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +0 -18
- data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +0 -23
- data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +0 -69
- data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +0 -203
- data/vendor/rails/activerecord/test/date_time_test.rb +0 -37
- data/vendor/rails/activerecord/test/default_test_firebird.rb +0 -16
- data/vendor/rails/activerecord/test/defaults_test.rb +0 -67
- data/vendor/rails/activerecord/test/deprecated_finder_test.rb +0 -30
- data/vendor/rails/activerecord/test/finder_test.rb +0 -650
- data/vendor/rails/activerecord/test/fixtures/accounts.yml +0 -28
- data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/author.rb +0 -109
- data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/authors.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/auto_id.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char +0 -1
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces +0 -1
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line +0 -3
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes +0 -3
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value +0 -1
- data/vendor/rails/activerecord/test/fixtures/binaries.yml +0 -132
- data/vendor/rails/activerecord/test/fixtures/binary.rb +0 -2
- data/vendor/rails/activerecord/test/fixtures/book.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/books.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/categories.yml +0 -14
- data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +0 -9
- data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +0 -23
- data/vendor/rails/activerecord/test/fixtures/categorization.rb +0 -5
- data/vendor/rails/activerecord/test/fixtures/categorizations.yml +0 -17
- data/vendor/rails/activerecord/test/fixtures/category.rb +0 -26
- data/vendor/rails/activerecord/test/fixtures/citation.rb +0 -6
- data/vendor/rails/activerecord/test/fixtures/column_name.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/comment.rb +0 -23
- data/vendor/rails/activerecord/test/fixtures/comments.yml +0 -59
- data/vendor/rails/activerecord/test/fixtures/companies.yml +0 -55
- data/vendor/rails/activerecord/test/fixtures/company.rb +0 -114
- data/vendor/rails/activerecord/test/fixtures/company_in_module.rb +0 -59
- data/vendor/rails/activerecord/test/fixtures/computer.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/computers.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/contact.rb +0 -16
- data/vendor/rails/activerecord/test/fixtures/course.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/courses.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/customer.rb +0 -55
- data/vendor/rails/activerecord/test/fixtures/customers.yml +0 -17
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +0 -235
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +0 -65
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +0 -310
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql +0 -6
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +0 -273
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql +0 -1
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +0 -318
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql +0 -7
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +0 -67
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +0 -330
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql +0 -6
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +0 -44
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +0 -292
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +0 -354
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +0 -11
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +0 -219
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +0 -35
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +0 -222
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/default.rb +0 -2
- data/vendor/rails/activerecord/test/fixtures/developer.rb +0 -72
- data/vendor/rails/activerecord/test/fixtures/developers.yml +0 -21
- data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +0 -17
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller +0 -3
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record +0 -3
- data/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record +0 -2
- data/vendor/rails/activerecord/test/fixtures/edge.rb +0 -5
- data/vendor/rails/activerecord/test/fixtures/edges.yml +0 -6
- data/vendor/rails/activerecord/test/fixtures/entrant.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/entrants.yml +0 -14
- data/vendor/rails/activerecord/test/fixtures/example.log +0 -1
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +0 -3
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +0 -2
- data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +0 -10
- data/vendor/rails/activerecord/test/fixtures/item.rb +0 -7
- data/vendor/rails/activerecord/test/fixtures/items.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/joke.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/keyboard.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/legacy_thing.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +0 -3
- data/vendor/rails/activerecord/test/fixtures/matey.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/mateys.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations/3_innocent_jointable.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_decimal/1_give_me_big_numbers.rb +0 -15
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_foo.rb +0 -7
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_innocent_jointable.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/minimalistic.rb +0 -2
- data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +0 -2
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkey.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +0 -6
- data/vendor/rails/activerecord/test/fixtures/mixins.yml +0 -29
- data/vendor/rails/activerecord/test/fixtures/movie.rb +0 -5
- data/vendor/rails/activerecord/test/fixtures/movies.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +0 -1
- data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +0 -1
- data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +0 -1
- data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +0 -1
- data/vendor/rails/activerecord/test/fixtures/order.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/parrot.rb +0 -13
- data/vendor/rails/activerecord/test/fixtures/parrots.yml +0 -27
- data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/people.yml +0 -3
- data/vendor/rails/activerecord/test/fixtures/person.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/pirate.rb +0 -5
- data/vendor/rails/activerecord/test/fixtures/pirates.yml +0 -9
- data/vendor/rails/activerecord/test/fixtures/post.rb +0 -59
- data/vendor/rails/activerecord/test/fixtures/posts.yml +0 -48
- data/vendor/rails/activerecord/test/fixtures/project.rb +0 -28
- data/vendor/rails/activerecord/test/fixtures/projects.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/reader.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/readers.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures/reply.rb +0 -37
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +0 -5
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +0 -11
- data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +0 -14
- data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +0 -8
- data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/ship.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/ships.yml +0 -5
- data/vendor/rails/activerecord/test/fixtures/subject.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/subscriber.rb +0 -6
- data/vendor/rails/activerecord/test/fixtures/subscribers/first +0 -2
- data/vendor/rails/activerecord/test/fixtures/subscribers/second +0 -2
- data/vendor/rails/activerecord/test/fixtures/tag.rb +0 -7
- data/vendor/rails/activerecord/test/fixtures/tagging.rb +0 -10
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +0 -25
- data/vendor/rails/activerecord/test/fixtures/tags.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/task.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/tasks.yml +0 -7
- data/vendor/rails/activerecord/test/fixtures/topic.rb +0 -37
- data/vendor/rails/activerecord/test/fixtures/topics.yml +0 -22
- data/vendor/rails/activerecord/test/fixtures/treasure.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/treasures.yml +0 -10
- data/vendor/rails/activerecord/test/fixtures/vertex.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/vertices.yml +0 -4
- data/vendor/rails/activerecord/test/fixtures_test.rb +0 -602
- data/vendor/rails/activerecord/test/inheritance_test.rb +0 -211
- data/vendor/rails/activerecord/test/json_serialization_test.rb +0 -180
- data/vendor/rails/activerecord/test/lifecycle_test.rb +0 -137
- data/vendor/rails/activerecord/test/locking_test.rb +0 -282
- data/vendor/rails/activerecord/test/method_scoping_test.rb +0 -416
- data/vendor/rails/activerecord/test/migration_test.rb +0 -933
- data/vendor/rails/activerecord/test/migration_test_firebird.rb +0 -124
- data/vendor/rails/activerecord/test/mixin_test.rb +0 -95
- data/vendor/rails/activerecord/test/modules_test.rb +0 -34
- data/vendor/rails/activerecord/test/multiple_db_test.rb +0 -60
- data/vendor/rails/activerecord/test/pk_test.rb +0 -101
- data/vendor/rails/activerecord/test/query_cache_test.rb +0 -104
- data/vendor/rails/activerecord/test/readonly_test.rb +0 -107
- data/vendor/rails/activerecord/test/reflection_test.rb +0 -175
- data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +0 -177
- data/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb +0 -75
- data/vendor/rails/activerecord/test/schema_dumper_test.rb +0 -131
- data/vendor/rails/activerecord/test/schema_test_postgresql.rb +0 -64
- data/vendor/rails/activerecord/test/serialization_test.rb +0 -47
- data/vendor/rails/activerecord/test/synonym_test_oracle.rb +0 -17
- data/vendor/rails/activerecord/test/table_name_test_sqlserver.rb +0 -23
- data/vendor/rails/activerecord/test/threaded_connections_test.rb +0 -48
- data/vendor/rails/activerecord/test/transactions_test.rb +0 -281
- data/vendor/rails/activerecord/test/unconnected_test.rb +0 -32
- data/vendor/rails/activerecord/test/validations_test.rb +0 -1395
- data/vendor/rails/activerecord/test/xml_serialization_test.rb +0 -202
- data/vendor/rails/activeresource/CHANGELOG +0 -223
- data/vendor/rails/activeresource/MIT-LICENSE +0 -20
- data/vendor/rails/activeresource/README +0 -165
- data/vendor/rails/activeresource/Rakefile +0 -134
- data/vendor/rails/activeresource/lib/active_resource.rb +0 -47
- data/vendor/rails/activeresource/lib/active_resource/base.rb +0 -872
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +0 -172
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +0 -105
- data/vendor/rails/activeresource/lib/active_resource/formats.rb +0 -14
- data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +0 -23
- data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +0 -34
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +0 -147
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +0 -288
- data/vendor/rails/activeresource/lib/active_resource/version.rb +0 -9
- data/vendor/rails/activeresource/lib/activeresource.rb +0 -1
- data/vendor/rails/activeresource/test/abstract_unit.rb +0 -10
- data/vendor/rails/activeresource/test/authorization_test.rb +0 -82
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +0 -96
- data/vendor/rails/activeresource/test/base/equality_test.rb +0 -43
- data/vendor/rails/activeresource/test/base/load_test.rb +0 -111
- data/vendor/rails/activeresource/test/base_errors_test.rb +0 -48
- data/vendor/rails/activeresource/test/base_test.rb +0 -454
- data/vendor/rails/activeresource/test/connection_test.rb +0 -170
- data/vendor/rails/activeresource/test/fixtures/beast.rb +0 -14
- data/vendor/rails/activeresource/test/fixtures/person.rb +0 -3
- data/vendor/rails/activeresource/test/fixtures/street_address.rb +0 -4
- data/vendor/rails/activeresource/test/format_test.rb +0 -42
- data/vendor/rails/activeresource/test/setter_trap.rb +0 -27
- data/vendor/rails/activesupport/CHANGELOG +0 -986
- data/vendor/rails/activesupport/MIT-LICENSE +0 -20
- data/vendor/rails/activesupport/README +0 -43
- data/vendor/rails/activesupport/Rakefile +0 -84
- data/vendor/rails/activesupport/install.rb +0 -30
- data/vendor/rails/activesupport/lib/active_support.rb +0 -49
- data/vendor/rails/activesupport/lib/active_support/basic_object.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +0 -107
- data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +0 -127
- data/vendor/rails/activesupport/lib/active_support/core_ext.rb +0 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +0 -28
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +0 -94
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +0 -19
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +0 -68
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +0 -12
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +0 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +0 -6
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +0 -50
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +0 -14
- data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +0 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +0 -48
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +0 -40
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +0 -140
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +0 -24
- data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +0 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +0 -188
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +0 -98
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +0 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +0 -77
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +0 -74
- data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +0 -37
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +0 -63
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +0 -33
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +0 -21
- data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +0 -24
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +0 -242
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +0 -19
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +0 -24
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +0 -102
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +0 -54
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +0 -25
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +0 -28
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +0 -7
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +0 -24
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +0 -21
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +0 -15
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +0 -51
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +0 -24
- data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +0 -38
- data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +0 -16
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +0 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +0 -70
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +0 -31
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +0 -31
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +0 -48
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +0 -62
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +0 -11
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +0 -35
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +0 -17
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +0 -7
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +0 -44
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +0 -91
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +0 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +0 -14
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +0 -58
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +0 -22
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +0 -59
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +0 -7
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +0 -14
- data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +0 -12
- data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +0 -11
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +0 -22
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +0 -23
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +0 -22
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +0 -12
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +0 -23
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +0 -58
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +0 -28
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +0 -153
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +0 -17
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +0 -27
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +0 -42
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +0 -11
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +0 -14
- data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +0 -62
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +0 -19
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +0 -224
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +0 -94
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +0 -540
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +0 -204
- data/vendor/rails/activesupport/lib/active_support/duration.rb +0 -96
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +0 -53
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +0 -282
- data/vendor/rails/activesupport/lib/active_support/json.rb +0 -31
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +0 -60
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +0 -12
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +0 -50
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +0 -6
- data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +0 -30
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +0 -38
- data/vendor/rails/activesupport/lib/active_support/json/variable.rb +0 -10
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +0 -9
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +0 -141
- data/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb +0 -149
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +0 -9
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +0 -564
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +0 -43
- data/vendor/rails/activesupport/lib/active_support/option_merger.rb +0 -25
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +0 -49
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/testing.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/testing/default.rb +0 -12
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +0 -181
- data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +0 -14
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +0 -113
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +0 -13
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +0 -20
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +0 -250
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +0 -115
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +0 -139
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +0 -63
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +0 -328
- data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +0 -1021
- data/vendor/rails/activesupport/lib/active_support/version.rb +0 -9
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -38
- data/vendor/rails/activesupport/lib/activesupport.rb +0 -1
- data/vendor/rails/activesupport/test/abstract_unit.rb +0 -20
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +0 -7
- data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +0 -5
- data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +0 -4
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +0 -3
- data/vendor/rails/activesupport/test/buffered_logger_test.rb +0 -107
- data/vendor/rails/activesupport/test/clean_logger_test.rb +0 -57
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +0 -250
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +0 -19
- data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +0 -14
- data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +0 -31
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +0 -224
- data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +0 -105
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +0 -46
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +0 -196
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +0 -230
- data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +0 -22
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +0 -21
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +0 -61
- data/vendor/rails/activesupport/test/core_ext/exception_test.rb +0 -64
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +0 -29
- data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +0 -25
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +0 -743
- data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +0 -37
- data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +0 -43
- data/vendor/rails/activesupport/test/core_ext/load_error_tests.rb +0 -16
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +0 -30
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +0 -52
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +0 -33
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +0 -58
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +0 -293
- data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +0 -24
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +0 -147
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +0 -242
- data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/proc_test.rb +0 -11
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +0 -63
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +0 -180
- data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +0 -420
- data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/service_one.rb +0 -5
- data/vendor/rails/activesupport/test/dependencies/service_two.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies_test.rb +0 -751
- data/vendor/rails/activesupport/test/deprecation_test.rb +0 -151
- data/vendor/rails/activesupport/test/inflector_test.rb +0 -248
- data/vendor/rails/activesupport/test/inflector_test_cases.rb +0 -208
- data/vendor/rails/activesupport/test/json/decoding_test.rb +0 -41
- data/vendor/rails/activesupport/test/json/encoding_test.rb +0 -111
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +0 -173
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +0 -141
- data/vendor/rails/activesupport/test/multibyte_handler_test.rb +0 -367
- data/vendor/rails/activesupport/test/option_merger_test.rb +0 -50
- data/vendor/rails/activesupport/test/ordered_options_test.rb +0 -84
- data/vendor/rails/activesupport/test/test_test.rb +0 -73
- data/vendor/rails/activesupport/test/time_zone_test.rb +0 -98
- data/vendor/rails/activesupport/test/whiny_nil_test.rb +0 -38
- data/vendor/rails/railties/CHANGELOG +0 -1899
- data/vendor/rails/railties/MIT-LICENSE +0 -20
- data/vendor/rails/railties/README +0 -203
- data/vendor/rails/railties/Rakefile +0 -358
- data/vendor/rails/railties/bin/about +0 -3
- data/vendor/rails/railties/bin/performance/benchmarker +0 -3
- data/vendor/rails/railties/bin/performance/profiler +0 -3
- data/vendor/rails/railties/bin/plugin +0 -3
- data/vendor/rails/railties/bin/process/inspector +0 -3
- data/vendor/rails/railties/bin/process/reaper +0 -3
- data/vendor/rails/railties/bin/process/spawner +0 -3
- data/vendor/rails/railties/bin/rails +0 -19
- data/vendor/rails/railties/bin/runner +0 -3
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +0 -123
- data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +0 -9
- data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +0 -2
- data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +0 -2
- data/vendor/rails/railties/configs/apache.conf +0 -40
- data/vendor/rails/railties/configs/databases/frontbase.yml +0 -28
- data/vendor/rails/railties/configs/databases/mysql.yml +0 -54
- data/vendor/rails/railties/configs/databases/oracle.yml +0 -39
- data/vendor/rails/railties/configs/databases/postgresql.yml +0 -48
- data/vendor/rails/railties/configs/databases/sqlite2.yml +0 -16
- data/vendor/rails/railties/configs/databases/sqlite3.yml +0 -19
- data/vendor/rails/railties/configs/empty.log +0 -0
- data/vendor/rails/railties/configs/initializers/inflections.rb +0 -10
- data/vendor/rails/railties/configs/initializers/mime_types.rb +0 -5
- data/vendor/rails/railties/configs/lighttpd.conf +0 -54
- data/vendor/rails/railties/dispatches/dispatch.fcgi +0 -24
- data/vendor/rails/railties/dispatches/dispatch.rb +0 -10
- data/vendor/rails/railties/dispatches/gateway.cgi +0 -97
- data/vendor/rails/railties/doc/README_FOR_APP +0 -2
- data/vendor/rails/railties/environments/boot.rb +0 -109
- data/vendor/rails/railties/environments/development.rb +0 -18
- data/vendor/rails/railties/environments/environment.rb +0 -59
- data/vendor/rails/railties/environments/production.rb +0 -19
- data/vendor/rails/railties/helpers/application.rb +0 -10
- data/vendor/rails/railties/html/404.html +0 -30
- data/vendor/rails/railties/html/422.html +0 -30
- data/vendor/rails/railties/html/500.html +0 -30
- data/vendor/rails/railties/html/favicon.ico +0 -0
- data/vendor/rails/railties/html/images/rails.png +0 -0
- data/vendor/rails/railties/html/index.html +0 -277
- data/vendor/rails/railties/html/javascripts/application.js +0 -2
- data/vendor/rails/railties/html/javascripts/controls.js +0 -963
- data/vendor/rails/railties/html/javascripts/dragdrop.js +0 -972
- data/vendor/rails/railties/html/javascripts/effects.js +0 -1120
- data/vendor/rails/railties/html/javascripts/prototype.js +0 -4225
- data/vendor/rails/railties/html/robots.txt +0 -5
- data/vendor/rails/railties/lib/code_statistics.rb +0 -107
- data/vendor/rails/railties/lib/commands.rb +0 -17
- data/vendor/rails/railties/lib/commands/about.rb +0 -2
- data/vendor/rails/railties/lib/commands/console.rb +0 -32
- data/vendor/rails/railties/lib/commands/destroy.rb +0 -6
- data/vendor/rails/railties/lib/commands/generate.rb +0 -6
- data/vendor/rails/railties/lib/commands/ncgi/listener +0 -86
- data/vendor/rails/railties/lib/commands/ncgi/tracker +0 -69
- data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +0 -24
- data/vendor/rails/railties/lib/commands/performance/profiler.rb +0 -50
- data/vendor/rails/railties/lib/commands/performance/request.rb +0 -6
- data/vendor/rails/railties/lib/commands/plugin.rb +0 -923
- data/vendor/rails/railties/lib/commands/process/inspector.rb +0 -68
- data/vendor/rails/railties/lib/commands/process/reaper.rb +0 -149
- data/vendor/rails/railties/lib/commands/process/spawner.rb +0 -219
- data/vendor/rails/railties/lib/commands/process/spinner.rb +0 -57
- data/vendor/rails/railties/lib/commands/runner.rb +0 -48
- data/vendor/rails/railties/lib/commands/server.rb +0 -39
- data/vendor/rails/railties/lib/commands/servers/base.rb +0 -31
- data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +0 -94
- data/vendor/rails/railties/lib/commands/servers/mongrel.rb +0 -69
- data/vendor/rails/railties/lib/commands/servers/webrick.rb +0 -66
- data/vendor/rails/railties/lib/commands/update.rb +0 -4
- data/vendor/rails/railties/lib/console_app.rb +0 -30
- data/vendor/rails/railties/lib/console_sandbox.rb +0 -6
- data/vendor/rails/railties/lib/console_with_helpers.rb +0 -26
- data/vendor/rails/railties/lib/dispatcher.rb +0 -24
- data/vendor/rails/railties/lib/fcgi_handler.rb +0 -223
- data/vendor/rails/railties/lib/initializer.rb +0 -682
- data/vendor/rails/railties/lib/rails/plugin.rb +0 -84
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +0 -150
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +0 -78
- data/vendor/rails/railties/lib/rails/version.rb +0 -9
- data/vendor/rails/railties/lib/rails_generator.rb +0 -43
- data/vendor/rails/railties/lib/rails_generator/base.rb +0 -263
- data/vendor/rails/railties/lib/rails_generator/commands.rb +0 -591
- data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +0 -42
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +0 -9
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +0 -179
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +0 -29
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +0 -37
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +0 -16
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +0 -16
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +0 -34
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +0 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +0 -13
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +0 -21
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +0 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +0 -29
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +0 -20
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +0 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +0 -27
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +0 -45
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +0 -19
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +0 -16
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +0 -13
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +0 -16
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +0 -25
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +0 -39
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +0 -20
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +0 -13
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +0 -22
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +0 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +0 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +0 -4
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +0 -23
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +0 -74
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +0 -25
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +0 -92
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +0 -85
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +0 -45
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +0 -17
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +0 -74
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +0 -19
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +0 -24
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +0 -18
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +0 -18
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +0 -16
- data/vendor/rails/railties/lib/rails_generator/lookup.rb +0 -244
- data/vendor/rails/railties/lib/rails_generator/manifest.rb +0 -53
- data/vendor/rails/railties/lib/rails_generator/options.rb +0 -143
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +0 -86
- data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +0 -30
- data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +0 -7
- data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +0 -12
- data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +0 -160
- data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +0 -46
- data/vendor/rails/railties/lib/rails_generator/spec.rb +0 -44
- data/vendor/rails/railties/lib/railties_path.rb +0 -1
- data/vendor/rails/railties/lib/ruby_version_check.rb +0 -17
- data/vendor/rails/railties/lib/rubyprof_ext.rb +0 -35
- data/vendor/rails/railties/lib/source_annotation_extractor.rb +0 -62
- data/vendor/rails/railties/lib/tasks/annotations.rake +0 -23
- data/vendor/rails/railties/lib/tasks/databases.rake +0 -363
- data/vendor/rails/railties/lib/tasks/documentation.rake +0 -80
- data/vendor/rails/railties/lib/tasks/framework.rake +0 -118
- data/vendor/rails/railties/lib/tasks/log.rake +0 -9
- data/vendor/rails/railties/lib/tasks/misc.rake +0 -10
- data/vendor/rails/railties/lib/tasks/rails.rb +0 -8
- data/vendor/rails/railties/lib/tasks/routes.rake +0 -17
- data/vendor/rails/railties/lib/tasks/statistics.rake +0 -18
- data/vendor/rails/railties/lib/tasks/testing.rake +0 -118
- data/vendor/rails/railties/lib/tasks/tmp.rake +0 -37
- data/vendor/rails/railties/lib/test_help.rb +0 -20
- data/vendor/rails/railties/lib/webrick_server.rb +0 -165
- data/vendor/rails/railties/test/abstract_unit.rb +0 -24
- data/vendor/rails/railties/test/boot_test.rb +0 -179
- data/vendor/rails/railties/test/console_app_test.rb +0 -29
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +0 -265
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +0 -1
- data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
- data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +0 -7
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +0 -2
- data/vendor/rails/railties/test/generators/generator_test_helper.rb +0 -195
- data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +0 -109
- data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +0 -106
- data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +0 -185
- data/vendor/rails/railties/test/initializer_test.rb +0 -218
- data/vendor/rails/railties/test/mocks/routes.rb +0 -6
- data/vendor/rails/railties/test/plugin_loader_test.rb +0 -140
- data/vendor/rails/railties/test/plugin_locator_test.rb +0 -69
- data/vendor/rails/railties/test/plugin_test.rb +0 -141
- data/vendor/rails/railties/test/plugin_test_helper.rb +0 -29
- data/vendor/rails/railties/test/rails_generator_test.rb +0 -137
- data/vendor/rails/railties/test/rails_info_controller_test.rb +0 -48
- data/vendor/rails/railties/test/rails_info_test.rb +0 -105
- data/vendor/rails/railties/test/secret_key_generation_test.rb +0 -35
Binary file
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'rbconfig'
|
2
|
-
require 'find'
|
3
|
-
require 'ftools'
|
4
|
-
|
5
|
-
include Config
|
6
|
-
|
7
|
-
# this was adapted from rdoc's install.rb by ways of Log4r
|
8
|
-
|
9
|
-
$sitedir = CONFIG["sitelibdir"]
|
10
|
-
unless $sitedir
|
11
|
-
version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
|
12
|
-
$libdir = File.join(CONFIG["libdir"], "ruby", version)
|
13
|
-
$sitedir = $:.find {|x| x =~ /site_ruby/ }
|
14
|
-
if !$sitedir
|
15
|
-
$sitedir = File.join($libdir, "site_ruby")
|
16
|
-
elsif $sitedir !~ Regexp.quote(version)
|
17
|
-
$sitedir = File.join($sitedir, version)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# the actual gruntwork
|
22
|
-
Dir.chdir("lib")
|
23
|
-
|
24
|
-
Find.find("active_record", "active_record.rb") { |f|
|
25
|
-
if f[-3..-1] == ".rb"
|
26
|
-
File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
|
27
|
-
else
|
28
|
-
File::makedirs(File.join($sitedir, *f.split(/\//)))
|
29
|
-
end
|
30
|
-
}
|
@@ -1,76 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2004-2007 David Heinemeier Hansson
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
-
# a copy of this software and associated documentation files (the
|
6
|
-
# "Software"), to deal in the Software without restriction, including
|
7
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
-
# the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be
|
13
|
-
# included in all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
-
#++
|
23
|
-
|
24
|
-
$:.unshift(File.dirname(__FILE__)) unless
|
25
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
26
|
-
|
27
|
-
unless defined? ActiveSupport
|
28
|
-
active_support_path = File.dirname(__FILE__) + "/../../activesupport/lib"
|
29
|
-
if File.exist?(active_support_path)
|
30
|
-
$:.unshift active_support_path
|
31
|
-
require 'active_support'
|
32
|
-
else
|
33
|
-
require 'rubygems'
|
34
|
-
gem 'activesupport'
|
35
|
-
require 'active_support'
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
require 'active_record/base'
|
40
|
-
require 'active_record/observer'
|
41
|
-
require 'active_record/query_cache'
|
42
|
-
require 'active_record/validations'
|
43
|
-
require 'active_record/callbacks'
|
44
|
-
require 'active_record/reflection'
|
45
|
-
require 'active_record/associations'
|
46
|
-
require 'active_record/aggregations'
|
47
|
-
require 'active_record/transactions'
|
48
|
-
require 'active_record/timestamp'
|
49
|
-
require 'active_record/locking/optimistic'
|
50
|
-
require 'active_record/locking/pessimistic'
|
51
|
-
require 'active_record/migration'
|
52
|
-
require 'active_record/schema'
|
53
|
-
require 'active_record/calculations'
|
54
|
-
require 'active_record/serialization'
|
55
|
-
require 'active_record/attribute_methods'
|
56
|
-
|
57
|
-
ActiveRecord::Base.class_eval do
|
58
|
-
extend ActiveRecord::QueryCache
|
59
|
-
include ActiveRecord::Validations
|
60
|
-
include ActiveRecord::Locking::Optimistic
|
61
|
-
include ActiveRecord::Locking::Pessimistic
|
62
|
-
include ActiveRecord::Callbacks
|
63
|
-
include ActiveRecord::Observing
|
64
|
-
include ActiveRecord::Timestamp
|
65
|
-
include ActiveRecord::Associations
|
66
|
-
include ActiveRecord::Aggregations
|
67
|
-
include ActiveRecord::Transactions
|
68
|
-
include ActiveRecord::Reflection
|
69
|
-
include ActiveRecord::Calculations
|
70
|
-
include ActiveRecord::Serialization
|
71
|
-
include ActiveRecord::AttributeMethods
|
72
|
-
end
|
73
|
-
|
74
|
-
require 'active_record/connection_adapters/abstract_adapter'
|
75
|
-
|
76
|
-
require 'active_record/schema_dumper'
|
@@ -1,180 +0,0 @@
|
|
1
|
-
module ActiveRecord
|
2
|
-
module Aggregations # :nodoc:
|
3
|
-
def self.included(base)
|
4
|
-
base.extend(ClassMethods)
|
5
|
-
end
|
6
|
-
|
7
|
-
def clear_aggregation_cache #:nodoc:
|
8
|
-
self.class.reflect_on_all_aggregations.to_a.each do |assoc|
|
9
|
-
instance_variable_set "@#{assoc.name}", nil
|
10
|
-
end unless self.new_record?
|
11
|
-
end
|
12
|
-
|
13
|
-
# Active Record implements aggregation through a macro-like class method called +composed_of+ for representing attributes
|
14
|
-
# as value objects. It expresses relationships like "Account [is] composed of Money [among other things]" or "Person [is]
|
15
|
-
# composed of [an] address". Each call to the macro adds a description of how the value objects are created from the
|
16
|
-
# attributes of the entity object (when the entity is initialized either as a new object or from finding an existing object)
|
17
|
-
# and how it can be turned back into attributes (when the entity is saved to the database). Example:
|
18
|
-
#
|
19
|
-
# class Customer < ActiveRecord::Base
|
20
|
-
# composed_of :balance, :class_name => "Money", :mapping => %w(balance amount)
|
21
|
-
# composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ]
|
22
|
-
# end
|
23
|
-
#
|
24
|
-
# The customer class now has the following methods to manipulate the value objects:
|
25
|
-
# * <tt>Customer#balance, Customer#balance=(money)</tt>
|
26
|
-
# * <tt>Customer#address, Customer#address=(address)</tt>
|
27
|
-
#
|
28
|
-
# These methods will operate with value objects like the ones described below:
|
29
|
-
#
|
30
|
-
# class Money
|
31
|
-
# include Comparable
|
32
|
-
# attr_reader :amount, :currency
|
33
|
-
# EXCHANGE_RATES = { "USD_TO_DKK" => 6 }
|
34
|
-
#
|
35
|
-
# def initialize(amount, currency = "USD")
|
36
|
-
# @amount, @currency = amount, currency
|
37
|
-
# end
|
38
|
-
#
|
39
|
-
# def exchange_to(other_currency)
|
40
|
-
# exchanged_amount = (amount * EXCHANGE_RATES["#{currency}_TO_#{other_currency}"]).floor
|
41
|
-
# Money.new(exchanged_amount, other_currency)
|
42
|
-
# end
|
43
|
-
#
|
44
|
-
# def ==(other_money)
|
45
|
-
# amount == other_money.amount && currency == other_money.currency
|
46
|
-
# end
|
47
|
-
#
|
48
|
-
# def <=>(other_money)
|
49
|
-
# if currency == other_money.currency
|
50
|
-
# amount <=> amount
|
51
|
-
# else
|
52
|
-
# amount <=> other_money.exchange_to(currency).amount
|
53
|
-
# end
|
54
|
-
# end
|
55
|
-
# end
|
56
|
-
#
|
57
|
-
# class Address
|
58
|
-
# attr_reader :street, :city
|
59
|
-
# def initialize(street, city)
|
60
|
-
# @street, @city = street, city
|
61
|
-
# end
|
62
|
-
#
|
63
|
-
# def close_to?(other_address)
|
64
|
-
# city == other_address.city
|
65
|
-
# end
|
66
|
-
#
|
67
|
-
# def ==(other_address)
|
68
|
-
# city == other_address.city && street == other_address.street
|
69
|
-
# end
|
70
|
-
# end
|
71
|
-
#
|
72
|
-
# Now it's possible to access attributes from the database through the value objects instead. If you choose to name the
|
73
|
-
# composition the same as the attribute's name, it will be the only way to access that attribute. That's the case with our
|
74
|
-
# +balance+ attribute. You interact with the value objects just like you would any other attribute, though:
|
75
|
-
#
|
76
|
-
# customer.balance = Money.new(20) # sets the Money value object and the attribute
|
77
|
-
# customer.balance # => Money value object
|
78
|
-
# customer.balance.exchanged_to("DKK") # => Money.new(120, "DKK")
|
79
|
-
# customer.balance > Money.new(10) # => true
|
80
|
-
# customer.balance == Money.new(20) # => true
|
81
|
-
# customer.balance < Money.new(5) # => false
|
82
|
-
#
|
83
|
-
# Value objects can also be composed of multiple attributes, such as the case of Address. The order of the mappings will
|
84
|
-
# determine the order of the parameters. Example:
|
85
|
-
#
|
86
|
-
# customer.address_street = "Hyancintvej"
|
87
|
-
# customer.address_city = "Copenhagen"
|
88
|
-
# customer.address # => Address.new("Hyancintvej", "Copenhagen")
|
89
|
-
# customer.address = Address.new("May Street", "Chicago")
|
90
|
-
# customer.address_street # => "May Street"
|
91
|
-
# customer.address_city # => "Chicago"
|
92
|
-
#
|
93
|
-
# == Writing value objects
|
94
|
-
#
|
95
|
-
# Value objects are immutable and interchangeable objects that represent a given value, such as a +Money+ object representing
|
96
|
-
# $5. Two +Money+ objects both representing $5 should be equal (through methods such as == and <=> from +Comparable+ if ranking
|
97
|
-
# makes sense). This is unlike entity objects where equality is determined by identity. An entity class such as +Customer+ can
|
98
|
-
# easily have two different objects that both have an address on Hyancintvej. Entity identity is determined by object or
|
99
|
-
# relational unique identifiers (such as primary keys). Normal <tt>ActiveRecord::Base</tt> classes are entity objects.
|
100
|
-
#
|
101
|
-
# It's also important to treat the value objects as immutable. Don't allow the +Money+ object to have its amount changed after
|
102
|
-
# creation. Create a new +Money+ object with the new value instead. This is exemplified by the <tt>Money#exchanged_to</tt> method that
|
103
|
-
# returns a new value object instead of changing its own values. Active Record won't persist value objects that have been
|
104
|
-
# changed through means other than the writer method.
|
105
|
-
#
|
106
|
-
# The immutable requirement is enforced by Active Record by freezing any object assigned as a value object. Attempting to
|
107
|
-
# change it afterwards will result in a <tt>TypeError</tt>.
|
108
|
-
#
|
109
|
-
# Read more about value objects on http://c2.com/cgi/wiki?ValueObject and on the dangers of not keeping value objects
|
110
|
-
# immutable on http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable
|
111
|
-
module ClassMethods
|
112
|
-
# Adds reader and writer methods for manipulating a value object:
|
113
|
-
# <tt>composed_of :address</tt> adds <tt>address</tt> and <tt>address=(new_address)</tt> methods.
|
114
|
-
#
|
115
|
-
# Options are:
|
116
|
-
# * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred
|
117
|
-
# from the part id. So <tt>composed_of :address</tt> will by default be linked to the +Address+ class, but
|
118
|
-
# if the real class name is +CompanyAddress+, you'll have to specify it with this option.
|
119
|
-
# * <tt>:mapping</tt> - specifies a number of mapping arrays (attribute, parameter) that bind an attribute name
|
120
|
-
# to a constructor parameter on the value class.
|
121
|
-
# * <tt>:allow_nil</tt> - specifies that the aggregate object will not be instantiated when all mapped
|
122
|
-
# attributes are +nil+. Setting the aggregate class to +nil+ has the effect of writing +nil+ to all mapped attributes.
|
123
|
-
# This defaults to +false+.
|
124
|
-
#
|
125
|
-
# An optional block can be passed to convert the argument that is passed to the writer method into an instance of
|
126
|
-
# <tt>:class_name</tt>. The block will only be called if the argument is not already an instance of <tt>:class_name</tt>.
|
127
|
-
#
|
128
|
-
# Option examples:
|
129
|
-
# composed_of :temperature, :mapping => %w(reading celsius)
|
130
|
-
# composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount)) {|balance| balance.to_money }
|
131
|
-
# composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ]
|
132
|
-
# composed_of :gps_location
|
133
|
-
# composed_of :gps_location, :allow_nil => true
|
134
|
-
#
|
135
|
-
def composed_of(part_id, options = {}, &block)
|
136
|
-
options.assert_valid_keys(:class_name, :mapping, :allow_nil)
|
137
|
-
|
138
|
-
name = part_id.id2name
|
139
|
-
class_name = options[:class_name] || name.camelize
|
140
|
-
mapping = options[:mapping] || [ name, name ]
|
141
|
-
mapping = [ mapping ] unless mapping.first.is_a?(Array)
|
142
|
-
allow_nil = options[:allow_nil] || false
|
143
|
-
|
144
|
-
reader_method(name, class_name, mapping, allow_nil)
|
145
|
-
writer_method(name, class_name, mapping, allow_nil, block)
|
146
|
-
|
147
|
-
create_reflection(:composed_of, part_id, options, self)
|
148
|
-
end
|
149
|
-
|
150
|
-
private
|
151
|
-
def reader_method(name, class_name, mapping, allow_nil)
|
152
|
-
module_eval do
|
153
|
-
define_method(name) do |*args|
|
154
|
-
force_reload = args.first || false
|
155
|
-
if (instance_variable_get("@#{name}").nil? || force_reload) && (!allow_nil || mapping.any? {|pair| !read_attribute(pair.first).nil? })
|
156
|
-
instance_variable_set("@#{name}", class_name.constantize.new(*mapping.collect {|pair| read_attribute(pair.first)}))
|
157
|
-
end
|
158
|
-
return instance_variable_get("@#{name}")
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
|
-
end
|
163
|
-
|
164
|
-
def writer_method(name, class_name, mapping, allow_nil, conversion)
|
165
|
-
module_eval do
|
166
|
-
define_method("#{name}=") do |part|
|
167
|
-
if part.nil? && allow_nil
|
168
|
-
mapping.each { |pair| @attributes[pair.first] = nil }
|
169
|
-
instance_variable_set("@#{name}", nil)
|
170
|
-
else
|
171
|
-
part = conversion.call(part) unless part.is_a?(class_name.constantize) || conversion.nil?
|
172
|
-
mapping.each { |pair| @attributes[pair.first] = part.send(pair.last) }
|
173
|
-
instance_variable_set("@#{name}", part.freeze)
|
174
|
-
end
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|
180
|
-
end
|
@@ -1,1769 +0,0 @@
|
|
1
|
-
require 'active_record/associations/association_proxy'
|
2
|
-
require 'active_record/associations/association_collection'
|
3
|
-
require 'active_record/associations/belongs_to_association'
|
4
|
-
require 'active_record/associations/belongs_to_polymorphic_association'
|
5
|
-
require 'active_record/associations/has_one_association'
|
6
|
-
require 'active_record/associations/has_many_association'
|
7
|
-
require 'active_record/associations/has_many_through_association'
|
8
|
-
require 'active_record/associations/has_and_belongs_to_many_association'
|
9
|
-
|
10
|
-
module ActiveRecord
|
11
|
-
class HasManyThroughAssociationNotFoundError < ActiveRecordError #:nodoc:
|
12
|
-
def initialize(owner_class_name, reflection)
|
13
|
-
super("Could not find the association #{reflection.options[:through].inspect} in model #{owner_class_name}")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class HasManyThroughAssociationPolymorphicError < ActiveRecordError #:nodoc:
|
18
|
-
def initialize(owner_class_name, reflection, source_reflection)
|
19
|
-
super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' on the polymorphic object '#{source_reflection.class_name}##{source_reflection.name}'.")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class HasManyThroughAssociationPointlessSourceTypeError < ActiveRecordError #:nodoc:
|
24
|
-
def initialize(owner_class_name, reflection, source_reflection)
|
25
|
-
super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' with a :source_type option if the '#{reflection.through_reflection.class_name}##{source_reflection.name}' is not polymorphic. Try removing :source_type on your association.")
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class HasManyThroughSourceAssociationNotFoundError < ActiveRecordError #:nodoc:
|
30
|
-
def initialize(reflection)
|
31
|
-
through_reflection = reflection.through_reflection
|
32
|
-
source_reflection_names = reflection.source_reflection_names
|
33
|
-
source_associations = reflection.through_reflection.klass.reflect_on_all_associations.collect { |a| a.name.inspect }
|
34
|
-
super("Could not find the source association(s) #{source_reflection_names.collect(&:inspect).to_sentence :connector => 'or'} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence :connector => 'or'}?")
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
class HasManyThroughSourceAssociationMacroError < ActiveRecordError #:nodoc:
|
39
|
-
def initialize(reflection)
|
40
|
-
through_reflection = reflection.through_reflection
|
41
|
-
source_reflection = reflection.source_reflection
|
42
|
-
super("Invalid source reflection macro :#{source_reflection.macro}#{" :through" if source_reflection.options[:through]} for has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}. Use :source to specify the source reflection.")
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class HasManyThroughCantAssociateNewRecords < ActiveRecordError #:nodoc:
|
47
|
-
def initialize(owner, reflection)
|
48
|
-
super("Cannot associate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to create the has_many :through record associating them.")
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
class HasManyThroughCantDissociateNewRecords < ActiveRecordError #:nodoc:
|
53
|
-
def initialize(owner, reflection)
|
54
|
-
super("Cannot dissociate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to delete the has_many :through record associating them.")
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
class EagerLoadPolymorphicError < ActiveRecordError #:nodoc:
|
59
|
-
def initialize(reflection)
|
60
|
-
super("Can not eagerly load the polymorphic association #{reflection.name.inspect}")
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
class ReadOnlyAssociation < ActiveRecordError #:nodoc:
|
65
|
-
def initialize(reflection)
|
66
|
-
super("Can not add to a has_many :through association. Try adding to #{reflection.through_reflection.name.inspect}.")
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
module Associations # :nodoc:
|
71
|
-
def self.included(base)
|
72
|
-
base.extend(ClassMethods)
|
73
|
-
end
|
74
|
-
|
75
|
-
# Clears out the association cache
|
76
|
-
def clear_association_cache #:nodoc:
|
77
|
-
self.class.reflect_on_all_associations.to_a.each do |assoc|
|
78
|
-
instance_variable_set "@#{assoc.name}", nil
|
79
|
-
end unless self.new_record?
|
80
|
-
end
|
81
|
-
|
82
|
-
# Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like
|
83
|
-
# "Project has one Project Manager" or "Project belongs to a Portfolio". Each macro adds a number of methods to the class which are
|
84
|
-
# specialized according to the collection or association symbol and the options hash. It works much the same way as Ruby's own <tt>attr*</tt>
|
85
|
-
# methods. Example:
|
86
|
-
#
|
87
|
-
# class Project < ActiveRecord::Base
|
88
|
-
# belongs_to :portfolio
|
89
|
-
# has_one :project_manager
|
90
|
-
# has_many :milestones
|
91
|
-
# has_and_belongs_to_many :categories
|
92
|
-
# end
|
93
|
-
#
|
94
|
-
# The project class now has the following methods (and more) to ease the traversal and manipulation of its relationships:
|
95
|
-
# * <tt>Project#portfolio, Project#portfolio=(portfolio), Project#portfolio.nil?</tt>
|
96
|
-
# * <tt>Project#project_manager, Project#project_manager=(project_manager), Project#project_manager.nil?,</tt>
|
97
|
-
# * <tt>Project#milestones.empty?, Project#milestones.size, Project#milestones, Project#milestones<<(milestone),</tt>
|
98
|
-
# <tt>Project#milestones.delete(milestone), Project#milestones.find(milestone_id), Project#milestones.find(:all, options),</tt>
|
99
|
-
# <tt>Project#milestones.build, Project#milestones.create</tt>
|
100
|
-
# * <tt>Project#categories.empty?, Project#categories.size, Project#categories, Project#categories<<(category1),</tt>
|
101
|
-
# <tt>Project#categories.delete(category1)</tt>
|
102
|
-
#
|
103
|
-
# === A word of warning
|
104
|
-
#
|
105
|
-
# Don't create associations that have the same name as instance methods of ActiveRecord::Base. Since the association
|
106
|
-
# adds a method with that name to its model, it will override the inherited method and break things.
|
107
|
-
# For instance, #attributes and #connection would be bad choices for association names.
|
108
|
-
#
|
109
|
-
# == Auto-generated methods
|
110
|
-
#
|
111
|
-
# ===Singular associations (one-to-one)
|
112
|
-
# | | belongs_to |
|
113
|
-
# generated methods | belongs_to | :polymorphic | has_one
|
114
|
-
# ----------------------------------+------------+--------------+---------
|
115
|
-
# #other | X | X | X
|
116
|
-
# #other=(other) | X | X | X
|
117
|
-
# #build_other(attributes={}) | X | | X
|
118
|
-
# #create_other(attributes={}) | X | | X
|
119
|
-
# #other.create!(attributes={}) | | | X
|
120
|
-
# #other.nil? | X | X |
|
121
|
-
#
|
122
|
-
# ===Collection associations (one-to-many / many-to-many)
|
123
|
-
# | | | has_many
|
124
|
-
# generated methods | habtm | has_many | :through
|
125
|
-
# ----------------------------------+-------+----------+----------
|
126
|
-
# #others | X | X | X
|
127
|
-
# #others=(other,other,...) | X | X |
|
128
|
-
# #other_ids | X | X | X
|
129
|
-
# #other_ids=(id,id,...) | X | X |
|
130
|
-
# #others<< | X | X | X
|
131
|
-
# #others.push | X | X | X
|
132
|
-
# #others.concat | X | X | X
|
133
|
-
# #others.build(attributes={}) | X | X | X
|
134
|
-
# #others.create(attributes={}) | X | X |
|
135
|
-
# #others.create!(attributes={}) | X | X | X
|
136
|
-
# #others.size | X | X | X
|
137
|
-
# #others.length | X | X | X
|
138
|
-
# #others.count | | X | X
|
139
|
-
# #others.sum(args*,&block) | X | X | X
|
140
|
-
# #others.empty? | X | X | X
|
141
|
-
# #others.clear | X | X |
|
142
|
-
# #others.delete(other,other,...) | X | X | X
|
143
|
-
# #others.delete_all | X | X |
|
144
|
-
# #others.destroy_all | X | X | X
|
145
|
-
# #others.find(*args) | X | X | X
|
146
|
-
# #others.find_first | X | |
|
147
|
-
# #others.uniq | X | X |
|
148
|
-
# #others.reset | X | X | X
|
149
|
-
#
|
150
|
-
# == Cardinality and associations
|
151
|
-
#
|
152
|
-
# ActiveRecord associations can be used to describe relations with one-to-one, one-to-many
|
153
|
-
# and many-to-many cardinality. Each model uses an association to describe its role in
|
154
|
-
# the relation. In each case, the +belongs_to+ association is used in the model that has
|
155
|
-
# the foreign key.
|
156
|
-
#
|
157
|
-
# === One-to-one
|
158
|
-
#
|
159
|
-
# Use +has_one+ in the base, and +belongs_to+ in the associated model.
|
160
|
-
#
|
161
|
-
# class Employee < ActiveRecord::Base
|
162
|
-
# has_one :office
|
163
|
-
# end
|
164
|
-
# class Office < ActiveRecord::Base
|
165
|
-
# belongs_to :employee # foreign key - employee_id
|
166
|
-
# end
|
167
|
-
#
|
168
|
-
# === One-to-many
|
169
|
-
#
|
170
|
-
# Use +has_many+ in the base, and +belongs_to+ in the associated model.
|
171
|
-
#
|
172
|
-
# class Manager < ActiveRecord::Base
|
173
|
-
# has_many :employees
|
174
|
-
# end
|
175
|
-
# class Employee < ActiveRecord::Base
|
176
|
-
# belongs_to :manager # foreign key - manager_id
|
177
|
-
# end
|
178
|
-
#
|
179
|
-
# === Many-to-many
|
180
|
-
#
|
181
|
-
# There are two ways to build a many-to-many relationship.
|
182
|
-
#
|
183
|
-
# The first way uses a +has_many+ association with the <tt>:through</tt> option and a join model, so
|
184
|
-
# there are two stages of associations.
|
185
|
-
#
|
186
|
-
# class Assignment < ActiveRecord::Base
|
187
|
-
# belongs_to :programmer # foreign key - programmer_id
|
188
|
-
# belongs_to :project # foreign key - project_id
|
189
|
-
# end
|
190
|
-
# class Programmer < ActiveRecord::Base
|
191
|
-
# has_many :assignments
|
192
|
-
# has_many :projects, :through => :assignments
|
193
|
-
# end
|
194
|
-
# class Project < ActiveRecord::Base
|
195
|
-
# has_many :assignments
|
196
|
-
# has_many :programmers, :through => :assignments
|
197
|
-
# end
|
198
|
-
#
|
199
|
-
# For the second way, use +has_and_belongs_to_many+ in both models. This requires a join table
|
200
|
-
# that has no corresponding model or primary key.
|
201
|
-
#
|
202
|
-
# class Programmer < ActiveRecord::Base
|
203
|
-
# has_and_belongs_to_many :projects # foreign keys in the join table
|
204
|
-
# end
|
205
|
-
# class Project < ActiveRecord::Base
|
206
|
-
# has_and_belongs_to_many :programmers # foreign keys in the join table
|
207
|
-
# end
|
208
|
-
#
|
209
|
-
# Choosing which way to build a many-to-many relationship is not always simple.
|
210
|
-
# If you need to work with the relationship model as its own entity,
|
211
|
-
# use <tt>has_many :through</tt>. Use +has_and_belongs_to_many+ when working with legacy schemas or when
|
212
|
-
# you never work directly with the relationship itself.
|
213
|
-
#
|
214
|
-
# == Is it a +belongs_to+ or +has_one+ association?
|
215
|
-
#
|
216
|
-
# Both express a 1-1 relationship. The difference is mostly where to place the foreign key, which goes on the table for the class
|
217
|
-
# declaring the +belongs_to+ relationship. Example:
|
218
|
-
#
|
219
|
-
# class User < ActiveRecord::Base
|
220
|
-
# # I reference an account.
|
221
|
-
# belongs_to :account
|
222
|
-
# end
|
223
|
-
#
|
224
|
-
# class Account < ActiveRecord::Base
|
225
|
-
# # One user references me.
|
226
|
-
# has_one :user
|
227
|
-
# end
|
228
|
-
#
|
229
|
-
# The tables for these classes could look something like:
|
230
|
-
#
|
231
|
-
# CREATE TABLE users (
|
232
|
-
# id int(11) NOT NULL auto_increment,
|
233
|
-
# account_id int(11) default NULL,
|
234
|
-
# name varchar default NULL,
|
235
|
-
# PRIMARY KEY (id)
|
236
|
-
# )
|
237
|
-
#
|
238
|
-
# CREATE TABLE accounts (
|
239
|
-
# id int(11) NOT NULL auto_increment,
|
240
|
-
# name varchar default NULL,
|
241
|
-
# PRIMARY KEY (id)
|
242
|
-
# )
|
243
|
-
#
|
244
|
-
# == Unsaved objects and associations
|
245
|
-
#
|
246
|
-
# You can manipulate objects and associations before they are saved to the database, but there is some special behavior you should be
|
247
|
-
# aware of, mostly involving the saving of associated objects.
|
248
|
-
#
|
249
|
-
# === One-to-one associations
|
250
|
-
#
|
251
|
-
# * Assigning an object to a +has_one+ association automatically saves that object and the object being replaced (if there is one), in
|
252
|
-
# order to update their primary keys - except if the parent object is unsaved (<tt>new_record? == true</tt>).
|
253
|
-
# * If either of these saves fail (due to one of the objects being invalid) the assignment statement returns +false+ and the assignment
|
254
|
-
# is cancelled.
|
255
|
-
# * If you wish to assign an object to a +has_one+ association without saving it, use the <tt>#association.build</tt> method (documented below).
|
256
|
-
# * Assigning an object to a +belongs_to+ association does not save the object, since the foreign key field belongs on the parent. It
|
257
|
-
# does not save the parent either.
|
258
|
-
#
|
259
|
-
# === Collections
|
260
|
-
#
|
261
|
-
# * Adding an object to a collection (+has_many+ or +has_and_belongs_to_many+) automatically saves that object, except if the parent object
|
262
|
-
# (the owner of the collection) is not yet stored in the database.
|
263
|
-
# * If saving any of the objects being added to a collection (via <tt>#push</tt> or similar) fails, then <tt>#push</tt> returns +false+.
|
264
|
-
# * You can add an object to a collection without automatically saving it by using the <tt>#collection.build</tt> method (documented below).
|
265
|
-
# * All unsaved (<tt>new_record? == true</tt>) members of the collection are automatically saved when the parent is saved.
|
266
|
-
#
|
267
|
-
# === Association callbacks
|
268
|
-
#
|
269
|
-
# Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get
|
270
|
-
# triggered when you add an object to or remove an object from an association collection. Example:
|
271
|
-
#
|
272
|
-
# class Project
|
273
|
-
# has_and_belongs_to_many :developers, :after_add => :evaluate_velocity
|
274
|
-
#
|
275
|
-
# def evaluate_velocity(developer)
|
276
|
-
# ...
|
277
|
-
# end
|
278
|
-
# end
|
279
|
-
#
|
280
|
-
# It's possible to stack callbacks by passing them as an array. Example:
|
281
|
-
#
|
282
|
-
# class Project
|
283
|
-
# has_and_belongs_to_many :developers, :after_add => [:evaluate_velocity, Proc.new { |p, d| p.shipping_date = Time.now}]
|
284
|
-
# end
|
285
|
-
#
|
286
|
-
# Possible callbacks are: +before_add+, +after_add+, +before_remove+ and +after_remove+.
|
287
|
-
#
|
288
|
-
# Should any of the +before_add+ callbacks throw an exception, the object does not get added to the collection. Same with
|
289
|
-
# the +before_remove+ callbacks; if an exception is thrown the object doesn't get removed.
|
290
|
-
#
|
291
|
-
# === Association extensions
|
292
|
-
#
|
293
|
-
# The proxy objects that control the access to associations can be extended through anonymous modules. This is especially
|
294
|
-
# beneficial for adding new finders, creators, and other factory-type methods that are only used as part of this association.
|
295
|
-
# Example:
|
296
|
-
#
|
297
|
-
# class Account < ActiveRecord::Base
|
298
|
-
# has_many :people do
|
299
|
-
# def find_or_create_by_name(name)
|
300
|
-
# first_name, last_name = name.split(" ", 2)
|
301
|
-
# find_or_create_by_first_name_and_last_name(first_name, last_name)
|
302
|
-
# end
|
303
|
-
# end
|
304
|
-
# end
|
305
|
-
#
|
306
|
-
# person = Account.find(:first).people.find_or_create_by_name("David Heinemeier Hansson")
|
307
|
-
# person.first_name # => "David"
|
308
|
-
# person.last_name # => "Heinemeier Hansson"
|
309
|
-
#
|
310
|
-
# If you need to share the same extensions between many associations, you can use a named extension module. Example:
|
311
|
-
#
|
312
|
-
# module FindOrCreateByNameExtension
|
313
|
-
# def find_or_create_by_name(name)
|
314
|
-
# first_name, last_name = name.split(" ", 2)
|
315
|
-
# find_or_create_by_first_name_and_last_name(first_name, last_name)
|
316
|
-
# end
|
317
|
-
# end
|
318
|
-
#
|
319
|
-
# class Account < ActiveRecord::Base
|
320
|
-
# has_many :people, :extend => FindOrCreateByNameExtension
|
321
|
-
# end
|
322
|
-
#
|
323
|
-
# class Company < ActiveRecord::Base
|
324
|
-
# has_many :people, :extend => FindOrCreateByNameExtension
|
325
|
-
# end
|
326
|
-
#
|
327
|
-
# If you need to use multiple named extension modules, you can specify an array of modules with the <tt>:extend</tt> option.
|
328
|
-
# In the case of name conflicts between methods in the modules, methods in modules later in the array supercede
|
329
|
-
# those earlier in the array. Example:
|
330
|
-
#
|
331
|
-
# class Account < ActiveRecord::Base
|
332
|
-
# has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension]
|
333
|
-
# end
|
334
|
-
#
|
335
|
-
# Some extensions can only be made to work with knowledge of the association proxy's internals.
|
336
|
-
# Extensions can access relevant state using accessors on the association proxy:
|
337
|
-
#
|
338
|
-
# * +proxy_owner+ - Returns the object the association is part of.
|
339
|
-
# * +proxy_reflection+ - Returns the reflection object that describes the association.
|
340
|
-
# * +proxy_target+ - Returns the associated object for +belongs_to+ and +has_one+, or the collection of associated objects for +has_many+ and +has_and_belongs_to_many+.
|
341
|
-
#
|
342
|
-
# === Association Join Models
|
343
|
-
#
|
344
|
-
# Has Many associations can be configured with the <tt>:through</tt> option to use an explicit join model to retrieve the data. This
|
345
|
-
# operates similarly to a +has_and_belongs_to_many+ association. The advantage is that you're able to add validations,
|
346
|
-
# callbacks, and extra attributes on the join model. Consider the following schema:
|
347
|
-
#
|
348
|
-
# class Author < ActiveRecord::Base
|
349
|
-
# has_many :authorships
|
350
|
-
# has_many :books, :through => :authorships
|
351
|
-
# end
|
352
|
-
#
|
353
|
-
# class Authorship < ActiveRecord::Base
|
354
|
-
# belongs_to :author
|
355
|
-
# belongs_to :book
|
356
|
-
# end
|
357
|
-
#
|
358
|
-
# @author = Author.find :first
|
359
|
-
# @author.authorships.collect { |a| a.book } # selects all books that the author's authorships belong to.
|
360
|
-
# @author.books # selects all books by using the Authorship join model
|
361
|
-
#
|
362
|
-
# You can also go through a +has_many+ association on the join model:
|
363
|
-
#
|
364
|
-
# class Firm < ActiveRecord::Base
|
365
|
-
# has_many :clients
|
366
|
-
# has_many :invoices, :through => :clients
|
367
|
-
# end
|
368
|
-
#
|
369
|
-
# class Client < ActiveRecord::Base
|
370
|
-
# belongs_to :firm
|
371
|
-
# has_many :invoices
|
372
|
-
# end
|
373
|
-
#
|
374
|
-
# class Invoice < ActiveRecord::Base
|
375
|
-
# belongs_to :client
|
376
|
-
# end
|
377
|
-
#
|
378
|
-
# @firm = Firm.find :first
|
379
|
-
# @firm.clients.collect { |c| c.invoices }.flatten # select all invoices for all clients of the firm
|
380
|
-
# @firm.invoices # selects all invoices by going through the Client join model.
|
381
|
-
#
|
382
|
-
# === Polymorphic Associations
|
383
|
-
#
|
384
|
-
# Polymorphic associations on models are not restricted on what types of models they can be associated with. Rather, they
|
385
|
-
# specify an interface that a +has_many+ association must adhere to.
|
386
|
-
#
|
387
|
-
# class Asset < ActiveRecord::Base
|
388
|
-
# belongs_to :attachable, :polymorphic => true
|
389
|
-
# end
|
390
|
-
#
|
391
|
-
# class Post < ActiveRecord::Base
|
392
|
-
# has_many :assets, :as => :attachable # The :as option specifies the polymorphic interface to use.
|
393
|
-
# end
|
394
|
-
#
|
395
|
-
# @asset.attachable = @post
|
396
|
-
#
|
397
|
-
# This works by using a type column in addition to a foreign key to specify the associated record. In the Asset example, you'd need
|
398
|
-
# an +attachable_id+ integer column and an +attachable_type+ string column.
|
399
|
-
#
|
400
|
-
# Using polymorphic associations in combination with single table inheritance (STI) is a little tricky. In order
|
401
|
-
# for the associations to work as expected, ensure that you store the base model for the STI models in the
|
402
|
-
# type column of the polymorphic association. To continue with the asset example above, suppose there are guest posts
|
403
|
-
# and member posts that use the posts table for STI. In this case, there must be a +type+ column in the posts table.
|
404
|
-
#
|
405
|
-
# class Asset < ActiveRecord::Base
|
406
|
-
# belongs_to :attachable, :polymorphic => true
|
407
|
-
#
|
408
|
-
# def attachable_type=(sType)
|
409
|
-
# super(sType.to_s.classify.constantize.base_class.to_s)
|
410
|
-
# end
|
411
|
-
# end
|
412
|
-
#
|
413
|
-
# class Post < ActiveRecord::Base
|
414
|
-
# # because we store "Post" in attachable_type now :dependent => :destroy will work
|
415
|
-
# has_many :assets, :as => :attachable, :dependent => :destroy
|
416
|
-
# end
|
417
|
-
#
|
418
|
-
# class GuestPost < Post
|
419
|
-
# end
|
420
|
-
#
|
421
|
-
# class MemberPost < Post
|
422
|
-
# end
|
423
|
-
#
|
424
|
-
# == Caching
|
425
|
-
#
|
426
|
-
# All of the methods are built on a simple caching principle that will keep the result of the last query around unless specifically
|
427
|
-
# instructed not to. The cache is even shared across methods to make it even cheaper to use the macro-added methods without
|
428
|
-
# worrying too much about performance at the first go. Example:
|
429
|
-
#
|
430
|
-
# project.milestones # fetches milestones from the database
|
431
|
-
# project.milestones.size # uses the milestone cache
|
432
|
-
# project.milestones.empty? # uses the milestone cache
|
433
|
-
# project.milestones(true).size # fetches milestones from the database
|
434
|
-
# project.milestones # uses the milestone cache
|
435
|
-
#
|
436
|
-
# == Eager loading of associations
|
437
|
-
#
|
438
|
-
# Eager loading is a way to find objects of a certain class and a number of named associations along with it in a single SQL call. This is
|
439
|
-
# one of the easiest ways of to prevent the dreaded 1+N problem in which fetching 100 posts that each need to display their author
|
440
|
-
# triggers 101 database queries. Through the use of eager loading, the 101 queries can be reduced to 1. Example:
|
441
|
-
#
|
442
|
-
# class Post < ActiveRecord::Base
|
443
|
-
# belongs_to :author
|
444
|
-
# has_many :comments
|
445
|
-
# end
|
446
|
-
#
|
447
|
-
# Consider the following loop using the class above:
|
448
|
-
#
|
449
|
-
# for post in Post.find(:all)
|
450
|
-
# puts "Post: " + post.title
|
451
|
-
# puts "Written by: " + post.author.name
|
452
|
-
# puts "Last comment on: " + post.comments.first.created_on
|
453
|
-
# end
|
454
|
-
#
|
455
|
-
# To iterate over these one hundred posts, we'll generate 201 database queries. Let's first just optimize it for retrieving the author:
|
456
|
-
#
|
457
|
-
# for post in Post.find(:all, :include => :author)
|
458
|
-
#
|
459
|
-
# This references the name of the +belongs_to+ association that also used the <tt>:author</tt> symbol, so the find will now weave in a join something
|
460
|
-
# like this: <tt>LEFT OUTER JOIN authors ON authors.id = posts.author_id</tt>. Doing so will cut down the number of queries from 201 to 101.
|
461
|
-
#
|
462
|
-
# We can improve upon the situation further by referencing both associations in the finder with:
|
463
|
-
#
|
464
|
-
# for post in Post.find(:all, :include => [ :author, :comments ])
|
465
|
-
#
|
466
|
-
# That'll add another join along the lines of: <tt>LEFT OUTER JOIN comments ON comments.post_id = posts.id</tt>. And we'll be down to 1 query.
|
467
|
-
#
|
468
|
-
# To include a deep hierarchy of associations, use a hash:
|
469
|
-
#
|
470
|
-
# for post in Post.find(:all, :include => [ :author, { :comments => { :author => :gravatar } } ])
|
471
|
-
#
|
472
|
-
# That'll grab not only all the comments but all their authors and gravatar pictures. You can mix and match
|
473
|
-
# symbols, arrays and hashes in any combination to describe the associations you want to load.
|
474
|
-
#
|
475
|
-
# All of this power shouldn't fool you into thinking that you can pull out huge amounts of data with no performance penalty just because you've reduced
|
476
|
-
# the number of queries. The database still needs to send all the data to Active Record and it still needs to be processed. So it's no
|
477
|
-
# catch-all for performance problems, but it's a great way to cut down on the number of queries in a situation as the one described above.
|
478
|
-
#
|
479
|
-
# Since the eager loading pulls from multiple tables, you'll have to disambiguate any column references in both conditions and orders. So
|
480
|
-
# <tt>:order => "posts.id DESC"</tt> will work while <tt>:order => "id DESC"</tt> will not. Because eager loading generates the +SELECT+ statement too, the
|
481
|
-
# <tt>:select</tt> option is ignored.
|
482
|
-
#
|
483
|
-
# You can use eager loading on multiple associations from the same table, but you cannot use those associations in orders and conditions
|
484
|
-
# as there is currently not any way to disambiguate them. Eager loading will not pull additional attributes on join tables, so "rich
|
485
|
-
# associations" with +has_and_belongs_to_many+ are not a good fit for eager loading.
|
486
|
-
#
|
487
|
-
# When eager loaded, conditions are interpolated in the context of the model class, not the model instance. Conditions are lazily interpolated
|
488
|
-
# before the actual model exists.
|
489
|
-
#
|
490
|
-
# == Table Aliasing
|
491
|
-
#
|
492
|
-
# ActiveRecord uses table aliasing in the case that a table is referenced multiple times in a join. If a table is referenced only once,
|
493
|
-
# the standard table name is used. The second time, the table is aliased as <tt>#{reflection_name}_#{parent_table_name}</tt>. Indexes are appended
|
494
|
-
# for any more successive uses of the table name.
|
495
|
-
#
|
496
|
-
# Post.find :all, :include => :comments
|
497
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN comments ON ...
|
498
|
-
# Post.find :all, :include => :special_comments # STI
|
499
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN comments ON ... AND comments.type = 'SpecialComment'
|
500
|
-
# Post.find :all, :include => [:comments, :special_comments] # special_comments is the reflection name, posts is the parent table name
|
501
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN comments ON ... LEFT OUTER JOIN comments special_comments_posts
|
502
|
-
#
|
503
|
-
# Acts as tree example:
|
504
|
-
#
|
505
|
-
# TreeMixin.find :all, :include => :children
|
506
|
-
# # => SELECT ... FROM mixins LEFT OUTER JOIN mixins childrens_mixins ...
|
507
|
-
# TreeMixin.find :all, :include => {:children => :parent} # using cascading eager includes
|
508
|
-
# # => SELECT ... FROM mixins LEFT OUTER JOIN mixins childrens_mixins ...
|
509
|
-
# LEFT OUTER JOIN parents_mixins ...
|
510
|
-
# TreeMixin.find :all, :include => {:children => {:parent => :children}}
|
511
|
-
# # => SELECT ... FROM mixins LEFT OUTER JOIN mixins childrens_mixins ...
|
512
|
-
# LEFT OUTER JOIN parents_mixins ...
|
513
|
-
# LEFT OUTER JOIN mixins childrens_mixins_2
|
514
|
-
#
|
515
|
-
# Has and Belongs to Many join tables use the same idea, but add a <tt>_join</tt> suffix:
|
516
|
-
#
|
517
|
-
# Post.find :all, :include => :categories
|
518
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN categories_posts ... LEFT OUTER JOIN categories ...
|
519
|
-
# Post.find :all, :include => {:categories => :posts}
|
520
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN categories_posts ... LEFT OUTER JOIN categories ...
|
521
|
-
# LEFT OUTER JOIN categories_posts posts_categories_join LEFT OUTER JOIN posts posts_categories
|
522
|
-
# Post.find :all, :include => {:categories => {:posts => :categories}}
|
523
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN categories_posts ... LEFT OUTER JOIN categories ...
|
524
|
-
# LEFT OUTER JOIN categories_posts posts_categories_join LEFT OUTER JOIN posts posts_categories
|
525
|
-
# LEFT OUTER JOIN categories_posts categories_posts_join LEFT OUTER JOIN categories categories_posts
|
526
|
-
#
|
527
|
-
# If you wish to specify your own custom joins using a <tt>:joins</tt> option, those table names will take precedence over the eager associations:
|
528
|
-
#
|
529
|
-
# Post.find :all, :include => :comments, :joins => "inner join comments ..."
|
530
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN comments_posts ON ... INNER JOIN comments ...
|
531
|
-
# Post.find :all, :include => [:comments, :special_comments], :joins => "inner join comments ..."
|
532
|
-
# # => SELECT ... FROM posts LEFT OUTER JOIN comments comments_posts ON ...
|
533
|
-
# LEFT OUTER JOIN comments special_comments_posts ...
|
534
|
-
# INNER JOIN comments ...
|
535
|
-
#
|
536
|
-
# Table aliases are automatically truncated according to the maximum length of table identifiers according to the specific database.
|
537
|
-
#
|
538
|
-
# == Modules
|
539
|
-
#
|
540
|
-
# By default, associations will look for objects within the current module scope. Consider:
|
541
|
-
#
|
542
|
-
# module MyApplication
|
543
|
-
# module Business
|
544
|
-
# class Firm < ActiveRecord::Base
|
545
|
-
# has_many :clients
|
546
|
-
# end
|
547
|
-
#
|
548
|
-
# class Company < ActiveRecord::Base; end
|
549
|
-
# end
|
550
|
-
# end
|
551
|
-
#
|
552
|
-
# When <tt>Firm#clients</tt> is called, it will in turn call <tt>MyApplication::Business::Company.find(firm.id)</tt>. If you want to associate
|
553
|
-
# with a class in another module scope, this can be done by specifying the complete class name. Example:
|
554
|
-
#
|
555
|
-
# module MyApplication
|
556
|
-
# module Business
|
557
|
-
# class Firm < ActiveRecord::Base; end
|
558
|
-
# end
|
559
|
-
#
|
560
|
-
# module Billing
|
561
|
-
# class Account < ActiveRecord::Base
|
562
|
-
# belongs_to :firm, :class_name => "MyApplication::Business::Firm"
|
563
|
-
# end
|
564
|
-
# end
|
565
|
-
# end
|
566
|
-
#
|
567
|
-
# == Type safety with <tt>ActiveRecord::AssociationTypeMismatch</tt>
|
568
|
-
#
|
569
|
-
# If you attempt to assign an object to an association that doesn't match the inferred or specified <tt>:class_name</tt>, you'll
|
570
|
-
# get an <tt>ActiveRecord::AssociationTypeMismatch</tt>.
|
571
|
-
#
|
572
|
-
# == Options
|
573
|
-
#
|
574
|
-
# All of the association macros can be specialized through options. This makes cases more complex than the simple and guessable ones
|
575
|
-
# possible.
|
576
|
-
module ClassMethods
|
577
|
-
# Adds the following methods for retrieval and query of collections of associated objects:
|
578
|
-
# +collection+ is replaced with the symbol passed as the first argument, so
|
579
|
-
# <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.
|
580
|
-
# * <tt>collection(force_reload = false)</tt> - returns an array of all the associated objects.
|
581
|
-
# An empty array is returned if none are found.
|
582
|
-
# * <tt>collection<<(object, ...)</tt> - adds one or more objects to the collection by setting their foreign keys to the collection's primary key.
|
583
|
-
# * <tt>collection.delete(object, ...)</tt> - removes one or more objects from the collection by setting their foreign keys to NULL.
|
584
|
-
# This will also destroy the objects if they're declared as +belongs_to+ and dependent on this model.
|
585
|
-
# * <tt>collection=objects</tt> - replaces the collections content by deleting and adding objects as appropriate.
|
586
|
-
# * <tt>collection_singular_ids</tt> - returns an array of the associated objects' ids
|
587
|
-
# * <tt>collection_singular_ids=ids</tt> - replace the collection with the objects identified by the primary keys in +ids+
|
588
|
-
# * <tt>collection.clear</tt> - removes every object from the collection. This destroys the associated objects if they
|
589
|
-
# are associated with <tt>:dependent => :destroy</tt>, deletes them directly from the database if <tt>:dependent => :delete_all</tt>,
|
590
|
-
# otherwise sets their foreign keys to NULL.
|
591
|
-
# * <tt>collection.empty?</tt> - returns +true+ if there are no associated objects.
|
592
|
-
# * <tt>collection.size</tt> - returns the number of associated objects.
|
593
|
-
# * <tt>collection.find</tt> - finds an associated object according to the same rules as Base.find.
|
594
|
-
# * <tt>collection.build(attributes = {}, ...)</tt> - returns one or more new objects of the collection type that have been instantiated
|
595
|
-
# with +attributes+ and linked to this object through a foreign key, but have not yet been saved. *Note:* This only works if an
|
596
|
-
# associated object already exists, not if it's +nil+!
|
597
|
-
# * <tt>collection.create(attributes = {})</tt> - returns a new object of the collection type that has been instantiated
|
598
|
-
# with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
|
599
|
-
# *Note:* This only works if an associated object already exists, not if it's +nil+!
|
600
|
-
#
|
601
|
-
# Example: A +Firm+ class declares <tt>has_many :clients</tt>, which will add:
|
602
|
-
# * <tt>Firm#clients</tt> (similar to <tt>Clients.find :all, :conditions => "firm_id = #{id}"</tt>)
|
603
|
-
# * <tt>Firm#clients<<</tt>
|
604
|
-
# * <tt>Firm#clients.delete</tt>
|
605
|
-
# * <tt>Firm#clients=</tt>
|
606
|
-
# * <tt>Firm#client_ids</tt>
|
607
|
-
# * <tt>Firm#client_ids=</tt>
|
608
|
-
# * <tt>Firm#clients.clear</tt>
|
609
|
-
# * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>)
|
610
|
-
# * <tt>Firm#clients.size</tt> (similar to <tt>Client.count "firm_id = #{id}"</tt>)
|
611
|
-
# * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>)
|
612
|
-
# * <tt>Firm#clients.build</tt> (similar to <tt>Client.new("firm_id" => id)</tt>)
|
613
|
-
# * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("firm_id" => id); c.save; c</tt>)
|
614
|
-
# The declaration can also include an options hash to specialize the behavior of the association.
|
615
|
-
#
|
616
|
-
# Options are:
|
617
|
-
# * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred
|
618
|
-
# from the association name. So <tt>has_many :products</tt> will by default be linked to the +Product+ class, but
|
619
|
-
# if the real class name is +SpecialProduct+, you'll have to specify it with this option.
|
620
|
-
# * <tt>:conditions</tt> - specify the conditions that the associated objects must meet in order to be included as a +WHERE+
|
621
|
-
# SQL fragment, such as <tt>price > 5 AND name LIKE 'B%'</tt>.
|
622
|
-
# * <tt>:order</tt> - specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
|
623
|
-
# such as <tt>last_name, first_name DESC</tt>
|
624
|
-
# * <tt>:foreign_key</tt> - specify the foreign key used for the association. By default this is guessed to be the name
|
625
|
-
# of this class in lower-case and +_id+ suffixed. So a +Person+ class that makes a +has_many+ association will use +person_id+
|
626
|
-
# as the default +foreign_key+.
|
627
|
-
# * <tt>:dependent</tt> - if set to <tt>:destroy</tt> all the associated objects are destroyed
|
628
|
-
# alongside this object by calling their destroy method. If set to <tt>:delete_all</tt> all associated
|
629
|
-
# objects are deleted *without* calling their destroy method. If set to <tt>:nullify</tt> all associated
|
630
|
-
# objects' foreign keys are set to +NULL+ *without* calling their save callbacks.
|
631
|
-
# * <tt>:finder_sql</tt> - specify a complete SQL statement to fetch the association. This is a good way to go for complex
|
632
|
-
# associations that depend on multiple tables. Note: When this option is used, +find_in_collection+ is _not_ added.
|
633
|
-
# * <tt>:counter_sql</tt> - specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is
|
634
|
-
# specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>.
|
635
|
-
# * <tt>:extend</tt> - specify a named module for extending the proxy. See "Association extensions".
|
636
|
-
# * <tt>:include</tt> - specify second-order associations that should be eager loaded when the collection is loaded.
|
637
|
-
# * <tt>:group</tt>: An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
|
638
|
-
# * <tt>:limit</tt>: An integer determining the limit on the number of rows that should be returned.
|
639
|
-
# * <tt>:offset</tt>: An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
|
640
|
-
# * <tt>:select</tt>: By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if you, for example, want to do a join
|
641
|
-
# but not include the joined columns.
|
642
|
-
# * <tt>:as</tt>: Specifies a polymorphic interface (See <tt>#belongs_to</tt>).
|
643
|
-
# * <tt>:through</tt>: Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
|
644
|
-
# are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a <tt>belongs_to</tt>
|
645
|
-
# or <tt>has_many</tt> association on the join model.
|
646
|
-
# * <tt>:source</tt>: Specifies the source association name used by <tt>has_many :through</tt> queries. Only use it if the name cannot be
|
647
|
-
# inferred from the association. <tt>has_many :subscribers, :through => :subscriptions</tt> will look for either <tt>:subscribers</tt> or
|
648
|
-
# <tt>:subscriber</tt> on +Subscription+, unless a <tt>:source</tt> is given.
|
649
|
-
# * <tt>:source_type</tt>: Specifies type of the source association used by <tt>has_many :through</tt> queries where the source
|
650
|
-
# association is a polymorphic +belongs_to+.
|
651
|
-
# * <tt>:uniq</tt> - if set to +true+, duplicates will be omitted from the collection. Useful in conjunction with <tt>:through</tt>.
|
652
|
-
#
|
653
|
-
# Option examples:
|
654
|
-
# has_many :comments, :order => "posted_on"
|
655
|
-
# has_many :comments, :include => :author
|
656
|
-
# has_many :people, :class_name => "Person", :conditions => "deleted = 0", :order => "name"
|
657
|
-
# has_many :tracks, :order => "position", :dependent => :destroy
|
658
|
-
# has_many :comments, :dependent => :nullify
|
659
|
-
# has_many :tags, :as => :taggable
|
660
|
-
# has_many :subscribers, :through => :subscriptions, :source => :user
|
661
|
-
# has_many :subscribers, :class_name => "Person", :finder_sql =>
|
662
|
-
# 'SELECT DISTINCT people.* ' +
|
663
|
-
# 'FROM people p, post_subscriptions ps ' +
|
664
|
-
# 'WHERE ps.post_id = #{id} AND ps.person_id = p.id ' +
|
665
|
-
# 'ORDER BY p.first_name'
|
666
|
-
def has_many(association_id, options = {}, &extension)
|
667
|
-
reflection = create_has_many_reflection(association_id, options, &extension)
|
668
|
-
|
669
|
-
configure_dependency_for_has_many(reflection)
|
670
|
-
|
671
|
-
if options[:through]
|
672
|
-
collection_reader_method(reflection, HasManyThroughAssociation)
|
673
|
-
collection_accessor_methods(reflection, HasManyThroughAssociation, false)
|
674
|
-
else
|
675
|
-
add_multiple_associated_save_callbacks(reflection.name)
|
676
|
-
add_association_callbacks(reflection.name, reflection.options)
|
677
|
-
collection_accessor_methods(reflection, HasManyAssociation)
|
678
|
-
end
|
679
|
-
end
|
680
|
-
|
681
|
-
# Adds the following methods for retrieval and query of a single associated object:
|
682
|
-
# +association+ is replaced with the symbol passed as the first argument, so
|
683
|
-
# <tt>has_one :manager</tt> would add among others <tt>manager.nil?</tt>.
|
684
|
-
# * <tt>association(force_reload = false)</tt> - returns the associated object. +nil+ is returned if none is found.
|
685
|
-
# * <tt>association=(associate)</tt> - assigns the associate object, extracts the primary key, sets it as the foreign key,
|
686
|
-
# and saves the associate object.
|
687
|
-
# * <tt>association.nil?</tt> - returns +true+ if there is no associated object.
|
688
|
-
# * <tt>build_association(attributes = {})</tt> - returns a new object of the associated type that has been instantiated
|
689
|
-
# with +attributes+ and linked to this object through a foreign key, but has not yet been saved. Note: This ONLY works if
|
690
|
-
# an association already exists. It will NOT work if the association is +nil+.
|
691
|
-
# * <tt>create_association(attributes = {})</tt> - returns a new object of the associated type that has been instantiated
|
692
|
-
# with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
|
693
|
-
#
|
694
|
-
# Example: An Account class declares <tt>has_one :beneficiary</tt>, which will add:
|
695
|
-
# * <tt>Account#beneficiary</tt> (similar to <tt>Beneficiary.find(:first, :conditions => "account_id = #{id}")</tt>)
|
696
|
-
# * <tt>Account#beneficiary=(beneficiary)</tt> (similar to <tt>beneficiary.account_id = account.id; beneficiary.save</tt>)
|
697
|
-
# * <tt>Account#beneficiary.nil?</tt>
|
698
|
-
# * <tt>Account#build_beneficiary</tt> (similar to <tt>Beneficiary.new("account_id" => id)</tt>)
|
699
|
-
# * <tt>Account#create_beneficiary</tt> (similar to <tt>b = Beneficiary.new("account_id" => id); b.save; b</tt>)
|
700
|
-
#
|
701
|
-
# The declaration can also include an options hash to specialize the behavior of the association.
|
702
|
-
#
|
703
|
-
# Options are:
|
704
|
-
# * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred
|
705
|
-
# from the association name. So <tt>has_one :manager</tt> will by default be linked to the +Manager+ class, but
|
706
|
-
# if the real class name is +Person+, you'll have to specify it with this option.
|
707
|
-
# * <tt>:conditions</tt> - specify the conditions that the associated object must meet in order to be included as a +WHERE+
|
708
|
-
# SQL fragment, such as <tt>rank = 5</tt>.
|
709
|
-
# * <tt>:order</tt> - specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
|
710
|
-
# such as <tt>last_name, first_name DESC</tt>
|
711
|
-
# * <tt>:dependent</tt> - if set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to
|
712
|
-
# <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. If set to <tt>:nullify</tt>, the associated
|
713
|
-
# object's foreign key is set to +NULL+. Also, association is assigned.
|
714
|
-
# * <tt>:foreign_key</tt> - specify the foreign key used for the association. By default this is guessed to be the name
|
715
|
-
# of this class in lower-case and +_id+ suffixed. So a +Person+ class that makes a +has_one+ association will use +person_id+
|
716
|
-
# as the default +foreign_key+.
|
717
|
-
# * <tt>:include</tt> - specify second-order associations that should be eager loaded when this object is loaded.
|
718
|
-
# * <tt>:as</tt>: Specifies a polymorphic interface (See <tt>#belongs_to</tt>).
|
719
|
-
#
|
720
|
-
# Option examples:
|
721
|
-
# has_one :credit_card, :dependent => :destroy # destroys the associated credit card
|
722
|
-
# has_one :credit_card, :dependent => :nullify # updates the associated records foreign key value to NULL rather than destroying it
|
723
|
-
# has_one :last_comment, :class_name => "Comment", :order => "posted_on"
|
724
|
-
# has_one :project_manager, :class_name => "Person", :conditions => "role = 'project_manager'"
|
725
|
-
# has_one :attachment, :as => :attachable
|
726
|
-
def has_one(association_id, options = {})
|
727
|
-
reflection = create_has_one_reflection(association_id, options)
|
728
|
-
|
729
|
-
module_eval do
|
730
|
-
after_save <<-EOF
|
731
|
-
association = instance_variable_get("@#{reflection.name}")
|
732
|
-
if !association.nil? && (new_record? || association.new_record? || association["#{reflection.primary_key_name}"] != id)
|
733
|
-
association["#{reflection.primary_key_name}"] = id
|
734
|
-
association.save(true)
|
735
|
-
end
|
736
|
-
EOF
|
737
|
-
end
|
738
|
-
|
739
|
-
association_accessor_methods(reflection, HasOneAssociation)
|
740
|
-
association_constructor_method(:build, reflection, HasOneAssociation)
|
741
|
-
association_constructor_method(:create, reflection, HasOneAssociation)
|
742
|
-
|
743
|
-
configure_dependency_for_has_one(reflection)
|
744
|
-
end
|
745
|
-
|
746
|
-
# Adds the following methods for retrieval and query for a single associated object for which this object holds an id:
|
747
|
-
# +association+ is replaced with the symbol passed as the first argument, so
|
748
|
-
# <tt>belongs_to :author</tt> would add among others <tt>author.nil?</tt>.
|
749
|
-
# * <tt>association(force_reload = false)</tt> - returns the associated object. +nil+ is returned if none is found.
|
750
|
-
# * <tt>association=(associate)</tt> - assigns the associate object, extracts the primary key, and sets it as the foreign key.
|
751
|
-
# * <tt>association.nil?</tt> - returns +true+ if there is no associated object.
|
752
|
-
# * <tt>build_association(attributes = {})</tt> - returns a new object of the associated type that has been instantiated
|
753
|
-
# with +attributes+ and linked to this object through a foreign key, but has not yet been saved.
|
754
|
-
# * <tt>create_association(attributes = {})</tt> - returns a new object of the associated type that has been instantiated
|
755
|
-
# with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
|
756
|
-
#
|
757
|
-
# Example: A Post class declares <tt>belongs_to :author</tt>, which will add:
|
758
|
-
# * <tt>Post#author</tt> (similar to <tt>Author.find(author_id)</tt>)
|
759
|
-
# * <tt>Post#author=(author)</tt> (similar to <tt>post.author_id = author.id</tt>)
|
760
|
-
# * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>)
|
761
|
-
# * <tt>Post#author.nil?</tt>
|
762
|
-
# * <tt>Post#build_author</tt> (similar to <tt>post.author = Author.new</tt>)
|
763
|
-
# * <tt>Post#create_author</tt> (similar to <tt>post.author = Author.new; post.author.save; post.author</tt>)
|
764
|
-
# The declaration can also include an options hash to specialize the behavior of the association.
|
765
|
-
#
|
766
|
-
# Options are:
|
767
|
-
# * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred
|
768
|
-
# from the association name. So <tt>has_one :author</tt> will by default be linked to the +Author+ class, but
|
769
|
-
# if the real class name is +Person+, you'll have to specify it with this option.
|
770
|
-
# * <tt>:conditions</tt> - specify the conditions that the associated object must meet in order to be included as a +WHERE+
|
771
|
-
# SQL fragment, such as <tt>authorized = 1</tt>.
|
772
|
-
# * <tt>:order</tt> - specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
|
773
|
-
# such as <tt>last_name, first_name DESC</tt>
|
774
|
-
# * <tt>:foreign_key</tt> - specify the foreign key used for the association. By default this is guessed to be the name
|
775
|
-
# of the associated class in lower-case and +_id+ suffixed. So a +Person+ class that makes a +belongs_to+ association to a
|
776
|
-
# +Boss+ class will use +boss_id+ as the default +foreign_key+.
|
777
|
-
# * <tt>:counter_cache</tt> - caches the number of belonging objects on the associate class through the use of +increment_counter+
|
778
|
-
# and +decrement_counter+. The counter cache is incremented when an object of this class is created and decremented when it's
|
779
|
-
# destroyed. This requires that a column named <tt>#{table_name}_count</tt> (such as +comments_count+ for a belonging +Comment+ class)
|
780
|
-
# is used on the associate class (such as a +Post+ class). You can also specify a custom counter cache column by providing
|
781
|
-
# a column name instead of a +true+/+false+ value to this option (e.g., <tt>:counter_cache => :my_custom_counter</tt>.)
|
782
|
-
# Note: Specifying a counter_cache will add it to that model's list of readonly attributes using #attr_readonly.
|
783
|
-
# * <tt>:include</tt> - specify second-order associations that should be eager loaded when this object is loaded.
|
784
|
-
# * <tt>:polymorphic</tt> - specify this association is a polymorphic association by passing +true+.
|
785
|
-
# Note: If you've enabled the counter cache, then you may want to add the counter cache attribute
|
786
|
-
# to the attr_readonly list in the associated classes (e.g. class Post; attr_readonly :comments_count; end).
|
787
|
-
#
|
788
|
-
# Option examples:
|
789
|
-
# belongs_to :firm, :foreign_key => "client_of"
|
790
|
-
# belongs_to :author, :class_name => "Person", :foreign_key => "author_id"
|
791
|
-
# belongs_to :valid_coupon, :class_name => "Coupon", :foreign_key => "coupon_id",
|
792
|
-
# :conditions => 'discounts > #{payments_count}'
|
793
|
-
# belongs_to :attachable, :polymorphic => true
|
794
|
-
def belongs_to(association_id, options = {})
|
795
|
-
reflection = create_belongs_to_reflection(association_id, options)
|
796
|
-
|
797
|
-
if reflection.options[:polymorphic]
|
798
|
-
association_accessor_methods(reflection, BelongsToPolymorphicAssociation)
|
799
|
-
|
800
|
-
module_eval do
|
801
|
-
before_save <<-EOF
|
802
|
-
association = instance_variable_get("@#{reflection.name}")
|
803
|
-
if association && association.target
|
804
|
-
if association.new_record?
|
805
|
-
association.save(true)
|
806
|
-
end
|
807
|
-
|
808
|
-
if association.updated?
|
809
|
-
self["#{reflection.primary_key_name}"] = association.id
|
810
|
-
self["#{reflection.options[:foreign_type]}"] = association.class.base_class.name.to_s
|
811
|
-
end
|
812
|
-
end
|
813
|
-
EOF
|
814
|
-
end
|
815
|
-
else
|
816
|
-
association_accessor_methods(reflection, BelongsToAssociation)
|
817
|
-
association_constructor_method(:build, reflection, BelongsToAssociation)
|
818
|
-
association_constructor_method(:create, reflection, BelongsToAssociation)
|
819
|
-
|
820
|
-
module_eval do
|
821
|
-
before_save <<-EOF
|
822
|
-
association = instance_variable_get("@#{reflection.name}")
|
823
|
-
if !association.nil?
|
824
|
-
if association.new_record?
|
825
|
-
association.save(true)
|
826
|
-
end
|
827
|
-
|
828
|
-
if association.updated?
|
829
|
-
self["#{reflection.primary_key_name}"] = association.id
|
830
|
-
end
|
831
|
-
end
|
832
|
-
EOF
|
833
|
-
end
|
834
|
-
end
|
835
|
-
|
836
|
-
# Create the callbacks to update counter cache
|
837
|
-
if options[:counter_cache]
|
838
|
-
cache_column = options[:counter_cache] == true ?
|
839
|
-
"#{self.to_s.underscore.pluralize}_count" :
|
840
|
-
options[:counter_cache]
|
841
|
-
|
842
|
-
module_eval(
|
843
|
-
"after_create '#{reflection.name}.class.increment_counter(\"#{cache_column}\", #{reflection.primary_key_name})" +
|
844
|
-
" unless #{reflection.name}.nil?'"
|
845
|
-
)
|
846
|
-
|
847
|
-
module_eval(
|
848
|
-
"before_destroy '#{reflection.name}.class.decrement_counter(\"#{cache_column}\", #{reflection.primary_key_name})" +
|
849
|
-
" unless #{reflection.name}.nil?'"
|
850
|
-
)
|
851
|
-
|
852
|
-
module_eval(
|
853
|
-
"#{reflection.class_name}.send(:attr_readonly,\"#{cache_column}\".intern) if defined?(#{reflection.class_name}) && #{reflection.class_name}.respond_to?(:attr_readonly)"
|
854
|
-
)
|
855
|
-
end
|
856
|
-
end
|
857
|
-
|
858
|
-
# Associates two classes via an intermediate join table. Unless the join table is explicitly specified as
|
859
|
-
# an option, it is guessed using the lexical order of the class names. So a join between +Developer+ and +Project+
|
860
|
-
# will give the default join table name of +developers_projects+ because "D" outranks "P". Note that this precedence
|
861
|
-
# is calculated using the <tt><</tt> operator for <tt>String</tt>. This means that if the strings are of different lengths,
|
862
|
-
# and the strings are equal when compared up to the shortest length, then the longer string is considered of higher
|
863
|
-
# lexical precedence than the shorter one. For example, one would expect the tables <tt>paper_boxes</tt> and <tt>papers</tt>
|
864
|
-
# to generate a join table name of <tt>papers_paper_boxes</tt> because of the length of the name <tt>paper_boxes</tt>,
|
865
|
-
# but it in fact generates a join table name of <tt>paper_boxes_papers</tt>. Be aware of this caveat, and use the
|
866
|
-
# custom <tt>join_table</tt> option if you need to.
|
867
|
-
#
|
868
|
-
# Deprecated: Any additional fields added to the join table will be placed as attributes when pulling records out through
|
869
|
-
# +has_and_belongs_to_many+ associations. Records returned from join tables with additional attributes will be marked as
|
870
|
-
# +ReadOnly+ (because we can't save changes to the additional attributes). It's strongly recommended that you upgrade any
|
871
|
-
# associations with attributes to a real join model (see introduction).
|
872
|
-
#
|
873
|
-
# Adds the following methods for retrieval and query:
|
874
|
-
# +collection+ is replaced with the symbol passed as the first argument, so
|
875
|
-
# <tt>has_and_belongs_to_many :categories</tt> would add among others <tt>categories.empty?</tt>.
|
876
|
-
# * <tt>collection(force_reload = false)</tt> - returns an array of all the associated objects.
|
877
|
-
# An empty array is returned if none are found.
|
878
|
-
# * <tt>collection<<(object, ...)</tt> - adds one or more objects to the collection by creating associations in the join table
|
879
|
-
# (<tt>collection.push</tt> and <tt>collection.concat</tt> are aliases to this method).
|
880
|
-
# * <tt>collection.delete(object, ...)</tt> - removes one or more objects from the collection by removing their associations from the join table.
|
881
|
-
# This does not destroy the objects.
|
882
|
-
# * <tt>collection=objects</tt> - replaces the collection's content by deleting and adding objects as appropriate.
|
883
|
-
# * <tt>collection_singular_ids</tt> - returns an array of the associated objects' ids
|
884
|
-
# * <tt>collection_singular_ids=ids</tt> - replace the collection by the objects identified by the primary keys in +ids+
|
885
|
-
# * <tt>collection.clear</tt> - removes every object from the collection. This does not destroy the objects.
|
886
|
-
# * <tt>collection.empty?</tt> - returns +true+ if there are no associated objects.
|
887
|
-
# * <tt>collection.size</tt> - returns the number of associated objects.
|
888
|
-
# * <tt>collection.find(id)</tt> - finds an associated object responding to the +id+ and that
|
889
|
-
# meets the condition that it has to be associated with this object.
|
890
|
-
# * <tt>collection.build(attributes = {})</tt> - returns a new object of the collection type that has been instantiated
|
891
|
-
# with +attributes+ and linked to this object through the join table, but has not yet been saved.
|
892
|
-
# * <tt>collection.create(attributes = {})</tt> - returns a new object of the collection type that has been instantiated
|
893
|
-
# with +attributes+, linked to this object through the join table, and that has already been saved (if it passed the validation).
|
894
|
-
#
|
895
|
-
# Example: A Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add:
|
896
|
-
# * <tt>Developer#projects</tt>
|
897
|
-
# * <tt>Developer#projects<<</tt>
|
898
|
-
# * <tt>Developer#projects.delete</tt>
|
899
|
-
# * <tt>Developer#projects=</tt>
|
900
|
-
# * <tt>Developer#project_ids</tt>
|
901
|
-
# * <tt>Developer#project_ids=</tt>
|
902
|
-
# * <tt>Developer#projects.clear</tt>
|
903
|
-
# * <tt>Developer#projects.empty?</tt>
|
904
|
-
# * <tt>Developer#projects.size</tt>
|
905
|
-
# * <tt>Developer#projects.find(id)</tt>
|
906
|
-
# * <tt>Developer#projects.build</tt> (similar to <tt>Project.new("project_id" => id)</tt>)
|
907
|
-
# * <tt>Developer#projects.create</tt> (similar to <tt>c = Project.new("project_id" => id); c.save; c</tt>)
|
908
|
-
# The declaration may include an options hash to specialize the behavior of the association.
|
909
|
-
#
|
910
|
-
# Options are:
|
911
|
-
# * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred
|
912
|
-
# from the association name. So <tt>has_and_belongs_to_many :projects</tt> will by default be linked to the
|
913
|
-
# +Project+ class, but if the real class name is +SuperProject+, you'll have to specify it with this option.
|
914
|
-
# * <tt>:join_table</tt> - specify the name of the join table if the default based on lexical order isn't what you want.
|
915
|
-
# WARNING: If you're overwriting the table name of either class, the +table_name+ method MUST be declared underneath any
|
916
|
-
# +has_and_belongs_to_many+ declaration in order to work.
|
917
|
-
# * <tt>:foreign_key</tt> - specify the foreign key used for the association. By default this is guessed to be the name
|
918
|
-
# of this class in lower-case and +_id+ suffixed. So a +Person+ class that makes a +has_and_belongs_to_many+ association
|
919
|
-
# will use +person_id+ as the default +foreign_key+.
|
920
|
-
# * <tt>:association_foreign_key</tt> - specify the association foreign key used for the association. By default this is
|
921
|
-
# guessed to be the name of the associated class in lower-case and +_id+ suffixed. So if the associated class is +Project+,
|
922
|
-
# the +has_and_belongs_to_many+ association will use +project_id+ as the default association +foreign_key+.
|
923
|
-
# * <tt>:conditions</tt> - specify the conditions that the associated object must meet in order to be included as a +WHERE+
|
924
|
-
# SQL fragment, such as <tt>authorized = 1</tt>.
|
925
|
-
# * <tt>:order</tt> - specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
|
926
|
-
# such as <tt>last_name, first_name DESC</tt>
|
927
|
-
# * <tt>:uniq</tt> - if set to +true+, duplicate associated objects will be ignored by accessors and query methods
|
928
|
-
# * <tt>:finder_sql</tt> - overwrite the default generated SQL statement used to fetch the association with a manual statement
|
929
|
-
# * <tt>:delete_sql</tt> - overwrite the default generated SQL statement used to remove links between the associated
|
930
|
-
# classes with a manual statement
|
931
|
-
# * <tt>:insert_sql</tt> - overwrite the default generated SQL statement used to add links between the associated classes
|
932
|
-
# with a manual statement
|
933
|
-
# * <tt>:extend</tt> - anonymous module for extending the proxy, see "Association extensions".
|
934
|
-
# * <tt>:include</tt> - specify second-order associations that should be eager loaded when the collection is loaded.
|
935
|
-
# * <tt>:group</tt>: An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
|
936
|
-
# * <tt>:limit</tt>: An integer determining the limit on the number of rows that should be returned.
|
937
|
-
# * <tt>:offset</tt>: An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
|
938
|
-
# * <tt>:select</tt>: By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
|
939
|
-
# but not include the joined columns.
|
940
|
-
#
|
941
|
-
# Option examples:
|
942
|
-
# has_and_belongs_to_many :projects
|
943
|
-
# has_and_belongs_to_many :projects, :include => [ :milestones, :manager ]
|
944
|
-
# has_and_belongs_to_many :nations, :class_name => "Country"
|
945
|
-
# has_and_belongs_to_many :categories, :join_table => "prods_cats"
|
946
|
-
# has_and_belongs_to_many :active_projects, :join_table => 'developers_projects', :delete_sql =>
|
947
|
-
# 'DELETE FROM developers_projects WHERE active=1 AND developer_id = #{id} AND project_id = #{record.id}'
|
948
|
-
def has_and_belongs_to_many(association_id, options = {}, &extension)
|
949
|
-
reflection = create_has_and_belongs_to_many_reflection(association_id, options, &extension)
|
950
|
-
|
951
|
-
add_multiple_associated_save_callbacks(reflection.name)
|
952
|
-
collection_accessor_methods(reflection, HasAndBelongsToManyAssociation)
|
953
|
-
|
954
|
-
# Don't use a before_destroy callback since users' before_destroy
|
955
|
-
# callbacks will be executed after the association is wiped out.
|
956
|
-
old_method = "destroy_without_habtm_shim_for_#{reflection.name}"
|
957
|
-
class_eval <<-end_eval unless method_defined?(old_method)
|
958
|
-
alias_method :#{old_method}, :destroy_without_callbacks
|
959
|
-
def destroy_without_callbacks
|
960
|
-
#{reflection.name}.clear
|
961
|
-
#{old_method}
|
962
|
-
end
|
963
|
-
end_eval
|
964
|
-
|
965
|
-
add_association_callbacks(reflection.name, options)
|
966
|
-
end
|
967
|
-
|
968
|
-
private
|
969
|
-
# Generate a join table name from two provided tables names.
|
970
|
-
# The order of names in join name is determined by lexical precedence.
|
971
|
-
# join_table_name("members", "clubs")
|
972
|
-
# => "clubs_members"
|
973
|
-
# join_table_name("members", "special_clubs")
|
974
|
-
# => "members_special_clubs"
|
975
|
-
def join_table_name(first_table_name, second_table_name)
|
976
|
-
if first_table_name < second_table_name
|
977
|
-
join_table = "#{first_table_name}_#{second_table_name}"
|
978
|
-
else
|
979
|
-
join_table = "#{second_table_name}_#{first_table_name}"
|
980
|
-
end
|
981
|
-
|
982
|
-
table_name_prefix + join_table + table_name_suffix
|
983
|
-
end
|
984
|
-
|
985
|
-
def association_accessor_methods(reflection, association_proxy_class)
|
986
|
-
define_method(reflection.name) do |*params|
|
987
|
-
force_reload = params.first unless params.empty?
|
988
|
-
association = instance_variable_get("@#{reflection.name}")
|
989
|
-
|
990
|
-
if association.nil? || force_reload
|
991
|
-
association = association_proxy_class.new(self, reflection)
|
992
|
-
retval = association.reload
|
993
|
-
if retval.nil? and association_proxy_class == BelongsToAssociation
|
994
|
-
instance_variable_set("@#{reflection.name}", nil)
|
995
|
-
return nil
|
996
|
-
end
|
997
|
-
instance_variable_set("@#{reflection.name}", association)
|
998
|
-
end
|
999
|
-
|
1000
|
-
association.target.nil? ? nil : association
|
1001
|
-
end
|
1002
|
-
|
1003
|
-
define_method("#{reflection.name}=") do |new_value|
|
1004
|
-
association = instance_variable_get("@#{reflection.name}")
|
1005
|
-
if association.nil? || association.target != new_value
|
1006
|
-
association = association_proxy_class.new(self, reflection)
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
association.replace(new_value)
|
1010
|
-
|
1011
|
-
unless new_value.nil?
|
1012
|
-
instance_variable_set("@#{reflection.name}", association)
|
1013
|
-
else
|
1014
|
-
instance_variable_set("@#{reflection.name}", nil)
|
1015
|
-
end
|
1016
|
-
end
|
1017
|
-
|
1018
|
-
define_method("set_#{reflection.name}_target") do |target|
|
1019
|
-
return if target.nil? and association_proxy_class == BelongsToAssociation
|
1020
|
-
association = association_proxy_class.new(self, reflection)
|
1021
|
-
association.target = target
|
1022
|
-
instance_variable_set("@#{reflection.name}", association)
|
1023
|
-
end
|
1024
|
-
end
|
1025
|
-
|
1026
|
-
def collection_reader_method(reflection, association_proxy_class)
|
1027
|
-
define_method(reflection.name) do |*params|
|
1028
|
-
force_reload = params.first unless params.empty?
|
1029
|
-
association = instance_variable_get("@#{reflection.name}")
|
1030
|
-
|
1031
|
-
unless association.respond_to?(:loaded?)
|
1032
|
-
association = association_proxy_class.new(self, reflection)
|
1033
|
-
instance_variable_set("@#{reflection.name}", association)
|
1034
|
-
end
|
1035
|
-
|
1036
|
-
association.reload if force_reload
|
1037
|
-
|
1038
|
-
association
|
1039
|
-
end
|
1040
|
-
end
|
1041
|
-
|
1042
|
-
def collection_accessor_methods(reflection, association_proxy_class, writer = true)
|
1043
|
-
collection_reader_method(reflection, association_proxy_class)
|
1044
|
-
|
1045
|
-
define_method("#{reflection.name}=") do |new_value|
|
1046
|
-
# Loads proxy class instance (defined in collection_reader_method) if not already loaded
|
1047
|
-
association = send(reflection.name)
|
1048
|
-
association.replace(new_value)
|
1049
|
-
association
|
1050
|
-
end
|
1051
|
-
|
1052
|
-
define_method("#{reflection.name.to_s.singularize}_ids") do
|
1053
|
-
send(reflection.name).map(&:id)
|
1054
|
-
end
|
1055
|
-
|
1056
|
-
define_method("#{reflection.name.to_s.singularize}_ids=") do |new_value|
|
1057
|
-
ids = (new_value || []).reject { |nid| nid.blank? }
|
1058
|
-
send("#{reflection.name}=", reflection.class_name.constantize.find(ids))
|
1059
|
-
end if writer
|
1060
|
-
end
|
1061
|
-
|
1062
|
-
def add_multiple_associated_save_callbacks(association_name)
|
1063
|
-
method_name = "validate_associated_records_for_#{association_name}".to_sym
|
1064
|
-
define_method(method_name) do
|
1065
|
-
association = instance_variable_get("@#{association_name}")
|
1066
|
-
if association.respond_to?(:loaded?)
|
1067
|
-
if new_record?
|
1068
|
-
association
|
1069
|
-
else
|
1070
|
-
association.select { |record| record.new_record? }
|
1071
|
-
end.each do |record|
|
1072
|
-
errors.add "#{association_name}" unless record.valid?
|
1073
|
-
end
|
1074
|
-
end
|
1075
|
-
end
|
1076
|
-
|
1077
|
-
validate method_name
|
1078
|
-
before_save("@new_record_before_save = new_record?; true")
|
1079
|
-
|
1080
|
-
after_callback = <<-end_eval
|
1081
|
-
association = instance_variable_get("@#{association_name}")
|
1082
|
-
|
1083
|
-
records_to_save = if @new_record_before_save
|
1084
|
-
association
|
1085
|
-
elsif association.respond_to?(:loaded?) && association.loaded?
|
1086
|
-
association.select { |record| record.new_record? }
|
1087
|
-
else
|
1088
|
-
[]
|
1089
|
-
end
|
1090
|
-
|
1091
|
-
records_to_save.each { |record| association.send(:insert_record, record) } unless records_to_save.blank?
|
1092
|
-
|
1093
|
-
# reconstruct the SQL queries now that we know the owner's id
|
1094
|
-
association.send(:construct_sql) if association.respond_to?(:construct_sql)
|
1095
|
-
end_eval
|
1096
|
-
|
1097
|
-
# Doesn't use after_save as that would save associations added in after_create/after_update twice
|
1098
|
-
after_create(after_callback)
|
1099
|
-
after_update(after_callback)
|
1100
|
-
end
|
1101
|
-
|
1102
|
-
def association_constructor_method(constructor, reflection, association_proxy_class)
|
1103
|
-
define_method("#{constructor}_#{reflection.name}") do |*params|
|
1104
|
-
attributees = params.first unless params.empty?
|
1105
|
-
replace_existing = params[1].nil? ? true : params[1]
|
1106
|
-
association = instance_variable_get("@#{reflection.name}")
|
1107
|
-
|
1108
|
-
if association.nil?
|
1109
|
-
association = association_proxy_class.new(self, reflection)
|
1110
|
-
instance_variable_set("@#{reflection.name}", association)
|
1111
|
-
end
|
1112
|
-
|
1113
|
-
if association_proxy_class == HasOneAssociation
|
1114
|
-
association.send(constructor, attributees, replace_existing)
|
1115
|
-
else
|
1116
|
-
association.send(constructor, attributees)
|
1117
|
-
end
|
1118
|
-
end
|
1119
|
-
end
|
1120
|
-
|
1121
|
-
def find_with_associations(options = {})
|
1122
|
-
catch :invalid_query do
|
1123
|
-
join_dependency = JoinDependency.new(self, merge_includes(scope(:find, :include), options[:include]), options[:joins])
|
1124
|
-
rows = select_all_rows(options, join_dependency)
|
1125
|
-
return join_dependency.instantiate(rows)
|
1126
|
-
end
|
1127
|
-
[]
|
1128
|
-
end
|
1129
|
-
|
1130
|
-
# See HasManyAssociation#delete_records. Dependent associations
|
1131
|
-
# delete children, otherwise foreign key is set to NULL.
|
1132
|
-
def configure_dependency_for_has_many(reflection)
|
1133
|
-
if reflection.options.include?(:dependent)
|
1134
|
-
# Add polymorphic type if the :as option is present
|
1135
|
-
dependent_conditions = []
|
1136
|
-
dependent_conditions << "#{reflection.primary_key_name} = \#{record.quoted_id}"
|
1137
|
-
dependent_conditions << "#{reflection.options[:as]}_type = '#{base_class.name}'" if reflection.options[:as]
|
1138
|
-
dependent_conditions << sanitize_sql(reflection.options[:conditions]) if reflection.options[:conditions]
|
1139
|
-
dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ")
|
1140
|
-
|
1141
|
-
case reflection.options[:dependent]
|
1142
|
-
when :destroy
|
1143
|
-
module_eval "before_destroy '#{reflection.name}.each { |o| o.destroy }'"
|
1144
|
-
when :delete_all
|
1145
|
-
module_eval "before_destroy { |record| #{reflection.class_name}.delete_all(%(#{dependent_conditions})) }"
|
1146
|
-
when :nullify
|
1147
|
-
module_eval "before_destroy { |record| #{reflection.class_name}.update_all(%(#{reflection.primary_key_name} = NULL), %(#{dependent_conditions})) }"
|
1148
|
-
else
|
1149
|
-
raise ArgumentError, "The :dependent option expects either :destroy, :delete_all, or :nullify (#{reflection.options[:dependent].inspect})"
|
1150
|
-
end
|
1151
|
-
end
|
1152
|
-
end
|
1153
|
-
|
1154
|
-
def configure_dependency_for_has_one(reflection)
|
1155
|
-
if reflection.options.include?(:dependent)
|
1156
|
-
case reflection.options[:dependent]
|
1157
|
-
when :destroy
|
1158
|
-
module_eval "before_destroy '#{reflection.name}.destroy unless #{reflection.name}.nil?'"
|
1159
|
-
when :delete
|
1160
|
-
module_eval "before_destroy '#{reflection.class_name}.delete(#{reflection.name}.id) unless #{reflection.name}.nil?'"
|
1161
|
-
when :nullify
|
1162
|
-
module_eval "before_destroy '#{reflection.name}.update_attribute(\"#{reflection.primary_key_name}\", nil) unless #{reflection.name}.nil?'"
|
1163
|
-
else
|
1164
|
-
raise ArgumentError, "The :dependent option expects either :destroy, :delete or :nullify (#{reflection.options[:dependent].inspect})"
|
1165
|
-
end
|
1166
|
-
end
|
1167
|
-
end
|
1168
|
-
|
1169
|
-
def create_has_many_reflection(association_id, options, &extension)
|
1170
|
-
options.assert_valid_keys(
|
1171
|
-
:class_name, :table_name, :foreign_key,
|
1172
|
-
:dependent,
|
1173
|
-
:select, :conditions, :include, :order, :group, :limit, :offset,
|
1174
|
-
:as, :through, :source, :source_type,
|
1175
|
-
:uniq,
|
1176
|
-
:finder_sql, :counter_sql,
|
1177
|
-
:before_add, :after_add, :before_remove, :after_remove,
|
1178
|
-
:extend
|
1179
|
-
)
|
1180
|
-
|
1181
|
-
options[:extend] = create_extension_modules(association_id, extension, options[:extend]) if block_given?
|
1182
|
-
|
1183
|
-
create_reflection(:has_many, association_id, options, self)
|
1184
|
-
end
|
1185
|
-
|
1186
|
-
def create_has_one_reflection(association_id, options)
|
1187
|
-
options.assert_valid_keys(
|
1188
|
-
:class_name, :foreign_key, :remote, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as
|
1189
|
-
)
|
1190
|
-
|
1191
|
-
create_reflection(:has_one, association_id, options, self)
|
1192
|
-
end
|
1193
|
-
|
1194
|
-
def create_belongs_to_reflection(association_id, options)
|
1195
|
-
options.assert_valid_keys(
|
1196
|
-
:class_name, :foreign_key, :foreign_type, :remote, :conditions, :order, :include, :dependent,
|
1197
|
-
:counter_cache, :extend, :polymorphic
|
1198
|
-
)
|
1199
|
-
|
1200
|
-
reflection = create_reflection(:belongs_to, association_id, options, self)
|
1201
|
-
|
1202
|
-
if options[:polymorphic]
|
1203
|
-
reflection.options[:foreign_type] ||= reflection.class_name.underscore + "_type"
|
1204
|
-
end
|
1205
|
-
|
1206
|
-
reflection
|
1207
|
-
end
|
1208
|
-
|
1209
|
-
def create_has_and_belongs_to_many_reflection(association_id, options, &extension)
|
1210
|
-
options.assert_valid_keys(
|
1211
|
-
:class_name, :table_name, :join_table, :foreign_key, :association_foreign_key,
|
1212
|
-
:select, :conditions, :include, :order, :group, :limit, :offset,
|
1213
|
-
:uniq,
|
1214
|
-
:finder_sql, :delete_sql, :insert_sql,
|
1215
|
-
:before_add, :after_add, :before_remove, :after_remove,
|
1216
|
-
:extend
|
1217
|
-
)
|
1218
|
-
|
1219
|
-
options[:extend] = create_extension_modules(association_id, extension, options[:extend]) if block_given?
|
1220
|
-
|
1221
|
-
reflection = create_reflection(:has_and_belongs_to_many, association_id, options, self)
|
1222
|
-
|
1223
|
-
reflection.options[:join_table] ||= join_table_name(undecorated_table_name(self.to_s), undecorated_table_name(reflection.class_name))
|
1224
|
-
|
1225
|
-
reflection
|
1226
|
-
end
|
1227
|
-
|
1228
|
-
def reflect_on_included_associations(associations)
|
1229
|
-
[ associations ].flatten.collect { |association| reflect_on_association(association.to_s.intern) }
|
1230
|
-
end
|
1231
|
-
|
1232
|
-
def guard_against_unlimitable_reflections(reflections, options)
|
1233
|
-
if (options[:offset] || options[:limit]) && !using_limitable_reflections?(reflections)
|
1234
|
-
raise(
|
1235
|
-
ConfigurationError,
|
1236
|
-
"You can not use offset and limit together with has_many or has_and_belongs_to_many associations"
|
1237
|
-
)
|
1238
|
-
end
|
1239
|
-
end
|
1240
|
-
|
1241
|
-
def select_all_rows(options, join_dependency)
|
1242
|
-
connection.select_all(
|
1243
|
-
construct_finder_sql_with_included_associations(options, join_dependency),
|
1244
|
-
"#{name} Load Including Associations"
|
1245
|
-
)
|
1246
|
-
end
|
1247
|
-
|
1248
|
-
def construct_finder_sql_with_included_associations(options, join_dependency)
|
1249
|
-
scope = scope(:find)
|
1250
|
-
sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} "
|
1251
|
-
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
|
1252
|
-
|
1253
|
-
add_joins!(sql, options, scope)
|
1254
|
-
add_conditions!(sql, options[:conditions], scope)
|
1255
|
-
add_limited_ids_condition!(sql, options, join_dependency) if !using_limitable_reflections?(join_dependency.reflections) && ((scope && scope[:limit]) || options[:limit])
|
1256
|
-
|
1257
|
-
add_group!(sql, options[:group], scope)
|
1258
|
-
add_order!(sql, options[:order], scope)
|
1259
|
-
add_limit!(sql, options, scope) if using_limitable_reflections?(join_dependency.reflections)
|
1260
|
-
add_lock!(sql, options, scope)
|
1261
|
-
|
1262
|
-
return sanitize_sql(sql)
|
1263
|
-
end
|
1264
|
-
|
1265
|
-
def add_limited_ids_condition!(sql, options, join_dependency)
|
1266
|
-
unless (id_list = select_limited_ids_list(options, join_dependency)).empty?
|
1267
|
-
sql << "#{condition_word(sql)} #{connection.quote_table_name table_name}.#{primary_key} IN (#{id_list}) "
|
1268
|
-
else
|
1269
|
-
throw :invalid_query
|
1270
|
-
end
|
1271
|
-
end
|
1272
|
-
|
1273
|
-
def select_limited_ids_list(options, join_dependency)
|
1274
|
-
pk = columns_hash[primary_key]
|
1275
|
-
|
1276
|
-
connection.select_all(
|
1277
|
-
construct_finder_sql_for_association_limiting(options, join_dependency),
|
1278
|
-
"#{name} Load IDs For Limited Eager Loading"
|
1279
|
-
).collect { |row| connection.quote(row[primary_key], pk) }.join(", ")
|
1280
|
-
end
|
1281
|
-
|
1282
|
-
def construct_finder_sql_for_association_limiting(options, join_dependency)
|
1283
|
-
scope = scope(:find)
|
1284
|
-
is_distinct = !options[:joins].blank? || include_eager_conditions?(options) || include_eager_order?(options)
|
1285
|
-
sql = "SELECT "
|
1286
|
-
if is_distinct
|
1287
|
-
sql << connection.distinct("#{connection.quote_table_name table_name}.#{primary_key}", options[:order])
|
1288
|
-
else
|
1289
|
-
sql << primary_key
|
1290
|
-
end
|
1291
|
-
sql << " FROM #{connection.quote_table_name table_name} "
|
1292
|
-
|
1293
|
-
if is_distinct
|
1294
|
-
sql << join_dependency.join_associations.collect(&:association_join).join
|
1295
|
-
add_joins!(sql, options, scope)
|
1296
|
-
end
|
1297
|
-
|
1298
|
-
add_conditions!(sql, options[:conditions], scope)
|
1299
|
-
add_group!(sql, options[:group], scope)
|
1300
|
-
|
1301
|
-
if options[:order] && is_distinct
|
1302
|
-
connection.add_order_by_for_association_limiting!(sql, options)
|
1303
|
-
else
|
1304
|
-
add_order!(sql, options[:order], scope)
|
1305
|
-
end
|
1306
|
-
|
1307
|
-
add_limit!(sql, options, scope)
|
1308
|
-
|
1309
|
-
return sanitize_sql(sql)
|
1310
|
-
end
|
1311
|
-
|
1312
|
-
# Checks if the conditions reference a table other than the current model table
|
1313
|
-
def include_eager_conditions?(options)
|
1314
|
-
# look in both sets of conditions
|
1315
|
-
conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond|
|
1316
|
-
case cond
|
1317
|
-
when nil then all
|
1318
|
-
when Array then all << cond.first
|
1319
|
-
else all << cond
|
1320
|
-
end
|
1321
|
-
end
|
1322
|
-
return false unless conditions.any?
|
1323
|
-
conditions.join(' ').scan(/([\.\w]+)\.\w+/).flatten.any? do |condition_table_name|
|
1324
|
-
condition_table_name != table_name
|
1325
|
-
end
|
1326
|
-
end
|
1327
|
-
|
1328
|
-
# Checks if the query order references a table other than the current model's table.
|
1329
|
-
def include_eager_order?(options)
|
1330
|
-
order = options[:order]
|
1331
|
-
return false unless order
|
1332
|
-
order.scan(/([\.\w]+)\.\w+/).flatten.any? do |order_table_name|
|
1333
|
-
order_table_name != table_name
|
1334
|
-
end
|
1335
|
-
end
|
1336
|
-
|
1337
|
-
def using_limitable_reflections?(reflections)
|
1338
|
-
reflections.reject { |r| [ :belongs_to, :has_one ].include?(r.macro) }.length.zero?
|
1339
|
-
end
|
1340
|
-
|
1341
|
-
def column_aliases(join_dependency)
|
1342
|
-
join_dependency.joins.collect{|join| join.column_names_with_alias.collect{|column_name, aliased_name|
|
1343
|
-
"#{connection.quote_table_name join.aliased_table_name}.#{connection.quote_column_name column_name} AS #{aliased_name}"}}.flatten.join(", ")
|
1344
|
-
end
|
1345
|
-
|
1346
|
-
def add_association_callbacks(association_name, options)
|
1347
|
-
callbacks = %w(before_add after_add before_remove after_remove)
|
1348
|
-
callbacks.each do |callback_name|
|
1349
|
-
full_callback_name = "#{callback_name}_for_#{association_name}"
|
1350
|
-
defined_callbacks = options[callback_name.to_sym]
|
1351
|
-
if options.has_key?(callback_name.to_sym)
|
1352
|
-
class_inheritable_reader full_callback_name.to_sym
|
1353
|
-
write_inheritable_attribute(full_callback_name.to_sym, [defined_callbacks].flatten)
|
1354
|
-
else
|
1355
|
-
write_inheritable_attribute(full_callback_name.to_sym, [])
|
1356
|
-
end
|
1357
|
-
end
|
1358
|
-
end
|
1359
|
-
|
1360
|
-
def condition_word(sql)
|
1361
|
-
sql =~ /where/i ? " AND " : "WHERE "
|
1362
|
-
end
|
1363
|
-
|
1364
|
-
def create_extension_modules(association_id, block_extension, extensions)
|
1365
|
-
extension_module_name = "#{self.to_s}#{association_id.to_s.camelize}AssociationExtension"
|
1366
|
-
|
1367
|
-
silence_warnings do
|
1368
|
-
Object.const_set(extension_module_name, Module.new(&block_extension))
|
1369
|
-
end
|
1370
|
-
|
1371
|
-
Array(extensions).push(extension_module_name.constantize)
|
1372
|
-
end
|
1373
|
-
|
1374
|
-
class JoinDependency # :nodoc:
|
1375
|
-
attr_reader :joins, :reflections, :table_aliases
|
1376
|
-
|
1377
|
-
def initialize(base, associations, joins)
|
1378
|
-
@joins = [JoinBase.new(base, joins)]
|
1379
|
-
@associations = associations
|
1380
|
-
@reflections = []
|
1381
|
-
@base_records_hash = {}
|
1382
|
-
@base_records_in_order = []
|
1383
|
-
@table_aliases = Hash.new { |aliases, table| aliases[table] = 0 }
|
1384
|
-
@table_aliases[base.table_name] = 1
|
1385
|
-
build(associations)
|
1386
|
-
end
|
1387
|
-
|
1388
|
-
def join_associations
|
1389
|
-
@joins[1..-1].to_a
|
1390
|
-
end
|
1391
|
-
|
1392
|
-
def join_base
|
1393
|
-
@joins[0]
|
1394
|
-
end
|
1395
|
-
|
1396
|
-
def instantiate(rows)
|
1397
|
-
rows.each_with_index do |row, i|
|
1398
|
-
primary_id = join_base.record_id(row)
|
1399
|
-
unless @base_records_hash[primary_id]
|
1400
|
-
@base_records_in_order << (@base_records_hash[primary_id] = join_base.instantiate(row))
|
1401
|
-
end
|
1402
|
-
construct(@base_records_hash[primary_id], @associations, join_associations.dup, row)
|
1403
|
-
end
|
1404
|
-
remove_duplicate_results!(join_base.active_record, @base_records_in_order, @associations)
|
1405
|
-
return @base_records_in_order
|
1406
|
-
end
|
1407
|
-
|
1408
|
-
def remove_duplicate_results!(base, records, associations)
|
1409
|
-
case associations
|
1410
|
-
when Symbol, String
|
1411
|
-
reflection = base.reflections[associations]
|
1412
|
-
if reflection && [:has_many, :has_and_belongs_to_many].include?(reflection.macro)
|
1413
|
-
records.each { |record| record.send(reflection.name).target.uniq! }
|
1414
|
-
end
|
1415
|
-
when Array
|
1416
|
-
associations.each do |association|
|
1417
|
-
remove_duplicate_results!(base, records, association)
|
1418
|
-
end
|
1419
|
-
when Hash
|
1420
|
-
associations.keys.each do |name|
|
1421
|
-
reflection = base.reflections[name]
|
1422
|
-
is_collection = [:has_many, :has_and_belongs_to_many].include?(reflection.macro)
|
1423
|
-
|
1424
|
-
parent_records = records.map do |record|
|
1425
|
-
next unless record.send(reflection.name)
|
1426
|
-
is_collection ? record.send(reflection.name).target.uniq! : record.send(reflection.name)
|
1427
|
-
end.flatten.compact
|
1428
|
-
|
1429
|
-
remove_duplicate_results!(reflection.class_name.constantize, parent_records, associations[name]) unless parent_records.empty?
|
1430
|
-
end
|
1431
|
-
end
|
1432
|
-
end
|
1433
|
-
|
1434
|
-
protected
|
1435
|
-
def build(associations, parent = nil)
|
1436
|
-
parent ||= @joins.last
|
1437
|
-
case associations
|
1438
|
-
when Symbol, String
|
1439
|
-
reflection = parent.reflections[associations.to_s.intern] or
|
1440
|
-
raise ConfigurationError, "Association named '#{ associations }' was not found; perhaps you misspelled it?"
|
1441
|
-
@reflections << reflection
|
1442
|
-
@joins << build_join_association(reflection, parent)
|
1443
|
-
when Array
|
1444
|
-
associations.each do |association|
|
1445
|
-
build(association, parent)
|
1446
|
-
end
|
1447
|
-
when Hash
|
1448
|
-
associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name|
|
1449
|
-
build(name, parent)
|
1450
|
-
build(associations[name])
|
1451
|
-
end
|
1452
|
-
else
|
1453
|
-
raise ConfigurationError, associations.inspect
|
1454
|
-
end
|
1455
|
-
end
|
1456
|
-
|
1457
|
-
# overridden in InnerJoinDependency subclass
|
1458
|
-
def build_join_association(reflection, parent)
|
1459
|
-
JoinAssociation.new(reflection, self, parent)
|
1460
|
-
end
|
1461
|
-
|
1462
|
-
def construct(parent, associations, joins, row)
|
1463
|
-
case associations
|
1464
|
-
when Symbol, String
|
1465
|
-
while (join = joins.shift).reflection.name.to_s != associations.to_s
|
1466
|
-
raise ConfigurationError, "Not Enough Associations" if joins.empty?
|
1467
|
-
end
|
1468
|
-
construct_association(parent, join, row)
|
1469
|
-
when Array
|
1470
|
-
associations.each do |association|
|
1471
|
-
construct(parent, association, joins, row)
|
1472
|
-
end
|
1473
|
-
when Hash
|
1474
|
-
associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name|
|
1475
|
-
association = construct_association(parent, joins.shift, row)
|
1476
|
-
construct(association, associations[name], joins, row) if association
|
1477
|
-
end
|
1478
|
-
else
|
1479
|
-
raise ConfigurationError, associations.inspect
|
1480
|
-
end
|
1481
|
-
end
|
1482
|
-
|
1483
|
-
def construct_association(record, join, row)
|
1484
|
-
case join.reflection.macro
|
1485
|
-
when :has_many, :has_and_belongs_to_many
|
1486
|
-
collection = record.send(join.reflection.name)
|
1487
|
-
collection.loaded
|
1488
|
-
|
1489
|
-
return nil if record.id.to_s != join.parent.record_id(row).to_s or row[join.aliased_primary_key].nil?
|
1490
|
-
association = join.instantiate(row)
|
1491
|
-
collection.target.push(association)
|
1492
|
-
when :has_one
|
1493
|
-
return if record.id.to_s != join.parent.record_id(row).to_s
|
1494
|
-
association = join.instantiate(row) unless row[join.aliased_primary_key].nil?
|
1495
|
-
record.send("set_#{join.reflection.name}_target", association)
|
1496
|
-
when :belongs_to
|
1497
|
-
return if record.id.to_s != join.parent.record_id(row).to_s or row[join.aliased_primary_key].nil?
|
1498
|
-
association = join.instantiate(row)
|
1499
|
-
record.send("set_#{join.reflection.name}_target", association)
|
1500
|
-
else
|
1501
|
-
raise ConfigurationError, "unknown macro: #{join.reflection.macro}"
|
1502
|
-
end
|
1503
|
-
return association
|
1504
|
-
end
|
1505
|
-
|
1506
|
-
class JoinBase # :nodoc:
|
1507
|
-
attr_reader :active_record, :table_joins
|
1508
|
-
delegate :table_name, :column_names, :primary_key, :reflections, :sanitize_sql, :to => :active_record
|
1509
|
-
|
1510
|
-
def initialize(active_record, joins = nil)
|
1511
|
-
@active_record = active_record
|
1512
|
-
@cached_record = {}
|
1513
|
-
@table_joins = joins
|
1514
|
-
end
|
1515
|
-
|
1516
|
-
def aliased_prefix
|
1517
|
-
"t0"
|
1518
|
-
end
|
1519
|
-
|
1520
|
-
def aliased_primary_key
|
1521
|
-
"#{ aliased_prefix }_r0"
|
1522
|
-
end
|
1523
|
-
|
1524
|
-
def aliased_table_name
|
1525
|
-
active_record.table_name
|
1526
|
-
end
|
1527
|
-
|
1528
|
-
def column_names_with_alias
|
1529
|
-
unless @column_names_with_alias
|
1530
|
-
@column_names_with_alias = []
|
1531
|
-
([primary_key] + (column_names - [primary_key])).each_with_index do |column_name, i|
|
1532
|
-
@column_names_with_alias << [column_name, "#{ aliased_prefix }_r#{ i }"]
|
1533
|
-
end
|
1534
|
-
end
|
1535
|
-
return @column_names_with_alias
|
1536
|
-
end
|
1537
|
-
|
1538
|
-
def extract_record(row)
|
1539
|
-
column_names_with_alias.inject({}){|record, (cn, an)| record[cn] = row[an]; record}
|
1540
|
-
end
|
1541
|
-
|
1542
|
-
def record_id(row)
|
1543
|
-
row[aliased_primary_key]
|
1544
|
-
end
|
1545
|
-
|
1546
|
-
def instantiate(row)
|
1547
|
-
@cached_record[record_id(row)] ||= active_record.send(:instantiate, extract_record(row))
|
1548
|
-
end
|
1549
|
-
end
|
1550
|
-
|
1551
|
-
class JoinAssociation < JoinBase # :nodoc:
|
1552
|
-
attr_reader :reflection, :parent, :aliased_table_name, :aliased_prefix, :aliased_join_table_name, :parent_table_name
|
1553
|
-
delegate :options, :klass, :through_reflection, :source_reflection, :to => :reflection
|
1554
|
-
|
1555
|
-
def initialize(reflection, join_dependency, parent = nil)
|
1556
|
-
reflection.check_validity!
|
1557
|
-
if reflection.options[:polymorphic]
|
1558
|
-
raise EagerLoadPolymorphicError.new(reflection)
|
1559
|
-
end
|
1560
|
-
|
1561
|
-
super(reflection.klass)
|
1562
|
-
@parent = parent
|
1563
|
-
@reflection = reflection
|
1564
|
-
@aliased_prefix = "t#{ join_dependency.joins.size }"
|
1565
|
-
@aliased_table_name = table_name #.tr('.', '_') # start with the table name, sub out any .'s
|
1566
|
-
@parent_table_name = parent.active_record.table_name
|
1567
|
-
|
1568
|
-
if !parent.table_joins.blank? && parent.table_joins.to_s.downcase =~ %r{join(\s+\w+)?\s+#{aliased_table_name.downcase}\son}
|
1569
|
-
join_dependency.table_aliases[aliased_table_name] += 1
|
1570
|
-
end
|
1571
|
-
|
1572
|
-
unless join_dependency.table_aliases[aliased_table_name].zero?
|
1573
|
-
# if the table name has been used, then use an alias
|
1574
|
-
@aliased_table_name = active_record.connection.table_alias_for "#{pluralize(reflection.name)}_#{parent_table_name}"
|
1575
|
-
table_index = join_dependency.table_aliases[aliased_table_name]
|
1576
|
-
join_dependency.table_aliases[aliased_table_name] += 1
|
1577
|
-
@aliased_table_name = @aliased_table_name[0..active_record.connection.table_alias_length-3] + "_#{table_index+1}" if table_index > 0
|
1578
|
-
else
|
1579
|
-
join_dependency.table_aliases[aliased_table_name] += 1
|
1580
|
-
end
|
1581
|
-
|
1582
|
-
if reflection.macro == :has_and_belongs_to_many || (reflection.macro == :has_many && reflection.options[:through])
|
1583
|
-
@aliased_join_table_name = reflection.macro == :has_and_belongs_to_many ? reflection.options[:join_table] : reflection.through_reflection.klass.table_name
|
1584
|
-
unless join_dependency.table_aliases[aliased_join_table_name].zero?
|
1585
|
-
@aliased_join_table_name = active_record.connection.table_alias_for "#{pluralize(reflection.name)}_#{parent_table_name}_join"
|
1586
|
-
table_index = join_dependency.table_aliases[aliased_join_table_name]
|
1587
|
-
join_dependency.table_aliases[aliased_join_table_name] += 1
|
1588
|
-
@aliased_join_table_name = @aliased_join_table_name[0..active_record.connection.table_alias_length-3] + "_#{table_index+1}" if table_index > 0
|
1589
|
-
else
|
1590
|
-
join_dependency.table_aliases[aliased_join_table_name] += 1
|
1591
|
-
end
|
1592
|
-
end
|
1593
|
-
end
|
1594
|
-
|
1595
|
-
def association_join
|
1596
|
-
connection = reflection.active_record.connection
|
1597
|
-
join = case reflection.macro
|
1598
|
-
when :has_and_belongs_to_many
|
1599
|
-
" #{join_type} %s ON %s.%s = %s.%s " % [
|
1600
|
-
table_alias_for(options[:join_table], aliased_join_table_name),
|
1601
|
-
connection.quote_table_name(aliased_join_table_name),
|
1602
|
-
options[:foreign_key] || reflection.active_record.to_s.foreign_key,
|
1603
|
-
connection.quote_table_name(parent.aliased_table_name),
|
1604
|
-
reflection.active_record.primary_key] +
|
1605
|
-
" #{join_type} %s ON %s.%s = %s.%s " % [
|
1606
|
-
table_name_and_alias,
|
1607
|
-
connection.quote_table_name(aliased_table_name),
|
1608
|
-
klass.primary_key,
|
1609
|
-
connection.quote_table_name(aliased_join_table_name),
|
1610
|
-
options[:association_foreign_key] || klass.to_s.foreign_key
|
1611
|
-
]
|
1612
|
-
when :has_many, :has_one
|
1613
|
-
case
|
1614
|
-
when reflection.macro == :has_many && reflection.options[:through]
|
1615
|
-
through_conditions = through_reflection.options[:conditions] ? "AND #{interpolate_sql(sanitize_sql(through_reflection.options[:conditions]))}" : ''
|
1616
|
-
|
1617
|
-
jt_foreign_key = jt_as_extra = jt_source_extra = jt_sti_extra = nil
|
1618
|
-
first_key = second_key = as_extra = nil
|
1619
|
-
|
1620
|
-
if through_reflection.options[:as] # has_many :through against a polymorphic join
|
1621
|
-
jt_foreign_key = through_reflection.options[:as].to_s + '_id'
|
1622
|
-
jt_as_extra = " AND %s.%s = %s" % [
|
1623
|
-
connection.quote_table_name(aliased_join_table_name),
|
1624
|
-
connection.quote_column_name(through_reflection.options[:as].to_s + '_type'),
|
1625
|
-
klass.quote_value(parent.active_record.base_class.name)
|
1626
|
-
]
|
1627
|
-
else
|
1628
|
-
jt_foreign_key = through_reflection.primary_key_name
|
1629
|
-
end
|
1630
|
-
|
1631
|
-
case source_reflection.macro
|
1632
|
-
when :has_many
|
1633
|
-
if source_reflection.options[:as]
|
1634
|
-
first_key = "#{source_reflection.options[:as]}_id"
|
1635
|
-
second_key = options[:foreign_key] || primary_key
|
1636
|
-
as_extra = " AND %s.%s = %s" % [
|
1637
|
-
connection.quote_table_name(aliased_table_name),
|
1638
|
-
connection.quote_column_name("#{source_reflection.options[:as]}_type"),
|
1639
|
-
klass.quote_value(source_reflection.active_record.base_class.name)
|
1640
|
-
]
|
1641
|
-
else
|
1642
|
-
first_key = through_reflection.klass.base_class.to_s.foreign_key
|
1643
|
-
second_key = options[:foreign_key] || primary_key
|
1644
|
-
end
|
1645
|
-
|
1646
|
-
unless through_reflection.klass.descends_from_active_record?
|
1647
|
-
jt_sti_extra = " AND %s.%s = %s" % [
|
1648
|
-
connection.quote_table_name(aliased_join_table_name),
|
1649
|
-
connection.quote_column_name(through_reflection.active_record.inheritance_column),
|
1650
|
-
through_reflection.klass.quote_value(through_reflection.klass.name.demodulize)]
|
1651
|
-
end
|
1652
|
-
when :belongs_to
|
1653
|
-
first_key = primary_key
|
1654
|
-
if reflection.options[:source_type]
|
1655
|
-
second_key = source_reflection.association_foreign_key
|
1656
|
-
jt_source_extra = " AND %s.%s = %s" % [
|
1657
|
-
connection.quote_table_name(aliased_join_table_name),
|
1658
|
-
connection.quote_column_name(reflection.source_reflection.options[:foreign_type]),
|
1659
|
-
klass.quote_value(reflection.options[:source_type])
|
1660
|
-
]
|
1661
|
-
else
|
1662
|
-
second_key = source_reflection.primary_key_name
|
1663
|
-
end
|
1664
|
-
end
|
1665
|
-
|
1666
|
-
" #{join_type} %s ON (%s.%s = %s.%s%s%s%s) " % [
|
1667
|
-
table_alias_for(through_reflection.klass.table_name, aliased_join_table_name),
|
1668
|
-
connection.quote_table_name(parent.aliased_table_name),
|
1669
|
-
connection.quote_column_name(parent.primary_key),
|
1670
|
-
connection.quote_table_name(aliased_join_table_name),
|
1671
|
-
connection.quote_column_name(jt_foreign_key),
|
1672
|
-
jt_as_extra, jt_source_extra, jt_sti_extra
|
1673
|
-
] +
|
1674
|
-
" #{join_type} %s ON (%s.%s = %s.%s%s) " % [
|
1675
|
-
table_name_and_alias,
|
1676
|
-
connection.quote_table_name(aliased_table_name),
|
1677
|
-
connection.quote_column_name(first_key),
|
1678
|
-
connection.quote_table_name(aliased_join_table_name),
|
1679
|
-
connection.quote_column_name(second_key),
|
1680
|
-
as_extra
|
1681
|
-
]
|
1682
|
-
|
1683
|
-
when reflection.options[:as] && [:has_many, :has_one].include?(reflection.macro)
|
1684
|
-
" #{join_type} %s ON %s.%s = %s.%s AND %s.%s = %s" % [
|
1685
|
-
table_name_and_alias,
|
1686
|
-
connection.quote_table_name(aliased_table_name),
|
1687
|
-
"#{reflection.options[:as]}_id",
|
1688
|
-
connection.quote_table_name(parent.aliased_table_name),
|
1689
|
-
parent.primary_key,
|
1690
|
-
connection.quote_table_name(aliased_table_name),
|
1691
|
-
"#{reflection.options[:as]}_type",
|
1692
|
-
klass.quote_value(parent.active_record.base_class.name)
|
1693
|
-
]
|
1694
|
-
else
|
1695
|
-
foreign_key = options[:foreign_key] || reflection.active_record.name.foreign_key
|
1696
|
-
" #{join_type} %s ON %s.%s = %s.%s " % [
|
1697
|
-
table_name_and_alias,
|
1698
|
-
aliased_table_name,
|
1699
|
-
foreign_key,
|
1700
|
-
parent.aliased_table_name,
|
1701
|
-
parent.primary_key
|
1702
|
-
]
|
1703
|
-
end
|
1704
|
-
when :belongs_to
|
1705
|
-
" #{join_type} %s ON %s.%s = %s.%s " % [
|
1706
|
-
table_name_and_alias,
|
1707
|
-
connection.quote_table_name(aliased_table_name),
|
1708
|
-
reflection.klass.primary_key,
|
1709
|
-
connection.quote_table_name(parent.aliased_table_name),
|
1710
|
-
options[:foreign_key] || klass.to_s.foreign_key
|
1711
|
-
]
|
1712
|
-
else
|
1713
|
-
""
|
1714
|
-
end || ''
|
1715
|
-
join << %(AND %s.%s = %s ) % [
|
1716
|
-
connection.quote_table_name(aliased_table_name),
|
1717
|
-
connection.quote_column_name(klass.inheritance_column),
|
1718
|
-
klass.quote_value(klass.name.demodulize)] unless klass.descends_from_active_record?
|
1719
|
-
|
1720
|
-
[through_reflection, reflection].each do |ref|
|
1721
|
-
join << "AND #{interpolate_sql(sanitize_sql(ref.options[:conditions]))} " if ref && ref.options[:conditions]
|
1722
|
-
end
|
1723
|
-
|
1724
|
-
join
|
1725
|
-
end
|
1726
|
-
|
1727
|
-
protected
|
1728
|
-
|
1729
|
-
def pluralize(table_name)
|
1730
|
-
ActiveRecord::Base.pluralize_table_names ? table_name.to_s.pluralize : table_name
|
1731
|
-
end
|
1732
|
-
|
1733
|
-
def table_alias_for(table_name, table_alias)
|
1734
|
-
"#{reflection.active_record.connection.quote_table_name(table_name)} #{table_alias if table_name != table_alias}".strip
|
1735
|
-
end
|
1736
|
-
|
1737
|
-
def table_name_and_alias
|
1738
|
-
table_alias_for table_name, @aliased_table_name
|
1739
|
-
end
|
1740
|
-
|
1741
|
-
def interpolate_sql(sql)
|
1742
|
-
instance_eval("%@#{sql.gsub('@', '\@')}@")
|
1743
|
-
end
|
1744
|
-
|
1745
|
-
private
|
1746
|
-
|
1747
|
-
def join_type
|
1748
|
-
"LEFT OUTER JOIN"
|
1749
|
-
end
|
1750
|
-
end
|
1751
|
-
end
|
1752
|
-
|
1753
|
-
class InnerJoinDependency < JoinDependency # :nodoc:
|
1754
|
-
protected
|
1755
|
-
def build_join_association(reflection, parent)
|
1756
|
-
InnerJoinAssociation.new(reflection, self, parent)
|
1757
|
-
end
|
1758
|
-
|
1759
|
-
class InnerJoinAssociation < JoinAssociation
|
1760
|
-
private
|
1761
|
-
def join_type
|
1762
|
-
"INNER JOIN"
|
1763
|
-
end
|
1764
|
-
end
|
1765
|
-
end
|
1766
|
-
|
1767
|
-
end
|
1768
|
-
end
|
1769
|
-
end
|