radiant 0.6.9 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of radiant might be problematic. Click here for more details.
- data/CHANGELOG +105 -3
- data/CONTRIBUTORS +29 -0
- data/INSTALL +4 -2
- data/LICENSE +1 -1
- data/README +4 -0
- data/app/controllers/admin/abstract_model_controller.rb +4 -0
- data/app/controllers/admin/extensions_controller.rb +5 -0
- data/app/controllers/admin/layouts_controller.rb +6 -0
- data/app/controllers/admin/page_parts_controller.rb +9 -0
- data/app/controllers/admin/pages_controller.rb +56 -0
- data/app/controllers/admin/preferences_controller.rb +46 -0
- data/app/controllers/admin/references_controller.rb +7 -0
- data/app/controllers/admin/resource_controller.rb +180 -0
- data/app/controllers/admin/snippets_controller.rb +2 -0
- data/app/controllers/admin/users_controller.rb +21 -0
- data/app/controllers/admin/welcome_controller.rb +1 -1
- data/app/controllers/application.rb +7 -3
- data/app/controllers/site_controller.rb +0 -7
- data/app/helpers/admin/extensions_helper.rb +2 -0
- data/app/helpers/admin/layouts_helper.rb +2 -0
- data/app/helpers/admin/pages_helper.rb +59 -0
- data/app/helpers/admin/preferences_helper.rb +2 -0
- data/app/helpers/admin/references_helper.rb +42 -0
- data/app/helpers/admin/snippets_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +8 -0
- data/app/helpers/application_helper.rb +12 -8
- data/app/models/page.rb +33 -3
- data/app/models/page_part.rb +5 -1
- data/app/models/radiant/config.rb +3 -3
- data/app/models/response_cache.rb +20 -12
- data/app/models/standard_tags.rb +285 -180
- data/app/models/user.rb +5 -1
- data/app/views/admin/extensions/index.html.haml +40 -0
- data/app/views/admin/layouts/_form.html.haml +36 -0
- data/app/views/admin/layouts/edit.html.haml +7 -0
- data/app/views/admin/layouts/index.html.haml +34 -0
- data/app/views/admin/layouts/new.html.haml +5 -0
- data/app/views/admin/layouts/remove.html.haml +16 -0
- data/app/views/admin/page_parts/_page_part.html.haml +15 -0
- data/app/views/admin/pages/_edit_styles.html.haml +15 -0
- data/app/views/admin/pages/_fields.html.haml +60 -0
- data/app/views/admin/pages/_meta_row.html.haml +6 -0
- data/app/views/admin/pages/_node.html.haml +25 -0
- data/app/views/admin/pages/_popups.html.haml +30 -0
- data/app/views/admin/pages/children.html.haml +2 -0
- data/app/views/admin/pages/edit.html.haml +9 -0
- data/app/views/admin/pages/index.html.haml +28 -0
- data/app/views/admin/pages/new.html.haml +9 -0
- data/app/views/admin/pages/remove.html.haml +21 -0
- data/app/views/admin/preferences/edit.html.haml +36 -0
- data/app/views/admin/references/_tag_reference.haml +3 -0
- data/app/views/admin/references/filters.js.erb +5 -0
- data/app/views/admin/references/tags.js.erb +5 -0
- data/app/views/admin/snippets/_form.html.haml +29 -0
- data/app/views/admin/snippets/edit.html.haml +5 -0
- data/app/views/admin/snippets/index.html.haml +30 -0
- data/app/views/admin/snippets/new.html.haml +5 -0
- data/app/views/admin/snippets/remove.html.haml +19 -0
- data/app/views/admin/users/_form.html.haml +74 -0
- data/app/views/admin/users/edit.html.haml +5 -0
- data/app/views/admin/users/index.html.haml +35 -0
- data/app/views/admin/users/new.html.haml +5 -0
- data/app/views/admin/users/remove.html.haml +18 -0
- data/app/views/layouts/application.html.haml +5 -5
- data/config/boot.rb +24 -7
- data/config/environment.rb +7 -3
- data/config/environments/development.rb +0 -1
- data/config/environments/test.rb +1 -5
- data/config/routes.rb +21 -49
- data/db/migrate/20081203140407_add_indexes.rb +19 -0
- data/db/schema.rb +10 -3
- data/db/templates/roasters.yml +1210 -0
- data/lib/generators/extension/templates/extension.rb +4 -2
- data/lib/generators/extension/templates/spec_helper.rb +2 -3
- data/lib/generators/extension/templates/tasks.rake +1 -1
- data/lib/generators/extension_controller/extension_controller_generator.rb +11 -3
- data/lib/generators/extension_controller/templates/controller.rb +0 -4
- data/lib/generators/extension_controller/templates/functional_test.rb +1 -7
- data/lib/generators/extension_controller/templates/{view.rhtml → view.html.erb} +0 -0
- data/lib/generators/extension_mailer/USAGE +17 -0
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +68 -0
- data/lib/generators/extension_mailer/templates/fixture.erb +3 -0
- data/lib/generators/extension_mailer/templates/mailer.rb +15 -0
- data/lib/generators/extension_mailer/templates/unit_test.rb +21 -0
- data/lib/generators/extension_mailer/templates/view.erb +3 -0
- data/lib/generators/extension_migration/USAGE +34 -0
- data/lib/generators/extension_migration/extension_migration_generator.rb +25 -0
- data/lib/generators/extension_migration/templates/migration.rb +11 -0
- data/lib/generators/extension_model/extension_model_generator.rb +10 -2
- data/lib/generators/extension_model/templates/fixtures.yml +11 -3
- data/lib/generators/extension_model/templates/migration.rb +4 -1
- data/lib/generators/extension_model/templates/unit_test.rb +2 -4
- data/lib/generators/generator_base_extension.rb +0 -7
- data/lib/generators/instance/templates/instance_boot.rb +27 -7
- data/lib/generators/instance/templates/instance_environment.rb +1 -2
- data/lib/generators/instance/templates/instance_generate +2 -0
- data/lib/local_time.rb +2 -2
- data/lib/login_system.rb +18 -31
- data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +30 -1
- data/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb +1 -1
- data/lib/plugins/string_extensions/lib/string_extensions.rb +7 -0
- data/lib/radiant.rb +2 -2
- data/lib/radiant/admin_ui.rb +41 -3
- data/lib/radiant/compat.rb +10 -0
- data/lib/radiant/extension.rb +9 -10
- data/lib/radiant/extension/script.rb +103 -7
- data/lib/radiant/extension_loader.rb +1 -1
- data/lib/radiant/extension_migrator.rb +77 -38
- data/lib/radiant/initializer.rb +13 -1
- data/lib/radiant/legacy_routes.rb +72 -0
- data/lib/radiant/resource_responses.rb +115 -0
- data/lib/radiant/taggable.rb +17 -0
- data/lib/tasks/database.rake +0 -42
- data/lib/tasks/extensions.rake +1 -23
- data/lib/tasks/framework.rake +3 -1
- data/lib/tasks/instance.rake +7 -10
- data/lib/tasks/release.rake +22 -8
- data/lib/tasks/rspec.rake +173 -0
- data/lib/tasks/undefine.rake +1 -1
- data/public/javascripts/admin/admin.js +14 -16
- data/public/javascripts/admin/sitemap.js +1 -1
- data/public/javascripts/controls.js +4 -6
- data/public/javascripts/dragdrop.js +1 -3
- data/public/javascripts/effects.js +1 -3
- data/public/javascripts/prototype.js +132 -91
- data/public/stylesheets/admin/main.css +13 -1
- data/script/autospec +5 -0
- data/script/dbconsole +3 -0
- data/script/generate +2 -2
- data/script/performance/request +3 -0
- data/script/spec +3 -10
- data/script/spec_server +22 -5
- data/spec/controllers/admin/export_controller_spec.rb +1 -1
- data/spec/controllers/admin/extensions_controller_spec.rb +21 -0
- data/spec/controllers/admin/layouts_controller_spec.rb +56 -0
- data/spec/controllers/admin/pages_controller_spec.rb +187 -0
- data/spec/controllers/admin/preferences_controller_spec.rb +38 -0
- data/spec/controllers/admin/references_controller_spec.rb +15 -0
- data/spec/controllers/admin/snippets_controller_spec.rb +51 -0
- data/spec/controllers/admin/users_controller_spec.rb +48 -0
- data/spec/controllers/admin/welcome_controller_spec.rb +2 -2
- data/spec/controllers/application_controller_spec.rb +7 -3
- data/spec/controllers/site_controller_spec.rb +5 -38
- data/spec/datasets/file_not_found_dataset.rb +22 -0
- data/spec/datasets/home_page_dataset.rb +64 -0
- data/spec/datasets/layouts_dataset.rb +58 -0
- data/spec/datasets/markup_pages_dataset.rb +13 -0
- data/spec/datasets/pages_dataset.rb +56 -0
- data/spec/datasets/pages_with_layouts_dataset.rb +10 -0
- data/spec/datasets/snippets_dataset.rb +38 -0
- data/spec/datasets/users_and_pages_dataset.rb +9 -0
- data/spec/datasets/users_dataset.rb +43 -0
- data/spec/fixtures/example_extension/README +3 -0
- data/spec/fixtures/example_extension/Rakefile +120 -0
- data/spec/fixtures/example_extension/example_extension.rb +21 -0
- data/spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake +28 -0
- data/spec/fixtures/example_extension/spec/spec.opts +6 -0
- data/spec/fixtures/example_extension/spec/spec_helper.rb +36 -0
- data/spec/generators/extension_controller_generator_spec.rb +85 -0
- data/spec/generators/extension_generator_spec.rb +172 -0
- data/spec/generators/extension_generators_spec_helper.rb +139 -0
- data/spec/generators/extension_mailer_generator_spec.rb +60 -0
- data/spec/generators/extension_migration_generator_spec.rb +21 -0
- data/spec/generators/extension_model_generator_spec.rb +61 -0
- data/spec/helpers/admin/extensions_helper_spec.rb +4 -0
- data/spec/helpers/admin/layouts_helper_spec.rb +4 -0
- data/spec/helpers/admin/node_helper_spec.rb +33 -31
- data/spec/helpers/admin/pages_helper_spec.rb +63 -0
- data/spec/helpers/admin/preferences_helper_spec.rb +11 -0
- data/spec/helpers/admin/regions_helper_spec.rb +16 -13
- data/spec/helpers/admin/snippets_helper_spec.rb +4 -0
- data/spec/helpers/admin/users_helper_spec.rb +11 -0
- data/spec/helpers/application_helper_spec.rb +75 -61
- data/spec/integration/admin/content_negotiation_spec.rb +27 -0
- data/spec/integration/admin/pages_integration_spec.rb +118 -0
- data/spec/integration/admin/permission_integration_spec.rb +24 -0
- data/spec/integration/admin/snippets_integration_spec.rb +73 -0
- data/spec/integration/admin/user_management_integration_spec.rb +80 -0
- data/spec/integration/admin/user_preferences_integration_spec.rb +19 -0
- data/spec/integration/page_serving_spec.rb +37 -0
- data/spec/lib/autotest_spec.rb +1 -1
- data/spec/lib/core_ext/string_ext_spec.rb +10 -0
- data/spec/lib/login_system_spec.rb +143 -135
- data/spec/lib/radiant/admin_ui_spec.rb +33 -1
- data/spec/lib/radiant/extension/script_spec.rb +111 -4
- data/spec/lib/radiant/extension_migrator_spec.rb +31 -2
- data/spec/lib/radiant/extension_spec.rb +5 -1
- data/spec/lib/radiant/legacy_routes_spec.rb +14 -0
- data/spec/lib/radiant/resource_responses_spec.rb +207 -0
- data/spec/lib/radiant/taggable_spec.rb +38 -2
- data/{vendor/plugins/rspec/spec → spec/matchers}/autotest_matchers.rb +0 -0
- data/spec/matchers/generator_matchers.rb +237 -0
- data/spec/matchers/login_system_matcher.rb +1 -1
- data/spec/matchers/render_form_errors_matcher.rb +62 -0
- data/spec/matchers/render_matcher.rb +2 -2
- data/spec/models/file_not_found_page_spec.rb +1 -1
- data/spec/models/layout_spec.rb +1 -1
- data/spec/models/page_context_spec.rb +2 -4
- data/spec/models/page_part_spec.rb +24 -4
- data/spec/models/page_spec.rb +162 -110
- data/spec/models/radiant/exporter_spec.rb +1 -1
- data/spec/models/response_cache_spec.rb +28 -1
- data/spec/models/snippet_spec.rb +1 -1
- data/spec/models/standard_tags_spec.rb +52 -8
- data/spec/models/user_action_observer_spec.rb +1 -1
- data/spec/models/user_spec.rb +3 -3
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +45 -2
- data/test/fixtures/extensions/01_basic/basic_extension.rb +1 -1
- data/test/fixtures/extensions/01_basic/db/migrate/200812131420_create_initial_schema.rb +10 -0
- data/test/fixtures/extensions/01_basic/db/migrate/200812131421_modify_initial_schema.rb +10 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/01_first.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/02_second.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/03_pending.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/04_dont_run.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/upgrading_extension.rb +2 -0
- data/test/fixtures/extensions/special_characters/db/migrate/001_create_initial_schema.rb +10 -0
- data/test/fixtures/extensions/special_characters/special_characters_extension.rb +3 -0
- data/test/helpers/page_test_helper.rb +3 -1
- data/vendor/extensions/archive/spec/datasets/archive_dataset.rb +51 -0
- data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +1 -1
- data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +1 -1
- data/vendor/extensions/archive/spec/models/archive_page_spec.rb +1 -1
- data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +1 -1
- data/vendor/extensions/archive/spec/spec_helper.rb +2 -3
- data/vendor/extensions/markdown_filter/lib/markdown_filter.rb +5 -4
- data/vendor/extensions/markdown_filter/lib/markdown_tags.rb +33 -0
- data/vendor/extensions/markdown_filter/lib/smarty_pants_filter.rb +0 -2
- data/vendor/extensions/markdown_filter/markdown_filter_extension.rb +18 -1
- data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +11 -4
- data/vendor/extensions/markdown_filter/spec/models/smarty_pants_filter_spec.rb +8 -1
- data/vendor/extensions/markdown_filter/spec/spec_helper.rb +2 -3
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/CHANGES +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/LICENSE +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/README +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/bin/bluecloth +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/install.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/lib/bluecloth.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/test.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/00_Class.tests.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/05_Markdown.tests.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/10_Bug.tests.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/15_Contrib.tests.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/bctestcase.rb +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/data/antsugar.txt +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/data/ml-announce.txt +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/data/re-overflow.txt +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/tests/data/re-overflow2.txt +0 -0
- data/vendor/{bluecloth → extensions/markdown_filter/vendor/bluecloth}/utils.rb +0 -0
- data/vendor/{rubypants → extensions/markdown_filter/vendor/rubypants}/README +0 -0
- data/vendor/{rubypants → extensions/markdown_filter/vendor/rubypants}/Rakefile +0 -0
- data/vendor/{rubypants → extensions/markdown_filter/vendor/rubypants}/install.rb +0 -0
- data/vendor/{rubypants → extensions/markdown_filter/vendor/rubypants}/rubypants.rb +0 -0
- data/vendor/{rubypants → extensions/markdown_filter/vendor/rubypants}/test_rubypants.rb +0 -0
- data/vendor/extensions/textile_filter/lib/textile_filter.rb +0 -2
- data/vendor/extensions/textile_filter/lib/textile_tags.rb +24 -0
- data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +9 -1
- data/vendor/extensions/textile_filter/spec/spec_helper.rb +2 -3
- data/vendor/extensions/textile_filter/textile_filter_extension.rb +3 -2
- data/vendor/plugins/dataset/History.txt +9 -0
- data/vendor/plugins/dataset/LICENSE +19 -0
- data/vendor/plugins/dataset/Manifest.txt +21 -0
- data/vendor/plugins/dataset/README.txt +111 -0
- data/vendor/plugins/dataset/Rakefile +20 -0
- data/vendor/plugins/dataset/TODO +19 -0
- data/vendor/plugins/dataset/lib/dataset.rb +123 -0
- data/vendor/plugins/dataset/lib/dataset/base.rb +157 -0
- data/vendor/plugins/dataset/lib/dataset/collection.rb +19 -0
- data/vendor/plugins/dataset/lib/dataset/database/base.rb +30 -0
- data/vendor/plugins/dataset/lib/dataset/database/mysql.rb +34 -0
- data/vendor/plugins/dataset/lib/dataset/database/postgresql.rb +34 -0
- data/vendor/plugins/dataset/lib/dataset/database/sqlite3.rb +32 -0
- data/vendor/plugins/dataset/lib/dataset/extensions/rspec.rb +21 -0
- data/vendor/plugins/dataset/lib/dataset/extensions/test_unit.rb +60 -0
- data/vendor/plugins/dataset/lib/dataset/instance_methods.rb +10 -0
- data/vendor/plugins/dataset/lib/dataset/load.rb +47 -0
- data/vendor/plugins/dataset/lib/dataset/record/fixture.rb +54 -0
- data/vendor/plugins/dataset/lib/dataset/record/meta.rb +42 -0
- data/vendor/plugins/dataset/lib/dataset/record/model.rb +41 -0
- data/vendor/plugins/dataset/lib/dataset/resolver.rb +110 -0
- data/vendor/plugins/dataset/lib/dataset/session.rb +51 -0
- data/vendor/plugins/dataset/lib/dataset/session_binding.rb +299 -0
- data/vendor/plugins/dataset/lib/dataset/version.rb +9 -0
- data/vendor/plugins/dataset/spec/dataset/database/base_spec.rb +21 -0
- data/vendor/plugins/dataset/spec/dataset/resolver_spec.rb +110 -0
- data/vendor/plugins/dataset/spec/dataset/rspec_spec.rb +137 -0
- data/vendor/plugins/dataset/spec/dataset/session_binding_spec.rb +160 -0
- data/vendor/plugins/dataset/spec/dataset/session_spec.rb +299 -0
- data/vendor/plugins/dataset/spec/dataset/test_unit_spec.rb +209 -0
- data/vendor/plugins/{rspec/spec/spec/runner/empty_file.txt → dataset/spec/fixtures/datasets/constant_not_defined.rb} +0 -0
- data/vendor/plugins/dataset/spec/fixtures/datasets/ending_with_dataset.rb +2 -0
- data/vendor/plugins/dataset/spec/fixtures/datasets/exact_name.rb +2 -0
- data/vendor/plugins/dataset/spec/fixtures/datasets/not_a_dataset_base.rb +2 -0
- data/vendor/plugins/dataset/spec/fixtures/more_datasets/in_another_directory.rb +2 -0
- data/vendor/plugins/dataset/spec/models.rb +6 -0
- data/vendor/plugins/dataset/spec/schema.rb +24 -0
- data/vendor/plugins/{scenarios → dataset}/spec/spec.opts +0 -0
- data/vendor/plugins/dataset/spec/spec_helper.rb +49 -0
- data/vendor/plugins/dataset/tasks/dataset.rake +19 -0
- data/vendor/plugins/{scenarios → spec_integration}/LICENSE +0 -0
- data/vendor/plugins/spec_integration/README +117 -0
- data/vendor/plugins/spec_integration/Rakefile +10 -0
- data/vendor/plugins/spec_integration/lib/spec/integration.rb +10 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/dsl.rb +11 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/dsl/form.rb +157 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/dsl/integration_example_group.rb +97 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/dsl/navigation.rb +102 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/extensions.rb +8 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/extensions/action_controller.rb +25 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/extensions/hash.rb +48 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/matchers.rb +1 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/matchers/display_object.rb +41 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/matchers/have_link_to.rb +35 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/matchers/navigate_successfully.rb +60 -0
- data/vendor/plugins/spec_integration/lib/spec/integration/matchers/showing.rb +44 -0
- data/vendor/plugins/spec_integration/spec/application.rb +3 -0
- data/vendor/plugins/spec_integration/spec/dispatcher.rb +24 -0
- data/vendor/plugins/spec_integration/spec/dsl/form_spec.rb +130 -0
- data/vendor/plugins/spec_integration/spec/dsl/integration_spec_spec.rb +38 -0
- data/vendor/plugins/spec_integration/spec/dsl/navigation_spec.rb +35 -0
- data/vendor/plugins/spec_integration/spec/integration_dsl_controller.rb +5 -0
- data/vendor/plugins/spec_integration/spec/spec.opts +7 -0
- data/vendor/plugins/spec_integration/spec/spec_helper.rb +10 -0
- data/vendor/plugins/spec_integration/tasks/integration.rake +14 -0
- data/vendor/plugins/vizres/CHANGELOG +15 -0
- data/vendor/plugins/vizres/MIT-LICENSE +16 -0
- data/vendor/plugins/vizres/README +80 -0
- data/vendor/plugins/vizres/Rakefile +22 -0
- data/vendor/plugins/vizres/init.rb +1 -0
- data/vendor/plugins/vizres/lib/vizres.rb +33 -0
- data/vendor/plugins/vizres/lib/vizres/browser.rb +36 -0
- data/vendor/plugins/vizres/lib/vizres/scm.rb +27 -0
- data/vendor/plugins/vizres/test/vizres/browser_test.rb +76 -0
- data/vendor/plugins/vizres/test/vizres/scm_test.rb +41 -0
- data/vendor/plugins/vizres/test/vizres_test.rb +55 -0
- data/vendor/plugins/vizres/vizres.gemspec +26 -0
- data/vendor/rails/actionmailer/CHANGELOG +21 -0
- data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
- data/vendor/rails/actionmailer/README +14 -10
- data/vendor/rails/actionmailer/Rakefile +8 -4
- data/vendor/rails/actionmailer/lib/action_mailer.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +145 -101
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +7 -7
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +2 -2
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +3 -1
- data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +15 -10
- data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +2 -2
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb +5 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb +426 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +46 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb +46 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb +41 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb +63 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb +581 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb +960 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb +9 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb +1130 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb +3 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb +578 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb +495 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb +6 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb +3 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb +248 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb +132 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +1476 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.1.0 → tmail-1.2.3}/tmail/port.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb +118 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb +58 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb +49 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb +261 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb +280 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb +337 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb +39 -0
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
- data/vendor/rails/actionmailer/test/abstract_unit.rb +13 -6
- data/vendor/rails/actionmailer/test/delivery_method_test.rb +1 -1
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +1 -1
- data/vendor/rails/actionmailer/test/mail_render_test.rb +1 -1
- data/vendor/rails/actionmailer/test/mail_service_test.rb +50 -10
- data/vendor/rails/actionmailer/test/quoting_test.rb +19 -32
- data/vendor/rails/actionmailer/test/test_helper_test.rb +14 -2
- data/vendor/rails/actionmailer/test/tmail_test.rb +1 -1
- data/vendor/rails/actionmailer/test/url_test.rb +2 -2
- data/vendor/rails/actionpack/CHANGELOG +216 -0
- data/vendor/rails/actionpack/MIT-LICENSE +1 -1
- data/vendor/rails/actionpack/README +1 -1
- data/vendor/rails/actionpack/Rakefile +13 -8
- data/vendor/rails/actionpack/lib/action_controller.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +2 -1
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +8 -2
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +8 -5
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +56 -73
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +3 -3
- data/vendor/rails/actionpack/lib/action_controller/base.rb +115 -136
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +3 -3
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +41 -652
- data/vendor/rails/actionpack/lib/action_controller/caching/actions.rb +144 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +138 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/pages.rb +154 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb +18 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb +97 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +28 -24
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +1 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +6 -4
- data/vendor/rails/actionpack/lib/action_controller/components.rb +7 -6
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +31 -19
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +51 -84
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +294 -419
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +1 -6
- data/vendor/rails/actionpack/lib/action_controller/headers.rb +31 -0
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +26 -9
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +3 -5
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +68 -15
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +38 -54
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +7 -3
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +26 -7
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +123 -20
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +30 -17
- data/vendor/rails/actionpack/lib/action_controller/request.rb +79 -45
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +48 -40
- data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +44 -13
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +24 -24
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +66 -23
- data/vendor/rails/actionpack/lib/action_controller/response.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +120 -1232
- data/vendor/rails/actionpack/lib/action_controller/routing/builder.rb +203 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb +120 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb +162 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/route.rb +240 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +436 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/routing_ext.rb +46 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/segments.rb +283 -0
- data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +18 -14
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +22 -20
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +10 -3
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +45 -31
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +5 -5
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +41 -11
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +46 -40
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +44 -37
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +73 -57
- data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
- data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view.rb +11 -3
- data/vendor/rails/actionpack/lib/action_view/base.rb +86 -381
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +84 -63
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +126 -60
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +50 -18
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +5 -3
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +3 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +1 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +107 -85
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +156 -78
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +57 -24
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +47 -21
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +4 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +11 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +69 -37
- data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +3 -3
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +23 -17
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +86 -60
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +4 -3
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +153 -125
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +90 -41
- data/vendor/rails/actionpack/lib/action_view/inline_template.rb +20 -0
- data/vendor/rails/actionpack/lib/action_view/partial_template.rb +70 -0
- data/vendor/rails/actionpack/lib/action_view/partials.rb +31 -73
- data/vendor/rails/actionpack/lib/action_view/template.rb +127 -0
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +18 -10
- data/vendor/rails/actionpack/lib/action_view/template_finder.rb +177 -0
- data/vendor/rails/actionpack/lib/action_view/template_handler.rb +18 -1
- data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +10 -2
- data/vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb +128 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +37 -2
- data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +14 -1
- data/vendor/rails/actionpack/lib/action_view/test_case.rb +58 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +1 -1
- data/vendor/rails/actionpack/test/active_record_unit.rb +3 -6
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +2 -3
- data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +158 -41
- data/vendor/rails/actionpack/test/adv_attr_test.rb +20 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +57 -6
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +19 -7
- data/vendor/rails/actionpack/test/controller/base_test.rb +88 -3
- data/vendor/rails/actionpack/test/controller/benchmark_test.rb +1 -2
- data/vendor/rails/actionpack/test/controller/caching_test.rb +282 -21
- data/vendor/rails/actionpack/test/controller/capture_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/cgi_test.rb +5 -4
- data/vendor/rails/actionpack/test/controller/components_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +2 -2
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +13 -2
- data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +14 -10
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +33 -51
- data/vendor/rails/actionpack/test/controller/fake_controllers.rb +17 -0
- data/vendor/rails/actionpack/test/controller/fake_models.rb +6 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +14 -8
- data/vendor/rails/actionpack/test/controller/filters_test.rb +44 -19
- data/vendor/rails/actionpack/test/controller/flash_test.rb +2 -2
- data/vendor/rails/actionpack/test/controller/header_test.rb +14 -0
- data/vendor/rails/actionpack/test/controller/helper_test.rb +19 -15
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +26 -2
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +1 -2
- data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +15 -6
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +1 -2
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +2 -3
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +8 -2
- data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/integration_test.rb +14 -17
- data/vendor/rails/actionpack/test/controller/integration_upload_test.rb +43 -0
- data/vendor/rails/actionpack/test/controller/layout_test.rb +26 -6
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +39 -7
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +34 -5
- data/vendor/rails/actionpack/test/controller/new_render_test.rb +150 -37
- data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +153 -77
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +38 -2
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +32 -1
- data/vendor/rails/actionpack/test/controller/render_test.rb +78 -15
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +101 -5
- data/vendor/rails/actionpack/test/controller/request_test.rb +103 -11
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +22 -6
- data/vendor/rails/actionpack/test/controller/resources_test.rb +117 -31
- data/vendor/rails/actionpack/test/controller/routing_test.rb +286 -25
- data/vendor/rails/actionpack/test/controller/selector_test.rb +2 -2
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +14 -3
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +16 -4
- data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +3 -4
- data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/session_management_test.rb +23 -1
- data/vendor/rails/actionpack/test/controller/test_test.rb +82 -10
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +69 -5
- data/vendor/rails/actionpack/test/controller/verification_test.rb +35 -18
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +15 -12
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +48 -3
- data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/company.rb +1 -0
- data/vendor/rails/actionpack/test/fixtures/customers/_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +6 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/good_customers/_good_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/mascot.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/mascots.yml +4 -0
- data/vendor/rails/actionpack/test/fixtures/mascots/_mascot.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/controls.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/dragdrop.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/effects.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/prototype.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/version.1.0.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/version.1.0.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/reply.rb +1 -0
- data/vendor/rails/actionpack/test/fixtures/shared.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/symlink_parent/symlinked_layout.erb +5 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_counter.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_form.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_labelling_form.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_raise.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/greeting.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_from_template.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/topics/_topic.html.erb +1 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +25 -8
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +117 -30
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +81 -3
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +10 -22
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +515 -162
- data/vendor/rails/actionpack/test/template/deprecated_erb_variable_test.rb +9 -0
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +10 -42
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +192 -66
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +514 -477
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +42 -8
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +10 -13
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +7 -3
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +41 -46
- data/vendor/rails/actionpack/test/template/record_tag_helper_test.rb +54 -0
- data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +5 -6
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +7 -13
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +3 -6
- data/vendor/rails/actionpack/test/template/template_finder_test.rb +73 -0
- data/vendor/rails/actionpack/test/template/template_object_test.rb +95 -0
- data/vendor/rails/actionpack/test/template/test_test.rb +56 -0
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +75 -43
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +20 -12
- data/vendor/rails/actionpack/test/testing_sandbox.rb +8 -4
- data/vendor/rails/activerecord/CHANGELOG +235 -2
- data/vendor/rails/activerecord/README +27 -22
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +7 -4
- data/vendor/rails/activerecord/Rakefile +27 -26
- data/vendor/rails/activerecord/lib/active_record.rb +16 -12
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +21 -12
- data/vendor/rails/activerecord/lib/active_record/association_preload.rb +285 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +696 -453
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +167 -39
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +73 -13
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +5 -3
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +5 -6
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +26 -79
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +19 -72
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +90 -120
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +9 -7
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb +32 -0
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +73 -22
- data/vendor/rails/activerecord/lib/active_record/base.rb +581 -308
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +52 -27
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +9 -38
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +4 -3
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +9 -4
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +6 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +248 -56
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +159 -37
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +10 -13
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +99 -36
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +204 -57
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +43 -16
- data/vendor/rails/activerecord/lib/active_record/dirty.rb +165 -0
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +144 -181
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +15 -11
- data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/migration.rb +187 -81
- data/vendor/rails/activerecord/lib/active_record/named_scope.rb +168 -0
- data/vendor/rails/activerecord/lib/active_record/observer.rb +24 -8
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +38 -14
- data/vendor/rails/activerecord/lib/active_record/schema.rb +7 -14
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +4 -4
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +5 -5
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +37 -28
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +52 -29
- data/vendor/rails/activerecord/lib/active_record/test_case.rb +47 -0
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +4 -4
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +6 -8
- data/vendor/rails/activerecord/lib/active_record/validations.rb +201 -255
- data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
- data/vendor/rails/activerecord/test/{fixtures → assets}/example.log +0 -0
- data/vendor/rails/activerecord/test/{fixtures → assets}/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb +24 -0
- data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +95 -0
- data/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb +24 -0
- data/vendor/rails/activerecord/test/cases/adapter_test.rb +127 -0
- data/vendor/rails/activerecord/test/cases/adapter_test_sqlserver.rb +95 -0
- data/vendor/rails/activerecord/test/cases/aggregations_test.rb +128 -0
- data/vendor/rails/activerecord/test/cases/ar_schema_test.rb +33 -0
- data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +431 -0
- data/vendor/rails/activerecord/test/cases/associations/callbacks_test.rb +161 -0
- data/vendor/rails/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +123 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +36 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +83 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_singularization_test.rb +145 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +643 -0
- data/vendor/rails/activerecord/test/cases/associations/extension_test.rb +62 -0
- data/vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +706 -0
- data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +1034 -0
- data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +200 -0
- data/vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb +345 -0
- data/vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb +113 -0
- data/vendor/rails/activerecord/test/cases/associations/inner_join_association_test.rb +88 -0
- data/vendor/rails/activerecord/test/cases/associations/join_model_test.rb +714 -0
- data/vendor/rails/activerecord/test/cases/associations_test.rb +262 -0
- data/vendor/rails/activerecord/test/cases/attribute_methods_test.rb +238 -0
- data/vendor/rails/activerecord/test/cases/base_test.rb +2015 -0
- data/vendor/rails/activerecord/test/cases/binary_test.rb +34 -0
- data/vendor/rails/activerecord/test/cases/calculations_test.rb +323 -0
- data/vendor/rails/activerecord/test/cases/callbacks_test.rb +400 -0
- data/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb +32 -0
- data/vendor/rails/activerecord/test/cases/column_alias_test.rb +17 -0
- data/vendor/rails/activerecord/test/cases/column_definition_test.rb +36 -0
- data/vendor/rails/activerecord/test/cases/connection_test_firebird.rb +8 -0
- data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +30 -0
- data/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb +69 -0
- data/vendor/rails/activerecord/test/cases/database_statements_test.rb +12 -0
- data/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb +203 -0
- data/vendor/rails/activerecord/test/cases/date_time_test.rb +37 -0
- data/vendor/rails/activerecord/test/cases/default_test_firebird.rb +16 -0
- data/vendor/rails/activerecord/test/cases/defaults_test.rb +69 -0
- data/vendor/rails/activerecord/test/cases/deprecated_finder_test.rb +30 -0
- data/vendor/rails/activerecord/test/cases/dirty_test.rb +257 -0
- data/vendor/rails/activerecord/test/cases/finder_respond_to_test.rb +76 -0
- data/vendor/rails/activerecord/test/cases/finder_test.rb +898 -0
- data/vendor/rails/activerecord/test/cases/fixtures_test.rb +626 -0
- data/vendor/rails/activerecord/test/cases/helper.rb +47 -0
- data/vendor/rails/activerecord/test/cases/inheritance_test.rb +262 -0
- data/vendor/rails/activerecord/test/cases/invalid_date_test.rb +24 -0
- data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +205 -0
- data/vendor/rails/activerecord/test/cases/lifecycle_test.rb +193 -0
- data/vendor/rails/activerecord/test/cases/locking_test.rb +309 -0
- data/vendor/rails/activerecord/test/cases/method_scoping_test.rb +462 -0
- data/vendor/rails/activerecord/test/cases/migration_test.rb +1444 -0
- data/vendor/rails/activerecord/test/cases/migration_test_firebird.rb +124 -0
- data/vendor/rails/activerecord/test/cases/mixin_test.rb +96 -0
- data/vendor/rails/activerecord/test/cases/modules_test.rb +39 -0
- data/vendor/rails/activerecord/test/cases/multiple_db_test.rb +60 -0
- data/vendor/rails/activerecord/test/cases/named_scope_test.rb +206 -0
- data/vendor/rails/activerecord/test/cases/pk_test.rb +101 -0
- data/vendor/rails/activerecord/test/cases/query_cache_test.rb +127 -0
- data/vendor/rails/activerecord/test/cases/readonly_test.rb +107 -0
- data/vendor/rails/activerecord/test/cases/reflection_test.rb +176 -0
- data/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb +176 -0
- data/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb +75 -0
- data/vendor/rails/activerecord/test/cases/schema_dumper_test.rb +184 -0
- data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +102 -0
- data/vendor/rails/activerecord/test/cases/serialization_test.rb +47 -0
- data/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb +17 -0
- data/vendor/rails/activerecord/test/cases/table_name_test_sqlserver.rb +23 -0
- data/vendor/rails/activerecord/test/cases/threaded_connections_test.rb +48 -0
- data/vendor/rails/activerecord/test/cases/transactions_test.rb +307 -0
- data/vendor/rails/activerecord/test/cases/unconnected_test.rb +32 -0
- data/vendor/rails/activerecord/test/cases/validations_test.rb +1541 -0
- data/vendor/rails/activerecord/test/cases/xml_serialization_test.rb +202 -0
- data/vendor/rails/activerecord/test/config.rb +5 -0
- data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +1 -1
- data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +1 -3
- data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +2 -2
- data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +2 -2
- data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +3 -3
- data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +1 -1
- data/vendor/rails/activerecord/test/fixtures/author_addresses.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/authors.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/clubs.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/jobs.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/members.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/memberships.yml +20 -0
- data/vendor/rails/activerecord/test/fixtures/owners.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/people.yml +4 -1
- data/vendor/rails/activerecord/test/fixtures/pets.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/posts.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/price_estimates.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/readers.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/references.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/sponsors.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/subscriptions.yml +12 -0
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +4 -1
- data/vendor/rails/activerecord/test/fixtures/topics.yml +22 -2
- data/vendor/rails/activerecord/test/fixtures/warehouse-things.yml +3 -0
- data/vendor/rails/activerecord/test/{fixtures/migrations_with_decimal → migrations/decimal}/1_give_me_big_numbers.rb +0 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/{fixtures/migrations_with_duplicate → migrations/duplicate}/3_foo.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures/migrations → migrations/duplicate}/3_innocent_jointable.rb +0 -0
- data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb +7 -0
- data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb +7 -0
- data/vendor/rails/activerecord/test/{fixtures/migrations_with_duplicate → migrations/interleaved/pass_1}/3_innocent_jointable.rb +0 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/{fixtures/migrations_with_missing_versions/4_innocent_jointable.rb → migrations/interleaved/pass_2/3_innocent_jointable.rb} +0 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +8 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/models/author.rb +137 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/auto_id.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/binary.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/book.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/categorization.rb +0 -0
- data/vendor/rails/activerecord/test/models/category.rb +30 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/citation.rb +0 -0
- data/vendor/rails/activerecord/test/models/club.rb +7 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/column_name.rb +0 -0
- data/vendor/rails/activerecord/test/models/comment.rb +25 -0
- data/vendor/rails/activerecord/test/models/company.rb +132 -0
- data/vendor/rails/activerecord/test/models/company_in_module.rb +61 -0
- data/vendor/rails/activerecord/test/models/computer.rb +3 -0
- data/vendor/rails/activerecord/test/models/contact.rb +16 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/course.rb +0 -0
- data/vendor/rails/activerecord/test/models/customer.rb +55 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/default.rb +0 -0
- data/vendor/rails/activerecord/test/models/developer.rb +79 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/edge.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/entrant.rb +0 -0
- data/vendor/rails/activerecord/test/models/guid.rb +2 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/item.rb +0 -0
- data/vendor/rails/activerecord/test/models/job.rb +5 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/joke.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/keyboard.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/legacy_thing.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/matey.rb +0 -0
- data/vendor/rails/activerecord/test/models/member.rb +9 -0
- data/vendor/rails/activerecord/test/models/membership.rb +9 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/minimalistic.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/mixed_case_monkey.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/movie.rb +0 -0
- data/vendor/rails/activerecord/test/models/order.rb +4 -0
- data/vendor/rails/activerecord/test/models/owner.rb +4 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/parrot.rb +0 -0
- data/vendor/rails/activerecord/test/models/person.rb +10 -0
- data/vendor/rails/activerecord/test/models/pet.rb +4 -0
- data/vendor/rails/activerecord/test/models/pirate.rb +9 -0
- data/vendor/rails/activerecord/test/models/post.rb +85 -0
- data/vendor/rails/activerecord/test/models/price_estimate.rb +3 -0
- data/vendor/rails/activerecord/test/models/project.rb +29 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/reader.rb +0 -0
- data/vendor/rails/activerecord/test/models/reference.rb +4 -0
- data/vendor/rails/activerecord/test/models/reply.rb +39 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/ship.rb +0 -0
- data/vendor/rails/activerecord/test/models/sponsor.rb +4 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/subject.rb +0 -0
- data/vendor/rails/activerecord/test/models/subscriber.rb +8 -0
- data/vendor/rails/activerecord/test/models/subscription.rb +4 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/tag.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/tagging.rb +0 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/task.rb +0 -0
- data/vendor/rails/activerecord/test/models/topic.rb +66 -0
- data/vendor/rails/activerecord/test/models/treasure.rb +6 -0
- data/vendor/rails/activerecord/test/{fixtures → models}/vertex.rb +0 -0
- data/vendor/rails/activerecord/test/models/warehouse_thing.rb +5 -0
- data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +12 -0
- data/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb +103 -0
- data/vendor/rails/activerecord/test/schema/schema.rb +429 -0
- data/vendor/rails/activerecord/test/schema/schema2.rb +6 -0
- data/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb +25 -0
- data/vendor/rails/activerecord/test/schema/sqlserver_specific_schema.rb +5 -0
- data/vendor/rails/activeresource/CHANGELOG +33 -0
- data/vendor/rails/activeresource/Rakefile +9 -5
- data/vendor/rails/activeresource/lib/active_resource.rb +1 -1
- data/vendor/rails/activeresource/lib/active_resource/base.rb +309 -160
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +41 -6
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +58 -44
- data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +1 -1
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +82 -12
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +2 -2
- data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
- data/vendor/rails/activeresource/test/abstract_unit.rb +17 -1
- data/vendor/rails/activeresource/test/authorization_test.rb +45 -5
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +6 -3
- data/vendor/rails/activeresource/test/base/equality_test.rb +1 -1
- data/vendor/rails/activeresource/test/base/load_test.rb +36 -1
- data/vendor/rails/activeresource/test/base_errors_test.rb +1 -1
- data/vendor/rails/activeresource/test/base_test.rb +422 -28
- data/vendor/rails/activeresource/test/connection_test.rb +22 -2
- data/vendor/rails/activeresource/test/fixtures/customer.rb +3 -0
- data/vendor/rails/activeresource/test/format_test.rb +43 -2
- data/vendor/rails/activeresource/test/setter_trap.rb +1 -1
- data/vendor/rails/activesupport/CHANGELOG +214 -2
- data/vendor/rails/activesupport/lib/active_support.rb +13 -1
- data/vendor/rails/activesupport/lib/active_support/base64.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/basic_object.rb +23 -4
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +17 -3
- data/vendor/rails/activesupport/lib/active_support/cache.rb +147 -0
- data/vendor/rails/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/cache/drb_store.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/cache/file_store.rb +70 -0
- data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +100 -0
- data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/callbacks.rb +275 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +2 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +89 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +2 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +3 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/base64.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +39 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +5 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +7 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +7 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +28 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +13 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +37 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +41 -19
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +19 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +6 -6
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +27 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +4 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +6 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +4 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +3 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +10 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +2 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +4 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +11 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +5 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +56 -16
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +3 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/process.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +16 -6
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +5 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +3 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/rexml.rb +36 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +5 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +72 -48
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +4 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/filters.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +58 -63
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +12 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +54 -30
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +5 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +24 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +75 -23
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +33 -38
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb +86 -0
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +418 -405
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +29 -10
- data/vendor/rails/activesupport/lib/active_support/duration.rb +4 -4
- data/vendor/rails/activesupport/lib/active_support/gzip.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +51 -49
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +267 -236
- data/vendor/rails/activesupport/lib/active_support/json.rb +17 -25
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +9 -6
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +11 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +11 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +3 -6
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +8 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +11 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +10 -14
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +11 -11
- data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +43 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +13 -43
- data/vendor/rails/activesupport/lib/active_support/string_inquirer.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +10 -2
- data/vendor/rails/activesupport/lib/active_support/testing/default.rb +3 -6
- data/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb +93 -0
- data/vendor/rails/activesupport/lib/active_support/time_with_zone.rb +304 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +378 -163
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.5.0/memcache.rb +849 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/data_timezone.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/data_timezone_info.rb +228 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Argentina/San_Juan.rb +170 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Bogota.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Caracas.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Chicago.rb +283 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Denver.rb +204 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Godthab.rb +161 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Halifax.rb +274 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Juneau.rb +194 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Lima.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/New_York.rb +282 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Regina.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Santiago.rb +205 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/London.rb +288 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/info_timezone.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/linked_timezone.rb +51 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/linked_timezone_info.rb +44 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/offset_rationals.rb +98 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/ruby_core_support.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/time_or_datetime.rb +292 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone.rb +508 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_definition.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_info.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_offset_info.rb +94 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_period.rb +198 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_transition_info.rb +129 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +30 -10
- data/vendor/rails/railties/CHANGELOG +148 -0
- data/vendor/rails/railties/MIT-LICENSE +1 -1
- data/vendor/rails/railties/README +67 -14
- data/vendor/rails/railties/Rakefile +15 -21
- data/vendor/rails/railties/bin/about +2 -1
- data/vendor/rails/railties/bin/dbconsole +3 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +22 -20
- data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +1 -1
- data/vendor/rails/railties/configs/databases/frontbase.yml +2 -2
- data/vendor/rails/railties/configs/databases/mysql.yml +2 -2
- data/vendor/rails/railties/configs/databases/oracle.yml +3 -3
- data/vendor/rails/railties/configs/databases/postgresql.yml +2 -2
- data/vendor/rails/railties/configs/databases/sqlite2.yml +2 -2
- data/vendor/rails/railties/configs/databases/sqlite3.yml +2 -2
- data/vendor/rails/railties/configs/initializers/inflections.rb +1 -1
- data/vendor/rails/railties/configs/initializers/new_rails_defaults.rb +17 -0
- data/vendor/rails/railties/configs/routes.rb +8 -0
- data/vendor/rails/railties/dispatches/gateway.cgi +2 -2
- data/vendor/rails/railties/environments/boot.rb +6 -6
- data/vendor/rails/railties/environments/development.rb +0 -1
- data/vendor/rails/railties/environments/environment.rb +15 -7
- data/vendor/rails/railties/environments/production.rb +3 -0
- data/vendor/rails/railties/environments/test.rb +1 -1
- data/vendor/rails/railties/helpers/application.rb +5 -0
- data/vendor/rails/railties/html/images/rails.png +0 -0
- data/vendor/rails/railties/html/index.html +6 -9
- data/vendor/rails/railties/html/javascripts/controls.js +1 -1
- data/vendor/rails/railties/html/javascripts/dragdrop.js +1 -1
- data/vendor/rails/railties/html/javascripts/effects.js +1 -1
- data/vendor/rails/railties/lib/commands/about.rb +1 -0
- data/vendor/rails/railties/lib/commands/console.rb +5 -5
- data/vendor/rails/railties/lib/commands/dbconsole.rb +67 -0
- data/vendor/rails/railties/lib/commands/performance/profiler.rb +1 -1
- data/vendor/rails/railties/lib/commands/plugin.rb +30 -3
- data/vendor/rails/railties/lib/commands/server.rb +2 -2
- data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +1 -1
- data/vendor/rails/railties/lib/commands/servers/mongrel.rb +9 -9
- data/vendor/rails/railties/lib/commands/servers/new_mongrel.rb +16 -0
- data/vendor/rails/railties/lib/commands/servers/webrick.rb +1 -1
- data/vendor/rails/railties/lib/console_app.rb +2 -2
- data/vendor/rails/railties/lib/console_sandbox.rb +2 -2
- data/vendor/rails/railties/lib/console_with_helpers.rb +1 -1
- data/vendor/rails/railties/lib/dispatcher.rb +1 -1
- data/vendor/rails/railties/lib/fcgi_handler.rb +32 -16
- data/vendor/rails/railties/lib/initializer.rb +303 -70
- data/vendor/rails/railties/lib/rails/gem_builder.rb +21 -0
- data/vendor/rails/railties/lib/rails/gem_dependency.rb +129 -0
- data/vendor/rails/railties/lib/rails/mongrel_server/commands.rb +342 -0
- data/vendor/rails/railties/lib/rails/mongrel_server/handler.rb +55 -0
- data/vendor/rails/railties/lib/rails/plugin.rb +51 -19
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +4 -2
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +24 -2
- data/vendor/rails/railties/lib/rails/version.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/base.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/commands.rb +85 -54
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +9 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +1 -4
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +2 -6
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +8 -6
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +4 -4
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +2 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +4 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +0 -20
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +3 -4
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +3 -4
- data/vendor/rails/railties/lib/rails_generator/lookup.rb +9 -4
- data/vendor/rails/railties/lib/rails_generator/options.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +8 -5
- data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +12 -8
- data/vendor/rails/railties/lib/source_annotation_extractor.rb +40 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +81 -55
- data/vendor/rails/railties/lib/tasks/documentation.rake +4 -4
- data/vendor/rails/railties/lib/tasks/framework.rake +23 -27
- data/vendor/rails/railties/lib/tasks/gems.rake +64 -0
- data/vendor/rails/railties/lib/tasks/misc.rake +47 -0
- data/vendor/rails/railties/lib/tasks/rails.rb +1 -1
- data/vendor/rails/railties/lib/tasks/testing.rake +3 -3
- data/vendor/rails/railties/lib/test_help.rb +8 -0
- metadata +788 -1204
- data/app/controllers/admin/extension_controller.rb +0 -5
- data/app/controllers/admin/layout_controller.rb +0 -21
- data/app/controllers/admin/page_controller.rb +0 -115
- data/app/controllers/admin/snippet_controller.rb +0 -3
- data/app/controllers/admin/user_controller.rb +0 -44
- data/app/helpers/admin/extension_helper.rb +0 -2
- data/app/helpers/admin/layout_helper.rb +0 -2
- data/app/helpers/admin/page_helper.rb +0 -69
- data/app/helpers/admin/snippet_helper.rb +0 -2
- data/app/helpers/admin/user_helper.rb +0 -8
- data/app/models/radiant/extension_meta.rb +0 -5
- data/app/views/admin/extension/index.html.haml +0 -28
- data/app/views/admin/layout/edit.html.haml +0 -44
- data/app/views/admin/layout/index.html.haml +0 -25
- data/app/views/admin/layout/remove.html.haml +0 -16
- data/app/views/admin/page/_meta_row.html.haml +0 -6
- data/app/views/admin/page/_node.html.haml +0 -25
- data/app/views/admin/page/_part.html.haml +0 -17
- data/app/views/admin/page/_tag_reference.html.haml +0 -3
- data/app/views/admin/page/children.html.haml +0 -2
- data/app/views/admin/page/edit.html.haml +0 -115
- data/app/views/admin/page/filter_reference.rjs +0 -5
- data/app/views/admin/page/index.html.haml +0 -28
- data/app/views/admin/page/remove.html.haml +0 -20
- data/app/views/admin/page/tag_reference.rjs +0 -5
- data/app/views/admin/snippet/edit.html.haml +0 -36
- data/app/views/admin/snippet/index.html.haml +0 -20
- data/app/views/admin/snippet/remove.html.haml +0 -19
- data/app/views/admin/user/edit.html.haml +0 -80
- data/app/views/admin/user/index.html.haml +0 -23
- data/app/views/admin/user/preferences.html.haml +0 -28
- data/app/views/admin/user/remove.html.haml +0 -18
- data/lib/plugins/dependencies_fix/init.rb +0 -6
- data/lib/plugins/string_io/init.rb +0 -2
- data/spec/controllers/admin/abstract_model_controller_spec.rb +0 -265
- data/spec/controllers/admin/extension_controller_spec.rb +0 -21
- data/spec/controllers/admin/layout_controller_spec.rb +0 -42
- data/spec/controllers/admin/page_controller_spec.rb +0 -287
- data/spec/controllers/admin/snippet_controller_spec.rb +0 -27
- data/spec/controllers/admin/user_controller_spec.rb +0 -72
- data/spec/helpers/admin/extension_helper_spec.rb +0 -4
- data/spec/helpers/admin/layout_helper_spec.rb +0 -4
- data/spec/helpers/admin/page_helper_spec.rb +0 -45
- data/spec/helpers/admin/snippet_helper_spec.rb +0 -4
- data/spec/helpers/admin/user_helper_spec.rb +0 -11
- data/spec/scenarios/file_not_found_scenario.rb +0 -19
- data/spec/scenarios/home_page_scenario.rb +0 -64
- data/spec/scenarios/layouts_scenario.rb +0 -58
- data/spec/scenarios/markup_pages_scenario.rb +0 -13
- data/spec/scenarios/pages_scenario.rb +0 -56
- data/spec/scenarios/pages_with_layouts_scenario.rb +0 -10
- data/spec/scenarios/snippets_scenario.rb +0 -38
- data/spec/scenarios/users_and_pages_scenario.rb +0 -9
- data/spec/scenarios/users_scenario.rb +0 -43
- data/test/fixtures/extensions/01_basic/db/migrate/001_create_initial_schema.rb +0 -8
- data/test/fixtures/extensions/01_basic/db/migrate/002_modify_initial_schema.rb +0 -8
- data/test/fixtures/layouts.yml +0 -26
- data/test/fixtures/page_parts.yml +0 -119
- data/test/fixtures/pages.yml +0 -353
- data/test/fixtures/sample.txt +0 -1
- data/test/fixtures/snippets.yml +0 -26
- data/test/fixtures/users.yml +0 -35
- data/test/helpers/caching_test_helper.rb +0 -42
- data/test/helpers/difference_test_helper.rb +0 -13
- data/test/helpers/extension_fixture_test_helper.rb +0 -40
- data/test/helpers/extension_tag_test_helper.rb +0 -17
- data/test/helpers/layout_test_helper.rb +0 -35
- data/test/helpers/logging_test_helper.rb +0 -20
- data/test/helpers/login_test_helper.rb +0 -23
- data/test/helpers/page_part_test_helper.rb +0 -49
- data/test/helpers/routing_test_helper.rb +0 -19
- data/test/helpers/snippet_test_helper.rb +0 -32
- data/vendor/extensions/archive/spec/scenarios/archive_scenario.rb +0 -51
- data/vendor/plugins/rspec/CHANGES +0 -1079
- data/vendor/plugins/rspec/MIT-LICENSE +0 -20
- data/vendor/plugins/rspec/README +0 -71
- data/vendor/plugins/rspec/Rakefile +0 -279
- data/vendor/plugins/rspec/TODO +0 -2
- data/vendor/plugins/rspec/UPGRADE +0 -31
- data/vendor/plugins/rspec/bin/spec +0 -4
- data/vendor/plugins/rspec/bin/spec_translator +0 -8
- data/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +0 -19
- data/vendor/plugins/rspec/examples/pure/before_and_after_example.rb +0 -40
- data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +0 -45
- data/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb +0 -54
- data/vendor/plugins/rspec/examples/pure/custom_formatter.rb +0 -12
- data/vendor/plugins/rspec/examples/pure/dynamic_spec.rb +0 -9
- data/vendor/plugins/rspec/examples/pure/file_accessor.rb +0 -19
- data/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb +0 -38
- data/vendor/plugins/rspec/examples/pure/greeter_spec.rb +0 -31
- data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +0 -14
- data/vendor/plugins/rspec/examples/pure/io_processor.rb +0 -8
- data/vendor/plugins/rspec/examples/pure/io_processor_spec.rb +0 -21
- data/vendor/plugins/rspec/examples/pure/legacy_spec.rb +0 -11
- data/vendor/plugins/rspec/examples/pure/mocking_example.rb +0 -27
- data/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb +0 -28
- data/vendor/plugins/rspec/examples/pure/nested_classes_example.rb +0 -36
- data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +0 -28
- data/vendor/plugins/rspec/examples/pure/pending_example.rb +0 -20
- data/vendor/plugins/rspec/examples/pure/predicate_example.rb +0 -27
- data/vendor/plugins/rspec/examples/pure/priority.txt +0 -1
- data/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb +0 -81
- data/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb +0 -38
- data/vendor/plugins/rspec/examples/pure/spec_helper.rb +0 -3
- data/vendor/plugins/rspec/examples/pure/stack.rb +0 -36
- data/vendor/plugins/rspec/examples/pure/stack_spec.rb +0 -63
- data/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +0 -67
- data/vendor/plugins/rspec/examples/pure/stubbing_example.rb +0 -69
- data/vendor/plugins/rspec/examples/stories/adder.rb +0 -13
- data/vendor/plugins/rspec/examples/stories/addition +0 -34
- data/vendor/plugins/rspec/examples/stories/addition.rb +0 -9
- data/vendor/plugins/rspec/examples/stories/calculator.rb +0 -65
- data/vendor/plugins/rspec/examples/stories/game-of-life/README.txt +0 -21
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +0 -6
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/examples.rb +0 -3
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +0 -35
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +0 -66
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +0 -21
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +0 -21
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +0 -42
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story +0 -42
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanKillACell.story +0 -17
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/TheGridWraps.story +0 -53
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +0 -52
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/helper.rb +0 -6
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +0 -26
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/steps.rb +0 -5
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.rb +0 -3
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.txt +0 -22
- data/vendor/plugins/rspec/examples/stories/game-of-life/life.rb +0 -3
- data/vendor/plugins/rspec/examples/stories/game-of-life/life/game.rb +0 -23
- data/vendor/plugins/rspec/examples/stories/game-of-life/life/grid.rb +0 -43
- data/vendor/plugins/rspec/examples/stories/helper.rb +0 -9
- data/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb +0 -18
- data/vendor/plugins/rspec/failing_examples/README.txt +0 -7
- data/vendor/plugins/rspec/failing_examples/diffing_spec.rb +0 -36
- data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +0 -19
- data/vendor/plugins/rspec/failing_examples/failure_in_setup.rb +0 -10
- data/vendor/plugins/rspec/failing_examples/failure_in_teardown.rb +0 -10
- data/vendor/plugins/rspec/failing_examples/mocking_example.rb +0 -40
- data/vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb +0 -26
- data/vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb +0 -25
- data/vendor/plugins/rspec/failing_examples/mocking_with_rr.rb +0 -27
- data/vendor/plugins/rspec/failing_examples/partial_mock_example.rb +0 -20
- data/vendor/plugins/rspec/failing_examples/predicate_example.rb +0 -29
- data/vendor/plugins/rspec/failing_examples/raising_example.rb +0 -47
- data/vendor/plugins/rspec/failing_examples/spec_helper.rb +0 -3
- data/vendor/plugins/rspec/failing_examples/syntax_error_example.rb +0 -7
- data/vendor/plugins/rspec/failing_examples/team_spec.rb +0 -44
- data/vendor/plugins/rspec/failing_examples/timeout_behaviour.rb +0 -7
- data/vendor/plugins/rspec/init.rb +0 -9
- data/vendor/plugins/rspec/lib/autotest/discover.rb +0 -3
- data/vendor/plugins/rspec/lib/autotest/rspec.rb +0 -72
- data/vendor/plugins/rspec/lib/spec.rb +0 -30
- data/vendor/plugins/rspec/lib/spec/example.rb +0 -12
- data/vendor/plugins/rspec/lib/spec/example/configuration.rb +0 -144
- data/vendor/plugins/rspec/lib/spec/example/errors.rb +0 -9
- data/vendor/plugins/rspec/lib/spec/example/example_group.rb +0 -16
- data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +0 -58
- data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +0 -433
- data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +0 -42
- data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +0 -110
- data/vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb +0 -21
- data/vendor/plugins/rspec/lib/spec/example/pending.rb +0 -18
- data/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb +0 -58
- data/vendor/plugins/rspec/lib/spec/expectations.rb +0 -56
- data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +0 -66
- data/vendor/plugins/rspec/lib/spec/expectations/errors.rb +0 -12
- data/vendor/plugins/rspec/lib/spec/expectations/extensions.rb +0 -2
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +0 -71
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
- data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +0 -52
- data/vendor/plugins/rspec/lib/spec/extensions.rb +0 -4
- data/vendor/plugins/rspec/lib/spec/extensions/class.rb +0 -24
- data/vendor/plugins/rspec/lib/spec/extensions/main.rb +0 -102
- data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +0 -7
- data/vendor/plugins/rspec/lib/spec/extensions/object.rb +0 -6
- data/vendor/plugins/rspec/lib/spec/interop/test.rb +0 -12
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb +0 -6
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb +0 -61
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb +0 -6
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb +0 -34
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +0 -61
- data/vendor/plugins/rspec/lib/spec/matchers.rb +0 -156
- data/vendor/plugins/rspec/lib/spec/matchers/be.rb +0 -224
- data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +0 -37
- data/vendor/plugins/rspec/lib/spec/matchers/change.rb +0 -144
- data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +0 -43
- data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +0 -43
- data/vendor/plugins/rspec/lib/spec/matchers/exist.rb +0 -17
- data/vendor/plugins/rspec/lib/spec/matchers/has.rb +0 -34
- data/vendor/plugins/rspec/lib/spec/matchers/have.rb +0 -145
- data/vendor/plugins/rspec/lib/spec/matchers/include.rb +0 -70
- data/vendor/plugins/rspec/lib/spec/matchers/match.rb +0 -41
- data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +0 -73
- data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +0 -132
- data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +0 -45
- data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +0 -47
- data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +0 -29
- data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +0 -74
- data/vendor/plugins/rspec/lib/spec/mocks.rb +0 -211
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +0 -31
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb.orig +0 -27
- data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +0 -209
- data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +0 -84
- data/vendor/plugins/rspec/lib/spec/mocks/errors.rb +0 -10
- data/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb +0 -3
- data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +0 -269
- data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +0 -39
- data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +0 -50
- data/vendor/plugins/rspec/lib/spec/mocks/order_group.rb +0 -29
- data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +0 -166
- data/vendor/plugins/rspec/lib/spec/mocks/space.rb +0 -28
- data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +0 -38
- data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +0 -235
- data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +0 -52
- data/vendor/plugins/rspec/lib/spec/runner.rb +0 -202
- data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +0 -57
- data/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb +0 -16
- data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +0 -28
- data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +0 -20
- data/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb +0 -59
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +0 -77
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +0 -130
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +0 -33
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +0 -20
- data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +0 -333
- data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +0 -47
- data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +0 -30
- data/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +0 -52
- data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +0 -39
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +0 -128
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +0 -131
- data/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb +0 -16
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +0 -72
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb +0 -10
- data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +0 -205
- data/vendor/plugins/rspec/lib/spec/runner/options.rb +0 -288
- data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +0 -147
- data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +0 -71
- data/vendor/plugins/rspec/lib/spec/story.rb +0 -10
- data/vendor/plugins/rspec/lib/spec/story/extensions.rb +0 -3
- data/vendor/plugins/rspec/lib/spec/story/extensions/main.rb +0 -86
- data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +0 -9
- data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +0 -9
- data/vendor/plugins/rspec/lib/spec/story/given_scenario.rb +0 -14
- data/vendor/plugins/rspec/lib/spec/story/runner.rb +0 -56
- data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +0 -48
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_collector.rb +0 -18
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +0 -48
- data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +0 -123
- data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +0 -227
- data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +0 -70
- data/vendor/plugins/rspec/lib/spec/story/scenario.rb +0 -14
- data/vendor/plugins/rspec/lib/spec/story/step.rb +0 -58
- data/vendor/plugins/rspec/lib/spec/story/step_group.rb +0 -89
- data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +0 -37
- data/vendor/plugins/rspec/lib/spec/story/story.rb +0 -39
- data/vendor/plugins/rspec/lib/spec/story/world.rb +0 -124
- data/vendor/plugins/rspec/lib/spec/translator.rb +0 -114
- data/vendor/plugins/rspec/lib/spec/version.rb +0 -22
- data/vendor/plugins/rspec/plugins/mock_frameworks/flexmock.rb +0 -23
- data/vendor/plugins/rspec/plugins/mock_frameworks/mocha.rb +0 -19
- data/vendor/plugins/rspec/plugins/mock_frameworks/rr.rb +0 -21
- data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +0 -18
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +0 -4
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +0 -50
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +0 -54
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +0 -111
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +0 -314
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +0 -15
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +0 -51
- data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +0 -3
- data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +0 -11
- data/vendor/plugins/rspec/rake_tasks/examples.rake +0 -7
- data/vendor/plugins/rspec/rake_tasks/examples_with_rcov.rake +0 -9
- data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +0 -9
- data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +0 -7
- data/vendor/plugins/rspec/spec/README.jruby +0 -15
- data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +0 -19
- data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +0 -197
- data/vendor/plugins/rspec/spec/autotest_helper.rb +0 -6
- data/vendor/plugins/rspec/spec/rspec_suite.rb +0 -7
- data/vendor/plugins/rspec/spec/ruby_forker.rb +0 -13
- data/vendor/plugins/rspec/spec/spec.opts +0 -6
- data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +0 -282
- data/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb +0 -48
- data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +0 -135
- data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +0 -523
- data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +0 -711
- data/vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb +0 -96
- data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +0 -115
- data/vendor/plugins/rspec/spec/spec/example/example_runner_spec.rb +0 -194
- data/vendor/plugins/rspec/spec/spec/example/example_spec.rb +0 -53
- data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +0 -71
- data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +0 -31
- data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +0 -21
- data/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb +0 -265
- data/vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb +0 -25
- data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +0 -127
- data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +0 -107
- data/vendor/plugins/rspec/spec/spec/expectations/fail_with_spec.rb +0 -71
- data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +0 -76
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +0 -10
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +0 -38
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +0 -14
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +0 -9
- data/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb +0 -39
- data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +0 -248
- data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +0 -319
- data/vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb +0 -153
- data/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb +0 -28
- data/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb +0 -28
- data/vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb +0 -57
- data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +0 -129
- data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +0 -53
- data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +0 -291
- data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +0 -37
- data/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +0 -78
- data/vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb +0 -24
- data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +0 -158
- data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +0 -315
- data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +0 -54
- data/vendor/plugins/rspec/spec/spec/matchers/satisfy_spec.rb +0 -36
- data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +0 -31
- data/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +0 -54
- data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +0 -29
- data/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb +0 -23
- data/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb +0 -97
- data/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb +0 -93
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10260_spec.rb +0 -8
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263_spec.rb +0 -24
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +0 -33
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +0 -30
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +0 -19
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7805_spec.rb +0 -22
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8165_spec.rb +0 -31
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +0 -26
- data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +0 -123
- data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +0 -32
- data/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +0 -84
- data/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb +0 -54
- data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +0 -481
- data/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +0 -113
- data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +0 -40
- data/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb +0 -53
- data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +0 -106
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +0 -66
- data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +0 -160
- data/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb +0 -52
- data/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb +0 -26
- data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +0 -181
- data/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +0 -67
- data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +0 -14
- data/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +0 -23
- data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +0 -147
- data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +0 -92
- data/vendor/plugins/rspec/spec/spec/runner/examples.txt +0 -2
- data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +0 -37
- data/vendor/plugins/rspec/spec/spec/runner/failed.txt +0 -3
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +0 -33
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +0 -365
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +0 -387
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +0 -371
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +0 -381
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +0 -371
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +0 -66
- data/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +0 -65
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +0 -137
- data/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb +0 -18
- data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +0 -103
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +0 -129
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +0 -61
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +0 -335
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +0 -365
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +0 -371
- data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +0 -78
- data/vendor/plugins/rspec/spec/spec/runner/heckler_spec.rb +0 -13
- data/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +0 -45
- data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +0 -384
- data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +0 -386
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture.rb +0 -7
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb +0 -8
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb +0 -16
- data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +0 -56
- data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +0 -192
- data/vendor/plugins/rspec/spec/spec/runner/resources/a_bar.rb +0 -0
- data/vendor/plugins/rspec/spec/spec/runner/resources/a_foo.rb +0 -0
- data/vendor/plugins/rspec/spec/spec/runner/resources/a_spec.rb +0 -1
- data/vendor/plugins/rspec/spec/spec/runner/spec.opts +0 -2
- data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +0 -1
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb +0 -70
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +0 -79
- data/vendor/plugins/rspec/spec/spec/runner/spec_spaced.opts +0 -2
- data/vendor/plugins/rspec/spec/spec/runner_spec.rb +0 -11
- data/vendor/plugins/rspec/spec/spec/spec_classes.rb +0 -133
- data/vendor/plugins/rspec/spec/spec/story/builders.rb +0 -46
- data/vendor/plugins/rspec/spec/spec/story/extensions/main_spec.rb +0 -161
- data/vendor/plugins/rspec/spec/spec/story/extensions_spec.rb +0 -14
- data/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb +0 -27
- data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +0 -92
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +0 -27
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +0 -191
- data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +0 -133
- data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +0 -384
- data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +0 -294
- data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +0 -106
- data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +0 -20
- data/vendor/plugins/rspec/spec/spec/story/step_group_spec.rb +0 -157
- data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +0 -72
- data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +0 -200
- data/vendor/plugins/rspec/spec/spec/story/story_helper.rb +0 -2
- data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +0 -86
- data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +0 -423
- data/vendor/plugins/rspec/spec/spec/translator_spec.rb +0 -265
- data/vendor/plugins/rspec/spec/spec_helper.rb +0 -103
- data/vendor/plugins/rspec/stories/all.rb +0 -5
- data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +0 -45
- data/vendor/plugins/rspec/stories/example_groups/example_group_with_should_methods +0 -17
- data/vendor/plugins/rspec/stories/example_groups/nested_groups +0 -17
- data/vendor/plugins/rspec/stories/example_groups/output +0 -25
- data/vendor/plugins/rspec/stories/example_groups/stories.rb +0 -7
- data/vendor/plugins/rspec/stories/helper.rb +0 -6
- data/vendor/plugins/rspec/stories/interop/examples_and_tests_together +0 -30
- data/vendor/plugins/rspec/stories/interop/stories.rb +0 -7
- data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +0 -17
- data/vendor/plugins/rspec/stories/pending_stories/README +0 -3
- data/vendor/plugins/rspec/stories/resources/helpers/cmdline.rb +0 -9
- data/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb +0 -16
- data/vendor/plugins/rspec/stories/resources/matchers/smart_match.rb +0 -37
- data/vendor/plugins/rspec/stories/resources/spec/example_group_with_should_methods.rb +0 -12
- data/vendor/plugins/rspec/stories/resources/spec/simple_spec.rb +0 -8
- data/vendor/plugins/rspec/stories/resources/steps/running_rspec.rb +0 -50
- data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +0 -15
- data/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb +0 -57
- data/vendor/plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +0 -30
- data/vendor/plugins/rspec/story_server/prototype/javascripts/builder.js +0 -136
- data/vendor/plugins/rspec/story_server/prototype/javascripts/controls.js +0 -972
- data/vendor/plugins/rspec/story_server/prototype/javascripts/dragdrop.js +0 -976
- data/vendor/plugins/rspec/story_server/prototype/javascripts/effects.js +0 -1117
- data/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js +0 -4140
- data/vendor/plugins/rspec/story_server/prototype/javascripts/rspec.js +0 -149
- data/vendor/plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +0 -58
- data/vendor/plugins/rspec/story_server/prototype/javascripts/slider.js +0 -276
- data/vendor/plugins/rspec/story_server/prototype/javascripts/sound.js +0 -55
- data/vendor/plugins/rspec/story_server/prototype/javascripts/unittest.js +0 -568
- data/vendor/plugins/rspec/story_server/prototype/lib/server.rb +0 -24
- data/vendor/plugins/rspec/story_server/prototype/stories.html +0 -176
- data/vendor/plugins/rspec/story_server/prototype/stylesheets/rspec.css +0 -136
- data/vendor/plugins/rspec/story_server/prototype/stylesheets/test.css +0 -90
- data/vendor/plugins/rspec_on_rails/MIT-LICENSE +0 -31
- data/vendor/plugins/rspec_on_rails/README +0 -3
- data/vendor/plugins/rspec_on_rails/Rakefile +0 -9
- data/vendor/plugins/rspec_on_rails/generators/rspec/CHANGES +0 -1
- data/vendor/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +0 -35
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +0 -4
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt +0 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +0 -2
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +0 -4
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +0 -102
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +0 -4
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +0 -39
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +0 -3
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/USAGE +0 -33
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +0 -49
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +0 -25
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +0 -12
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/USAGE +0 -18
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +0 -30
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +0 -167
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +0 -313
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +0 -25
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +0 -26
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +0 -61
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/init.rb +0 -9
- data/vendor/plugins/rspec_on_rails/lib/autotest/discover.rb +0 -1
- data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +0 -81
- data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +0 -51
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +0 -46
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +0 -43
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +0 -269
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +0 -59
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -130
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/model_example_group.rb +0 -14
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +0 -98
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +0 -90
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +0 -178
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +0 -12
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +0 -14
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +0 -21
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +0 -11
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +0 -27
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +0 -30
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +0 -5
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +0 -66
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +0 -21
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +0 -29
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +0 -130
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +0 -55
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +0 -113
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +0 -70
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +0 -71
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +0 -23
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +0 -36
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +0 -8
- data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +0 -60
- data/vendor/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb +0 -83
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +0 -43
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +0 -195
- data/vendor/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb +0 -112
- data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +0 -133
- data/vendor/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb +0 -18
- data/vendor/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +0 -16
- data/vendor/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb +0 -33
- data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +0 -264
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -54
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +0 -48
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +0 -14
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +0 -783
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +0 -37
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +0 -13
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +0 -62
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +0 -209
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +0 -169
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/ar_classes.rb +0 -10
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +0 -55
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/stub_model_spec.rb +0 -54
- data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +0 -7
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +0 -89
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/spec/rails_suite.rb +0 -7
- data/vendor/plugins/rspec_on_rails/spec/spec_helper.rb +0 -46
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +0 -2
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +0 -68
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +0 -59
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +0 -26
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +0 -58
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +0 -10
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +0 -5
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +0 -6
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +0 -13
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.js.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +0 -2
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +0 -3
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +0 -2
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +0 -2
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +0 -2
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +0 -3
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +0 -5
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +0 -3
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +0 -1
- data/vendor/plugins/rspec_on_rails/stories/all.rb +0 -10
- data/vendor/plugins/rspec_on_rails/stories/helper.rb +0 -5
- data/vendor/plugins/rspec_on_rails/stories/steps/people.rb +0 -8
- data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback +0 -15
- data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb +0 -25
- data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +0 -137
- data/vendor/plugins/scenarios/README +0 -262
- data/vendor/plugins/scenarios/Rakefile +0 -66
- data/vendor/plugins/scenarios/TODO +0 -1
- data/vendor/plugins/scenarios/lib/scenarios.rb +0 -34
- data/vendor/plugins/scenarios/lib/scenarios/base.rb +0 -73
- data/vendor/plugins/scenarios/lib/scenarios/builtin/blank_scenario.rb +0 -18
- data/vendor/plugins/scenarios/lib/scenarios/configuration.rb +0 -55
- data/vendor/plugins/scenarios/lib/scenarios/extensions.rb +0 -5
- data/vendor/plugins/scenarios/lib/scenarios/extensions/active_record.rb +0 -14
- data/vendor/plugins/scenarios/lib/scenarios/extensions/delegating_attributes.rb +0 -40
- data/vendor/plugins/scenarios/lib/scenarios/extensions/object.rb +0 -5
- data/vendor/plugins/scenarios/lib/scenarios/extensions/string.rb +0 -22
- data/vendor/plugins/scenarios/lib/scenarios/extensions/symbol.rb +0 -14
- data/vendor/plugins/scenarios/lib/scenarios/extensions/test_case.rb +0 -76
- data/vendor/plugins/scenarios/lib/scenarios/loading.rb +0 -51
- data/vendor/plugins/scenarios/lib/scenarios/table_blasting.rb +0 -20
- data/vendor/plugins/scenarios/lib/scenarios/table_methods.rb +0 -205
- data/vendor/plugins/scenarios/spec/scenarios/complex_composite_scenario.rb +0 -9
- data/vendor/plugins/scenarios/spec/scenarios/composite_scenario.rb +0 -9
- data/vendor/plugins/scenarios/spec/scenarios/empty_scenario.rb +0 -4
- data/vendor/plugins/scenarios/spec/scenarios/people_scenario.rb +0 -26
- data/vendor/plugins/scenarios/spec/scenarios/places_scenario.rb +0 -22
- data/vendor/plugins/scenarios/spec/scenarios/things_scenario.rb +0 -22
- data/vendor/plugins/scenarios/spec/scenarios_spec.rb +0 -189
- data/vendor/plugins/scenarios/spec/spec_helper.rb +0 -6
- data/vendor/plugins/scenarios/tasks/scenario.rake +0 -21
- data/vendor/plugins/scenarios/test/scenarios_test.rb +0 -39
- data/vendor/plugins/scenarios/test/test_helper.rb +0 -5
- data/vendor/plugins/scenarios/testing/application.rb +0 -2
- data/vendor/plugins/scenarios/testing/database.yml +0 -9
- data/vendor/plugins/scenarios/testing/environment.rb +0 -68
- data/vendor/plugins/scenarios/testing/library.rb +0 -128
- data/vendor/plugins/scenarios/testing/models.rb +0 -14
- data/vendor/plugins/scenarios/testing/rspec_on_rails_3014.patch +0 -52
- data/vendor/plugins/scenarios/testing/rspec_on_rails_3119.patch +0 -53
- data/vendor/plugins/scenarios/testing/schema.rb +0 -31
- data/vendor/rails/Rakefile +0 -21
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +0 -4
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +0 -19
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +0 -245
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +0 -47
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +0 -52
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +0 -39
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +0 -71
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +0 -67
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +0 -481
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb +0 -552
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +0 -931
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/info.rb +0 -35
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +0 -540
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/loader.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +0 -462
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +0 -435
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mbox.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +0 -282
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +0 -137
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +0 -1475
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +0 -381
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +0 -142
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +0 -43
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +0 -263
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +0 -279
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/tmail.rb +0 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +0 -281
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +0 -38
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -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.rhtml +0 -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.rhtml +0 -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 +0 -1
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -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.rhtml +0 -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.rhtml +0 -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.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +0 -119
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +0 -69
- data/vendor/rails/actionpack/test/action_view_test.rb +0 -44
- data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +0 -47
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +0 -193
- data/vendor/rails/activemodel/CHANGES +0 -12
- data/vendor/rails/activemodel/README +0 -21
- data/vendor/rails/activemodel/Rakefile +0 -4
- data/vendor/rails/activemodel/lib/active_model.rb +0 -17
- data/vendor/rails/activemodel/lib/active_model/base.rb +0 -4
- data/vendor/rails/activemodel/lib/active_model/callbacks.rb +0 -5
- data/vendor/rails/activemodel/lib/active_model/observing.rb +0 -100
- data/vendor/rails/activemodel/lib/active_model/validations.rb +0 -4
- data/vendor/rails/activemodel/spec/observing_spec.rb +0 -120
- data/vendor/rails/activemodel/spec/spec_helper.rb +0 -17
- data/vendor/rails/activerecord/MIT-LICENSE +0 -20
- data/vendor/rails/activerecord/lib/active_record/vendor/db2.rb +0 -362
- data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +0 -72
- data/vendor/rails/activerecord/test/abstract_unit.rb +0 -84
- data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +0 -43
- data/vendor/rails/activerecord/test/adapter_test.rb +0 -105
- data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +0 -95
- data/vendor/rails/activerecord/test/aggregations_test.rb +0 -128
- data/vendor/rails/activerecord/test/all.sh +0 -8
- data/vendor/rails/activerecord/test/ar_schema_test.rb +0 -33
- data/vendor/rails/activerecord/test/association_inheritance_reload.rb +0 -14
- data/vendor/rails/activerecord/test/associations/callbacks_test.rb +0 -147
- data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +0 -110
- data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +0 -145
- data/vendor/rails/activerecord/test/associations/eager_test.rb +0 -442
- data/vendor/rails/activerecord/test/associations/extension_test.rb +0 -47
- data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +0 -88
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +0 -559
- data/vendor/rails/activerecord/test/associations_test.rb +0 -2147
- data/vendor/rails/activerecord/test/attribute_methods_test.rb +0 -146
- data/vendor/rails/activerecord/test/base_test.rb +0 -1745
- data/vendor/rails/activerecord/test/binary_test.rb +0 -32
- data/vendor/rails/activerecord/test/calculations_test.rb +0 -251
- data/vendor/rails/activerecord/test/callbacks_test.rb +0 -400
- data/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb +0 -32
- data/vendor/rails/activerecord/test/column_alias_test.rb +0 -17
- data/vendor/rails/activerecord/test/connection_test_firebird.rb +0 -8
- data/vendor/rails/activerecord/test/connection_test_mysql.rb +0 -30
- data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +0 -69
- data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +0 -203
- data/vendor/rails/activerecord/test/date_time_test.rb +0 -37
- data/vendor/rails/activerecord/test/default_test_firebird.rb +0 -16
- data/vendor/rails/activerecord/test/defaults_test.rb +0 -67
- data/vendor/rails/activerecord/test/deprecated_finder_test.rb +0 -30
- data/vendor/rails/activerecord/test/finder_test.rb +0 -650
- data/vendor/rails/activerecord/test/fixtures/author.rb +0 -109
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char +0 -1
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces +0 -1
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line +0 -3
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes +0 -3
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value +0 -1
- data/vendor/rails/activerecord/test/fixtures/category.rb +0 -26
- data/vendor/rails/activerecord/test/fixtures/comment.rb +0 -23
- data/vendor/rails/activerecord/test/fixtures/company.rb +0 -114
- data/vendor/rails/activerecord/test/fixtures/company_in_module.rb +0 -59
- data/vendor/rails/activerecord/test/fixtures/computer.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/contact.rb +0 -16
- data/vendor/rails/activerecord/test/fixtures/customer.rb +0 -55
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +0 -235
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +0 -65
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +0 -310
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql +0 -6
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +0 -273
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql +0 -1
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +0 -318
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql +0 -7
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +0 -67
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +0 -330
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql +0 -6
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +0 -44
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +0 -292
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +0 -354
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +0 -11
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +0 -33
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +0 -219
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +0 -35
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +0 -222
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql +0 -4
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/developer.rb +0 -72
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller +0 -3
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record +0 -3
- data/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record +0 -2
- data/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb +0 -9
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb +0 -12
- data/vendor/rails/activerecord/test/fixtures/order.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/person.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures/pirate.rb +0 -5
- data/vendor/rails/activerecord/test/fixtures/post.rb +0 -59
- data/vendor/rails/activerecord/test/fixtures/project.rb +0 -28
- data/vendor/rails/activerecord/test/fixtures/reply.rb +0 -37
- data/vendor/rails/activerecord/test/fixtures/subscriber.rb +0 -6
- data/vendor/rails/activerecord/test/fixtures/subscribers/first +0 -2
- data/vendor/rails/activerecord/test/fixtures/subscribers/second +0 -2
- data/vendor/rails/activerecord/test/fixtures/topic.rb +0 -37
- data/vendor/rails/activerecord/test/fixtures/treasure.rb +0 -4
- data/vendor/rails/activerecord/test/fixtures_test.rb +0 -602
- data/vendor/rails/activerecord/test/inheritance_test.rb +0 -211
- data/vendor/rails/activerecord/test/json_serialization_test.rb +0 -180
- data/vendor/rails/activerecord/test/lifecycle_test.rb +0 -137
- data/vendor/rails/activerecord/test/locking_test.rb +0 -282
- data/vendor/rails/activerecord/test/method_scoping_test.rb +0 -416
- data/vendor/rails/activerecord/test/migration_test.rb +0 -933
- data/vendor/rails/activerecord/test/migration_test_firebird.rb +0 -124
- data/vendor/rails/activerecord/test/mixin_test.rb +0 -95
- data/vendor/rails/activerecord/test/modules_test.rb +0 -34
- data/vendor/rails/activerecord/test/multiple_db_test.rb +0 -60
- data/vendor/rails/activerecord/test/pk_test.rb +0 -101
- data/vendor/rails/activerecord/test/query_cache_test.rb +0 -104
- data/vendor/rails/activerecord/test/readonly_test.rb +0 -107
- data/vendor/rails/activerecord/test/reflection_test.rb +0 -175
- data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +0 -177
- data/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb +0 -75
- data/vendor/rails/activerecord/test/schema_dumper_test.rb +0 -131
- data/vendor/rails/activerecord/test/schema_test_postgresql.rb +0 -64
- data/vendor/rails/activerecord/test/serialization_test.rb +0 -47
- data/vendor/rails/activerecord/test/synonym_test_oracle.rb +0 -17
- data/vendor/rails/activerecord/test/table_name_test_sqlserver.rb +0 -23
- data/vendor/rails/activerecord/test/threaded_connections_test.rb +0 -48
- data/vendor/rails/activerecord/test/transactions_test.rb +0 -281
- data/vendor/rails/activerecord/test/unconnected_test.rb +0 -32
- data/vendor/rails/activerecord/test/validations_test.rb +0 -1395
- data/vendor/rails/activerecord/test/xml_serialization_test.rb +0 -202
- data/vendor/rails/activeresource/MIT-LICENSE +0 -20
- data/vendor/rails/activesupport/MIT-LICENSE +0 -20
- data/vendor/rails/activesupport/Rakefile +0 -83
- data/vendor/rails/activesupport/install.rb +0 -30
- data/vendor/rails/activesupport/lib/active_support/testing.rb +0 -1
- data/vendor/rails/activesupport/test/abstract_unit.rb +0 -20
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +0 -7
- data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +0 -5
- data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +0 -4
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +0 -3
- data/vendor/rails/activesupport/test/buffered_logger_test.rb +0 -107
- data/vendor/rails/activesupport/test/clean_logger_test.rb +0 -57
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +0 -250
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +0 -19
- data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +0 -14
- data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +0 -31
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +0 -224
- data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +0 -105
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +0 -46
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +0 -196
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +0 -230
- data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +0 -22
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +0 -21
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +0 -61
- data/vendor/rails/activesupport/test/core_ext/exception_test.rb +0 -64
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +0 -29
- data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +0 -25
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +0 -743
- data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +0 -37
- data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +0 -43
- data/vendor/rails/activesupport/test/core_ext/load_error_tests.rb +0 -16
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +0 -30
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +0 -52
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +0 -33
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +0 -58
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +0 -293
- data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +0 -24
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +0 -147
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +0 -242
- data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/proc_test.rb +0 -11
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +0 -63
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +0 -180
- data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +0 -420
- data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/service_one.rb +0 -5
- data/vendor/rails/activesupport/test/dependencies/service_two.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies_test.rb +0 -751
- data/vendor/rails/activesupport/test/deprecation_test.rb +0 -151
- data/vendor/rails/activesupport/test/inflector_test.rb +0 -248
- data/vendor/rails/activesupport/test/inflector_test_cases.rb +0 -208
- data/vendor/rails/activesupport/test/json/decoding_test.rb +0 -41
- data/vendor/rails/activesupport/test/json/encoding_test.rb +0 -111
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +0 -173
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +0 -141
- data/vendor/rails/activesupport/test/multibyte_handler_test.rb +0 -367
- data/vendor/rails/activesupport/test/option_merger_test.rb +0 -50
- data/vendor/rails/activesupport/test/ordered_options_test.rb +0 -84
- data/vendor/rails/activesupport/test/test_test.rb +0 -73
- data/vendor/rails/activesupport/test/time_zone_test.rb +0 -98
- data/vendor/rails/activesupport/test/whiny_nil_test.rb +0 -38
- data/vendor/rails/cleanlogs.sh +0 -1
- data/vendor/rails/pushgems.rb +0 -15
- data/vendor/rails/railties/lib/tasks/tmp.rake +0 -37
- data/vendor/rails/railties/test/abstract_unit.rb +0 -24
- data/vendor/rails/railties/test/boot_test.rb +0 -179
- data/vendor/rails/railties/test/console_app_test.rb +0 -29
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +0 -265
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +0 -1
- data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
- data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +0 -7
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +0 -2
- data/vendor/rails/railties/test/generators/generator_test_helper.rb +0 -195
- data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +0 -109
- data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +0 -106
- data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +0 -185
- data/vendor/rails/railties/test/initializer_test.rb +0 -218
- data/vendor/rails/railties/test/mocks/routes.rb +0 -6
- data/vendor/rails/railties/test/plugin_loader_test.rb +0 -140
- data/vendor/rails/railties/test/plugin_locator_test.rb +0 -69
- data/vendor/rails/railties/test/plugin_test.rb +0 -141
- data/vendor/rails/railties/test/plugin_test_helper.rb +0 -29
- data/vendor/rails/railties/test/rails_generator_test.rb +0 -137
- data/vendor/rails/railties/test/rails_info_controller_test.rb +0 -48
- data/vendor/rails/railties/test/rails_info_test.rb +0 -105
- data/vendor/rails/railties/test/secret_key_generation_test.rb +0 -35
- data/vendor/rails/release.rb +0 -25
@@ -1,2147 +0,0 @@
|
|
1
|
-
require 'abstract_unit'
|
2
|
-
require 'fixtures/developer'
|
3
|
-
require 'fixtures/project'
|
4
|
-
require 'fixtures/company'
|
5
|
-
require 'fixtures/topic'
|
6
|
-
require 'fixtures/reply'
|
7
|
-
require 'fixtures/computer'
|
8
|
-
require 'fixtures/customer'
|
9
|
-
require 'fixtures/order'
|
10
|
-
require 'fixtures/categorization'
|
11
|
-
require 'fixtures/category'
|
12
|
-
require 'fixtures/post'
|
13
|
-
require 'fixtures/author'
|
14
|
-
require 'fixtures/comment'
|
15
|
-
require 'fixtures/tag'
|
16
|
-
require 'fixtures/tagging'
|
17
|
-
require 'fixtures/person'
|
18
|
-
require 'fixtures/reader'
|
19
|
-
|
20
|
-
class AssociationsTest < Test::Unit::TestCase
|
21
|
-
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
|
22
|
-
:computers
|
23
|
-
|
24
|
-
def test_bad_collection_keys
|
25
|
-
assert_raise(ArgumentError, 'ActiveRecord should have barked on bad collection keys') do
|
26
|
-
Class.new(ActiveRecord::Base).has_many(:wheels, :name => 'wheels')
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_should_construct_new_finder_sql_after_create
|
31
|
-
person = Person.new
|
32
|
-
assert_equal [], person.readers.find(:all)
|
33
|
-
person.save!
|
34
|
-
reader = Reader.create! :person => person, :post => Post.new(:title => "foo", :body => "bar")
|
35
|
-
assert_equal [reader], person.readers.find(:all)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_force_reload
|
39
|
-
firm = Firm.new("name" => "A New Firm, Inc")
|
40
|
-
firm.save
|
41
|
-
firm.clients.each {|c|} # forcing to load all clients
|
42
|
-
assert firm.clients.empty?, "New firm shouldn't have client objects"
|
43
|
-
assert_equal 0, firm.clients.size, "New firm should have 0 clients"
|
44
|
-
|
45
|
-
client = Client.new("name" => "TheClient.com", "firm_id" => firm.id)
|
46
|
-
client.save
|
47
|
-
|
48
|
-
assert firm.clients.empty?, "New firm should have cached no client objects"
|
49
|
-
assert_equal 0, firm.clients.size, "New firm should have cached 0 clients count"
|
50
|
-
|
51
|
-
assert !firm.clients(true).empty?, "New firm should have reloaded client objects"
|
52
|
-
assert_equal 1, firm.clients(true).size, "New firm should have reloaded clients count"
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_storing_in_pstore
|
56
|
-
require "tmpdir"
|
57
|
-
store_filename = File.join(Dir.tmpdir, "ar-pstore-association-test")
|
58
|
-
File.delete(store_filename) if File.exist?(store_filename)
|
59
|
-
require "pstore"
|
60
|
-
apple = Firm.create("name" => "Apple")
|
61
|
-
natural = Client.new("name" => "Natural Company")
|
62
|
-
apple.clients << natural
|
63
|
-
|
64
|
-
db = PStore.new(store_filename)
|
65
|
-
db.transaction do
|
66
|
-
db["apple"] = apple
|
67
|
-
end
|
68
|
-
|
69
|
-
db = PStore.new(store_filename)
|
70
|
-
db.transaction do
|
71
|
-
assert_equal "Natural Company", db["apple"].clients.first.name
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
class AssociationProxyTest < Test::Unit::TestCase
|
77
|
-
fixtures :authors, :posts, :categorizations, :categories, :developers, :projects, :developers_projects
|
78
|
-
|
79
|
-
def test_proxy_accessors
|
80
|
-
welcome = posts(:welcome)
|
81
|
-
assert_equal welcome, welcome.author.proxy_owner
|
82
|
-
assert_equal welcome.class.reflect_on_association(:author), welcome.author.proxy_reflection
|
83
|
-
welcome.author.class # force load target
|
84
|
-
assert_equal welcome.author, welcome.author.proxy_target
|
85
|
-
|
86
|
-
david = authors(:david)
|
87
|
-
assert_equal david, david.posts.proxy_owner
|
88
|
-
assert_equal david.class.reflect_on_association(:posts), david.posts.proxy_reflection
|
89
|
-
david.posts.first # force load target
|
90
|
-
assert_equal david.posts, david.posts.proxy_target
|
91
|
-
|
92
|
-
assert_equal david, david.posts_with_extension.testing_proxy_owner
|
93
|
-
assert_equal david.class.reflect_on_association(:posts_with_extension), david.posts_with_extension.testing_proxy_reflection
|
94
|
-
david.posts_with_extension.first # force load target
|
95
|
-
assert_equal david.posts_with_extension, david.posts_with_extension.testing_proxy_target
|
96
|
-
end
|
97
|
-
|
98
|
-
def test_push_does_not_load_target
|
99
|
-
david = authors(:david)
|
100
|
-
|
101
|
-
david.categories << categories(:technology)
|
102
|
-
assert !david.categories.loaded?
|
103
|
-
assert david.categories.include?(categories(:technology))
|
104
|
-
end
|
105
|
-
|
106
|
-
def test_push_does_not_lose_additions_to_new_record
|
107
|
-
josh = Author.new(:name => "Josh")
|
108
|
-
josh.posts << Post.new(:title => "New on Edge", :body => "More cool stuff!")
|
109
|
-
assert josh.posts.loaded?
|
110
|
-
assert_equal 1, josh.posts.size
|
111
|
-
end
|
112
|
-
|
113
|
-
def test_save_on_parent_does_not_load_target
|
114
|
-
david = developers(:david)
|
115
|
-
|
116
|
-
assert !david.projects.loaded?
|
117
|
-
david.update_attribute(:created_at, Time.now)
|
118
|
-
assert !david.projects.loaded?
|
119
|
-
end
|
120
|
-
|
121
|
-
def test_save_on_parent_saves_children
|
122
|
-
developer = Developer.create :name => "Bryan", :salary => 50_000
|
123
|
-
assert_equal 1, developer.reload.audit_logs.size
|
124
|
-
end
|
125
|
-
|
126
|
-
def test_failed_reload_returns_nil
|
127
|
-
p = setup_dangling_association
|
128
|
-
assert_nil p.author.reload
|
129
|
-
end
|
130
|
-
|
131
|
-
def test_failed_reset_returns_nil
|
132
|
-
p = setup_dangling_association
|
133
|
-
assert_nil p.author.reset
|
134
|
-
end
|
135
|
-
|
136
|
-
def test_reload_returns_assocition
|
137
|
-
david = developers(:david)
|
138
|
-
assert_nothing_raised do
|
139
|
-
assert_equal david.projects, david.projects.reload.reload
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
def setup_dangling_association
|
144
|
-
josh = Author.create(:name => "Josh")
|
145
|
-
p = Post.create(:title => "New on Edge", :body => "More cool stuff!", :author => josh)
|
146
|
-
josh.destroy
|
147
|
-
p
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
class HasOneAssociationsTest < Test::Unit::TestCase
|
152
|
-
fixtures :accounts, :companies, :developers, :projects, :developers_projects
|
153
|
-
|
154
|
-
def setup
|
155
|
-
Account.destroyed_account_ids.clear
|
156
|
-
end
|
157
|
-
|
158
|
-
def test_has_one
|
159
|
-
assert_equal companies(:first_firm).account, Account.find(1)
|
160
|
-
assert_equal Account.find(1).credit_limit, companies(:first_firm).account.credit_limit
|
161
|
-
end
|
162
|
-
|
163
|
-
def test_has_one_cache_nils
|
164
|
-
firm = companies(:another_firm)
|
165
|
-
assert_queries(1) { assert_nil firm.account }
|
166
|
-
assert_queries(0) { assert_nil firm.account }
|
167
|
-
|
168
|
-
firms = Firm.find(:all, :include => :account)
|
169
|
-
assert_queries(0) { firms.each(&:account) }
|
170
|
-
end
|
171
|
-
|
172
|
-
def test_can_marshal_has_one_association_with_nil_target
|
173
|
-
firm = Firm.new
|
174
|
-
assert_nothing_raised do
|
175
|
-
assert_equal firm.attributes, Marshal.load(Marshal.dump(firm)).attributes
|
176
|
-
end
|
177
|
-
|
178
|
-
firm.account
|
179
|
-
assert_nothing_raised do
|
180
|
-
assert_equal firm.attributes, Marshal.load(Marshal.dump(firm)).attributes
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
def test_proxy_assignment
|
185
|
-
company = companies(:first_firm)
|
186
|
-
assert_nothing_raised { company.account = company.account }
|
187
|
-
end
|
188
|
-
|
189
|
-
def test_triple_equality
|
190
|
-
assert Account === companies(:first_firm).account
|
191
|
-
assert companies(:first_firm).account === Account
|
192
|
-
end
|
193
|
-
|
194
|
-
def test_type_mismatch
|
195
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).account = 1 }
|
196
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).account = Project.find(1) }
|
197
|
-
end
|
198
|
-
|
199
|
-
def test_natural_assignment
|
200
|
-
apple = Firm.create("name" => "Apple")
|
201
|
-
citibank = Account.create("credit_limit" => 10)
|
202
|
-
apple.account = citibank
|
203
|
-
assert_equal apple.id, citibank.firm_id
|
204
|
-
end
|
205
|
-
|
206
|
-
def test_natural_assignment_to_nil
|
207
|
-
old_account_id = companies(:first_firm).account.id
|
208
|
-
companies(:first_firm).account = nil
|
209
|
-
companies(:first_firm).save
|
210
|
-
assert_nil companies(:first_firm).account
|
211
|
-
# account is dependent, therefore is destroyed when reference to owner is lost
|
212
|
-
assert_raises(ActiveRecord::RecordNotFound) { Account.find(old_account_id) }
|
213
|
-
end
|
214
|
-
|
215
|
-
def test_assignment_without_replacement
|
216
|
-
apple = Firm.create("name" => "Apple")
|
217
|
-
citibank = Account.create("credit_limit" => 10)
|
218
|
-
apple.account = citibank
|
219
|
-
assert_equal apple.id, citibank.firm_id
|
220
|
-
|
221
|
-
hsbc = apple.build_account({ :credit_limit => 20}, false)
|
222
|
-
assert_equal apple.id, hsbc.firm_id
|
223
|
-
hsbc.save
|
224
|
-
assert_equal apple.id, citibank.firm_id
|
225
|
-
|
226
|
-
nykredit = apple.create_account({ :credit_limit => 30}, false)
|
227
|
-
assert_equal apple.id, nykredit.firm_id
|
228
|
-
assert_equal apple.id, citibank.firm_id
|
229
|
-
assert_equal apple.id, hsbc.firm_id
|
230
|
-
end
|
231
|
-
|
232
|
-
def test_assignment_without_replacement_on_create
|
233
|
-
apple = Firm.create("name" => "Apple")
|
234
|
-
citibank = Account.create("credit_limit" => 10)
|
235
|
-
apple.account = citibank
|
236
|
-
assert_equal apple.id, citibank.firm_id
|
237
|
-
|
238
|
-
hsbc = apple.create_account({:credit_limit => 10}, false)
|
239
|
-
assert_equal apple.id, hsbc.firm_id
|
240
|
-
hsbc.save
|
241
|
-
assert_equal apple.id, citibank.firm_id
|
242
|
-
end
|
243
|
-
|
244
|
-
def test_dependence
|
245
|
-
num_accounts = Account.count
|
246
|
-
|
247
|
-
firm = Firm.find(1)
|
248
|
-
assert !firm.account.nil?
|
249
|
-
account_id = firm.account.id
|
250
|
-
assert_equal [], Account.destroyed_account_ids[firm.id]
|
251
|
-
|
252
|
-
firm.destroy
|
253
|
-
assert_equal num_accounts - 1, Account.count
|
254
|
-
assert_equal [account_id], Account.destroyed_account_ids[firm.id]
|
255
|
-
end
|
256
|
-
|
257
|
-
def test_exclusive_dependence
|
258
|
-
num_accounts = Account.count
|
259
|
-
|
260
|
-
firm = ExclusivelyDependentFirm.find(9)
|
261
|
-
assert !firm.account.nil?
|
262
|
-
account_id = firm.account.id
|
263
|
-
assert_equal [], Account.destroyed_account_ids[firm.id]
|
264
|
-
|
265
|
-
firm.destroy
|
266
|
-
assert_equal num_accounts - 1, Account.count
|
267
|
-
assert_equal [], Account.destroyed_account_ids[firm.id]
|
268
|
-
end
|
269
|
-
|
270
|
-
def test_dependence_with_nil_associate
|
271
|
-
firm = DependentFirm.new(:name => 'nullify')
|
272
|
-
firm.save!
|
273
|
-
assert_nothing_raised { firm.destroy }
|
274
|
-
end
|
275
|
-
|
276
|
-
def test_succesful_build_association
|
277
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
278
|
-
firm.save
|
279
|
-
|
280
|
-
account = firm.build_account("credit_limit" => 1000)
|
281
|
-
assert account.save
|
282
|
-
assert_equal account, firm.account
|
283
|
-
end
|
284
|
-
|
285
|
-
def test_failing_build_association
|
286
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
287
|
-
firm.save
|
288
|
-
|
289
|
-
account = firm.build_account
|
290
|
-
assert !account.save
|
291
|
-
assert_equal "can't be empty", account.errors.on("credit_limit")
|
292
|
-
end
|
293
|
-
|
294
|
-
def test_build_association_twice_without_saving_affects_nothing
|
295
|
-
count_of_account = Account.count
|
296
|
-
firm = Firm.find(:first)
|
297
|
-
account1 = firm.build_account("credit_limit" => 1000)
|
298
|
-
account2 = firm.build_account("credit_limit" => 2000)
|
299
|
-
|
300
|
-
assert_equal count_of_account, Account.count
|
301
|
-
end
|
302
|
-
|
303
|
-
def test_create_association
|
304
|
-
firm = Firm.create(:name => "GlobalMegaCorp")
|
305
|
-
account = firm.create_account(:credit_limit => 1000)
|
306
|
-
assert_equal account, firm.reload.account
|
307
|
-
end
|
308
|
-
|
309
|
-
def test_build
|
310
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
311
|
-
firm.save
|
312
|
-
|
313
|
-
firm.account = account = Account.new("credit_limit" => 1000)
|
314
|
-
assert_equal account, firm.account
|
315
|
-
assert account.save
|
316
|
-
assert_equal account, firm.account
|
317
|
-
end
|
318
|
-
|
319
|
-
def test_build_before_child_saved
|
320
|
-
firm = Firm.find(1)
|
321
|
-
|
322
|
-
account = firm.account.build("credit_limit" => 1000)
|
323
|
-
assert_equal account, firm.account
|
324
|
-
assert account.new_record?
|
325
|
-
assert firm.save
|
326
|
-
assert_equal account, firm.account
|
327
|
-
assert !account.new_record?
|
328
|
-
end
|
329
|
-
|
330
|
-
def test_build_before_either_saved
|
331
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
332
|
-
|
333
|
-
firm.account = account = Account.new("credit_limit" => 1000)
|
334
|
-
assert_equal account, firm.account
|
335
|
-
assert account.new_record?
|
336
|
-
assert firm.save
|
337
|
-
assert_equal account, firm.account
|
338
|
-
assert !account.new_record?
|
339
|
-
end
|
340
|
-
|
341
|
-
def test_failing_build_association
|
342
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
343
|
-
firm.save
|
344
|
-
|
345
|
-
firm.account = account = Account.new
|
346
|
-
assert_equal account, firm.account
|
347
|
-
assert !account.save
|
348
|
-
assert_equal account, firm.account
|
349
|
-
assert_equal "can't be empty", account.errors.on("credit_limit")
|
350
|
-
end
|
351
|
-
|
352
|
-
def test_create
|
353
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
354
|
-
firm.save
|
355
|
-
firm.account = account = Account.create("credit_limit" => 1000)
|
356
|
-
assert_equal account, firm.account
|
357
|
-
end
|
358
|
-
|
359
|
-
def test_create_before_save
|
360
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
361
|
-
firm.account = account = Account.create("credit_limit" => 1000)
|
362
|
-
assert_equal account, firm.account
|
363
|
-
end
|
364
|
-
|
365
|
-
def test_dependence_with_missing_association
|
366
|
-
Account.destroy_all
|
367
|
-
firm = Firm.find(1)
|
368
|
-
assert firm.account.nil?
|
369
|
-
firm.destroy
|
370
|
-
end
|
371
|
-
|
372
|
-
def test_dependence_with_missing_association_and_nullify
|
373
|
-
Account.destroy_all
|
374
|
-
firm = DependentFirm.find(:first)
|
375
|
-
assert firm.account.nil?
|
376
|
-
firm.destroy
|
377
|
-
end
|
378
|
-
|
379
|
-
def test_assignment_before_parent_saved
|
380
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
381
|
-
firm.account = a = Account.find(1)
|
382
|
-
assert firm.new_record?
|
383
|
-
assert_equal a, firm.account
|
384
|
-
assert firm.save
|
385
|
-
assert_equal a, firm.account
|
386
|
-
assert_equal a, firm.account(true)
|
387
|
-
end
|
388
|
-
|
389
|
-
def test_finding_with_interpolated_condition
|
390
|
-
firm = Firm.find(:first)
|
391
|
-
superior = firm.clients.create(:name => 'SuperiorCo')
|
392
|
-
superior.rating = 10
|
393
|
-
superior.save
|
394
|
-
assert_equal 10, firm.clients_with_interpolated_conditions.first.rating
|
395
|
-
end
|
396
|
-
|
397
|
-
def test_assignment_before_child_saved
|
398
|
-
firm = Firm.find(1)
|
399
|
-
firm.account = a = Account.new("credit_limit" => 1000)
|
400
|
-
assert !a.new_record?
|
401
|
-
assert_equal a, firm.account
|
402
|
-
assert_equal a, firm.account
|
403
|
-
assert_equal a, firm.account(true)
|
404
|
-
end
|
405
|
-
|
406
|
-
def test_assignment_before_either_saved
|
407
|
-
firm = Firm.new("name" => "GlobalMegaCorp")
|
408
|
-
firm.account = a = Account.new("credit_limit" => 1000)
|
409
|
-
assert firm.new_record?
|
410
|
-
assert a.new_record?
|
411
|
-
assert_equal a, firm.account
|
412
|
-
assert firm.save
|
413
|
-
assert !firm.new_record?
|
414
|
-
assert !a.new_record?
|
415
|
-
assert_equal a, firm.account
|
416
|
-
assert_equal a, firm.account(true)
|
417
|
-
end
|
418
|
-
|
419
|
-
def test_not_resaved_when_unchanged
|
420
|
-
firm = Firm.find(:first, :include => :account)
|
421
|
-
assert_queries(1) { firm.save! }
|
422
|
-
|
423
|
-
firm = Firm.find(:first)
|
424
|
-
firm.account = Account.find(:first)
|
425
|
-
assert_queries(1) { firm.save! }
|
426
|
-
|
427
|
-
firm = Firm.find(:first).clone
|
428
|
-
firm.account = Account.find(:first)
|
429
|
-
assert_queries(2) { firm.save! }
|
430
|
-
|
431
|
-
firm = Firm.find(:first).clone
|
432
|
-
firm.account = Account.find(:first).clone
|
433
|
-
assert_queries(2) { firm.save! }
|
434
|
-
end
|
435
|
-
|
436
|
-
def test_save_still_works_after_accessing_nil_has_one
|
437
|
-
jp = Company.new :name => 'Jaded Pixel'
|
438
|
-
jp.dummy_account.nil?
|
439
|
-
|
440
|
-
assert_nothing_raised do
|
441
|
-
jp.save!
|
442
|
-
end
|
443
|
-
end
|
444
|
-
|
445
|
-
end
|
446
|
-
|
447
|
-
|
448
|
-
class HasManyAssociationsTest < Test::Unit::TestCase
|
449
|
-
fixtures :accounts, :companies, :developers, :projects,
|
450
|
-
:developers_projects, :topics, :authors, :comments
|
451
|
-
|
452
|
-
def setup
|
453
|
-
Client.destroyed_client_ids.clear
|
454
|
-
end
|
455
|
-
|
456
|
-
def force_signal37_to_load_all_clients_of_firm
|
457
|
-
companies(:first_firm).clients_of_firm.each {|f| }
|
458
|
-
end
|
459
|
-
|
460
|
-
def test_counting_with_counter_sql
|
461
|
-
assert_equal 2, Firm.find(:first).clients.count
|
462
|
-
end
|
463
|
-
|
464
|
-
def test_counting
|
465
|
-
assert_equal 2, Firm.find(:first).plain_clients.count
|
466
|
-
end
|
467
|
-
|
468
|
-
def test_counting_with_single_conditions
|
469
|
-
assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
|
470
|
-
end
|
471
|
-
|
472
|
-
def test_counting_with_single_hash
|
473
|
-
assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
|
474
|
-
end
|
475
|
-
|
476
|
-
def test_counting_with_column_name_and_hash
|
477
|
-
assert_equal 2, Firm.find(:first).plain_clients.count(:all, :conditions => '1=1')
|
478
|
-
end
|
479
|
-
|
480
|
-
def test_finding
|
481
|
-
assert_equal 2, Firm.find(:first).clients.length
|
482
|
-
end
|
483
|
-
|
484
|
-
def test_find_many_with_merged_options
|
485
|
-
assert_equal 1, companies(:first_firm).limited_clients.size
|
486
|
-
assert_equal 1, companies(:first_firm).limited_clients.find(:all).size
|
487
|
-
assert_equal 2, companies(:first_firm).limited_clients.find(:all, :limit => nil).size
|
488
|
-
end
|
489
|
-
|
490
|
-
def test_dynamic_find_should_respect_association_order
|
491
|
-
assert_equal companies(:second_client), companies(:first_firm).clients_sorted_desc.find(:first, :conditions => "type = 'Client'")
|
492
|
-
assert_equal companies(:second_client), companies(:first_firm).clients_sorted_desc.find_by_type('Client')
|
493
|
-
end
|
494
|
-
|
495
|
-
def test_dynamic_find_order_should_override_association_order
|
496
|
-
assert_equal companies(:first_client), companies(:first_firm).clients_sorted_desc.find(:first, :conditions => "type = 'Client'", :order => 'id')
|
497
|
-
assert_equal companies(:first_client), companies(:first_firm).clients_sorted_desc.find_by_type('Client', :order => 'id')
|
498
|
-
end
|
499
|
-
|
500
|
-
def test_dynamic_find_all_should_respect_association_order
|
501
|
-
assert_equal [companies(:second_client), companies(:first_client)], companies(:first_firm).clients_sorted_desc.find(:all, :conditions => "type = 'Client'")
|
502
|
-
assert_equal [companies(:second_client), companies(:first_client)], companies(:first_firm).clients_sorted_desc.find_all_by_type('Client')
|
503
|
-
end
|
504
|
-
|
505
|
-
def test_dynamic_find_all_order_should_override_association_order
|
506
|
-
assert_equal [companies(:first_client), companies(:second_client)], companies(:first_firm).clients_sorted_desc.find(:all, :conditions => "type = 'Client'", :order => 'id')
|
507
|
-
assert_equal [companies(:first_client), companies(:second_client)], companies(:first_firm).clients_sorted_desc.find_all_by_type('Client', :order => 'id')
|
508
|
-
end
|
509
|
-
|
510
|
-
def test_dynamic_find_all_should_respect_association_limit
|
511
|
-
assert_equal 1, companies(:first_firm).limited_clients.find(:all, :conditions => "type = 'Client'").length
|
512
|
-
assert_equal 1, companies(:first_firm).limited_clients.find_all_by_type('Client').length
|
513
|
-
end
|
514
|
-
|
515
|
-
def test_dynamic_find_all_limit_should_override_association_limit
|
516
|
-
assert_equal 2, companies(:first_firm).limited_clients.find(:all, :conditions => "type = 'Client'", :limit => 9_000).length
|
517
|
-
assert_equal 2, companies(:first_firm).limited_clients.find_all_by_type('Client', :limit => 9_000).length
|
518
|
-
end
|
519
|
-
|
520
|
-
def test_triple_equality
|
521
|
-
assert !(Array === Firm.find(:first).clients)
|
522
|
-
assert Firm.find(:first).clients === Array
|
523
|
-
end
|
524
|
-
|
525
|
-
def test_finding_default_orders
|
526
|
-
assert_equal "Summit", Firm.find(:first).clients.first.name
|
527
|
-
end
|
528
|
-
|
529
|
-
def test_finding_with_different_class_name_and_order
|
530
|
-
assert_equal "Microsoft", Firm.find(:first).clients_sorted_desc.first.name
|
531
|
-
end
|
532
|
-
|
533
|
-
def test_finding_with_foreign_key
|
534
|
-
assert_equal "Microsoft", Firm.find(:first).clients_of_firm.first.name
|
535
|
-
end
|
536
|
-
|
537
|
-
def test_finding_with_condition
|
538
|
-
assert_equal "Microsoft", Firm.find(:first).clients_like_ms.first.name
|
539
|
-
end
|
540
|
-
|
541
|
-
def test_finding_with_condition_hash
|
542
|
-
assert_equal "Microsoft", Firm.find(:first).clients_like_ms_with_hash_conditions.first.name
|
543
|
-
end
|
544
|
-
|
545
|
-
def test_finding_using_sql
|
546
|
-
firm = Firm.find(:first)
|
547
|
-
first_client = firm.clients_using_sql.first
|
548
|
-
assert_not_nil first_client
|
549
|
-
assert_equal "Microsoft", first_client.name
|
550
|
-
assert_equal 1, firm.clients_using_sql.size
|
551
|
-
assert_equal 1, Firm.find(:first).clients_using_sql.size
|
552
|
-
end
|
553
|
-
|
554
|
-
def test_counting_using_sql
|
555
|
-
assert_equal 1, Firm.find(:first).clients_using_counter_sql.size
|
556
|
-
assert Firm.find(:first).clients_using_counter_sql.any?
|
557
|
-
assert_equal 0, Firm.find(:first).clients_using_zero_counter_sql.size
|
558
|
-
assert !Firm.find(:first).clients_using_zero_counter_sql.any?
|
559
|
-
end
|
560
|
-
|
561
|
-
def test_counting_non_existant_items_using_sql
|
562
|
-
assert_equal 0, Firm.find(:first).no_clients_using_counter_sql.size
|
563
|
-
end
|
564
|
-
|
565
|
-
def test_belongs_to_sanity
|
566
|
-
c = Client.new
|
567
|
-
assert_nil c.firm
|
568
|
-
|
569
|
-
if c.firm
|
570
|
-
assert false, "belongs_to failed if check"
|
571
|
-
end
|
572
|
-
|
573
|
-
unless c.firm
|
574
|
-
else
|
575
|
-
assert false, "belongs_to failed unless check"
|
576
|
-
end
|
577
|
-
end
|
578
|
-
|
579
|
-
def test_find_ids
|
580
|
-
firm = Firm.find(:first)
|
581
|
-
|
582
|
-
assert_raises(ActiveRecord::RecordNotFound) { firm.clients.find }
|
583
|
-
|
584
|
-
client = firm.clients.find(2)
|
585
|
-
assert_kind_of Client, client
|
586
|
-
|
587
|
-
client_ary = firm.clients.find([2])
|
588
|
-
assert_kind_of Array, client_ary
|
589
|
-
assert_equal client, client_ary.first
|
590
|
-
|
591
|
-
client_ary = firm.clients.find(2, 3)
|
592
|
-
assert_kind_of Array, client_ary
|
593
|
-
assert_equal 2, client_ary.size
|
594
|
-
assert_equal client, client_ary.first
|
595
|
-
|
596
|
-
assert_raises(ActiveRecord::RecordNotFound) { firm.clients.find(2, 99) }
|
597
|
-
end
|
598
|
-
|
599
|
-
def test_find_string_ids_when_using_finder_sql
|
600
|
-
firm = Firm.find(:first)
|
601
|
-
|
602
|
-
client = firm.clients_using_finder_sql.find("2")
|
603
|
-
assert_kind_of Client, client
|
604
|
-
|
605
|
-
client_ary = firm.clients_using_finder_sql.find(["2"])
|
606
|
-
assert_kind_of Array, client_ary
|
607
|
-
assert_equal client, client_ary.first
|
608
|
-
|
609
|
-
client_ary = firm.clients_using_finder_sql.find("2", "3")
|
610
|
-
assert_kind_of Array, client_ary
|
611
|
-
assert_equal 2, client_ary.size
|
612
|
-
assert client_ary.include?(client)
|
613
|
-
end
|
614
|
-
|
615
|
-
def test_find_all
|
616
|
-
firm = Firm.find(:first)
|
617
|
-
assert_equal 2, firm.clients.find(:all, :conditions => "#{QUOTED_TYPE} = 'Client'").length
|
618
|
-
assert_equal 1, firm.clients.find(:all, :conditions => "name = 'Summit'").length
|
619
|
-
end
|
620
|
-
|
621
|
-
def test_find_all_sanitized
|
622
|
-
firm = Firm.find(:first)
|
623
|
-
summit = firm.clients.find(:all, :conditions => "name = 'Summit'")
|
624
|
-
assert_equal summit, firm.clients.find(:all, :conditions => ["name = ?", "Summit"])
|
625
|
-
assert_equal summit, firm.clients.find(:all, :conditions => ["name = :name", { :name => "Summit" }])
|
626
|
-
end
|
627
|
-
|
628
|
-
def test_find_first
|
629
|
-
firm = Firm.find(:first)
|
630
|
-
client2 = Client.find(2)
|
631
|
-
assert_equal firm.clients.first, firm.clients.find(:first)
|
632
|
-
assert_equal client2, firm.clients.find(:first, :conditions => "#{QUOTED_TYPE} = 'Client'")
|
633
|
-
end
|
634
|
-
|
635
|
-
def test_find_first_sanitized
|
636
|
-
firm = Firm.find(:first)
|
637
|
-
client2 = Client.find(2)
|
638
|
-
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = ?", 'Client'])
|
639
|
-
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = :type", { :type => 'Client' }])
|
640
|
-
end
|
641
|
-
|
642
|
-
def test_find_in_collection
|
643
|
-
assert_equal Client.find(2).name, companies(:first_firm).clients.find(2).name
|
644
|
-
assert_raises(ActiveRecord::RecordNotFound) { companies(:first_firm).clients.find(6) }
|
645
|
-
end
|
646
|
-
|
647
|
-
def test_find_grouped
|
648
|
-
all_clients_of_firm1 = Client.find(:all, :conditions => "firm_id = 1")
|
649
|
-
grouped_clients_of_firm1 = Client.find(:all, :conditions => "firm_id = 1", :group => "firm_id", :select => 'firm_id, count(id) as clients_count')
|
650
|
-
assert_equal 2, all_clients_of_firm1.size
|
651
|
-
assert_equal 1, grouped_clients_of_firm1.size
|
652
|
-
end
|
653
|
-
|
654
|
-
def test_adding
|
655
|
-
force_signal37_to_load_all_clients_of_firm
|
656
|
-
natural = Client.new("name" => "Natural Company")
|
657
|
-
companies(:first_firm).clients_of_firm << natural
|
658
|
-
assert_equal 2, companies(:first_firm).clients_of_firm.size # checking via the collection
|
659
|
-
assert_equal 2, companies(:first_firm).clients_of_firm(true).size # checking using the db
|
660
|
-
assert_equal natural, companies(:first_firm).clients_of_firm.last
|
661
|
-
end
|
662
|
-
|
663
|
-
def test_adding_using_create
|
664
|
-
first_firm = companies(:first_firm)
|
665
|
-
assert_equal 2, first_firm.plain_clients.size
|
666
|
-
natural = first_firm.plain_clients.create(:name => "Natural Company")
|
667
|
-
assert_equal 3, first_firm.plain_clients.length
|
668
|
-
assert_equal 3, first_firm.plain_clients.size
|
669
|
-
end
|
670
|
-
|
671
|
-
def test_create_with_bang_on_has_many_when_parent_is_new_raises
|
672
|
-
assert_raises(ActiveRecord::RecordNotSaved) do
|
673
|
-
firm = Firm.new
|
674
|
-
firm.plain_clients.create! :name=>"Whoever"
|
675
|
-
end
|
676
|
-
end
|
677
|
-
|
678
|
-
def test_regular_create_on_has_many_when_parent_is_new_raises
|
679
|
-
assert_raises(ActiveRecord::RecordNotSaved) do
|
680
|
-
firm = Firm.new
|
681
|
-
firm.plain_clients.create :name=>"Whoever"
|
682
|
-
end
|
683
|
-
end
|
684
|
-
|
685
|
-
def test_create_with_bang_on_has_many_raises_when_record_not_saved
|
686
|
-
assert_raises(ActiveRecord::RecordInvalid) do
|
687
|
-
firm = Firm.find(:first)
|
688
|
-
firm.plain_clients.create!
|
689
|
-
end
|
690
|
-
end
|
691
|
-
|
692
|
-
def test_create_with_bang_on_habtm_when_parent_is_new_raises
|
693
|
-
assert_raises(ActiveRecord::RecordNotSaved) do
|
694
|
-
Developer.new("name" => "Aredridel").projects.create!
|
695
|
-
end
|
696
|
-
end
|
697
|
-
|
698
|
-
def test_adding_a_mismatch_class
|
699
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << nil }
|
700
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << 1 }
|
701
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << Topic.find(1) }
|
702
|
-
end
|
703
|
-
|
704
|
-
def test_adding_a_collection
|
705
|
-
force_signal37_to_load_all_clients_of_firm
|
706
|
-
companies(:first_firm).clients_of_firm.concat([Client.new("name" => "Natural Company"), Client.new("name" => "Apple")])
|
707
|
-
assert_equal 3, companies(:first_firm).clients_of_firm.size
|
708
|
-
assert_equal 3, companies(:first_firm).clients_of_firm(true).size
|
709
|
-
end
|
710
|
-
|
711
|
-
def test_adding_before_save
|
712
|
-
no_of_firms = Firm.count
|
713
|
-
no_of_clients = Client.count
|
714
|
-
|
715
|
-
new_firm = Firm.new("name" => "A New Firm, Inc")
|
716
|
-
c = Client.new("name" => "Apple")
|
717
|
-
|
718
|
-
new_firm.clients_of_firm.push Client.new("name" => "Natural Company")
|
719
|
-
assert_equal 1, new_firm.clients_of_firm.size
|
720
|
-
new_firm.clients_of_firm << c
|
721
|
-
assert_equal 2, new_firm.clients_of_firm.size
|
722
|
-
|
723
|
-
assert_equal no_of_firms, Firm.count # Firm was not saved to database.
|
724
|
-
assert_equal no_of_clients, Client.count # Clients were not saved to database.
|
725
|
-
assert new_firm.save
|
726
|
-
assert !new_firm.new_record?
|
727
|
-
assert !c.new_record?
|
728
|
-
assert_equal new_firm, c.firm
|
729
|
-
assert_equal no_of_firms+1, Firm.count # Firm was saved to database.
|
730
|
-
assert_equal no_of_clients+2, Client.count # Clients were saved to database.
|
731
|
-
|
732
|
-
assert_equal 2, new_firm.clients_of_firm.size
|
733
|
-
assert_equal 2, new_firm.clients_of_firm(true).size
|
734
|
-
end
|
735
|
-
|
736
|
-
def test_invalid_adding
|
737
|
-
firm = Firm.find(1)
|
738
|
-
assert !(firm.clients_of_firm << c = Client.new)
|
739
|
-
assert c.new_record?
|
740
|
-
assert !firm.valid?
|
741
|
-
assert !firm.save
|
742
|
-
assert c.new_record?
|
743
|
-
end
|
744
|
-
|
745
|
-
def test_invalid_adding_before_save
|
746
|
-
no_of_firms = Firm.count
|
747
|
-
no_of_clients = Client.count
|
748
|
-
new_firm = Firm.new("name" => "A New Firm, Inc")
|
749
|
-
new_firm.clients_of_firm.concat([c = Client.new, Client.new("name" => "Apple")])
|
750
|
-
assert c.new_record?
|
751
|
-
assert !c.valid?
|
752
|
-
assert !new_firm.valid?
|
753
|
-
assert !new_firm.save
|
754
|
-
assert c.new_record?
|
755
|
-
assert new_firm.new_record?
|
756
|
-
end
|
757
|
-
|
758
|
-
def test_build
|
759
|
-
new_client = companies(:first_firm).clients_of_firm.build("name" => "Another Client")
|
760
|
-
assert_equal "Another Client", new_client.name
|
761
|
-
assert new_client.new_record?
|
762
|
-
assert_equal new_client, companies(:first_firm).clients_of_firm.last
|
763
|
-
assert companies(:first_firm).save
|
764
|
-
assert !new_client.new_record?
|
765
|
-
assert_equal 2, companies(:first_firm).clients_of_firm(true).size
|
766
|
-
end
|
767
|
-
|
768
|
-
def test_build_many
|
769
|
-
new_clients = companies(:first_firm).clients_of_firm.build([{"name" => "Another Client"}, {"name" => "Another Client II"}])
|
770
|
-
assert_equal 2, new_clients.size
|
771
|
-
|
772
|
-
assert companies(:first_firm).save
|
773
|
-
assert_equal 3, companies(:first_firm).clients_of_firm(true).size
|
774
|
-
end
|
775
|
-
|
776
|
-
def test_build_without_loading_association
|
777
|
-
first_topic = topics(:first)
|
778
|
-
Reply.column_names
|
779
|
-
|
780
|
-
assert_equal 1, first_topic.replies.length
|
781
|
-
|
782
|
-
assert_no_queries do
|
783
|
-
first_topic.replies.build(:title => "Not saved", :content => "Superstars")
|
784
|
-
assert_equal 2, first_topic.replies.size
|
785
|
-
end
|
786
|
-
|
787
|
-
assert_equal 2, first_topic.replies.to_ary.size
|
788
|
-
end
|
789
|
-
|
790
|
-
def test_create_without_loading_association
|
791
|
-
first_firm = companies(:first_firm)
|
792
|
-
Firm.column_names
|
793
|
-
Client.column_names
|
794
|
-
|
795
|
-
assert_equal 1, first_firm.clients_of_firm.size
|
796
|
-
first_firm.clients_of_firm.reset
|
797
|
-
|
798
|
-
assert_queries(1) do
|
799
|
-
first_firm.clients_of_firm.create(:name => "Superstars")
|
800
|
-
end
|
801
|
-
|
802
|
-
assert_equal 2, first_firm.clients_of_firm.size
|
803
|
-
end
|
804
|
-
|
805
|
-
def test_invalid_build
|
806
|
-
new_client = companies(:first_firm).clients_of_firm.build
|
807
|
-
assert new_client.new_record?
|
808
|
-
assert !new_client.valid?
|
809
|
-
assert_equal new_client, companies(:first_firm).clients_of_firm.last
|
810
|
-
assert !companies(:first_firm).save
|
811
|
-
assert new_client.new_record?
|
812
|
-
assert_equal 1, companies(:first_firm).clients_of_firm(true).size
|
813
|
-
end
|
814
|
-
|
815
|
-
def test_create
|
816
|
-
force_signal37_to_load_all_clients_of_firm
|
817
|
-
new_client = companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
818
|
-
assert !new_client.new_record?
|
819
|
-
assert_equal new_client, companies(:first_firm).clients_of_firm.last
|
820
|
-
assert_equal new_client, companies(:first_firm).clients_of_firm(true).last
|
821
|
-
end
|
822
|
-
|
823
|
-
def test_create_many
|
824
|
-
companies(:first_firm).clients_of_firm.create([{"name" => "Another Client"}, {"name" => "Another Client II"}])
|
825
|
-
assert_equal 3, companies(:first_firm).clients_of_firm(true).size
|
826
|
-
end
|
827
|
-
|
828
|
-
def test_find_or_initialize
|
829
|
-
the_client = companies(:first_firm).clients.find_or_initialize_by_name("Yet another client")
|
830
|
-
assert_equal companies(:first_firm).id, the_client.firm_id
|
831
|
-
assert_equal "Yet another client", the_client.name
|
832
|
-
assert the_client.new_record?
|
833
|
-
end
|
834
|
-
|
835
|
-
def test_find_or_create
|
836
|
-
number_of_clients = companies(:first_firm).clients.size
|
837
|
-
the_client = companies(:first_firm).clients.find_or_create_by_name("Yet another client")
|
838
|
-
assert_equal number_of_clients + 1, companies(:first_firm, :reload).clients.size
|
839
|
-
assert_equal the_client, companies(:first_firm).clients.find_or_create_by_name("Yet another client")
|
840
|
-
assert_equal number_of_clients + 1, companies(:first_firm, :reload).clients.size
|
841
|
-
end
|
842
|
-
|
843
|
-
def test_deleting
|
844
|
-
force_signal37_to_load_all_clients_of_firm
|
845
|
-
companies(:first_firm).clients_of_firm.delete(companies(:first_firm).clients_of_firm.first)
|
846
|
-
assert_equal 0, companies(:first_firm).clients_of_firm.size
|
847
|
-
assert_equal 0, companies(:first_firm).clients_of_firm(true).size
|
848
|
-
end
|
849
|
-
|
850
|
-
def test_deleting_before_save
|
851
|
-
new_firm = Firm.new("name" => "A New Firm, Inc.")
|
852
|
-
new_client = new_firm.clients_of_firm.build("name" => "Another Client")
|
853
|
-
assert_equal 1, new_firm.clients_of_firm.size
|
854
|
-
new_firm.clients_of_firm.delete(new_client)
|
855
|
-
assert_equal 0, new_firm.clients_of_firm.size
|
856
|
-
end
|
857
|
-
|
858
|
-
def test_deleting_a_collection
|
859
|
-
force_signal37_to_load_all_clients_of_firm
|
860
|
-
companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
861
|
-
assert_equal 2, companies(:first_firm).clients_of_firm.size
|
862
|
-
companies(:first_firm).clients_of_firm.delete([companies(:first_firm).clients_of_firm[0], companies(:first_firm).clients_of_firm[1]])
|
863
|
-
assert_equal 0, companies(:first_firm).clients_of_firm.size
|
864
|
-
assert_equal 0, companies(:first_firm).clients_of_firm(true).size
|
865
|
-
end
|
866
|
-
|
867
|
-
def test_delete_all
|
868
|
-
force_signal37_to_load_all_clients_of_firm
|
869
|
-
companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
870
|
-
assert_equal 2, companies(:first_firm).clients_of_firm.size
|
871
|
-
companies(:first_firm).clients_of_firm.delete_all
|
872
|
-
assert_equal 0, companies(:first_firm).clients_of_firm.size
|
873
|
-
assert_equal 0, companies(:first_firm).clients_of_firm(true).size
|
874
|
-
end
|
875
|
-
|
876
|
-
def test_delete_all_with_not_yet_loaded_association_collection
|
877
|
-
force_signal37_to_load_all_clients_of_firm
|
878
|
-
companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
879
|
-
assert_equal 2, companies(:first_firm).clients_of_firm.size
|
880
|
-
companies(:first_firm).clients_of_firm.reset
|
881
|
-
companies(:first_firm).clients_of_firm.delete_all
|
882
|
-
assert_equal 0, companies(:first_firm).clients_of_firm.size
|
883
|
-
assert_equal 0, companies(:first_firm).clients_of_firm(true).size
|
884
|
-
end
|
885
|
-
|
886
|
-
def test_clearing_an_association_collection
|
887
|
-
firm = companies(:first_firm)
|
888
|
-
client_id = firm.clients_of_firm.first.id
|
889
|
-
assert_equal 1, firm.clients_of_firm.size
|
890
|
-
|
891
|
-
firm.clients_of_firm.clear
|
892
|
-
|
893
|
-
assert_equal 0, firm.clients_of_firm.size
|
894
|
-
assert_equal 0, firm.clients_of_firm(true).size
|
895
|
-
assert_equal [], Client.destroyed_client_ids[firm.id]
|
896
|
-
|
897
|
-
# Should not be destroyed since the association is not dependent.
|
898
|
-
assert_nothing_raised do
|
899
|
-
assert Client.find(client_id).firm.nil?
|
900
|
-
end
|
901
|
-
end
|
902
|
-
|
903
|
-
def test_clearing_a_dependent_association_collection
|
904
|
-
firm = companies(:first_firm)
|
905
|
-
client_id = firm.dependent_clients_of_firm.first.id
|
906
|
-
assert_equal 1, firm.dependent_clients_of_firm.size
|
907
|
-
|
908
|
-
# :dependent means destroy is called on each client
|
909
|
-
firm.dependent_clients_of_firm.clear
|
910
|
-
|
911
|
-
assert_equal 0, firm.dependent_clients_of_firm.size
|
912
|
-
assert_equal 0, firm.dependent_clients_of_firm(true).size
|
913
|
-
assert_equal [client_id], Client.destroyed_client_ids[firm.id]
|
914
|
-
|
915
|
-
# Should be destroyed since the association is dependent.
|
916
|
-
assert Client.find_by_id(client_id).nil?
|
917
|
-
end
|
918
|
-
|
919
|
-
def test_clearing_an_exclusively_dependent_association_collection
|
920
|
-
firm = companies(:first_firm)
|
921
|
-
client_id = firm.exclusively_dependent_clients_of_firm.first.id
|
922
|
-
assert_equal 1, firm.exclusively_dependent_clients_of_firm.size
|
923
|
-
|
924
|
-
assert_equal [], Client.destroyed_client_ids[firm.id]
|
925
|
-
|
926
|
-
# :exclusively_dependent means each client is deleted directly from
|
927
|
-
# the database without looping through them calling destroy.
|
928
|
-
firm.exclusively_dependent_clients_of_firm.clear
|
929
|
-
|
930
|
-
assert_equal 0, firm.exclusively_dependent_clients_of_firm.size
|
931
|
-
assert_equal 0, firm.exclusively_dependent_clients_of_firm(true).size
|
932
|
-
# no destroy-filters should have been called
|
933
|
-
assert_equal [], Client.destroyed_client_ids[firm.id]
|
934
|
-
|
935
|
-
# Should be destroyed since the association is exclusively dependent.
|
936
|
-
assert Client.find_by_id(client_id).nil?
|
937
|
-
end
|
938
|
-
|
939
|
-
def test_dependent_association_respects_optional_conditions_on_delete
|
940
|
-
firm = companies(:odegy)
|
941
|
-
Client.create(:client_of => firm.id, :name => "BigShot Inc.")
|
942
|
-
Client.create(:client_of => firm.id, :name => "SmallTime Inc.")
|
943
|
-
# only one of two clients is included in the association due to the :conditions key
|
944
|
-
assert_equal 2, Client.find_all_by_client_of(firm.id).size
|
945
|
-
assert_equal 1, firm.dependent_conditional_clients_of_firm.size
|
946
|
-
firm.destroy
|
947
|
-
# only the correctly associated client should have been deleted
|
948
|
-
assert_equal 1, Client.find_all_by_client_of(firm.id).size
|
949
|
-
end
|
950
|
-
|
951
|
-
def test_dependent_association_respects_optional_sanitized_conditions_on_delete
|
952
|
-
firm = companies(:odegy)
|
953
|
-
Client.create(:client_of => firm.id, :name => "BigShot Inc.")
|
954
|
-
Client.create(:client_of => firm.id, :name => "SmallTime Inc.")
|
955
|
-
# only one of two clients is included in the association due to the :conditions key
|
956
|
-
assert_equal 2, Client.find_all_by_client_of(firm.id).size
|
957
|
-
assert_equal 1, firm.dependent_sanitized_conditional_clients_of_firm.size
|
958
|
-
firm.destroy
|
959
|
-
# only the correctly associated client should have been deleted
|
960
|
-
assert_equal 1, Client.find_all_by_client_of(firm.id).size
|
961
|
-
end
|
962
|
-
|
963
|
-
def test_clearing_without_initial_access
|
964
|
-
firm = companies(:first_firm)
|
965
|
-
|
966
|
-
firm.clients_of_firm.clear
|
967
|
-
|
968
|
-
assert_equal 0, firm.clients_of_firm.size
|
969
|
-
assert_equal 0, firm.clients_of_firm(true).size
|
970
|
-
end
|
971
|
-
|
972
|
-
def test_deleting_a_item_which_is_not_in_the_collection
|
973
|
-
force_signal37_to_load_all_clients_of_firm
|
974
|
-
summit = Client.find_by_name('Summit')
|
975
|
-
companies(:first_firm).clients_of_firm.delete(summit)
|
976
|
-
assert_equal 1, companies(:first_firm).clients_of_firm.size
|
977
|
-
assert_equal 1, companies(:first_firm).clients_of_firm(true).size
|
978
|
-
assert_equal 2, summit.client_of
|
979
|
-
end
|
980
|
-
|
981
|
-
def test_deleting_type_mismatch
|
982
|
-
david = Developer.find(1)
|
983
|
-
david.projects.reload
|
984
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { david.projects.delete(1) }
|
985
|
-
end
|
986
|
-
|
987
|
-
def test_deleting_self_type_mismatch
|
988
|
-
david = Developer.find(1)
|
989
|
-
david.projects.reload
|
990
|
-
assert_raises(ActiveRecord::AssociationTypeMismatch) { david.projects.delete(Project.find(1).developers) }
|
991
|
-
end
|
992
|
-
|
993
|
-
def test_destroy_all
|
994
|
-
force_signal37_to_load_all_clients_of_firm
|
995
|
-
assert !companies(:first_firm).clients_of_firm.empty?, "37signals has clients after load"
|
996
|
-
companies(:first_firm).clients_of_firm.destroy_all
|
997
|
-
assert companies(:first_firm).clients_of_firm.empty?, "37signals has no clients after destroy all"
|
998
|
-
assert companies(:first_firm).clients_of_firm(true).empty?, "37signals has no clients after destroy all and refresh"
|
999
|
-
end
|
1000
|
-
|
1001
|
-
def test_dependence
|
1002
|
-
firm = companies(:first_firm)
|
1003
|
-
assert_equal 2, firm.clients.size
|
1004
|
-
firm.destroy
|
1005
|
-
assert Client.find(:all, :conditions => "firm_id=#{firm.id}").empty?
|
1006
|
-
end
|
1007
|
-
|
1008
|
-
def test_destroy_dependent_when_deleted_from_association
|
1009
|
-
firm = Firm.find(:first)
|
1010
|
-
assert_equal 2, firm.clients.size
|
1011
|
-
|
1012
|
-
client = firm.clients.first
|
1013
|
-
firm.clients.delete(client)
|
1014
|
-
|
1015
|
-
assert_raise(ActiveRecord::RecordNotFound) { Client.find(client.id) }
|
1016
|
-
assert_raise(ActiveRecord::RecordNotFound) { firm.clients.find(client.id) }
|
1017
|
-
assert_equal 1, firm.clients.size
|
1018
|
-
end
|
1019
|
-
|
1020
|
-
def test_three_levels_of_dependence
|
1021
|
-
topic = Topic.create "title" => "neat and simple"
|
1022
|
-
reply = topic.replies.create "title" => "neat and simple", "content" => "still digging it"
|
1023
|
-
silly_reply = reply.replies.create "title" => "neat and simple", "content" => "ain't complaining"
|
1024
|
-
|
1025
|
-
assert_nothing_raised { topic.destroy }
|
1026
|
-
end
|
1027
|
-
|
1028
|
-
uses_transaction :test_dependence_with_transaction_support_on_failure
|
1029
|
-
def test_dependence_with_transaction_support_on_failure
|
1030
|
-
firm = companies(:first_firm)
|
1031
|
-
clients = firm.clients
|
1032
|
-
assert_equal 2, clients.length
|
1033
|
-
clients.last.instance_eval { def before_destroy() raise "Trigger rollback" end }
|
1034
|
-
|
1035
|
-
firm.destroy rescue "do nothing"
|
1036
|
-
|
1037
|
-
assert_equal 2, Client.find(:all, :conditions => "firm_id=#{firm.id}").size
|
1038
|
-
end
|
1039
|
-
|
1040
|
-
def test_dependence_on_account
|
1041
|
-
num_accounts = Account.count
|
1042
|
-
companies(:first_firm).destroy
|
1043
|
-
assert_equal num_accounts - 1, Account.count
|
1044
|
-
end
|
1045
|
-
|
1046
|
-
def test_depends_and_nullify
|
1047
|
-
num_accounts = Account.count
|
1048
|
-
num_companies = Company.count
|
1049
|
-
|
1050
|
-
core = companies(:rails_core)
|
1051
|
-
assert_equal accounts(:rails_core_account), core.account
|
1052
|
-
assert_equal companies(:leetsoft, :jadedpixel), core.companies
|
1053
|
-
core.destroy
|
1054
|
-
assert_nil accounts(:rails_core_account).reload.firm_id
|
1055
|
-
assert_nil companies(:leetsoft).reload.client_of
|
1056
|
-
assert_nil companies(:jadedpixel).reload.client_of
|
1057
|
-
|
1058
|
-
|
1059
|
-
assert_equal num_accounts, Account.count
|
1060
|
-
end
|
1061
|
-
|
1062
|
-
def test_included_in_collection
|
1063
|
-
assert companies(:first_firm).clients.include?(Client.find(2))
|
1064
|
-
end
|
1065
|
-
|
1066
|
-
def test_adding_array_and_collection
|
1067
|
-
assert_nothing_raised { Firm.find(:first).clients + Firm.find(:all).last.clients }
|
1068
|
-
end
|
1069
|
-
|
1070
|
-
def test_find_all_without_conditions
|
1071
|
-
firm = companies(:first_firm)
|
1072
|
-
assert_equal 2, firm.clients.find(:all).length
|
1073
|
-
end
|
1074
|
-
|
1075
|
-
def test_replace_with_less
|
1076
|
-
firm = Firm.find(:first)
|
1077
|
-
firm.clients = [companies(:first_client)]
|
1078
|
-
assert firm.save, "Could not save firm"
|
1079
|
-
firm.reload
|
1080
|
-
assert_equal 1, firm.clients.length
|
1081
|
-
end
|
1082
|
-
|
1083
|
-
def test_replace_with_less_and_dependent_nullify
|
1084
|
-
num_companies = Company.count
|
1085
|
-
companies(:rails_core).companies = []
|
1086
|
-
assert_equal num_companies, Company.count
|
1087
|
-
end
|
1088
|
-
|
1089
|
-
def test_replace_with_new
|
1090
|
-
firm = Firm.find(:first)
|
1091
|
-
firm.clients = [companies(:second_client), Client.new("name" => "New Client")]
|
1092
|
-
firm.save
|
1093
|
-
firm.reload
|
1094
|
-
assert_equal 2, firm.clients.length
|
1095
|
-
assert !firm.clients.include?(:first_client)
|
1096
|
-
end
|
1097
|
-
|
1098
|
-
def test_replace_on_new_object
|
1099
|
-
firm = Firm.new("name" => "New Firm")
|
1100
|
-
firm.clients = [companies(:second_client), Client.new("name" => "New Client")]
|
1101
|
-
assert firm.save
|
1102
|
-
firm.reload
|
1103
|
-
assert_equal 2, firm.clients.length
|
1104
|
-
assert firm.clients.include?(Client.find_by_name("New Client"))
|
1105
|
-
end
|
1106
|
-
|
1107
|
-
def test_get_ids
|
1108
|
-
assert_equal [companies(:first_client).id, companies(:second_client).id], companies(:first_firm).client_ids
|
1109
|
-
end
|
1110
|
-
|
1111
|
-
def test_assign_ids
|
1112
|
-
firm = Firm.new("name" => "Apple")
|
1113
|
-
firm.client_ids = [companies(:first_client).id, companies(:second_client).id]
|
1114
|
-
firm.save
|
1115
|
-
firm.reload
|
1116
|
-
assert_equal 2, firm.clients.length
|
1117
|
-
assert firm.clients.include?(companies(:second_client))
|
1118
|
-
end
|
1119
|
-
|
1120
|
-
def test_assign_ids_ignoring_blanks
|
1121
|
-
firm = Firm.create!(:name => 'Apple')
|
1122
|
-
firm.client_ids = [companies(:first_client).id, nil, companies(:second_client).id, '']
|
1123
|
-
firm.save!
|
1124
|
-
|
1125
|
-
assert_equal 2, firm.clients(true).size
|
1126
|
-
assert firm.clients.include?(companies(:second_client))
|
1127
|
-
end
|
1128
|
-
|
1129
|
-
def test_get_ids_for_through
|
1130
|
-
assert_equal [comments(:eager_other_comment1).id], authors(:mary).comment_ids
|
1131
|
-
end
|
1132
|
-
|
1133
|
-
def test_assign_ids_for_through
|
1134
|
-
assert_raise(NoMethodError) { authors(:mary).comment_ids = [123] }
|
1135
|
-
end
|
1136
|
-
|
1137
|
-
def test_dynamic_find_should_respect_association_order_for_through
|
1138
|
-
assert_equal Comment.find(10), authors(:david).comments_desc.find(:first, :conditions => "comments.type = 'SpecialComment'")
|
1139
|
-
assert_equal Comment.find(10), authors(:david).comments_desc.find_by_type('SpecialComment')
|
1140
|
-
end
|
1141
|
-
|
1142
|
-
def test_dynamic_find_order_should_override_association_order_for_through
|
1143
|
-
assert_equal Comment.find(3), authors(:david).comments_desc.find(:first, :conditions => "comments.type = 'SpecialComment'", :order => 'comments.id')
|
1144
|
-
assert_equal Comment.find(3), authors(:david).comments_desc.find_by_type('SpecialComment', :order => 'comments.id')
|
1145
|
-
end
|
1146
|
-
|
1147
|
-
def test_dynamic_find_all_should_respect_association_order_for_through
|
1148
|
-
assert_equal [Comment.find(10), Comment.find(7), Comment.find(6), Comment.find(3)], authors(:david).comments_desc.find(:all, :conditions => "comments.type = 'SpecialComment'")
|
1149
|
-
assert_equal [Comment.find(10), Comment.find(7), Comment.find(6), Comment.find(3)], authors(:david).comments_desc.find_all_by_type('SpecialComment')
|
1150
|
-
end
|
1151
|
-
|
1152
|
-
def test_dynamic_find_all_order_should_override_association_order_for_through
|
1153
|
-
assert_equal [Comment.find(3), Comment.find(6), Comment.find(7), Comment.find(10)], authors(:david).comments_desc.find(:all, :conditions => "comments.type = 'SpecialComment'", :order => 'comments.id')
|
1154
|
-
assert_equal [Comment.find(3), Comment.find(6), Comment.find(7), Comment.find(10)], authors(:david).comments_desc.find_all_by_type('SpecialComment', :order => 'comments.id')
|
1155
|
-
end
|
1156
|
-
|
1157
|
-
def test_dynamic_find_all_should_respect_association_limit_for_through
|
1158
|
-
assert_equal 1, authors(:david).limited_comments.find(:all, :conditions => "comments.type = 'SpecialComment'").length
|
1159
|
-
assert_equal 1, authors(:david).limited_comments.find_all_by_type('SpecialComment').length
|
1160
|
-
end
|
1161
|
-
|
1162
|
-
def test_dynamic_find_all_order_should_override_association_limit_for_through
|
1163
|
-
assert_equal 4, authors(:david).limited_comments.find(:all, :conditions => "comments.type = 'SpecialComment'", :limit => 9_000).length
|
1164
|
-
assert_equal 4, authors(:david).limited_comments.find_all_by_type('SpecialComment', :limit => 9_000).length
|
1165
|
-
end
|
1166
|
-
|
1167
|
-
end
|
1168
|
-
|
1169
|
-
class BelongsToAssociationsTest < Test::Unit::TestCase
|
1170
|
-
fixtures :accounts, :companies, :developers, :projects, :topics,
|
1171
|
-
:developers_projects, :computers, :authors, :posts, :tags, :taggings
|
1172
|
-
|
1173
|
-
def test_belongs_to
|
1174
|
-
Client.find(3).firm.name
|
1175
|
-
assert_equal companies(:first_firm).name, Client.find(3).firm.name
|
1176
|
-
assert !Client.find(3).firm.nil?, "Microsoft should have a firm"
|
1177
|
-
end
|
1178
|
-
|
1179
|
-
def test_proxy_assignment
|
1180
|
-
account = Account.find(1)
|
1181
|
-
assert_nothing_raised { account.firm = account.firm }
|
1182
|
-
end
|
1183
|
-
|
1184
|
-
def test_triple_equality
|
1185
|
-
assert Client.find(3).firm === Firm
|
1186
|
-
assert Firm === Client.find(3).firm
|
1187
|
-
end
|
1188
|
-
|
1189
|
-
def test_type_mismatch
|
1190
|
-
assert_raise(ActiveRecord::AssociationTypeMismatch) { Account.find(1).firm = 1 }
|
1191
|
-
assert_raise(ActiveRecord::AssociationTypeMismatch) { Account.find(1).firm = Project.find(1) }
|
1192
|
-
end
|
1193
|
-
|
1194
|
-
def test_natural_assignment
|
1195
|
-
apple = Firm.create("name" => "Apple")
|
1196
|
-
citibank = Account.create("credit_limit" => 10)
|
1197
|
-
citibank.firm = apple
|
1198
|
-
assert_equal apple.id, citibank.firm_id
|
1199
|
-
end
|
1200
|
-
|
1201
|
-
def test_no_unexpected_aliasing
|
1202
|
-
first_firm = companies(:first_firm)
|
1203
|
-
another_firm = companies(:another_firm)
|
1204
|
-
|
1205
|
-
citibank = Account.create("credit_limit" => 10)
|
1206
|
-
citibank.firm = first_firm
|
1207
|
-
original_proxy = citibank.firm
|
1208
|
-
citibank.firm = another_firm
|
1209
|
-
|
1210
|
-
assert_equal first_firm.object_id, original_proxy.object_id
|
1211
|
-
assert_equal another_firm.object_id, citibank.firm.object_id
|
1212
|
-
end
|
1213
|
-
|
1214
|
-
def test_creating_the_belonging_object
|
1215
|
-
citibank = Account.create("credit_limit" => 10)
|
1216
|
-
apple = citibank.create_firm("name" => "Apple")
|
1217
|
-
assert_equal apple, citibank.firm
|
1218
|
-
citibank.save
|
1219
|
-
citibank.reload
|
1220
|
-
assert_equal apple, citibank.firm
|
1221
|
-
end
|
1222
|
-
|
1223
|
-
def test_building_the_belonging_object
|
1224
|
-
citibank = Account.create("credit_limit" => 10)
|
1225
|
-
apple = citibank.build_firm("name" => "Apple")
|
1226
|
-
citibank.save
|
1227
|
-
assert_equal apple.id, citibank.firm_id
|
1228
|
-
end
|
1229
|
-
|
1230
|
-
def test_natural_assignment_to_nil
|
1231
|
-
client = Client.find(3)
|
1232
|
-
client.firm = nil
|
1233
|
-
client.save
|
1234
|
-
assert_nil client.firm(true)
|
1235
|
-
assert_nil client.client_of
|
1236
|
-
end
|
1237
|
-
|
1238
|
-
def test_with_different_class_name
|
1239
|
-
assert_equal Company.find(1).name, Company.find(3).firm_with_other_name.name
|
1240
|
-
assert_not_nil Company.find(3).firm_with_other_name, "Microsoft should have a firm"
|
1241
|
-
end
|
1242
|
-
|
1243
|
-
def test_with_condition
|
1244
|
-
assert_equal Company.find(1).name, Company.find(3).firm_with_condition.name
|
1245
|
-
assert_not_nil Company.find(3).firm_with_condition, "Microsoft should have a firm"
|
1246
|
-
end
|
1247
|
-
|
1248
|
-
def test_belongs_to_counter
|
1249
|
-
debate = Topic.create("title" => "debate")
|
1250
|
-
assert_equal 0, debate.send(:read_attribute, "replies_count"), "No replies yet"
|
1251
|
-
|
1252
|
-
trash = debate.replies.create("title" => "blah!", "content" => "world around!")
|
1253
|
-
assert_equal 1, Topic.find(debate.id).send(:read_attribute, "replies_count"), "First reply created"
|
1254
|
-
|
1255
|
-
trash.destroy
|
1256
|
-
assert_equal 0, Topic.find(debate.id).send(:read_attribute, "replies_count"), "First reply deleted"
|
1257
|
-
end
|
1258
|
-
|
1259
|
-
def test_belongs_to_counter_with_reassigning
|
1260
|
-
t1 = Topic.create("title" => "t1")
|
1261
|
-
t2 = Topic.create("title" => "t2")
|
1262
|
-
r1 = Reply.new("title" => "r1", "content" => "r1")
|
1263
|
-
r1.topic = t1
|
1264
|
-
|
1265
|
-
assert r1.save
|
1266
|
-
assert_equal 1, Topic.find(t1.id).replies.size
|
1267
|
-
assert_equal 0, Topic.find(t2.id).replies.size
|
1268
|
-
|
1269
|
-
r1.topic = Topic.find(t2.id)
|
1270
|
-
|
1271
|
-
assert r1.save
|
1272
|
-
assert_equal 0, Topic.find(t1.id).replies.size
|
1273
|
-
assert_equal 1, Topic.find(t2.id).replies.size
|
1274
|
-
|
1275
|
-
r1.topic = nil
|
1276
|
-
|
1277
|
-
assert_equal 0, Topic.find(t1.id).replies.size
|
1278
|
-
assert_equal 0, Topic.find(t2.id).replies.size
|
1279
|
-
|
1280
|
-
r1.topic = t1
|
1281
|
-
|
1282
|
-
assert_equal 1, Topic.find(t1.id).replies.size
|
1283
|
-
assert_equal 0, Topic.find(t2.id).replies.size
|
1284
|
-
|
1285
|
-
r1.destroy
|
1286
|
-
|
1287
|
-
assert_equal 0, Topic.find(t1.id).replies.size
|
1288
|
-
assert_equal 0, Topic.find(t2.id).replies.size
|
1289
|
-
end
|
1290
|
-
|
1291
|
-
def test_belongs_to_counter_after_save
|
1292
|
-
topic = Topic.create!(:title => "monday night")
|
1293
|
-
topic.replies.create!(:title => "re: monday night", :content => "football")
|
1294
|
-
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1295
|
-
|
1296
|
-
topic.save!
|
1297
|
-
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1298
|
-
end
|
1299
|
-
|
1300
|
-
def test_belongs_to_counter_after_update_attributes
|
1301
|
-
topic = Topic.create!(:title => "37s")
|
1302
|
-
topic.replies.create!(:title => "re: 37s", :content => "rails")
|
1303
|
-
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1304
|
-
|
1305
|
-
topic.update_attributes(:title => "37signals")
|
1306
|
-
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1307
|
-
end
|
1308
|
-
|
1309
|
-
def test_belongs_to_counter_after_save
|
1310
|
-
topic = Topic.create("title" => "monday night")
|
1311
|
-
topic.replies.create("title" => "re: monday night", "content" => "football")
|
1312
|
-
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1313
|
-
|
1314
|
-
topic.save
|
1315
|
-
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1316
|
-
end
|
1317
|
-
|
1318
|
-
def test_belongs_to_counter_after_update_attributes
|
1319
|
-
topic = Topic.create("title" => "37s")
|
1320
|
-
topic.replies.create("title" => "re: 37s", "content" => "rails")
|
1321
|
-
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1322
|
-
|
1323
|
-
topic.update_attributes("title" => "37signals")
|
1324
|
-
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1325
|
-
end
|
1326
|
-
|
1327
|
-
def test_assignment_before_parent_saved
|
1328
|
-
client = Client.find(:first)
|
1329
|
-
apple = Firm.new("name" => "Apple")
|
1330
|
-
client.firm = apple
|
1331
|
-
assert_equal apple, client.firm
|
1332
|
-
assert apple.new_record?
|
1333
|
-
assert client.save
|
1334
|
-
assert apple.save
|
1335
|
-
assert !apple.new_record?
|
1336
|
-
assert_equal apple, client.firm
|
1337
|
-
assert_equal apple, client.firm(true)
|
1338
|
-
end
|
1339
|
-
|
1340
|
-
def test_assignment_before_child_saved
|
1341
|
-
final_cut = Client.new("name" => "Final Cut")
|
1342
|
-
firm = Firm.find(1)
|
1343
|
-
final_cut.firm = firm
|
1344
|
-
assert final_cut.new_record?
|
1345
|
-
assert final_cut.save
|
1346
|
-
assert !final_cut.new_record?
|
1347
|
-
assert !firm.new_record?
|
1348
|
-
assert_equal firm, final_cut.firm
|
1349
|
-
assert_equal firm, final_cut.firm(true)
|
1350
|
-
end
|
1351
|
-
|
1352
|
-
def test_assignment_before_either_saved
|
1353
|
-
final_cut = Client.new("name" => "Final Cut")
|
1354
|
-
apple = Firm.new("name" => "Apple")
|
1355
|
-
final_cut.firm = apple
|
1356
|
-
assert final_cut.new_record?
|
1357
|
-
assert apple.new_record?
|
1358
|
-
assert final_cut.save
|
1359
|
-
assert !final_cut.new_record?
|
1360
|
-
assert !apple.new_record?
|
1361
|
-
assert_equal apple, final_cut.firm
|
1362
|
-
assert_equal apple, final_cut.firm(true)
|
1363
|
-
end
|
1364
|
-
|
1365
|
-
def test_new_record_with_foreign_key_but_no_object
|
1366
|
-
c = Client.new("firm_id" => 1)
|
1367
|
-
assert_equal Firm.find(:first), c.firm_with_basic_id
|
1368
|
-
end
|
1369
|
-
|
1370
|
-
def test_forgetting_the_load_when_foreign_key_enters_late
|
1371
|
-
c = Client.new
|
1372
|
-
assert_nil c.firm_with_basic_id
|
1373
|
-
|
1374
|
-
c.firm_id = 1
|
1375
|
-
assert_equal Firm.find(:first), c.firm_with_basic_id
|
1376
|
-
end
|
1377
|
-
|
1378
|
-
def test_field_name_same_as_foreign_key
|
1379
|
-
computer = Computer.find(1)
|
1380
|
-
assert_not_nil computer.developer, ":foreign key == attribute didn't lock up" # '
|
1381
|
-
end
|
1382
|
-
|
1383
|
-
def test_counter_cache
|
1384
|
-
topic = Topic.create :title => "Zoom-zoom-zoom"
|
1385
|
-
assert_equal 0, topic[:replies_count]
|
1386
|
-
|
1387
|
-
reply = Reply.create(:title => "re: zoom", :content => "speedy quick!")
|
1388
|
-
reply.topic = topic
|
1389
|
-
|
1390
|
-
assert_equal 1, topic.reload[:replies_count]
|
1391
|
-
assert_equal 1, topic.replies.size
|
1392
|
-
|
1393
|
-
topic[:replies_count] = 15
|
1394
|
-
assert_equal 15, topic.replies.size
|
1395
|
-
end
|
1396
|
-
|
1397
|
-
def test_custom_counter_cache
|
1398
|
-
reply = Reply.create(:title => "re: zoom", :content => "speedy quick!")
|
1399
|
-
assert_equal 0, reply[:replies_count]
|
1400
|
-
|
1401
|
-
silly = SillyReply.create(:title => "gaga", :content => "boo-boo")
|
1402
|
-
silly.reply = reply
|
1403
|
-
|
1404
|
-
assert_equal 1, reply.reload[:replies_count]
|
1405
|
-
assert_equal 1, reply.replies.size
|
1406
|
-
|
1407
|
-
reply[:replies_count] = 17
|
1408
|
-
assert_equal 17, reply.replies.size
|
1409
|
-
end
|
1410
|
-
|
1411
|
-
def test_store_two_association_with_one_save
|
1412
|
-
num_orders = Order.count
|
1413
|
-
num_customers = Customer.count
|
1414
|
-
order = Order.new
|
1415
|
-
|
1416
|
-
customer1 = order.billing = Customer.new
|
1417
|
-
customer2 = order.shipping = Customer.new
|
1418
|
-
assert order.save
|
1419
|
-
assert_equal customer1, order.billing
|
1420
|
-
assert_equal customer2, order.shipping
|
1421
|
-
|
1422
|
-
order.reload
|
1423
|
-
|
1424
|
-
assert_equal customer1, order.billing
|
1425
|
-
assert_equal customer2, order.shipping
|
1426
|
-
|
1427
|
-
assert_equal num_orders +1, Order.count
|
1428
|
-
assert_equal num_customers +2, Customer.count
|
1429
|
-
end
|
1430
|
-
|
1431
|
-
|
1432
|
-
def test_store_association_in_two_relations_with_one_save
|
1433
|
-
num_orders = Order.count
|
1434
|
-
num_customers = Customer.count
|
1435
|
-
order = Order.new
|
1436
|
-
|
1437
|
-
customer = order.billing = order.shipping = Customer.new
|
1438
|
-
assert order.save
|
1439
|
-
assert_equal customer, order.billing
|
1440
|
-
assert_equal customer, order.shipping
|
1441
|
-
|
1442
|
-
order.reload
|
1443
|
-
|
1444
|
-
assert_equal customer, order.billing
|
1445
|
-
assert_equal customer, order.shipping
|
1446
|
-
|
1447
|
-
assert_equal num_orders +1, Order.count
|
1448
|
-
assert_equal num_customers +1, Customer.count
|
1449
|
-
end
|
1450
|
-
|
1451
|
-
def test_store_association_in_two_relations_with_one_save_in_existing_object
|
1452
|
-
num_orders = Order.count
|
1453
|
-
num_customers = Customer.count
|
1454
|
-
order = Order.create
|
1455
|
-
|
1456
|
-
customer = order.billing = order.shipping = Customer.new
|
1457
|
-
assert order.save
|
1458
|
-
assert_equal customer, order.billing
|
1459
|
-
assert_equal customer, order.shipping
|
1460
|
-
|
1461
|
-
order.reload
|
1462
|
-
|
1463
|
-
assert_equal customer, order.billing
|
1464
|
-
assert_equal customer, order.shipping
|
1465
|
-
|
1466
|
-
assert_equal num_orders +1, Order.count
|
1467
|
-
assert_equal num_customers +1, Customer.count
|
1468
|
-
end
|
1469
|
-
|
1470
|
-
def test_store_association_in_two_relations_with_one_save_in_existing_object_with_values
|
1471
|
-
num_orders = Order.count
|
1472
|
-
num_customers = Customer.count
|
1473
|
-
order = Order.create
|
1474
|
-
|
1475
|
-
customer = order.billing = order.shipping = Customer.new
|
1476
|
-
assert order.save
|
1477
|
-
assert_equal customer, order.billing
|
1478
|
-
assert_equal customer, order.shipping
|
1479
|
-
|
1480
|
-
order.reload
|
1481
|
-
|
1482
|
-
customer = order.billing = order.shipping = Customer.new
|
1483
|
-
|
1484
|
-
assert order.save
|
1485
|
-
order.reload
|
1486
|
-
|
1487
|
-
assert_equal customer, order.billing
|
1488
|
-
assert_equal customer, order.shipping
|
1489
|
-
|
1490
|
-
assert_equal num_orders +1, Order.count
|
1491
|
-
assert_equal num_customers +2, Customer.count
|
1492
|
-
end
|
1493
|
-
|
1494
|
-
|
1495
|
-
def test_association_assignment_sticks
|
1496
|
-
post = Post.find(:first)
|
1497
|
-
|
1498
|
-
author1, author2 = Author.find(:all, :limit => 2)
|
1499
|
-
assert_not_nil author1
|
1500
|
-
assert_not_nil author2
|
1501
|
-
|
1502
|
-
# make sure the association is loaded
|
1503
|
-
post.author
|
1504
|
-
|
1505
|
-
# set the association by id, directly
|
1506
|
-
post.author_id = author2.id
|
1507
|
-
|
1508
|
-
# save and reload
|
1509
|
-
post.save!
|
1510
|
-
post.reload
|
1511
|
-
|
1512
|
-
# the author id of the post should be the id we set
|
1513
|
-
assert_equal post.author_id, author2.id
|
1514
|
-
end
|
1515
|
-
|
1516
|
-
end
|
1517
|
-
|
1518
|
-
|
1519
|
-
class ProjectWithAfterCreateHook < ActiveRecord::Base
|
1520
|
-
set_table_name 'projects'
|
1521
|
-
has_and_belongs_to_many :developers,
|
1522
|
-
:class_name => "DeveloperForProjectWithAfterCreateHook",
|
1523
|
-
:join_table => "developers_projects",
|
1524
|
-
:foreign_key => "project_id",
|
1525
|
-
:association_foreign_key => "developer_id"
|
1526
|
-
|
1527
|
-
after_create :add_david
|
1528
|
-
|
1529
|
-
def add_david
|
1530
|
-
david = DeveloperForProjectWithAfterCreateHook.find_by_name('David')
|
1531
|
-
david.projects << self
|
1532
|
-
end
|
1533
|
-
end
|
1534
|
-
|
1535
|
-
class DeveloperForProjectWithAfterCreateHook < ActiveRecord::Base
|
1536
|
-
set_table_name 'developers'
|
1537
|
-
has_and_belongs_to_many :projects,
|
1538
|
-
:class_name => "ProjectWithAfterCreateHook",
|
1539
|
-
:join_table => "developers_projects",
|
1540
|
-
:association_foreign_key => "project_id",
|
1541
|
-
:foreign_key => "developer_id"
|
1542
|
-
end
|
1543
|
-
|
1544
|
-
|
1545
|
-
class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
1546
|
-
fixtures :accounts, :companies, :categories, :posts, :categories_posts, :developers, :projects, :developers_projects
|
1547
|
-
|
1548
|
-
def test_has_and_belongs_to_many
|
1549
|
-
david = Developer.find(1)
|
1550
|
-
|
1551
|
-
assert !david.projects.empty?
|
1552
|
-
assert_equal 2, david.projects.size
|
1553
|
-
|
1554
|
-
active_record = Project.find(1)
|
1555
|
-
assert !active_record.developers.empty?
|
1556
|
-
assert_equal 3, active_record.developers.size
|
1557
|
-
assert active_record.developers.include?(david)
|
1558
|
-
end
|
1559
|
-
|
1560
|
-
def test_triple_equality
|
1561
|
-
assert !(Array === Developer.find(1).projects)
|
1562
|
-
assert Developer.find(1).projects === Array
|
1563
|
-
end
|
1564
|
-
|
1565
|
-
def test_adding_single
|
1566
|
-
jamis = Developer.find(2)
|
1567
|
-
jamis.projects.reload # causing the collection to load
|
1568
|
-
action_controller = Project.find(2)
|
1569
|
-
assert_equal 1, jamis.projects.size
|
1570
|
-
assert_equal 1, action_controller.developers.size
|
1571
|
-
|
1572
|
-
jamis.projects << action_controller
|
1573
|
-
|
1574
|
-
assert_equal 2, jamis.projects.size
|
1575
|
-
assert_equal 2, jamis.projects(true).size
|
1576
|
-
assert_equal 2, action_controller.developers(true).size
|
1577
|
-
end
|
1578
|
-
|
1579
|
-
def test_adding_type_mismatch
|
1580
|
-
jamis = Developer.find(2)
|
1581
|
-
assert_raise(ActiveRecord::AssociationTypeMismatch) { jamis.projects << nil }
|
1582
|
-
assert_raise(ActiveRecord::AssociationTypeMismatch) { jamis.projects << 1 }
|
1583
|
-
end
|
1584
|
-
|
1585
|
-
def test_adding_from_the_project
|
1586
|
-
jamis = Developer.find(2)
|
1587
|
-
action_controller = Project.find(2)
|
1588
|
-
action_controller.developers.reload
|
1589
|
-
assert_equal 1, jamis.projects.size
|
1590
|
-
assert_equal 1, action_controller.developers.size
|
1591
|
-
|
1592
|
-
action_controller.developers << jamis
|
1593
|
-
|
1594
|
-
assert_equal 2, jamis.projects(true).size
|
1595
|
-
assert_equal 2, action_controller.developers.size
|
1596
|
-
assert_equal 2, action_controller.developers(true).size
|
1597
|
-
end
|
1598
|
-
|
1599
|
-
def test_adding_from_the_project_fixed_timestamp
|
1600
|
-
jamis = Developer.find(2)
|
1601
|
-
action_controller = Project.find(2)
|
1602
|
-
action_controller.developers.reload
|
1603
|
-
assert_equal 1, jamis.projects.size
|
1604
|
-
assert_equal 1, action_controller.developers.size
|
1605
|
-
updated_at = jamis.updated_at
|
1606
|
-
|
1607
|
-
action_controller.developers << jamis
|
1608
|
-
|
1609
|
-
assert_equal updated_at, jamis.updated_at
|
1610
|
-
assert_equal 2, jamis.projects(true).size
|
1611
|
-
assert_equal 2, action_controller.developers.size
|
1612
|
-
assert_equal 2, action_controller.developers(true).size
|
1613
|
-
end
|
1614
|
-
|
1615
|
-
def test_adding_multiple
|
1616
|
-
aredridel = Developer.new("name" => "Aredridel")
|
1617
|
-
aredridel.save
|
1618
|
-
aredridel.projects.reload
|
1619
|
-
aredridel.projects.push(Project.find(1), Project.find(2))
|
1620
|
-
assert_equal 2, aredridel.projects.size
|
1621
|
-
assert_equal 2, aredridel.projects(true).size
|
1622
|
-
end
|
1623
|
-
|
1624
|
-
def test_adding_a_collection
|
1625
|
-
aredridel = Developer.new("name" => "Aredridel")
|
1626
|
-
aredridel.save
|
1627
|
-
aredridel.projects.reload
|
1628
|
-
aredridel.projects.concat([Project.find(1), Project.find(2)])
|
1629
|
-
assert_equal 2, aredridel.projects.size
|
1630
|
-
assert_equal 2, aredridel.projects(true).size
|
1631
|
-
end
|
1632
|
-
|
1633
|
-
def test_adding_uses_default_values_on_join_table
|
1634
|
-
ac = projects(:action_controller)
|
1635
|
-
assert !developers(:jamis).projects.include?(ac)
|
1636
|
-
developers(:jamis).projects << ac
|
1637
|
-
|
1638
|
-
assert developers(:jamis, :reload).projects.include?(ac)
|
1639
|
-
project = developers(:jamis).projects.detect { |p| p == ac }
|
1640
|
-
assert_equal 1, project.access_level.to_i
|
1641
|
-
end
|
1642
|
-
|
1643
|
-
def test_habtm_attribute_access_and_respond_to
|
1644
|
-
project = developers(:jamis).projects[0]
|
1645
|
-
assert project.has_attribute?("name")
|
1646
|
-
assert project.has_attribute?("joined_on")
|
1647
|
-
assert project.has_attribute?("access_level")
|
1648
|
-
assert project.respond_to?("name")
|
1649
|
-
assert project.respond_to?("name=")
|
1650
|
-
assert project.respond_to?("name?")
|
1651
|
-
assert project.respond_to?("joined_on")
|
1652
|
-
# given that the 'join attribute' won't be persisted, I don't
|
1653
|
-
# think we should define the mutators
|
1654
|
-
#assert project.respond_to?("joined_on=")
|
1655
|
-
assert project.respond_to?("joined_on?")
|
1656
|
-
assert project.respond_to?("access_level")
|
1657
|
-
#assert project.respond_to?("access_level=")
|
1658
|
-
assert project.respond_to?("access_level?")
|
1659
|
-
end
|
1660
|
-
|
1661
|
-
def test_habtm_adding_before_save
|
1662
|
-
no_of_devels = Developer.count
|
1663
|
-
no_of_projects = Project.count
|
1664
|
-
aredridel = Developer.new("name" => "Aredridel")
|
1665
|
-
aredridel.projects.concat([Project.find(1), p = Project.new("name" => "Projekt")])
|
1666
|
-
assert aredridel.new_record?
|
1667
|
-
assert p.new_record?
|
1668
|
-
assert aredridel.save
|
1669
|
-
assert !aredridel.new_record?
|
1670
|
-
assert_equal no_of_devels+1, Developer.count
|
1671
|
-
assert_equal no_of_projects+1, Project.count
|
1672
|
-
assert_equal 2, aredridel.projects.size
|
1673
|
-
assert_equal 2, aredridel.projects(true).size
|
1674
|
-
end
|
1675
|
-
|
1676
|
-
def test_habtm_saving_multiple_relationships
|
1677
|
-
new_project = Project.new("name" => "Grimetime")
|
1678
|
-
amount_of_developers = 4
|
1679
|
-
developers = (0...amount_of_developers).collect {|i| Developer.create(:name => "JME #{i}") }.reverse
|
1680
|
-
|
1681
|
-
new_project.developer_ids = [developers[0].id, developers[1].id]
|
1682
|
-
new_project.developers_with_callback_ids = [developers[2].id, developers[3].id]
|
1683
|
-
assert new_project.save
|
1684
|
-
|
1685
|
-
new_project.reload
|
1686
|
-
assert_equal amount_of_developers, new_project.developers.size
|
1687
|
-
assert_equal developers, new_project.developers
|
1688
|
-
end
|
1689
|
-
|
1690
|
-
def test_habtm_unique_order_preserved
|
1691
|
-
assert_equal developers(:poor_jamis, :jamis, :david), projects(:active_record).non_unique_developers
|
1692
|
-
assert_equal developers(:poor_jamis, :jamis, :david), projects(:active_record).developers
|
1693
|
-
end
|
1694
|
-
|
1695
|
-
def test_build
|
1696
|
-
devel = Developer.find(1)
|
1697
|
-
proj = devel.projects.build("name" => "Projekt")
|
1698
|
-
assert_equal devel.projects.last, proj
|
1699
|
-
assert proj.new_record?
|
1700
|
-
devel.save
|
1701
|
-
assert !proj.new_record?
|
1702
|
-
assert_equal devel.projects.last, proj
|
1703
|
-
assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated
|
1704
|
-
end
|
1705
|
-
|
1706
|
-
def test_build_by_new_record
|
1707
|
-
devel = Developer.new(:name => "Marcel", :salary => 75000)
|
1708
|
-
proj1 = devel.projects.build(:name => "Make bed")
|
1709
|
-
proj2 = devel.projects.build(:name => "Lie in it")
|
1710
|
-
assert_equal devel.projects.last, proj2
|
1711
|
-
assert proj2.new_record?
|
1712
|
-
devel.save
|
1713
|
-
assert !devel.new_record?
|
1714
|
-
assert !proj2.new_record?
|
1715
|
-
assert_equal devel.projects.last, proj2
|
1716
|
-
assert_equal Developer.find_by_name("Marcel").projects.last, proj2 # prove join table is updated
|
1717
|
-
end
|
1718
|
-
|
1719
|
-
def test_create
|
1720
|
-
devel = Developer.find(1)
|
1721
|
-
proj = devel.projects.create("name" => "Projekt")
|
1722
|
-
assert_equal devel.projects.last, proj
|
1723
|
-
assert !proj.new_record?
|
1724
|
-
assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated
|
1725
|
-
end
|
1726
|
-
|
1727
|
-
def test_create_by_new_record
|
1728
|
-
devel = Developer.new(:name => "Marcel", :salary => 75000)
|
1729
|
-
proj1 = devel.projects.build(:name => "Make bed")
|
1730
|
-
proj2 = devel.projects.build(:name => "Lie in it")
|
1731
|
-
assert_equal devel.projects.last, proj2
|
1732
|
-
assert proj2.new_record?
|
1733
|
-
devel.save
|
1734
|
-
assert !devel.new_record?
|
1735
|
-
assert !proj2.new_record?
|
1736
|
-
assert_equal devel.projects.last, proj2
|
1737
|
-
assert_equal Developer.find_by_name("Marcel").projects.last, proj2 # prove join table is updated
|
1738
|
-
end
|
1739
|
-
|
1740
|
-
def test_uniq_after_the_fact
|
1741
|
-
developers(:jamis).projects << projects(:active_record)
|
1742
|
-
developers(:jamis).projects << projects(:active_record)
|
1743
|
-
assert_equal 3, developers(:jamis).projects.size
|
1744
|
-
assert_equal 1, developers(:jamis).projects.uniq.size
|
1745
|
-
end
|
1746
|
-
|
1747
|
-
def test_uniq_before_the_fact
|
1748
|
-
projects(:active_record).developers << developers(:jamis)
|
1749
|
-
projects(:active_record).developers << developers(:david)
|
1750
|
-
assert_equal 3, projects(:active_record, :reload).developers.size
|
1751
|
-
end
|
1752
|
-
|
1753
|
-
def test_deleting
|
1754
|
-
david = Developer.find(1)
|
1755
|
-
active_record = Project.find(1)
|
1756
|
-
david.projects.reload
|
1757
|
-
assert_equal 2, david.projects.size
|
1758
|
-
assert_equal 3, active_record.developers.size
|
1759
|
-
|
1760
|
-
david.projects.delete(active_record)
|
1761
|
-
|
1762
|
-
assert_equal 1, david.projects.size
|
1763
|
-
assert_equal 1, david.projects(true).size
|
1764
|
-
assert_equal 2, active_record.developers(true).size
|
1765
|
-
end
|
1766
|
-
|
1767
|
-
def test_deleting_array
|
1768
|
-
david = Developer.find(1)
|
1769
|
-
david.projects.reload
|
1770
|
-
david.projects.delete(Project.find(:all))
|
1771
|
-
assert_equal 0, david.projects.size
|
1772
|
-
assert_equal 0, david.projects(true).size
|
1773
|
-
end
|
1774
|
-
|
1775
|
-
def test_deleting_with_sql
|
1776
|
-
david = Developer.find(1)
|
1777
|
-
active_record = Project.find(1)
|
1778
|
-
active_record.developers.reload
|
1779
|
-
assert_equal 3, active_record.developers_by_sql.size
|
1780
|
-
|
1781
|
-
active_record.developers_by_sql.delete(david)
|
1782
|
-
assert_equal 2, active_record.developers_by_sql(true).size
|
1783
|
-
end
|
1784
|
-
|
1785
|
-
def test_deleting_array_with_sql
|
1786
|
-
active_record = Project.find(1)
|
1787
|
-
active_record.developers.reload
|
1788
|
-
assert_equal 3, active_record.developers_by_sql.size
|
1789
|
-
|
1790
|
-
active_record.developers_by_sql.delete(Developer.find(:all))
|
1791
|
-
assert_equal 0, active_record.developers_by_sql(true).size
|
1792
|
-
end
|
1793
|
-
|
1794
|
-
def test_deleting_all
|
1795
|
-
david = Developer.find(1)
|
1796
|
-
david.projects.reload
|
1797
|
-
david.projects.clear
|
1798
|
-
assert_equal 0, david.projects.size
|
1799
|
-
assert_equal 0, david.projects(true).size
|
1800
|
-
end
|
1801
|
-
|
1802
|
-
def test_removing_associations_on_destroy
|
1803
|
-
david = DeveloperWithBeforeDestroyRaise.find(1)
|
1804
|
-
assert !david.projects.empty?
|
1805
|
-
assert_nothing_raised { david.destroy }
|
1806
|
-
assert david.projects.empty?
|
1807
|
-
assert DeveloperWithBeforeDestroyRaise.connection.select_all("SELECT * FROM developers_projects WHERE developer_id = 1").empty?
|
1808
|
-
end
|
1809
|
-
|
1810
|
-
def test_additional_columns_from_join_table
|
1811
|
-
assert_date_from_db Date.new(2004, 10, 10), Developer.find(1).projects.first.joined_on.to_date
|
1812
|
-
end
|
1813
|
-
|
1814
|
-
def test_destroy_all
|
1815
|
-
david = Developer.find(1)
|
1816
|
-
david.projects.reload
|
1817
|
-
assert !david.projects.empty?
|
1818
|
-
david.projects.destroy_all
|
1819
|
-
assert david.projects.empty?
|
1820
|
-
assert david.projects(true).empty?
|
1821
|
-
end
|
1822
|
-
|
1823
|
-
def test_deprecated_push_with_attributes_was_removed
|
1824
|
-
jamis = developers(:jamis)
|
1825
|
-
assert_raise(NoMethodError) do
|
1826
|
-
jamis.projects.push_with_attributes(projects(:action_controller), :joined_on => Date.today)
|
1827
|
-
end
|
1828
|
-
end
|
1829
|
-
|
1830
|
-
def test_associations_with_conditions
|
1831
|
-
assert_equal 3, projects(:active_record).developers.size
|
1832
|
-
assert_equal 1, projects(:active_record).developers_named_david.size
|
1833
|
-
assert_equal 1, projects(:active_record).developers_named_david_with_hash_conditions.size
|
1834
|
-
|
1835
|
-
assert_equal developers(:david), projects(:active_record).developers_named_david.find(developers(:david).id)
|
1836
|
-
assert_equal developers(:david), projects(:active_record).developers_named_david_with_hash_conditions.find(developers(:david).id)
|
1837
|
-
assert_equal developers(:david), projects(:active_record).salaried_developers.find(developers(:david).id)
|
1838
|
-
|
1839
|
-
projects(:active_record).developers_named_david.clear
|
1840
|
-
assert_equal 2, projects(:active_record, :reload).developers.size
|
1841
|
-
end
|
1842
|
-
|
1843
|
-
def test_find_in_association
|
1844
|
-
# Using sql
|
1845
|
-
assert_equal developers(:david), projects(:active_record).developers.find(developers(:david).id), "SQL find"
|
1846
|
-
|
1847
|
-
# Using ruby
|
1848
|
-
active_record = projects(:active_record)
|
1849
|
-
active_record.developers.reload
|
1850
|
-
assert_equal developers(:david), active_record.developers.find(developers(:david).id), "Ruby find"
|
1851
|
-
end
|
1852
|
-
|
1853
|
-
def test_find_in_association_with_custom_finder_sql
|
1854
|
-
assert_equal developers(:david), projects(:active_record).developers_with_finder_sql.find(developers(:david).id), "SQL find"
|
1855
|
-
|
1856
|
-
active_record = projects(:active_record)
|
1857
|
-
active_record.developers_with_finder_sql.reload
|
1858
|
-
assert_equal developers(:david), active_record.developers_with_finder_sql.find(developers(:david).id), "Ruby find"
|
1859
|
-
end
|
1860
|
-
|
1861
|
-
def test_find_in_association_with_custom_finder_sql_and_string_id
|
1862
|
-
assert_equal developers(:david), projects(:active_record).developers_with_finder_sql.find(developers(:david).id.to_s), "SQL find"
|
1863
|
-
end
|
1864
|
-
|
1865
|
-
def test_find_with_merged_options
|
1866
|
-
assert_equal 1, projects(:active_record).limited_developers.size
|
1867
|
-
assert_equal 1, projects(:active_record).limited_developers.find(:all).size
|
1868
|
-
assert_equal 3, projects(:active_record).limited_developers.find(:all, :limit => nil).size
|
1869
|
-
end
|
1870
|
-
|
1871
|
-
def test_dynamic_find_should_respect_association_order
|
1872
|
-
# Developers are ordered 'name DESC, id DESC'
|
1873
|
-
low_id_jamis = developers(:jamis)
|
1874
|
-
middle_id_jamis = developers(:poor_jamis)
|
1875
|
-
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1876
|
-
|
1877
|
-
assert_equal high_id_jamis, projects(:active_record).developers.find(:first, :conditions => "name = 'Jamis'")
|
1878
|
-
assert_equal high_id_jamis, projects(:active_record).developers.find_by_name('Jamis')
|
1879
|
-
end
|
1880
|
-
|
1881
|
-
def test_dynamic_find_order_should_override_association_order
|
1882
|
-
# Developers are ordered 'name DESC, id DESC'
|
1883
|
-
low_id_jamis = developers(:jamis)
|
1884
|
-
middle_id_jamis = developers(:poor_jamis)
|
1885
|
-
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1886
|
-
|
1887
|
-
assert_equal low_id_jamis, projects(:active_record).developers.find(:first, :conditions => "name = 'Jamis'", :order => 'id')
|
1888
|
-
assert_equal low_id_jamis, projects(:active_record).developers.find_by_name('Jamis', :order => 'id')
|
1889
|
-
end
|
1890
|
-
|
1891
|
-
def test_dynamic_find_all_should_respect_association_order
|
1892
|
-
# Developers are ordered 'name DESC, id DESC'
|
1893
|
-
low_id_jamis = developers(:jamis)
|
1894
|
-
middle_id_jamis = developers(:poor_jamis)
|
1895
|
-
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1896
|
-
|
1897
|
-
assert_equal [high_id_jamis, middle_id_jamis, low_id_jamis], projects(:active_record).developers.find(:all, :conditions => "name = 'Jamis'")
|
1898
|
-
assert_equal [high_id_jamis, middle_id_jamis, low_id_jamis], projects(:active_record).developers.find_all_by_name('Jamis')
|
1899
|
-
end
|
1900
|
-
|
1901
|
-
def test_dynamic_find_all_order_should_override_association_order
|
1902
|
-
# Developers are ordered 'name DESC, id DESC'
|
1903
|
-
low_id_jamis = developers(:jamis)
|
1904
|
-
middle_id_jamis = developers(:poor_jamis)
|
1905
|
-
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1906
|
-
|
1907
|
-
assert_equal [low_id_jamis, middle_id_jamis, high_id_jamis], projects(:active_record).developers.find(:all, :conditions => "name = 'Jamis'", :order => 'id')
|
1908
|
-
assert_equal [low_id_jamis, middle_id_jamis, high_id_jamis], projects(:active_record).developers.find_all_by_name('Jamis', :order => 'id')
|
1909
|
-
end
|
1910
|
-
|
1911
|
-
def test_dynamic_find_all_should_respect_association_limit
|
1912
|
-
assert_equal 1, projects(:active_record).limited_developers.find(:all, :conditions => "name = 'Jamis'").length
|
1913
|
-
assert_equal 1, projects(:active_record).limited_developers.find_all_by_name('Jamis').length
|
1914
|
-
end
|
1915
|
-
|
1916
|
-
def test_dynamic_find_all_order_should_override_association_limit
|
1917
|
-
assert_equal 2, projects(:active_record).limited_developers.find(:all, :conditions => "name = 'Jamis'", :limit => 9_000).length
|
1918
|
-
assert_equal 2, projects(:active_record).limited_developers.find_all_by_name('Jamis', :limit => 9_000).length
|
1919
|
-
end
|
1920
|
-
|
1921
|
-
def test_new_with_values_in_collection
|
1922
|
-
jamis = DeveloperForProjectWithAfterCreateHook.find_by_name('Jamis')
|
1923
|
-
david = DeveloperForProjectWithAfterCreateHook.find_by_name('David')
|
1924
|
-
project = ProjectWithAfterCreateHook.new(:name => "Cooking with Bertie")
|
1925
|
-
project.developers << jamis
|
1926
|
-
project.save!
|
1927
|
-
project.reload
|
1928
|
-
|
1929
|
-
assert project.developers.include?(jamis)
|
1930
|
-
assert project.developers.include?(david)
|
1931
|
-
end
|
1932
|
-
|
1933
|
-
def test_find_in_association_with_options
|
1934
|
-
developers = projects(:active_record).developers.find(:all)
|
1935
|
-
assert_equal 3, developers.size
|
1936
|
-
|
1937
|
-
assert_equal developers(:poor_jamis), projects(:active_record).developers.find(:first, :conditions => "salary < 10000")
|
1938
|
-
assert_equal developers(:jamis), projects(:active_record).developers.find(:first, :order => "salary DESC")
|
1939
|
-
end
|
1940
|
-
|
1941
|
-
def test_replace_with_less
|
1942
|
-
david = developers(:david)
|
1943
|
-
david.projects = [projects(:action_controller)]
|
1944
|
-
assert david.save
|
1945
|
-
assert_equal 1, david.projects.length
|
1946
|
-
end
|
1947
|
-
|
1948
|
-
def test_replace_with_new
|
1949
|
-
david = developers(:david)
|
1950
|
-
david.projects = [projects(:action_controller), Project.new("name" => "ActionWebSearch")]
|
1951
|
-
david.save
|
1952
|
-
assert_equal 2, david.projects.length
|
1953
|
-
assert !david.projects.include?(projects(:active_record))
|
1954
|
-
end
|
1955
|
-
|
1956
|
-
def test_replace_on_new_object
|
1957
|
-
new_developer = Developer.new("name" => "Matz")
|
1958
|
-
new_developer.projects = [projects(:action_controller), Project.new("name" => "ActionWebSearch")]
|
1959
|
-
new_developer.save
|
1960
|
-
assert_equal 2, new_developer.projects.length
|
1961
|
-
end
|
1962
|
-
|
1963
|
-
def test_consider_type
|
1964
|
-
developer = Developer.find(:first)
|
1965
|
-
special_project = SpecialProject.create("name" => "Special Project")
|
1966
|
-
|
1967
|
-
other_project = developer.projects.first
|
1968
|
-
developer.special_projects << special_project
|
1969
|
-
developer.reload
|
1970
|
-
|
1971
|
-
assert developer.projects.include?(special_project)
|
1972
|
-
assert developer.special_projects.include?(special_project)
|
1973
|
-
assert !developer.special_projects.include?(other_project)
|
1974
|
-
end
|
1975
|
-
|
1976
|
-
def test_update_attributes_after_push_without_duplicate_join_table_rows
|
1977
|
-
developer = Developer.new("name" => "Kano")
|
1978
|
-
project = SpecialProject.create("name" => "Special Project")
|
1979
|
-
assert developer.save
|
1980
|
-
developer.projects << project
|
1981
|
-
developer.update_attribute("name", "Bruza")
|
1982
|
-
assert_equal 1, Developer.connection.select_value(<<-end_sql).to_i
|
1983
|
-
SELECT count(*) FROM developers_projects
|
1984
|
-
WHERE project_id = #{project.id}
|
1985
|
-
AND developer_id = #{developer.id}
|
1986
|
-
end_sql
|
1987
|
-
end
|
1988
|
-
|
1989
|
-
def test_updating_attributes_on_non_rich_associations
|
1990
|
-
welcome = categories(:technology).posts.first
|
1991
|
-
welcome.title = "Something else"
|
1992
|
-
assert welcome.save!
|
1993
|
-
end
|
1994
|
-
|
1995
|
-
def test_habtm_respects_select
|
1996
|
-
categories(:technology).select_testing_posts(true).each do |o|
|
1997
|
-
assert_respond_to o, :correctness_marker
|
1998
|
-
end
|
1999
|
-
assert_respond_to categories(:technology).select_testing_posts.find(:first), :correctness_marker
|
2000
|
-
end
|
2001
|
-
|
2002
|
-
def test_updating_attributes_on_rich_associations
|
2003
|
-
david = projects(:action_controller).developers.first
|
2004
|
-
david.name = "DHH"
|
2005
|
-
assert_raises(ActiveRecord::ReadOnlyRecord) { david.save! }
|
2006
|
-
end
|
2007
|
-
|
2008
|
-
def test_updating_attributes_on_rich_associations_with_limited_find_from_reflection
|
2009
|
-
david = projects(:action_controller).selected_developers.first
|
2010
|
-
david.name = "DHH"
|
2011
|
-
assert_nothing_raised { david.save! }
|
2012
|
-
end
|
2013
|
-
|
2014
|
-
|
2015
|
-
def test_updating_attributes_on_rich_associations_with_limited_find
|
2016
|
-
david = projects(:action_controller).developers.find(:all, :select => "developers.*").first
|
2017
|
-
david.name = "DHH"
|
2018
|
-
assert david.save!
|
2019
|
-
end
|
2020
|
-
|
2021
|
-
def test_join_table_alias
|
2022
|
-
assert_equal 3, Developer.find(:all, :include => {:projects => :developers}, :conditions => 'developers_projects_join.joined_on IS NOT NULL').size
|
2023
|
-
end
|
2024
|
-
|
2025
|
-
def test_join_with_group
|
2026
|
-
group = Developer.columns.inject([]) do |g, c|
|
2027
|
-
g << "developers.#{c.name}"
|
2028
|
-
g << "developers_projects_2.#{c.name}"
|
2029
|
-
end
|
2030
|
-
Project.columns.each { |c| group << "projects.#{c.name}" }
|
2031
|
-
|
2032
|
-
assert_equal 3, Developer.find(:all, :include => {:projects => :developers}, :conditions => 'developers_projects_join.joined_on IS NOT NULL', :group => group.join(",")).size
|
2033
|
-
end
|
2034
|
-
|
2035
|
-
def test_get_ids
|
2036
|
-
assert_equal projects(:active_record, :action_controller).map(&:id), developers(:david).project_ids
|
2037
|
-
assert_equal [projects(:active_record).id], developers(:jamis).project_ids
|
2038
|
-
end
|
2039
|
-
|
2040
|
-
def test_assign_ids
|
2041
|
-
developer = Developer.new("name" => "Joe")
|
2042
|
-
developer.project_ids = projects(:active_record, :action_controller).map(&:id)
|
2043
|
-
developer.save
|
2044
|
-
developer.reload
|
2045
|
-
assert_equal 2, developer.projects.length
|
2046
|
-
assert_equal projects(:active_record), developer.projects[0]
|
2047
|
-
assert_equal projects(:action_controller), developer.projects[1]
|
2048
|
-
end
|
2049
|
-
|
2050
|
-
def test_assign_ids_ignoring_blanks
|
2051
|
-
developer = Developer.new("name" => "Joe")
|
2052
|
-
developer.project_ids = [projects(:active_record).id, nil, projects(:action_controller).id, '']
|
2053
|
-
developer.save
|
2054
|
-
developer.reload
|
2055
|
-
assert_equal 2, developer.projects.length
|
2056
|
-
assert_equal projects(:active_record), developer.projects[0]
|
2057
|
-
assert_equal projects(:action_controller), developer.projects[1]
|
2058
|
-
end
|
2059
|
-
|
2060
|
-
def test_select_limited_ids_list
|
2061
|
-
# Set timestamps
|
2062
|
-
Developer.transaction do
|
2063
|
-
Developer.find(:all, :order => 'id').each_with_index do |record, i|
|
2064
|
-
record.update_attributes(:created_at => 5.years.ago + (i * 5.minutes))
|
2065
|
-
end
|
2066
|
-
end
|
2067
|
-
|
2068
|
-
join_base = ActiveRecord::Associations::ClassMethods::JoinDependency::JoinBase.new(Project)
|
2069
|
-
join_dep = ActiveRecord::Associations::ClassMethods::JoinDependency.new(join_base, :developers, nil)
|
2070
|
-
projects = Project.send(:select_limited_ids_list, {:order => 'developers.created_at'}, join_dep)
|
2071
|
-
assert !projects.include?("'"), projects
|
2072
|
-
assert_equal %w(1 2), projects.scan(/\d/).sort
|
2073
|
-
end
|
2074
|
-
|
2075
|
-
def test_scoped_find_on_through_association_doesnt_return_read_only_records
|
2076
|
-
tag = Post.find(1).tags.find_by_name("General")
|
2077
|
-
|
2078
|
-
assert_nothing_raised do
|
2079
|
-
tag.save!
|
2080
|
-
end
|
2081
|
-
end
|
2082
|
-
end
|
2083
|
-
|
2084
|
-
|
2085
|
-
class OverridingAssociationsTest < Test::Unit::TestCase
|
2086
|
-
class Person < ActiveRecord::Base; end
|
2087
|
-
class DifferentPerson < ActiveRecord::Base; end
|
2088
|
-
|
2089
|
-
class PeopleList < ActiveRecord::Base
|
2090
|
-
has_and_belongs_to_many :has_and_belongs_to_many, :before_add => :enlist
|
2091
|
-
has_many :has_many, :before_add => :enlist
|
2092
|
-
belongs_to :belongs_to
|
2093
|
-
has_one :has_one
|
2094
|
-
end
|
2095
|
-
|
2096
|
-
class DifferentPeopleList < PeopleList
|
2097
|
-
# Different association with the same name, callbacks should be omitted here.
|
2098
|
-
has_and_belongs_to_many :has_and_belongs_to_many, :class_name => 'DifferentPerson'
|
2099
|
-
has_many :has_many, :class_name => 'DifferentPerson'
|
2100
|
-
belongs_to :belongs_to, :class_name => 'DifferentPerson'
|
2101
|
-
has_one :has_one, :class_name => 'DifferentPerson'
|
2102
|
-
end
|
2103
|
-
|
2104
|
-
def test_habtm_association_redefinition_callbacks_should_differ_and_not_inherited
|
2105
|
-
# redeclared association on AR descendant should not inherit callbacks from superclass
|
2106
|
-
callbacks = PeopleList.read_inheritable_attribute(:before_add_for_has_and_belongs_to_many)
|
2107
|
-
assert_equal([:enlist], callbacks)
|
2108
|
-
callbacks = DifferentPeopleList.read_inheritable_attribute(:before_add_for_has_and_belongs_to_many)
|
2109
|
-
assert_equal([], callbacks)
|
2110
|
-
end
|
2111
|
-
|
2112
|
-
def test_has_many_association_redefinition_callbacks_should_differ_and_not_inherited
|
2113
|
-
# redeclared association on AR descendant should not inherit callbacks from superclass
|
2114
|
-
callbacks = PeopleList.read_inheritable_attribute(:before_add_for_has_many)
|
2115
|
-
assert_equal([:enlist], callbacks)
|
2116
|
-
callbacks = DifferentPeopleList.read_inheritable_attribute(:before_add_for_has_many)
|
2117
|
-
assert_equal([], callbacks)
|
2118
|
-
end
|
2119
|
-
|
2120
|
-
def test_habtm_association_redefinition_reflections_should_differ_and_not_inherited
|
2121
|
-
assert_not_equal(
|
2122
|
-
PeopleList.reflect_on_association(:has_and_belongs_to_many),
|
2123
|
-
DifferentPeopleList.reflect_on_association(:has_and_belongs_to_many)
|
2124
|
-
)
|
2125
|
-
end
|
2126
|
-
|
2127
|
-
def test_has_many_association_redefinition_reflections_should_differ_and_not_inherited
|
2128
|
-
assert_not_equal(
|
2129
|
-
PeopleList.reflect_on_association(:has_many),
|
2130
|
-
DifferentPeopleList.reflect_on_association(:has_many)
|
2131
|
-
)
|
2132
|
-
end
|
2133
|
-
|
2134
|
-
def test_belongs_to_association_redefinition_reflections_should_differ_and_not_inherited
|
2135
|
-
assert_not_equal(
|
2136
|
-
PeopleList.reflect_on_association(:belongs_to),
|
2137
|
-
DifferentPeopleList.reflect_on_association(:belongs_to)
|
2138
|
-
)
|
2139
|
-
end
|
2140
|
-
|
2141
|
-
def test_has_one_association_redefinition_reflections_should_differ_and_not_inherited
|
2142
|
-
assert_not_equal(
|
2143
|
-
PeopleList.reflect_on_association(:has_one),
|
2144
|
-
DifferentPeopleList.reflect_on_association(:has_one)
|
2145
|
-
)
|
2146
|
-
end
|
2147
|
-
end
|