radiant 0.6.4 → 0.6.5
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 +188 -35
- data/CONTRIBUTORS +25 -2
- data/INSTALL +1 -1
- data/app/controllers/admin/abstract_model_controller.rb +13 -13
- data/app/controllers/admin/export_controller.rb +1 -2
- data/app/controllers/admin/extension_controller.rb +0 -5
- data/app/controllers/admin/page_controller.rb +2 -0
- data/app/controllers/application.rb +1 -1
- data/app/controllers/site_controller.rb +8 -1
- data/app/helpers/admin/node_helper.rb +21 -18
- data/app/helpers/application_helper.rb +4 -13
- data/app/models/layout.rb +2 -2
- data/app/models/page.rb +25 -21
- data/app/models/page_context.rb +3 -5
- data/app/models/response_cache.rb +19 -27
- data/app/models/snippet.rb +2 -2
- data/app/models/standard_tags.rb +148 -26
- data/app/models/user.rb +2 -2
- data/app/views/admin/extension/index.html.erb +40 -0
- data/app/views/admin/layout/edit.html.erb +39 -0
- data/app/views/admin/layout/{index.rhtml → index.html.erb} +0 -0
- data/app/views/admin/layout/{remove.rhtml → remove.html.erb} +0 -0
- data/app/views/admin/page/_meta_row.html.erb +4 -0
- data/app/views/admin/page/{_node.rhtml → _node.html.erb} +0 -0
- data/app/views/admin/page/{_part.rhtml → _part.html.erb} +0 -0
- data/app/views/admin/page/_tag_reference.html.erb +4 -0
- data/app/views/admin/page/{children.rhtml → children.html.erb} +0 -0
- data/app/views/admin/page/edit.html.erb +140 -0
- data/app/views/admin/page/index.html.erb +31 -0
- data/app/views/admin/page/{remove.rhtml → remove.html.erb} +0 -0
- data/app/views/admin/snippet/{edit.rhtml → edit.html.erb} +0 -0
- data/app/views/admin/snippet/{index.rhtml → index.html.erb} +0 -0
- data/app/views/admin/snippet/{remove.rhtml → remove.html.erb} +0 -0
- data/app/views/admin/user/edit.html.erb +54 -0
- data/app/views/admin/user/{index.rhtml → index.html.erb} +0 -0
- data/app/views/admin/user/preferences.html.erb +29 -0
- data/app/views/admin/user/{remove.rhtml → remove.html.erb} +0 -0
- data/app/views/admin/welcome/{login.rhtml → login.html.erb} +0 -0
- data/app/views/layouts/{application.rhtml → application.html.erb} +0 -0
- data/app/views/site/{not_found.rhtml → not_found.html.erb} +0 -0
- data/bin/radiant +0 -0
- data/config/boot.rb +136 -26
- data/config/environment.rb +61 -53
- data/config/environments/development.rb +2 -3
- data/config/environments/test.rb +14 -7
- data/db/migrate/015_add_optimistic_locking.rb +6 -6
- data/db/migrate/017_rename_created_by_updated_by_columns.rb +15 -0
- data/db/migrate/018_add_description_and_keywords_to_pages.rb +11 -0
- data/db/schema.rb +66 -59
- data/db/templates/styled-blog.yml +3 -3
- data/lib/annotatable.rb +16 -0
- data/lib/autotest/discover.rb +3 -0
- data/lib/autotest/radiant_rails_rspec.rb +111 -0
- data/lib/generators/extension/USAGE +16 -14
- data/lib/generators/extension/extension_generator.rb +29 -7
- data/lib/generators/extension/templates/RSpecRakefile +120 -0
- data/lib/generators/extension/templates/Rakefile +0 -0
- data/lib/generators/extension/templates/spec.opts +6 -0
- data/lib/generators/extension/templates/spec_helper.rb +37 -0
- data/lib/generators/extension/templates/test_helper.rb +9 -2
- data/lib/generators/extension_controller/USAGE +4 -2
- data/lib/generators/extension_controller/extension_controller_generator.rb +50 -0
- data/lib/generators/extension_controller/templates/controller_spec.rb +23 -0
- data/lib/generators/extension_controller/templates/helper_spec.rb +11 -0
- data/lib/generators/extension_controller/templates/view_spec.rb +12 -0
- data/lib/generators/extension_model/USAGE +3 -2
- data/lib/generators/extension_model/extension_model_generator.rb +34 -0
- data/lib/generators/extension_model/templates/model_spec.rb +11 -0
- data/lib/generators/instance/templates/instance_boot.rb +136 -33
- data/lib/generators/instance/templates/instance_environment.rb +85 -4
- data/lib/login_system.rb +16 -0
- data/lib/plugins/dependencies_fix/init.rb +5 -5
- data/lib/plugins/extension_patches/init.rb +0 -1
- data/lib/plugins/extension_patches/lib/fixture_loading_extension.rb +76 -75
- data/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb +19 -14
- data/lib/plugins/string_extensions/lib/string_extensions.rb +4 -0
- data/lib/plugins/symbol_extensions/init.rb +1 -0
- data/lib/plugins/symbol_extensions/lib/symbol_extensions.rb +7 -0
- data/lib/radiant.rb +2 -8
- data/lib/radiant/extension.rb +11 -43
- data/lib/radiant/extension_loader.rb +144 -135
- data/lib/radiant/initializer.rb +126 -33
- data/lib/radiant/setup.rb +1 -0
- data/lib/tasks/database.rake +44 -3
- data/lib/tasks/extensions.rake +29 -11
- data/lib/tasks/framework.rake +20 -6
- data/lib/tasks/instance.rake +5 -2
- data/lib/tasks/release.rake +1 -0
- data/public/dispatch.cgi +0 -0
- data/public/dispatch.fcgi +0 -0
- data/public/dispatch.rb +0 -0
- data/public/images/admin/brown-bottom-line.gif +0 -0
- data/public/images/admin/view-site.gif +0 -0
- data/public/javascripts/admin/admin.js +142 -0
- data/public/javascripts/{ruledtable.js → admin/ruledtable.js} +0 -0
- data/public/javascripts/admin/sitemap.js +131 -0
- data/public/javascripts/admin/tabcontrol.js +127 -0
- data/public/javascripts/pngfix.js +1 -1
- data/public/stylesheets/admin/main.css +11 -6
- data/script/about +0 -0
- data/script/breakpointer +0 -0
- data/script/console +0 -0
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/performance/benchmarker +0 -0
- data/script/performance/profiler +0 -0
- data/script/plugin +0 -0
- data/script/process/inspector +0 -0
- data/script/process/reaper +0 -0
- data/script/process/spawner +0 -0
- data/script/process/spinner +0 -0
- data/script/runner +0 -0
- data/script/server +0 -0
- data/script/spec +12 -0
- data/script/spec_server +99 -0
- data/script/version +0 -0
- data/spec/controllers/admin/abstract_model_controller_spec.rb +263 -0
- data/spec/controllers/admin/export_controller_spec.rb +16 -0
- data/spec/controllers/admin/extension_controller_spec.rb +21 -0
- data/spec/controllers/admin/layout_controller_spec.rb +42 -0
- data/spec/controllers/admin/page_controller_spec.rb +312 -0
- data/spec/controllers/admin/snippet_controller_spec.rb +27 -0
- data/spec/controllers/admin/user_controller_spec.rb +72 -0
- data/spec/controllers/admin/welcome_controller_spec.rb +37 -0
- data/spec/controllers/application_controller_spec.rb +41 -0
- data/spec/controllers/site_controller_spec.rb +109 -0
- data/spec/fixtures/sample.txt +1 -0
- data/spec/helpers/admin/abstract_model_helper_spec.rb +4 -0
- data/spec/helpers/admin/export_helper_spec.rb +4 -0
- data/spec/helpers/admin/extension_helper_spec.rb +4 -0
- data/spec/helpers/admin/layout_helper_spec.rb +4 -0
- data/spec/helpers/admin/node_helper_spec.rb +97 -0
- data/spec/helpers/admin/page_helper_spec.rb +41 -0
- data/spec/helpers/admin/snippet_helper_spec.rb +4 -0
- data/spec/helpers/admin/user_helper_spec.rb +4 -0
- data/spec/helpers/admin/welcome_helper_spec.rb +4 -0
- data/spec/helpers/application_helper_spec.rb +166 -0
- data/spec/helpers/site_helper_spec.rb +4 -0
- data/spec/lib/annotatable_spec.rb +86 -0
- data/spec/lib/autotest_spec.rb +81 -0
- data/spec/lib/inheritable_class_attributes_spec.rb +90 -0
- data/spec/lib/local_time_spec.rb +40 -0
- data/spec/lib/login_system_spec.rb +142 -0
- data/spec/lib/method_observer_spec.rb +48 -0
- data/spec/lib/radiant/admin_ui_spec.rb +133 -0
- data/spec/lib/radiant/extension_loader_spec.rb +179 -0
- data/spec/lib/radiant/extension_migrator_spec.rb +17 -0
- data/spec/lib/radiant/extension_spec.rb +69 -0
- data/spec/lib/radiant/initializer_spec.rb +80 -0
- data/spec/lib/radiant/taggable_spec.rb +150 -0
- data/spec/lib/radiant_spec.rb +26 -0
- data/spec/lib/simpleton_spec.rb +45 -0
- data/spec/matchers/login_system_matcher.rb +79 -0
- data/spec/matchers/render_matcher.rb +115 -0
- data/spec/models/env_dump_page_spec.rb +18 -0
- data/spec/models/file_not_found_page_spec.rb +31 -0
- data/spec/models/layout_spec.rb +29 -0
- data/spec/models/page_context_spec.rb +68 -0
- data/spec/models/page_part_spec.rb +47 -0
- data/spec/models/page_spec.rb +500 -0
- data/spec/models/radiant/config_spec.rb +57 -0
- data/spec/models/radiant/exporter_spec.rb +25 -0
- data/spec/models/response_cache_spec.rb +259 -0
- data/spec/models/snippet_spec.rb +41 -0
- data/spec/models/standard_tags_spec.rb +774 -0
- data/spec/models/status_spec.rb +53 -0
- data/spec/models/text_filter_spec.rb +40 -0
- data/spec/models/user_action_observer_spec.rb +34 -0
- data/spec/models/user_spec.rb +135 -0
- data/spec/rcov.opts +2 -0
- data/spec/scenarios/file_not_found_scenario.rb +13 -0
- data/spec/scenarios/home_page_scenario.rb +64 -0
- data/spec/scenarios/layouts_scenario.rb +58 -0
- data/spec/scenarios/markup_pages_scenario.rb +13 -0
- data/spec/scenarios/pages_scenario.rb +50 -0
- data/spec/scenarios/pages_with_layouts_scenario.rb +10 -0
- data/spec/scenarios/snippets_scenario.rb +34 -0
- data/spec/scenarios/users_and_pages_scenario.rb +9 -0
- data/spec/scenarios/users_scenario.rb +43 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +64 -0
- data/stories/all.rb +4 -0
- data/stories/helper.rb +3 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension/{index.rhtml → index.html.erb} +0 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension/{override.rhtml → override.html.erb} +0 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension_mailer/{message.rhtml → message.text.html.erb} +0 -0
- data/test/fixtures/extensions/02_overriding/app/views/basic_extension/{override.rhtml → override.html.erb} +0 -0
- data/test/fixtures/page_parts.yml +6 -1
- data/test/fixtures/pages.yml +33 -19
- data/test/helpers/caching_test_helper.rb +39 -38
- data/test/helpers/extension_fixture_test_helper.rb +39 -39
- data/test/helpers/extension_tag_test_helper.rb +16 -16
- data/test/helpers/logging_test_helper.rb +10 -0
- data/test/helpers/render_test_helper.rb +3 -3
- data/test/helpers/validation_test_helper.rb +42 -42
- data/test/test_helper.rb +6 -4
- data/vendor/extensions/archive/Rakefile +105 -10
- data/vendor/extensions/archive/app/models/archive_day_index_page.rb +0 -0
- data/vendor/extensions/archive/app/models/archive_month_index_page.rb +0 -0
- data/vendor/extensions/archive/app/models/archive_page.rb +0 -0
- data/vendor/extensions/archive/app/models/archive_year_index_page.rb +0 -0
- data/vendor/extensions/archive/lib/archive_index_tags_and_methods.rb +0 -0
- data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/models/archive_page_spec.rb +33 -0
- data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/scenarios/archive_scenario.rb +51 -0
- data/vendor/extensions/archive/spec/spec.opts +6 -0
- data/vendor/extensions/archive/spec/spec_helper.rb +37 -0
- data/vendor/extensions/archive/test/functional/archive_extension_test.rb +1 -1
- data/vendor/extensions/archive/test/helpers/archive_index_test_helper.rb +0 -0
- data/vendor/extensions/archive/test/test_helper.rb +11 -4
- data/vendor/extensions/archive/test/unit/archive_day_index_page_test.rb +0 -0
- data/vendor/extensions/archive/test/unit/archive_month_index_page_test.rb +0 -0
- data/vendor/extensions/archive/test/unit/archive_page_test.rb +0 -0
- data/vendor/extensions/archive/test/unit/archive_year_index_page_test.rb +0 -0
- data/vendor/extensions/markdown_filter/Rakefile +105 -10
- data/vendor/extensions/markdown_filter/lib/tasks/markdown_filter_extension_tasks.rake +28 -0
- data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +15 -0
- data/vendor/extensions/markdown_filter/spec/models/smarty_pants_filter_spec.rb +12 -0
- data/vendor/extensions/markdown_filter/spec/spec.opts +6 -0
- data/vendor/extensions/markdown_filter/spec/spec_helper.rb +37 -0
- data/vendor/extensions/markdown_filter/test/test_helper.rb +11 -2
- data/vendor/extensions/textile_filter/Rakefile +105 -10
- data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +11 -0
- data/vendor/extensions/textile_filter/spec/spec.opts +6 -0
- data/vendor/extensions/textile_filter/spec/spec_helper.rb +37 -0
- data/vendor/extensions/textile_filter/test/test_helper.rb +11 -2
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/rspec/CHANGES +1079 -0
- data/vendor/plugins/rspec/MIT-LICENSE +20 -0
- data/vendor/plugins/rspec/README +71 -0
- data/vendor/plugins/rspec/Rakefile +279 -0
- data/vendor/plugins/rspec/TODO +2 -0
- data/vendor/plugins/rspec/UPGRADE +31 -0
- data/vendor/plugins/rspec/bin/spec +4 -0
- data/vendor/plugins/rspec/bin/spec_translator +8 -0
- data/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +19 -0
- data/vendor/plugins/rspec/examples/pure/before_and_after_example.rb +40 -0
- data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +45 -0
- data/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb +54 -0
- data/vendor/plugins/rspec/examples/pure/custom_formatter.rb +12 -0
- data/vendor/plugins/rspec/examples/pure/dynamic_spec.rb +9 -0
- data/vendor/plugins/rspec/examples/pure/file_accessor.rb +19 -0
- data/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb +38 -0
- data/vendor/plugins/rspec/examples/pure/greeter_spec.rb +31 -0
- data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +14 -0
- data/vendor/plugins/rspec/examples/pure/io_processor.rb +8 -0
- data/vendor/plugins/rspec/examples/pure/io_processor_spec.rb +21 -0
- data/vendor/plugins/rspec/examples/pure/legacy_spec.rb +11 -0
- data/vendor/plugins/rspec/examples/pure/mocking_example.rb +27 -0
- data/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb +28 -0
- data/vendor/plugins/rspec/examples/pure/nested_classes_example.rb +36 -0
- data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +28 -0
- data/vendor/plugins/rspec/examples/pure/pending_example.rb +20 -0
- data/vendor/plugins/rspec/examples/pure/predicate_example.rb +27 -0
- data/vendor/plugins/rspec/examples/pure/priority.txt +1 -0
- data/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb +81 -0
- data/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb +38 -0
- data/vendor/plugins/rspec/examples/pure/spec_helper.rb +3 -0
- data/vendor/plugins/rspec/examples/pure/stack.rb +36 -0
- data/vendor/plugins/rspec/examples/pure/stack_spec.rb +63 -0
- data/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +67 -0
- data/vendor/plugins/rspec/examples/pure/stubbing_example.rb +69 -0
- data/vendor/plugins/rspec/examples/stories/adder.rb +13 -0
- data/vendor/plugins/rspec/examples/stories/addition +34 -0
- data/vendor/plugins/rspec/examples/stories/addition.rb +9 -0
- data/vendor/plugins/rspec/examples/stories/calculator.rb +65 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/README.txt +21 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +6 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/examples.rb +3 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +35 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +66 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +21 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +21 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +42 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story +42 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanKillACell.story +17 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/TheGridWraps.story +53 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +52 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/helper.rb +6 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +26 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/steps.rb +5 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.rb +3 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.txt +22 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/life.rb +3 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/life/game.rb +23 -0
- data/vendor/plugins/rspec/examples/stories/game-of-life/life/grid.rb +43 -0
- data/vendor/plugins/rspec/examples/stories/helper.rb +9 -0
- data/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb +18 -0
- data/vendor/plugins/rspec/failing_examples/README.txt +7 -0
- data/vendor/plugins/rspec/failing_examples/diffing_spec.rb +36 -0
- data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
- data/vendor/plugins/rspec/failing_examples/failure_in_setup.rb +10 -0
- data/vendor/plugins/rspec/failing_examples/failure_in_teardown.rb +10 -0
- data/vendor/plugins/rspec/failing_examples/mocking_example.rb +40 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb +26 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb +25 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_rr.rb +27 -0
- data/vendor/plugins/rspec/failing_examples/partial_mock_example.rb +20 -0
- data/vendor/plugins/rspec/failing_examples/predicate_example.rb +29 -0
- data/vendor/plugins/rspec/failing_examples/raising_example.rb +47 -0
- data/vendor/plugins/rspec/failing_examples/spec_helper.rb +3 -0
- data/vendor/plugins/rspec/failing_examples/syntax_error_example.rb +7 -0
- data/vendor/plugins/rspec/failing_examples/team_spec.rb +44 -0
- data/vendor/plugins/rspec/failing_examples/timeout_behaviour.rb +7 -0
- data/vendor/plugins/rspec/init.rb +9 -0
- data/vendor/plugins/rspec/lib/autotest/discover.rb +3 -0
- data/vendor/plugins/rspec/lib/autotest/rspec.rb +72 -0
- data/vendor/plugins/rspec/lib/spec.rb +30 -0
- data/vendor/plugins/rspec/lib/spec/example.rb +12 -0
- data/vendor/plugins/rspec/lib/spec/example/configuration.rb +144 -0
- data/vendor/plugins/rspec/lib/spec/example/errors.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/example/example_group.rb +16 -0
- data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +58 -0
- data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +433 -0
- data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +42 -0
- data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +110 -0
- data/vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb +21 -0
- data/vendor/plugins/rspec/lib/spec/example/pending.rb +18 -0
- data/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb +58 -0
- data/vendor/plugins/rspec/lib/spec/expectations.rb +56 -0
- data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +66 -0
- data/vendor/plugins/rspec/lib/spec/expectations/errors.rb +12 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions.rb +2 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +71 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
- data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/extensions.rb +4 -0
- data/vendor/plugins/rspec/lib/spec/extensions/class.rb +24 -0
- data/vendor/plugins/rspec/lib/spec/extensions/main.rb +102 -0
- data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +7 -0
- data/vendor/plugins/rspec/lib/spec/extensions/object.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/interop/test.rb +12 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb +61 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb +34 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +61 -0
- data/vendor/plugins/rspec/lib/spec/matchers.rb +156 -0
- data/vendor/plugins/rspec/lib/spec/matchers/be.rb +224 -0
- data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/matchers/change.rb +144 -0
- data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/matchers/exist.rb +17 -0
- data/vendor/plugins/rspec/lib/spec/matchers/has.rb +34 -0
- data/vendor/plugins/rspec/lib/spec/matchers/have.rb +145 -0
- data/vendor/plugins/rspec/lib/spec/matchers/include.rb +70 -0
- data/vendor/plugins/rspec/lib/spec/matchers/match.rb +41 -0
- data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +73 -0
- data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +132 -0
- data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +45 -0
- data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +47 -0
- data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +29 -0
- data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +74 -0
- data/vendor/plugins/rspec/lib/spec/mocks.rb +211 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +31 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb.orig +27 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +209 -0
- data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +84 -0
- data/vendor/plugins/rspec/lib/spec/mocks/errors.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb +3 -0
- data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +269 -0
- data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +39 -0
- data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +50 -0
- data/vendor/plugins/rspec/lib/spec/mocks/order_group.rb +29 -0
- data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +166 -0
- data/vendor/plugins/rspec/lib/spec/mocks/space.rb +28 -0
- data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +38 -0
- data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +235 -0
- data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/runner.rb +202 -0
- data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +57 -0
- data/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb +16 -0
- data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +28 -0
- data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +20 -0
- data/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb +59 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +77 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +130 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +33 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +20 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +333 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +47 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +30 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +39 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +128 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +131 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb +16 -0
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +72 -0
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +205 -0
- data/vendor/plugins/rspec/lib/spec/runner/options.rb +288 -0
- data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +147 -0
- data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +71 -0
- data/vendor/plugins/rspec/lib/spec/story.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions.rb +3 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions/main.rb +86 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/story/given_scenario.rb +14 -0
- data/vendor/plugins/rspec/lib/spec/story/runner.rb +56 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +48 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_collector.rb +18 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +48 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +123 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +227 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +70 -0
- data/vendor/plugins/rspec/lib/spec/story/scenario.rb +14 -0
- data/vendor/plugins/rspec/lib/spec/story/step.rb +58 -0
- data/vendor/plugins/rspec/lib/spec/story/step_group.rb +89 -0
- data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/story/story.rb +39 -0
- data/vendor/plugins/rspec/lib/spec/story/world.rb +124 -0
- data/vendor/plugins/rspec/lib/spec/translator.rb +114 -0
- data/vendor/plugins/rspec/lib/spec/version.rb +22 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/flexmock.rb +23 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/mocha.rb +19 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/rr.rb +21 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +18 -0
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +4 -0
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +50 -0
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +111 -0
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +314 -0
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +51 -0
- data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +3 -0
- data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +11 -0
- data/vendor/plugins/rspec/rake_tasks/examples.rake +7 -0
- data/vendor/plugins/rspec/rake_tasks/examples_with_rcov.rake +9 -0
- data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +9 -0
- data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +7 -0
- data/vendor/plugins/rspec/spec/README.jruby +15 -0
- data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +19 -0
- data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +197 -0
- data/vendor/plugins/rspec/spec/autotest_helper.rb +6 -0
- data/vendor/plugins/rspec/spec/autotest_matchers.rb +47 -0
- data/vendor/plugins/rspec/spec/rspec_suite.rb +7 -0
- data/vendor/plugins/rspec/spec/ruby_forker.rb +13 -0
- data/vendor/plugins/rspec/spec/spec.opts +6 -0
- data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +282 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb +48 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +135 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +523 -0
- data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +711 -0
- data/vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb +96 -0
- data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +115 -0
- data/vendor/plugins/rspec/spec/spec/example/example_runner_spec.rb +194 -0
- data/vendor/plugins/rspec/spec/spec/example/example_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +71 -0
- data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb +265 -0
- data/vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb +25 -0
- data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +127 -0
- data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +107 -0
- data/vendor/plugins/rspec/spec/spec/expectations/fail_with_spec.rb +71 -0
- data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +76 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +14 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +9 -0
- data/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb +39 -0
- data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +248 -0
- data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +319 -0
- data/vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb +153 -0
- data/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb +57 -0
- data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +129 -0
- data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +291 -0
- data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +37 -0
- data/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +78 -0
- data/vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb +24 -0
- data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +158 -0
- data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +315 -0
- data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/matchers/satisfy_spec.rb +36 -0
- data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +29 -0
- data/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb +23 -0
- data/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb +97 -0
- data/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb +93 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263_spec.rb +24 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +33 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +30 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +123 -0
- data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +32 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +84 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +481 -0
- data/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
- data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +40 -0
- data/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +106 -0
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +66 -0
- data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +160 -0
- data/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb +52 -0
- data/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +181 -0
- data/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +67 -0
- data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +14 -0
- data/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +23 -0
- data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +147 -0
- data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +92 -0
- data/vendor/plugins/rspec/spec/spec/runner/empty_file.txt +0 -0
- data/vendor/plugins/rspec/spec/spec/runner/examples.txt +2 -0
- data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +37 -0
- data/vendor/plugins/rspec/spec/spec/runner/failed.txt +3 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +33 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +387 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +371 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +66 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +65 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +137 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb +18 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +103 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +129 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +61 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +335 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +365 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +371 -0
- data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +78 -0
- data/vendor/plugins/rspec/spec/spec/runner/heckler_spec.rb +13 -0
- data/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +384 -0
- data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +386 -0
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture.rb +7 -0
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb +8 -0
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb +16 -0
- data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +56 -0
- data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +192 -0
- 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 +1 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec.opts +2 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +1 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +79 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_spaced.opts +2 -0
- data/vendor/plugins/rspec/spec/spec/runner_spec.rb +11 -0
- data/vendor/plugins/rspec/spec/spec/spec_classes.rb +133 -0
- data/vendor/plugins/rspec/spec/spec/story/builders.rb +46 -0
- data/vendor/plugins/rspec/spec/spec/story/extensions/main_spec.rb +161 -0
- data/vendor/plugins/rspec/spec/spec/story/extensions_spec.rb +14 -0
- data/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb +27 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +92 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +27 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +191 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +133 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +384 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +294 -0
- data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +106 -0
- data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +20 -0
- data/vendor/plugins/rspec/spec/spec/story/step_group_spec.rb +157 -0
- data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +72 -0
- data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +200 -0
- data/vendor/plugins/rspec/spec/spec/story/story_helper.rb +2 -0
- data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +86 -0
- data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +423 -0
- data/vendor/plugins/rspec/spec/spec/translator_spec.rb +265 -0
- data/vendor/plugins/rspec/spec/spec_helper.rb +103 -0
- data/vendor/plugins/rspec/stories/all.rb +5 -0
- data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +45 -0
- data/vendor/plugins/rspec/stories/example_groups/example_group_with_should_methods +17 -0
- data/vendor/plugins/rspec/stories/example_groups/nested_groups +17 -0
- data/vendor/plugins/rspec/stories/example_groups/output +25 -0
- data/vendor/plugins/rspec/stories/example_groups/stories.rb +7 -0
- data/vendor/plugins/rspec/stories/helper.rb +6 -0
- data/vendor/plugins/rspec/stories/interop/examples_and_tests_together +30 -0
- data/vendor/plugins/rspec/stories/interop/stories.rb +7 -0
- data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +17 -0
- data/vendor/plugins/rspec/stories/pending_stories/README +3 -0
- data/vendor/plugins/rspec/stories/resources/helpers/cmdline.rb +9 -0
- data/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb +16 -0
- data/vendor/plugins/rspec/stories/resources/matchers/smart_match.rb +37 -0
- data/vendor/plugins/rspec/stories/resources/spec/example_group_with_should_methods.rb +12 -0
- data/vendor/plugins/rspec/stories/resources/spec/simple_spec.rb +8 -0
- data/vendor/plugins/rspec/stories/resources/steps/running_rspec.rb +50 -0
- data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +15 -0
- data/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb +57 -0
- data/vendor/plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +30 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/builder.js +136 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/controls.js +972 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/dragdrop.js +976 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/effects.js +1117 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js +4140 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/rspec.js +149 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +58 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/slider.js +276 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/sound.js +55 -0
- data/vendor/plugins/rspec/story_server/prototype/javascripts/unittest.js +568 -0
- data/vendor/plugins/rspec/story_server/prototype/lib/server.rb +24 -0
- data/vendor/plugins/rspec/story_server/prototype/stories.html +176 -0
- data/vendor/plugins/rspec/story_server/prototype/stylesheets/rspec.css +136 -0
- data/vendor/plugins/rspec/story_server/prototype/stylesheets/test.css +90 -0
- data/vendor/plugins/rspec_on_rails/MIT-LICENSE +31 -0
- data/vendor/plugins/rspec_on_rails/README +3 -0
- data/vendor/plugins/rspec_on_rails/Rakefile +9 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/CHANGES +1 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +35 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +4 -0
- 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 +2 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +4 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +102 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +4 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +39 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +3 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/USAGE +33 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +49 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +25 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +12 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/USAGE +18 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +30 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +167 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +313 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +25 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +22 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +61 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +22 -0
- data/vendor/plugins/rspec_on_rails/init.rb +9 -0
- data/vendor/plugins/rspec_on_rails/lib/autotest/discover.rb +1 -0
- data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +81 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +51 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +46 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +43 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +269 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +59 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +130 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/model_example_group.rb +14 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +98 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +90 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +178 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +12 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +14 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +21 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +11 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +27 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +30 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +5 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +66 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +21 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +29 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +130 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +55 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +113 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +70 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +71 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +23 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +36 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +8 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +60 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb +83 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +43 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +195 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb +112 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +133 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb +18 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +16 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb +33 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +264 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +54 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +48 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +14 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +783 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +37 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +13 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +62 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +209 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +169 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/ar_classes.rb +10 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +55 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/stub_model_spec.rb +54 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +7 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +89 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/spec/rails_suite.rb +7 -0
- data/vendor/plugins/rspec_on_rails/spec/spec_helper.rb +46 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +68 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +59 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +26 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +58 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +10 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +5 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +6 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +13 -0
- 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 +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +1 -0
- 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 +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +1 -0
- 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 +1 -0
- 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 +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +2 -0
- 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 +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +5 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/stories/all.rb +10 -0
- data/vendor/plugins/rspec_on_rails/stories/helper.rb +5 -0
- data/vendor/plugins/rspec_on_rails/stories/steps/people.rb +8 -0
- data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback +15 -0
- data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb +25 -0
- data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +137 -0
- data/vendor/plugins/scenarios/LICENSE +19 -0
- data/vendor/plugins/scenarios/README +262 -0
- data/vendor/plugins/scenarios/Rakefile +66 -0
- data/vendor/plugins/scenarios/TODO +1 -0
- data/vendor/plugins/scenarios/lib/scenarios.rb +34 -0
- data/vendor/plugins/scenarios/lib/scenarios/base.rb +73 -0
- data/vendor/plugins/scenarios/lib/scenarios/builtin/blank_scenario.rb +18 -0
- data/vendor/plugins/scenarios/lib/scenarios/configuration.rb +55 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions.rb +5 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/active_record.rb +14 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/delegating_attributes.rb +40 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/object.rb +5 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/string.rb +22 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/symbol.rb +14 -0
- data/vendor/plugins/scenarios/lib/scenarios/extensions/test_case.rb +76 -0
- data/vendor/plugins/scenarios/lib/scenarios/loading.rb +51 -0
- data/vendor/plugins/scenarios/lib/scenarios/table_blasting.rb +20 -0
- data/vendor/plugins/scenarios/lib/scenarios/table_methods.rb +205 -0
- data/vendor/plugins/scenarios/spec/scenarios/complex_composite_scenario.rb +9 -0
- data/vendor/plugins/scenarios/spec/scenarios/composite_scenario.rb +9 -0
- data/vendor/plugins/scenarios/spec/scenarios/empty_scenario.rb +4 -0
- data/vendor/plugins/scenarios/spec/scenarios/people_scenario.rb +26 -0
- data/vendor/plugins/scenarios/spec/scenarios/places_scenario.rb +22 -0
- data/vendor/plugins/scenarios/spec/scenarios/things_scenario.rb +22 -0
- data/vendor/plugins/scenarios/spec/scenarios_spec.rb +189 -0
- data/vendor/plugins/scenarios/spec/spec.opts +7 -0
- data/vendor/plugins/scenarios/spec/spec_helper.rb +6 -0
- data/vendor/plugins/scenarios/tasks/scenario.rake +21 -0
- data/vendor/plugins/scenarios/test/scenarios_test.rb +39 -0
- data/vendor/plugins/scenarios/test/test_helper.rb +5 -0
- data/vendor/plugins/scenarios/testing/application.rb +2 -0
- data/vendor/plugins/scenarios/testing/database.yml +9 -0
- data/vendor/plugins/scenarios/testing/environment.rb +68 -0
- data/vendor/plugins/scenarios/testing/library.rb +128 -0
- data/vendor/plugins/scenarios/testing/models.rb +14 -0
- data/vendor/plugins/scenarios/testing/rspec_on_rails_3014.patch +52 -0
- data/vendor/plugins/scenarios/testing/rspec_on_rails_3119.patch +53 -0
- data/vendor/plugins/scenarios/testing/schema.rb +31 -0
- data/vendor/rails/Rakefile +21 -0
- data/vendor/rails/actionmailer/CHANGELOG +44 -26
- data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
- data/vendor/rails/actionmailer/README +2 -2
- data/vendor/rails/actionmailer/Rakefile +4 -3
- data/vendor/rails/actionmailer/install.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer.rb +5 -3
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +57 -36
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +4 -4
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +2 -5
- data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +59 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +14 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{text → text-format-0.6.3/text}/format.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +4 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +19 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +245 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +47 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +52 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +39 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +71 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +481 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/facade.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +931 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/info.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +540 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/loader.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +462 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +435 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/mbox.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +282 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +137 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +1475 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +381 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/port.rb +379 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +142 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +43 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +263 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +279 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/tmail.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +281 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +38 -0
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +3 -3
- data/vendor/rails/actionmailer/lib/actionmailer.rb +1 -0
- data/vendor/rails/actionmailer/test/abstract_unit.rb +19 -0
- data/vendor/rails/actionmailer/test/delivery_method_test.rb +51 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -5
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/raw_base64_decoded_string +0 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_base64_encoded_string +1 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +100 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -3
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml +0 -10
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml +0 -2
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml +0 -3
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -3
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +10 -6
- data/vendor/rails/actionmailer/test/mail_render_test.rb +45 -2
- data/vendor/rails/actionmailer/test/mail_service_test.rb +150 -27
- data/vendor/rails/actionmailer/test/quoting_test.rb +57 -3
- data/vendor/rails/actionmailer/test/test_helper_test.rb +117 -0
- data/vendor/rails/actionmailer/test/tmail_test.rb +9 -0
- data/vendor/rails/actionmailer/test/url_test.rb +10 -2
- data/vendor/rails/actionpack/CHANGELOG +1439 -20
- data/vendor/rails/actionpack/MIT-LICENSE +1 -1
- data/vendor/rails/actionpack/README +5 -5
- data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +4 -5
- data/vendor/rails/actionpack/Rakefile +5 -6
- data/vendor/rails/actionpack/install.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller.rb +11 -15
- data/vendor/rails/actionpack/lib/action_controller/assertions.rb +12 -25
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +18 -4
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +8 -1
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +35 -12
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +56 -12
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +105 -38
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +28 -15
- data/vendor/rails/actionpack/lib/action_controller/base.rb +320 -262
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +36 -31
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +132 -66
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +106 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +22 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +73 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +23 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +36 -55
- data/vendor/rails/actionpack/lib/action_controller/components.rb +19 -36
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +13 -9
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +195 -0
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +35 -34
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +30 -35
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +123 -50
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +126 -0
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +127 -108
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +61 -48
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +57 -68
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +43 -80
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +20 -0
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +88 -0
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +91 -0
- data/vendor/rails/actionpack/lib/action_controller/request.rb +553 -88
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +132 -0
- data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +138 -0
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +185 -69
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +211 -172
- data/vendor/rails/actionpack/lib/action_controller/response.rb +49 -8
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +368 -242
- data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +119 -0
- data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +3 -2
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +164 -0
- data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +9 -16
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +17 -8
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +6 -3
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{_trace.rhtml → _trace.erb} +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{layout.rhtml → layout.erb} +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{missing_template.rhtml → missing_template.erb} +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{routing_error.rhtml → routing_error.erb} +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{unknown_action.rhtml → unknown_action.erb} +0 -0
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +53 -0
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +59 -46
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +48 -24
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +7 -4
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +11 -6
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +27 -21
- data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
- data/vendor/rails/actionpack/lib/action_pack/version.rb +4 -4
- data/vendor/rails/actionpack/lib/action_view.rb +8 -3
- data/vendor/rails/actionpack/lib/action_view/base.rb +238 -140
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +1 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +35 -17
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +417 -87
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +111 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +12 -5
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +29 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +97 -63
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +295 -35
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +6 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +354 -111
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +171 -109
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +332 -76
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +35 -11
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +484 -354
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +88 -58
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +396 -364
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +2817 -1107
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +84 -60
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +419 -43
- data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +20 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +59 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +223 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +63 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +69 -39
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +221 -148
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +283 -165
- data/vendor/rails/actionpack/lib/action_view/partials.rb +134 -62
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +4 -12
- data/vendor/rails/actionpack/lib/action_view/template_handler.rb +17 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +19 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +21 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +14 -0
- data/vendor/rails/actionpack/lib/actionpack.rb +1 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +21 -1
- data/vendor/rails/actionpack/test/action_view_test.rb +44 -0
- data/vendor/rails/actionpack/test/active_record_unit.rb +12 -20
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +2 -2
- data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +74 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +21 -152
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +2 -7
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +120 -14
- data/vendor/rails/actionpack/test/controller/base_test.rb +11 -13
- data/vendor/rails/actionpack/test/controller/caching_test.rb +125 -5
- data/vendor/rails/actionpack/test/controller/capture_test.rb +23 -16
- data/vendor/rails/actionpack/test/controller/cgi_test.rb +70 -395
- data/vendor/rails/actionpack/test/controller/components_test.rb +31 -42
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +51 -15
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +1 -42
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +123 -0
- data/vendor/rails/actionpack/test/controller/fake_models.rb +5 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +45 -7
- data/vendor/rails/actionpack/test/controller/flash_test.rb +46 -2
- data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +10 -8
- data/vendor/rails/actionpack/test/controller/helper_test.rb +23 -4
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +124 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +69 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +250 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +239 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +51 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +125 -0
- data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +54 -0
- data/vendor/rails/actionpack/test/controller/integration_test.rb +47 -31
- data/vendor/rails/actionpack/test/controller/layout_test.rb +64 -12
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +193 -38
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +30 -8
- data/vendor/rails/actionpack/test/controller/new_render_test.rb +104 -22
- data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +98 -0
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +103 -0
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +120 -18
- data/vendor/rails/actionpack/test/controller/render_test.rb +226 -55
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +217 -0
- data/vendor/rails/actionpack/test/controller/request_test.rb +546 -27
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +501 -0
- data/vendor/rails/actionpack/test/controller/resources_test.rb +258 -132
- data/vendor/rails/actionpack/test/controller/routing_test.rb +508 -106
- data/vendor/rails/actionpack/test/controller/selector_test.rb +5 -5
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +17 -7
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +246 -0
- data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +182 -0
- data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +89 -0
- data/vendor/rails/actionpack/test/controller/session_management_test.rb +7 -7
- data/vendor/rails/actionpack/test/controller/test_test.rb +150 -38
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +87 -12
- data/vendor/rails/actionpack/test/controller/verification_test.rb +11 -0
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +137 -0
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +11 -75
- data/vendor/rails/actionpack/test/fixtures/addresses/{list.rhtml → list.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +2 -1
- data/vendor/rails/actionpack/test/fixtures/developer.rb +2 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/{hello_world.rhtml → hello_world.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +1 -1
- data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/{builder.rxml → builder.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/{standard.rhtml → standard.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/{talk_from_action.rhtml → talk_from_action.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/{yield.rhtml → yield.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -1
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/replies.yml +2 -0
- data/vendor/rails/actionpack/test/fixtures/reply.rb +2 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/{all_types_with_layout.rhtml → all_types_with_layout.html.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{all_types_with_layout.rjs → all_types_with_layout.js.rjs} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rhtml → using_defaults.html.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rjs → using_defaults.js.rjs} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rxml → using_defaults.xml.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rhtml → using_defaults_with_type_list.html.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rjs → using_defaults_with_type_list.js.rjs} +0 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rxml → using_defaults_with_type_list.xml.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/scope/test/{modgreet.rhtml → modgreet.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{_customer.rhtml → _customer.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{_customer_greeting.rhtml → _customer_greeting.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/{_hello.rxml → _hello.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/{_partial_only.rhtml → _partial_only.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{_person.rhtml → _person.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{action_talk_to_layout.rhtml → action_talk_to_layout.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{block_content_for.rhtml → block_content_for.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/{capturing.rhtml → capturing.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{content_for.rhtml → content_for.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{erb_content_for.rhtml → erb_content_for.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/{greeting.rhtml → greeting.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello.rxml → hello.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello_world.rhtml → hello_world.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello_world_container.rxml → hello_world_container.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello_world.rxml → hello_world_from_rxml.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello_world_with_layout_false.rhtml → hello_world_with_layout_false.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{hello_xml_world.rxml → hello_xml_world.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/{non_erb_block_content_for.rxml → non_erb_block_content_for.builder} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{potential_conflicts.rhtml → potential_conflicts.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{render_file_with_locals.rhtml → render_file_with_locals.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{render_to_string_test.rhtml → render_to_string_test.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/{update_element_with_capture.rhtml → update_element_with_capture.erb} +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/topic.rb +1 -1
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +67 -20
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +255 -54
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +101 -0
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +2 -2
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +88 -42
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +125 -9
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +56 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +326 -33
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +822 -15
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +96 -30
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +61 -13
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +12 -11
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +185 -24
- data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +49 -0
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +9 -3
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +13 -2
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +38 -52
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +216 -46
- data/vendor/rails/activemodel/CHANGES +12 -0
- data/vendor/rails/activemodel/README +21 -0
- data/vendor/rails/activemodel/Rakefile +4 -0
- data/vendor/rails/activemodel/lib/active_model.rb +17 -0
- data/vendor/rails/activemodel/lib/active_model/base.rb +4 -0
- data/vendor/rails/activemodel/lib/active_model/callbacks.rb +5 -0
- data/vendor/rails/activemodel/lib/active_model/observing.rb +100 -0
- data/vendor/rails/activemodel/lib/active_model/validations.rb +4 -0
- data/vendor/rails/activemodel/spec/observing_spec.rb +120 -0
- data/vendor/rails/activemodel/spec/spec_helper.rb +17 -0
- data/vendor/rails/activerecord/CHANGELOG +2484 -34
- data/vendor/rails/activerecord/MIT-LICENSE +1 -1
- data/vendor/rails/activerecord/README +1 -15
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +3 -34
- data/vendor/rails/activerecord/Rakefile +98 -77
- data/vendor/rails/activerecord/install.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record.rb +13 -22
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +38 -49
- data/vendor/rails/activerecord/lib/active_record/associations.rb +465 -338
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +66 -20
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +24 -22
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +46 -51
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +21 -57
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +52 -25
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +30 -14
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +253 -0
- data/vendor/rails/activerecord/lib/active_record/base.rb +830 -532
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +60 -63
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +57 -83
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +38 -9
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +56 -15
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +87 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +23 -12
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +191 -62
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +37 -34
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +28 -17
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +119 -37
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +473 -210
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +91 -107
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +522 -116
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +72 -34
- data/vendor/rails/activerecord/lib/active_record/migration.rb +80 -57
- data/vendor/rails/activerecord/lib/active_record/observer.rb +13 -10
- data/vendor/rails/activerecord/lib/active_record/query_cache.rb +14 -57
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +35 -38
- data/vendor/rails/activerecord/lib/active_record/schema.rb +5 -5
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +35 -13
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +98 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +71 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +315 -0
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +20 -21
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +39 -43
- data/vendor/rails/activerecord/lib/active_record/validations.rb +290 -108
- data/vendor/rails/activerecord/lib/active_record/version.rb +3 -3
- data/vendor/rails/activerecord/lib/activerecord.rb +1 -0
- data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +15 -2
- data/vendor/rails/activerecord/test/abstract_unit.rb +24 -17
- data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +20 -8
- data/vendor/rails/activerecord/test/adapter_test.rb +23 -5
- data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +15 -1
- data/vendor/rails/activerecord/test/aggregations_test.rb +34 -1
- data/vendor/rails/activerecord/test/all.sh +2 -2
- data/vendor/rails/activerecord/test/associations/callbacks_test.rb +51 -30
- data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +1 -29
- data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +145 -0
- data/vendor/rails/activerecord/test/associations/eager_test.rb +42 -6
- data/vendor/rails/activerecord/test/associations/extension_test.rb +6 -1
- data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +88 -0
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +66 -13
- data/vendor/rails/activerecord/test/associations_test.rb +531 -226
- data/vendor/rails/activerecord/test/attribute_methods_test.rb +97 -0
- data/vendor/rails/activerecord/test/base_test.rb +251 -105
- data/vendor/rails/activerecord/test/binary_test.rb +22 -27
- data/vendor/rails/activerecord/test/calculations_test.rb +37 -5
- data/vendor/rails/activerecord/test/callbacks_test.rb +23 -0
- data/vendor/rails/activerecord/test/connection_test_firebird.rb +2 -2
- data/vendor/rails/activerecord/test/connection_test_mysql.rb +30 -0
- data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +3 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +5 -14
- data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +5 -14
- data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +1 -1
- data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +69 -0
- data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +178 -27
- data/vendor/rails/activerecord/test/date_time_test.rb +37 -0
- data/vendor/rails/activerecord/test/defaults_test.rb +6 -14
- data/vendor/rails/activerecord/test/deprecated_finder_test.rb +7 -128
- data/vendor/rails/activerecord/test/finder_test.rb +201 -55
- data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/author.rb +14 -5
- data/vendor/rails/activerecord/test/fixtures/binaries.yml +130 -435
- data/vendor/rails/activerecord/test/fixtures/book.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/books.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/category.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/citation.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/company.rb +8 -1
- data/vendor/rails/activerecord/test/fixtures/computer.rb +1 -0
- data/vendor/rails/activerecord/test/fixtures/contact.rb +16 -0
- data/vendor/rails/activerecord/test/fixtures/customer.rb +2 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +3 -1
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +6 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +41 -25
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +7 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +87 -58
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +1 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +289 -8
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +11 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/developer.rb +10 -0
- data/vendor/rails/activerecord/test/fixtures/example.log +1 -0
- data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/fixtures/item.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/items.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/joke.rb +0 -3
- data/vendor/rails/activerecord/test/fixtures/matey.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/mateys.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/minimalistic.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/mixins.yml +2 -100
- data/vendor/rails/activerecord/test/fixtures/parrot.rb +13 -0
- data/vendor/rails/activerecord/test/fixtures/parrots.yml +27 -0
- data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/pirate.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/pirates.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/post.rb +1 -0
- data/vendor/rails/activerecord/test/fixtures/project.rb +3 -2
- data/vendor/rails/activerecord/test/fixtures/reply.rb +0 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +8 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/ship.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/ships.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/tagging.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +8 -1
- data/vendor/rails/activerecord/test/fixtures/topic.rb +13 -1
- data/vendor/rails/activerecord/test/fixtures/treasure.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/treasures.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures_test.rb +220 -23
- data/vendor/rails/activerecord/test/inheritance_test.rb +7 -1
- data/vendor/rails/activerecord/test/json_serialization_test.rb +180 -0
- data/vendor/rails/activerecord/test/lifecycle_test.rb +1 -1
- data/vendor/rails/activerecord/test/locking_test.rb +94 -2
- data/vendor/rails/activerecord/test/migration_test.rb +206 -40
- data/vendor/rails/activerecord/test/mixin_test.rb +13 -515
- data/vendor/rails/activerecord/test/pk_test.rb +3 -6
- data/vendor/rails/activerecord/test/query_cache_test.rb +104 -0
- data/vendor/rails/activerecord/test/readonly_test.rb +0 -0
- data/vendor/rails/activerecord/test/reflection_test.rb +16 -0
- data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +177 -0
- data/vendor/rails/activerecord/test/schema_dumper_test.rb +38 -3
- data/vendor/rails/activerecord/test/serialization_test.rb +47 -0
- data/vendor/rails/activerecord/test/transactions_test.rb +74 -23
- data/vendor/rails/activerecord/test/unconnected_test.rb +1 -1
- data/vendor/rails/activerecord/test/validations_test.rb +330 -32
- data/vendor/rails/activerecord/test/xml_serialization_test.rb +121 -44
- data/vendor/rails/activeresource/CHANGELOG +223 -0
- data/vendor/rails/activeresource/MIT-LICENSE +20 -0
- data/vendor/rails/activeresource/README +165 -0
- data/vendor/rails/activeresource/Rakefile +133 -0
- data/vendor/rails/activeresource/lib/active_resource.rb +47 -0
- data/vendor/rails/activeresource/lib/active_resource/base.rb +872 -0
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +172 -0
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +105 -0
- data/vendor/rails/activeresource/lib/active_resource/formats.rb +14 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +23 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +34 -0
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +147 -0
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +288 -0
- data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
- data/vendor/rails/activeresource/lib/activeresource.rb +1 -0
- data/vendor/rails/activeresource/test/abstract_unit.rb +10 -0
- data/vendor/rails/activeresource/test/authorization_test.rb +82 -0
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +96 -0
- data/vendor/rails/activeresource/test/base/equality_test.rb +43 -0
- data/vendor/rails/activeresource/test/base/load_test.rb +111 -0
- data/vendor/rails/activeresource/test/base_errors_test.rb +48 -0
- data/vendor/rails/activeresource/test/base_test.rb +454 -0
- data/vendor/rails/activeresource/test/connection_test.rb +170 -0
- data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
- data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
- data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
- data/vendor/rails/activeresource/test/format_test.rb +42 -0
- data/vendor/rails/activeresource/test/setter_trap.rb +27 -0
- data/vendor/rails/activesupport/CHANGELOG +274 -7
- data/vendor/rails/activesupport/MIT-LICENSE +1 -1
- data/vendor/rails/activesupport/Rakefile +2 -1
- data/vendor/rails/activesupport/install.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support.rb +9 -4
- data/vendor/rails/activesupport/lib/active_support/basic_object.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +107 -0
- data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +94 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext.rb +4 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +8 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +40 -18
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +20 -7
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +1 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +2 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +4 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +3 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +5 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +188 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +72 -13
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +77 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +37 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +5 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +91 -49
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +16 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +4 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +5 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +8 -7
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +17 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +30 -11
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +40 -29
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +29 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +7 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +11 -9
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +16 -8
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +11 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +12 -10
- data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +62 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +87 -54
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +71 -10
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +32 -31
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/duration.rb +96 -0
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +2 -1
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +13 -6
- data/vendor/rails/activesupport/lib/active_support/json.rb +22 -39
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +60 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +50 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +7 -5
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +14 -2
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +115 -5
- data/vendor/rails/activesupport/lib/active_support/option_merger.rb +7 -7
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +22 -17
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/testing.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/testing/default.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +8 -7
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/{builder.rb → builder-2.1.2/builder.rb} +0 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +3 -3
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +12 -12
- data/vendor/rails/activesupport/lib/activesupport.rb +1 -0
- data/vendor/rails/activesupport/test/abstract_unit.rb +13 -0
- data/vendor/rails/activesupport/test/buffered_logger_test.rb +107 -0
- data/vendor/rails/activesupport/test/clean_logger_test.rb +12 -35
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +74 -6
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +12 -4
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +16 -0
- data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +105 -0
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +10 -0
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +180 -4
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +230 -0
- data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +22 -0
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +21 -0
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +10 -10
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +29 -0
- data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +25 -0
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +262 -28
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +11 -11
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +7 -7
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +29 -2
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +92 -28
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +91 -1
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +98 -7
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +50 -0
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +40 -12
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +107 -22
- data/vendor/rails/activesupport/test/dependencies_test.rb +30 -31
- data/vendor/rails/activesupport/test/inflector_test.rb +49 -205
- data/vendor/rails/activesupport/test/inflector_test_cases.rb +208 -0
- data/vendor/rails/activesupport/test/json/decoding_test.rb +41 -0
- data/vendor/rails/activesupport/test/json/encoding_test.rb +111 -0
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +10 -1
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +2 -2
- data/vendor/rails/activesupport/test/multibyte_handler_test.rb +95 -2
- data/vendor/rails/activesupport/test/ordered_options_test.rb +5 -1
- data/vendor/rails/activesupport/test/test_test.rb +73 -0
- data/vendor/rails/activesupport/test/time_zone_test.rb +10 -3
- data/vendor/rails/cleanlogs.sh +0 -0
- data/vendor/rails/pushgems.rb +2 -2
- data/vendor/rails/railties/CHANGELOG +518 -9
- data/vendor/rails/railties/MIT-LICENSE +1 -1
- data/vendor/rails/railties/README +17 -25
- data/vendor/rails/railties/Rakefile +41 -18
- data/vendor/rails/railties/bin/about +1 -1
- data/vendor/rails/railties/bin/console +1 -1
- data/vendor/rails/railties/bin/destroy +1 -1
- data/vendor/rails/railties/bin/generate +1 -1
- data/vendor/rails/railties/bin/performance/request +3 -0
- data/vendor/rails/railties/bin/plugin +1 -1
- data/vendor/rails/railties/bin/rails +0 -0
- data/vendor/rails/railties/bin/runner +1 -1
- data/vendor/rails/railties/bin/server +1 -1
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +3 -3
- data/vendor/rails/railties/configs/apache.conf +1 -1
- data/vendor/rails/railties/configs/databases/mysql.yml +10 -4
- data/vendor/rails/railties/configs/databases/postgresql.yml +16 -12
- data/vendor/rails/railties/configs/databases/sqlite3.yml +1 -1
- data/vendor/rails/railties/configs/initializers/inflections.rb +10 -0
- data/vendor/rails/railties/configs/initializers/mime_types.rb +5 -0
- data/vendor/rails/railties/configs/routes.rb +23 -11
- data/vendor/rails/railties/dispatches/dispatch.fcgi +0 -0
- data/vendor/rails/railties/dispatches/dispatch.rb +0 -0
- data/vendor/rails/railties/doc/README_FOR_APP +1 -1
- data/vendor/rails/railties/environments/boot.rb +96 -26
- data/vendor/rails/railties/environments/development.rb +2 -5
- data/vendor/rails/railties/environments/environment.rb +24 -25
- data/vendor/rails/railties/environments/production.rb +1 -0
- data/vendor/rails/railties/environments/test.rb +4 -1
- data/vendor/rails/railties/fresh_rakefile +0 -0
- data/vendor/rails/railties/helpers/application.rb +5 -2
- data/vendor/rails/railties/helpers/test_helper.rb +10 -0
- data/vendor/rails/railties/html/422.html +30 -0
- data/vendor/rails/railties/html/500.html +1 -1
- data/vendor/rails/railties/html/index.html +2 -2
- data/vendor/rails/railties/html/javascripts/controls.js +484 -354
- data/vendor/rails/railties/html/javascripts/dragdrop.js +88 -58
- data/vendor/rails/railties/html/javascripts/effects.js +396 -364
- data/vendor/rails/railties/html/javascripts/prototype.js +2817 -1107
- data/vendor/rails/railties/html/robots.txt +5 -1
- data/vendor/rails/railties/lib/commands/console.rb +12 -5
- data/vendor/rails/railties/lib/commands/generate.rb +0 -0
- data/vendor/rails/railties/lib/commands/performance/request.rb +6 -0
- data/vendor/rails/railties/lib/commands/plugin.rb +17 -12
- data/vendor/rails/railties/lib/commands/process/spawner.rb +14 -4
- data/vendor/rails/railties/lib/commands/runner.rb +1 -1
- data/vendor/rails/railties/lib/commands/servers/base.rb +12 -0
- data/vendor/rails/railties/lib/commands/servers/mongrel.rb +5 -1
- data/vendor/rails/railties/lib/commands/servers/webrick.rb +14 -7
- data/vendor/rails/railties/lib/console_app.rb +5 -2
- data/vendor/rails/railties/lib/console_with_helpers.rb +5 -2
- data/vendor/rails/railties/lib/dispatcher.rb +3 -151
- data/vendor/rails/railties/lib/fcgi_handler.rb +79 -81
- data/vendor/rails/railties/lib/initializer.rb +125 -169
- data/vendor/rails/railties/lib/rails/plugin.rb +84 -0
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +150 -0
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +78 -0
- data/vendor/rails/railties/lib/rails/version.rb +3 -3
- data/vendor/rails/railties/lib/rails_generator/base.rb +11 -9
- data/vendor/rails/railties/lib/rails_generator/commands.rb +24 -14
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +0 -7
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +26 -7
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +11 -12
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +2 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +1 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/{view.rhtml → view.html.erb} +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +5 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +8 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +3 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +8 -24
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +23 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +15 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +6 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +15 -14
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +10 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +11 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +4 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +1 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +5 -7
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +8 -18
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +10 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +23 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +13 -15
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +2 -14
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +24 -31
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +45 -146
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +64 -37
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +23 -80
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/{layout.rhtml → layout.html.erb} +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +24 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +6 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +3 -3
- data/vendor/rails/railties/lib/rails_generator/lookup.rb +45 -10
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +6 -3
- data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +23 -0
- data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +160 -0
- data/vendor/rails/railties/lib/rails_generator/spec.rb +1 -1
- data/vendor/rails/railties/lib/source_annotation_extractor.rb +62 -0
- data/vendor/rails/railties/lib/tasks/annotations.rake +23 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +260 -84
- data/vendor/rails/railties/lib/tasks/documentation.rake +11 -13
- data/vendor/rails/railties/lib/tasks/framework.rake +14 -8
- data/vendor/rails/railties/lib/tasks/misc.rake +7 -1
- data/vendor/rails/railties/lib/tasks/rails.rb +1 -1
- data/vendor/rails/railties/lib/tasks/testing.rake +5 -7
- data/vendor/rails/railties/lib/test_help.rb +4 -3
- data/vendor/rails/railties/lib/webrick_server.rb +3 -4
- data/vendor/rails/railties/test/abstract_unit.rb +11 -7
- data/vendor/rails/railties/test/boot_test.rb +179 -0
- data/vendor/rails/railties/test/console_app_test.rb +29 -0
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +147 -176
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -1
- data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
- data/vendor/rails/railties/test/generators/generator_test_helper.rb +195 -0
- data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +109 -0
- data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +106 -0
- data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +185 -0
- data/vendor/rails/railties/test/initializer_test.rb +204 -19
- data/vendor/rails/railties/test/plugin_loader_test.rb +140 -0
- data/vendor/rails/railties/test/plugin_locator_test.rb +69 -0
- data/vendor/rails/railties/test/plugin_test.rb +130 -100
- data/vendor/rails/railties/test/plugin_test_helper.rb +29 -0
- data/vendor/rails/railties/test/rails_generator_test.rb +25 -15
- data/vendor/rails/railties/test/rails_info_test.rb +7 -0
- data/vendor/rails/railties/test/secret_key_generation_test.rb +35 -0
- data/vendor/rails/release.rb +4 -4
- metadata +1355 -486
- data/app/views/admin/extension/index.rhtml +0 -45
- data/app/views/admin/layout/edit.rhtml +0 -39
- data/app/views/admin/page/_meta_row.rhtml +0 -4
- data/app/views/admin/page/_tag_reference.rhtml +0 -4
- data/app/views/admin/page/edit.rhtml +0 -140
- data/app/views/admin/page/index.rhtml +0 -31
- data/app/views/admin/user/edit.rhtml +0 -54
- data/app/views/admin/user/preferences.rhtml +0 -29
- data/lib/console_utils.rb +0 -167
- data/lib/plugins/extension_patches/lib/view_paths_extension.rb +0 -23
- data/public/javascripts/admin.js +0 -89
- data/public/javascripts/sitemap.js +0 -131
- data/public/javascripts/tabcontrol.js +0 -125
- data/public/javascripts/tag_reference_search.js +0 -23
- data/test/functional/admin/abstract_model_controller_test.rb +0 -125
- data/test/functional/admin/export_controller_test.rb +0 -23
- data/test/functional/admin/extension_controller_test.rb +0 -41
- data/test/functional/admin/layout_controller_test.rb +0 -42
- data/test/functional/admin/page_controller_test.rb +0 -300
- data/test/functional/admin/snippet_controller_test.rb +0 -11
- data/test/functional/admin/user_controller_test.rb +0 -90
- data/test/functional/admin/welcome_controller_test.rb +0 -51
- data/test/functional/application_controller_test.rb +0 -45
- data/test/functional/extension_initialization_test.rb +0 -131
- data/test/functional/extension_load_order_test.rb +0 -49
- data/test/functional/login_system_test.rb +0 -138
- data/test/functional/site_controller_test.rb +0 -203
- data/test/unit/admin_ui_test.rb +0 -93
- data/test/unit/annotatable_test.rb +0 -76
- data/test/unit/extension_migrator_test.rb +0 -17
- data/test/unit/extension_test.rb +0 -42
- data/test/unit/file_not_found_page_test.rb +0 -31
- data/test/unit/inheritable_class_attributes_test.rb +0 -47
- data/test/unit/layout_test.rb +0 -29
- data/test/unit/local_time_test.rb +0 -45
- data/test/unit/method_observer_test.rb +0 -53
- data/test/unit/page_context_test.rb +0 -60
- data/test/unit/page_part_test.rb +0 -44
- data/test/unit/page_test.rb +0 -449
- data/test/unit/radiant/config_test.rb +0 -57
- data/test/unit/radiant/exporter_test.rb +0 -26
- data/test/unit/radiant/taggable_test.rb +0 -105
- data/test/unit/response_cache_test.rb +0 -233
- data/test/unit/simpleton_test.rb +0 -42
- data/test/unit/snippet_test.rb +0 -47
- data/test/unit/standard_tags_test.rb +0 -472
- data/test/unit/status_test.rb +0 -43
- data/test/unit/text_filter_test.rb +0 -42
- data/test/unit/user_action_observer_test.rb +0 -40
- data/test/unit/user_test.rb +0 -137
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +0 -3
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb +0 -242
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb +0 -39
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb +0 -71
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb +0 -69
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb +0 -467
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb +0 -914
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb +0 -447
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb +0 -433
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb +0 -280
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb +0 -135
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb +0 -1522
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb +0 -377
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +0 -131
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb +0 -41
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb +0 -263
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb +0 -277
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb +0 -238
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml +0 -1
- data/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb +0 -5
- data/vendor/rails/actionmailer/test/fixtures/raw_email11 +0 -34
- data/vendor/rails/actionpack/examples/address_book/index.rhtml +0 -33
- data/vendor/rails/actionpack/examples/address_book/layout.rhtml +0 -8
- data/vendor/rails/actionpack/examples/address_book_controller.cgi +0 -9
- data/vendor/rails/actionpack/examples/address_book_controller.fcgi +0 -6
- data/vendor/rails/actionpack/examples/address_book_controller.rb +0 -52
- data/vendor/rails/actionpack/examples/address_book_controller.rbx +0 -4
- data/vendor/rails/actionpack/examples/benchmark.rb +0 -52
- data/vendor/rails/actionpack/examples/benchmark_with_ar.fcgi +0 -89
- data/vendor/rails/actionpack/examples/blog_controller.cgi +0 -53
- data/vendor/rails/actionpack/examples/debate/index.rhtml +0 -14
- data/vendor/rails/actionpack/examples/debate/new_topic.rhtml +0 -22
- data/vendor/rails/actionpack/examples/debate/topic.rhtml +0 -32
- data/vendor/rails/actionpack/examples/debate_controller.cgi +0 -57
- data/vendor/rails/actionpack/lib/action_controller/assertions/deprecated_assertions.rb +0 -228
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext.rb +0 -36
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb +0 -211
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb +0 -125
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb +0 -30
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb +0 -95
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session_performance_fix.rb +0 -30
- data/vendor/rails/actionpack/lib/action_controller/deprecated_dependencies.rb +0 -65
- data/vendor/rails/actionpack/lib/action_controller/deprecated_redirects.rb +0 -17
- data/vendor/rails/actionpack/lib/action_controller/deprecated_request_methods.rb +0 -34
- data/vendor/rails/actionpack/lib/action_controller/macros/auto_complete.rb +0 -53
- data/vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb +0 -33
- data/vendor/rails/actionpack/lib/action_controller/pagination.rb +0 -408
- data/vendor/rails/actionpack/lib/action_controller/scaffolding.rb +0 -189
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml +0 -44
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml +0 -11
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.rhtml +0 -21
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml +0 -7
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml +0 -69
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/list.rhtml +0 -27
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/new.rhtml +0 -6
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/show.rhtml +0 -9
- data/vendor/rails/actionpack/lib/action_controller/vendor/xml_node.rb +0 -97
- data/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb +0 -37
- data/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb +0 -233
- data/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb +0 -86
- data/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb +0 -92
- data/vendor/rails/actionpack/test/activerecord/pagination_test.rb +0 -165
- data/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb +0 -48
- data/vendor/rails/actionpack/test/controller/raw_post_test.rb +0 -68
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.rhtml +0 -1
- data/vendor/rails/actionpack/test/fixtures/test/list.rhtml +0 -1
- data/vendor/rails/actionpack/test/template/deprecated_helper_test.rb +0 -36
- data/vendor/rails/actionpack/test/template/deprecated_instance_variables_test.rb +0 -43
- data/vendor/rails/actionpack/test/template/java_script_macros_helper_test.rb +0 -109
- data/vendor/rails/actionwebservice/CHANGELOG +0 -293
- data/vendor/rails/actionwebservice/MIT-LICENSE +0 -21
- data/vendor/rails/actionwebservice/README +0 -364
- data/vendor/rails/actionwebservice/Rakefile +0 -171
- data/vendor/rails/actionwebservice/TODO +0 -32
- data/vendor/rails/actionwebservice/examples/googlesearch/README +0 -143
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +0 -57
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +0 -108
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb +0 -7
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb +0 -58
- data/vendor/rails/actionwebservice/examples/metaWeblog/README +0 -17
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +0 -60
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +0 -34
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +0 -67
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +0 -48
- data/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +0 -16
- data/vendor/rails/actionwebservice/install.rb +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service.rb +0 -66
- data/vendor/rails/actionwebservice/lib/action_web_service/api.rb +0 -249
- data/vendor/rails/actionwebservice/lib/action_web_service/base.rb +0 -42
- data/vendor/rails/actionwebservice/lib/action_web_service/casting.rb +0 -136
- data/vendor/rails/actionwebservice/lib/action_web_service/client.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb +0 -28
- data/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb +0 -113
- data/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +0 -58
- data/vendor/rails/actionwebservice/lib/action_web_service/container.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb +0 -93
- data/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb +0 -86
- data/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb +0 -69
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb +0 -2
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +0 -203
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +0 -376
- data/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb +0 -202
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb +0 -4
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb +0 -112
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb +0 -37
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +0 -176
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +0 -241
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +0 -110
- data/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb +0 -283
- data/vendor/rails/actionwebservice/lib/action_web_service/struct.rb +0 -68
- data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +0 -26
- data/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb +0 -222
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml +0 -65
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -6
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -29
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb +0 -110
- data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +0 -9
- data/vendor/rails/actionwebservice/setup.rb +0 -1379
- data/vendor/rails/actionwebservice/test/abstract_client.rb +0 -183
- data/vendor/rails/actionwebservice/test/abstract_dispatcher.rb +0 -505
- data/vendor/rails/actionwebservice/test/abstract_unit.rb +0 -45
- data/vendor/rails/actionwebservice/test/api_test.rb +0 -102
- data/vendor/rails/actionwebservice/test/apis/auto_load_api.rb +0 -3
- data/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb +0 -2
- data/vendor/rails/actionwebservice/test/base_test.rb +0 -42
- data/vendor/rails/actionwebservice/test/casting_test.rb +0 -86
- data/vendor/rails/actionwebservice/test/client_soap_test.rb +0 -152
- data/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb +0 -151
- data/vendor/rails/actionwebservice/test/container_test.rb +0 -73
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb +0 -137
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +0 -59
- data/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql +0 -7
- data/vendor/rails/actionwebservice/test/fixtures/users.yml +0 -10
- data/vendor/rails/actionwebservice/test/gencov +0 -3
- data/vendor/rails/actionwebservice/test/invocation_test.rb +0 -185
- data/vendor/rails/actionwebservice/test/run +0 -6
- data/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb +0 -146
- data/vendor/rails/actionwebservice/test/struct_test.rb +0 -52
- data/vendor/rails/actionwebservice/test/test_invoke_test.rb +0 -112
- data/vendor/rails/activerecord/benchmarks/benchmark.rb +0 -26
- data/vendor/rails/activerecord/benchmarks/mysql_benchmark.rb +0 -19
- data/vendor/rails/activerecord/examples/associations.rb +0 -87
- data/vendor/rails/activerecord/examples/shared_setup.rb +0 -15
- data/vendor/rails/activerecord/examples/validation.rb +0 -85
- data/vendor/rails/activerecord/lib/active_record/acts/list.rb +0 -256
- data/vendor/rails/activerecord/lib/active_record/acts/nested_set.rb +0 -211
- data/vendor/rails/activerecord/lib/active_record/acts/tree.rb +0 -96
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/db2_adapter.rb +0 -228
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb +0 -728
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb +0 -861
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb +0 -350
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +0 -690
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +0 -607
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb +0 -662
- data/vendor/rails/activerecord/lib/active_record/deprecated_associations.rb +0 -104
- data/vendor/rails/activerecord/lib/active_record/deprecated_finders.rb +0 -44
- data/vendor/rails/activerecord/lib/active_record/vendor/simple.rb +0 -693
- data/vendor/rails/activerecord/lib/active_record/wrappers/yaml_wrapper.rb +0 -15
- data/vendor/rails/activerecord/lib/active_record/wrappings.rb +0 -58
- data/vendor/rails/activerecord/lib/active_record/xml_serialization.rb +0 -308
- data/vendor/rails/activerecord/test/connections/native_sqlserver/connection.rb +0 -23
- data/vendor/rails/activerecord/test/connections/native_sqlserver_odbc/connection.rb +0 -25
- data/vendor/rails/activerecord/test/copy_table_sqlite.rb +0 -64
- data/vendor/rails/activerecord/test/deprecated_associations_test.rb +0 -396
- data/vendor/rails/activerecord/test/empty_date_time_test.rb +0 -25
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.drop.sql +0 -32
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.sql +0 -234
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +0 -34
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.sql +0 -243
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql +0 -2
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.sql +0 -5
- data/vendor/rails/activerecord/test/fixtures/mixin.rb +0 -63
- data/vendor/rails/activerecord/test/mixin_nested_set_test.rb +0 -196
- data/vendor/rails/activesupport/lib/active_support/binding_of_caller.rb +0 -84
- data/vendor/rails/activesupport/lib/active_support/breakpoint.rb +0 -528
- data/vendor/rails/activesupport/lib/active_support/caching_tools.rb +0 -62
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/formatting.rb +0 -7
- data/vendor/rails/activesupport/lib/active_support/json/encoders.rb +0 -25
- data/vendor/rails/activesupport/lib/active_support/json/encoders/core.rb +0 -70
- data/vendor/rails/activesupport/lib/active_support/reloadable.rb +0 -60
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/blankslate.rb +0 -63
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xchar.rb +0 -112
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlbase.rb +0 -145
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlevents.rb +0 -63
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlmarkup.rb +0 -327
- data/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb +0 -1021
- data/vendor/rails/activesupport/test/caching_tools_test.rb +0 -79
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default.rb +0 -30
- data/vendor/rails/activesupport/test/json_test.rb +0 -97
- data/vendor/rails/activesupport/test/reloadable_test.rb +0 -123
- data/vendor/rails/railties/bin/breakpointer +0 -3
- data/vendor/rails/railties/lib/binding_of_caller.rb +0 -85
- data/vendor/rails/railties/lib/breakpoint.rb +0 -553
- data/vendor/rails/railties/lib/breakpoint_client.rb +0 -196
- data/vendor/rails/railties/lib/commands/breakpointer.rb +0 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/USAGE +0 -18
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/fixtures.yml +0 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/migration.rb +0 -13
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/model.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/unit_test.rb +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form.rhtml +0 -3
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form_scaffolding.rhtml +0 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +0 -9
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +0 -27
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/USAGE +0 -29
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +0 -93
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +0 -79
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +0 -11
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +0 -57
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +0 -17
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +0 -13
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +0 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +0 -74
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +0 -19
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml +0 -24
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml +0 -18
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +0 -10
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/USAGE +0 -28
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/api_definition.rb +0 -5
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/controller.rb +0 -8
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/functional_test.rb +0 -19
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/web_service_generator.rb +0 -29
- data/vendor/rails/railties/lib/tasks/pre_namespace_aliases.rake +0 -53
- data/vendor/rails/railties/test/dispatcher_test.rb +0 -141
- data/vendor/rails/railties/test/mocks/dispatcher.rb +0 -13
- data/vendor/rails/railties/test/mocks/fcgi.rb +0 -15
- data/vendor/rails/railties/test/mocks/stubbed_breakpoint.rb +0 -2
- data/vendor/rails/railties/test/mocks/stubbed_kernel.rb +0 -5
@@ -7,10 +7,15 @@ require 'fixtures/reply'
|
|
7
7
|
require 'fixtures/computer'
|
8
8
|
require 'fixtures/customer'
|
9
9
|
require 'fixtures/order'
|
10
|
+
require 'fixtures/categorization'
|
10
11
|
require 'fixtures/category'
|
11
12
|
require 'fixtures/post'
|
12
13
|
require 'fixtures/author'
|
13
|
-
|
14
|
+
require 'fixtures/comment'
|
15
|
+
require 'fixtures/tag'
|
16
|
+
require 'fixtures/tagging'
|
17
|
+
require 'fixtures/person'
|
18
|
+
require 'fixtures/reader'
|
14
19
|
|
15
20
|
class AssociationsTest < Test::Unit::TestCase
|
16
21
|
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
|
@@ -21,24 +26,26 @@ class AssociationsTest < Test::Unit::TestCase
|
|
21
26
|
Class.new(ActiveRecord::Base).has_many(:wheels, :name => 'wheels')
|
22
27
|
end
|
23
28
|
end
|
29
|
+
|
30
|
+
def test_should_construct_new_finder_sql_after_create
|
31
|
+
person = Person.new
|
32
|
+
assert_equal [], person.readers.find(:all)
|
33
|
+
person.save!
|
34
|
+
reader = Reader.create! :person => person, :post => Post.new(:title => "foo", :body => "bar")
|
35
|
+
assert_equal [reader], person.readers.find(:all)
|
36
|
+
end
|
24
37
|
|
25
38
|
def test_force_reload
|
26
39
|
firm = Firm.new("name" => "A New Firm, Inc")
|
27
40
|
firm.save
|
28
41
|
firm.clients.each {|c|} # forcing to load all clients
|
29
42
|
assert firm.clients.empty?, "New firm shouldn't have client objects"
|
30
|
-
assert_deprecated do
|
31
|
-
assert !firm.has_clients?, "New firm shouldn't have clients"
|
32
|
-
end
|
33
43
|
assert_equal 0, firm.clients.size, "New firm should have 0 clients"
|
34
44
|
|
35
45
|
client = Client.new("name" => "TheClient.com", "firm_id" => firm.id)
|
36
46
|
client.save
|
37
47
|
|
38
48
|
assert firm.clients.empty?, "New firm should have cached no client objects"
|
39
|
-
assert_deprecated do
|
40
|
-
assert !firm.has_clients?, "New firm should have cached a no-clients response"
|
41
|
-
end
|
42
49
|
assert_equal 0, firm.clients.size, "New firm should have cached 0 clients count"
|
43
50
|
|
44
51
|
assert !firm.clients(true).empty?, "New firm should have reloaded client objects"
|
@@ -48,7 +55,7 @@ class AssociationsTest < Test::Unit::TestCase
|
|
48
55
|
def test_storing_in_pstore
|
49
56
|
require "tmpdir"
|
50
57
|
store_filename = File.join(Dir.tmpdir, "ar-pstore-association-test")
|
51
|
-
File.delete(store_filename) if File.
|
58
|
+
File.delete(store_filename) if File.exist?(store_filename)
|
52
59
|
require "pstore"
|
53
60
|
apple = Firm.create("name" => "Apple")
|
54
61
|
natural = Client.new("name" => "Natural Company")
|
@@ -67,7 +74,7 @@ class AssociationsTest < Test::Unit::TestCase
|
|
67
74
|
end
|
68
75
|
|
69
76
|
class AssociationProxyTest < Test::Unit::TestCase
|
70
|
-
fixtures :authors, :posts, :developers, :projects, :developers_projects
|
77
|
+
fixtures :authors, :posts, :categorizations, :categories, :developers, :projects, :developers_projects
|
71
78
|
|
72
79
|
def test_proxy_accessors
|
73
80
|
welcome = posts(:welcome)
|
@@ -81,13 +88,28 @@ class AssociationProxyTest < Test::Unit::TestCase
|
|
81
88
|
assert_equal david.class.reflect_on_association(:posts), david.posts.proxy_reflection
|
82
89
|
david.posts.first # force load target
|
83
90
|
assert_equal david.posts, david.posts.proxy_target
|
84
|
-
|
91
|
+
|
85
92
|
assert_equal david, david.posts_with_extension.testing_proxy_owner
|
86
93
|
assert_equal david.class.reflect_on_association(:posts_with_extension), david.posts_with_extension.testing_proxy_reflection
|
87
94
|
david.posts_with_extension.first # force load target
|
88
95
|
assert_equal david.posts_with_extension, david.posts_with_extension.testing_proxy_target
|
89
96
|
end
|
90
97
|
|
98
|
+
def test_push_does_not_load_target
|
99
|
+
david = authors(:david)
|
100
|
+
|
101
|
+
david.categories << categories(:technology)
|
102
|
+
assert !david.categories.loaded?
|
103
|
+
assert david.categories.include?(categories(:technology))
|
104
|
+
end
|
105
|
+
|
106
|
+
def test_push_does_not_lose_additions_to_new_record
|
107
|
+
josh = Author.new(:name => "Josh")
|
108
|
+
josh.posts << Post.new(:title => "New on Edge", :body => "More cool stuff!")
|
109
|
+
assert josh.posts.loaded?
|
110
|
+
assert_equal 1, josh.posts.size
|
111
|
+
end
|
112
|
+
|
91
113
|
def test_save_on_parent_does_not_load_target
|
92
114
|
david = developers(:david)
|
93
115
|
|
@@ -100,15 +122,39 @@ class AssociationProxyTest < Test::Unit::TestCase
|
|
100
122
|
developer = Developer.create :name => "Bryan", :salary => 50_000
|
101
123
|
assert_equal 1, developer.reload.audit_logs.size
|
102
124
|
end
|
125
|
+
|
126
|
+
def test_failed_reload_returns_nil
|
127
|
+
p = setup_dangling_association
|
128
|
+
assert_nil p.author.reload
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_failed_reset_returns_nil
|
132
|
+
p = setup_dangling_association
|
133
|
+
assert_nil p.author.reset
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_reload_returns_assocition
|
137
|
+
david = developers(:david)
|
138
|
+
assert_nothing_raised do
|
139
|
+
assert_equal david.projects, david.projects.reload.reload
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
def setup_dangling_association
|
144
|
+
josh = Author.create(:name => "Josh")
|
145
|
+
p = Post.create(:title => "New on Edge", :body => "More cool stuff!", :author => josh)
|
146
|
+
josh.destroy
|
147
|
+
p
|
148
|
+
end
|
103
149
|
end
|
104
150
|
|
105
151
|
class HasOneAssociationsTest < Test::Unit::TestCase
|
106
152
|
fixtures :accounts, :companies, :developers, :projects, :developers_projects
|
107
|
-
|
153
|
+
|
108
154
|
def setup
|
109
155
|
Account.destroyed_account_ids.clear
|
110
156
|
end
|
111
|
-
|
157
|
+
|
112
158
|
def test_has_one
|
113
159
|
assert_equal companies(:first_firm).account, Account.find(1)
|
114
160
|
assert_equal Account.find(1).credit_limit, companies(:first_firm).account.credit_limit
|
@@ -156,22 +202,22 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
156
202
|
apple.account = citibank
|
157
203
|
assert_equal apple.id, citibank.firm_id
|
158
204
|
end
|
159
|
-
|
205
|
+
|
160
206
|
def test_natural_assignment_to_nil
|
161
207
|
old_account_id = companies(:first_firm).account.id
|
162
208
|
companies(:first_firm).account = nil
|
163
209
|
companies(:first_firm).save
|
164
210
|
assert_nil companies(:first_firm).account
|
165
211
|
# account is dependent, therefore is destroyed when reference to owner is lost
|
166
|
-
assert_raises(ActiveRecord::RecordNotFound) { Account.find(old_account_id) }
|
212
|
+
assert_raises(ActiveRecord::RecordNotFound) { Account.find(old_account_id) }
|
167
213
|
end
|
168
|
-
|
214
|
+
|
169
215
|
def test_assignment_without_replacement
|
170
216
|
apple = Firm.create("name" => "Apple")
|
171
217
|
citibank = Account.create("credit_limit" => 10)
|
172
218
|
apple.account = citibank
|
173
219
|
assert_equal apple.id, citibank.firm_id
|
174
|
-
|
220
|
+
|
175
221
|
hsbc = apple.build_account({ :credit_limit => 20}, false)
|
176
222
|
assert_equal apple.id, hsbc.firm_id
|
177
223
|
hsbc.save
|
@@ -188,7 +234,7 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
188
234
|
citibank = Account.create("credit_limit" => 10)
|
189
235
|
apple.account = citibank
|
190
236
|
assert_equal apple.id, citibank.firm_id
|
191
|
-
|
237
|
+
|
192
238
|
hsbc = apple.create_account({:credit_limit => 10}, false)
|
193
239
|
assert_equal apple.id, hsbc.firm_id
|
194
240
|
hsbc.save
|
@@ -208,12 +254,6 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
208
254
|
assert_equal [account_id], Account.destroyed_account_ids[firm.id]
|
209
255
|
end
|
210
256
|
|
211
|
-
def test_deprecated_exclusive_dependence
|
212
|
-
assert_deprecated(/:exclusively_dependent.*:dependent => :delete_all/) do
|
213
|
-
Firm.has_many :deprecated_exclusively_dependent_clients, :class_name => 'Client', :exclusively_dependent => true
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
257
|
def test_exclusive_dependence
|
218
258
|
num_accounts = Account.count
|
219
259
|
|
@@ -261,9 +301,9 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
261
301
|
end
|
262
302
|
|
263
303
|
def test_create_association
|
264
|
-
firm = Firm.
|
265
|
-
firm.
|
266
|
-
assert_equal
|
304
|
+
firm = Firm.create(:name => "GlobalMegaCorp")
|
305
|
+
account = firm.create_account(:credit_limit => 1000)
|
306
|
+
assert_equal account, firm.reload.account
|
267
307
|
end
|
268
308
|
|
269
309
|
def test_build
|
@@ -301,7 +341,7 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
301
341
|
def test_failing_build_association
|
302
342
|
firm = Firm.new("name" => "GlobalMegaCorp")
|
303
343
|
firm.save
|
304
|
-
|
344
|
+
|
305
345
|
firm.account = account = Account.new
|
306
346
|
assert_equal account, firm.account
|
307
347
|
assert !account.save
|
@@ -329,6 +369,13 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
329
369
|
firm.destroy
|
330
370
|
end
|
331
371
|
|
372
|
+
def test_dependence_with_missing_association_and_nullify
|
373
|
+
Account.destroy_all
|
374
|
+
firm = DependentFirm.find(:first)
|
375
|
+
assert firm.account.nil?
|
376
|
+
firm.destroy
|
377
|
+
end
|
378
|
+
|
332
379
|
def test_assignment_before_parent_saved
|
333
380
|
firm = Firm.new("name" => "GlobalMegaCorp")
|
334
381
|
firm.account = a = Account.find(1)
|
@@ -385,21 +432,14 @@ class HasOneAssociationsTest < Test::Unit::TestCase
|
|
385
432
|
firm.account = Account.find(:first).clone
|
386
433
|
assert_queries(2) { firm.save! }
|
387
434
|
end
|
388
|
-
|
435
|
+
|
389
436
|
def test_save_still_works_after_accessing_nil_has_one
|
390
437
|
jp = Company.new :name => 'Jaded Pixel'
|
391
438
|
jp.dummy_account.nil?
|
392
|
-
|
439
|
+
|
393
440
|
assert_nothing_raised do
|
394
441
|
jp.save!
|
395
|
-
end
|
396
|
-
end
|
397
|
-
|
398
|
-
def test_deprecated_inferred_foreign_key
|
399
|
-
assert_not_deprecated { Company.belongs_to :firm }
|
400
|
-
assert_not_deprecated { Company.belongs_to :client, :foreign_key => "firm_id" }
|
401
|
-
assert_not_deprecated { Company.belongs_to :firm, :class_name => "Firm", :foreign_key => "client_of" }
|
402
|
-
assert_deprecated("inferred foreign_key name") { Company.belongs_to :client, :class_name => "Firm" }
|
442
|
+
end
|
403
443
|
end
|
404
444
|
|
405
445
|
end
|
@@ -407,7 +447,7 @@ end
|
|
407
447
|
|
408
448
|
class HasManyAssociationsTest < Test::Unit::TestCase
|
409
449
|
fixtures :accounts, :companies, :developers, :projects,
|
410
|
-
:developers_projects, :topics
|
450
|
+
:developers_projects, :topics, :authors, :comments
|
411
451
|
|
412
452
|
def setup
|
413
453
|
Client.destroyed_client_ids.clear
|
@@ -426,9 +466,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
426
466
|
end
|
427
467
|
|
428
468
|
def test_counting_with_single_conditions
|
429
|
-
|
430
|
-
assert_equal 2, Firm.find(:first).plain_clients.count('1=1')
|
431
|
-
end
|
469
|
+
assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
|
432
470
|
end
|
433
471
|
|
434
472
|
def test_counting_with_single_hash
|
@@ -449,6 +487,36 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
449
487
|
assert_equal 2, companies(:first_firm).limited_clients.find(:all, :limit => nil).size
|
450
488
|
end
|
451
489
|
|
490
|
+
def test_dynamic_find_should_respect_association_order
|
491
|
+
assert_equal companies(:second_client), companies(:first_firm).clients_sorted_desc.find(:first, :conditions => "type = 'Client'")
|
492
|
+
assert_equal companies(:second_client), companies(:first_firm).clients_sorted_desc.find_by_type('Client')
|
493
|
+
end
|
494
|
+
|
495
|
+
def test_dynamic_find_order_should_override_association_order
|
496
|
+
assert_equal companies(:first_client), companies(:first_firm).clients_sorted_desc.find(:first, :conditions => "type = 'Client'", :order => 'id')
|
497
|
+
assert_equal companies(:first_client), companies(:first_firm).clients_sorted_desc.find_by_type('Client', :order => 'id')
|
498
|
+
end
|
499
|
+
|
500
|
+
def test_dynamic_find_all_should_respect_association_order
|
501
|
+
assert_equal [companies(:second_client), companies(:first_client)], companies(:first_firm).clients_sorted_desc.find(:all, :conditions => "type = 'Client'")
|
502
|
+
assert_equal [companies(:second_client), companies(:first_client)], companies(:first_firm).clients_sorted_desc.find_all_by_type('Client')
|
503
|
+
end
|
504
|
+
|
505
|
+
def test_dynamic_find_all_order_should_override_association_order
|
506
|
+
assert_equal [companies(:first_client), companies(:second_client)], companies(:first_firm).clients_sorted_desc.find(:all, :conditions => "type = 'Client'", :order => 'id')
|
507
|
+
assert_equal [companies(:first_client), companies(:second_client)], companies(:first_firm).clients_sorted_desc.find_all_by_type('Client', :order => 'id')
|
508
|
+
end
|
509
|
+
|
510
|
+
def test_dynamic_find_all_should_respect_association_limit
|
511
|
+
assert_equal 1, companies(:first_firm).limited_clients.find(:all, :conditions => "type = 'Client'").length
|
512
|
+
assert_equal 1, companies(:first_firm).limited_clients.find_all_by_type('Client').length
|
513
|
+
end
|
514
|
+
|
515
|
+
def test_dynamic_find_all_limit_should_override_association_limit
|
516
|
+
assert_equal 2, companies(:first_firm).limited_clients.find(:all, :conditions => "type = 'Client'", :limit => 9_000).length
|
517
|
+
assert_equal 2, companies(:first_firm).limited_clients.find_all_by_type('Client', :limit => 9_000).length
|
518
|
+
end
|
519
|
+
|
452
520
|
def test_triple_equality
|
453
521
|
assert !(Array === Firm.find(:first).clients)
|
454
522
|
assert Firm.find(:first).clients === Array
|
@@ -485,13 +553,15 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
485
553
|
|
486
554
|
def test_counting_using_sql
|
487
555
|
assert_equal 1, Firm.find(:first).clients_using_counter_sql.size
|
556
|
+
assert Firm.find(:first).clients_using_counter_sql.any?
|
488
557
|
assert_equal 0, Firm.find(:first).clients_using_zero_counter_sql.size
|
558
|
+
assert !Firm.find(:first).clients_using_zero_counter_sql.any?
|
489
559
|
end
|
490
560
|
|
491
561
|
def test_counting_non_existant_items_using_sql
|
492
562
|
assert_equal 0, Firm.find(:first).no_clients_using_counter_sql.size
|
493
563
|
end
|
494
|
-
|
564
|
+
|
495
565
|
def test_belongs_to_sanity
|
496
566
|
c = Client.new
|
497
567
|
assert_nil c.firm
|
@@ -526,45 +596,47 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
526
596
|
assert_raises(ActiveRecord::RecordNotFound) { firm.clients.find(2, 99) }
|
527
597
|
end
|
528
598
|
|
599
|
+
def test_find_string_ids_when_using_finder_sql
|
600
|
+
firm = Firm.find(:first)
|
601
|
+
|
602
|
+
client = firm.clients_using_finder_sql.find("2")
|
603
|
+
assert_kind_of Client, client
|
604
|
+
|
605
|
+
client_ary = firm.clients_using_finder_sql.find(["2"])
|
606
|
+
assert_kind_of Array, client_ary
|
607
|
+
assert_equal client, client_ary.first
|
608
|
+
|
609
|
+
client_ary = firm.clients_using_finder_sql.find("2", "3")
|
610
|
+
assert_kind_of Array, client_ary
|
611
|
+
assert_equal 2, client_ary.size
|
612
|
+
assert client_ary.include?(client)
|
613
|
+
end
|
614
|
+
|
529
615
|
def test_find_all
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
assert_equal 2, firm.clients.find(:all, :conditions => "#{QUOTED_TYPE} = 'Client'").length
|
534
|
-
assert_equal 1, firm.clients.find(:all, :conditions => "name = 'Summit'").length
|
535
|
-
end
|
616
|
+
firm = Firm.find(:first)
|
617
|
+
assert_equal 2, firm.clients.find(:all, :conditions => "#{QUOTED_TYPE} = 'Client'").length
|
618
|
+
assert_equal 1, firm.clients.find(:all, :conditions => "name = 'Summit'").length
|
536
619
|
end
|
537
620
|
|
538
621
|
def test_find_all_sanitized
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
assert_equal summit, firm.clients.find(:all, :conditions => ["name = ?", "Summit"])
|
544
|
-
assert_equal summit, firm.clients.find(:all, :conditions => ["name = :name", { :name => "Summit" }])
|
545
|
-
end
|
622
|
+
firm = Firm.find(:first)
|
623
|
+
summit = firm.clients.find(:all, :conditions => "name = 'Summit'")
|
624
|
+
assert_equal summit, firm.clients.find(:all, :conditions => ["name = ?", "Summit"])
|
625
|
+
assert_equal summit, firm.clients.find(:all, :conditions => ["name = :name", { :name => "Summit" }])
|
546
626
|
end
|
547
627
|
|
548
628
|
def test_find_first
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
assert_equal client2, firm.clients.find_first("#{QUOTED_TYPE} = 'Client'")
|
554
|
-
assert_equal client2, firm.clients.find(:first, :conditions => "#{QUOTED_TYPE} = 'Client'")
|
555
|
-
end
|
629
|
+
firm = Firm.find(:first)
|
630
|
+
client2 = Client.find(2)
|
631
|
+
assert_equal firm.clients.first, firm.clients.find(:first)
|
632
|
+
assert_equal client2, firm.clients.find(:first, :conditions => "#{QUOTED_TYPE} = 'Client'")
|
556
633
|
end
|
557
634
|
|
558
635
|
def test_find_first_sanitized
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
assert_equal client2, firm.clients.find_first(["#{QUOTED_TYPE} = ?", "Client"])
|
564
|
-
end
|
565
|
-
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = ?", 'Client'])
|
566
|
-
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = :type", { :type => 'Client' }])
|
567
|
-
end
|
636
|
+
firm = Firm.find(:first)
|
637
|
+
client2 = Client.find(2)
|
638
|
+
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = ?", 'Client'])
|
639
|
+
assert_equal client2, firm.clients.find(:first, :conditions => ["#{QUOTED_TYPE} = :type", { :type => 'Client' }])
|
568
640
|
end
|
569
641
|
|
570
642
|
def test_find_in_collection
|
@@ -596,19 +668,39 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
596
668
|
assert_equal 3, first_firm.plain_clients.size
|
597
669
|
end
|
598
670
|
|
671
|
+
def test_create_with_bang_on_has_many_when_parent_is_new_raises
|
672
|
+
assert_raises(ActiveRecord::RecordNotSaved) do
|
673
|
+
firm = Firm.new
|
674
|
+
firm.plain_clients.create! :name=>"Whoever"
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
599
678
|
def test_regular_create_on_has_many_when_parent_is_new_raises
|
600
|
-
|
679
|
+
assert_raises(ActiveRecord::RecordNotSaved) do
|
601
680
|
firm = Firm.new
|
602
681
|
firm.plain_clients.create :name=>"Whoever"
|
603
682
|
end
|
604
683
|
end
|
684
|
+
|
685
|
+
def test_create_with_bang_on_has_many_raises_when_record_not_saved
|
686
|
+
assert_raises(ActiveRecord::RecordInvalid) do
|
687
|
+
firm = Firm.find(:first)
|
688
|
+
firm.plain_clients.create!
|
689
|
+
end
|
690
|
+
end
|
691
|
+
|
692
|
+
def test_create_with_bang_on_habtm_when_parent_is_new_raises
|
693
|
+
assert_raises(ActiveRecord::RecordNotSaved) do
|
694
|
+
Developer.new("name" => "Aredridel").projects.create!
|
695
|
+
end
|
696
|
+
end
|
605
697
|
|
606
698
|
def test_adding_a_mismatch_class
|
607
699
|
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << nil }
|
608
700
|
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << 1 }
|
609
701
|
assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm << Topic.find(1) }
|
610
702
|
end
|
611
|
-
|
703
|
+
|
612
704
|
def test_adding_a_collection
|
613
705
|
force_signal37_to_load_all_clients_of_firm
|
614
706
|
companies(:first_firm).clients_of_firm.concat([Client.new("name" => "Natural Company"), Client.new("name" => "Apple")])
|
@@ -619,12 +711,15 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
619
711
|
def test_adding_before_save
|
620
712
|
no_of_firms = Firm.count
|
621
713
|
no_of_clients = Client.count
|
714
|
+
|
622
715
|
new_firm = Firm.new("name" => "A New Firm, Inc")
|
716
|
+
c = Client.new("name" => "Apple")
|
717
|
+
|
623
718
|
new_firm.clients_of_firm.push Client.new("name" => "Natural Company")
|
624
|
-
new_firm.clients_of_firm
|
625
|
-
|
626
|
-
assert c.new_record?
|
719
|
+
assert_equal 1, new_firm.clients_of_firm.size
|
720
|
+
new_firm.clients_of_firm << c
|
627
721
|
assert_equal 2, new_firm.clients_of_firm.size
|
722
|
+
|
628
723
|
assert_equal no_of_firms, Firm.count # Firm was not saved to database.
|
629
724
|
assert_equal no_of_clients, Client.count # Clients were not saved to database.
|
630
725
|
assert new_firm.save
|
@@ -633,6 +728,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
633
728
|
assert_equal new_firm, c.firm
|
634
729
|
assert_equal no_of_firms+1, Firm.count # Firm was saved to database.
|
635
730
|
assert_equal no_of_clients+2, Client.count # Clients were saved to database.
|
731
|
+
|
636
732
|
assert_equal 2, new_firm.clients_of_firm.size
|
637
733
|
assert_equal 2, new_firm.clients_of_firm(true).size
|
638
734
|
end
|
@@ -682,7 +778,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
682
778
|
Reply.column_names
|
683
779
|
|
684
780
|
assert_equal 1, first_topic.replies.length
|
685
|
-
|
781
|
+
|
686
782
|
assert_no_queries do
|
687
783
|
first_topic.replies.build(:title => "Not saved", :content => "Superstars")
|
688
784
|
assert_equal 2, first_topic.replies.size
|
@@ -698,11 +794,11 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
698
794
|
|
699
795
|
assert_equal 1, first_firm.clients_of_firm.size
|
700
796
|
first_firm.clients_of_firm.reset
|
701
|
-
|
797
|
+
|
702
798
|
assert_queries(1) do
|
703
799
|
first_firm.clients_of_firm.create(:name => "Superstars")
|
704
800
|
end
|
705
|
-
|
801
|
+
|
706
802
|
assert_equal 2, first_firm.clients_of_firm.size
|
707
803
|
end
|
708
804
|
|
@@ -715,7 +811,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
715
811
|
assert new_client.new_record?
|
716
812
|
assert_equal 1, companies(:first_firm).clients_of_firm(true).size
|
717
813
|
end
|
718
|
-
|
814
|
+
|
719
815
|
def test_create
|
720
816
|
force_signal37_to_load_all_clients_of_firm
|
721
817
|
new_client = companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
@@ -723,18 +819,25 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
723
819
|
assert_equal new_client, companies(:first_firm).clients_of_firm.last
|
724
820
|
assert_equal new_client, companies(:first_firm).clients_of_firm(true).last
|
725
821
|
end
|
726
|
-
|
822
|
+
|
727
823
|
def test_create_many
|
728
824
|
companies(:first_firm).clients_of_firm.create([{"name" => "Another Client"}, {"name" => "Another Client II"}])
|
729
825
|
assert_equal 3, companies(:first_firm).clients_of_firm(true).size
|
730
826
|
end
|
731
827
|
|
828
|
+
def test_find_or_initialize
|
829
|
+
the_client = companies(:first_firm).clients.find_or_initialize_by_name("Yet another client")
|
830
|
+
assert_equal companies(:first_firm).id, the_client.firm_id
|
831
|
+
assert_equal "Yet another client", the_client.name
|
832
|
+
assert the_client.new_record?
|
833
|
+
end
|
834
|
+
|
732
835
|
def test_find_or_create
|
733
836
|
number_of_clients = companies(:first_firm).clients.size
|
734
837
|
the_client = companies(:first_firm).clients.find_or_create_by_name("Yet another client")
|
735
|
-
assert_equal number_of_clients + 1, companies(:first_firm, :
|
838
|
+
assert_equal number_of_clients + 1, companies(:first_firm, :reload).clients.size
|
736
839
|
assert_equal the_client, companies(:first_firm).clients.find_or_create_by_name("Yet another client")
|
737
|
-
assert_equal number_of_clients + 1, companies(:first_firm, :
|
840
|
+
assert_equal number_of_clients + 1, companies(:first_firm, :reload).clients.size
|
738
841
|
end
|
739
842
|
|
740
843
|
def test_deleting
|
@@ -760,7 +863,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
760
863
|
assert_equal 0, companies(:first_firm).clients_of_firm.size
|
761
864
|
assert_equal 0, companies(:first_firm).clients_of_firm(true).size
|
762
865
|
end
|
763
|
-
|
866
|
+
|
764
867
|
def test_delete_all
|
765
868
|
force_signal37_to_load_all_clients_of_firm
|
766
869
|
companies(:first_firm).clients_of_firm.create("name" => "Another Client")
|
@@ -826,11 +929,36 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
826
929
|
|
827
930
|
assert_equal 0, firm.exclusively_dependent_clients_of_firm.size
|
828
931
|
assert_equal 0, firm.exclusively_dependent_clients_of_firm(true).size
|
829
|
-
|
932
|
+
# no destroy-filters should have been called
|
933
|
+
assert_equal [], Client.destroyed_client_ids[firm.id]
|
830
934
|
|
831
935
|
# Should be destroyed since the association is exclusively dependent.
|
832
936
|
assert Client.find_by_id(client_id).nil?
|
833
|
-
end
|
937
|
+
end
|
938
|
+
|
939
|
+
def test_dependent_association_respects_optional_conditions_on_delete
|
940
|
+
firm = companies(:odegy)
|
941
|
+
Client.create(:client_of => firm.id, :name => "BigShot Inc.")
|
942
|
+
Client.create(:client_of => firm.id, :name => "SmallTime Inc.")
|
943
|
+
# only one of two clients is included in the association due to the :conditions key
|
944
|
+
assert_equal 2, Client.find_all_by_client_of(firm.id).size
|
945
|
+
assert_equal 1, firm.dependent_conditional_clients_of_firm.size
|
946
|
+
firm.destroy
|
947
|
+
# only the correctly associated client should have been deleted
|
948
|
+
assert_equal 1, Client.find_all_by_client_of(firm.id).size
|
949
|
+
end
|
950
|
+
|
951
|
+
def test_dependent_association_respects_optional_sanitized_conditions_on_delete
|
952
|
+
firm = companies(:odegy)
|
953
|
+
Client.create(:client_of => firm.id, :name => "BigShot Inc.")
|
954
|
+
Client.create(:client_of => firm.id, :name => "SmallTime Inc.")
|
955
|
+
# only one of two clients is included in the association due to the :conditions key
|
956
|
+
assert_equal 2, Client.find_all_by_client_of(firm.id).size
|
957
|
+
assert_equal 1, firm.dependent_sanitized_conditional_clients_of_firm.size
|
958
|
+
firm.destroy
|
959
|
+
# only the correctly associated client should have been deleted
|
960
|
+
assert_equal 1, Client.find_all_by_client_of(firm.id).size
|
961
|
+
end
|
834
962
|
|
835
963
|
def test_clearing_without_initial_access
|
836
964
|
firm = companies(:first_firm)
|
@@ -893,7 +1021,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
893
1021
|
topic = Topic.create "title" => "neat and simple"
|
894
1022
|
reply = topic.replies.create "title" => "neat and simple", "content" => "still digging it"
|
895
1023
|
silly_reply = reply.replies.create "title" => "neat and simple", "content" => "ain't complaining"
|
896
|
-
|
1024
|
+
|
897
1025
|
assert_nothing_raised { topic.destroy }
|
898
1026
|
end
|
899
1027
|
|
@@ -918,16 +1046,16 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
918
1046
|
def test_depends_and_nullify
|
919
1047
|
num_accounts = Account.count
|
920
1048
|
num_companies = Company.count
|
921
|
-
|
1049
|
+
|
922
1050
|
core = companies(:rails_core)
|
923
1051
|
assert_equal accounts(:rails_core_account), core.account
|
924
|
-
assert_equal
|
925
|
-
core.destroy
|
1052
|
+
assert_equal companies(:leetsoft, :jadedpixel), core.companies
|
1053
|
+
core.destroy
|
926
1054
|
assert_nil accounts(:rails_core_account).reload.firm_id
|
927
1055
|
assert_nil companies(:leetsoft).reload.client_of
|
928
1056
|
assert_nil companies(:jadedpixel).reload.client_of
|
929
|
-
|
930
|
-
|
1057
|
+
|
1058
|
+
|
931
1059
|
assert_equal num_accounts, Account.count
|
932
1060
|
end
|
933
1061
|
|
@@ -950,19 +1078,23 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
950
1078
|
assert firm.save, "Could not save firm"
|
951
1079
|
firm.reload
|
952
1080
|
assert_equal 1, firm.clients.length
|
953
|
-
end
|
954
|
-
|
955
|
-
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
def test_replace_with_less_and_dependent_nullify
|
1084
|
+
num_companies = Company.count
|
1085
|
+
companies(:rails_core).companies = []
|
1086
|
+
assert_equal num_companies, Company.count
|
1087
|
+
end
|
1088
|
+
|
956
1089
|
def test_replace_with_new
|
957
1090
|
firm = Firm.find(:first)
|
958
|
-
|
959
|
-
firm.clients = [companies(:second_client),new_client]
|
1091
|
+
firm.clients = [companies(:second_client), Client.new("name" => "New Client")]
|
960
1092
|
firm.save
|
961
1093
|
firm.reload
|
962
1094
|
assert_equal 2, firm.clients.length
|
963
1095
|
assert !firm.clients.include?(:first_client)
|
964
1096
|
end
|
965
|
-
|
1097
|
+
|
966
1098
|
def test_replace_on_new_object
|
967
1099
|
firm = Firm.new("name" => "New Firm")
|
968
1100
|
firm.clients = [companies(:second_client), Client.new("name" => "New Client")]
|
@@ -971,11 +1103,11 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
971
1103
|
assert_equal 2, firm.clients.length
|
972
1104
|
assert firm.clients.include?(Client.find_by_name("New Client"))
|
973
1105
|
end
|
974
|
-
|
1106
|
+
|
975
1107
|
def test_get_ids
|
976
1108
|
assert_equal [companies(:first_client).id, companies(:second_client).id], companies(:first_firm).client_ids
|
977
1109
|
end
|
978
|
-
|
1110
|
+
|
979
1111
|
def test_assign_ids
|
980
1112
|
firm = Firm.new("name" => "Apple")
|
981
1113
|
firm.client_ids = [companies(:first_client).id, companies(:second_client).id]
|
@@ -986,24 +1118,62 @@ class HasManyAssociationsTest < Test::Unit::TestCase
|
|
986
1118
|
end
|
987
1119
|
|
988
1120
|
def test_assign_ids_ignoring_blanks
|
989
|
-
firm = Firm.
|
1121
|
+
firm = Firm.create!(:name => 'Apple')
|
990
1122
|
firm.client_ids = [companies(:first_client).id, nil, companies(:second_client).id, '']
|
991
|
-
firm.save
|
992
|
-
|
993
|
-
assert_equal 2, firm.clients.
|
1123
|
+
firm.save!
|
1124
|
+
|
1125
|
+
assert_equal 2, firm.clients(true).size
|
994
1126
|
assert firm.clients.include?(companies(:second_client))
|
995
1127
|
end
|
996
1128
|
|
1129
|
+
def test_get_ids_for_through
|
1130
|
+
assert_equal [comments(:eager_other_comment1).id], authors(:mary).comment_ids
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
def test_assign_ids_for_through
|
1134
|
+
assert_raise(NoMethodError) { authors(:mary).comment_ids = [123] }
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
def test_dynamic_find_should_respect_association_order_for_through
|
1138
|
+
assert_equal Comment.find(10), authors(:david).comments_desc.find(:first, :conditions => "comments.type = 'SpecialComment'")
|
1139
|
+
assert_equal Comment.find(10), authors(:david).comments_desc.find_by_type('SpecialComment')
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
def test_dynamic_find_order_should_override_association_order_for_through
|
1143
|
+
assert_equal Comment.find(3), authors(:david).comments_desc.find(:first, :conditions => "comments.type = 'SpecialComment'", :order => 'comments.id')
|
1144
|
+
assert_equal Comment.find(3), authors(:david).comments_desc.find_by_type('SpecialComment', :order => 'comments.id')
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
def test_dynamic_find_all_should_respect_association_order_for_through
|
1148
|
+
assert_equal [Comment.find(10), Comment.find(7), Comment.find(6), Comment.find(3)], authors(:david).comments_desc.find(:all, :conditions => "comments.type = 'SpecialComment'")
|
1149
|
+
assert_equal [Comment.find(10), Comment.find(7), Comment.find(6), Comment.find(3)], authors(:david).comments_desc.find_all_by_type('SpecialComment')
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
def test_dynamic_find_all_order_should_override_association_order_for_through
|
1153
|
+
assert_equal [Comment.find(3), Comment.find(6), Comment.find(7), Comment.find(10)], authors(:david).comments_desc.find(:all, :conditions => "comments.type = 'SpecialComment'", :order => 'comments.id')
|
1154
|
+
assert_equal [Comment.find(3), Comment.find(6), Comment.find(7), Comment.find(10)], authors(:david).comments_desc.find_all_by_type('SpecialComment', :order => 'comments.id')
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
def test_dynamic_find_all_should_respect_association_limit_for_through
|
1158
|
+
assert_equal 1, authors(:david).limited_comments.find(:all, :conditions => "comments.type = 'SpecialComment'").length
|
1159
|
+
assert_equal 1, authors(:david).limited_comments.find_all_by_type('SpecialComment').length
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
def test_dynamic_find_all_order_should_override_association_limit_for_through
|
1163
|
+
assert_equal 4, authors(:david).limited_comments.find(:all, :conditions => "comments.type = 'SpecialComment'", :limit => 9_000).length
|
1164
|
+
assert_equal 4, authors(:david).limited_comments.find_all_by_type('SpecialComment', :limit => 9_000).length
|
1165
|
+
end
|
1166
|
+
|
997
1167
|
end
|
998
1168
|
|
999
1169
|
class BelongsToAssociationsTest < Test::Unit::TestCase
|
1000
1170
|
fixtures :accounts, :companies, :developers, :projects, :topics,
|
1001
|
-
:developers_projects, :computers, :authors, :posts
|
1002
|
-
|
1171
|
+
:developers_projects, :computers, :authors, :posts, :tags, :taggings
|
1172
|
+
|
1003
1173
|
def test_belongs_to
|
1004
1174
|
Client.find(3).firm.name
|
1005
1175
|
assert_equal companies(:first_firm).name, Client.find(3).firm.name
|
1006
|
-
assert !Client.find(3).firm.nil?, "Microsoft should have a firm"
|
1176
|
+
assert !Client.find(3).firm.nil?, "Microsoft should have a firm"
|
1007
1177
|
end
|
1008
1178
|
|
1009
1179
|
def test_proxy_assignment
|
@@ -1056,7 +1226,7 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1056
1226
|
citibank.save
|
1057
1227
|
assert_equal apple.id, citibank.firm_id
|
1058
1228
|
end
|
1059
|
-
|
1229
|
+
|
1060
1230
|
def test_natural_assignment_to_nil
|
1061
1231
|
client = Client.find(3)
|
1062
1232
|
client.firm = nil
|
@@ -1064,7 +1234,7 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1064
1234
|
assert_nil client.firm(true)
|
1065
1235
|
assert_nil client.client_of
|
1066
1236
|
end
|
1067
|
-
|
1237
|
+
|
1068
1238
|
def test_with_different_class_name
|
1069
1239
|
assert_equal Company.find(1).name, Company.find(3).firm_with_other_name.name
|
1070
1240
|
assert_not_nil Company.find(3).firm_with_other_name, "Microsoft should have a firm"
|
@@ -1074,7 +1244,7 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1074
1244
|
assert_equal Company.find(1).name, Company.find(3).firm_with_condition.name
|
1075
1245
|
assert_not_nil Company.find(3).firm_with_condition, "Microsoft should have a firm"
|
1076
1246
|
end
|
1077
|
-
|
1247
|
+
|
1078
1248
|
def test_belongs_to_counter
|
1079
1249
|
debate = Topic.create("title" => "debate")
|
1080
1250
|
assert_equal 0, debate.send(:read_attribute, "replies_count"), "No replies yet"
|
@@ -1118,6 +1288,42 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1118
1288
|
assert_equal 0, Topic.find(t2.id).replies.size
|
1119
1289
|
end
|
1120
1290
|
|
1291
|
+
def test_belongs_to_counter_after_save
|
1292
|
+
topic = Topic.create!(:title => "monday night")
|
1293
|
+
topic.replies.create!(:title => "re: monday night", :content => "football")
|
1294
|
+
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1295
|
+
|
1296
|
+
topic.save!
|
1297
|
+
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
def test_belongs_to_counter_after_update_attributes
|
1301
|
+
topic = Topic.create!(:title => "37s")
|
1302
|
+
topic.replies.create!(:title => "re: 37s", :content => "rails")
|
1303
|
+
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1304
|
+
|
1305
|
+
topic.update_attributes(:title => "37signals")
|
1306
|
+
assert_equal 1, Topic.find(topic.id)[:replies_count]
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
def test_belongs_to_counter_after_save
|
1310
|
+
topic = Topic.create("title" => "monday night")
|
1311
|
+
topic.replies.create("title" => "re: monday night", "content" => "football")
|
1312
|
+
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1313
|
+
|
1314
|
+
topic.save
|
1315
|
+
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1316
|
+
end
|
1317
|
+
|
1318
|
+
def test_belongs_to_counter_after_update_attributes
|
1319
|
+
topic = Topic.create("title" => "37s")
|
1320
|
+
topic.replies.create("title" => "re: 37s", "content" => "rails")
|
1321
|
+
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1322
|
+
|
1323
|
+
topic.update_attributes("title" => "37signals")
|
1324
|
+
assert_equal 1, Topic.find(topic.id).send(:read_attribute, "replies_count")
|
1325
|
+
end
|
1326
|
+
|
1121
1327
|
def test_assignment_before_parent_saved
|
1122
1328
|
client = Client.find(:first)
|
1123
1329
|
apple = Firm.new("name" => "Apple")
|
@@ -1177,7 +1383,7 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1177
1383
|
def test_counter_cache
|
1178
1384
|
topic = Topic.create :title => "Zoom-zoom-zoom"
|
1179
1385
|
assert_equal 0, topic[:replies_count]
|
1180
|
-
|
1386
|
+
|
1181
1387
|
reply = Reply.create(:title => "re: zoom", :content => "speedy quick!")
|
1182
1388
|
reply.topic = topic
|
1183
1389
|
|
@@ -1205,10 +1411,10 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1205
1411
|
def test_store_two_association_with_one_save
|
1206
1412
|
num_orders = Order.count
|
1207
1413
|
num_customers = Customer.count
|
1208
|
-
order = Order.new
|
1414
|
+
order = Order.new
|
1209
1415
|
|
1210
1416
|
customer1 = order.billing = Customer.new
|
1211
|
-
customer2 = order.shipping = Customer.new
|
1417
|
+
customer2 = order.shipping = Customer.new
|
1212
1418
|
assert order.save
|
1213
1419
|
assert_equal customer1, order.billing
|
1214
1420
|
assert_equal customer2, order.shipping
|
@@ -1216,28 +1422,28 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1216
1422
|
order.reload
|
1217
1423
|
|
1218
1424
|
assert_equal customer1, order.billing
|
1219
|
-
assert_equal customer2, order.shipping
|
1425
|
+
assert_equal customer2, order.shipping
|
1220
1426
|
|
1221
1427
|
assert_equal num_orders +1, Order.count
|
1222
1428
|
assert_equal num_customers +2, Customer.count
|
1223
1429
|
end
|
1224
1430
|
|
1225
|
-
|
1431
|
+
|
1226
1432
|
def test_store_association_in_two_relations_with_one_save
|
1227
1433
|
num_orders = Order.count
|
1228
1434
|
num_customers = Customer.count
|
1229
|
-
order = Order.new
|
1230
|
-
|
1231
|
-
customer = order.billing = order.shipping = Customer.new
|
1435
|
+
order = Order.new
|
1436
|
+
|
1437
|
+
customer = order.billing = order.shipping = Customer.new
|
1232
1438
|
assert order.save
|
1233
1439
|
assert_equal customer, order.billing
|
1234
1440
|
assert_equal customer, order.shipping
|
1235
|
-
|
1441
|
+
|
1236
1442
|
order.reload
|
1237
|
-
|
1443
|
+
|
1238
1444
|
assert_equal customer, order.billing
|
1239
|
-
assert_equal customer, order.shipping
|
1240
|
-
|
1445
|
+
assert_equal customer, order.shipping
|
1446
|
+
|
1241
1447
|
assert_equal num_orders +1, Order.count
|
1242
1448
|
assert_equal num_customers +1, Customer.count
|
1243
1449
|
end
|
@@ -1246,46 +1452,46 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1246
1452
|
num_orders = Order.count
|
1247
1453
|
num_customers = Customer.count
|
1248
1454
|
order = Order.create
|
1249
|
-
|
1250
|
-
customer = order.billing = order.shipping = Customer.new
|
1455
|
+
|
1456
|
+
customer = order.billing = order.shipping = Customer.new
|
1251
1457
|
assert order.save
|
1252
1458
|
assert_equal customer, order.billing
|
1253
1459
|
assert_equal customer, order.shipping
|
1254
|
-
|
1460
|
+
|
1255
1461
|
order.reload
|
1256
|
-
|
1462
|
+
|
1257
1463
|
assert_equal customer, order.billing
|
1258
|
-
assert_equal customer, order.shipping
|
1259
|
-
|
1464
|
+
assert_equal customer, order.shipping
|
1465
|
+
|
1260
1466
|
assert_equal num_orders +1, Order.count
|
1261
1467
|
assert_equal num_customers +1, Customer.count
|
1262
1468
|
end
|
1263
|
-
|
1469
|
+
|
1264
1470
|
def test_store_association_in_two_relations_with_one_save_in_existing_object_with_values
|
1265
1471
|
num_orders = Order.count
|
1266
1472
|
num_customers = Customer.count
|
1267
1473
|
order = Order.create
|
1268
|
-
|
1269
|
-
customer = order.billing = order.shipping = Customer.new
|
1474
|
+
|
1475
|
+
customer = order.billing = order.shipping = Customer.new
|
1270
1476
|
assert order.save
|
1271
1477
|
assert_equal customer, order.billing
|
1272
1478
|
assert_equal customer, order.shipping
|
1273
|
-
|
1479
|
+
|
1274
1480
|
order.reload
|
1275
|
-
|
1276
|
-
customer = order.billing = order.shipping = Customer.new
|
1277
|
-
|
1481
|
+
|
1482
|
+
customer = order.billing = order.shipping = Customer.new
|
1483
|
+
|
1278
1484
|
assert order.save
|
1279
|
-
order.reload
|
1280
|
-
|
1485
|
+
order.reload
|
1486
|
+
|
1281
1487
|
assert_equal customer, order.billing
|
1282
|
-
assert_equal customer, order.shipping
|
1283
|
-
|
1488
|
+
assert_equal customer, order.shipping
|
1489
|
+
|
1284
1490
|
assert_equal num_orders +1, Order.count
|
1285
1491
|
assert_equal num_customers +2, Customer.count
|
1286
1492
|
end
|
1287
|
-
|
1288
|
-
|
1493
|
+
|
1494
|
+
|
1289
1495
|
def test_association_assignment_sticks
|
1290
1496
|
post = Post.find(:first)
|
1291
1497
|
|
@@ -1306,7 +1512,7 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
|
|
1306
1512
|
# the author id of the post should be the id we set
|
1307
1513
|
assert_equal post.author_id, author2.id
|
1308
1514
|
end
|
1309
|
-
|
1515
|
+
|
1310
1516
|
end
|
1311
1517
|
|
1312
1518
|
|
@@ -1338,7 +1544,7 @@ end
|
|
1338
1544
|
|
1339
1545
|
class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
1340
1546
|
fixtures :accounts, :companies, :categories, :posts, :categories_posts, :developers, :projects, :developers_projects
|
1341
|
-
|
1547
|
+
|
1342
1548
|
def test_has_and_belongs_to_many
|
1343
1549
|
david = Developer.find(1)
|
1344
1550
|
|
@@ -1358,11 +1564,11 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1358
1564
|
|
1359
1565
|
def test_adding_single
|
1360
1566
|
jamis = Developer.find(2)
|
1361
|
-
jamis.projects.reload # causing the collection to load
|
1567
|
+
jamis.projects.reload # causing the collection to load
|
1362
1568
|
action_controller = Project.find(2)
|
1363
1569
|
assert_equal 1, jamis.projects.size
|
1364
|
-
assert_equal 1, action_controller.developers.size
|
1365
|
-
|
1570
|
+
assert_equal 1, action_controller.developers.size
|
1571
|
+
|
1366
1572
|
jamis.projects << action_controller
|
1367
1573
|
|
1368
1574
|
assert_equal 2, jamis.projects.size
|
@@ -1383,8 +1589,8 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1383
1589
|
assert_equal 1, jamis.projects.size
|
1384
1590
|
assert_equal 1, action_controller.developers.size
|
1385
1591
|
|
1386
|
-
action_controller.developers << jamis
|
1387
|
-
|
1592
|
+
action_controller.developers << jamis
|
1593
|
+
|
1388
1594
|
assert_equal 2, jamis.projects(true).size
|
1389
1595
|
assert_equal 2, action_controller.developers.size
|
1390
1596
|
assert_equal 2, action_controller.developers(true).size
|
@@ -1434,19 +1640,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1434
1640
|
assert_equal 1, project.access_level.to_i
|
1435
1641
|
end
|
1436
1642
|
|
1437
|
-
def
|
1438
|
-
ac = projects(:action_controller)
|
1439
|
-
assert !developers(:jamis).projects.include?(ac)
|
1440
|
-
assert_deprecated do
|
1441
|
-
developers(:jamis).projects.push_with_attributes(ac, :access_level => 3)
|
1442
|
-
end
|
1443
|
-
|
1444
|
-
assert developers(:jamis, :reload).projects.include?(ac)
|
1445
|
-
project = developers(:jamis).projects.detect { |p| p == ac }
|
1446
|
-
assert_equal 3, project.access_level.to_i
|
1447
|
-
end
|
1448
|
-
|
1449
|
-
def test_hatbm_attribute_access_and_respond_to
|
1643
|
+
def test_habtm_attribute_access_and_respond_to
|
1450
1644
|
project = developers(:jamis).projects[0]
|
1451
1645
|
assert project.has_attribute?("name")
|
1452
1646
|
assert project.has_attribute?("joined_on")
|
@@ -1455,10 +1649,12 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1455
1649
|
assert project.respond_to?("name=")
|
1456
1650
|
assert project.respond_to?("name?")
|
1457
1651
|
assert project.respond_to?("joined_on")
|
1458
|
-
|
1652
|
+
# given that the 'join attribute' won't be persisted, I don't
|
1653
|
+
# think we should define the mutators
|
1654
|
+
#assert project.respond_to?("joined_on=")
|
1459
1655
|
assert project.respond_to?("joined_on?")
|
1460
1656
|
assert project.respond_to?("access_level")
|
1461
|
-
assert project.respond_to?("access_level=")
|
1657
|
+
#assert project.respond_to?("access_level=")
|
1462
1658
|
assert project.respond_to?("access_level?")
|
1463
1659
|
end
|
1464
1660
|
|
@@ -1477,31 +1673,6 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1477
1673
|
assert_equal 2, aredridel.projects(true).size
|
1478
1674
|
end
|
1479
1675
|
|
1480
|
-
def test_habtm_adding_before_save_with_join_attributes
|
1481
|
-
no_of_devels = Developer.count
|
1482
|
-
no_of_projects = Project.count
|
1483
|
-
now = Date.today
|
1484
|
-
ken = Developer.new("name" => "Ken")
|
1485
|
-
assert_deprecated do
|
1486
|
-
ken.projects.push_with_attributes( Project.find(1), :joined_on => now )
|
1487
|
-
end
|
1488
|
-
p = Project.new("name" => "Foomatic")
|
1489
|
-
assert_deprecated do
|
1490
|
-
ken.projects.push_with_attributes( p, :joined_on => now )
|
1491
|
-
end
|
1492
|
-
assert ken.new_record?
|
1493
|
-
assert p.new_record?
|
1494
|
-
assert ken.save
|
1495
|
-
assert !ken.new_record?
|
1496
|
-
assert_equal no_of_devels+1, Developer.count
|
1497
|
-
assert_equal no_of_projects+1, Project.count
|
1498
|
-
assert_equal 2, ken.projects.size
|
1499
|
-
assert_equal 2, ken.projects(true).size
|
1500
|
-
|
1501
|
-
kenReloaded = Developer.find_by_name 'Ken'
|
1502
|
-
kenReloaded.projects.each {|prj| assert_date_from_db(now, prj.joined_on)}
|
1503
|
-
end
|
1504
|
-
|
1505
1676
|
def test_habtm_saving_multiple_relationships
|
1506
1677
|
new_project = Project.new("name" => "Grimetime")
|
1507
1678
|
amount_of_developers = 4
|
@@ -1517,8 +1688,8 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1517
1688
|
end
|
1518
1689
|
|
1519
1690
|
def test_habtm_unique_order_preserved
|
1520
|
-
assert_equal
|
1521
|
-
assert_equal
|
1691
|
+
assert_equal developers(:poor_jamis, :jamis, :david), projects(:active_record).non_unique_developers
|
1692
|
+
assert_equal developers(:poor_jamis, :jamis, :david), projects(:active_record).developers
|
1522
1693
|
end
|
1523
1694
|
|
1524
1695
|
def test_build
|
@@ -1531,7 +1702,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1531
1702
|
assert_equal devel.projects.last, proj
|
1532
1703
|
assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated
|
1533
1704
|
end
|
1534
|
-
|
1705
|
+
|
1535
1706
|
def test_build_by_new_record
|
1536
1707
|
devel = Developer.new(:name => "Marcel", :salary => 75000)
|
1537
1708
|
proj1 = devel.projects.build(:name => "Make bed")
|
@@ -1544,7 +1715,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1544
1715
|
assert_equal devel.projects.last, proj2
|
1545
1716
|
assert_equal Developer.find_by_name("Marcel").projects.last, proj2 # prove join table is updated
|
1546
1717
|
end
|
1547
|
-
|
1718
|
+
|
1548
1719
|
def test_create
|
1549
1720
|
devel = Developer.find(1)
|
1550
1721
|
proj = devel.projects.create("name" => "Projekt")
|
@@ -1552,11 +1723,11 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1552
1723
|
assert !proj.new_record?
|
1553
1724
|
assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated
|
1554
1725
|
end
|
1555
|
-
|
1726
|
+
|
1556
1727
|
def test_create_by_new_record
|
1557
1728
|
devel = Developer.new(:name => "Marcel", :salary => 75000)
|
1558
|
-
proj1 = devel.projects.
|
1559
|
-
proj2 = devel.projects.
|
1729
|
+
proj1 = devel.projects.build(:name => "Make bed")
|
1730
|
+
proj2 = devel.projects.build(:name => "Lie in it")
|
1560
1731
|
assert_equal devel.projects.last, proj2
|
1561
1732
|
assert proj2.new_record?
|
1562
1733
|
devel.save
|
@@ -1565,7 +1736,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1565
1736
|
assert_equal devel.projects.last, proj2
|
1566
1737
|
assert_equal Developer.find_by_name("Marcel").projects.last, proj2 # prove join table is updated
|
1567
1738
|
end
|
1568
|
-
|
1739
|
+
|
1569
1740
|
def test_uniq_after_the_fact
|
1570
1741
|
developers(:jamis).projects << projects(:active_record)
|
1571
1742
|
developers(:jamis).projects << projects(:active_record)
|
@@ -1578,7 +1749,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1578
1749
|
projects(:active_record).developers << developers(:david)
|
1579
1750
|
assert_equal 3, projects(:active_record, :reload).developers.size
|
1580
1751
|
end
|
1581
|
-
|
1752
|
+
|
1582
1753
|
def test_deleting
|
1583
1754
|
david = Developer.find(1)
|
1584
1755
|
active_record = Project.find(1)
|
@@ -1587,7 +1758,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1587
1758
|
assert_equal 3, active_record.developers.size
|
1588
1759
|
|
1589
1760
|
david.projects.delete(active_record)
|
1590
|
-
|
1761
|
+
|
1591
1762
|
assert_equal 1, david.projects.size
|
1592
1763
|
assert_equal 1, david.projects(true).size
|
1593
1764
|
assert_equal 2, active_record.developers(true).size
|
@@ -1606,7 +1777,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1606
1777
|
active_record = Project.find(1)
|
1607
1778
|
active_record.developers.reload
|
1608
1779
|
assert_equal 3, active_record.developers_by_sql.size
|
1609
|
-
|
1780
|
+
|
1610
1781
|
active_record.developers_by_sql.delete(david)
|
1611
1782
|
assert_equal 2, active_record.developers_by_sql(true).size
|
1612
1783
|
end
|
@@ -1615,7 +1786,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1615
1786
|
active_record = Project.find(1)
|
1616
1787
|
active_record.developers.reload
|
1617
1788
|
assert_equal 3, active_record.developers_by_sql.size
|
1618
|
-
|
1789
|
+
|
1619
1790
|
active_record.developers_by_sql.delete(Developer.find(:all))
|
1620
1791
|
assert_equal 0, active_record.developers_by_sql(true).size
|
1621
1792
|
end
|
@@ -1637,9 +1808,9 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1637
1808
|
end
|
1638
1809
|
|
1639
1810
|
def test_additional_columns_from_join_table
|
1640
|
-
assert_date_from_db Date.new(2004, 10, 10), Developer.find(1).projects.first.joined_on
|
1811
|
+
assert_date_from_db Date.new(2004, 10, 10), Developer.find(1).projects.first.joined_on.to_date
|
1641
1812
|
end
|
1642
|
-
|
1813
|
+
|
1643
1814
|
def test_destroy_all
|
1644
1815
|
david = Developer.find(1)
|
1645
1816
|
david.projects.reload
|
@@ -1649,14 +1820,11 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1649
1820
|
assert david.projects(true).empty?
|
1650
1821
|
end
|
1651
1822
|
|
1652
|
-
def
|
1823
|
+
def test_deprecated_push_with_attributes_was_removed
|
1653
1824
|
jamis = developers(:jamis)
|
1654
|
-
|
1825
|
+
assert_raise(NoMethodError) do
|
1655
1826
|
jamis.projects.push_with_attributes(projects(:action_controller), :joined_on => Date.today)
|
1656
1827
|
end
|
1657
|
-
|
1658
|
-
assert_date_from_db Date.today, jamis.projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on
|
1659
|
-
assert_date_from_db Date.today, developers(:jamis).projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on
|
1660
1828
|
end
|
1661
1829
|
|
1662
1830
|
def test_associations_with_conditions
|
@@ -1671,11 +1839,11 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1671
1839
|
projects(:active_record).developers_named_david.clear
|
1672
1840
|
assert_equal 2, projects(:active_record, :reload).developers.size
|
1673
1841
|
end
|
1674
|
-
|
1842
|
+
|
1675
1843
|
def test_find_in_association
|
1676
1844
|
# Using sql
|
1677
1845
|
assert_equal developers(:david), projects(:active_record).developers.find(developers(:david).id), "SQL find"
|
1678
|
-
|
1846
|
+
|
1679
1847
|
# Using ruby
|
1680
1848
|
active_record = projects(:active_record)
|
1681
1849
|
active_record.developers.reload
|
@@ -1684,7 +1852,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1684
1852
|
|
1685
1853
|
def test_find_in_association_with_custom_finder_sql
|
1686
1854
|
assert_equal developers(:david), projects(:active_record).developers_with_finder_sql.find(developers(:david).id), "SQL find"
|
1687
|
-
|
1855
|
+
|
1688
1856
|
active_record = projects(:active_record)
|
1689
1857
|
active_record.developers_with_finder_sql.reload
|
1690
1858
|
assert_equal developers(:david), active_record.developers_with_finder_sql.find(developers(:david).id), "Ruby find"
|
@@ -1700,6 +1868,56 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1700
1868
|
assert_equal 3, projects(:active_record).limited_developers.find(:all, :limit => nil).size
|
1701
1869
|
end
|
1702
1870
|
|
1871
|
+
def test_dynamic_find_should_respect_association_order
|
1872
|
+
# Developers are ordered 'name DESC, id DESC'
|
1873
|
+
low_id_jamis = developers(:jamis)
|
1874
|
+
middle_id_jamis = developers(:poor_jamis)
|
1875
|
+
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1876
|
+
|
1877
|
+
assert_equal high_id_jamis, projects(:active_record).developers.find(:first, :conditions => "name = 'Jamis'")
|
1878
|
+
assert_equal high_id_jamis, projects(:active_record).developers.find_by_name('Jamis')
|
1879
|
+
end
|
1880
|
+
|
1881
|
+
def test_dynamic_find_order_should_override_association_order
|
1882
|
+
# Developers are ordered 'name DESC, id DESC'
|
1883
|
+
low_id_jamis = developers(:jamis)
|
1884
|
+
middle_id_jamis = developers(:poor_jamis)
|
1885
|
+
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1886
|
+
|
1887
|
+
assert_equal low_id_jamis, projects(:active_record).developers.find(:first, :conditions => "name = 'Jamis'", :order => 'id')
|
1888
|
+
assert_equal low_id_jamis, projects(:active_record).developers.find_by_name('Jamis', :order => 'id')
|
1889
|
+
end
|
1890
|
+
|
1891
|
+
def test_dynamic_find_all_should_respect_association_order
|
1892
|
+
# Developers are ordered 'name DESC, id DESC'
|
1893
|
+
low_id_jamis = developers(:jamis)
|
1894
|
+
middle_id_jamis = developers(:poor_jamis)
|
1895
|
+
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1896
|
+
|
1897
|
+
assert_equal [high_id_jamis, middle_id_jamis, low_id_jamis], projects(:active_record).developers.find(:all, :conditions => "name = 'Jamis'")
|
1898
|
+
assert_equal [high_id_jamis, middle_id_jamis, low_id_jamis], projects(:active_record).developers.find_all_by_name('Jamis')
|
1899
|
+
end
|
1900
|
+
|
1901
|
+
def test_dynamic_find_all_order_should_override_association_order
|
1902
|
+
# Developers are ordered 'name DESC, id DESC'
|
1903
|
+
low_id_jamis = developers(:jamis)
|
1904
|
+
middle_id_jamis = developers(:poor_jamis)
|
1905
|
+
high_id_jamis = projects(:active_record).developers.create(:name => 'Jamis')
|
1906
|
+
|
1907
|
+
assert_equal [low_id_jamis, middle_id_jamis, high_id_jamis], projects(:active_record).developers.find(:all, :conditions => "name = 'Jamis'", :order => 'id')
|
1908
|
+
assert_equal [low_id_jamis, middle_id_jamis, high_id_jamis], projects(:active_record).developers.find_all_by_name('Jamis', :order => 'id')
|
1909
|
+
end
|
1910
|
+
|
1911
|
+
def test_dynamic_find_all_should_respect_association_limit
|
1912
|
+
assert_equal 1, projects(:active_record).limited_developers.find(:all, :conditions => "name = 'Jamis'").length
|
1913
|
+
assert_equal 1, projects(:active_record).limited_developers.find_all_by_name('Jamis').length
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
def test_dynamic_find_all_order_should_override_association_limit
|
1917
|
+
assert_equal 2, projects(:active_record).limited_developers.find(:all, :conditions => "name = 'Jamis'", :limit => 9_000).length
|
1918
|
+
assert_equal 2, projects(:active_record).limited_developers.find_all_by_name('Jamis', :limit => 9_000).length
|
1919
|
+
end
|
1920
|
+
|
1703
1921
|
def test_new_with_values_in_collection
|
1704
1922
|
jamis = DeveloperForProjectWithAfterCreateHook.find_by_name('Jamis')
|
1705
1923
|
david = DeveloperForProjectWithAfterCreateHook.find_by_name('David')
|
@@ -1715,11 +1933,11 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1715
1933
|
def test_find_in_association_with_options
|
1716
1934
|
developers = projects(:active_record).developers.find(:all)
|
1717
1935
|
assert_equal 3, developers.size
|
1718
|
-
|
1936
|
+
|
1719
1937
|
assert_equal developers(:poor_jamis), projects(:active_record).developers.find(:first, :conditions => "salary < 10000")
|
1720
1938
|
assert_equal developers(:jamis), projects(:active_record).developers.find(:first, :order => "salary DESC")
|
1721
1939
|
end
|
1722
|
-
|
1940
|
+
|
1723
1941
|
def test_replace_with_less
|
1724
1942
|
david = developers(:david)
|
1725
1943
|
david.projects = [projects(:action_controller)]
|
@@ -1734,7 +1952,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1734
1952
|
assert_equal 2, david.projects.length
|
1735
1953
|
assert !david.projects.include?(projects(:active_record))
|
1736
1954
|
end
|
1737
|
-
|
1955
|
+
|
1738
1956
|
def test_replace_on_new_object
|
1739
1957
|
new_developer = Developer.new("name" => "Matz")
|
1740
1958
|
new_developer.projects = [projects(:action_controller), Project.new("name" => "ActionWebSearch")]
|
@@ -1745,16 +1963,16 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1745
1963
|
def test_consider_type
|
1746
1964
|
developer = Developer.find(:first)
|
1747
1965
|
special_project = SpecialProject.create("name" => "Special Project")
|
1748
|
-
|
1966
|
+
|
1749
1967
|
other_project = developer.projects.first
|
1750
1968
|
developer.special_projects << special_project
|
1751
1969
|
developer.reload
|
1752
|
-
|
1970
|
+
|
1753
1971
|
assert developer.projects.include?(special_project)
|
1754
1972
|
assert developer.special_projects.include?(special_project)
|
1755
1973
|
assert !developer.special_projects.include?(other_project)
|
1756
1974
|
end
|
1757
|
-
|
1975
|
+
|
1758
1976
|
def test_update_attributes_after_push_without_duplicate_join_table_rows
|
1759
1977
|
developer = Developer.new("name" => "Kano")
|
1760
1978
|
project = SpecialProject.create("name" => "Special Project")
|
@@ -1767,20 +1985,33 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1767
1985
|
AND developer_id = #{developer.id}
|
1768
1986
|
end_sql
|
1769
1987
|
end
|
1770
|
-
|
1988
|
+
|
1771
1989
|
def test_updating_attributes_on_non_rich_associations
|
1772
1990
|
welcome = categories(:technology).posts.first
|
1773
1991
|
welcome.title = "Something else"
|
1774
1992
|
assert welcome.save!
|
1775
1993
|
end
|
1776
|
-
|
1994
|
+
|
1995
|
+
def test_habtm_respects_select
|
1996
|
+
categories(:technology).select_testing_posts(true).each do |o|
|
1997
|
+
assert_respond_to o, :correctness_marker
|
1998
|
+
end
|
1999
|
+
assert_respond_to categories(:technology).select_testing_posts.find(:first), :correctness_marker
|
2000
|
+
end
|
2001
|
+
|
1777
2002
|
def test_updating_attributes_on_rich_associations
|
1778
2003
|
david = projects(:action_controller).developers.first
|
1779
2004
|
david.name = "DHH"
|
1780
2005
|
assert_raises(ActiveRecord::ReadOnlyRecord) { david.save! }
|
1781
2006
|
end
|
1782
2007
|
|
1783
|
-
|
2008
|
+
def test_updating_attributes_on_rich_associations_with_limited_find_from_reflection
|
2009
|
+
david = projects(:action_controller).selected_developers.first
|
2010
|
+
david.name = "DHH"
|
2011
|
+
assert_nothing_raised { david.save! }
|
2012
|
+
end
|
2013
|
+
|
2014
|
+
|
1784
2015
|
def test_updating_attributes_on_rich_associations_with_limited_find
|
1785
2016
|
david = projects(:action_controller).developers.find(:all, :select => "developers.*").first
|
1786
2017
|
david.name = "DHH"
|
@@ -1790,7 +2021,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1790
2021
|
def test_join_table_alias
|
1791
2022
|
assert_equal 3, Developer.find(:all, :include => {:projects => :developers}, :conditions => 'developers_projects_join.joined_on IS NOT NULL').size
|
1792
2023
|
end
|
1793
|
-
|
2024
|
+
|
1794
2025
|
def test_join_with_group
|
1795
2026
|
group = Developer.columns.inject([]) do |g, c|
|
1796
2027
|
g << "developers.#{c.name}"
|
@@ -1802,18 +2033,18 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1802
2033
|
end
|
1803
2034
|
|
1804
2035
|
def test_get_ids
|
1805
|
-
assert_equal
|
2036
|
+
assert_equal projects(:active_record, :action_controller).map(&:id), developers(:david).project_ids
|
1806
2037
|
assert_equal [projects(:active_record).id], developers(:jamis).project_ids
|
1807
2038
|
end
|
1808
2039
|
|
1809
2040
|
def test_assign_ids
|
1810
2041
|
developer = Developer.new("name" => "Joe")
|
1811
|
-
developer.project_ids =
|
2042
|
+
developer.project_ids = projects(:active_record, :action_controller).map(&:id)
|
1812
2043
|
developer.save
|
1813
2044
|
developer.reload
|
1814
2045
|
assert_equal 2, developer.projects.length
|
1815
|
-
assert_equal projects(:active_record), developer.projects[0]
|
1816
|
-
assert_equal projects(:action_controller), developer.projects[1]
|
2046
|
+
assert_equal projects(:active_record), developer.projects[0]
|
2047
|
+
assert_equal projects(:action_controller), developer.projects[1]
|
1817
2048
|
end
|
1818
2049
|
|
1819
2050
|
def test_assign_ids_ignoring_blanks
|
@@ -1822,8 +2053,8 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1822
2053
|
developer.save
|
1823
2054
|
developer.reload
|
1824
2055
|
assert_equal 2, developer.projects.length
|
1825
|
-
assert_equal projects(:active_record), developer.projects[0]
|
1826
|
-
assert_equal projects(:action_controller), developer.projects[1]
|
2056
|
+
assert_equal projects(:active_record), developer.projects[0]
|
2057
|
+
assert_equal projects(:action_controller), developer.projects[1]
|
1827
2058
|
end
|
1828
2059
|
|
1829
2060
|
def test_select_limited_ids_list
|
@@ -1837,6 +2068,80 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|
1837
2068
|
join_base = ActiveRecord::Associations::ClassMethods::JoinDependency::JoinBase.new(Project)
|
1838
2069
|
join_dep = ActiveRecord::Associations::ClassMethods::JoinDependency.new(join_base, :developers, nil)
|
1839
2070
|
projects = Project.send(:select_limited_ids_list, {:order => 'developers.created_at'}, join_dep)
|
2071
|
+
assert !projects.include?("'"), projects
|
1840
2072
|
assert_equal %w(1 2), projects.scan(/\d/).sort
|
1841
2073
|
end
|
2074
|
+
|
2075
|
+
def test_scoped_find_on_through_association_doesnt_return_read_only_records
|
2076
|
+
tag = Post.find(1).tags.find_by_name("General")
|
2077
|
+
|
2078
|
+
assert_nothing_raised do
|
2079
|
+
tag.save!
|
2080
|
+
end
|
2081
|
+
end
|
2082
|
+
end
|
2083
|
+
|
2084
|
+
|
2085
|
+
class OverridingAssociationsTest < Test::Unit::TestCase
|
2086
|
+
class Person < ActiveRecord::Base; end
|
2087
|
+
class DifferentPerson < ActiveRecord::Base; end
|
2088
|
+
|
2089
|
+
class PeopleList < ActiveRecord::Base
|
2090
|
+
has_and_belongs_to_many :has_and_belongs_to_many, :before_add => :enlist
|
2091
|
+
has_many :has_many, :before_add => :enlist
|
2092
|
+
belongs_to :belongs_to
|
2093
|
+
has_one :has_one
|
2094
|
+
end
|
2095
|
+
|
2096
|
+
class DifferentPeopleList < PeopleList
|
2097
|
+
# Different association with the same name, callbacks should be omitted here.
|
2098
|
+
has_and_belongs_to_many :has_and_belongs_to_many, :class_name => 'DifferentPerson'
|
2099
|
+
has_many :has_many, :class_name => 'DifferentPerson'
|
2100
|
+
belongs_to :belongs_to, :class_name => 'DifferentPerson'
|
2101
|
+
has_one :has_one, :class_name => 'DifferentPerson'
|
2102
|
+
end
|
2103
|
+
|
2104
|
+
def test_habtm_association_redefinition_callbacks_should_differ_and_not_inherited
|
2105
|
+
# redeclared association on AR descendant should not inherit callbacks from superclass
|
2106
|
+
callbacks = PeopleList.read_inheritable_attribute(:before_add_for_has_and_belongs_to_many)
|
2107
|
+
assert_equal([:enlist], callbacks)
|
2108
|
+
callbacks = DifferentPeopleList.read_inheritable_attribute(:before_add_for_has_and_belongs_to_many)
|
2109
|
+
assert_equal([], callbacks)
|
2110
|
+
end
|
2111
|
+
|
2112
|
+
def test_has_many_association_redefinition_callbacks_should_differ_and_not_inherited
|
2113
|
+
# redeclared association on AR descendant should not inherit callbacks from superclass
|
2114
|
+
callbacks = PeopleList.read_inheritable_attribute(:before_add_for_has_many)
|
2115
|
+
assert_equal([:enlist], callbacks)
|
2116
|
+
callbacks = DifferentPeopleList.read_inheritable_attribute(:before_add_for_has_many)
|
2117
|
+
assert_equal([], callbacks)
|
2118
|
+
end
|
2119
|
+
|
2120
|
+
def test_habtm_association_redefinition_reflections_should_differ_and_not_inherited
|
2121
|
+
assert_not_equal(
|
2122
|
+
PeopleList.reflect_on_association(:has_and_belongs_to_many),
|
2123
|
+
DifferentPeopleList.reflect_on_association(:has_and_belongs_to_many)
|
2124
|
+
)
|
2125
|
+
end
|
2126
|
+
|
2127
|
+
def test_has_many_association_redefinition_reflections_should_differ_and_not_inherited
|
2128
|
+
assert_not_equal(
|
2129
|
+
PeopleList.reflect_on_association(:has_many),
|
2130
|
+
DifferentPeopleList.reflect_on_association(:has_many)
|
2131
|
+
)
|
2132
|
+
end
|
2133
|
+
|
2134
|
+
def test_belongs_to_association_redefinition_reflections_should_differ_and_not_inherited
|
2135
|
+
assert_not_equal(
|
2136
|
+
PeopleList.reflect_on_association(:belongs_to),
|
2137
|
+
DifferentPeopleList.reflect_on_association(:belongs_to)
|
2138
|
+
)
|
2139
|
+
end
|
2140
|
+
|
2141
|
+
def test_has_one_association_redefinition_reflections_should_differ_and_not_inherited
|
2142
|
+
assert_not_equal(
|
2143
|
+
PeopleList.reflect_on_association(:has_one),
|
2144
|
+
DifferentPeopleList.reflect_on_association(:has_one)
|
2145
|
+
)
|
2146
|
+
end
|
1842
2147
|
end
|