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
@@ -0,0 +1,2015 @@
|
|
1
|
+
require "cases/helper"
|
2
|
+
require 'models/author'
|
3
|
+
require 'models/topic'
|
4
|
+
require 'models/reply'
|
5
|
+
require 'models/category'
|
6
|
+
require 'models/company'
|
7
|
+
require 'models/customer'
|
8
|
+
require 'models/developer'
|
9
|
+
require 'models/project'
|
10
|
+
require 'models/default'
|
11
|
+
require 'models/auto_id'
|
12
|
+
require 'models/column_name'
|
13
|
+
require 'models/subscriber'
|
14
|
+
require 'models/keyboard'
|
15
|
+
require 'models/post'
|
16
|
+
require 'models/comment'
|
17
|
+
require 'models/minimalistic'
|
18
|
+
require 'models/warehouse_thing'
|
19
|
+
require 'rexml/document'
|
20
|
+
|
21
|
+
class Category < ActiveRecord::Base; end
|
22
|
+
class Categorization < ActiveRecord::Base; end
|
23
|
+
class Smarts < ActiveRecord::Base; end
|
24
|
+
class CreditCard < ActiveRecord::Base
|
25
|
+
class PinNumber < ActiveRecord::Base
|
26
|
+
class CvvCode < ActiveRecord::Base; end
|
27
|
+
class SubCvvCode < CvvCode; end
|
28
|
+
end
|
29
|
+
class SubPinNumber < PinNumber; end
|
30
|
+
class Brand < Category; end
|
31
|
+
end
|
32
|
+
class MasterCreditCard < ActiveRecord::Base; end
|
33
|
+
class Post < ActiveRecord::Base; end
|
34
|
+
class Computer < ActiveRecord::Base; end
|
35
|
+
class NonExistentTable < ActiveRecord::Base; end
|
36
|
+
class TestOracleDefault < ActiveRecord::Base; end
|
37
|
+
|
38
|
+
class LoosePerson < ActiveRecord::Base
|
39
|
+
self.table_name = 'people'
|
40
|
+
self.abstract_class = true
|
41
|
+
attr_protected :credit_rating, :administrator
|
42
|
+
end
|
43
|
+
|
44
|
+
class LooseDescendant < LoosePerson
|
45
|
+
attr_protected :phone_number
|
46
|
+
end
|
47
|
+
|
48
|
+
class LooseDescendantSecond< LoosePerson
|
49
|
+
attr_protected :phone_number
|
50
|
+
attr_protected :name
|
51
|
+
end
|
52
|
+
|
53
|
+
class TightPerson < ActiveRecord::Base
|
54
|
+
self.table_name = 'people'
|
55
|
+
attr_accessible :name, :address
|
56
|
+
end
|
57
|
+
|
58
|
+
class TightDescendant < TightPerson
|
59
|
+
attr_accessible :phone_number
|
60
|
+
end
|
61
|
+
|
62
|
+
class ReadonlyTitlePost < Post
|
63
|
+
attr_readonly :title
|
64
|
+
end
|
65
|
+
|
66
|
+
class Booleantest < ActiveRecord::Base; end
|
67
|
+
|
68
|
+
class Task < ActiveRecord::Base
|
69
|
+
attr_protected :starting
|
70
|
+
end
|
71
|
+
|
72
|
+
class TopicWithProtectedContentAndAccessibleAuthorName < ActiveRecord::Base
|
73
|
+
self.table_name = 'topics'
|
74
|
+
attr_accessible :author_name
|
75
|
+
attr_protected :content
|
76
|
+
end
|
77
|
+
|
78
|
+
class BasicsTest < ActiveRecord::TestCase
|
79
|
+
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories
|
80
|
+
|
81
|
+
def test_table_exists
|
82
|
+
assert !NonExistentTable.table_exists?
|
83
|
+
assert Topic.table_exists?
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_set_attributes
|
87
|
+
topic = Topic.find(1)
|
88
|
+
topic.attributes = { "title" => "Budget", "author_name" => "Jason" }
|
89
|
+
topic.save
|
90
|
+
assert_equal("Budget", topic.title)
|
91
|
+
assert_equal("Jason", topic.author_name)
|
92
|
+
assert_equal(topics(:first).author_email_address, Topic.find(1).author_email_address)
|
93
|
+
end
|
94
|
+
|
95
|
+
def test_integers_as_nil
|
96
|
+
test = AutoId.create('value' => '')
|
97
|
+
assert_nil AutoId.find(test.id).value
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_set_attributes_with_block
|
101
|
+
topic = Topic.new do |t|
|
102
|
+
t.title = "Budget"
|
103
|
+
t.author_name = "Jason"
|
104
|
+
end
|
105
|
+
|
106
|
+
assert_equal("Budget", topic.title)
|
107
|
+
assert_equal("Jason", topic.author_name)
|
108
|
+
end
|
109
|
+
|
110
|
+
def test_respond_to?
|
111
|
+
topic = Topic.find(1)
|
112
|
+
assert topic.respond_to?("title")
|
113
|
+
assert topic.respond_to?("title?")
|
114
|
+
assert topic.respond_to?("title=")
|
115
|
+
assert topic.respond_to?(:title)
|
116
|
+
assert topic.respond_to?(:title?)
|
117
|
+
assert topic.respond_to?(:title=)
|
118
|
+
assert topic.respond_to?("author_name")
|
119
|
+
assert topic.respond_to?("attribute_names")
|
120
|
+
assert !topic.respond_to?("nothingness")
|
121
|
+
assert !topic.respond_to?(:nothingness)
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_array_content
|
125
|
+
topic = Topic.new
|
126
|
+
topic.content = %w( one two three )
|
127
|
+
topic.save
|
128
|
+
|
129
|
+
assert_equal(%w( one two three ), Topic.find(topic.id).content)
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_read_attributes_before_type_cast
|
133
|
+
category = Category.new({:name=>"Test categoty", :type => nil})
|
134
|
+
category_attrs = {"name"=>"Test categoty", "type" => nil, "categorizations_count" => nil}
|
135
|
+
assert_equal category_attrs , category.attributes_before_type_cast
|
136
|
+
end
|
137
|
+
|
138
|
+
if current_adapter?(:MysqlAdapter)
|
139
|
+
def test_read_attributes_before_type_cast_on_boolean
|
140
|
+
bool = Booleantest.create({ "value" => false })
|
141
|
+
assert_equal 0, bool.attributes_before_type_cast["value"]
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_read_attributes_before_type_cast_on_datetime
|
146
|
+
developer = Developer.find(:first)
|
147
|
+
assert_equal developer.created_at.to_s(:db) , developer.attributes_before_type_cast["created_at"]
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_hash_content
|
151
|
+
topic = Topic.new
|
152
|
+
topic.content = { "one" => 1, "two" => 2 }
|
153
|
+
topic.save
|
154
|
+
|
155
|
+
assert_equal 2, Topic.find(topic.id).content["two"]
|
156
|
+
|
157
|
+
topic.content_will_change!
|
158
|
+
topic.content["three"] = 3
|
159
|
+
topic.save
|
160
|
+
|
161
|
+
assert_equal 3, Topic.find(topic.id).content["three"]
|
162
|
+
end
|
163
|
+
|
164
|
+
def test_update_array_content
|
165
|
+
topic = Topic.new
|
166
|
+
topic.content = %w( one two three )
|
167
|
+
|
168
|
+
topic.content.push "four"
|
169
|
+
assert_equal(%w( one two three four ), topic.content)
|
170
|
+
|
171
|
+
topic.save
|
172
|
+
|
173
|
+
topic = Topic.find(topic.id)
|
174
|
+
topic.content << "five"
|
175
|
+
assert_equal(%w( one two three four five ), topic.content)
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_case_sensitive_attributes_hash
|
179
|
+
# DB2 is not case-sensitive
|
180
|
+
return true if current_adapter?(:DB2Adapter)
|
181
|
+
|
182
|
+
assert_equal @loaded_fixtures['computers']['workstation'].to_hash, Computer.find(:first).attributes
|
183
|
+
end
|
184
|
+
|
185
|
+
def test_create
|
186
|
+
topic = Topic.new
|
187
|
+
topic.title = "New Topic"
|
188
|
+
topic.save
|
189
|
+
topic_reloaded = Topic.find(topic.id)
|
190
|
+
assert_equal("New Topic", topic_reloaded.title)
|
191
|
+
end
|
192
|
+
|
193
|
+
def test_save!
|
194
|
+
topic = Topic.new(:title => "New Topic")
|
195
|
+
assert topic.save!
|
196
|
+
|
197
|
+
reply = Reply.new
|
198
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.save! }
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_save_null_string_attributes
|
202
|
+
topic = Topic.find(1)
|
203
|
+
topic.attributes = { "title" => "null", "author_name" => "null" }
|
204
|
+
topic.save!
|
205
|
+
topic.reload
|
206
|
+
assert_equal("null", topic.title)
|
207
|
+
assert_equal("null", topic.author_name)
|
208
|
+
end
|
209
|
+
|
210
|
+
def test_save_nil_string_attributes
|
211
|
+
topic = Topic.find(1)
|
212
|
+
topic.title = nil
|
213
|
+
topic.save!
|
214
|
+
topic.reload
|
215
|
+
assert_nil topic.title
|
216
|
+
end
|
217
|
+
|
218
|
+
def test_save_for_record_with_only_primary_key
|
219
|
+
minimalistic = Minimalistic.new
|
220
|
+
assert_nothing_raised { minimalistic.save }
|
221
|
+
end
|
222
|
+
|
223
|
+
def test_save_for_record_with_only_primary_key_that_is_provided
|
224
|
+
assert_nothing_raised { Minimalistic.create!(:id => 2) }
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_hashes_not_mangled
|
228
|
+
new_topic = { :title => "New Topic" }
|
229
|
+
new_topic_values = { :title => "AnotherTopic" }
|
230
|
+
|
231
|
+
topic = Topic.new(new_topic)
|
232
|
+
assert_equal new_topic[:title], topic.title
|
233
|
+
|
234
|
+
topic.attributes= new_topic_values
|
235
|
+
assert_equal new_topic_values[:title], topic.title
|
236
|
+
end
|
237
|
+
|
238
|
+
def test_create_many
|
239
|
+
topics = Topic.create([ { "title" => "first" }, { "title" => "second" }])
|
240
|
+
assert_equal 2, topics.size
|
241
|
+
assert_equal "first", topics.first.title
|
242
|
+
end
|
243
|
+
|
244
|
+
def test_create_columns_not_equal_attributes
|
245
|
+
topic = Topic.new
|
246
|
+
topic.title = 'Another New Topic'
|
247
|
+
topic.send :write_attribute, 'does_not_exist', 'test'
|
248
|
+
assert_nothing_raised { topic.save }
|
249
|
+
end
|
250
|
+
|
251
|
+
def test_create_through_factory
|
252
|
+
topic = Topic.create("title" => "New Topic")
|
253
|
+
topicReloaded = Topic.find(topic.id)
|
254
|
+
assert_equal(topic, topicReloaded)
|
255
|
+
end
|
256
|
+
|
257
|
+
def test_create_through_factory_with_block
|
258
|
+
topic = Topic.create("title" => "New Topic") do |t|
|
259
|
+
t.author_name = "David"
|
260
|
+
end
|
261
|
+
topicReloaded = Topic.find(topic.id)
|
262
|
+
assert_equal("New Topic", topic.title)
|
263
|
+
assert_equal("David", topic.author_name)
|
264
|
+
end
|
265
|
+
|
266
|
+
def test_create_many_through_factory_with_block
|
267
|
+
topics = Topic.create([ { "title" => "first" }, { "title" => "second" }]) do |t|
|
268
|
+
t.author_name = "David"
|
269
|
+
end
|
270
|
+
assert_equal 2, topics.size
|
271
|
+
topic1, topic2 = Topic.find(topics[0].id), Topic.find(topics[1].id)
|
272
|
+
assert_equal "first", topic1.title
|
273
|
+
assert_equal "David", topic1.author_name
|
274
|
+
assert_equal "second", topic2.title
|
275
|
+
assert_equal "David", topic2.author_name
|
276
|
+
end
|
277
|
+
|
278
|
+
def test_update
|
279
|
+
topic = Topic.new
|
280
|
+
topic.title = "Another New Topic"
|
281
|
+
topic.written_on = "2003-12-12 23:23:00"
|
282
|
+
topic.save
|
283
|
+
topicReloaded = Topic.find(topic.id)
|
284
|
+
assert_equal("Another New Topic", topicReloaded.title)
|
285
|
+
|
286
|
+
topicReloaded.title = "Updated topic"
|
287
|
+
topicReloaded.save
|
288
|
+
|
289
|
+
topicReloadedAgain = Topic.find(topic.id)
|
290
|
+
|
291
|
+
assert_equal("Updated topic", topicReloadedAgain.title)
|
292
|
+
end
|
293
|
+
|
294
|
+
def test_update_columns_not_equal_attributes
|
295
|
+
topic = Topic.new
|
296
|
+
topic.title = "Still another topic"
|
297
|
+
topic.save
|
298
|
+
|
299
|
+
topicReloaded = Topic.find(topic.id)
|
300
|
+
topicReloaded.title = "A New Topic"
|
301
|
+
topicReloaded.send :write_attribute, 'does_not_exist', 'test'
|
302
|
+
assert_nothing_raised { topicReloaded.save }
|
303
|
+
end
|
304
|
+
|
305
|
+
def test_update_for_record_with_only_primary_key
|
306
|
+
minimalistic = minimalistics(:first)
|
307
|
+
assert_nothing_raised { minimalistic.save }
|
308
|
+
end
|
309
|
+
|
310
|
+
def test_write_attribute
|
311
|
+
topic = Topic.new
|
312
|
+
topic.send(:write_attribute, :title, "Still another topic")
|
313
|
+
assert_equal "Still another topic", topic.title
|
314
|
+
|
315
|
+
topic.send(:write_attribute, "title", "Still another topic: part 2")
|
316
|
+
assert_equal "Still another topic: part 2", topic.title
|
317
|
+
end
|
318
|
+
|
319
|
+
def test_read_attribute
|
320
|
+
topic = Topic.new
|
321
|
+
topic.title = "Don't change the topic"
|
322
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, "title")
|
323
|
+
assert_equal "Don't change the topic", topic["title"]
|
324
|
+
|
325
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, :title)
|
326
|
+
assert_equal "Don't change the topic", topic[:title]
|
327
|
+
end
|
328
|
+
|
329
|
+
def test_read_attribute_when_false
|
330
|
+
topic = topics(:first)
|
331
|
+
topic.approved = false
|
332
|
+
assert !topic.approved?, "approved should be false"
|
333
|
+
topic.approved = "false"
|
334
|
+
assert !topic.approved?, "approved should be false"
|
335
|
+
end
|
336
|
+
|
337
|
+
def test_read_attribute_when_true
|
338
|
+
topic = topics(:first)
|
339
|
+
topic.approved = true
|
340
|
+
assert topic.approved?, "approved should be true"
|
341
|
+
topic.approved = "true"
|
342
|
+
assert topic.approved?, "approved should be true"
|
343
|
+
end
|
344
|
+
|
345
|
+
def test_read_write_boolean_attribute
|
346
|
+
topic = Topic.new
|
347
|
+
# puts ""
|
348
|
+
# puts "New Topic"
|
349
|
+
# puts topic.inspect
|
350
|
+
topic.approved = "false"
|
351
|
+
# puts "Expecting false"
|
352
|
+
# puts topic.inspect
|
353
|
+
assert !topic.approved?, "approved should be false"
|
354
|
+
topic.approved = "false"
|
355
|
+
# puts "Expecting false"
|
356
|
+
# puts topic.inspect
|
357
|
+
assert !topic.approved?, "approved should be false"
|
358
|
+
topic.approved = "true"
|
359
|
+
# puts "Expecting true"
|
360
|
+
# puts topic.inspect
|
361
|
+
assert topic.approved?, "approved should be true"
|
362
|
+
topic.approved = "true"
|
363
|
+
# puts "Expecting true"
|
364
|
+
# puts topic.inspect
|
365
|
+
assert topic.approved?, "approved should be true"
|
366
|
+
# puts ""
|
367
|
+
end
|
368
|
+
|
369
|
+
def test_query_attribute_string
|
370
|
+
[nil, "", " "].each do |value|
|
371
|
+
assert_equal false, Topic.new(:author_name => value).author_name?
|
372
|
+
end
|
373
|
+
|
374
|
+
assert_equal true, Topic.new(:author_name => "Name").author_name?
|
375
|
+
end
|
376
|
+
|
377
|
+
def test_query_attribute_number
|
378
|
+
[nil, 0, "0"].each do |value|
|
379
|
+
assert_equal false, Developer.new(:salary => value).salary?
|
380
|
+
end
|
381
|
+
|
382
|
+
assert_equal true, Developer.new(:salary => 1).salary?
|
383
|
+
assert_equal true, Developer.new(:salary => "1").salary?
|
384
|
+
end
|
385
|
+
|
386
|
+
def test_query_attribute_boolean
|
387
|
+
[nil, "", false, "false", "f", 0].each do |value|
|
388
|
+
assert_equal false, Topic.new(:approved => value).approved?
|
389
|
+
end
|
390
|
+
|
391
|
+
[true, "true", "1", 1].each do |value|
|
392
|
+
assert_equal true, Topic.new(:approved => value).approved?
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
def test_query_attribute_with_custom_fields
|
397
|
+
object = Company.find_by_sql(<<-SQL).first
|
398
|
+
SELECT c1.*, c2.ruby_type as string_value, c2.rating as int_value
|
399
|
+
FROM companies c1, companies c2
|
400
|
+
WHERE c1.firm_id = c2.id
|
401
|
+
AND c1.id = 2
|
402
|
+
SQL
|
403
|
+
|
404
|
+
assert_equal "Firm", object.string_value
|
405
|
+
assert object.string_value?
|
406
|
+
|
407
|
+
object.string_value = " "
|
408
|
+
assert !object.string_value?
|
409
|
+
|
410
|
+
assert_equal 1, object.int_value.to_i
|
411
|
+
assert object.int_value?
|
412
|
+
|
413
|
+
object.int_value = "0"
|
414
|
+
assert !object.int_value?
|
415
|
+
end
|
416
|
+
|
417
|
+
|
418
|
+
def test_reader_for_invalid_column_names
|
419
|
+
Topic.send(:define_read_method, "mumub-jumbo".to_sym, "mumub-jumbo", nil)
|
420
|
+
assert !Topic.generated_methods.include?("mumub-jumbo")
|
421
|
+
end
|
422
|
+
|
423
|
+
def test_non_attribute_access_and_assignment
|
424
|
+
topic = Topic.new
|
425
|
+
assert !topic.respond_to?("mumbo")
|
426
|
+
assert_raises(NoMethodError) { topic.mumbo }
|
427
|
+
assert_raises(NoMethodError) { topic.mumbo = 5 }
|
428
|
+
end
|
429
|
+
|
430
|
+
def test_preserving_date_objects
|
431
|
+
# SQL Server doesn't have a separate column type just for dates, so all are returned as time
|
432
|
+
return true if current_adapter?(:SQLServerAdapter)
|
433
|
+
|
434
|
+
if current_adapter?(:SybaseAdapter, :OracleAdapter)
|
435
|
+
# Sybase ctlib does not (yet?) support the date type; use datetime instead.
|
436
|
+
# Oracle treats all dates/times as Time.
|
437
|
+
assert_kind_of(
|
438
|
+
Time, Topic.find(1).last_read,
|
439
|
+
"The last_read attribute should be of the Time class"
|
440
|
+
)
|
441
|
+
else
|
442
|
+
assert_kind_of(
|
443
|
+
Date, Topic.find(1).last_read,
|
444
|
+
"The last_read attribute should be of the Date class"
|
445
|
+
)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
def test_preserving_time_objects
|
450
|
+
assert_kind_of(
|
451
|
+
Time, Topic.find(1).bonus_time,
|
452
|
+
"The bonus_time attribute should be of the Time class"
|
453
|
+
)
|
454
|
+
|
455
|
+
assert_kind_of(
|
456
|
+
Time, Topic.find(1).written_on,
|
457
|
+
"The written_on attribute should be of the Time class"
|
458
|
+
)
|
459
|
+
|
460
|
+
# For adapters which support microsecond resolution.
|
461
|
+
if current_adapter?(:PostgreSQLAdapter)
|
462
|
+
assert_equal 11, Topic.find(1).written_on.sec
|
463
|
+
assert_equal 223300, Topic.find(1).written_on.usec
|
464
|
+
assert_equal 9900, Topic.find(2).written_on.usec
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
def test_custom_mutator
|
469
|
+
topic = Topic.find(1)
|
470
|
+
# This mutator is protected in the class definition
|
471
|
+
topic.send(:approved=, true)
|
472
|
+
assert topic.instance_variable_get("@custom_approved")
|
473
|
+
end
|
474
|
+
|
475
|
+
def test_destroy
|
476
|
+
topic = Topic.find(1)
|
477
|
+
assert_equal topic, topic.destroy, 'topic.destroy did not return self'
|
478
|
+
assert topic.frozen?, 'topic not frozen after destroy'
|
479
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(topic.id) }
|
480
|
+
end
|
481
|
+
|
482
|
+
def test_record_not_found_exception
|
483
|
+
assert_raises(ActiveRecord::RecordNotFound) { topicReloaded = Topic.find(99999) }
|
484
|
+
end
|
485
|
+
|
486
|
+
def test_initialize_with_attributes
|
487
|
+
topic = Topic.new({
|
488
|
+
"title" => "initialized from attributes", "written_on" => "2003-12-12 23:23"
|
489
|
+
})
|
490
|
+
|
491
|
+
assert_equal("initialized from attributes", topic.title)
|
492
|
+
end
|
493
|
+
|
494
|
+
def test_initialize_with_invalid_attribute
|
495
|
+
begin
|
496
|
+
topic = Topic.new({ "title" => "test",
|
497
|
+
"last_read(1i)" => "2005", "last_read(2i)" => "2", "last_read(3i)" => "31"})
|
498
|
+
rescue ActiveRecord::MultiparameterAssignmentErrors => ex
|
499
|
+
assert_equal(1, ex.errors.size)
|
500
|
+
assert_equal("last_read", ex.errors[0].attribute)
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
def test_load
|
505
|
+
topics = Topic.find(:all, :order => 'id')
|
506
|
+
assert_equal(4, topics.size)
|
507
|
+
assert_equal(topics(:first).title, topics.first.title)
|
508
|
+
end
|
509
|
+
|
510
|
+
def test_load_with_condition
|
511
|
+
topics = Topic.find(:all, :conditions => "author_name = 'Mary'")
|
512
|
+
|
513
|
+
assert_equal(1, topics.size)
|
514
|
+
assert_equal(topics(:second).title, topics.first.title)
|
515
|
+
end
|
516
|
+
|
517
|
+
def test_table_name_guesses
|
518
|
+
classes = [Category, Smarts, CreditCard, CreditCard::PinNumber, CreditCard::PinNumber::CvvCode, CreditCard::SubPinNumber, CreditCard::Brand, MasterCreditCard]
|
519
|
+
|
520
|
+
assert_equal "topics", Topic.table_name
|
521
|
+
|
522
|
+
assert_equal "categories", Category.table_name
|
523
|
+
assert_equal "smarts", Smarts.table_name
|
524
|
+
assert_equal "credit_cards", CreditCard.table_name
|
525
|
+
assert_equal "credit_card_pin_numbers", CreditCard::PinNumber.table_name
|
526
|
+
assert_equal "credit_card_pin_number_cvv_codes", CreditCard::PinNumber::CvvCode.table_name
|
527
|
+
assert_equal "credit_card_pin_numbers", CreditCard::SubPinNumber.table_name
|
528
|
+
assert_equal "categories", CreditCard::Brand.table_name
|
529
|
+
assert_equal "master_credit_cards", MasterCreditCard.table_name
|
530
|
+
|
531
|
+
ActiveRecord::Base.pluralize_table_names = false
|
532
|
+
classes.each(&:reset_table_name)
|
533
|
+
|
534
|
+
assert_equal "category", Category.table_name
|
535
|
+
assert_equal "smarts", Smarts.table_name
|
536
|
+
assert_equal "credit_card", CreditCard.table_name
|
537
|
+
assert_equal "credit_card_pin_number", CreditCard::PinNumber.table_name
|
538
|
+
assert_equal "credit_card_pin_number_cvv_code", CreditCard::PinNumber::CvvCode.table_name
|
539
|
+
assert_equal "credit_card_pin_number", CreditCard::SubPinNumber.table_name
|
540
|
+
assert_equal "category", CreditCard::Brand.table_name
|
541
|
+
assert_equal "master_credit_card", MasterCreditCard.table_name
|
542
|
+
|
543
|
+
ActiveRecord::Base.pluralize_table_names = true
|
544
|
+
classes.each(&:reset_table_name)
|
545
|
+
|
546
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
547
|
+
Category.reset_table_name
|
548
|
+
assert_equal "test_categories", Category.table_name
|
549
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
550
|
+
Category.reset_table_name
|
551
|
+
assert_equal "test_categories_test", Category.table_name
|
552
|
+
ActiveRecord::Base.table_name_prefix = ""
|
553
|
+
Category.reset_table_name
|
554
|
+
assert_equal "categories_test", Category.table_name
|
555
|
+
ActiveRecord::Base.table_name_suffix = ""
|
556
|
+
Category.reset_table_name
|
557
|
+
assert_equal "categories", Category.table_name
|
558
|
+
|
559
|
+
ActiveRecord::Base.pluralize_table_names = false
|
560
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
561
|
+
Category.reset_table_name
|
562
|
+
assert_equal "test_category", Category.table_name
|
563
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
564
|
+
Category.reset_table_name
|
565
|
+
assert_equal "test_category_test", Category.table_name
|
566
|
+
ActiveRecord::Base.table_name_prefix = ""
|
567
|
+
Category.reset_table_name
|
568
|
+
assert_equal "category_test", Category.table_name
|
569
|
+
ActiveRecord::Base.table_name_suffix = ""
|
570
|
+
Category.reset_table_name
|
571
|
+
assert_equal "category", Category.table_name
|
572
|
+
|
573
|
+
ActiveRecord::Base.pluralize_table_names = true
|
574
|
+
classes.each(&:reset_table_name)
|
575
|
+
end
|
576
|
+
|
577
|
+
def test_destroy_all
|
578
|
+
original_count = Topic.count
|
579
|
+
topics_by_mary = Topic.count(:conditions => mary = "author_name = 'Mary'")
|
580
|
+
|
581
|
+
Topic.destroy_all mary
|
582
|
+
assert_equal original_count - topics_by_mary, Topic.count
|
583
|
+
end
|
584
|
+
|
585
|
+
def test_destroy_many
|
586
|
+
assert_equal 3, Client.count
|
587
|
+
Client.destroy([2, 3])
|
588
|
+
assert_equal 1, Client.count
|
589
|
+
end
|
590
|
+
|
591
|
+
def test_delete_many
|
592
|
+
original_count = Topic.count
|
593
|
+
Topic.delete(deleting = [1, 2])
|
594
|
+
assert_equal original_count - deleting.size, Topic.count
|
595
|
+
end
|
596
|
+
|
597
|
+
def test_boolean_attributes
|
598
|
+
assert ! Topic.find(1).approved?
|
599
|
+
assert Topic.find(2).approved?
|
600
|
+
end
|
601
|
+
|
602
|
+
def test_increment_counter
|
603
|
+
Topic.increment_counter("replies_count", 1)
|
604
|
+
assert_equal 2, Topic.find(1).replies_count
|
605
|
+
|
606
|
+
Topic.increment_counter("replies_count", 1)
|
607
|
+
assert_equal 3, Topic.find(1).replies_count
|
608
|
+
end
|
609
|
+
|
610
|
+
def test_decrement_counter
|
611
|
+
Topic.decrement_counter("replies_count", 2)
|
612
|
+
assert_equal -1, Topic.find(2).replies_count
|
613
|
+
|
614
|
+
Topic.decrement_counter("replies_count", 2)
|
615
|
+
assert_equal -2, Topic.find(2).replies_count
|
616
|
+
end
|
617
|
+
|
618
|
+
def test_update_counter
|
619
|
+
category = categories(:general)
|
620
|
+
assert_nil category.categorizations_count
|
621
|
+
assert_equal 2, category.categorizations.count
|
622
|
+
|
623
|
+
Category.update_counters(category.id, "categorizations_count" => category.categorizations.count)
|
624
|
+
category.reload
|
625
|
+
assert_not_nil category.categorizations_count
|
626
|
+
assert_equal 2, category.categorizations_count
|
627
|
+
|
628
|
+
Category.update_counters(category.id, "categorizations_count" => category.categorizations.count)
|
629
|
+
category.reload
|
630
|
+
assert_not_nil category.categorizations_count
|
631
|
+
assert_equal 4, category.categorizations_count
|
632
|
+
end
|
633
|
+
|
634
|
+
def test_update_all
|
635
|
+
assert_equal Topic.count, Topic.update_all("content = 'bulk updated!'")
|
636
|
+
assert_equal "bulk updated!", Topic.find(1).content
|
637
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
638
|
+
|
639
|
+
assert_equal Topic.count, Topic.update_all(['content = ?', 'bulk updated again!'])
|
640
|
+
assert_equal "bulk updated again!", Topic.find(1).content
|
641
|
+
assert_equal "bulk updated again!", Topic.find(2).content
|
642
|
+
|
643
|
+
assert_equal Topic.count, Topic.update_all(['content = ?', nil])
|
644
|
+
assert_nil Topic.find(1).content
|
645
|
+
end
|
646
|
+
|
647
|
+
def test_update_all_with_hash
|
648
|
+
assert_not_nil Topic.find(1).last_read
|
649
|
+
assert_equal Topic.count, Topic.update_all(:content => 'bulk updated with hash!', :last_read => nil)
|
650
|
+
assert_equal "bulk updated with hash!", Topic.find(1).content
|
651
|
+
assert_equal "bulk updated with hash!", Topic.find(2).content
|
652
|
+
assert_nil Topic.find(1).last_read
|
653
|
+
assert_nil Topic.find(2).last_read
|
654
|
+
end
|
655
|
+
|
656
|
+
def test_update_all_with_non_standard_table_name
|
657
|
+
assert_equal 1, WarehouseThing.update_all(['value = ?', 0], ['id = ?', 1])
|
658
|
+
assert_equal 0, WarehouseThing.find(1).value
|
659
|
+
end
|
660
|
+
|
661
|
+
if current_adapter?(:MysqlAdapter)
|
662
|
+
def test_update_all_with_order_and_limit
|
663
|
+
assert_equal 1, Topic.update_all("content = 'bulk updated!'", nil, :limit => 1, :order => 'id DESC')
|
664
|
+
end
|
665
|
+
end
|
666
|
+
|
667
|
+
def test_update_all_ignores_order_limit_from_association
|
668
|
+
author = Author.find(1)
|
669
|
+
assert_nothing_raised do
|
670
|
+
assert_equal author.posts_with_comments_and_categories.length, author.posts_with_comments_and_categories.update_all("body = 'bulk update!'")
|
671
|
+
end
|
672
|
+
end
|
673
|
+
|
674
|
+
def test_update_many
|
675
|
+
topic_data = { 1 => { "content" => "1 updated" }, 2 => { "content" => "2 updated" } }
|
676
|
+
updated = Topic.update(topic_data.keys, topic_data.values)
|
677
|
+
|
678
|
+
assert_equal 2, updated.size
|
679
|
+
assert_equal "1 updated", Topic.find(1).content
|
680
|
+
assert_equal "2 updated", Topic.find(2).content
|
681
|
+
end
|
682
|
+
|
683
|
+
def test_delete_all
|
684
|
+
assert Topic.count > 0
|
685
|
+
|
686
|
+
assert_equal Topic.count, Topic.delete_all
|
687
|
+
end
|
688
|
+
|
689
|
+
def test_update_by_condition
|
690
|
+
Topic.update_all "content = 'bulk updated!'", ["approved = ?", true]
|
691
|
+
assert_equal "Have a nice day", Topic.find(1).content
|
692
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
693
|
+
end
|
694
|
+
|
695
|
+
def test_attribute_present
|
696
|
+
t = Topic.new
|
697
|
+
t.title = "hello there!"
|
698
|
+
t.written_on = Time.now
|
699
|
+
assert t.attribute_present?("title")
|
700
|
+
assert t.attribute_present?("written_on")
|
701
|
+
assert !t.attribute_present?("content")
|
702
|
+
end
|
703
|
+
|
704
|
+
def test_attribute_keys_on_new_instance
|
705
|
+
t = Topic.new
|
706
|
+
assert_equal nil, t.title, "The topics table has a title column, so it should be nil"
|
707
|
+
assert_raise(NoMethodError) { t.title2 }
|
708
|
+
end
|
709
|
+
|
710
|
+
def test_class_name
|
711
|
+
assert_equal "Firm", ActiveRecord::Base.class_name("firms")
|
712
|
+
assert_equal "Category", ActiveRecord::Base.class_name("categories")
|
713
|
+
assert_equal "AccountHolder", ActiveRecord::Base.class_name("account_holder")
|
714
|
+
|
715
|
+
ActiveRecord::Base.pluralize_table_names = false
|
716
|
+
assert_equal "Firms", ActiveRecord::Base.class_name( "firms" )
|
717
|
+
ActiveRecord::Base.pluralize_table_names = true
|
718
|
+
|
719
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
720
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms" )
|
721
|
+
ActiveRecord::Base.table_name_suffix = "_tests"
|
722
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms_tests" )
|
723
|
+
ActiveRecord::Base.table_name_prefix = ""
|
724
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms_tests" )
|
725
|
+
ActiveRecord::Base.table_name_suffix = ""
|
726
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms" )
|
727
|
+
end
|
728
|
+
|
729
|
+
def test_null_fields
|
730
|
+
assert_nil Topic.find(1).parent_id
|
731
|
+
assert_nil Topic.create("title" => "Hey you").parent_id
|
732
|
+
end
|
733
|
+
|
734
|
+
def test_default_values
|
735
|
+
topic = Topic.new
|
736
|
+
assert topic.approved?
|
737
|
+
assert_nil topic.written_on
|
738
|
+
assert_nil topic.bonus_time
|
739
|
+
assert_nil topic.last_read
|
740
|
+
|
741
|
+
topic.save
|
742
|
+
|
743
|
+
topic = Topic.find(topic.id)
|
744
|
+
assert topic.approved?
|
745
|
+
assert_nil topic.last_read
|
746
|
+
|
747
|
+
# Oracle has some funky default handling, so it requires a bit of
|
748
|
+
# extra testing. See ticket #2788.
|
749
|
+
if current_adapter?(:OracleAdapter)
|
750
|
+
test = TestOracleDefault.new
|
751
|
+
assert_equal "X", test.test_char
|
752
|
+
assert_equal "hello", test.test_string
|
753
|
+
assert_equal 3, test.test_int
|
754
|
+
end
|
755
|
+
end
|
756
|
+
|
757
|
+
# Oracle, SQLServer, and Sybase do not have a TIME datatype.
|
758
|
+
unless current_adapter?(:SQLServerAdapter, :OracleAdapter, :SybaseAdapter)
|
759
|
+
def test_utc_as_time_zone
|
760
|
+
Topic.default_timezone = :utc
|
761
|
+
attributes = { "bonus_time" => "5:42:00AM" }
|
762
|
+
topic = Topic.find(1)
|
763
|
+
topic.attributes = attributes
|
764
|
+
assert_equal Time.utc(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
765
|
+
Topic.default_timezone = :local
|
766
|
+
end
|
767
|
+
|
768
|
+
def test_utc_as_time_zone_and_new
|
769
|
+
Topic.default_timezone = :utc
|
770
|
+
attributes = { "bonus_time(1i)"=>"2000",
|
771
|
+
"bonus_time(2i)"=>"1",
|
772
|
+
"bonus_time(3i)"=>"1",
|
773
|
+
"bonus_time(4i)"=>"10",
|
774
|
+
"bonus_time(5i)"=>"35",
|
775
|
+
"bonus_time(6i)"=>"50" }
|
776
|
+
topic = Topic.new(attributes)
|
777
|
+
assert_equal Time.utc(2000, 1, 1, 10, 35, 50), topic.bonus_time
|
778
|
+
Topic.default_timezone = :local
|
779
|
+
end
|
780
|
+
end
|
781
|
+
|
782
|
+
def test_default_values_on_empty_strings
|
783
|
+
topic = Topic.new
|
784
|
+
topic.approved = nil
|
785
|
+
topic.last_read = nil
|
786
|
+
|
787
|
+
topic.save
|
788
|
+
|
789
|
+
topic = Topic.find(topic.id)
|
790
|
+
assert_nil topic.last_read
|
791
|
+
|
792
|
+
# Sybase adapter does not allow nulls in boolean columns
|
793
|
+
if current_adapter?(:SybaseAdapter)
|
794
|
+
assert topic.approved == false
|
795
|
+
else
|
796
|
+
assert_nil topic.approved
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
def test_equality
|
801
|
+
assert_equal Topic.find(1), Topic.find(2).topic
|
802
|
+
end
|
803
|
+
|
804
|
+
def test_equality_of_new_records
|
805
|
+
assert_not_equal Topic.new, Topic.new
|
806
|
+
end
|
807
|
+
|
808
|
+
def test_hashing
|
809
|
+
assert_equal [ Topic.find(1) ], [ Topic.find(2).topic ] & [ Topic.find(1) ]
|
810
|
+
end
|
811
|
+
|
812
|
+
def test_destroy_new_record
|
813
|
+
client = Client.new
|
814
|
+
client.destroy
|
815
|
+
assert client.frozen?
|
816
|
+
end
|
817
|
+
|
818
|
+
def test_destroy_record_with_associations
|
819
|
+
client = Client.find(3)
|
820
|
+
client.destroy
|
821
|
+
assert client.frozen?
|
822
|
+
assert_kind_of Firm, client.firm
|
823
|
+
assert_raises(ActiveSupport::FrozenObjectError) { client.name = "something else" }
|
824
|
+
end
|
825
|
+
|
826
|
+
def test_update_attribute
|
827
|
+
assert !Topic.find(1).approved?
|
828
|
+
Topic.find(1).update_attribute("approved", true)
|
829
|
+
assert Topic.find(1).approved?
|
830
|
+
|
831
|
+
Topic.find(1).update_attribute(:approved, false)
|
832
|
+
assert !Topic.find(1).approved?
|
833
|
+
end
|
834
|
+
|
835
|
+
def test_update_attributes
|
836
|
+
topic = Topic.find(1)
|
837
|
+
assert !topic.approved?
|
838
|
+
assert_equal "The First Topic", topic.title
|
839
|
+
|
840
|
+
topic.update_attributes("approved" => true, "title" => "The First Topic Updated")
|
841
|
+
topic.reload
|
842
|
+
assert topic.approved?
|
843
|
+
assert_equal "The First Topic Updated", topic.title
|
844
|
+
|
845
|
+
topic.update_attributes(:approved => false, :title => "The First Topic")
|
846
|
+
topic.reload
|
847
|
+
assert !topic.approved?
|
848
|
+
assert_equal "The First Topic", topic.title
|
849
|
+
end
|
850
|
+
|
851
|
+
def test_update_attributes!
|
852
|
+
reply = Reply.find(2)
|
853
|
+
assert_equal "The Second Topic of the day", reply.title
|
854
|
+
assert_equal "Have a nice day", reply.content
|
855
|
+
|
856
|
+
reply.update_attributes!("title" => "The Second Topic of the day updated", "content" => "Have a nice evening")
|
857
|
+
reply.reload
|
858
|
+
assert_equal "The Second Topic of the day updated", reply.title
|
859
|
+
assert_equal "Have a nice evening", reply.content
|
860
|
+
|
861
|
+
reply.update_attributes!(:title => "The Second Topic of the day", :content => "Have a nice day")
|
862
|
+
reply.reload
|
863
|
+
assert_equal "The Second Topic of the day", reply.title
|
864
|
+
assert_equal "Have a nice day", reply.content
|
865
|
+
|
866
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.update_attributes!(:title => nil, :content => "Have a nice evening") }
|
867
|
+
end
|
868
|
+
|
869
|
+
def test_mass_assignment_should_raise_exception_if_accessible_and_protected_attribute_writers_are_both_used
|
870
|
+
topic = TopicWithProtectedContentAndAccessibleAuthorName.new
|
871
|
+
assert_raises(RuntimeError) { topic.attributes = { "author_name" => "me" } }
|
872
|
+
assert_raises(RuntimeError) { topic.attributes = { "content" => "stuff" } }
|
873
|
+
end
|
874
|
+
|
875
|
+
def test_mass_assignment_protection
|
876
|
+
firm = Firm.new
|
877
|
+
firm.attributes = { "name" => "Next Angle", "rating" => 5 }
|
878
|
+
assert_equal 1, firm.rating
|
879
|
+
end
|
880
|
+
|
881
|
+
def test_mass_assignment_protection_against_class_attribute_writers
|
882
|
+
[:logger, :configurations, :primary_key_prefix_type, :table_name_prefix, :table_name_suffix, :pluralize_table_names, :colorize_logging,
|
883
|
+
:default_timezone, :allow_concurrency, :schema_format, :verification_timeout, :lock_optimistically, :record_timestamps].each do |method|
|
884
|
+
assert Task.respond_to?(method)
|
885
|
+
assert Task.respond_to?("#{method}=")
|
886
|
+
assert Task.new.respond_to?(method)
|
887
|
+
assert !Task.new.respond_to?("#{method}=")
|
888
|
+
end
|
889
|
+
end
|
890
|
+
|
891
|
+
def test_customized_primary_key_remains_protected
|
892
|
+
subscriber = Subscriber.new(:nick => 'webster123', :name => 'nice try')
|
893
|
+
assert_nil subscriber.id
|
894
|
+
|
895
|
+
keyboard = Keyboard.new(:key_number => 9, :name => 'nice try')
|
896
|
+
assert_nil keyboard.id
|
897
|
+
end
|
898
|
+
|
899
|
+
def test_customized_primary_key_remains_protected_when_referred_to_as_id
|
900
|
+
subscriber = Subscriber.new(:id => 'webster123', :name => 'nice try')
|
901
|
+
assert_nil subscriber.id
|
902
|
+
|
903
|
+
keyboard = Keyboard.new(:id => 9, :name => 'nice try')
|
904
|
+
assert_nil keyboard.id
|
905
|
+
end
|
906
|
+
|
907
|
+
def test_mass_assignment_protection_on_defaults
|
908
|
+
firm = Firm.new
|
909
|
+
firm.attributes = { "id" => 5, "type" => "Client" }
|
910
|
+
assert_nil firm.id
|
911
|
+
assert_equal "Firm", firm[:type]
|
912
|
+
end
|
913
|
+
|
914
|
+
def test_mass_assignment_accessible
|
915
|
+
reply = Reply.new("title" => "hello", "content" => "world", "approved" => true)
|
916
|
+
reply.save
|
917
|
+
|
918
|
+
assert reply.approved?
|
919
|
+
|
920
|
+
reply.approved = false
|
921
|
+
reply.save
|
922
|
+
|
923
|
+
assert !reply.approved?
|
924
|
+
end
|
925
|
+
|
926
|
+
def test_mass_assignment_protection_inheritance
|
927
|
+
assert_nil LoosePerson.accessible_attributes
|
928
|
+
assert_equal Set.new([ 'credit_rating', 'administrator' ]), LoosePerson.protected_attributes
|
929
|
+
|
930
|
+
assert_nil LooseDescendant.accessible_attributes
|
931
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number' ]), LooseDescendant.protected_attributes
|
932
|
+
|
933
|
+
assert_nil LooseDescendantSecond.accessible_attributes
|
934
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number', 'name' ]), LooseDescendantSecond.protected_attributes, 'Running attr_protected twice in one class should merge the protections'
|
935
|
+
|
936
|
+
assert_nil TightPerson.protected_attributes
|
937
|
+
assert_equal Set.new([ 'name', 'address' ]), TightPerson.accessible_attributes
|
938
|
+
|
939
|
+
assert_nil TightDescendant.protected_attributes
|
940
|
+
assert_equal Set.new([ 'name', 'address', 'phone_number' ]), TightDescendant.accessible_attributes
|
941
|
+
end
|
942
|
+
|
943
|
+
def test_readonly_attributes
|
944
|
+
assert_equal Set.new([ 'title' , 'comments_count' ]), ReadonlyTitlePost.readonly_attributes
|
945
|
+
|
946
|
+
post = ReadonlyTitlePost.create(:title => "cannot change this", :body => "changeable")
|
947
|
+
post.reload
|
948
|
+
assert_equal "cannot change this", post.title
|
949
|
+
|
950
|
+
post.update_attributes(:title => "try to change", :body => "changed")
|
951
|
+
post.reload
|
952
|
+
assert_equal "cannot change this", post.title
|
953
|
+
assert_equal "changed", post.body
|
954
|
+
end
|
955
|
+
|
956
|
+
def test_multiparameter_attributes_on_date
|
957
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "24" }
|
958
|
+
topic = Topic.find(1)
|
959
|
+
topic.attributes = attributes
|
960
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
961
|
+
# treats dates/times the same
|
962
|
+
assert_date_from_db Date.new(2004, 6, 24), topic.last_read.to_date
|
963
|
+
end
|
964
|
+
|
965
|
+
def test_multiparameter_attributes_on_date_with_empty_date
|
966
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "" }
|
967
|
+
topic = Topic.find(1)
|
968
|
+
topic.attributes = attributes
|
969
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
970
|
+
# treats dates/times the same
|
971
|
+
assert_date_from_db Date.new(2004, 6, 1), topic.last_read.to_date
|
972
|
+
end
|
973
|
+
|
974
|
+
def test_multiparameter_attributes_on_date_with_all_empty
|
975
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "", "last_read(3i)" => "" }
|
976
|
+
topic = Topic.find(1)
|
977
|
+
topic.attributes = attributes
|
978
|
+
assert_nil topic.last_read
|
979
|
+
end
|
980
|
+
|
981
|
+
def test_multiparameter_attributes_on_time
|
982
|
+
attributes = {
|
983
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
984
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
985
|
+
}
|
986
|
+
topic = Topic.find(1)
|
987
|
+
topic.attributes = attributes
|
988
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
989
|
+
end
|
990
|
+
|
991
|
+
def test_multiparameter_attributes_on_time_with_old_date
|
992
|
+
attributes = {
|
993
|
+
"written_on(1i)" => "1850", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
994
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
995
|
+
}
|
996
|
+
topic = Topic.find(1)
|
997
|
+
topic.attributes = attributes
|
998
|
+
# testing against to_s(:db) representation because either a Time or a DateTime might be returned, depending on platform
|
999
|
+
assert_equal "1850-06-24 16:24:00", topic.written_on.to_s(:db)
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
def test_multiparameter_attributes_on_time_with_utc
|
1003
|
+
ActiveRecord::Base.default_timezone = :utc
|
1004
|
+
attributes = {
|
1005
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1006
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1007
|
+
}
|
1008
|
+
topic = Topic.find(1)
|
1009
|
+
topic.attributes = attributes
|
1010
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on
|
1011
|
+
ensure
|
1012
|
+
ActiveRecord::Base.default_timezone = :local
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
def test_multiparameter_attributes_on_time_with_time_zone_aware_attributes
|
1016
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1017
|
+
ActiveRecord::Base.default_timezone = :utc
|
1018
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1019
|
+
attributes = {
|
1020
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1021
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1022
|
+
}
|
1023
|
+
topic = Topic.find(1)
|
1024
|
+
topic.attributes = attributes
|
1025
|
+
assert_equal Time.utc(2004, 6, 24, 23, 24, 0), topic.written_on
|
1026
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on.time
|
1027
|
+
assert_equal Time.zone, topic.written_on.time_zone
|
1028
|
+
ensure
|
1029
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1030
|
+
ActiveRecord::Base.default_timezone = :local
|
1031
|
+
Time.zone = nil
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
def test_multiparameter_attributes_on_time_with_time_zone_aware_attributes_false
|
1035
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1036
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1037
|
+
attributes = {
|
1038
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1039
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1040
|
+
}
|
1041
|
+
topic = Topic.find(1)
|
1042
|
+
topic.attributes = attributes
|
1043
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
1044
|
+
assert_equal false, topic.written_on.respond_to?(:time_zone)
|
1045
|
+
ensure
|
1046
|
+
Time.zone = nil
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
def test_multiparameter_attributes_on_time_with_skip_time_zone_conversion_for_attributes
|
1050
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1051
|
+
ActiveRecord::Base.default_timezone = :utc
|
1052
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1053
|
+
Topic.skip_time_zone_conversion_for_attributes = [:written_on]
|
1054
|
+
attributes = {
|
1055
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1056
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1057
|
+
}
|
1058
|
+
topic = Topic.find(1)
|
1059
|
+
topic.attributes = attributes
|
1060
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on
|
1061
|
+
assert_equal false, topic.written_on.respond_to?(:time_zone)
|
1062
|
+
ensure
|
1063
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1064
|
+
ActiveRecord::Base.default_timezone = :local
|
1065
|
+
Time.zone = nil
|
1066
|
+
Topic.skip_time_zone_conversion_for_attributes = []
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
def test_multiparameter_attributes_on_time_only_column_with_time_zone_aware_attributes_does_not_do_time_zone_conversion
|
1070
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1071
|
+
ActiveRecord::Base.default_timezone = :utc
|
1072
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1073
|
+
attributes = {
|
1074
|
+
"bonus_time(1i)" => "2000", "bonus_time(2i)" => "1", "bonus_time(3i)" => "1",
|
1075
|
+
"bonus_time(4i)" => "16", "bonus_time(5i)" => "24"
|
1076
|
+
}
|
1077
|
+
topic = Topic.find(1)
|
1078
|
+
topic.attributes = attributes
|
1079
|
+
assert_equal Time.utc(2000, 1, 1, 16, 24, 0), topic.bonus_time
|
1080
|
+
assert topic.bonus_time.utc?
|
1081
|
+
ensure
|
1082
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1083
|
+
ActiveRecord::Base.default_timezone = :local
|
1084
|
+
Time.zone = nil
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
def test_multiparameter_attributes_on_time_with_empty_seconds
|
1088
|
+
attributes = {
|
1089
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1090
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => ""
|
1091
|
+
}
|
1092
|
+
topic = Topic.find(1)
|
1093
|
+
topic.attributes = attributes
|
1094
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
def test_multiparameter_mass_assignment_protector
|
1098
|
+
task = Task.new
|
1099
|
+
time = Time.mktime(2000, 1, 1, 1)
|
1100
|
+
task.starting = time
|
1101
|
+
attributes = { "starting(1i)" => "2004", "starting(2i)" => "6", "starting(3i)" => "24" }
|
1102
|
+
task.attributes = attributes
|
1103
|
+
assert_equal time, task.starting
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
def test_multiparameter_assignment_of_aggregation
|
1107
|
+
customer = Customer.new
|
1108
|
+
address = Address.new("The Street", "The City", "The Country")
|
1109
|
+
attributes = { "address(1)" => address.street, "address(2)" => address.city, "address(3)" => address.country }
|
1110
|
+
customer.attributes = attributes
|
1111
|
+
assert_equal address, customer.address
|
1112
|
+
end
|
1113
|
+
|
1114
|
+
def test_attributes_on_dummy_time
|
1115
|
+
# Oracle, SQL Server, and Sybase do not have a TIME datatype.
|
1116
|
+
return true if current_adapter?(:SQLServerAdapter, :OracleAdapter, :SybaseAdapter)
|
1117
|
+
|
1118
|
+
attributes = {
|
1119
|
+
"bonus_time" => "5:42:00AM"
|
1120
|
+
}
|
1121
|
+
topic = Topic.find(1)
|
1122
|
+
topic.attributes = attributes
|
1123
|
+
assert_equal Time.local(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
def test_boolean
|
1127
|
+
b_false = Booleantest.create({ "value" => false })
|
1128
|
+
false_id = b_false.id
|
1129
|
+
b_true = Booleantest.create({ "value" => true })
|
1130
|
+
true_id = b_true.id
|
1131
|
+
|
1132
|
+
b_false = Booleantest.find(false_id)
|
1133
|
+
assert !b_false.value?
|
1134
|
+
b_true = Booleantest.find(true_id)
|
1135
|
+
assert b_true.value?
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
def test_boolean_cast_from_string
|
1139
|
+
b_false = Booleantest.create({ "value" => "0" })
|
1140
|
+
false_id = b_false.id
|
1141
|
+
b_true = Booleantest.create({ "value" => "1" })
|
1142
|
+
true_id = b_true.id
|
1143
|
+
|
1144
|
+
b_false = Booleantest.find(false_id)
|
1145
|
+
assert !b_false.value?
|
1146
|
+
b_true = Booleantest.find(true_id)
|
1147
|
+
assert b_true.value?
|
1148
|
+
end
|
1149
|
+
|
1150
|
+
def test_clone
|
1151
|
+
topic = Topic.find(1)
|
1152
|
+
cloned_topic = nil
|
1153
|
+
assert_nothing_raised { cloned_topic = topic.clone }
|
1154
|
+
assert_equal topic.title, cloned_topic.title
|
1155
|
+
assert cloned_topic.new_record?
|
1156
|
+
|
1157
|
+
# test if the attributes have been cloned
|
1158
|
+
topic.title = "a"
|
1159
|
+
cloned_topic.title = "b"
|
1160
|
+
assert_equal "a", topic.title
|
1161
|
+
assert_equal "b", cloned_topic.title
|
1162
|
+
|
1163
|
+
# test if the attribute values have been cloned
|
1164
|
+
topic.title = {"a" => "b"}
|
1165
|
+
cloned_topic = topic.clone
|
1166
|
+
cloned_topic.title["a"] = "c"
|
1167
|
+
assert_equal "b", topic.title["a"]
|
1168
|
+
|
1169
|
+
#test if attributes set as part of after_initialize are cloned correctly
|
1170
|
+
assert_equal topic.author_email_address, cloned_topic.author_email_address
|
1171
|
+
|
1172
|
+
# test if saved clone object differs from original
|
1173
|
+
cloned_topic.save
|
1174
|
+
assert !cloned_topic.new_record?
|
1175
|
+
assert cloned_topic.id != topic.id
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
def test_clone_with_aggregate_of_same_name_as_attribute
|
1179
|
+
dev = DeveloperWithAggregate.find(1)
|
1180
|
+
assert_kind_of DeveloperSalary, dev.salary
|
1181
|
+
|
1182
|
+
clone = nil
|
1183
|
+
assert_nothing_raised { clone = dev.clone }
|
1184
|
+
assert_kind_of DeveloperSalary, clone.salary
|
1185
|
+
assert_equal dev.salary.amount, clone.salary.amount
|
1186
|
+
assert clone.new_record?
|
1187
|
+
|
1188
|
+
# test if the attributes have been cloned
|
1189
|
+
original_amount = clone.salary.amount
|
1190
|
+
dev.salary.amount = 1
|
1191
|
+
assert_equal original_amount, clone.salary.amount
|
1192
|
+
|
1193
|
+
assert clone.save
|
1194
|
+
assert !clone.new_record?
|
1195
|
+
assert clone.id != dev.id
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
def test_clone_preserves_subtype
|
1199
|
+
clone = nil
|
1200
|
+
assert_nothing_raised { clone = Company.find(3).clone }
|
1201
|
+
assert_kind_of Client, clone
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
def test_bignum
|
1205
|
+
company = Company.find(1)
|
1206
|
+
company.rating = 2147483647
|
1207
|
+
company.save
|
1208
|
+
company = Company.find(1)
|
1209
|
+
assert_equal 2147483647, company.rating
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# TODO: extend defaults tests to other databases!
|
1213
|
+
if current_adapter?(:PostgreSQLAdapter)
|
1214
|
+
def test_default
|
1215
|
+
default = Default.new
|
1216
|
+
|
1217
|
+
# fixed dates / times
|
1218
|
+
assert_equal Date.new(2004, 1, 1), default.fixed_date
|
1219
|
+
assert_equal Time.local(2004, 1,1,0,0,0,0), default.fixed_time
|
1220
|
+
|
1221
|
+
# char types
|
1222
|
+
assert_equal 'Y', default.char1
|
1223
|
+
assert_equal 'a varchar field', default.char2
|
1224
|
+
assert_equal 'a text field', default.char3
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
class Geometric < ActiveRecord::Base; end
|
1228
|
+
def test_geometric_content
|
1229
|
+
|
1230
|
+
# accepted format notes:
|
1231
|
+
# ()'s aren't required
|
1232
|
+
# values can be a mix of float or integer
|
1233
|
+
|
1234
|
+
g = Geometric.new(
|
1235
|
+
:a_point => '(5.0, 6.1)',
|
1236
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1237
|
+
:a_line_segment => '(2.0, 3), (5.5, 7.0)',
|
1238
|
+
:a_box => '2.0, 3, 5.5, 7.0',
|
1239
|
+
:a_path => '[(2.0, 3), (5.5, 7.0), (8.5, 11.0)]', # [ ] is an open path
|
1240
|
+
:a_polygon => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))',
|
1241
|
+
:a_circle => '<(5.3, 10.4), 2>'
|
1242
|
+
)
|
1243
|
+
|
1244
|
+
assert g.save
|
1245
|
+
|
1246
|
+
# Reload and check that we have all the geometric attributes.
|
1247
|
+
h = Geometric.find(g.id)
|
1248
|
+
|
1249
|
+
assert_equal '(5,6.1)', h.a_point
|
1250
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1251
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1252
|
+
assert_equal '[(2,3),(5.5,7),(8.5,11)]', h.a_path
|
1253
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1254
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1255
|
+
|
1256
|
+
# use a geometric function to test for an open path
|
1257
|
+
objs = Geometric.find_by_sql ["select isopen(a_path) from geometrics where id = ?", g.id]
|
1258
|
+
assert_equal objs[0].isopen, 't'
|
1259
|
+
|
1260
|
+
# test alternate formats when defining the geometric types
|
1261
|
+
|
1262
|
+
g = Geometric.new(
|
1263
|
+
:a_point => '5.0, 6.1',
|
1264
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1265
|
+
:a_line_segment => '((2.0, 3), (5.5, 7.0))',
|
1266
|
+
:a_box => '(2.0, 3), (5.5, 7.0)',
|
1267
|
+
:a_path => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))', # ( ) is a closed path
|
1268
|
+
:a_polygon => '2.0, 3, 5.5, 7.0, 8.5, 11.0',
|
1269
|
+
:a_circle => '((5.3, 10.4), 2)'
|
1270
|
+
)
|
1271
|
+
|
1272
|
+
assert g.save
|
1273
|
+
|
1274
|
+
# Reload and check that we have all the geometric attributes.
|
1275
|
+
h = Geometric.find(g.id)
|
1276
|
+
|
1277
|
+
assert_equal '(5,6.1)', h.a_point
|
1278
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1279
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1280
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_path
|
1281
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1282
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1283
|
+
|
1284
|
+
# use a geometric function to test for an closed path
|
1285
|
+
objs = Geometric.find_by_sql ["select isclosed(a_path) from geometrics where id = ?", g.id]
|
1286
|
+
assert_equal objs[0].isclosed, 't'
|
1287
|
+
end
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
class NumericData < ActiveRecord::Base
|
1291
|
+
self.table_name = 'numeric_data'
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
def test_numeric_fields
|
1295
|
+
m = NumericData.new(
|
1296
|
+
:bank_balance => 1586.43,
|
1297
|
+
:big_bank_balance => BigDecimal("1000234000567.95"),
|
1298
|
+
:world_population => 6000000000,
|
1299
|
+
:my_house_population => 3
|
1300
|
+
)
|
1301
|
+
assert m.save
|
1302
|
+
|
1303
|
+
m1 = NumericData.find(m.id)
|
1304
|
+
assert_not_nil m1
|
1305
|
+
|
1306
|
+
# As with migration_test.rb, we should make world_population >= 2**62
|
1307
|
+
# to cover 64-bit platforms and test it is a Bignum, but the main thing
|
1308
|
+
# is that it's an Integer.
|
1309
|
+
assert_kind_of Integer, m1.world_population
|
1310
|
+
assert_equal 6000000000, m1.world_population
|
1311
|
+
|
1312
|
+
assert_kind_of Fixnum, m1.my_house_population
|
1313
|
+
assert_equal 3, m1.my_house_population
|
1314
|
+
|
1315
|
+
assert_kind_of BigDecimal, m1.bank_balance
|
1316
|
+
assert_equal BigDecimal("1586.43"), m1.bank_balance
|
1317
|
+
|
1318
|
+
assert_kind_of BigDecimal, m1.big_bank_balance
|
1319
|
+
assert_equal BigDecimal("1000234000567.95"), m1.big_bank_balance
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
def test_auto_id
|
1323
|
+
auto = AutoId.new
|
1324
|
+
auto.save
|
1325
|
+
assert (auto.id > 0)
|
1326
|
+
end
|
1327
|
+
|
1328
|
+
def quote_column_name(name)
|
1329
|
+
"<#{name}>"
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
def test_quote_keys
|
1333
|
+
ar = AutoId.new
|
1334
|
+
source = {"foo" => "bar", "baz" => "quux"}
|
1335
|
+
actual = ar.send(:quote_columns, self, source)
|
1336
|
+
inverted = actual.invert
|
1337
|
+
assert_equal("<foo>", inverted["bar"])
|
1338
|
+
assert_equal("<baz>", inverted["quux"])
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
def test_sql_injection_via_find
|
1342
|
+
assert_raises(ActiveRecord::RecordNotFound, ActiveRecord::StatementInvalid) do
|
1343
|
+
Topic.find("123456 OR id > 0")
|
1344
|
+
end
|
1345
|
+
end
|
1346
|
+
|
1347
|
+
def test_column_name_properly_quoted
|
1348
|
+
col_record = ColumnName.new
|
1349
|
+
col_record.references = 40
|
1350
|
+
assert col_record.save
|
1351
|
+
col_record.references = 41
|
1352
|
+
assert col_record.save
|
1353
|
+
assert_not_nil c2 = ColumnName.find(col_record.id)
|
1354
|
+
assert_equal(41, c2.references)
|
1355
|
+
end
|
1356
|
+
|
1357
|
+
def test_quoting_arrays
|
1358
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", topics(:first).replies.collect(&:id) ])
|
1359
|
+
assert_equal topics(:first).replies.size, replies.size
|
1360
|
+
|
1361
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", [] ])
|
1362
|
+
assert_equal 0, replies.size
|
1363
|
+
end
|
1364
|
+
|
1365
|
+
MyObject = Struct.new :attribute1, :attribute2
|
1366
|
+
|
1367
|
+
def test_serialized_attribute
|
1368
|
+
myobj = MyObject.new('value1', 'value2')
|
1369
|
+
topic = Topic.create("content" => myobj)
|
1370
|
+
Topic.serialize("content", MyObject)
|
1371
|
+
assert_equal(myobj, topic.content)
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
def test_serialized_time_attribute
|
1375
|
+
myobj = Time.local(2008,1,1,1,0)
|
1376
|
+
topic = Topic.create("content" => myobj).reload
|
1377
|
+
assert_equal(myobj, topic.content)
|
1378
|
+
end
|
1379
|
+
|
1380
|
+
def test_nil_serialized_attribute_with_class_constraint
|
1381
|
+
myobj = MyObject.new('value1', 'value2')
|
1382
|
+
topic = Topic.new
|
1383
|
+
assert_nil topic.content
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
def test_should_raise_exception_on_serialized_attribute_with_type_mismatch
|
1387
|
+
myobj = MyObject.new('value1', 'value2')
|
1388
|
+
topic = Topic.new(:content => myobj)
|
1389
|
+
assert topic.save
|
1390
|
+
Topic.serialize(:content, Hash)
|
1391
|
+
assert_raise(ActiveRecord::SerializationTypeMismatch) { Topic.find(topic.id).content }
|
1392
|
+
ensure
|
1393
|
+
Topic.serialize(:content)
|
1394
|
+
end
|
1395
|
+
|
1396
|
+
def test_serialized_attribute_with_class_constraint
|
1397
|
+
settings = { "color" => "blue" }
|
1398
|
+
Topic.serialize(:content, Hash)
|
1399
|
+
topic = Topic.new(:content => settings)
|
1400
|
+
assert topic.save
|
1401
|
+
assert_equal(settings, Topic.find(topic.id).content)
|
1402
|
+
ensure
|
1403
|
+
Topic.serialize(:content)
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
def test_quote
|
1407
|
+
author_name = "\\ \001 ' \n \\n \""
|
1408
|
+
topic = Topic.create('author_name' => author_name)
|
1409
|
+
assert_equal author_name, Topic.find(topic.id).author_name
|
1410
|
+
end
|
1411
|
+
|
1412
|
+
if RUBY_VERSION < '1.9'
|
1413
|
+
def test_quote_chars
|
1414
|
+
str = 'The Narrator'
|
1415
|
+
topic = Topic.create(:author_name => str)
|
1416
|
+
assert_equal str, topic.author_name
|
1417
|
+
|
1418
|
+
assert_kind_of ActiveSupport::Multibyte::Chars, str.chars
|
1419
|
+
topic = Topic.find_by_author_name(str.chars)
|
1420
|
+
|
1421
|
+
assert_kind_of Topic, topic
|
1422
|
+
assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
|
1423
|
+
end
|
1424
|
+
end
|
1425
|
+
|
1426
|
+
def test_class_level_destroy
|
1427
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1428
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1429
|
+
|
1430
|
+
Topic.destroy(1)
|
1431
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1432
|
+
assert_raise(ActiveRecord::RecordNotFound) { Reply.find(should_be_destroyed_reply.id) }
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
def test_class_level_delete
|
1436
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1437
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1438
|
+
|
1439
|
+
Topic.delete(1)
|
1440
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1441
|
+
assert_nothing_raised { Reply.find(should_be_destroyed_reply.id) }
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
def test_increment_attribute
|
1445
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1446
|
+
accounts(:signals37).increment! :credit_limit
|
1447
|
+
assert_equal 51, accounts(:signals37, :reload).credit_limit
|
1448
|
+
|
1449
|
+
accounts(:signals37).increment(:credit_limit).increment!(:credit_limit)
|
1450
|
+
assert_equal 53, accounts(:signals37, :reload).credit_limit
|
1451
|
+
end
|
1452
|
+
|
1453
|
+
def test_increment_nil_attribute
|
1454
|
+
assert_nil topics(:first).parent_id
|
1455
|
+
topics(:first).increment! :parent_id
|
1456
|
+
assert_equal 1, topics(:first).parent_id
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
def test_increment_attribute_by
|
1460
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1461
|
+
accounts(:signals37).increment! :credit_limit, 5
|
1462
|
+
assert_equal 55, accounts(:signals37, :reload).credit_limit
|
1463
|
+
|
1464
|
+
accounts(:signals37).increment(:credit_limit, 1).increment!(:credit_limit, 3)
|
1465
|
+
assert_equal 59, accounts(:signals37, :reload).credit_limit
|
1466
|
+
end
|
1467
|
+
|
1468
|
+
def test_decrement_attribute
|
1469
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1470
|
+
|
1471
|
+
accounts(:signals37).decrement!(:credit_limit)
|
1472
|
+
assert_equal 49, accounts(:signals37, :reload).credit_limit
|
1473
|
+
|
1474
|
+
accounts(:signals37).decrement(:credit_limit).decrement!(:credit_limit)
|
1475
|
+
assert_equal 47, accounts(:signals37, :reload).credit_limit
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
def test_decrement_attribute_by
|
1479
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1480
|
+
accounts(:signals37).decrement! :credit_limit, 5
|
1481
|
+
assert_equal 45, accounts(:signals37, :reload).credit_limit
|
1482
|
+
|
1483
|
+
accounts(:signals37).decrement(:credit_limit, 1).decrement!(:credit_limit, 3)
|
1484
|
+
assert_equal 41, accounts(:signals37, :reload).credit_limit
|
1485
|
+
end
|
1486
|
+
|
1487
|
+
def test_toggle_attribute
|
1488
|
+
assert !topics(:first).approved?
|
1489
|
+
topics(:first).toggle!(:approved)
|
1490
|
+
assert topics(:first).approved?
|
1491
|
+
topic = topics(:first)
|
1492
|
+
topic.toggle(:approved)
|
1493
|
+
assert !topic.approved?
|
1494
|
+
topic.reload
|
1495
|
+
assert topic.approved?
|
1496
|
+
end
|
1497
|
+
|
1498
|
+
def test_reload
|
1499
|
+
t1 = Topic.find(1)
|
1500
|
+
t2 = Topic.find(1)
|
1501
|
+
t1.title = "something else"
|
1502
|
+
t1.save
|
1503
|
+
t2.reload
|
1504
|
+
assert_equal t1.title, t2.title
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
def test_define_attr_method_with_value
|
1508
|
+
k = Class.new( ActiveRecord::Base )
|
1509
|
+
k.send(:define_attr_method, :table_name, "foo")
|
1510
|
+
assert_equal "foo", k.table_name
|
1511
|
+
end
|
1512
|
+
|
1513
|
+
def test_define_attr_method_with_block
|
1514
|
+
k = Class.new( ActiveRecord::Base )
|
1515
|
+
k.send(:define_attr_method, :primary_key) { "sys_" + original_primary_key }
|
1516
|
+
assert_equal "sys_id", k.primary_key
|
1517
|
+
end
|
1518
|
+
|
1519
|
+
def test_set_table_name_with_value
|
1520
|
+
k = Class.new( ActiveRecord::Base )
|
1521
|
+
k.table_name = "foo"
|
1522
|
+
assert_equal "foo", k.table_name
|
1523
|
+
k.set_table_name "bar"
|
1524
|
+
assert_equal "bar", k.table_name
|
1525
|
+
end
|
1526
|
+
|
1527
|
+
def test_set_table_name_with_block
|
1528
|
+
k = Class.new( ActiveRecord::Base )
|
1529
|
+
k.set_table_name { "ks" }
|
1530
|
+
assert_equal "ks", k.table_name
|
1531
|
+
end
|
1532
|
+
|
1533
|
+
def test_set_primary_key_with_value
|
1534
|
+
k = Class.new( ActiveRecord::Base )
|
1535
|
+
k.primary_key = "foo"
|
1536
|
+
assert_equal "foo", k.primary_key
|
1537
|
+
k.set_primary_key "bar"
|
1538
|
+
assert_equal "bar", k.primary_key
|
1539
|
+
end
|
1540
|
+
|
1541
|
+
def test_set_primary_key_with_block
|
1542
|
+
k = Class.new( ActiveRecord::Base )
|
1543
|
+
k.set_primary_key { "sys_" + original_primary_key }
|
1544
|
+
assert_equal "sys_id", k.primary_key
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
def test_set_inheritance_column_with_value
|
1548
|
+
k = Class.new( ActiveRecord::Base )
|
1549
|
+
k.inheritance_column = "foo"
|
1550
|
+
assert_equal "foo", k.inheritance_column
|
1551
|
+
k.set_inheritance_column "bar"
|
1552
|
+
assert_equal "bar", k.inheritance_column
|
1553
|
+
end
|
1554
|
+
|
1555
|
+
def test_set_inheritance_column_with_block
|
1556
|
+
k = Class.new( ActiveRecord::Base )
|
1557
|
+
k.set_inheritance_column { original_inheritance_column + "_id" }
|
1558
|
+
assert_equal "type_id", k.inheritance_column
|
1559
|
+
end
|
1560
|
+
|
1561
|
+
def test_count_with_join
|
1562
|
+
res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.#{QUOTED_TYPE} = 'Post'"
|
1563
|
+
|
1564
|
+
res2 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'", :joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1565
|
+
assert_equal res, res2
|
1566
|
+
|
1567
|
+
res3 = nil
|
1568
|
+
assert_nothing_raised do
|
1569
|
+
res3 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'",
|
1570
|
+
:joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1571
|
+
end
|
1572
|
+
assert_equal res, res3
|
1573
|
+
|
1574
|
+
res4 = Post.count_by_sql "SELECT COUNT(p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1575
|
+
res5 = nil
|
1576
|
+
assert_nothing_raised do
|
1577
|
+
res5 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1578
|
+
:joins => "p, comments co",
|
1579
|
+
:select => "p.id")
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
assert_equal res4, res5
|
1583
|
+
|
1584
|
+
unless current_adapter?(:SQLite2Adapter, :DeprecatedSQLiteAdapter)
|
1585
|
+
res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1586
|
+
res7 = nil
|
1587
|
+
assert_nothing_raised do
|
1588
|
+
res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1589
|
+
:joins => "p, comments co",
|
1590
|
+
:select => "p.id",
|
1591
|
+
:distinct => true)
|
1592
|
+
end
|
1593
|
+
assert_equal res6, res7
|
1594
|
+
end
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
def test_clear_association_cache_stored
|
1598
|
+
firm = Firm.find(1)
|
1599
|
+
assert_kind_of Firm, firm
|
1600
|
+
|
1601
|
+
firm.clear_association_cache
|
1602
|
+
assert_equal Firm.find(1).clients.collect{ |x| x.name }.sort, firm.clients.collect{ |x| x.name }.sort
|
1603
|
+
end
|
1604
|
+
|
1605
|
+
def test_clear_association_cache_new_record
|
1606
|
+
firm = Firm.new
|
1607
|
+
client_stored = Client.find(3)
|
1608
|
+
client_new = Client.new
|
1609
|
+
client_new.name = "The Joneses"
|
1610
|
+
clients = [ client_stored, client_new ]
|
1611
|
+
|
1612
|
+
firm.clients << clients
|
1613
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1614
|
+
|
1615
|
+
firm.clear_association_cache
|
1616
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
def test_interpolate_sql
|
1620
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo@bar') }
|
1621
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar) baz') }
|
1622
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar} baz') }
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
def test_scoped_find_conditions
|
1626
|
+
scoped_developers = Developer.with_scope(:find => { :conditions => 'salary > 90000' }) do
|
1627
|
+
Developer.find(:all, :conditions => 'id < 5')
|
1628
|
+
end
|
1629
|
+
assert !scoped_developers.include?(developers(:david)) # David's salary is less than 90,000
|
1630
|
+
assert_equal 3, scoped_developers.size
|
1631
|
+
end
|
1632
|
+
|
1633
|
+
def test_scoped_find_limit_offset
|
1634
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :offset => 2 }) do
|
1635
|
+
Developer.find(:all, :order => 'id')
|
1636
|
+
end
|
1637
|
+
assert !scoped_developers.include?(developers(:david))
|
1638
|
+
assert !scoped_developers.include?(developers(:jamis))
|
1639
|
+
assert_equal 3, scoped_developers.size
|
1640
|
+
|
1641
|
+
# Test without scoped find conditions to ensure we get the whole thing
|
1642
|
+
developers = Developer.find(:all, :order => 'id')
|
1643
|
+
assert_equal Developer.count, developers.size
|
1644
|
+
end
|
1645
|
+
|
1646
|
+
def test_scoped_find_order
|
1647
|
+
# Test order in scope
|
1648
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1, :order => 'salary DESC' }) do
|
1649
|
+
Developer.find(:all)
|
1650
|
+
end
|
1651
|
+
assert_equal 'Jamis', scoped_developers.first.name
|
1652
|
+
assert scoped_developers.include?(developers(:jamis))
|
1653
|
+
# Test scope without order and order in find
|
1654
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1 }) do
|
1655
|
+
Developer.find(:all, :order => 'salary DESC')
|
1656
|
+
end
|
1657
|
+
# Test scope order + find order, find has priority
|
1658
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :order => 'id DESC' }) do
|
1659
|
+
Developer.find(:all, :order => 'salary ASC')
|
1660
|
+
end
|
1661
|
+
assert scoped_developers.include?(developers(:poor_jamis))
|
1662
|
+
assert scoped_developers.include?(developers(:david))
|
1663
|
+
assert scoped_developers.include?(developers(:dev_10))
|
1664
|
+
# Test without scoped find conditions to ensure we get the right thing
|
1665
|
+
developers = Developer.find(:all, :order => 'id', :limit => 1)
|
1666
|
+
assert scoped_developers.include?(developers(:david))
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
def test_scoped_find_limit_offset_including_has_many_association
|
1670
|
+
topics = Topic.with_scope(:find => {:limit => 1, :offset => 1, :include => :replies}) do
|
1671
|
+
Topic.find(:all, :order => "topics.id")
|
1672
|
+
end
|
1673
|
+
assert_equal 1, topics.size
|
1674
|
+
assert_equal 2, topics.first.id
|
1675
|
+
end
|
1676
|
+
|
1677
|
+
def test_scoped_find_order_including_has_many_association
|
1678
|
+
developers = Developer.with_scope(:find => { :order => 'developers.salary DESC', :include => :projects }) do
|
1679
|
+
Developer.find(:all)
|
1680
|
+
end
|
1681
|
+
assert developers.size >= 2
|
1682
|
+
for i in 1...developers.size
|
1683
|
+
assert developers[i-1].salary >= developers[i].salary
|
1684
|
+
end
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
def test_find_last
|
1688
|
+
last = Developer.find :last
|
1689
|
+
assert_equal last, Developer.find(:first, :order => 'id desc')
|
1690
|
+
end
|
1691
|
+
|
1692
|
+
def test_last
|
1693
|
+
assert_equal Developer.find(:first, :order => 'id desc'), Developer.last
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
def test_all_with_conditions
|
1697
|
+
assert_equal Developer.find(:all, :order => 'id desc'), Developer.all(:order => 'id desc')
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
def test_find_ordered_last
|
1701
|
+
last = Developer.find :last, :order => 'developers.salary ASC'
|
1702
|
+
assert_equal last, Developer.find(:all, :order => 'developers.salary ASC').last
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
def test_find_reverse_ordered_last
|
1706
|
+
last = Developer.find :last, :order => 'developers.salary DESC'
|
1707
|
+
assert_equal last, Developer.find(:all, :order => 'developers.salary DESC').last
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
def test_find_multiple_ordered_last
|
1711
|
+
last = Developer.find :last, :order => 'developers.name, developers.salary DESC'
|
1712
|
+
assert_equal last, Developer.find(:all, :order => 'developers.name, developers.salary DESC').last
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
def test_find_scoped_ordered_last
|
1716
|
+
last_developer = Developer.with_scope(:find => { :order => 'developers.salary ASC' }) do
|
1717
|
+
Developer.find(:last)
|
1718
|
+
end
|
1719
|
+
assert_equal last_developer, Developer.find(:all, :order => 'developers.salary ASC').last
|
1720
|
+
end
|
1721
|
+
|
1722
|
+
def test_abstract_class
|
1723
|
+
assert !ActiveRecord::Base.abstract_class?
|
1724
|
+
assert LoosePerson.abstract_class?
|
1725
|
+
assert !LooseDescendant.abstract_class?
|
1726
|
+
end
|
1727
|
+
|
1728
|
+
def test_base_class
|
1729
|
+
assert_equal LoosePerson, LoosePerson.base_class
|
1730
|
+
assert_equal LooseDescendant, LooseDescendant.base_class
|
1731
|
+
assert_equal TightPerson, TightPerson.base_class
|
1732
|
+
assert_equal TightPerson, TightDescendant.base_class
|
1733
|
+
|
1734
|
+
assert_equal Post, Post.base_class
|
1735
|
+
assert_equal Post, SpecialPost.base_class
|
1736
|
+
assert_equal Post, StiPost.base_class
|
1737
|
+
assert_equal SubStiPost, SubStiPost.base_class
|
1738
|
+
end
|
1739
|
+
|
1740
|
+
def test_descends_from_active_record
|
1741
|
+
# Tries to call Object.abstract_class?
|
1742
|
+
assert_raise(NoMethodError) do
|
1743
|
+
ActiveRecord::Base.descends_from_active_record?
|
1744
|
+
end
|
1745
|
+
|
1746
|
+
# Abstract subclass of AR::Base.
|
1747
|
+
assert LoosePerson.descends_from_active_record?
|
1748
|
+
|
1749
|
+
# Concrete subclass of an abstract class.
|
1750
|
+
assert LooseDescendant.descends_from_active_record?
|
1751
|
+
|
1752
|
+
# Concrete subclass of AR::Base.
|
1753
|
+
assert TightPerson.descends_from_active_record?
|
1754
|
+
|
1755
|
+
# Concrete subclass of a concrete class but has no type column.
|
1756
|
+
assert TightDescendant.descends_from_active_record?
|
1757
|
+
|
1758
|
+
# Concrete subclass of AR::Base.
|
1759
|
+
assert Post.descends_from_active_record?
|
1760
|
+
|
1761
|
+
# Abstract subclass of a concrete class which has a type column.
|
1762
|
+
# This is pathological, as you'll never have Sub < Abstract < Concrete.
|
1763
|
+
assert !StiPost.descends_from_active_record?
|
1764
|
+
|
1765
|
+
# Concrete subclasses an abstract class which has a type column.
|
1766
|
+
assert !SubStiPost.descends_from_active_record?
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
def test_find_on_abstract_base_class_doesnt_use_type_condition
|
1770
|
+
old_class = LooseDescendant
|
1771
|
+
Object.send :remove_const, :LooseDescendant
|
1772
|
+
|
1773
|
+
descendant = old_class.create! :first_name => 'bob'
|
1774
|
+
assert_not_nil LoosePerson.find(descendant.id), "Should have found instance of LooseDescendant when finding abstract LoosePerson: #{descendant.inspect}"
|
1775
|
+
ensure
|
1776
|
+
unless Object.const_defined?(:LooseDescendant)
|
1777
|
+
Object.const_set :LooseDescendant, old_class
|
1778
|
+
end
|
1779
|
+
end
|
1780
|
+
|
1781
|
+
def test_assert_queries
|
1782
|
+
query = lambda { ActiveRecord::Base.connection.execute 'select count(*) from developers' }
|
1783
|
+
assert_queries(2) { 2.times { query.call } }
|
1784
|
+
assert_queries 1, &query
|
1785
|
+
assert_no_queries { assert true }
|
1786
|
+
end
|
1787
|
+
|
1788
|
+
def test_to_xml
|
1789
|
+
xml = REXML::Document.new(topics(:first).to_xml(:indent => 0))
|
1790
|
+
bonus_time_in_current_timezone = topics(:first).bonus_time.xmlschema
|
1791
|
+
written_on_in_current_timezone = topics(:first).written_on.xmlschema
|
1792
|
+
last_read_in_current_timezone = topics(:first).last_read.xmlschema
|
1793
|
+
|
1794
|
+
assert_equal "topic", xml.root.name
|
1795
|
+
assert_equal "The First Topic" , xml.elements["//title"].text
|
1796
|
+
assert_equal "David" , xml.elements["//author-name"].text
|
1797
|
+
|
1798
|
+
assert_equal "1", xml.elements["//id"].text
|
1799
|
+
assert_equal "integer" , xml.elements["//id"].attributes['type']
|
1800
|
+
|
1801
|
+
assert_equal "1", xml.elements["//replies-count"].text
|
1802
|
+
assert_equal "integer" , xml.elements["//replies-count"].attributes['type']
|
1803
|
+
|
1804
|
+
assert_equal written_on_in_current_timezone, xml.elements["//written-on"].text
|
1805
|
+
assert_equal "datetime" , xml.elements["//written-on"].attributes['type']
|
1806
|
+
|
1807
|
+
assert_equal "--- Have a nice day\n" , xml.elements["//content"].text
|
1808
|
+
assert_equal "yaml" , xml.elements["//content"].attributes['type']
|
1809
|
+
|
1810
|
+
assert_equal "david@loudthinking.com", xml.elements["//author-email-address"].text
|
1811
|
+
|
1812
|
+
assert_equal nil, xml.elements["//parent-id"].text
|
1813
|
+
assert_equal "integer", xml.elements["//parent-id"].attributes['type']
|
1814
|
+
assert_equal "true", xml.elements["//parent-id"].attributes['nil']
|
1815
|
+
|
1816
|
+
if current_adapter?(:SybaseAdapter, :SQLServerAdapter, :OracleAdapter)
|
1817
|
+
assert_equal last_read_in_current_timezone, xml.elements["//last-read"].text
|
1818
|
+
assert_equal "datetime" , xml.elements["//last-read"].attributes['type']
|
1819
|
+
else
|
1820
|
+
assert_equal "2004-04-15", xml.elements["//last-read"].text
|
1821
|
+
assert_equal "date" , xml.elements["//last-read"].attributes['type']
|
1822
|
+
end
|
1823
|
+
|
1824
|
+
# Oracle and DB2 don't have true boolean or time-only fields
|
1825
|
+
unless current_adapter?(:OracleAdapter, :DB2Adapter)
|
1826
|
+
assert_equal "false", xml.elements["//approved"].text
|
1827
|
+
assert_equal "boolean" , xml.elements["//approved"].attributes['type']
|
1828
|
+
|
1829
|
+
assert_equal bonus_time_in_current_timezone, xml.elements["//bonus-time"].text
|
1830
|
+
assert_equal "datetime" , xml.elements["//bonus-time"].attributes['type']
|
1831
|
+
end
|
1832
|
+
end
|
1833
|
+
|
1834
|
+
def test_to_xml_skipping_attributes
|
1835
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :replies_count])
|
1836
|
+
assert_equal "<topic>", xml.first(7)
|
1837
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1838
|
+
assert xml.include?(%(<author-name>David</author-name>))
|
1839
|
+
|
1840
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :author_name, :replies_count])
|
1841
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1842
|
+
assert !xml.include?(%(<author-name>David</author-name>))
|
1843
|
+
end
|
1844
|
+
|
1845
|
+
def test_to_xml_including_has_many_association
|
1846
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :include => :replies, :except => :replies_count)
|
1847
|
+
assert_equal "<topic>", xml.first(7)
|
1848
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1849
|
+
assert xml.include?(%(<title>The Second Topic of the day</title>))
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
def test_array_to_xml_including_has_many_association
|
1853
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :include => :replies)
|
1854
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1855
|
+
end
|
1856
|
+
|
1857
|
+
def test_array_to_xml_including_methods
|
1858
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :methods => [ :topic_id ])
|
1859
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:first).topic_id}</topic-id>)), xml
|
1860
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:second).topic_id}</topic-id>)), xml
|
1861
|
+
end
|
1862
|
+
|
1863
|
+
def test_array_to_xml_including_has_one_association
|
1864
|
+
xml = [ companies(:first_firm), companies(:rails_core) ].to_xml(:indent => 0, :skip_instruct => true, :include => :account)
|
1865
|
+
assert xml.include?(companies(:first_firm).account.to_xml(:indent => 0, :skip_instruct => true))
|
1866
|
+
assert xml.include?(companies(:rails_core).account.to_xml(:indent => 0, :skip_instruct => true))
|
1867
|
+
end
|
1868
|
+
|
1869
|
+
def test_array_to_xml_including_belongs_to_association
|
1870
|
+
xml = [ companies(:first_client), companies(:second_client), companies(:another_client) ].to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1871
|
+
assert xml.include?(companies(:first_client).to_xml(:indent => 0, :skip_instruct => true))
|
1872
|
+
assert xml.include?(companies(:second_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
1873
|
+
assert xml.include?(companies(:another_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
1874
|
+
end
|
1875
|
+
|
1876
|
+
def test_to_xml_including_belongs_to_association
|
1877
|
+
xml = companies(:first_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1878
|
+
assert !xml.include?("<firm>")
|
1879
|
+
|
1880
|
+
xml = companies(:second_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1881
|
+
assert xml.include?("<firm>")
|
1882
|
+
end
|
1883
|
+
|
1884
|
+
def test_to_xml_including_multiple_associations
|
1885
|
+
xml = companies(:first_firm).to_xml(:indent => 0, :skip_instruct => true, :include => [ :clients, :account ])
|
1886
|
+
assert_equal "<firm>", xml.first(6)
|
1887
|
+
assert xml.include?(%(<account>))
|
1888
|
+
assert xml.include?(%(<clients type="array"><client>))
|
1889
|
+
end
|
1890
|
+
|
1891
|
+
def test_to_xml_including_multiple_associations_with_options
|
1892
|
+
xml = companies(:first_firm).to_xml(
|
1893
|
+
:indent => 0, :skip_instruct => true,
|
1894
|
+
:include => { :clients => { :only => :name } }
|
1895
|
+
)
|
1896
|
+
|
1897
|
+
assert_equal "<firm>", xml.first(6)
|
1898
|
+
assert xml.include?(%(<client><name>Summit</name></client>))
|
1899
|
+
assert xml.include?(%(<clients type="array"><client>))
|
1900
|
+
end
|
1901
|
+
|
1902
|
+
def test_to_xml_including_methods
|
1903
|
+
xml = Company.new.to_xml(:methods => :arbitrary_method, :skip_instruct => true)
|
1904
|
+
assert_equal "<company>", xml.first(9)
|
1905
|
+
assert xml.include?(%(<arbitrary-method>I am Jack's profound disappointment</arbitrary-method>))
|
1906
|
+
end
|
1907
|
+
|
1908
|
+
def test_to_xml_with_block
|
1909
|
+
value = "Rockin' the block"
|
1910
|
+
xml = Company.new.to_xml(:skip_instruct => true) do |xml|
|
1911
|
+
xml.tag! "arbitrary-element", value
|
1912
|
+
end
|
1913
|
+
assert_equal "<company>", xml.first(9)
|
1914
|
+
assert xml.include?(%(<arbitrary-element>#{value}</arbitrary-element>))
|
1915
|
+
end
|
1916
|
+
|
1917
|
+
def test_type_name_with_module_should_handle_beginning
|
1918
|
+
assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person')
|
1919
|
+
assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person')
|
1920
|
+
end
|
1921
|
+
|
1922
|
+
def test_to_param_should_return_string
|
1923
|
+
assert_kind_of String, Client.find(:first).to_param
|
1924
|
+
end
|
1925
|
+
|
1926
|
+
def test_inspect_class
|
1927
|
+
assert_equal 'ActiveRecord::Base', ActiveRecord::Base.inspect
|
1928
|
+
assert_equal 'LoosePerson(abstract)', LoosePerson.inspect
|
1929
|
+
assert_match(/^Topic\(id: integer, title: string/, Topic.inspect)
|
1930
|
+
end
|
1931
|
+
|
1932
|
+
def test_inspect_instance
|
1933
|
+
topic = topics(:first)
|
1934
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic", author_name: "David", author_email_address: "david@loudthinking.com", written_on: "#{topic.written_on.to_s(:db)}", bonus_time: "#{topic.bonus_time.to_s(:db)}", last_read: "#{topic.last_read.to_s(:db)}", content: "Have a nice day", approved: false, replies_count: 1, parent_id: nil, type: nil>), topic.inspect
|
1935
|
+
end
|
1936
|
+
|
1937
|
+
def test_inspect_new_instance
|
1938
|
+
assert_match /Topic id: nil/, Topic.new.inspect
|
1939
|
+
end
|
1940
|
+
|
1941
|
+
def test_inspect_limited_select_instance
|
1942
|
+
assert_equal %(#<Topic id: 1>), Topic.find(:first, :select => 'id', :conditions => 'id = 1').inspect
|
1943
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic">), Topic.find(:first, :select => 'id, title', :conditions => 'id = 1').inspect
|
1944
|
+
end
|
1945
|
+
|
1946
|
+
def test_inspect_class_without_table
|
1947
|
+
assert_equal "NonExistentTable(Table doesn't exist)", NonExistentTable.inspect
|
1948
|
+
end
|
1949
|
+
|
1950
|
+
def test_attribute_for_inspect
|
1951
|
+
t = topics(:first)
|
1952
|
+
t.title = "The First Topic Now Has A Title With\nNewlines And More Than 50 Characters"
|
1953
|
+
|
1954
|
+
assert_equal %("#{t.written_on.to_s(:db)}"), t.attribute_for_inspect(:written_on)
|
1955
|
+
assert_equal '"The First Topic Now Has A Title With\nNewlines And M..."', t.attribute_for_inspect(:title)
|
1956
|
+
end
|
1957
|
+
|
1958
|
+
def test_becomes
|
1959
|
+
assert_kind_of Reply, topics(:first).becomes(Reply)
|
1960
|
+
assert_equal "The First Topic", topics(:first).becomes(Reply).title
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
def test_silence_sets_log_level_to_error_in_block
|
1964
|
+
original_logger = ActiveRecord::Base.logger
|
1965
|
+
log = StringIO.new
|
1966
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
1967
|
+
ActiveRecord::Base.logger.level = Logger::DEBUG
|
1968
|
+
ActiveRecord::Base.silence do
|
1969
|
+
ActiveRecord::Base.logger.warn "warn"
|
1970
|
+
ActiveRecord::Base.logger.error "error"
|
1971
|
+
end
|
1972
|
+
assert_equal "error\n", log.string
|
1973
|
+
ensure
|
1974
|
+
ActiveRecord::Base.logger = original_logger
|
1975
|
+
end
|
1976
|
+
|
1977
|
+
def test_silence_sets_log_level_back_to_level_before_yield
|
1978
|
+
original_logger = ActiveRecord::Base.logger
|
1979
|
+
log = StringIO.new
|
1980
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
1981
|
+
ActiveRecord::Base.logger.level = Logger::WARN
|
1982
|
+
ActiveRecord::Base.silence do
|
1983
|
+
end
|
1984
|
+
assert_equal Logger::WARN, ActiveRecord::Base.logger.level
|
1985
|
+
ensure
|
1986
|
+
ActiveRecord::Base.logger = original_logger
|
1987
|
+
end
|
1988
|
+
|
1989
|
+
def test_benchmark_with_log_level
|
1990
|
+
original_logger = ActiveRecord::Base.logger
|
1991
|
+
log = StringIO.new
|
1992
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
1993
|
+
ActiveRecord::Base.logger.level = Logger::WARN
|
1994
|
+
ActiveRecord::Base.benchmark("Debug Topic Count", Logger::DEBUG) { Topic.count }
|
1995
|
+
ActiveRecord::Base.benchmark("Warn Topic Count", Logger::WARN) { Topic.count }
|
1996
|
+
ActiveRecord::Base.benchmark("Error Topic Count", Logger::ERROR) { Topic.count }
|
1997
|
+
assert_no_match /Debug Topic Count/, log.string
|
1998
|
+
assert_match /Warn Topic Count/, log.string
|
1999
|
+
assert_match /Error Topic Count/, log.string
|
2000
|
+
ensure
|
2001
|
+
ActiveRecord::Base.logger = original_logger
|
2002
|
+
end
|
2003
|
+
|
2004
|
+
def test_benchmark_with_use_silence
|
2005
|
+
original_logger = ActiveRecord::Base.logger
|
2006
|
+
log = StringIO.new
|
2007
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
2008
|
+
ActiveRecord::Base.benchmark("Logging", Logger::DEBUG, true) { ActiveRecord::Base.logger.debug "Loud" }
|
2009
|
+
ActiveRecord::Base.benchmark("Logging", Logger::DEBUG, false) { ActiveRecord::Base.logger.debug "Quiet" }
|
2010
|
+
assert_no_match /Loud/, log.string
|
2011
|
+
assert_match /Quiet/, log.string
|
2012
|
+
ensure
|
2013
|
+
ActiveRecord::Base.logger = original_logger
|
2014
|
+
end
|
2015
|
+
end
|