spree 0.0.8 → 0.0.9
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 +47 -0
- data/CONTRIBUTORS +27 -0
- data/INSTALL +27 -0
- data/{starter-app/vendor/plugins/spree/LICENSE → LICENSE} +0 -0
- data/{README.txt → README} +0 -0
- data/Rakefile +11 -4
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/account_controller.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/base_controller.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/categories_controller.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/images_controller.rb +0 -0
- data/app/controllers/admin/inventory_units_controller.rb +27 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/option_types_controller.rb +0 -0
- data/app/controllers/admin/orders_controller.rb +272 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/overview_controller.rb +0 -0
- data/app/controllers/admin/products_controller.rb +169 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/reports_controller.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/admin/users_controller.rb +0 -0
- data/app/controllers/application.rb +24 -0
- data/app/controllers/cart_controller.rb +44 -0
- data/app/controllers/checkout_controller.rb +180 -0
- data/app/controllers/spree/base_controller.rb +47 -0
- data/{starter-app/vendor/plugins/spree/app → app}/controllers/store_controller.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/account_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/base_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/categories_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/option_values_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/orders_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/overview_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/products_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/admin/users_helper.rb +0 -0
- data/app/helpers/application_helper.rb +9 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/cart_helper.rb +0 -0
- data/app/helpers/checkout_helper.rb +14 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/search_helper.rb +0 -0
- data/app/helpers/spree/base_helper.rb +105 -0
- data/{starter-app/vendor/plugins/spree/app → app}/helpers/store_helper.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/address.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/cart.rb +0 -0
- data/app/models/cart_item.rb +29 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/category.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/country.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/credit_card.rb +0 -0
- data/app/models/image.rb +13 -0
- data/app/models/inventory_level.rb +19 -0
- data/app/models/inventory_unit.rb +49 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/line_item.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/option_type.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/option_value.rb +0 -0
- data/app/models/order.rb +88 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/order_mailer.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/order_operation.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/payment.rb +0 -0
- data/app/models/product.rb +64 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/product_option_type.rb +0 -0
- data/{starter-app/app → app}/models/role.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/search_criteria.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/state.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/tax_treatment.rb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/models/txn.rb +0 -0
- data/{starter-app/app → app}/models/user.rb +0 -0
- data/app/models/variant.rb +11 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/account/index.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/account/login.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/account/signup.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/categories/_form.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/categories/edit.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/categories/list.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/categories/new.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/images/new.html.erb +0 -0
- data/app/views/admin/inventory_units/adjust.html.erb +32 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/_form.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/_new_option_value.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/_option_values.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/edit.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/index.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/new.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/option_types/select.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/orders/_address.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/orders/index.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/orders/show.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/overview/index.rhtml +0 -0
- data/app/views/admin/products/_form.rhtml +70 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/products/_menu.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/products/_new_variant.rhtml +0 -0
- data/app/views/admin/products/_option_types.rhtml +42 -0
- data/app/views/admin/products/_variants.rhtml +50 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/products/edit.rhtml +0 -0
- data/app/views/admin/products/index.rhtml +62 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/products/new.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/reports/index.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/reports/sales_total.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/_form.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/_menu.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/edit.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/index.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/new.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/admin/users/show.rhtml +0 -0
- data/app/views/cart/index.rhtml +49 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/_address.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/_address_ro.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/_cart_item.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/_extra.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/addresses.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/cvv.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/empty_cart.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/final_confirmation.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/incomplete.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/checkout/thank_you.rhtml +0 -0
- data/app/views/layouts/admin.rhtml +70 -0
- data/app/views/layouts/application.rhtml +50 -0
- data/app/views/layouts/products.rhtml +19 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/layouts/simple.rhtml +0 -0
- data/app/views/order_mailer/cancel.rhtml +15 -0
- data/app/views/order_mailer/confirm.rhtml +18 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/shared/_images.html.erb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/shared/_order_details.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/shared/_paginate.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/shared/_report_criteria.rhtml +0 -0
- data/{starter-app/app → app}/views/shared/_store_menu.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/shared/_tax_treatments.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/store/_image.html.erb +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/store/_products.rhtml +0 -0
- data/{starter-app/vendor/plugins/spree/app → app}/views/store/_thumbnails.html.erb +0 -0
- data/app/views/store/list.rhtml +14 -0
- data/app/views/store/show.rhtml +60 -0
- data/bin/spree +35 -144
- data/config/boot.rb +148 -0
- data/{starter-app/config → config}/database.yml +0 -0
- data/config/environment.rb +143 -0
- data/config/environments/development.rb +24 -0
- data/{starter-app/config → config}/environments/production.rb +0 -0
- data/{starter-app/config → config}/environments/test.rb +0 -0
- data/config/routes.rb +31 -0
- data/db/development_structure.sql +267 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/001_create_addresses.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/002_create_cart_items.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/003_create_carts.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/004_create_categories.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/005_create_categories_products.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/006_create_line_items.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/007_create_option_values.rb +0 -0
- data/db/migrate/008_create_orders.rb +23 -0
- data/db/migrate/009_create_products.rb +16 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/010_create_txns.rb +0 -0
- data/db/migrate/011_create_variants.rb +12 -0
- data/{starter-app/vendor/plugins/spree/db → db}/migrate/012_create_tax_treatments.rb +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/014_create_countries.rb → db/migrate/013_create_countries.rb} +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/015_create_states.rb → db/migrate/014_create_states.rb} +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/016_create_option_types.rb → db/migrate/015_create_option_types.rb} +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/017_create_product_option_types.rb → db/migrate/016_create_product_option_types.rb} +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/018_create_option_values_variants.rb → db/migrate/017_create_option_values_variants.rb} +0 -0
- data/db/migrate/018_create_images.rb +20 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/020_create_credit_cards.rb → db/migrate/019_create_credit_cards.rb} +0 -0
- data/{starter-app/vendor/plugins/spree/db/migrate/021_create_order_operations.rb → db/migrate/020_create_order_operations.rb} +0 -0
- data/db/migrate/021_create_inventory_units.rb +15 -0
- data/{starter-app/db/migrate/001_create_users.rb → db/migrate/022_create_users.rb} +0 -0
- data/{starter-app/db/migrate/002_create_roles.rb → db/migrate/023_create_roles.rb} +0 -0
- data/{starter-app/db → db}/sample/addresses.yml +0 -0
- data/{starter-app/db → db}/sample/categories.yml +0 -0
- data/{starter-app/db → db}/sample/countries.yml +0 -0
- data/db/sample/credit_cards.yml +12 -0
- data/db/sample/images.yml +300 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_bag.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_baseball_jersey.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_jr_spaghetti.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_mug.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_ringer_tshirt.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_stein.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images/products → db/sample/images}/ror_tote.jpg +0 -0
- data/db/sample/inventory_units.yml +98 -0
- data/db/sample/line_items.yml +25 -0
- data/{starter-app/db → db}/sample/option_types.yml +0 -0
- data/{starter-app/db → db}/sample/option_values.yml +0 -0
- data/db/sample/orders.yml +15 -0
- data/{starter-app/db → db}/sample/product_option_types.yml +0 -0
- data/{starter-app/db → db}/sample/products.yml +0 -0
- data/{starter-app/db → db}/sample/roles.yml +0 -0
- data/{starter-app/db → db}/sample/states.yml +0 -0
- data/{starter-app/db → db}/sample/txns.yml +0 -0
- data/{starter-app/db → db}/sample/users.yml +0 -0
- data/db/sample/variants.yml +61 -0
- data/{starter-app/lib → lib}/authenticated_system.rb +0 -0
- data/{starter-app/lib → lib}/authenticated_test_helper.rb +0 -0
- data/{starter-app/lib → lib}/custom_fixtures.rb +0 -0
- data/{starter-app/vendor/plugins/spree/lib/shipping → lib}/flat_rate.rb +0 -0
- data/{starter-app/vendor/plugins/spree/lib → lib}/format.rb +0 -0
- data/lib/generators/instance/instance_generator.rb +129 -0
- data/lib/generators/instance/templates/databases/mysql.yml +47 -0
- data/lib/generators/instance/templates/databases/postgresql.yml +44 -0
- data/lib/generators/instance/templates/databases/sqlite3.yml +16 -0
- data/lib/generators/instance/templates/databases/sqlserver.yml +20 -0
- data/lib/generators/instance/templates/demo_mongrel_cluster.yml +7 -0
- data/lib/generators/instance/templates/demo_robots.txt +2 -0
- data/lib/generators/instance/templates/instance_boot.rb +148 -0
- data/lib/generators/instance/templates/instance_environment.rb +136 -0
- data/lib/generators/instance/templates/instance_generate +16 -0
- data/lib/generators/instance/templates/instance_rakefile +3 -0
- data/lib/generators/instance/templates/instance_routes.rb +1 -0
- data/{starter-app/lib → lib}/hijacker.rb +0 -0
- data/lib/plugins/extension_patches/init.rb +7 -0
- data/lib/plugins/extension_patches/lib/fixture_loading_extension.rb +80 -0
- data/lib/plugins/extension_patches/lib/mailer_hack.rb +8 -0
- data/lib/plugins/extension_patches/lib/routing_extension.rb +37 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/CHANGELOG +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/README +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/init.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/lib/paginating_find.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/lib/paging_enumerator.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/lib/paging_helper.rb +0 -0
- data/{starter-app → lib/plugins/paginating_find/test_app}/Rakefile +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/app/controllers/application.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/config/boot.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/config/database.yml +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/config/environment.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/config/environments/test.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/config/routes.rb +0 -0
- data/{starter-app → lib/plugins/paginating_find/test_app}/script/breakpointer +0 -0
- data/{starter-app → lib/plugins/paginating_find/test_app}/script/console +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/fixtures/articles.yml +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/fixtures/authors.yml +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/fixtures/edits.yml +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/fixtures/models.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/test_helper.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/unit/abstract_test.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/unit/group_test.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/unit/paginating_find_test.rb +0 -0
- data/{starter-app/vendor → lib}/plugins/paginating_find/test_app/test/unit/paging_enumerator_test.rb +0 -0
- data/{starter-app/lib → lib}/role_requirement_system.rb +0 -0
- data/{starter-app/lib → lib}/role_requirement_test_helper.rb +0 -0
- data/lib/sales_tax.rb +26 -0
- data/lib/spree.rb +22 -0
- data/{starter-app/vendor/plugins/spree/lib/gateway → lib/spree}/bogus_gateway.rb +0 -0
- data/lib/spree/initializer.rb +154 -0
- data/lib/spree/setup.rb +146 -0
- data/lib/tasks/database.rake +35 -0
- data/lib/tasks/environments.rake +11 -0
- data/lib/tasks/instance.rake +26 -0
- data/lib/tasks/release.rake +98 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0001/ror_tote.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0001/ror_tote_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0001/ror_tote_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0001/ror_tote_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0002/ror_tote_back.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0002/ror_tote_back_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0002/ror_tote_back_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0002/ror_tote_back_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0003/ror_bag.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0003/ror_bag_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0003/ror_bag_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0003/ror_bag_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0004/ror_baseball.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0004/ror_baseball_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0004/ror_baseball_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0004/ror_baseball_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0005/ror_baseball_back.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0005/ror_baseball_back_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0005/ror_baseball_back_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0005/ror_baseball_back_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0006/ror_jr_spaghetti.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0006/ror_jr_spaghetti_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0006/ror_jr_spaghetti_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0006/ror_jr_spaghetti_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0007/ror_mug.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0007/ror_mug_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0007/ror_mug_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0007/ror_mug_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0008/ror_mug_back.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0008/ror_mug_back_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0008/ror_mug_back_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0008/ror_mug_back_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0009/ror_ringer.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0009/ror_ringer_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0009/ror_ringer_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0009/ror_ringer_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0010/ror_ringer_back.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0010/ror_ringer_back_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0010/ror_ringer_back_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0010/ror_ringer_back_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0011/ror_stein.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0011/ror_stein_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0011/ror_stein_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0011/ror_stein_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0012/ror_stein_back.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0012/ror_stein_back_mini.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0012/ror_stein_back_product.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/sample/products/0000/0012/ror_stein_back_small.jpeg +0 -0
- data/{starter-app/lib → lib}/tasks/spree_sample_data.rake +0 -0
- data/{starter-app/log → log}/README +0 -0
- data/{starter-app/public → public}/.htaccess +0 -0
- data/{starter-app/public → public}/404.html +0 -0
- data/{starter-app/public → public}/500.html +0 -0
- data/{starter-app/public → public}/dispatch.cgi +0 -0
- data/{starter-app/public → public}/dispatch.fcgi +0 -0
- data/{starter-app/public → public}/dispatch.rb +0 -0
- data/{starter-app/public → public}/favicon.ico +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/amex_cid.gif +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/images/calendar_date_select/calendar.gif +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/creditcard.gif +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/discover_cid.gif +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/master_cid.jpg +0 -0
- data/{starter-app/public → public}/images/rails.png +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/spinner.gif +0 -0
- data/{starter-app/public → public}/images/spree.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/spree/progress.gif +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/spree/spinner.gif +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/spree/spree.jpg +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/images/visa_cid.gif +0 -0
- data/{starter-app/public → public}/javascripts/application.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/calendar_date_select.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/format_american.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/format_euro_24hr.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/format_finnish.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public}/javascripts/calendar_date_select/format_italian.js +0 -0
- data/{starter-app/public → public}/javascripts/controls.js +0 -0
- data/{starter-app/public → public}/javascripts/dragdrop.js +0 -0
- data/{starter-app/public → public}/javascripts/effects.js +0 -0
- data/{starter-app/public → public}/javascripts/prototype.js +0 -0
- data/public/plugin_assets/README +5 -0
- 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 +439 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_american.js +34 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_finnish.js +24 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js +36 -0
- data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_italian.js +24 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/javascripts/calendar_date_select/locale/fi.js +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/stylesheets/calendar_date_select/blue.css +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/stylesheets/calendar_date_select/default.css +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/stylesheets/calendar_date_select/plain.css +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/stylesheets/calendar_date_select/red.css +0 -0
- data/{starter-app/vendor/plugins/calendar_date_select/public → public/plugin_assets/calendar_date_select}/stylesheets/calendar_date_select/silver.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/404.html +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/500.html +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/dispatch.cgi +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/dispatch.fcgi +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/dispatch.rb +0 -0
- data/{starter-app/vendor/plugins/spree/assets → 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/{starter-app/vendor/plugins/attachment_fu/test/fixtures/files → 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/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/application.js +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/controls.js +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/dragdrop.js +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/effects.js +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/lowpro.js +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/javascripts/prototype.js +0 -0
- data/{starter-app/public → public/plugin_assets/spree}/robots.txt +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/cart/_controller.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/checkout/_controller.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/fullscreen.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/orders/_controller.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/products/_controller.css +0 -0
- data/public/plugin_assets/spree/stylesheets/spree-admin.css +355 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/spree.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public/plugin_assets/spree}/stylesheets/store/_controller.css +0 -0
- data/{starter-app/vendor/plugins/spree/assets → public}/robots.txt +0 -0
- data/{starter-app/public → public}/stylesheets/application.css +0 -0
- data/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/public/stylesheets/calendar_date_select/default.css +135 -0
- data/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/public/stylesheets/calendar_date_select/red.css +135 -0
- data/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/public/stylesheets/cart/_controller.css +71 -0
- data/{starter-app/public/stylesheets/checkout/_controller.css → public/stylesheets/checkout/_controller-override.css} +0 -0
- data/public/stylesheets/checkout/_controller.css +31 -0
- data/public/stylesheets/fullscreen.css +63 -0
- data/public/stylesheets/orders/_controller.css +3 -0
- data/public/stylesheets/products/_controller.css +38 -0
- data/public/stylesheets/spree-admin.css +355 -0
- data/public/stylesheets/spree.css +66 -0
- data/public/stylesheets/store/_controller.css +23 -0
- data/{starter-app/script → script}/about +0 -0
- data/{starter-app/vendor/plugins/paginating_find/test_app/script → script}/breakpointer +0 -0
- data/{starter-app/vendor/plugins/paginating_find/test_app/script → script}/console +0 -0
- data/script/destroy +2 -13
- data/script/generate +2 -13
- data/{starter-app/script → script}/performance/benchmarker +0 -0
- data/{starter-app/script → script}/performance/profiler +0 -0
- data/{starter-app/script → script}/plugin +0 -0
- data/{starter-app/script → script}/process/inspector +0 -0
- data/{starter-app/script → script}/process/reaper +0 -0
- data/{starter-app/script → script}/process/spawner +0 -0
- data/{starter-app/script → script}/runner +0 -0
- data/{starter-app/script → script}/server +0 -0
- data/{starter-app/script → script}/spec +0 -0
- data/{starter-app/script → script}/spec_server +0 -0
- data/spec/helpers/spree/base_helper_spec.rb +6 -0
- data/{starter-app/spec → spec}/models/cart_item_spec.rb +0 -0
- data/{starter-app/spec → spec}/models/cart_spec.rb +0 -0
- data/spec/models/inventory_unit_spec.rb +18 -0
- data/{starter-app/spec → spec}/models/line_item_spec.rb +0 -0
- data/spec/models/product_spec.rb +48 -0
- data/{starter-app/spec → spec}/rcov.opts +0 -0
- data/{starter-app/spec → spec}/spec.opts +0 -0
- data/{starter-app/spec → spec}/spec_helper.rb +0 -0
- data/spree.tmproj +444 -0
- data/{starter-app/stories → stories}/all.rb +0 -0
- data/{starter-app/stories → stories}/helper.rb +0 -0
- data/vendor/extensions/bogus_gateway/LICENSE +26 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_list/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_list/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_list/test/list_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/Rakefile +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/lib/active_record/acts/tree.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/acts_as_tree_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/database.yml +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/{starter-app/vendor → vendor}/plugins/acts_as_tree/test/schema.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/CHANGELOG +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/Rakefile +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/amazon_s3.yml.tpl +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/install.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/geometry.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/db_file_backend.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/amazon_s3.yml +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/backends/db_file_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/backends/file_system_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/backends/remote/s3_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/base_attachment_tests.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/basic_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/database.yml +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/extra_attachment_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/fixtures/attachment.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/fixtures/files/fake/rails.png +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/fixtures/files/foo.txt +0 -0
- data/{starter-app/vendor/plugins/spree/assets/images → vendor/plugins/attachment_fu/test/fixtures/files}/rails.png +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/geometry_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/processors/image_science_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/processors/mini_magick_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/processors/rmagick_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/schema.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/test_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/attachment_fu/test/validation_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/CHANGELOG +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/MIT-LICENSE +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/js_test/functional/cds_test.html +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/js_test/prototype.js +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/js_test/test.css +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/js_test/unit/cds_helper_methods.html +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/js_test/unittest.js +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/lib/calendar_date_select.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/lib/includes_helper.rb +0 -0
- data/vendor/plugins/calendar_date_select/public/images/calendar_date_select/calendar.gif +0 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/calendar_date_select.js +439 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_american.js +34 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_finnish.js +24 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_hyphen_ampm.js +36 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_italian.js +24 -0
- data/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/default.css +135 -0
- data/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/red.css +135 -0
- data/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/test/functional/calendar_date_select_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/test/functional/helper_methods_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/calendar_date_select/test/test_helper.rb +0 -0
- data/vendor/plugins/enumerable_constants/README +4 -0
- data/vendor/plugins/enumerable_constants/Rakefile +22 -0
- data/vendor/plugins/enumerable_constants/init.rb +1 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt → vendor/plugins/enumerable_constants/install.rb} +0 -0
- data/vendor/plugins/enumerable_constants/lib/enumerable_constants.rb +204 -0
- data/vendor/plugins/enumerable_constants/tasks/enumerable_constants_tasks.rake +4 -0
- data/vendor/plugins/enumerable_constants/test/enumerable_constants_test.rb +8 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/Rakefile +0 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/lib/in_place_editing.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/lib/in_place_macros_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/in_place_editing/test/in_place_editing_test.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/MIT-LICENSE +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/README +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/Rakefile +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/CHANGES +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +0 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml → vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt} +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/script/spec +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_controller/USAGE +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_model/USAGE +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/init.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/autotest/discover.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/ivar_proxy.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/model_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/lib/spec/rails/version.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/sample_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails/spec_spec.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/rails_suite.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec/spec_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +0 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml → vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml} +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml → vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml} +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +0 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml → vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml} +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.js.rjs +0 -0
- data/{starter-app/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml → vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml} +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/stories/all.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/stories/helper.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/stories/steps/people.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/stories/transactions_should_rollback +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/stories/transactions_should_rollback.rb +0 -0
- data/{starter-app/vendor → vendor}/plugins/rspec_on_rails/tasks/rspec.rake +0 -0
- data/vendor/rails/TAG_rel_2-0-2 +0 -0
- data/vendor/rails/actionmailer/CHANGELOG +325 -0
- data/vendor/rails/actionmailer/MIT-LICENSE +21 -0
- data/vendor/rails/actionmailer/README +145 -0
- data/vendor/rails/actionmailer/Rakefile +96 -0
- data/vendor/rails/actionmailer/install.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer.rb +52 -0
- data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +603 -0
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +111 -0
- data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +19 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +110 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +51 -0
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +59 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +59 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +8 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +14 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +4 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +19 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +245 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +47 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +52 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +39 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +71 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +481 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb +552 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +931 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/info.rb +35 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +540 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/loader.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +462 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +435 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mbox.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +282 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +137 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +1475 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +381 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/port.rb +379 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +142 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +43 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +263 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +279 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/tmail.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +281 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +38 -0
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +9 -0
- data/vendor/rails/actionmailer/lib/actionmailer.rb +1 -0
- data/vendor/rails/actionmailer/test/abstract_unit.rb +49 -0
- data/vendor/rails/actionmailer/test/delivery_method_test.rb +51 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +5 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
- 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 +1 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email +14 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email10 +20 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email12 +32 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email13 +29 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email2 +114 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email3 +70 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email4 +59 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email5 +19 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email6 +20 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email7 +66 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email8 +47 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email9 +28 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +14 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +100 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
- 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 +10 -0
- 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 +2 -0
- 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 +1 -0
- 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 +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +3 -0
- 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 +5 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -0
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +95 -0
- data/vendor/rails/actionmailer/test/mail_render_test.rb +122 -0
- data/vendor/rails/actionmailer/test/mail_service_test.rb +939 -0
- data/vendor/rails/actionmailer/test/quoting_test.rb +111 -0
- data/vendor/rails/actionmailer/test/test_helper_test.rb +117 -0
- data/vendor/rails/actionmailer/test/tmail_test.rb +22 -0
- data/vendor/rails/actionmailer/test/url_test.rb +76 -0
- data/vendor/rails/actionpack/CHANGELOG +4606 -0
- data/vendor/rails/actionpack/MIT-LICENSE +21 -0
- data/vendor/rails/actionpack/README +469 -0
- data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +24 -0
- data/vendor/rails/actionpack/Rakefile +153 -0
- data/vendor/rails/actionpack/install.rb +30 -0
- data/vendor/rails/actionpack/lib/action_controller.rb +79 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions.rb +69 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +39 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +19 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +166 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +143 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +640 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +130 -0
- data/vendor/rails/actionpack/lib/action_controller/base.rb +1295 -0
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +94 -0
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +683 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +106 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +22 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +73 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +23 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +221 -0
- data/vendor/rails/actionpack/lib/action_controller/components.rb +165 -0
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +84 -0
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +195 -0
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +767 -0
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +177 -0
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +204 -0
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +126 -0
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +581 -0
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +326 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +170 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +163 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +20 -0
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +88 -0
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +91 -0
- data/vendor/rails/actionpack/lib/action_controller/request.rb +730 -0
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +132 -0
- data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +138 -0
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +258 -0
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +529 -0
- data/vendor/rails/actionpack/lib/action_controller/response.rb +76 -0
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +1499 -0
- data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +119 -0
- data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +336 -0
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +164 -0
- data/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb +32 -0
- data/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb +35 -0
- data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +98 -0
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +151 -0
- data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +88 -0
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +141 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +26 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +29 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +10 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +53 -0
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +520 -0
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +135 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +68 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +530 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +828 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +105 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +114 -0
- data/vendor/rails/actionpack/lib/action_pack.rb +24 -0
- data/vendor/rails/actionpack/lib/action_pack/version.rb +9 -0
- data/vendor/rails/actionpack/lib/action_view.rb +37 -0
- data/vendor/rails/actionpack/lib/action_view/base.rb +642 -0
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +69 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +255 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +548 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +111 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +31 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +39 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +162 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +689 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +31 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +689 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +425 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +432 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +217 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +963 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +972 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +1120 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +4225 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +179 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +1268 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +20 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +59 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +223 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +199 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +133 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +479 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +524 -0
- data/vendor/rails/actionpack/lib/action_view/partials.rb +200 -0
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +102 -0
- data/vendor/rails/actionpack/lib/action_view/template_handler.rb +17 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +19 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +21 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +14 -0
- data/vendor/rails/actionpack/lib/actionpack.rb +1 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +36 -0
- data/vendor/rails/actionpack/test/action_view_test.rb +44 -0
- data/vendor/rails/actionpack/test/active_record_unit.rb +108 -0
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +142 -0
- data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +74 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +492 -0
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +43 -0
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +682 -0
- data/vendor/rails/actionpack/test/controller/base_test.rb +134 -0
- data/vendor/rails/actionpack/test/controller/benchmark_test.rb +33 -0
- data/vendor/rails/actionpack/test/controller/caching_test.rb +349 -0
- data/vendor/rails/actionpack/test/controller/capture_test.rb +89 -0
- data/vendor/rails/actionpack/test/controller/cgi_test.rb +115 -0
- data/vendor/rails/actionpack/test/controller/components_test.rb +140 -0
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +139 -0
- 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 +135 -0
- data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +41 -0
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +37 -0
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +123 -0
- data/vendor/rails/actionpack/test/controller/fake_controllers.rb +16 -0
- data/vendor/rails/actionpack/test/controller/fake_models.rb +5 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +43 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +856 -0
- data/vendor/rails/actionpack/test/controller/flash_test.rb +146 -0
- data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +47 -0
- data/vendor/rails/actionpack/test/controller/helper_test.rb +206 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +124 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +69 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +250 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +239 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +51 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +125 -0
- data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +54 -0
- data/vendor/rails/actionpack/test/controller/integration_test.rb +255 -0
- data/vendor/rails/actionpack/test/controller/layout_test.rb +239 -0
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +506 -0
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +55 -0
- data/vendor/rails/actionpack/test/controller/new_render_test.rb +832 -0
- data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +98 -0
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +103 -0
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +258 -0
- data/vendor/rails/actionpack/test/controller/render_test.rb +464 -0
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +217 -0
- data/vendor/rails/actionpack/test/controller/request_test.rb +836 -0
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +501 -0
- data/vendor/rails/actionpack/test/controller/resources_test.rb +787 -0
- data/vendor/rails/actionpack/test/controller/routing_test.rb +2203 -0
- data/vendor/rails/actionpack/test/controller/selector_test.rb +628 -0
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +127 -0
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +246 -0
- data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +182 -0
- data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +89 -0
- data/vendor/rails/actionpack/test/controller/session_management_test.rb +156 -0
- data/vendor/rails/actionpack/test/controller/test_test.rb +623 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +246 -0
- data/vendor/rails/actionpack/test/controller/verification_test.rb +253 -0
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +137 -0
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +184 -0
- data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/companies.yml +24 -0
- data/vendor/rails/actionpack/test/fixtures/company.rb +9 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +1 -0
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +43 -0
- data/vendor/rails/actionpack/test/fixtures/developer.rb +9 -0
- data/vendor/rails/actionpack/test/fixtures/developers.yml +21 -0
- data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +13 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +10 -0
- 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 +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/project.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/projects.yml +7 -0
- data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
- 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 +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/replies.yml +15 -0
- data/vendor/rails/actionpack/test/fixtures/reply.rb +6 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_person.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/block_content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +6 -0
- data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
- data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +9 -0
- data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/topic.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/topics.yml +22 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +251 -0
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +438 -0
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +101 -0
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +72 -0
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +193 -0
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +1438 -0
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +56 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +792 -0
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +1296 -0
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +238 -0
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +115 -0
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +93 -0
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +627 -0
- data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +49 -0
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +96 -0
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +80 -0
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +335 -0
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +536 -0
- data/vendor/rails/actionpack/test/testing_sandbox.rb +11 -0
- data/vendor/rails/activerecord/CHANGELOG +5527 -0
- data/vendor/rails/activerecord/MIT-LICENSE +20 -0
- data/vendor/rails/activerecord/README +346 -0
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +33 -0
- data/vendor/rails/activerecord/Rakefile +248 -0
- data/vendor/rails/activerecord/examples/associations.png +0 -0
- data/vendor/rails/activerecord/install.rb +30 -0
- data/vendor/rails/activerecord/lib/active_record.rb +76 -0
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +180 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +1769 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +240 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +160 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +56 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +50 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +164 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +174 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +284 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +96 -0
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +328 -0
- data/vendor/rails/activerecord/lib/active_record/base.rb +2471 -0
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +267 -0
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +341 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +308 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +171 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +87 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +69 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +472 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +306 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +172 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +496 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +847 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +391 -0
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +1034 -0
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +144 -0
- data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +77 -0
- data/vendor/rails/activerecord/lib/active_record/migration.rb +417 -0
- data/vendor/rails/activerecord/lib/active_record/observer.rb +181 -0
- data/vendor/rails/activerecord/lib/active_record/query_cache.rb +21 -0
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +219 -0
- data/vendor/rails/activerecord/lib/active_record/schema.rb +58 -0
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +171 -0
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +98 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +71 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +315 -0
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +41 -0
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +132 -0
- data/vendor/rails/activerecord/lib/active_record/validations.rb +1025 -0
- data/vendor/rails/activerecord/lib/active_record/vendor/db2.rb +362 -0
- data/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb +1214 -0
- data/vendor/rails/activerecord/lib/active_record/version.rb +9 -0
- data/vendor/rails/activerecord/lib/activerecord.rb +1 -0
- data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +72 -0
- data/vendor/rails/activerecord/test/abstract_unit.rb +84 -0
- data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +43 -0
- data/vendor/rails/activerecord/test/adapter_test.rb +105 -0
- data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +95 -0
- data/vendor/rails/activerecord/test/aggregations_test.rb +128 -0
- data/vendor/rails/activerecord/test/all.sh +8 -0
- data/vendor/rails/activerecord/test/ar_schema_test.rb +33 -0
- data/vendor/rails/activerecord/test/association_inheritance_reload.rb +14 -0
- data/vendor/rails/activerecord/test/associations/callbacks_test.rb +147 -0
- data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +110 -0
- data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +145 -0
- data/vendor/rails/activerecord/test/associations/eager_test.rb +442 -0
- data/vendor/rails/activerecord/test/associations/extension_test.rb +47 -0
- data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +88 -0
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +559 -0
- data/vendor/rails/activerecord/test/associations_test.rb +2147 -0
- data/vendor/rails/activerecord/test/attribute_methods_test.rb +146 -0
- data/vendor/rails/activerecord/test/base_test.rb +1745 -0
- data/vendor/rails/activerecord/test/binary_test.rb +32 -0
- data/vendor/rails/activerecord/test/calculations_test.rb +251 -0
- data/vendor/rails/activerecord/test/callbacks_test.rb +400 -0
- data/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb +32 -0
- data/vendor/rails/activerecord/test/column_alias_test.rb +17 -0
- data/vendor/rails/activerecord/test/connection_test_firebird.rb +8 -0
- data/vendor/rails/activerecord/test/connection_test_mysql.rb +30 -0
- data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +26 -0
- data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +21 -0
- data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +23 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +18 -0
- data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +23 -0
- data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +69 -0
- data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +203 -0
- data/vendor/rails/activerecord/test/date_time_test.rb +37 -0
- data/vendor/rails/activerecord/test/default_test_firebird.rb +16 -0
- data/vendor/rails/activerecord/test/defaults_test.rb +67 -0
- data/vendor/rails/activerecord/test/deprecated_finder_test.rb +30 -0
- data/vendor/rails/activerecord/test/finder_test.rb +650 -0
- data/vendor/rails/activerecord/test/fixtures/accounts.yml +28 -0
- 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 +109 -0
- data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/authors.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/auto_id.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char +1 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces +1 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line +3 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes +3 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value +1 -0
- data/vendor/rails/activerecord/test/fixtures/binaries.yml +132 -0
- data/vendor/rails/activerecord/test/fixtures/binary.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/book.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/books.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/categories.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +23 -0
- data/vendor/rails/activerecord/test/fixtures/categorization.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/categorizations.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/category.rb +26 -0
- data/vendor/rails/activerecord/test/fixtures/citation.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/column_name.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/comment.rb +23 -0
- data/vendor/rails/activerecord/test/fixtures/comments.yml +59 -0
- data/vendor/rails/activerecord/test/fixtures/companies.yml +55 -0
- data/vendor/rails/activerecord/test/fixtures/company.rb +114 -0
- data/vendor/rails/activerecord/test/fixtures/company_in_module.rb +59 -0
- data/vendor/rails/activerecord/test/fixtures/computer.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/computers.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/contact.rb +16 -0
- data/vendor/rails/activerecord/test/fixtures/course.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/courses.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/customer.rb +55 -0
- data/vendor/rails/activerecord/test/fixtures/customers.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +33 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +235 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +65 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +310 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql +6 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +33 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +273 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +318 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql +7 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +67 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +330 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql +6 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +44 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +292 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +354 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +11 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +33 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +219 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +35 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +222 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/default.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/developer.rb +72 -0
- data/vendor/rails/activerecord/test/fixtures/developers.yml +21 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller +3 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record +3 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record +2 -0
- data/vendor/rails/activerecord/test/fixtures/edge.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/edges.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/entrant.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/entrants.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/example.log +1 -0
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures/item.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/items.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/joke.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/keyboard.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/legacy_thing.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/matey.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/mateys.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_decimal/1_give_me_big_numbers.rb +15 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_foo.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/minimalistic.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkey.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/mixins.yml +29 -0
- data/vendor/rails/activerecord/test/fixtures/movie.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/movies.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/order.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/parrot.rb +13 -0
- data/vendor/rails/activerecord/test/fixtures/parrots.yml +27 -0
- data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/people.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/person.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/pirate.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/pirates.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/post.rb +59 -0
- data/vendor/rails/activerecord/test/fixtures/posts.yml +48 -0
- data/vendor/rails/activerecord/test/fixtures/project.rb +28 -0
- data/vendor/rails/activerecord/test/fixtures/projects.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/reader.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/readers.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/reply.rb +37 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +8 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/ship.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/ships.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/subject.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/subscriber.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers/first +2 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers/second +2 -0
- data/vendor/rails/activerecord/test/fixtures/tag.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/tagging.rb +10 -0
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +25 -0
- data/vendor/rails/activerecord/test/fixtures/tags.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/task.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/tasks.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/topic.rb +37 -0
- data/vendor/rails/activerecord/test/fixtures/topics.yml +22 -0
- data/vendor/rails/activerecord/test/fixtures/treasure.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/treasures.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures/vertex.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/vertices.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures_test.rb +602 -0
- data/vendor/rails/activerecord/test/inheritance_test.rb +211 -0
- data/vendor/rails/activerecord/test/json_serialization_test.rb +180 -0
- data/vendor/rails/activerecord/test/lifecycle_test.rb +137 -0
- data/vendor/rails/activerecord/test/locking_test.rb +282 -0
- data/vendor/rails/activerecord/test/method_scoping_test.rb +416 -0
- data/vendor/rails/activerecord/test/migration_test.rb +933 -0
- data/vendor/rails/activerecord/test/migration_test_firebird.rb +124 -0
- data/vendor/rails/activerecord/test/mixin_test.rb +95 -0
- data/vendor/rails/activerecord/test/modules_test.rb +34 -0
- data/vendor/rails/activerecord/test/multiple_db_test.rb +60 -0
- data/vendor/rails/activerecord/test/pk_test.rb +101 -0
- data/vendor/rails/activerecord/test/query_cache_test.rb +104 -0
- data/vendor/rails/activerecord/test/readonly_test.rb +107 -0
- data/vendor/rails/activerecord/test/reflection_test.rb +175 -0
- data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +177 -0
- data/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb +75 -0
- data/vendor/rails/activerecord/test/schema_dumper_test.rb +131 -0
- data/vendor/rails/activerecord/test/schema_test_postgresql.rb +64 -0
- data/vendor/rails/activerecord/test/serialization_test.rb +47 -0
- data/vendor/rails/activerecord/test/synonym_test_oracle.rb +17 -0
- data/vendor/rails/activerecord/test/table_name_test_sqlserver.rb +23 -0
- data/vendor/rails/activerecord/test/threaded_connections_test.rb +48 -0
- data/vendor/rails/activerecord/test/transactions_test.rb +281 -0
- data/vendor/rails/activerecord/test/unconnected_test.rb +32 -0
- data/vendor/rails/activerecord/test/validations_test.rb +1395 -0
- data/vendor/rails/activerecord/test/xml_serialization_test.rb +202 -0
- data/vendor/rails/activeresource/CHANGELOG +223 -0
- data/vendor/rails/activeresource/MIT-LICENSE +20 -0
- data/vendor/rails/activeresource/README +165 -0
- data/vendor/rails/activeresource/Rakefile +134 -0
- data/vendor/rails/activeresource/lib/active_resource.rb +47 -0
- data/vendor/rails/activeresource/lib/active_resource/base.rb +872 -0
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +172 -0
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +105 -0
- data/vendor/rails/activeresource/lib/active_resource/formats.rb +14 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +23 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +34 -0
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +147 -0
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +288 -0
- data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
- data/vendor/rails/activeresource/lib/activeresource.rb +1 -0
- data/vendor/rails/activeresource/test/abstract_unit.rb +10 -0
- data/vendor/rails/activeresource/test/authorization_test.rb +82 -0
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +96 -0
- data/vendor/rails/activeresource/test/base/equality_test.rb +43 -0
- data/vendor/rails/activeresource/test/base/load_test.rb +111 -0
- data/vendor/rails/activeresource/test/base_errors_test.rb +48 -0
- data/vendor/rails/activeresource/test/base_test.rb +454 -0
- data/vendor/rails/activeresource/test/connection_test.rb +170 -0
- data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
- data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
- data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
- data/vendor/rails/activeresource/test/format_test.rb +42 -0
- data/vendor/rails/activeresource/test/setter_trap.rb +27 -0
- data/vendor/rails/activesupport/CHANGELOG +986 -0
- data/vendor/rails/activesupport/MIT-LICENSE +20 -0
- data/vendor/rails/activesupport/README +43 -0
- data/vendor/rails/activesupport/Rakefile +84 -0
- data/vendor/rails/activesupport/install.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support.rb +49 -0
- data/vendor/rails/activesupport/lib/active_support/basic_object.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +107 -0
- data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +127 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +94 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +68 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +50 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +48 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +188 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +98 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +77 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +37 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +242 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +102 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +54 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +51 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +70 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +48 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +62 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +17 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +44 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +91 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +58 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +59 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +58 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +153 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +17 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +42 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +62 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +224 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +94 -0
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +540 -0
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +204 -0
- data/vendor/rails/activesupport/lib/active_support/duration.rb +96 -0
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +53 -0
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +282 -0
- data/vendor/rails/activesupport/lib/active_support/json.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +60 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +50 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +141 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb +149 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +564 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +43 -0
- data/vendor/rails/activesupport/lib/active_support/option_merger.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +49 -0
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/testing.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/testing/default.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +181 -0
- data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +38 -0
- data/vendor/rails/activesupport/lib/activesupport.rb +1 -0
- data/vendor/rails/activesupport/test/abstract_unit.rb +20 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +7 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +5 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +4 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +3 -0
- data/vendor/rails/activesupport/test/buffered_logger_test.rb +107 -0
- data/vendor/rails/activesupport/test/clean_logger_test.rb +57 -0
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +250 -0
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +19 -0
- data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +14 -0
- data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +31 -0
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +224 -0
- data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +105 -0
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +46 -0
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +196 -0
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +230 -0
- data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +22 -0
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +21 -0
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +61 -0
- data/vendor/rails/activesupport/test/core_ext/exception_test.rb +64 -0
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +29 -0
- data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +25 -0
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +743 -0
- data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +37 -0
- data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +43 -0
- data/vendor/rails/activesupport/test/core_ext/load_error_tests.rb +16 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +52 -0
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +33 -0
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +58 -0
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +293 -0
- data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +24 -0
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +147 -0
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +242 -0
- data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +9 -0
- data/vendor/rails/activesupport/test/core_ext/proc_test.rb +11 -0
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +63 -0
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +180 -0
- data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +9 -0
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +420 -0
- data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +2 -0
- data/vendor/rails/activesupport/test/dependencies/conflict.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +3 -0
- data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +4 -0
- data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +4 -0
- data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +3 -0
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/service_one.rb +5 -0
- data/vendor/rails/activesupport/test/dependencies/service_two.rb +2 -0
- data/vendor/rails/activesupport/test/dependencies_test.rb +751 -0
- data/vendor/rails/activesupport/test/deprecation_test.rb +151 -0
- data/vendor/rails/activesupport/test/inflector_test.rb +248 -0
- data/vendor/rails/activesupport/test/inflector_test_cases.rb +208 -0
- data/vendor/rails/activesupport/test/json/decoding_test.rb +41 -0
- data/vendor/rails/activesupport/test/json/encoding_test.rb +111 -0
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +173 -0
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +141 -0
- data/vendor/rails/activesupport/test/multibyte_handler_test.rb +367 -0
- data/vendor/rails/activesupport/test/option_merger_test.rb +50 -0
- data/vendor/rails/activesupport/test/ordered_options_test.rb +84 -0
- data/vendor/rails/activesupport/test/test_test.rb +73 -0
- data/vendor/rails/activesupport/test/time_zone_test.rb +98 -0
- data/vendor/rails/activesupport/test/whiny_nil_test.rb +38 -0
- data/vendor/rails/railties/CHANGELOG +1899 -0
- data/vendor/rails/railties/MIT-LICENSE +20 -0
- data/vendor/rails/railties/README +203 -0
- data/vendor/rails/railties/Rakefile +358 -0
- data/vendor/rails/railties/bin/about +3 -0
- data/vendor/rails/railties/bin/console +3 -0
- data/vendor/rails/railties/bin/destroy +3 -0
- data/vendor/rails/railties/bin/generate +3 -0
- data/{starter-app/vendor/plugins/spree/script → vendor/rails/railties/bin}/performance/benchmarker +0 -0
- data/{starter-app/vendor/plugins/spree/script → vendor/rails/railties/bin}/performance/profiler +0 -0
- data/vendor/rails/railties/bin/performance/request +3 -0
- data/vendor/rails/railties/bin/plugin +3 -0
- data/{starter-app/vendor/plugins/spree/script → vendor/rails/railties/bin}/process/inspector +0 -0
- data/{starter-app/vendor/plugins/spree/script → vendor/rails/railties/bin}/process/reaper +0 -0
- data/{starter-app/vendor/plugins/spree/script → vendor/rails/railties/bin}/process/spawner +0 -0
- data/vendor/rails/railties/bin/rails +19 -0
- data/vendor/rails/railties/bin/runner +3 -0
- data/vendor/rails/railties/bin/server +3 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +123 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +9 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +2 -0
- data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +2 -0
- data/vendor/rails/railties/configs/apache.conf +40 -0
- data/vendor/rails/railties/configs/databases/frontbase.yml +28 -0
- data/vendor/rails/railties/configs/databases/mysql.yml +54 -0
- data/vendor/rails/railties/configs/databases/oracle.yml +39 -0
- data/vendor/rails/railties/configs/databases/postgresql.yml +48 -0
- data/vendor/rails/railties/configs/databases/sqlite2.yml +16 -0
- data/vendor/rails/railties/configs/databases/sqlite3.yml +19 -0
- data/vendor/rails/railties/configs/empty.log +0 -0
- data/vendor/rails/railties/configs/initializers/inflections.rb +10 -0
- data/vendor/rails/railties/configs/initializers/mime_types.rb +5 -0
- data/vendor/rails/railties/configs/lighttpd.conf +54 -0
- data/vendor/rails/railties/configs/routes.rb +35 -0
- data/vendor/rails/railties/dispatches/dispatch.fcgi +24 -0
- data/vendor/rails/railties/dispatches/dispatch.rb +10 -0
- data/vendor/rails/railties/dispatches/gateway.cgi +97 -0
- data/vendor/rails/railties/doc/README_FOR_APP +2 -0
- data/vendor/rails/railties/environments/boot.rb +109 -0
- data/vendor/rails/railties/environments/development.rb +18 -0
- data/vendor/rails/railties/environments/environment.rb +59 -0
- data/vendor/rails/railties/environments/production.rb +19 -0
- data/vendor/rails/railties/environments/test.rb +22 -0
- data/{starter-app/vendor/plugins/paginating_find/test_app/Rakefile → vendor/rails/railties/fresh_rakefile} +0 -0
- data/vendor/rails/railties/helpers/application.rb +10 -0
- data/{starter-app/app → vendor/rails/railties}/helpers/application_helper.rb +0 -0
- data/vendor/rails/railties/helpers/test_helper.rb +38 -0
- data/vendor/rails/railties/html/404.html +30 -0
- data/vendor/rails/railties/html/422.html +30 -0
- data/vendor/rails/railties/html/500.html +30 -0
- 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 +277 -0
- data/vendor/rails/railties/html/javascripts/application.js +2 -0
- data/vendor/rails/railties/html/javascripts/controls.js +963 -0
- data/vendor/rails/railties/html/javascripts/dragdrop.js +972 -0
- data/vendor/rails/railties/html/javascripts/effects.js +1120 -0
- data/vendor/rails/railties/html/javascripts/prototype.js +4225 -0
- data/vendor/rails/railties/html/robots.txt +5 -0
- data/vendor/rails/railties/lib/code_statistics.rb +107 -0
- data/vendor/rails/railties/lib/commands.rb +17 -0
- data/vendor/rails/railties/lib/commands/about.rb +2 -0
- data/vendor/rails/railties/lib/commands/console.rb +32 -0
- data/vendor/rails/railties/lib/commands/destroy.rb +6 -0
- data/vendor/rails/railties/lib/commands/generate.rb +6 -0
- data/vendor/rails/railties/lib/commands/ncgi/listener +86 -0
- data/vendor/rails/railties/lib/commands/ncgi/tracker +69 -0
- data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +24 -0
- data/vendor/rails/railties/lib/commands/performance/profiler.rb +50 -0
- data/vendor/rails/railties/lib/commands/performance/request.rb +6 -0
- data/vendor/rails/railties/lib/commands/plugin.rb +923 -0
- data/vendor/rails/railties/lib/commands/process/inspector.rb +68 -0
- data/vendor/rails/railties/lib/commands/process/reaper.rb +149 -0
- data/vendor/rails/railties/lib/commands/process/spawner.rb +219 -0
- data/vendor/rails/railties/lib/commands/process/spinner.rb +57 -0
- data/vendor/rails/railties/lib/commands/runner.rb +48 -0
- data/vendor/rails/railties/lib/commands/server.rb +39 -0
- data/vendor/rails/railties/lib/commands/servers/base.rb +31 -0
- data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +94 -0
- data/vendor/rails/railties/lib/commands/servers/mongrel.rb +69 -0
- data/vendor/rails/railties/lib/commands/servers/webrick.rb +66 -0
- data/vendor/rails/railties/lib/commands/update.rb +4 -0
- data/vendor/rails/railties/lib/console_app.rb +30 -0
- data/vendor/rails/railties/lib/console_sandbox.rb +6 -0
- data/vendor/rails/railties/lib/console_with_helpers.rb +26 -0
- data/vendor/rails/railties/lib/dispatcher.rb +24 -0
- data/vendor/rails/railties/lib/fcgi_handler.rb +223 -0
- data/vendor/rails/railties/lib/initializer.rb +682 -0
- data/vendor/rails/railties/lib/rails/plugin.rb +84 -0
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +150 -0
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +78 -0
- data/vendor/rails/railties/lib/rails/version.rb +9 -0
- data/vendor/rails/railties/lib/rails_generator.rb +43 -0
- data/vendor/rails/railties/lib/rails_generator/base.rb +263 -0
- data/vendor/rails/railties/lib/rails_generator/commands.rb +591 -0
- data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +42 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +9 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +179 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +29 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +37 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +34 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
- 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 +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +21 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
- 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 +29 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +11 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +27 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +45 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +25 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +39 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +22 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +4 -0
- data/{starter-app/vendor/plugins/spree → vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates}/uninstall.rb +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +23 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +74 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +25 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +92 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +85 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +45 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +17 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +74 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +24 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/lookup.rb +244 -0
- data/vendor/rails/railties/lib/rails_generator/manifest.rb +53 -0
- data/vendor/rails/railties/lib/rails_generator/options.rb +143 -0
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +86 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +30 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +12 -0
- data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +160 -0
- data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +46 -0
- data/vendor/rails/railties/lib/rails_generator/spec.rb +44 -0
- data/vendor/rails/railties/lib/railties_path.rb +1 -0
- data/vendor/rails/railties/lib/ruby_version_check.rb +17 -0
- data/vendor/rails/railties/lib/rubyprof_ext.rb +35 -0
- data/vendor/rails/railties/lib/source_annotation_extractor.rb +62 -0
- data/vendor/rails/railties/lib/tasks/annotations.rake +23 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +363 -0
- data/vendor/rails/railties/lib/tasks/documentation.rake +80 -0
- data/vendor/rails/railties/lib/tasks/framework.rake +118 -0
- data/vendor/rails/railties/lib/tasks/log.rake +9 -0
- data/vendor/rails/railties/lib/tasks/misc.rake +10 -0
- data/vendor/rails/railties/lib/tasks/rails.rb +8 -0
- data/vendor/rails/railties/lib/tasks/routes.rake +17 -0
- data/vendor/rails/railties/lib/tasks/statistics.rake +18 -0
- data/vendor/rails/railties/lib/tasks/testing.rake +118 -0
- data/vendor/rails/railties/lib/tasks/tmp.rake +37 -0
- data/vendor/rails/railties/lib/test_help.rb +20 -0
- data/vendor/rails/railties/lib/webrick_server.rb +165 -0
- data/vendor/rails/railties/test/abstract_unit.rb +24 -0
- data/vendor/rails/railties/test/boot_test.rb +179 -0
- data/vendor/rails/railties/test/console_app_test.rb +29 -0
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +265 -0
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -0
- 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 +2 -0
- 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 +7 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +2 -0
- data/vendor/rails/railties/test/generators/generator_test_helper.rb +195 -0
- data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +109 -0
- data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +106 -0
- data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +185 -0
- data/vendor/rails/railties/test/initializer_test.rb +218 -0
- data/vendor/rails/railties/test/mocks/routes.rb +6 -0
- data/vendor/rails/railties/test/plugin_loader_test.rb +140 -0
- data/vendor/rails/railties/test/plugin_locator_test.rb +69 -0
- data/vendor/rails/railties/test/plugin_test.rb +141 -0
- data/vendor/rails/railties/test/plugin_test_helper.rb +29 -0
- data/vendor/rails/railties/test/rails_generator_test.rb +137 -0
- data/vendor/rails/railties/test/rails_info_controller_test.rb +48 -0
- data/vendor/rails/railties/test/rails_info_test.rb +105 -0
- data/vendor/rails/railties/test/secret_key_generation_test.rb +35 -0
- metadata +2304 -693
- data/History.txt +0 -40
- data/License.txt +0 -26
- data/Manifest.txt +0 -671
- data/config/hoe.rb +0 -80
- data/config/requirements.rb +0 -15
- data/lib/spree/version.rb +0 -9
- data/script/txt2html +0 -74
- data/setup.rb +0 -1585
- data/starter-app/README +0 -182
- data/starter-app/app/controllers/application.rb +0 -14
- data/starter-app/app/models/tag.rb +0 -37
- data/starter-app/app/models/tagging.rb +0 -16
- data/starter-app/app/views/layouts/application.rhtml +0 -48
- data/starter-app/config/boot.rb +0 -45
- data/starter-app/config/environment.rb +0 -140
- data/starter-app/config/environments/development.rb +0 -21
- data/starter-app/config/routes.rb +0 -28
- data/starter-app/db/migrate/003_create_tags_and_taggings.rb +0 -28
- data/starter-app/db/migrate/004_spree_to_version_21.rb +0 -9
- data/starter-app/db/sample/credit_cards.yml +0 -12
- data/starter-app/db/sample/images.yml +0 -252
- data/starter-app/db/sample/line_items.yml +0 -25
- data/starter-app/db/sample/orders.yml +0 -15
- data/starter-app/db/sample/skus.yml +0 -28
- data/starter-app/db/sample/taggings.yml +0 -16
- data/starter-app/db/sample/tags.yml +0 -6
- data/starter-app/db/sample/variants.yml +0 -47
- data/starter-app/doc/README_FOR_APP +0 -2
- data/starter-app/lib/tagging_extensions.rb +0 -104
- data/starter-app/public/index.html +0 -277
- data/starter-app/public/stylesheets/cart/_controller.css +0 -4
- data/starter-app/script/destroy +0 -3
- data/starter-app/script/generate +0 -3
- data/starter-app/spec/models/product_spec.rb +0 -29
- data/starter-app/test/fixtures/users.yml +0 -7
- data/starter-app/test/test_helper.rb +0 -28
- data/starter-app/test/unit/user_test.rb +0 -8
- data/starter-app/vendor/plugins/engines/CHANGELOG +0 -258
- data/starter-app/vendor/plugins/engines/MIT-LICENSE +0 -21
- data/starter-app/vendor/plugins/engines/README +0 -63
- data/starter-app/vendor/plugins/engines/Rakefile +0 -32
- data/starter-app/vendor/plugins/engines/about.yml +0 -7
- data/starter-app/vendor/plugins/engines/boot.rb +0 -18
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/USAGE +0 -45
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +0 -79
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +0 -13
- data/starter-app/vendor/plugins/engines/init.rb +0 -2
- data/starter-app/vendor/plugins/engines/lib/engines.rb +0 -169
- data/starter-app/vendor/plugins/engines/lib/engines/assets.rb +0 -38
- data/starter-app/vendor/plugins/engines/lib/engines/plugin.rb +0 -125
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/list.rb +0 -30
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/loader.rb +0 -18
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/locator.rb +0 -11
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/migrator.rb +0 -60
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/action_mailer.rb +0 -85
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +0 -24
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb +0 -119
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +0 -145
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +0 -161
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +0 -11
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +0 -84
- data/starter-app/vendor/plugins/engines/lib/engines/testing.rb +0 -87
- data/starter-app/vendor/plugins/engines/tasks/engines.rake +0 -176
- data/starter-app/vendor/plugins/paginating_find/test_app/db/schema.rb +0 -16
- data/starter-app/vendor/plugins/spree/.rakeTasks +0 -7
- data/starter-app/vendor/plugins/spree/CHANGELOG +0 -1
- data/starter-app/vendor/plugins/spree/README +0 -1
- data/starter-app/vendor/plugins/spree/Rakefile +0 -10
- data/starter-app/vendor/plugins/spree/VERSION +0 -1
- data/starter-app/vendor/plugins/spree/app/controllers/admin/orders_controller.rb +0 -247
- data/starter-app/vendor/plugins/spree/app/controllers/admin/products_controller.rb +0 -207
- data/starter-app/vendor/plugins/spree/app/controllers/cart_controller.rb +0 -39
- data/starter-app/vendor/plugins/spree/app/controllers/checkout_controller.rb +0 -184
- data/starter-app/vendor/plugins/spree/app/controllers/spree/base_controller.rb +0 -47
- data/starter-app/vendor/plugins/spree/app/helpers/checkout_helper.rb +0 -17
- data/starter-app/vendor/plugins/spree/app/helpers/spree/base_helper.rb +0 -101
- data/starter-app/vendor/plugins/spree/app/models/cart_item.rb +0 -26
- data/starter-app/vendor/plugins/spree/app/models/image.rb +0 -12
- data/starter-app/vendor/plugins/spree/app/models/order.rb +0 -87
- data/starter-app/vendor/plugins/spree/app/models/product.rb +0 -58
- data/starter-app/vendor/plugins/spree/app/models/sku.rb +0 -7
- data/starter-app/vendor/plugins/spree/app/models/variant.rb +0 -5
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_form.rhtml +0 -65
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_option_types.rhtml +0 -42
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_variants.rhtml +0 -43
- data/starter-app/vendor/plugins/spree/app/views/admin/products/index.rhtml +0 -65
- data/starter-app/vendor/plugins/spree/app/views/cart/index.rhtml +0 -49
- data/starter-app/vendor/plugins/spree/app/views/layouts/admin.rhtml +0 -69
- data/starter-app/vendor/plugins/spree/app/views/layouts/products.rhtml +0 -20
- data/starter-app/vendor/plugins/spree/app/views/order_mailer/cancel.rhtml +0 -15
- data/starter-app/vendor/plugins/spree/app/views/order_mailer/confirm.rhtml +0 -18
- data/starter-app/vendor/plugins/spree/app/views/store/list.rhtml +0 -15
- data/starter-app/vendor/plugins/spree/app/views/store/show.rhtml +0 -70
- data/starter-app/vendor/plugins/spree/assets/.htaccess +0 -40
- data/starter-app/vendor/plugins/spree/assets/stylesheets/spree-admin.css +0 -348
- data/starter-app/vendor/plugins/spree/db/migrate/008_create_orders.rb +0 -24
- data/starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb +0 -20
- data/starter-app/vendor/plugins/spree/db/migrate/011_create_variants.rb +0 -11
- data/starter-app/vendor/plugins/spree/db/migrate/013_create_skus.rb +0 -13
- data/starter-app/vendor/plugins/spree/db/migrate/019_create_images.rb +0 -19
- data/starter-app/vendor/plugins/spree/init.rb +0 -11
- data/starter-app/vendor/plugins/spree/install.rb +0 -3
- data/starter-app/vendor/plugins/spree/lib/constants/enumerable_constants.rb +0 -207
- data/starter-app/vendor/plugins/spree/lib/tasks/spree_bootstrap.rake +0 -24
- data/starter-app/vendor/plugins/spree/lib/tax/sales_tax.rb +0 -26
- data/starter-app/vendor/plugins/spree/routes.rb +0 -3
- data/starter-app/vendor/plugins/spree/script/about +0 -3
- data/starter-app/vendor/plugins/spree/script/breakpointer +0 -3
- data/starter-app/vendor/plugins/spree/script/console +0 -3
- data/starter-app/vendor/plugins/spree/script/destroy +0 -3
- data/starter-app/vendor/plugins/spree/script/generate +0 -3
- data/starter-app/vendor/plugins/spree/script/plugin +0 -3
- data/starter-app/vendor/plugins/spree/script/runner +0 -3
- data/starter-app/vendor/plugins/spree/script/server +0 -3
- data/starter-app/vendor/plugins/spree/test/fixtures/addresses.yml +0 -29
- data/starter-app/vendor/plugins/spree/test/fixtures/categories.yml +0 -40
- data/starter-app/vendor/plugins/spree/test/fixtures/line_items.yml +0 -32
- data/starter-app/vendor/plugins/spree/test/fixtures/orders.yml +0 -17
- data/starter-app/vendor/plugins/spree/test/fixtures/products.yml +0 -63
- data/starter-app/vendor/plugins/spree/test/fixtures/products_tags.yml +0 -10
- data/starter-app/vendor/plugins/spree/test/fixtures/roles.yml +0 -6
- data/starter-app/vendor/plugins/spree/test/fixtures/roles_users.yml +0 -3
- data/starter-app/vendor/plugins/spree/test/fixtures/skus.yml +0 -5
- data/starter-app/vendor/plugins/spree/test/fixtures/tags.yml +0 -7
- data/starter-app/vendor/plugins/spree/test/fixtures/tax_treatments.yml +0 -7
- data/starter-app/vendor/plugins/spree/test/fixtures/txns.yml +0 -13
- data/starter-app/vendor/plugins/spree/test/fixtures/users.yml +0 -40
- data/starter-app/vendor/plugins/spree/test/fixtures/variations.yml +0 -16
- data/starter-app/vendor/plugins/spree/test/functional/account_controller_test.rb +0 -129
- data/starter-app/vendor/plugins/spree/test/functional/admin/base_controller_test.rb +0 -18
- data/starter-app/vendor/plugins/spree/test/functional/admin/option_groups_controller_test.rb +0 -18
- data/starter-app/vendor/plugins/spree/test/functional/admin/option_values_controller_test.rb +0 -18
- data/starter-app/vendor/plugins/spree/test/functional/admin/orders_controller_test.rb +0 -18
- data/starter-app/vendor/plugins/spree/test/functional/admin/overview_controller_test.rb +0 -18
- data/starter-app/vendor/plugins/spree/test/functional/admin/products_controller_test.rb +0 -125
- data/starter-app/vendor/plugins/spree/test/functional/admin/users_controller_test.rb +0 -58
- data/starter-app/vendor/plugins/spree/test/functional/application_controller_test.rb +0 -30
- data/starter-app/vendor/plugins/spree/test/functional/cart_controller_test.rb +0 -76
- data/starter-app/vendor/plugins/spree/test/functional/checkout_controller_test.rb +0 -20
- data/starter-app/vendor/plugins/spree/test/integration/authentication_test.rb +0 -53
- data/starter-app/vendor/plugins/spree/test/integration/product_admin_test.rb +0 -135
- data/starter-app/vendor/plugins/spree/test/integration/user_stories_test.rb +0 -59
- data/starter-app/vendor/plugins/spree/test/test_helper.rb +0 -45
- data/starter-app/vendor/plugins/spree/test/unit/address_test.rb +0 -10
- data/starter-app/vendor/plugins/spree/test/unit/category_test.rb +0 -52
- data/starter-app/vendor/plugins/spree/test/unit/option_group_test.rb +0 -12
- data/starter-app/vendor/plugins/spree/test/unit/order_test.rb +0 -49
- data/starter-app/vendor/plugins/spree/test/unit/product_test.rb +0 -74
- data/starter-app/vendor/plugins/spree/test/unit/role_test.rb +0 -10
- data/starter-app/vendor/plugins/spree/test/unit/sales_tax_test.rb +0 -46
- data/starter-app/vendor/plugins/spree/test/unit/sku_test.rb +0 -10
- data/starter-app/vendor/plugins/spree/test/unit/tag_test.rb +0 -9
- data/starter-app/vendor/plugins/spree/test/unit/tax_treatment_test.rb +0 -10
- data/starter-app/vendor/plugins/spree/test/unit/txn_test.rb +0 -10
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/website.rake +0 -17
- data/test/test_helper.rb +0 -2
- data/test/test_railscart.rb +0 -11
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'abstract_unit'
|
2
|
+
require 'fixtures/topic'
|
3
|
+
|
4
|
+
class AttributeMethodsTest < Test::Unit::TestCase
|
5
|
+
fixtures :topics
|
6
|
+
def setup
|
7
|
+
@old_suffixes = ActiveRecord::Base.send(:attribute_method_suffixes).dup
|
8
|
+
@target = Class.new(ActiveRecord::Base)
|
9
|
+
@target.table_name = 'topics'
|
10
|
+
end
|
11
|
+
|
12
|
+
def teardown
|
13
|
+
ActiveRecord::Base.send(:attribute_method_suffixes).clear
|
14
|
+
ActiveRecord::Base.attribute_method_suffix *@old_suffixes
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def test_match_attribute_method_query_returns_match_data
|
19
|
+
assert_not_nil md = @target.match_attribute_method?('title=')
|
20
|
+
assert_equal 'title', md.pre_match
|
21
|
+
assert_equal ['='], md.captures
|
22
|
+
|
23
|
+
%w(_hello_world ist! _maybe?).each do |suffix|
|
24
|
+
@target.class_eval "def attribute#{suffix}(*args) args end"
|
25
|
+
@target.attribute_method_suffix suffix
|
26
|
+
|
27
|
+
assert_not_nil md = @target.match_attribute_method?("title#{suffix}")
|
28
|
+
assert_equal 'title', md.pre_match
|
29
|
+
assert_equal [suffix], md.captures
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_declared_attribute_method_affects_respond_to_and_method_missing
|
34
|
+
topic = @target.new(:title => 'Budget')
|
35
|
+
assert topic.respond_to?('title')
|
36
|
+
assert_equal 'Budget', topic.title
|
37
|
+
assert !topic.respond_to?('title_hello_world')
|
38
|
+
assert_raise(NoMethodError) { topic.title_hello_world }
|
39
|
+
|
40
|
+
%w(_hello_world _it! _candidate= able?).each do |suffix|
|
41
|
+
@target.class_eval "def attribute#{suffix}(*args) args end"
|
42
|
+
@target.attribute_method_suffix suffix
|
43
|
+
|
44
|
+
meth = "title#{suffix}"
|
45
|
+
assert topic.respond_to?(meth)
|
46
|
+
assert_equal ['title'], topic.send(meth)
|
47
|
+
assert_equal ['title', 'a'], topic.send(meth, 'a')
|
48
|
+
assert_equal ['title', 1, 2, 3], topic.send(meth, 1, 2, 3)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_should_unserialize_attributes_for_frozen_records
|
53
|
+
myobj = {:value1 => :value2}
|
54
|
+
topic = Topic.create("content" => myobj)
|
55
|
+
topic.freeze
|
56
|
+
assert_equal myobj, topic.content
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_kernel_methods_not_implemented_in_activerecord
|
60
|
+
%w(test name display y).each do |method|
|
61
|
+
assert_equal false, ActiveRecord::Base.instance_method_already_implemented?(method), "##{method} is defined"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_primary_key_implemented
|
66
|
+
assert_equal true, Class.new(ActiveRecord::Base).instance_method_already_implemented?('id')
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_defined_kernel_methods_implemented_in_model
|
70
|
+
%w(test name display y).each do |method|
|
71
|
+
klass = Class.new ActiveRecord::Base
|
72
|
+
klass.class_eval "def #{method}() 'defined #{method}' end"
|
73
|
+
assert_equal true, klass.instance_method_already_implemented?(method), "##{method} is not defined"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_defined_kernel_methods_implemented_in_model_abstract_subclass
|
78
|
+
%w(test name display y).each do |method|
|
79
|
+
abstract = Class.new ActiveRecord::Base
|
80
|
+
abstract.class_eval "def #{method}() 'defined #{method}' end"
|
81
|
+
abstract.abstract_class = true
|
82
|
+
klass = Class.new abstract
|
83
|
+
assert_equal true, klass.instance_method_already_implemented?(method), "##{method} is not defined"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_raises_dangerous_attribute_error_when_defining_activerecord_method_in_model
|
88
|
+
%w(save create_or_update).each do |method|
|
89
|
+
klass = Class.new ActiveRecord::Base
|
90
|
+
klass.class_eval "def #{method}() 'defined #{method}' end"
|
91
|
+
assert_raises ActiveRecord::DangerousAttributeError do
|
92
|
+
klass.instance_method_already_implemented?(method)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_only_time_related_columns_are_meant_to_be_cached_by_default
|
98
|
+
expected = %w(datetime timestamp time date).sort
|
99
|
+
assert_equal expected, ActiveRecord::Base.attribute_types_cached_by_default.map(&:to_s).sort
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_declaring_attributes_as_cached_adds_them_to_the_attributes_cached_by_default
|
103
|
+
default_attributes = Topic.cached_attributes
|
104
|
+
Topic.cache_attributes :replies_count
|
105
|
+
expected = default_attributes + ["replies_count"]
|
106
|
+
assert_equal expected.sort, Topic.cached_attributes.sort
|
107
|
+
Topic.instance_variable_set "@cached_attributes", nil
|
108
|
+
end
|
109
|
+
|
110
|
+
def test_time_related_columns_are_actually_cached
|
111
|
+
column_types = %w(datetime timestamp time date).map(&:to_sym)
|
112
|
+
column_names = Topic.columns.select{|c| column_types.include?(c.type) }.map(&:name)
|
113
|
+
|
114
|
+
assert_equal column_names.sort, Topic.cached_attributes.sort
|
115
|
+
assert_equal time_related_columns_on_topic.sort, Topic.cached_attributes.sort
|
116
|
+
end
|
117
|
+
|
118
|
+
def test_accessing_cached_attributes_caches_the_converted_values_and_nothing_else
|
119
|
+
t = topics(:first)
|
120
|
+
cache = t.instance_variable_get "@attributes_cache"
|
121
|
+
|
122
|
+
assert_not_nil cache
|
123
|
+
assert cache.empty?
|
124
|
+
|
125
|
+
all_columns = Topic.columns.map(&:name)
|
126
|
+
cached_columns = time_related_columns_on_topic
|
127
|
+
uncached_columns = all_columns - cached_columns
|
128
|
+
|
129
|
+
all_columns.each do |attr_name|
|
130
|
+
attribute_gets_cached = Topic.cache_attribute?(attr_name)
|
131
|
+
val = t.send attr_name unless attr_name == "type"
|
132
|
+
if attribute_gets_cached
|
133
|
+
assert cached_columns.include?(attr_name)
|
134
|
+
assert_equal val, cache[attr_name]
|
135
|
+
else
|
136
|
+
assert uncached_columns.include?(attr_name)
|
137
|
+
assert !cache.include?(attr_name)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
private
|
143
|
+
def time_related_columns_on_topic
|
144
|
+
Topic.columns.select{|c| [:time, :date, :datetime, :timestamp].include?(c.type)}.map(&:name)
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,1745 @@
|
|
1
|
+
require 'abstract_unit'
|
2
|
+
require 'fixtures/topic'
|
3
|
+
require 'fixtures/reply'
|
4
|
+
require 'fixtures/company'
|
5
|
+
require 'fixtures/customer'
|
6
|
+
require 'fixtures/developer'
|
7
|
+
require 'fixtures/project'
|
8
|
+
require 'fixtures/default'
|
9
|
+
require 'fixtures/auto_id'
|
10
|
+
require 'fixtures/column_name'
|
11
|
+
require 'fixtures/subscriber'
|
12
|
+
require 'fixtures/keyboard'
|
13
|
+
require 'fixtures/post'
|
14
|
+
require 'fixtures/minimalistic'
|
15
|
+
require 'rexml/document'
|
16
|
+
|
17
|
+
class Category < ActiveRecord::Base; end
|
18
|
+
class Smarts < ActiveRecord::Base; end
|
19
|
+
class CreditCard < ActiveRecord::Base
|
20
|
+
class PinNumber < ActiveRecord::Base
|
21
|
+
class CvvCode < ActiveRecord::Base; end
|
22
|
+
class SubCvvCode < CvvCode; end
|
23
|
+
end
|
24
|
+
class SubPinNumber < PinNumber; end
|
25
|
+
class Brand < Category; end
|
26
|
+
end
|
27
|
+
class MasterCreditCard < ActiveRecord::Base; end
|
28
|
+
class Post < ActiveRecord::Base; end
|
29
|
+
class Computer < ActiveRecord::Base; end
|
30
|
+
class NonExistentTable < ActiveRecord::Base; end
|
31
|
+
class TestOracleDefault < ActiveRecord::Base; end
|
32
|
+
|
33
|
+
class LoosePerson < ActiveRecord::Base
|
34
|
+
self.table_name = 'people'
|
35
|
+
self.abstract_class = true
|
36
|
+
attr_protected :credit_rating, :administrator
|
37
|
+
end
|
38
|
+
|
39
|
+
class LooseDescendant < LoosePerson
|
40
|
+
attr_protected :phone_number
|
41
|
+
end
|
42
|
+
|
43
|
+
class LooseDescendantSecond< LoosePerson
|
44
|
+
attr_protected :phone_number
|
45
|
+
attr_protected :name
|
46
|
+
end
|
47
|
+
|
48
|
+
class TightPerson < ActiveRecord::Base
|
49
|
+
self.table_name = 'people'
|
50
|
+
attr_accessible :name, :address
|
51
|
+
end
|
52
|
+
|
53
|
+
class TightDescendant < TightPerson
|
54
|
+
attr_accessible :phone_number
|
55
|
+
end
|
56
|
+
|
57
|
+
class ReadonlyTitlePost < Post
|
58
|
+
attr_readonly :title
|
59
|
+
end
|
60
|
+
|
61
|
+
class Booleantest < ActiveRecord::Base; end
|
62
|
+
|
63
|
+
class Task < ActiveRecord::Base
|
64
|
+
attr_protected :starting
|
65
|
+
end
|
66
|
+
|
67
|
+
class TopicWithProtectedContentAndAccessibleAuthorName < ActiveRecord::Base
|
68
|
+
self.table_name = 'topics'
|
69
|
+
attr_accessible :author_name
|
70
|
+
attr_protected :content
|
71
|
+
end
|
72
|
+
|
73
|
+
class BasicsTest < Test::Unit::TestCase
|
74
|
+
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics
|
75
|
+
|
76
|
+
def test_table_exists
|
77
|
+
assert !NonExistentTable.table_exists?
|
78
|
+
assert Topic.table_exists?
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_set_attributes
|
82
|
+
topic = Topic.find(1)
|
83
|
+
topic.attributes = { "title" => "Budget", "author_name" => "Jason" }
|
84
|
+
topic.save
|
85
|
+
assert_equal("Budget", topic.title)
|
86
|
+
assert_equal("Jason", topic.author_name)
|
87
|
+
assert_equal(topics(:first).author_email_address, Topic.find(1).author_email_address)
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_integers_as_nil
|
91
|
+
test = AutoId.create('value' => '')
|
92
|
+
assert_nil AutoId.find(test.id).value
|
93
|
+
end
|
94
|
+
|
95
|
+
def test_set_attributes_with_block
|
96
|
+
topic = Topic.new do |t|
|
97
|
+
t.title = "Budget"
|
98
|
+
t.author_name = "Jason"
|
99
|
+
end
|
100
|
+
|
101
|
+
assert_equal("Budget", topic.title)
|
102
|
+
assert_equal("Jason", topic.author_name)
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_respond_to?
|
106
|
+
topic = Topic.find(1)
|
107
|
+
assert topic.respond_to?("title")
|
108
|
+
assert topic.respond_to?("title?")
|
109
|
+
assert topic.respond_to?("title=")
|
110
|
+
assert topic.respond_to?(:title)
|
111
|
+
assert topic.respond_to?(:title?)
|
112
|
+
assert topic.respond_to?(:title=)
|
113
|
+
assert topic.respond_to?("author_name")
|
114
|
+
assert topic.respond_to?("attribute_names")
|
115
|
+
assert !topic.respond_to?("nothingness")
|
116
|
+
assert !topic.respond_to?(:nothingness)
|
117
|
+
end
|
118
|
+
|
119
|
+
def test_array_content
|
120
|
+
topic = Topic.new
|
121
|
+
topic.content = %w( one two three )
|
122
|
+
topic.save
|
123
|
+
|
124
|
+
assert_equal(%w( one two three ), Topic.find(topic.id).content)
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_hash_content
|
128
|
+
topic = Topic.new
|
129
|
+
topic.content = { "one" => 1, "two" => 2 }
|
130
|
+
topic.save
|
131
|
+
|
132
|
+
assert_equal 2, Topic.find(topic.id).content["two"]
|
133
|
+
|
134
|
+
topic.content["three"] = 3
|
135
|
+
topic.save
|
136
|
+
|
137
|
+
assert_equal 3, Topic.find(topic.id).content["three"]
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_update_array_content
|
141
|
+
topic = Topic.new
|
142
|
+
topic.content = %w( one two three )
|
143
|
+
|
144
|
+
topic.content.push "four"
|
145
|
+
assert_equal(%w( one two three four ), topic.content)
|
146
|
+
|
147
|
+
topic.save
|
148
|
+
|
149
|
+
topic = Topic.find(topic.id)
|
150
|
+
topic.content << "five"
|
151
|
+
assert_equal(%w( one two three four five ), topic.content)
|
152
|
+
end
|
153
|
+
|
154
|
+
def test_case_sensitive_attributes_hash
|
155
|
+
# DB2 is not case-sensitive
|
156
|
+
return true if current_adapter?(:DB2Adapter)
|
157
|
+
|
158
|
+
assert_equal @loaded_fixtures['computers']['workstation'].to_hash, Computer.find(:first).attributes
|
159
|
+
end
|
160
|
+
|
161
|
+
def test_create
|
162
|
+
topic = Topic.new
|
163
|
+
topic.title = "New Topic"
|
164
|
+
topic.save
|
165
|
+
topic_reloaded = Topic.find(topic.id)
|
166
|
+
assert_equal("New Topic", topic_reloaded.title)
|
167
|
+
end
|
168
|
+
|
169
|
+
def test_save!
|
170
|
+
topic = Topic.new(:title => "New Topic")
|
171
|
+
assert topic.save!
|
172
|
+
|
173
|
+
reply = Reply.new
|
174
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.save! }
|
175
|
+
end
|
176
|
+
|
177
|
+
def test_save_null_string_attributes
|
178
|
+
topic = Topic.find(1)
|
179
|
+
topic.attributes = { "title" => "null", "author_name" => "null" }
|
180
|
+
topic.save!
|
181
|
+
topic.reload
|
182
|
+
assert_equal("null", topic.title)
|
183
|
+
assert_equal("null", topic.author_name)
|
184
|
+
end
|
185
|
+
|
186
|
+
def test_save_nil_string_attributes
|
187
|
+
topic = Topic.find(1)
|
188
|
+
topic.title = nil
|
189
|
+
topic.save!
|
190
|
+
topic.reload
|
191
|
+
assert_nil topic.title
|
192
|
+
end
|
193
|
+
|
194
|
+
def test_save_for_record_with_only_primary_key
|
195
|
+
minimalistic = Minimalistic.new
|
196
|
+
assert_nothing_raised { minimalistic.save }
|
197
|
+
end
|
198
|
+
|
199
|
+
def test_save_for_record_with_only_primary_key_that_is_provided
|
200
|
+
assert_nothing_raised { Minimalistic.create!(:id => 2) }
|
201
|
+
end
|
202
|
+
|
203
|
+
def test_hashes_not_mangled
|
204
|
+
new_topic = { :title => "New Topic" }
|
205
|
+
new_topic_values = { :title => "AnotherTopic" }
|
206
|
+
|
207
|
+
topic = Topic.new(new_topic)
|
208
|
+
assert_equal new_topic[:title], topic.title
|
209
|
+
|
210
|
+
topic.attributes= new_topic_values
|
211
|
+
assert_equal new_topic_values[:title], topic.title
|
212
|
+
end
|
213
|
+
|
214
|
+
def test_create_many
|
215
|
+
topics = Topic.create([ { "title" => "first" }, { "title" => "second" }])
|
216
|
+
assert_equal 2, topics.size
|
217
|
+
assert_equal "first", topics.first.title
|
218
|
+
end
|
219
|
+
|
220
|
+
def test_create_columns_not_equal_attributes
|
221
|
+
topic = Topic.new
|
222
|
+
topic.title = 'Another New Topic'
|
223
|
+
topic.send :write_attribute, 'does_not_exist', 'test'
|
224
|
+
assert_nothing_raised { topic.save }
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_create_through_factory
|
228
|
+
topic = Topic.create("title" => "New Topic")
|
229
|
+
topicReloaded = Topic.find(topic.id)
|
230
|
+
assert_equal(topic, topicReloaded)
|
231
|
+
end
|
232
|
+
|
233
|
+
def test_update
|
234
|
+
topic = Topic.new
|
235
|
+
topic.title = "Another New Topic"
|
236
|
+
topic.written_on = "2003-12-12 23:23:00"
|
237
|
+
topic.save
|
238
|
+
topicReloaded = Topic.find(topic.id)
|
239
|
+
assert_equal("Another New Topic", topicReloaded.title)
|
240
|
+
|
241
|
+
topicReloaded.title = "Updated topic"
|
242
|
+
topicReloaded.save
|
243
|
+
|
244
|
+
topicReloadedAgain = Topic.find(topic.id)
|
245
|
+
|
246
|
+
assert_equal("Updated topic", topicReloadedAgain.title)
|
247
|
+
end
|
248
|
+
|
249
|
+
def test_update_columns_not_equal_attributes
|
250
|
+
topic = Topic.new
|
251
|
+
topic.title = "Still another topic"
|
252
|
+
topic.save
|
253
|
+
|
254
|
+
topicReloaded = Topic.find(topic.id)
|
255
|
+
topicReloaded.title = "A New Topic"
|
256
|
+
topicReloaded.send :write_attribute, 'does_not_exist', 'test'
|
257
|
+
assert_nothing_raised { topicReloaded.save }
|
258
|
+
end
|
259
|
+
|
260
|
+
def test_update_for_record_with_only_primary_key
|
261
|
+
minimalistic = minimalistics(:first)
|
262
|
+
assert_nothing_raised { minimalistic.save }
|
263
|
+
end
|
264
|
+
|
265
|
+
def test_write_attribute
|
266
|
+
topic = Topic.new
|
267
|
+
topic.send(:write_attribute, :title, "Still another topic")
|
268
|
+
assert_equal "Still another topic", topic.title
|
269
|
+
|
270
|
+
topic.send(:write_attribute, "title", "Still another topic: part 2")
|
271
|
+
assert_equal "Still another topic: part 2", topic.title
|
272
|
+
end
|
273
|
+
|
274
|
+
def test_read_attribute
|
275
|
+
topic = Topic.new
|
276
|
+
topic.title = "Don't change the topic"
|
277
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, "title")
|
278
|
+
assert_equal "Don't change the topic", topic["title"]
|
279
|
+
|
280
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, :title)
|
281
|
+
assert_equal "Don't change the topic", topic[:title]
|
282
|
+
end
|
283
|
+
|
284
|
+
def test_read_attribute_when_false
|
285
|
+
topic = topics(:first)
|
286
|
+
topic.approved = false
|
287
|
+
assert !topic.approved?, "approved should be false"
|
288
|
+
topic.approved = "false"
|
289
|
+
assert !topic.approved?, "approved should be false"
|
290
|
+
end
|
291
|
+
|
292
|
+
def test_read_attribute_when_true
|
293
|
+
topic = topics(:first)
|
294
|
+
topic.approved = true
|
295
|
+
assert topic.approved?, "approved should be true"
|
296
|
+
topic.approved = "true"
|
297
|
+
assert topic.approved?, "approved should be true"
|
298
|
+
end
|
299
|
+
|
300
|
+
def test_read_write_boolean_attribute
|
301
|
+
topic = Topic.new
|
302
|
+
# puts ""
|
303
|
+
# puts "New Topic"
|
304
|
+
# puts topic.inspect
|
305
|
+
topic.approved = "false"
|
306
|
+
# puts "Expecting false"
|
307
|
+
# puts topic.inspect
|
308
|
+
assert !topic.approved?, "approved should be false"
|
309
|
+
topic.approved = "false"
|
310
|
+
# puts "Expecting false"
|
311
|
+
# puts topic.inspect
|
312
|
+
assert !topic.approved?, "approved should be false"
|
313
|
+
topic.approved = "true"
|
314
|
+
# puts "Expecting true"
|
315
|
+
# puts topic.inspect
|
316
|
+
assert topic.approved?, "approved should be true"
|
317
|
+
topic.approved = "true"
|
318
|
+
# puts "Expecting true"
|
319
|
+
# puts topic.inspect
|
320
|
+
assert topic.approved?, "approved should be true"
|
321
|
+
# puts ""
|
322
|
+
end
|
323
|
+
|
324
|
+
def test_query_attribute_string
|
325
|
+
[nil, "", " "].each do |value|
|
326
|
+
assert_equal false, Topic.new(:author_name => value).author_name?
|
327
|
+
end
|
328
|
+
|
329
|
+
assert_equal true, Topic.new(:author_name => "Name").author_name?
|
330
|
+
end
|
331
|
+
|
332
|
+
def test_query_attribute_number
|
333
|
+
[nil, 0, "0"].each do |value|
|
334
|
+
assert_equal false, Developer.new(:salary => value).salary?
|
335
|
+
end
|
336
|
+
|
337
|
+
assert_equal true, Developer.new(:salary => 1).salary?
|
338
|
+
assert_equal true, Developer.new(:salary => "1").salary?
|
339
|
+
end
|
340
|
+
|
341
|
+
def test_query_attribute_boolean
|
342
|
+
[nil, "", false, "false", "f", 0].each do |value|
|
343
|
+
assert_equal false, Topic.new(:approved => value).approved?
|
344
|
+
end
|
345
|
+
|
346
|
+
[true, "true", "1", 1].each do |value|
|
347
|
+
assert_equal true, Topic.new(:approved => value).approved?
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
def test_query_attribute_with_custom_fields
|
352
|
+
object = Company.find_by_sql(<<-SQL).first
|
353
|
+
SELECT c1.*, c2.ruby_type as string_value, c2.rating as int_value
|
354
|
+
FROM companies c1, companies c2
|
355
|
+
WHERE c1.firm_id = c2.id
|
356
|
+
AND c1.id = 2
|
357
|
+
SQL
|
358
|
+
|
359
|
+
assert_equal "Firm", object.string_value
|
360
|
+
assert object.string_value?
|
361
|
+
|
362
|
+
object.string_value = " "
|
363
|
+
assert !object.string_value?
|
364
|
+
|
365
|
+
assert_equal 1, object.int_value.to_i
|
366
|
+
assert object.int_value?
|
367
|
+
|
368
|
+
object.int_value = "0"
|
369
|
+
assert !object.int_value?
|
370
|
+
end
|
371
|
+
|
372
|
+
|
373
|
+
def test_reader_for_invalid_column_names
|
374
|
+
Topic.send(:define_read_method, "mumub-jumbo".to_sym, "mumub-jumbo", nil)
|
375
|
+
assert !Topic.generated_methods.include?("mumub-jumbo")
|
376
|
+
end
|
377
|
+
|
378
|
+
def test_non_attribute_access_and_assignment
|
379
|
+
topic = Topic.new
|
380
|
+
assert !topic.respond_to?("mumbo")
|
381
|
+
assert_raises(NoMethodError) { topic.mumbo }
|
382
|
+
assert_raises(NoMethodError) { topic.mumbo = 5 }
|
383
|
+
end
|
384
|
+
|
385
|
+
def test_preserving_date_objects
|
386
|
+
# SQL Server doesn't have a separate column type just for dates, so all are returned as time
|
387
|
+
return true if current_adapter?(:SQLServerAdapter)
|
388
|
+
|
389
|
+
if current_adapter?(:SybaseAdapter, :OracleAdapter)
|
390
|
+
# Sybase ctlib does not (yet?) support the date type; use datetime instead.
|
391
|
+
# Oracle treats all dates/times as Time.
|
392
|
+
assert_kind_of(
|
393
|
+
Time, Topic.find(1).last_read,
|
394
|
+
"The last_read attribute should be of the Time class"
|
395
|
+
)
|
396
|
+
else
|
397
|
+
assert_kind_of(
|
398
|
+
Date, Topic.find(1).last_read,
|
399
|
+
"The last_read attribute should be of the Date class"
|
400
|
+
)
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
404
|
+
def test_preserving_time_objects
|
405
|
+
assert_kind_of(
|
406
|
+
Time, Topic.find(1).bonus_time,
|
407
|
+
"The bonus_time attribute should be of the Time class"
|
408
|
+
)
|
409
|
+
|
410
|
+
assert_kind_of(
|
411
|
+
Time, Topic.find(1).written_on,
|
412
|
+
"The written_on attribute should be of the Time class"
|
413
|
+
)
|
414
|
+
|
415
|
+
# For adapters which support microsecond resolution.
|
416
|
+
if current_adapter?(:PostgreSQLAdapter)
|
417
|
+
assert_equal 11, Topic.find(1).written_on.sec
|
418
|
+
assert_equal 223300, Topic.find(1).written_on.usec
|
419
|
+
assert_equal 9900, Topic.find(2).written_on.usec
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
def test_custom_mutator
|
424
|
+
topic = Topic.find(1)
|
425
|
+
# This mutator is protected in the class definition
|
426
|
+
topic.send(:approved=, true)
|
427
|
+
assert topic.instance_variable_get("@custom_approved")
|
428
|
+
end
|
429
|
+
|
430
|
+
def test_destroy
|
431
|
+
topic = Topic.find(1)
|
432
|
+
assert_equal topic, topic.destroy, 'topic.destroy did not return self'
|
433
|
+
assert topic.frozen?, 'topic not frozen after destroy'
|
434
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(topic.id) }
|
435
|
+
end
|
436
|
+
|
437
|
+
def test_record_not_found_exception
|
438
|
+
assert_raises(ActiveRecord::RecordNotFound) { topicReloaded = Topic.find(99999) }
|
439
|
+
end
|
440
|
+
|
441
|
+
def test_initialize_with_attributes
|
442
|
+
topic = Topic.new({
|
443
|
+
"title" => "initialized from attributes", "written_on" => "2003-12-12 23:23"
|
444
|
+
})
|
445
|
+
|
446
|
+
assert_equal("initialized from attributes", topic.title)
|
447
|
+
end
|
448
|
+
|
449
|
+
def test_initialize_with_invalid_attribute
|
450
|
+
begin
|
451
|
+
topic = Topic.new({ "title" => "test",
|
452
|
+
"last_read(1i)" => "2005", "last_read(2i)" => "2", "last_read(3i)" => "31"})
|
453
|
+
rescue ActiveRecord::MultiparameterAssignmentErrors => ex
|
454
|
+
assert_equal(1, ex.errors.size)
|
455
|
+
assert_equal("last_read", ex.errors[0].attribute)
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
def test_load
|
460
|
+
topics = Topic.find(:all, :order => 'id')
|
461
|
+
assert_equal(2, topics.size)
|
462
|
+
assert_equal(topics(:first).title, topics.first.title)
|
463
|
+
end
|
464
|
+
|
465
|
+
def test_load_with_condition
|
466
|
+
topics = Topic.find(:all, :conditions => "author_name = 'Mary'")
|
467
|
+
|
468
|
+
assert_equal(1, topics.size)
|
469
|
+
assert_equal(topics(:second).title, topics.first.title)
|
470
|
+
end
|
471
|
+
|
472
|
+
def test_table_name_guesses
|
473
|
+
classes = [Category, Smarts, CreditCard, CreditCard::PinNumber, CreditCard::PinNumber::CvvCode, CreditCard::SubPinNumber, CreditCard::Brand, MasterCreditCard]
|
474
|
+
|
475
|
+
assert_equal "topics", Topic.table_name
|
476
|
+
|
477
|
+
assert_equal "categories", Category.table_name
|
478
|
+
assert_equal "smarts", Smarts.table_name
|
479
|
+
assert_equal "credit_cards", CreditCard.table_name
|
480
|
+
assert_equal "credit_card_pin_numbers", CreditCard::PinNumber.table_name
|
481
|
+
assert_equal "credit_card_pin_number_cvv_codes", CreditCard::PinNumber::CvvCode.table_name
|
482
|
+
assert_equal "credit_card_pin_numbers", CreditCard::SubPinNumber.table_name
|
483
|
+
assert_equal "categories", CreditCard::Brand.table_name
|
484
|
+
assert_equal "master_credit_cards", MasterCreditCard.table_name
|
485
|
+
|
486
|
+
ActiveRecord::Base.pluralize_table_names = false
|
487
|
+
classes.each(&:reset_table_name)
|
488
|
+
|
489
|
+
assert_equal "category", Category.table_name
|
490
|
+
assert_equal "smarts", Smarts.table_name
|
491
|
+
assert_equal "credit_card", CreditCard.table_name
|
492
|
+
assert_equal "credit_card_pin_number", CreditCard::PinNumber.table_name
|
493
|
+
assert_equal "credit_card_pin_number_cvv_code", CreditCard::PinNumber::CvvCode.table_name
|
494
|
+
assert_equal "credit_card_pin_number", CreditCard::SubPinNumber.table_name
|
495
|
+
assert_equal "category", CreditCard::Brand.table_name
|
496
|
+
assert_equal "master_credit_card", MasterCreditCard.table_name
|
497
|
+
|
498
|
+
ActiveRecord::Base.pluralize_table_names = true
|
499
|
+
classes.each(&:reset_table_name)
|
500
|
+
|
501
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
502
|
+
Category.reset_table_name
|
503
|
+
assert_equal "test_categories", Category.table_name
|
504
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
505
|
+
Category.reset_table_name
|
506
|
+
assert_equal "test_categories_test", Category.table_name
|
507
|
+
ActiveRecord::Base.table_name_prefix = ""
|
508
|
+
Category.reset_table_name
|
509
|
+
assert_equal "categories_test", Category.table_name
|
510
|
+
ActiveRecord::Base.table_name_suffix = ""
|
511
|
+
Category.reset_table_name
|
512
|
+
assert_equal "categories", Category.table_name
|
513
|
+
|
514
|
+
ActiveRecord::Base.pluralize_table_names = false
|
515
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
516
|
+
Category.reset_table_name
|
517
|
+
assert_equal "test_category", Category.table_name
|
518
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
519
|
+
Category.reset_table_name
|
520
|
+
assert_equal "test_category_test", Category.table_name
|
521
|
+
ActiveRecord::Base.table_name_prefix = ""
|
522
|
+
Category.reset_table_name
|
523
|
+
assert_equal "category_test", Category.table_name
|
524
|
+
ActiveRecord::Base.table_name_suffix = ""
|
525
|
+
Category.reset_table_name
|
526
|
+
assert_equal "category", Category.table_name
|
527
|
+
|
528
|
+
ActiveRecord::Base.pluralize_table_names = true
|
529
|
+
classes.each(&:reset_table_name)
|
530
|
+
end
|
531
|
+
|
532
|
+
def test_destroy_all
|
533
|
+
assert_equal 2, Topic.count
|
534
|
+
|
535
|
+
Topic.destroy_all "author_name = 'Mary'"
|
536
|
+
assert_equal 1, Topic.count
|
537
|
+
end
|
538
|
+
|
539
|
+
def test_destroy_many
|
540
|
+
assert_equal 3, Client.count
|
541
|
+
Client.destroy([2, 3])
|
542
|
+
assert_equal 1, Client.count
|
543
|
+
end
|
544
|
+
|
545
|
+
def test_delete_many
|
546
|
+
Topic.delete([1, 2])
|
547
|
+
assert_equal 0, Topic.count
|
548
|
+
end
|
549
|
+
|
550
|
+
def test_boolean_attributes
|
551
|
+
assert ! Topic.find(1).approved?
|
552
|
+
assert Topic.find(2).approved?
|
553
|
+
end
|
554
|
+
|
555
|
+
def test_increment_counter
|
556
|
+
Topic.increment_counter("replies_count", 1)
|
557
|
+
assert_equal 2, Topic.find(1).replies_count
|
558
|
+
|
559
|
+
Topic.increment_counter("replies_count", 1)
|
560
|
+
assert_equal 3, Topic.find(1).replies_count
|
561
|
+
end
|
562
|
+
|
563
|
+
def test_decrement_counter
|
564
|
+
Topic.decrement_counter("replies_count", 2)
|
565
|
+
assert_equal -1, Topic.find(2).replies_count
|
566
|
+
|
567
|
+
Topic.decrement_counter("replies_count", 2)
|
568
|
+
assert_equal -2, Topic.find(2).replies_count
|
569
|
+
end
|
570
|
+
|
571
|
+
def test_update_all
|
572
|
+
assert_equal 2, Topic.update_all("content = 'bulk updated!'")
|
573
|
+
assert_equal "bulk updated!", Topic.find(1).content
|
574
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
575
|
+
|
576
|
+
assert_equal 2, Topic.update_all(['content = ?', 'bulk updated again!'])
|
577
|
+
assert_equal "bulk updated again!", Topic.find(1).content
|
578
|
+
assert_equal "bulk updated again!", Topic.find(2).content
|
579
|
+
|
580
|
+
assert_equal 2, Topic.update_all(['content = ?', nil])
|
581
|
+
assert_nil Topic.find(1).content
|
582
|
+
end
|
583
|
+
|
584
|
+
def test_update_all_with_hash
|
585
|
+
assert_not_nil Topic.find(1).last_read
|
586
|
+
assert_equal 2, Topic.update_all(:content => 'bulk updated with hash!', :last_read => nil)
|
587
|
+
assert_equal "bulk updated with hash!", Topic.find(1).content
|
588
|
+
assert_equal "bulk updated with hash!", Topic.find(2).content
|
589
|
+
assert_nil Topic.find(1).last_read
|
590
|
+
assert_nil Topic.find(2).last_read
|
591
|
+
end
|
592
|
+
|
593
|
+
if current_adapter?(:MysqlAdapter)
|
594
|
+
def test_update_all_with_order_and_limit
|
595
|
+
assert_equal 1, Topic.update_all("content = 'bulk updated!'", nil, :limit => 1, :order => 'id DESC')
|
596
|
+
end
|
597
|
+
end
|
598
|
+
|
599
|
+
def test_update_many
|
600
|
+
topic_data = { 1 => { "content" => "1 updated" }, 2 => { "content" => "2 updated" } }
|
601
|
+
updated = Topic.update(topic_data.keys, topic_data.values)
|
602
|
+
|
603
|
+
assert_equal 2, updated.size
|
604
|
+
assert_equal "1 updated", Topic.find(1).content
|
605
|
+
assert_equal "2 updated", Topic.find(2).content
|
606
|
+
end
|
607
|
+
|
608
|
+
def test_delete_all
|
609
|
+
assert_equal 2, Topic.delete_all
|
610
|
+
end
|
611
|
+
|
612
|
+
def test_update_by_condition
|
613
|
+
Topic.update_all "content = 'bulk updated!'", ["approved = ?", true]
|
614
|
+
assert_equal "Have a nice day", Topic.find(1).content
|
615
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
616
|
+
end
|
617
|
+
|
618
|
+
def test_attribute_present
|
619
|
+
t = Topic.new
|
620
|
+
t.title = "hello there!"
|
621
|
+
t.written_on = Time.now
|
622
|
+
assert t.attribute_present?("title")
|
623
|
+
assert t.attribute_present?("written_on")
|
624
|
+
assert !t.attribute_present?("content")
|
625
|
+
end
|
626
|
+
|
627
|
+
def test_attribute_keys_on_new_instance
|
628
|
+
t = Topic.new
|
629
|
+
assert_equal nil, t.title, "The topics table has a title column, so it should be nil"
|
630
|
+
assert_raise(NoMethodError) { t.title2 }
|
631
|
+
end
|
632
|
+
|
633
|
+
def test_class_name
|
634
|
+
assert_equal "Firm", ActiveRecord::Base.class_name("firms")
|
635
|
+
assert_equal "Category", ActiveRecord::Base.class_name("categories")
|
636
|
+
assert_equal "AccountHolder", ActiveRecord::Base.class_name("account_holder")
|
637
|
+
|
638
|
+
ActiveRecord::Base.pluralize_table_names = false
|
639
|
+
assert_equal "Firms", ActiveRecord::Base.class_name( "firms" )
|
640
|
+
ActiveRecord::Base.pluralize_table_names = true
|
641
|
+
|
642
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
643
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms" )
|
644
|
+
ActiveRecord::Base.table_name_suffix = "_tests"
|
645
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms_tests" )
|
646
|
+
ActiveRecord::Base.table_name_prefix = ""
|
647
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms_tests" )
|
648
|
+
ActiveRecord::Base.table_name_suffix = ""
|
649
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms" )
|
650
|
+
end
|
651
|
+
|
652
|
+
def test_null_fields
|
653
|
+
assert_nil Topic.find(1).parent_id
|
654
|
+
assert_nil Topic.create("title" => "Hey you").parent_id
|
655
|
+
end
|
656
|
+
|
657
|
+
def test_default_values
|
658
|
+
topic = Topic.new
|
659
|
+
assert topic.approved?
|
660
|
+
assert_nil topic.written_on
|
661
|
+
assert_nil topic.bonus_time
|
662
|
+
assert_nil topic.last_read
|
663
|
+
|
664
|
+
topic.save
|
665
|
+
|
666
|
+
topic = Topic.find(topic.id)
|
667
|
+
assert topic.approved?
|
668
|
+
assert_nil topic.last_read
|
669
|
+
|
670
|
+
# Oracle has some funky default handling, so it requires a bit of
|
671
|
+
# extra testing. See ticket #2788.
|
672
|
+
if current_adapter?(:OracleAdapter)
|
673
|
+
test = TestOracleDefault.new
|
674
|
+
assert_equal "X", test.test_char
|
675
|
+
assert_equal "hello", test.test_string
|
676
|
+
assert_equal 3, test.test_int
|
677
|
+
end
|
678
|
+
end
|
679
|
+
|
680
|
+
# Oracle, SQLServer, and Sybase do not have a TIME datatype.
|
681
|
+
unless current_adapter?(:SQLServerAdapter, :OracleAdapter, :SybaseAdapter)
|
682
|
+
def test_utc_as_time_zone
|
683
|
+
Topic.default_timezone = :utc
|
684
|
+
attributes = { "bonus_time" => "5:42:00AM" }
|
685
|
+
topic = Topic.find(1)
|
686
|
+
topic.attributes = attributes
|
687
|
+
assert_equal Time.utc(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
688
|
+
Topic.default_timezone = :local
|
689
|
+
end
|
690
|
+
|
691
|
+
def test_utc_as_time_zone_and_new
|
692
|
+
Topic.default_timezone = :utc
|
693
|
+
attributes = { "bonus_time(1i)"=>"2000",
|
694
|
+
"bonus_time(2i)"=>"1",
|
695
|
+
"bonus_time(3i)"=>"1",
|
696
|
+
"bonus_time(4i)"=>"10",
|
697
|
+
"bonus_time(5i)"=>"35",
|
698
|
+
"bonus_time(6i)"=>"50" }
|
699
|
+
topic = Topic.new(attributes)
|
700
|
+
assert_equal Time.utc(2000, 1, 1, 10, 35, 50), topic.bonus_time
|
701
|
+
Topic.default_timezone = :local
|
702
|
+
end
|
703
|
+
end
|
704
|
+
|
705
|
+
def test_default_values_on_empty_strings
|
706
|
+
topic = Topic.new
|
707
|
+
topic.approved = nil
|
708
|
+
topic.last_read = nil
|
709
|
+
|
710
|
+
topic.save
|
711
|
+
|
712
|
+
topic = Topic.find(topic.id)
|
713
|
+
assert_nil topic.last_read
|
714
|
+
|
715
|
+
# Sybase adapter does not allow nulls in boolean columns
|
716
|
+
if current_adapter?(:SybaseAdapter)
|
717
|
+
assert topic.approved == false
|
718
|
+
else
|
719
|
+
assert_nil topic.approved
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
def test_equality
|
724
|
+
assert_equal Topic.find(1), Topic.find(2).topic
|
725
|
+
end
|
726
|
+
|
727
|
+
def test_equality_of_new_records
|
728
|
+
assert_not_equal Topic.new, Topic.new
|
729
|
+
end
|
730
|
+
|
731
|
+
def test_hashing
|
732
|
+
assert_equal [ Topic.find(1) ], [ Topic.find(2).topic ] & [ Topic.find(1) ]
|
733
|
+
end
|
734
|
+
|
735
|
+
def test_destroy_new_record
|
736
|
+
client = Client.new
|
737
|
+
client.destroy
|
738
|
+
assert client.frozen?
|
739
|
+
end
|
740
|
+
|
741
|
+
def test_destroy_record_with_associations
|
742
|
+
client = Client.find(3)
|
743
|
+
client.destroy
|
744
|
+
assert client.frozen?
|
745
|
+
assert_kind_of Firm, client.firm
|
746
|
+
assert_raises(TypeError) { client.name = "something else" }
|
747
|
+
end
|
748
|
+
|
749
|
+
def test_update_attribute
|
750
|
+
assert !Topic.find(1).approved?
|
751
|
+
Topic.find(1).update_attribute("approved", true)
|
752
|
+
assert Topic.find(1).approved?
|
753
|
+
|
754
|
+
Topic.find(1).update_attribute(:approved, false)
|
755
|
+
assert !Topic.find(1).approved?
|
756
|
+
end
|
757
|
+
|
758
|
+
def test_update_attributes
|
759
|
+
topic = Topic.find(1)
|
760
|
+
assert !topic.approved?
|
761
|
+
assert_equal "The First Topic", topic.title
|
762
|
+
|
763
|
+
topic.update_attributes("approved" => true, "title" => "The First Topic Updated")
|
764
|
+
topic.reload
|
765
|
+
assert topic.approved?
|
766
|
+
assert_equal "The First Topic Updated", topic.title
|
767
|
+
|
768
|
+
topic.update_attributes(:approved => false, :title => "The First Topic")
|
769
|
+
topic.reload
|
770
|
+
assert !topic.approved?
|
771
|
+
assert_equal "The First Topic", topic.title
|
772
|
+
end
|
773
|
+
|
774
|
+
def test_update_attributes!
|
775
|
+
reply = Reply.find(2)
|
776
|
+
assert_equal "The Second Topic's of the day", reply.title
|
777
|
+
assert_equal "Have a nice day", reply.content
|
778
|
+
|
779
|
+
reply.update_attributes!("title" => "The Second Topic's of the day updated", "content" => "Have a nice evening")
|
780
|
+
reply.reload
|
781
|
+
assert_equal "The Second Topic's of the day updated", reply.title
|
782
|
+
assert_equal "Have a nice evening", reply.content
|
783
|
+
|
784
|
+
reply.update_attributes!(:title => "The Second Topic's of the day", :content => "Have a nice day")
|
785
|
+
reply.reload
|
786
|
+
assert_equal "The Second Topic's of the day", reply.title
|
787
|
+
assert_equal "Have a nice day", reply.content
|
788
|
+
|
789
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.update_attributes!(:title => nil, :content => "Have a nice evening") }
|
790
|
+
end
|
791
|
+
|
792
|
+
def test_mass_assignment_should_raise_exception_if_accessible_and_protected_attribute_writers_are_both_used
|
793
|
+
topic = TopicWithProtectedContentAndAccessibleAuthorName.new
|
794
|
+
assert_raises(RuntimeError) { topic.attributes = { "author_name" => "me" } }
|
795
|
+
assert_raises(RuntimeError) { topic.attributes = { "content" => "stuff" } }
|
796
|
+
end
|
797
|
+
|
798
|
+
def test_mass_assignment_protection
|
799
|
+
firm = Firm.new
|
800
|
+
firm.attributes = { "name" => "Next Angle", "rating" => 5 }
|
801
|
+
assert_equal 1, firm.rating
|
802
|
+
end
|
803
|
+
|
804
|
+
def test_mass_assignment_protection_against_class_attribute_writers
|
805
|
+
[:logger, :configurations, :primary_key_prefix_type, :table_name_prefix, :table_name_suffix, :pluralize_table_names, :colorize_logging,
|
806
|
+
:default_timezone, :allow_concurrency, :schema_format, :verification_timeout, :lock_optimistically, :record_timestamps].each do |method|
|
807
|
+
assert Task.respond_to?(method)
|
808
|
+
assert Task.respond_to?("#{method}=")
|
809
|
+
assert Task.new.respond_to?(method)
|
810
|
+
assert !Task.new.respond_to?("#{method}=")
|
811
|
+
end
|
812
|
+
end
|
813
|
+
|
814
|
+
def test_customized_primary_key_remains_protected
|
815
|
+
subscriber = Subscriber.new(:nick => 'webster123', :name => 'nice try')
|
816
|
+
assert_nil subscriber.id
|
817
|
+
|
818
|
+
keyboard = Keyboard.new(:key_number => 9, :name => 'nice try')
|
819
|
+
assert_nil keyboard.id
|
820
|
+
end
|
821
|
+
|
822
|
+
def test_customized_primary_key_remains_protected_when_referred_to_as_id
|
823
|
+
subscriber = Subscriber.new(:id => 'webster123', :name => 'nice try')
|
824
|
+
assert_nil subscriber.id
|
825
|
+
|
826
|
+
keyboard = Keyboard.new(:id => 9, :name => 'nice try')
|
827
|
+
assert_nil keyboard.id
|
828
|
+
end
|
829
|
+
|
830
|
+
def test_mass_assignment_protection_on_defaults
|
831
|
+
firm = Firm.new
|
832
|
+
firm.attributes = { "id" => 5, "type" => "Client" }
|
833
|
+
assert_nil firm.id
|
834
|
+
assert_equal "Firm", firm[:type]
|
835
|
+
end
|
836
|
+
|
837
|
+
def test_mass_assignment_accessible
|
838
|
+
reply = Reply.new("title" => "hello", "content" => "world", "approved" => true)
|
839
|
+
reply.save
|
840
|
+
|
841
|
+
assert reply.approved?
|
842
|
+
|
843
|
+
reply.approved = false
|
844
|
+
reply.save
|
845
|
+
|
846
|
+
assert !reply.approved?
|
847
|
+
end
|
848
|
+
|
849
|
+
def test_mass_assignment_protection_inheritance
|
850
|
+
assert_nil LoosePerson.accessible_attributes
|
851
|
+
assert_equal Set.new([ 'credit_rating', 'administrator' ]), LoosePerson.protected_attributes
|
852
|
+
|
853
|
+
assert_nil LooseDescendant.accessible_attributes
|
854
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number' ]), LooseDescendant.protected_attributes
|
855
|
+
|
856
|
+
assert_nil LooseDescendantSecond.accessible_attributes
|
857
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number', 'name' ]), LooseDescendantSecond.protected_attributes, 'Running attr_protected twice in one class should merge the protections'
|
858
|
+
|
859
|
+
assert_nil TightPerson.protected_attributes
|
860
|
+
assert_equal Set.new([ 'name', 'address' ]), TightPerson.accessible_attributes
|
861
|
+
|
862
|
+
assert_nil TightDescendant.protected_attributes
|
863
|
+
assert_equal Set.new([ 'name', 'address', 'phone_number' ]), TightDescendant.accessible_attributes
|
864
|
+
end
|
865
|
+
|
866
|
+
def test_readonly_attributes
|
867
|
+
assert_equal Set.new([ 'title' ]), ReadonlyTitlePost.readonly_attributes
|
868
|
+
|
869
|
+
post = ReadonlyTitlePost.create(:title => "cannot change this", :body => "changeable")
|
870
|
+
post.reload
|
871
|
+
assert_equal "cannot change this", post.title
|
872
|
+
|
873
|
+
post.update_attributes(:title => "try to change", :body => "changed")
|
874
|
+
post.reload
|
875
|
+
assert_equal "cannot change this", post.title
|
876
|
+
assert_equal "changed", post.body
|
877
|
+
end
|
878
|
+
|
879
|
+
def test_multiparameter_attributes_on_date
|
880
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "24" }
|
881
|
+
topic = Topic.find(1)
|
882
|
+
topic.attributes = attributes
|
883
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
884
|
+
# treats dates/times the same
|
885
|
+
assert_date_from_db Date.new(2004, 6, 24), topic.last_read.to_date
|
886
|
+
end
|
887
|
+
|
888
|
+
def test_multiparameter_attributes_on_date_with_empty_date
|
889
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "" }
|
890
|
+
topic = Topic.find(1)
|
891
|
+
topic.attributes = attributes
|
892
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
893
|
+
# treats dates/times the same
|
894
|
+
assert_date_from_db Date.new(2004, 6, 1), topic.last_read.to_date
|
895
|
+
end
|
896
|
+
|
897
|
+
def test_multiparameter_attributes_on_date_with_all_empty
|
898
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "", "last_read(3i)" => "" }
|
899
|
+
topic = Topic.find(1)
|
900
|
+
topic.attributes = attributes
|
901
|
+
assert_nil topic.last_read
|
902
|
+
end
|
903
|
+
|
904
|
+
def test_multiparameter_attributes_on_time
|
905
|
+
attributes = {
|
906
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
907
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
908
|
+
}
|
909
|
+
topic = Topic.find(1)
|
910
|
+
topic.attributes = attributes
|
911
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
912
|
+
end
|
913
|
+
|
914
|
+
def test_multiparameter_attributes_on_time_with_empty_seconds
|
915
|
+
attributes = {
|
916
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
917
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => ""
|
918
|
+
}
|
919
|
+
topic = Topic.find(1)
|
920
|
+
topic.attributes = attributes
|
921
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
922
|
+
end
|
923
|
+
|
924
|
+
def test_multiparameter_mass_assignment_protector
|
925
|
+
task = Task.new
|
926
|
+
time = Time.mktime(2000, 1, 1, 1)
|
927
|
+
task.starting = time
|
928
|
+
attributes = { "starting(1i)" => "2004", "starting(2i)" => "6", "starting(3i)" => "24" }
|
929
|
+
task.attributes = attributes
|
930
|
+
assert_equal time, task.starting
|
931
|
+
end
|
932
|
+
|
933
|
+
def test_multiparameter_assignment_of_aggregation
|
934
|
+
customer = Customer.new
|
935
|
+
address = Address.new("The Street", "The City", "The Country")
|
936
|
+
attributes = { "address(1)" => address.street, "address(2)" => address.city, "address(3)" => address.country }
|
937
|
+
customer.attributes = attributes
|
938
|
+
assert_equal address, customer.address
|
939
|
+
end
|
940
|
+
|
941
|
+
def test_attributes_on_dummy_time
|
942
|
+
# Oracle, SQL Server, and Sybase do not have a TIME datatype.
|
943
|
+
return true if current_adapter?(:SQLServerAdapter, :OracleAdapter, :SybaseAdapter)
|
944
|
+
|
945
|
+
attributes = {
|
946
|
+
"bonus_time" => "5:42:00AM"
|
947
|
+
}
|
948
|
+
topic = Topic.find(1)
|
949
|
+
topic.attributes = attributes
|
950
|
+
assert_equal Time.local(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
951
|
+
end
|
952
|
+
|
953
|
+
def test_boolean
|
954
|
+
b_false = Booleantest.create({ "value" => false })
|
955
|
+
false_id = b_false.id
|
956
|
+
b_true = Booleantest.create({ "value" => true })
|
957
|
+
true_id = b_true.id
|
958
|
+
|
959
|
+
b_false = Booleantest.find(false_id)
|
960
|
+
assert !b_false.value?
|
961
|
+
b_true = Booleantest.find(true_id)
|
962
|
+
assert b_true.value?
|
963
|
+
end
|
964
|
+
|
965
|
+
def test_boolean_cast_from_string
|
966
|
+
b_false = Booleantest.create({ "value" => "0" })
|
967
|
+
false_id = b_false.id
|
968
|
+
b_true = Booleantest.create({ "value" => "1" })
|
969
|
+
true_id = b_true.id
|
970
|
+
|
971
|
+
b_false = Booleantest.find(false_id)
|
972
|
+
assert !b_false.value?
|
973
|
+
b_true = Booleantest.find(true_id)
|
974
|
+
assert b_true.value?
|
975
|
+
end
|
976
|
+
|
977
|
+
def test_clone
|
978
|
+
topic = Topic.find(1)
|
979
|
+
cloned_topic = nil
|
980
|
+
assert_nothing_raised { cloned_topic = topic.clone }
|
981
|
+
assert_equal topic.title, cloned_topic.title
|
982
|
+
assert cloned_topic.new_record?
|
983
|
+
|
984
|
+
# test if the attributes have been cloned
|
985
|
+
topic.title = "a"
|
986
|
+
cloned_topic.title = "b"
|
987
|
+
assert_equal "a", topic.title
|
988
|
+
assert_equal "b", cloned_topic.title
|
989
|
+
|
990
|
+
# test if the attribute values have been cloned
|
991
|
+
topic.title = {"a" => "b"}
|
992
|
+
cloned_topic = topic.clone
|
993
|
+
cloned_topic.title["a"] = "c"
|
994
|
+
assert_equal "b", topic.title["a"]
|
995
|
+
|
996
|
+
#test if attributes set as part of after_initialize are cloned correctly
|
997
|
+
assert_equal topic.author_email_address, cloned_topic.author_email_address
|
998
|
+
|
999
|
+
# test if saved clone object differs from original
|
1000
|
+
cloned_topic.save
|
1001
|
+
assert !cloned_topic.new_record?
|
1002
|
+
assert cloned_topic.id != topic.id
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
def test_clone_with_aggregate_of_same_name_as_attribute
|
1006
|
+
dev = DeveloperWithAggregate.find(1)
|
1007
|
+
assert_kind_of DeveloperSalary, dev.salary
|
1008
|
+
|
1009
|
+
clone = nil
|
1010
|
+
assert_nothing_raised { clone = dev.clone }
|
1011
|
+
assert_kind_of DeveloperSalary, clone.salary
|
1012
|
+
assert_equal dev.salary.amount, clone.salary.amount
|
1013
|
+
assert clone.new_record?
|
1014
|
+
|
1015
|
+
# test if the attributes have been cloned
|
1016
|
+
original_amount = clone.salary.amount
|
1017
|
+
dev.salary.amount = 1
|
1018
|
+
assert_equal original_amount, clone.salary.amount
|
1019
|
+
|
1020
|
+
assert clone.save
|
1021
|
+
assert !clone.new_record?
|
1022
|
+
assert clone.id != dev.id
|
1023
|
+
end
|
1024
|
+
|
1025
|
+
def test_clone_preserves_subtype
|
1026
|
+
clone = nil
|
1027
|
+
assert_nothing_raised { clone = Company.find(3).clone }
|
1028
|
+
assert_kind_of Client, clone
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
def test_bignum
|
1032
|
+
company = Company.find(1)
|
1033
|
+
company.rating = 2147483647
|
1034
|
+
company.save
|
1035
|
+
company = Company.find(1)
|
1036
|
+
assert_equal 2147483647, company.rating
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
# TODO: extend defaults tests to other databases!
|
1040
|
+
if current_adapter?(:PostgreSQLAdapter)
|
1041
|
+
def test_default
|
1042
|
+
default = Default.new
|
1043
|
+
|
1044
|
+
# fixed dates / times
|
1045
|
+
assert_equal Date.new(2004, 1, 1), default.fixed_date
|
1046
|
+
assert_equal Time.local(2004, 1,1,0,0,0,0), default.fixed_time
|
1047
|
+
|
1048
|
+
# char types
|
1049
|
+
assert_equal 'Y', default.char1
|
1050
|
+
assert_equal 'a varchar field', default.char2
|
1051
|
+
assert_equal 'a text field', default.char3
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
class Geometric < ActiveRecord::Base; end
|
1055
|
+
def test_geometric_content
|
1056
|
+
|
1057
|
+
# accepted format notes:
|
1058
|
+
# ()'s aren't required
|
1059
|
+
# values can be a mix of float or integer
|
1060
|
+
|
1061
|
+
g = Geometric.new(
|
1062
|
+
:a_point => '(5.0, 6.1)',
|
1063
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1064
|
+
:a_line_segment => '(2.0, 3), (5.5, 7.0)',
|
1065
|
+
:a_box => '2.0, 3, 5.5, 7.0',
|
1066
|
+
:a_path => '[(2.0, 3), (5.5, 7.0), (8.5, 11.0)]', # [ ] is an open path
|
1067
|
+
:a_polygon => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))',
|
1068
|
+
:a_circle => '<(5.3, 10.4), 2>'
|
1069
|
+
)
|
1070
|
+
|
1071
|
+
assert g.save
|
1072
|
+
|
1073
|
+
# Reload and check that we have all the geometric attributes.
|
1074
|
+
h = Geometric.find(g.id)
|
1075
|
+
|
1076
|
+
assert_equal '(5,6.1)', h.a_point
|
1077
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1078
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1079
|
+
assert_equal '[(2,3),(5.5,7),(8.5,11)]', h.a_path
|
1080
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1081
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1082
|
+
|
1083
|
+
# use a geometric function to test for an open path
|
1084
|
+
objs = Geometric.find_by_sql ["select isopen(a_path) from geometrics where id = ?", g.id]
|
1085
|
+
assert_equal objs[0].isopen, 't'
|
1086
|
+
|
1087
|
+
# test alternate formats when defining the geometric types
|
1088
|
+
|
1089
|
+
g = Geometric.new(
|
1090
|
+
:a_point => '5.0, 6.1',
|
1091
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1092
|
+
:a_line_segment => '((2.0, 3), (5.5, 7.0))',
|
1093
|
+
:a_box => '(2.0, 3), (5.5, 7.0)',
|
1094
|
+
:a_path => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))', # ( ) is a closed path
|
1095
|
+
:a_polygon => '2.0, 3, 5.5, 7.0, 8.5, 11.0',
|
1096
|
+
:a_circle => '((5.3, 10.4), 2)'
|
1097
|
+
)
|
1098
|
+
|
1099
|
+
assert g.save
|
1100
|
+
|
1101
|
+
# Reload and check that we have all the geometric attributes.
|
1102
|
+
h = Geometric.find(g.id)
|
1103
|
+
|
1104
|
+
assert_equal '(5,6.1)', h.a_point
|
1105
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1106
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1107
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_path
|
1108
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1109
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1110
|
+
|
1111
|
+
# use a geometric function to test for an closed path
|
1112
|
+
objs = Geometric.find_by_sql ["select isclosed(a_path) from geometrics where id = ?", g.id]
|
1113
|
+
assert_equal objs[0].isclosed, 't'
|
1114
|
+
end
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
class NumericData < ActiveRecord::Base
|
1118
|
+
self.table_name = 'numeric_data'
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
def test_numeric_fields
|
1122
|
+
m = NumericData.new(
|
1123
|
+
:bank_balance => 1586.43,
|
1124
|
+
:big_bank_balance => BigDecimal("1000234000567.95"),
|
1125
|
+
:world_population => 6000000000,
|
1126
|
+
:my_house_population => 3
|
1127
|
+
)
|
1128
|
+
assert m.save
|
1129
|
+
|
1130
|
+
m1 = NumericData.find(m.id)
|
1131
|
+
assert_not_nil m1
|
1132
|
+
|
1133
|
+
# As with migration_test.rb, we should make world_population >= 2**62
|
1134
|
+
# to cover 64-bit platforms and test it is a Bignum, but the main thing
|
1135
|
+
# is that it's an Integer.
|
1136
|
+
assert_kind_of Integer, m1.world_population
|
1137
|
+
assert_equal 6000000000, m1.world_population
|
1138
|
+
|
1139
|
+
assert_kind_of Fixnum, m1.my_house_population
|
1140
|
+
assert_equal 3, m1.my_house_population
|
1141
|
+
|
1142
|
+
assert_kind_of BigDecimal, m1.bank_balance
|
1143
|
+
assert_equal BigDecimal("1586.43"), m1.bank_balance
|
1144
|
+
|
1145
|
+
assert_kind_of BigDecimal, m1.big_bank_balance
|
1146
|
+
assert_equal BigDecimal("1000234000567.95"), m1.big_bank_balance
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
def test_auto_id
|
1150
|
+
auto = AutoId.new
|
1151
|
+
auto.save
|
1152
|
+
assert (auto.id > 0)
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
def quote_column_name(name)
|
1156
|
+
"<#{name}>"
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
def test_quote_keys
|
1160
|
+
ar = AutoId.new
|
1161
|
+
source = {"foo" => "bar", "baz" => "quux"}
|
1162
|
+
actual = ar.send(:quote_columns, self, source)
|
1163
|
+
inverted = actual.invert
|
1164
|
+
assert_equal("<foo>", inverted["bar"])
|
1165
|
+
assert_equal("<baz>", inverted["quux"])
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
def test_sql_injection_via_find
|
1169
|
+
assert_raises(ActiveRecord::RecordNotFound, ActiveRecord::StatementInvalid) do
|
1170
|
+
Topic.find("123456 OR id > 0")
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
def test_column_name_properly_quoted
|
1175
|
+
col_record = ColumnName.new
|
1176
|
+
col_record.references = 40
|
1177
|
+
assert col_record.save
|
1178
|
+
col_record.references = 41
|
1179
|
+
assert col_record.save
|
1180
|
+
assert_not_nil c2 = ColumnName.find(col_record.id)
|
1181
|
+
assert_equal(41, c2.references)
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
def test_quoting_arrays
|
1185
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", topics(:first).replies.collect(&:id) ])
|
1186
|
+
assert_equal topics(:first).replies.size, replies.size
|
1187
|
+
|
1188
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", [] ])
|
1189
|
+
assert_equal 0, replies.size
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
MyObject = Struct.new :attribute1, :attribute2
|
1193
|
+
|
1194
|
+
def test_serialized_attribute
|
1195
|
+
myobj = MyObject.new('value1', 'value2')
|
1196
|
+
topic = Topic.create("content" => myobj)
|
1197
|
+
Topic.serialize("content", MyObject)
|
1198
|
+
assert_equal(myobj, topic.content)
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
def test_nil_serialized_attribute_with_class_constraint
|
1202
|
+
myobj = MyObject.new('value1', 'value2')
|
1203
|
+
topic = Topic.new
|
1204
|
+
assert_nil topic.content
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
def test_should_raise_exception_on_serialized_attribute_with_type_mismatch
|
1208
|
+
myobj = MyObject.new('value1', 'value2')
|
1209
|
+
topic = Topic.new(:content => myobj)
|
1210
|
+
assert topic.save
|
1211
|
+
Topic.serialize(:content, Hash)
|
1212
|
+
assert_raise(ActiveRecord::SerializationTypeMismatch) { Topic.find(topic.id).content }
|
1213
|
+
ensure
|
1214
|
+
Topic.serialize(:content)
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
def test_serialized_attribute_with_class_constraint
|
1218
|
+
settings = { "color" => "blue" }
|
1219
|
+
Topic.serialize(:content, Hash)
|
1220
|
+
topic = Topic.new(:content => settings)
|
1221
|
+
assert topic.save
|
1222
|
+
assert_equal(settings, Topic.find(topic.id).content)
|
1223
|
+
ensure
|
1224
|
+
Topic.serialize(:content)
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
def test_quote
|
1228
|
+
author_name = "\\ \001 ' \n \\n \""
|
1229
|
+
topic = Topic.create('author_name' => author_name)
|
1230
|
+
assert_equal author_name, Topic.find(topic.id).author_name
|
1231
|
+
end
|
1232
|
+
|
1233
|
+
def test_quote_chars
|
1234
|
+
str = 'The Narrator'
|
1235
|
+
topic = Topic.create(:author_name => str)
|
1236
|
+
assert_equal str, topic.author_name
|
1237
|
+
|
1238
|
+
assert_kind_of ActiveSupport::Multibyte::Chars, str.chars
|
1239
|
+
topic = Topic.find_by_author_name(str.chars)
|
1240
|
+
|
1241
|
+
assert_kind_of Topic, topic
|
1242
|
+
assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
def test_class_level_destroy
|
1246
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1247
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1248
|
+
|
1249
|
+
Topic.destroy(1)
|
1250
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1251
|
+
assert_raise(ActiveRecord::RecordNotFound) { Reply.find(should_be_destroyed_reply.id) }
|
1252
|
+
end
|
1253
|
+
|
1254
|
+
def test_class_level_delete
|
1255
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1256
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1257
|
+
|
1258
|
+
Topic.delete(1)
|
1259
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1260
|
+
assert_nothing_raised { Reply.find(should_be_destroyed_reply.id) }
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
def test_increment_attribute
|
1264
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1265
|
+
accounts(:signals37).increment! :credit_limit
|
1266
|
+
assert_equal 51, accounts(:signals37, :reload).credit_limit
|
1267
|
+
|
1268
|
+
accounts(:signals37).increment(:credit_limit).increment!(:credit_limit)
|
1269
|
+
assert_equal 53, accounts(:signals37, :reload).credit_limit
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
def test_increment_nil_attribute
|
1273
|
+
assert_nil topics(:first).parent_id
|
1274
|
+
topics(:first).increment! :parent_id
|
1275
|
+
assert_equal 1, topics(:first).parent_id
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
def test_decrement_attribute
|
1279
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1280
|
+
|
1281
|
+
accounts(:signals37).decrement!(:credit_limit)
|
1282
|
+
assert_equal 49, accounts(:signals37, :reload).credit_limit
|
1283
|
+
|
1284
|
+
accounts(:signals37).decrement(:credit_limit).decrement!(:credit_limit)
|
1285
|
+
assert_equal 47, accounts(:signals37, :reload).credit_limit
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
def test_toggle_attribute
|
1289
|
+
assert !topics(:first).approved?
|
1290
|
+
topics(:first).toggle!(:approved)
|
1291
|
+
assert topics(:first).approved?
|
1292
|
+
topic = topics(:first)
|
1293
|
+
topic.toggle(:approved)
|
1294
|
+
assert !topic.approved?
|
1295
|
+
topic.reload
|
1296
|
+
assert topic.approved?
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
def test_reload
|
1300
|
+
t1 = Topic.find(1)
|
1301
|
+
t2 = Topic.find(1)
|
1302
|
+
t1.title = "something else"
|
1303
|
+
t1.save
|
1304
|
+
t2.reload
|
1305
|
+
assert_equal t1.title, t2.title
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
def test_define_attr_method_with_value
|
1309
|
+
k = Class.new( ActiveRecord::Base )
|
1310
|
+
k.send(:define_attr_method, :table_name, "foo")
|
1311
|
+
assert_equal "foo", k.table_name
|
1312
|
+
end
|
1313
|
+
|
1314
|
+
def test_define_attr_method_with_block
|
1315
|
+
k = Class.new( ActiveRecord::Base )
|
1316
|
+
k.send(:define_attr_method, :primary_key) { "sys_" + original_primary_key }
|
1317
|
+
assert_equal "sys_id", k.primary_key
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
def test_set_table_name_with_value
|
1321
|
+
k = Class.new( ActiveRecord::Base )
|
1322
|
+
k.table_name = "foo"
|
1323
|
+
assert_equal "foo", k.table_name
|
1324
|
+
k.set_table_name "bar"
|
1325
|
+
assert_equal "bar", k.table_name
|
1326
|
+
end
|
1327
|
+
|
1328
|
+
def test_set_table_name_with_block
|
1329
|
+
k = Class.new( ActiveRecord::Base )
|
1330
|
+
k.set_table_name { "ks" }
|
1331
|
+
assert_equal "ks", k.table_name
|
1332
|
+
end
|
1333
|
+
|
1334
|
+
def test_set_primary_key_with_value
|
1335
|
+
k = Class.new( ActiveRecord::Base )
|
1336
|
+
k.primary_key = "foo"
|
1337
|
+
assert_equal "foo", k.primary_key
|
1338
|
+
k.set_primary_key "bar"
|
1339
|
+
assert_equal "bar", k.primary_key
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
def test_set_primary_key_with_block
|
1343
|
+
k = Class.new( ActiveRecord::Base )
|
1344
|
+
k.set_primary_key { "sys_" + original_primary_key }
|
1345
|
+
assert_equal "sys_id", k.primary_key
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
def test_set_inheritance_column_with_value
|
1349
|
+
k = Class.new( ActiveRecord::Base )
|
1350
|
+
k.inheritance_column = "foo"
|
1351
|
+
assert_equal "foo", k.inheritance_column
|
1352
|
+
k.set_inheritance_column "bar"
|
1353
|
+
assert_equal "bar", k.inheritance_column
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
def test_set_inheritance_column_with_block
|
1357
|
+
k = Class.new( ActiveRecord::Base )
|
1358
|
+
k.set_inheritance_column { original_inheritance_column + "_id" }
|
1359
|
+
assert_equal "type_id", k.inheritance_column
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
def test_count_with_join
|
1363
|
+
res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.#{QUOTED_TYPE} = 'Post'"
|
1364
|
+
|
1365
|
+
res2 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'", :joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1366
|
+
assert_equal res, res2
|
1367
|
+
|
1368
|
+
res3 = nil
|
1369
|
+
assert_nothing_raised do
|
1370
|
+
res3 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'",
|
1371
|
+
:joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1372
|
+
end
|
1373
|
+
assert_equal res, res3
|
1374
|
+
|
1375
|
+
res4 = Post.count_by_sql "SELECT COUNT(p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1376
|
+
res5 = nil
|
1377
|
+
assert_nothing_raised do
|
1378
|
+
res5 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1379
|
+
:joins => "p, comments co",
|
1380
|
+
:select => "p.id")
|
1381
|
+
end
|
1382
|
+
|
1383
|
+
assert_equal res4, res5
|
1384
|
+
|
1385
|
+
unless current_adapter?(:SQLite2Adapter, :DeprecatedSQLiteAdapter)
|
1386
|
+
res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1387
|
+
res7 = nil
|
1388
|
+
assert_nothing_raised do
|
1389
|
+
res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1390
|
+
:joins => "p, comments co",
|
1391
|
+
:select => "p.id",
|
1392
|
+
:distinct => true)
|
1393
|
+
end
|
1394
|
+
assert_equal res6, res7
|
1395
|
+
end
|
1396
|
+
end
|
1397
|
+
|
1398
|
+
def test_clear_association_cache_stored
|
1399
|
+
firm = Firm.find(1)
|
1400
|
+
assert_kind_of Firm, firm
|
1401
|
+
|
1402
|
+
firm.clear_association_cache
|
1403
|
+
assert_equal Firm.find(1).clients.collect{ |x| x.name }.sort, firm.clients.collect{ |x| x.name }.sort
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
def test_clear_association_cache_new_record
|
1407
|
+
firm = Firm.new
|
1408
|
+
client_stored = Client.find(3)
|
1409
|
+
client_new = Client.new
|
1410
|
+
client_new.name = "The Joneses"
|
1411
|
+
clients = [ client_stored, client_new ]
|
1412
|
+
|
1413
|
+
firm.clients << clients
|
1414
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1415
|
+
|
1416
|
+
firm.clear_association_cache
|
1417
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1418
|
+
end
|
1419
|
+
|
1420
|
+
def test_interpolate_sql
|
1421
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo@bar') }
|
1422
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar) baz') }
|
1423
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar} baz') }
|
1424
|
+
end
|
1425
|
+
|
1426
|
+
def test_scoped_find_conditions
|
1427
|
+
scoped_developers = Developer.with_scope(:find => { :conditions => 'salary > 90000' }) do
|
1428
|
+
Developer.find(:all, :conditions => 'id < 5')
|
1429
|
+
end
|
1430
|
+
assert !scoped_developers.include?(developers(:david)) # David's salary is less than 90,000
|
1431
|
+
assert_equal 3, scoped_developers.size
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
def test_scoped_find_limit_offset
|
1435
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :offset => 2 }) do
|
1436
|
+
Developer.find(:all, :order => 'id')
|
1437
|
+
end
|
1438
|
+
assert !scoped_developers.include?(developers(:david))
|
1439
|
+
assert !scoped_developers.include?(developers(:jamis))
|
1440
|
+
assert_equal 3, scoped_developers.size
|
1441
|
+
|
1442
|
+
# Test without scoped find conditions to ensure we get the whole thing
|
1443
|
+
developers = Developer.find(:all, :order => 'id')
|
1444
|
+
assert_equal Developer.count, developers.size
|
1445
|
+
end
|
1446
|
+
|
1447
|
+
def test_scoped_find_order
|
1448
|
+
# Test order in scope
|
1449
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1, :order => 'salary DESC' }) do
|
1450
|
+
Developer.find(:all)
|
1451
|
+
end
|
1452
|
+
assert_equal 'Jamis', scoped_developers.first.name
|
1453
|
+
assert scoped_developers.include?(developers(:jamis))
|
1454
|
+
# Test scope without order and order in find
|
1455
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1 }) do
|
1456
|
+
Developer.find(:all, :order => 'salary DESC')
|
1457
|
+
end
|
1458
|
+
# Test scope order + find order, find has priority
|
1459
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :order => 'id DESC' }) do
|
1460
|
+
Developer.find(:all, :order => 'salary ASC')
|
1461
|
+
end
|
1462
|
+
assert scoped_developers.include?(developers(:poor_jamis))
|
1463
|
+
assert scoped_developers.include?(developers(:david))
|
1464
|
+
assert scoped_developers.include?(developers(:dev_10))
|
1465
|
+
# Test without scoped find conditions to ensure we get the right thing
|
1466
|
+
developers = Developer.find(:all, :order => 'id', :limit => 1)
|
1467
|
+
assert scoped_developers.include?(developers(:david))
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
def test_scoped_find_limit_offset_including_has_many_association
|
1471
|
+
topics = Topic.with_scope(:find => {:limit => 1, :offset => 1, :include => :replies}) do
|
1472
|
+
Topic.find(:all, :order => "topics.id")
|
1473
|
+
end
|
1474
|
+
assert_equal 1, topics.size
|
1475
|
+
assert_equal 2, topics.first.id
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
def test_scoped_find_order_including_has_many_association
|
1479
|
+
developers = Developer.with_scope(:find => { :order => 'developers.salary DESC', :include => :projects }) do
|
1480
|
+
Developer.find(:all)
|
1481
|
+
end
|
1482
|
+
assert developers.size >= 2
|
1483
|
+
for i in 1...developers.size
|
1484
|
+
assert developers[i-1].salary >= developers[i].salary
|
1485
|
+
end
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
def test_abstract_class
|
1489
|
+
assert !ActiveRecord::Base.abstract_class?
|
1490
|
+
assert LoosePerson.abstract_class?
|
1491
|
+
assert !LooseDescendant.abstract_class?
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
def test_base_class
|
1495
|
+
assert_equal LoosePerson, LoosePerson.base_class
|
1496
|
+
assert_equal LooseDescendant, LooseDescendant.base_class
|
1497
|
+
assert_equal TightPerson, TightPerson.base_class
|
1498
|
+
assert_equal TightPerson, TightDescendant.base_class
|
1499
|
+
|
1500
|
+
assert_equal Post, Post.base_class
|
1501
|
+
assert_equal Post, SpecialPost.base_class
|
1502
|
+
assert_equal Post, StiPost.base_class
|
1503
|
+
assert_equal SubStiPost, SubStiPost.base_class
|
1504
|
+
end
|
1505
|
+
|
1506
|
+
def test_descends_from_active_record
|
1507
|
+
# Tries to call Object.abstract_class?
|
1508
|
+
assert_raise(NoMethodError) do
|
1509
|
+
ActiveRecord::Base.descends_from_active_record?
|
1510
|
+
end
|
1511
|
+
|
1512
|
+
# Abstract subclass of AR::Base.
|
1513
|
+
assert LoosePerson.descends_from_active_record?
|
1514
|
+
|
1515
|
+
# Concrete subclass of an abstract class.
|
1516
|
+
assert LooseDescendant.descends_from_active_record?
|
1517
|
+
|
1518
|
+
# Concrete subclass of AR::Base.
|
1519
|
+
assert TightPerson.descends_from_active_record?
|
1520
|
+
|
1521
|
+
# Concrete subclass of a concrete class but has no type column.
|
1522
|
+
assert TightDescendant.descends_from_active_record?
|
1523
|
+
|
1524
|
+
# Concrete subclass of AR::Base.
|
1525
|
+
assert Post.descends_from_active_record?
|
1526
|
+
|
1527
|
+
# Abstract subclass of a concrete class which has a type column.
|
1528
|
+
# This is pathological, as you'll never have Sub < Abstract < Concrete.
|
1529
|
+
assert !StiPost.descends_from_active_record?
|
1530
|
+
|
1531
|
+
# Concrete subclasses an abstract class which has a type column.
|
1532
|
+
assert !SubStiPost.descends_from_active_record?
|
1533
|
+
end
|
1534
|
+
|
1535
|
+
def test_find_on_abstract_base_class_doesnt_use_type_condition
|
1536
|
+
old_class = LooseDescendant
|
1537
|
+
Object.send :remove_const, :LooseDescendant
|
1538
|
+
|
1539
|
+
descendant = old_class.create!
|
1540
|
+
assert_not_nil LoosePerson.find(descendant.id), "Should have found instance of LooseDescendant when finding abstract LoosePerson: #{descendant.inspect}"
|
1541
|
+
ensure
|
1542
|
+
unless Object.const_defined?(:LooseDescendant)
|
1543
|
+
Object.const_set :LooseDescendant, old_class
|
1544
|
+
end
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
def test_assert_queries
|
1548
|
+
query = lambda { ActiveRecord::Base.connection.execute 'select count(*) from developers' }
|
1549
|
+
assert_queries(2) { 2.times { query.call } }
|
1550
|
+
assert_queries 1, &query
|
1551
|
+
assert_no_queries { assert true }
|
1552
|
+
end
|
1553
|
+
|
1554
|
+
def test_to_xml
|
1555
|
+
xml = REXML::Document.new(topics(:first).to_xml(:indent => 0))
|
1556
|
+
bonus_time_in_current_timezone = topics(:first).bonus_time.xmlschema
|
1557
|
+
written_on_in_current_timezone = topics(:first).written_on.xmlschema
|
1558
|
+
last_read_in_current_timezone = topics(:first).last_read.xmlschema
|
1559
|
+
|
1560
|
+
assert_equal "topic", xml.root.name
|
1561
|
+
assert_equal "The First Topic" , xml.elements["//title"].text
|
1562
|
+
assert_equal "David" , xml.elements["//author-name"].text
|
1563
|
+
|
1564
|
+
assert_equal "1", xml.elements["//id"].text
|
1565
|
+
assert_equal "integer" , xml.elements["//id"].attributes['type']
|
1566
|
+
|
1567
|
+
assert_equal "1", xml.elements["//replies-count"].text
|
1568
|
+
assert_equal "integer" , xml.elements["//replies-count"].attributes['type']
|
1569
|
+
|
1570
|
+
assert_equal written_on_in_current_timezone, xml.elements["//written-on"].text
|
1571
|
+
assert_equal "datetime" , xml.elements["//written-on"].attributes['type']
|
1572
|
+
|
1573
|
+
assert_equal "--- Have a nice day\n" , xml.elements["//content"].text
|
1574
|
+
assert_equal "yaml" , xml.elements["//content"].attributes['type']
|
1575
|
+
|
1576
|
+
assert_equal "david@loudthinking.com", xml.elements["//author-email-address"].text
|
1577
|
+
|
1578
|
+
assert_equal nil, xml.elements["//parent-id"].text
|
1579
|
+
assert_equal "integer", xml.elements["//parent-id"].attributes['type']
|
1580
|
+
assert_equal "true", xml.elements["//parent-id"].attributes['nil']
|
1581
|
+
|
1582
|
+
if current_adapter?(:SybaseAdapter, :SQLServerAdapter, :OracleAdapter)
|
1583
|
+
assert_equal last_read_in_current_timezone, xml.elements["//last-read"].text
|
1584
|
+
assert_equal "datetime" , xml.elements["//last-read"].attributes['type']
|
1585
|
+
else
|
1586
|
+
assert_equal "2004-04-15", xml.elements["//last-read"].text
|
1587
|
+
assert_equal "date" , xml.elements["//last-read"].attributes['type']
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
# Oracle and DB2 don't have true boolean or time-only fields
|
1591
|
+
unless current_adapter?(:OracleAdapter, :DB2Adapter)
|
1592
|
+
assert_equal "false", xml.elements["//approved"].text
|
1593
|
+
assert_equal "boolean" , xml.elements["//approved"].attributes['type']
|
1594
|
+
|
1595
|
+
assert_equal bonus_time_in_current_timezone, xml.elements["//bonus-time"].text
|
1596
|
+
assert_equal "datetime" , xml.elements["//bonus-time"].attributes['type']
|
1597
|
+
end
|
1598
|
+
end
|
1599
|
+
|
1600
|
+
def test_to_xml_skipping_attributes
|
1601
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :replies_count])
|
1602
|
+
assert_equal "<topic>", xml.first(7)
|
1603
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1604
|
+
assert xml.include?(%(<author-name>David</author-name>))
|
1605
|
+
|
1606
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :author_name, :replies_count])
|
1607
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1608
|
+
assert !xml.include?(%(<author-name>David</author-name>))
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
def test_to_xml_including_has_many_association
|
1612
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :include => :replies, :except => :replies_count)
|
1613
|
+
assert_equal "<topic>", xml.first(7)
|
1614
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1615
|
+
assert xml.include?(%(<title>The Second Topic's of the day</title>))
|
1616
|
+
end
|
1617
|
+
|
1618
|
+
def test_array_to_xml_including_has_many_association
|
1619
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :include => :replies)
|
1620
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
def test_array_to_xml_including_methods
|
1624
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :methods => [ :topic_id ])
|
1625
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:first).topic_id}</topic-id>)), xml
|
1626
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:second).topic_id}</topic-id>)), xml
|
1627
|
+
end
|
1628
|
+
|
1629
|
+
def test_array_to_xml_including_has_one_association
|
1630
|
+
xml = [ companies(:first_firm), companies(:rails_core) ].to_xml(:indent => 0, :skip_instruct => true, :include => :account)
|
1631
|
+
assert xml.include?(companies(:first_firm).account.to_xml(:indent => 0, :skip_instruct => true))
|
1632
|
+
assert xml.include?(companies(:rails_core).account.to_xml(:indent => 0, :skip_instruct => true))
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
def test_array_to_xml_including_belongs_to_association
|
1636
|
+
xml = [ companies(:first_client), companies(:second_client), companies(:another_client) ].to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1637
|
+
assert xml.include?(companies(:first_client).to_xml(:indent => 0, :skip_instruct => true))
|
1638
|
+
assert xml.include?(companies(:second_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
1639
|
+
assert xml.include?(companies(:another_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
1640
|
+
end
|
1641
|
+
|
1642
|
+
def test_to_xml_including_belongs_to_association
|
1643
|
+
xml = companies(:first_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1644
|
+
assert !xml.include?("<firm>")
|
1645
|
+
|
1646
|
+
xml = companies(:second_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1647
|
+
assert xml.include?("<firm>")
|
1648
|
+
end
|
1649
|
+
|
1650
|
+
def test_to_xml_including_multiple_associations
|
1651
|
+
xml = companies(:first_firm).to_xml(:indent => 0, :skip_instruct => true, :include => [ :clients, :account ])
|
1652
|
+
assert_equal "<firm>", xml.first(6)
|
1653
|
+
assert xml.include?(%(<account>))
|
1654
|
+
assert xml.include?(%(<clients type="array"><client>))
|
1655
|
+
end
|
1656
|
+
|
1657
|
+
def test_to_xml_including_multiple_associations_with_options
|
1658
|
+
xml = companies(:first_firm).to_xml(
|
1659
|
+
:indent => 0, :skip_instruct => true,
|
1660
|
+
:include => { :clients => { :only => :name } }
|
1661
|
+
)
|
1662
|
+
|
1663
|
+
assert_equal "<firm>", xml.first(6)
|
1664
|
+
assert xml.include?(%(<client><name>Summit</name></client>))
|
1665
|
+
assert xml.include?(%(<clients type="array"><client>))
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
def test_to_xml_including_methods
|
1669
|
+
xml = Company.new.to_xml(:methods => :arbitrary_method, :skip_instruct => true)
|
1670
|
+
assert_equal "<company>", xml.first(9)
|
1671
|
+
assert xml.include?(%(<arbitrary-method>I am Jack's profound disappointment</arbitrary-method>))
|
1672
|
+
end
|
1673
|
+
|
1674
|
+
def test_to_xml_with_block
|
1675
|
+
value = "Rockin' the block"
|
1676
|
+
xml = Company.new.to_xml(:skip_instruct => true) do |xml|
|
1677
|
+
xml.tag! "arbitrary-element", value
|
1678
|
+
end
|
1679
|
+
assert_equal "<company>", xml.first(9)
|
1680
|
+
assert xml.include?(%(<arbitrary-element>#{value}</arbitrary-element>))
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
def test_except_attributes
|
1684
|
+
assert_equal(
|
1685
|
+
%w( author_name type id approved replies_count bonus_time written_on content author_email_address parent_id last_read),
|
1686
|
+
topics(:first).attributes(:except => :title).keys
|
1687
|
+
)
|
1688
|
+
|
1689
|
+
assert_equal(
|
1690
|
+
%w( replies_count bonus_time written_on content author_email_address parent_id last_read),
|
1691
|
+
topics(:first).attributes(:except => [ :title, :id, :type, :approved, :author_name ]).keys
|
1692
|
+
)
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
def test_include_attributes
|
1696
|
+
assert_equal(%w( title ), topics(:first).attributes(:only => :title).keys)
|
1697
|
+
assert_equal(%w( title author_name type id approved ), topics(:first).attributes(:only => [ :title, :id, :type, :approved, :author_name ]).keys)
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
def test_type_name_with_module_should_handle_beginning
|
1701
|
+
assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person')
|
1702
|
+
assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person')
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
def test_to_param_should_return_string
|
1706
|
+
assert_kind_of String, Client.find(:first).to_param
|
1707
|
+
end
|
1708
|
+
|
1709
|
+
def test_inspect_class
|
1710
|
+
assert_equal 'ActiveRecord::Base', ActiveRecord::Base.inspect
|
1711
|
+
assert_equal 'LoosePerson(abstract)', LoosePerson.inspect
|
1712
|
+
assert_match(/^Topic\(id: integer, title: string/, Topic.inspect)
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
def test_inspect_instance
|
1716
|
+
topic = topics(:first)
|
1717
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic", author_name: "David", author_email_address: "david@loudthinking.com", written_on: "#{topic.written_on.to_s(:db)}", bonus_time: "#{topic.bonus_time.to_s(:db)}", last_read: "#{topic.last_read.to_s(:db)}", content: "Have a nice day", approved: false, replies_count: 1, parent_id: nil, type: nil>), topic.inspect
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
def test_inspect_new_instance
|
1721
|
+
assert_match /Topic id: nil/, Topic.new.inspect
|
1722
|
+
end
|
1723
|
+
|
1724
|
+
def test_inspect_limited_select_instance
|
1725
|
+
assert_equal %(#<Topic id: 1>), Topic.find(:first, :select => 'id', :conditions => 'id = 1').inspect
|
1726
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic">), Topic.find(:first, :select => 'id, title', :conditions => 'id = 1').inspect
|
1727
|
+
end
|
1728
|
+
|
1729
|
+
def test_inspect_class_without_table
|
1730
|
+
assert_equal "NonExistentTable(Table doesn't exist)", NonExistentTable.inspect
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
def test_attribute_for_inspect
|
1734
|
+
t = topics(:first)
|
1735
|
+
t.title = "The First Topic Now Has A Title With\nNewlines And More Than 50 Characters"
|
1736
|
+
|
1737
|
+
assert_equal %("#{t.written_on.to_s(:db)}"), t.attribute_for_inspect(:written_on)
|
1738
|
+
assert_equal '"The First Topic Now Has A Title With\nNewlines And M..."', t.attribute_for_inspect(:title)
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
def test_becomes
|
1742
|
+
assert_kind_of Reply, topics(:first).becomes(Reply)
|
1743
|
+
assert_equal "The First Topic", topics(:first).becomes(Reply).title
|
1744
|
+
end
|
1745
|
+
end
|