diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | actionpack/CHANGELOG.md | 37 | ||||
-rw-r--r-- | actionpack/Rakefile | 19 | ||||
-rw-r--r-- | actionpack/actionpack.gemspec | 4 | ||||
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 1 | ||||
-rw-r--r-- | actionview/CHANGELOG.md | 42 | ||||
-rw-r--r-- | actionview/MIT-LICENSE | 21 | ||||
-rw-r--r-- | actionview/README.rdoc | 31 | ||||
-rw-r--r-- | actionview/RUNNING_UNIT_TESTS | 27 | ||||
-rw-r--r-- | actionview/Rakefile | 79 | ||||
-rw-r--r-- | actionview/actionview.gemspec | 29 | ||||
-rw-r--r-- | actionview/lib/action_view.rb (renamed from actionpack/lib/action_view.rb) | 1 | ||||
-rw-r--r-- | actionview/lib/action_view/base.rb (renamed from actionpack/lib/action_view/base.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/buffers.rb (renamed from actionpack/lib/action_view/buffers.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/context.rb (renamed from actionpack/lib/action_view/context.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/dependency_tracker.rb (renamed from actionpack/lib/action_view/dependency_tracker.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/digestor.rb (renamed from actionpack/lib/action_view/digestor.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/flows.rb (renamed from actionpack/lib/action_view/flows.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers.rb (renamed from actionpack/lib/action_view/helpers.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/active_model_helper.rb (renamed from actionpack/lib/action_view/helpers/active_model_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/asset_tag_helper.rb (renamed from actionpack/lib/action_view/helpers/asset_tag_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/asset_url_helper.rb (renamed from actionpack/lib/action_view/helpers/asset_url_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/atom_feed_helper.rb (renamed from actionpack/lib/action_view/helpers/atom_feed_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb (renamed from actionpack/lib/action_view/helpers/cache_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/capture_helper.rb (renamed from actionpack/lib/action_view/helpers/capture_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/controller_helper.rb (renamed from actionpack/lib/action_view/helpers/controller_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/csrf_helper.rb (renamed from actionpack/lib/action_view/helpers/csrf_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/date_helper.rb (renamed from actionpack/lib/action_view/helpers/date_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/debug_helper.rb (renamed from actionpack/lib/action_view/helpers/debug_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb (renamed from actionpack/lib/action_view/helpers/form_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/form_options_helper.rb (renamed from actionpack/lib/action_view/helpers/form_options_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb (renamed from actionpack/lib/action_view/helpers/form_tag_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/javascript_helper.rb (renamed from actionpack/lib/action_view/helpers/javascript_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/number_helper.rb (renamed from actionpack/lib/action_view/helpers/number_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/output_safety_helper.rb (renamed from actionpack/lib/action_view/helpers/output_safety_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/record_tag_helper.rb (renamed from actionpack/lib/action_view/helpers/record_tag_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/rendering_helper.rb (renamed from actionpack/lib/action_view/helpers/rendering_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/sanitize_helper.rb (renamed from actionpack/lib/action_view/helpers/sanitize_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tag_helper.rb (renamed from actionpack/lib/action_view/helpers/tag_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags.rb (renamed from actionpack/lib/action_view/helpers/tags.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/base.rb (renamed from actionpack/lib/action_view/helpers/tags/base.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/check_box.rb (renamed from actionpack/lib/action_view/helpers/tags/check_box.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/checkable.rb (renamed from actionpack/lib/action_view/helpers/tags/checkable.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_check_boxes.rb (renamed from actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_helpers.rb (renamed from actionpack/lib/action_view/helpers/tags/collection_helpers.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb (renamed from actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_select.rb (renamed from actionpack/lib/action_view/helpers/tags/collection_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/color_field.rb (renamed from actionpack/lib/action_view/helpers/tags/color_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/date_field.rb (renamed from actionpack/lib/action_view/helpers/tags/date_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/date_select.rb (renamed from actionpack/lib/action_view/helpers/tags/date_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/datetime_field.rb (renamed from actionpack/lib/action_view/helpers/tags/datetime_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/datetime_local_field.rb (renamed from actionpack/lib/action_view/helpers/tags/datetime_local_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/datetime_select.rb (renamed from actionpack/lib/action_view/helpers/tags/datetime_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/email_field.rb (renamed from actionpack/lib/action_view/helpers/tags/email_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/file_field.rb (renamed from actionpack/lib/action_view/helpers/tags/file_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/grouped_collection_select.rb (renamed from actionpack/lib/action_view/helpers/tags/grouped_collection_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/hidden_field.rb (renamed from actionpack/lib/action_view/helpers/tags/hidden_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/label.rb (renamed from actionpack/lib/action_view/helpers/tags/label.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/month_field.rb (renamed from actionpack/lib/action_view/helpers/tags/month_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/number_field.rb (renamed from actionpack/lib/action_view/helpers/tags/number_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/password_field.rb (renamed from actionpack/lib/action_view/helpers/tags/password_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/radio_button.rb (renamed from actionpack/lib/action_view/helpers/tags/radio_button.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/range_field.rb (renamed from actionpack/lib/action_view/helpers/tags/range_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/search_field.rb (renamed from actionpack/lib/action_view/helpers/tags/search_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/select.rb (renamed from actionpack/lib/action_view/helpers/tags/select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/tel_field.rb (renamed from actionpack/lib/action_view/helpers/tags/tel_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/text_area.rb (renamed from actionpack/lib/action_view/helpers/tags/text_area.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/text_field.rb (renamed from actionpack/lib/action_view/helpers/tags/text_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/time_field.rb (renamed from actionpack/lib/action_view/helpers/tags/time_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/time_select.rb (renamed from actionpack/lib/action_view/helpers/tags/time_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/time_zone_select.rb (renamed from actionpack/lib/action_view/helpers/tags/time_zone_select.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/url_field.rb (renamed from actionpack/lib/action_view/helpers/tags/url_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/week_field.rb (renamed from actionpack/lib/action_view/helpers/tags/week_field.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/text_helper.rb (renamed from actionpack/lib/action_view/helpers/text_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/translation_helper.rb (renamed from actionpack/lib/action_view/helpers/translation_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb (renamed from actionpack/lib/action_view/helpers/url_helper.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/locale/en.yml (renamed from actionpack/lib/action_view/locale/en.yml) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/log_subscriber.rb (renamed from actionpack/lib/action_view/log_subscriber.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/lookup_context.rb (renamed from actionpack/lib/action_view/lookup_context.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/model_naming.rb (renamed from actionpack/lib/action_view/model_naming.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/path_set.rb (renamed from actionpack/lib/action_view/path_set.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/railtie.rb (renamed from actionpack/lib/action_view/railtie.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/record_identifier.rb (renamed from actionpack/lib/action_view/record_identifier.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/renderer/abstract_renderer.rb (renamed from actionpack/lib/action_view/renderer/abstract_renderer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/renderer/partial_renderer.rb (renamed from actionpack/lib/action_view/renderer/partial_renderer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/renderer/renderer.rb (renamed from actionpack/lib/action_view/renderer/renderer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/renderer/streaming_template_renderer.rb (renamed from actionpack/lib/action_view/renderer/streaming_template_renderer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/renderer/template_renderer.rb (renamed from actionpack/lib/action_view/renderer/template_renderer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/routing_url_for.rb (renamed from actionpack/lib/action_view/routing_url_for.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template.rb (renamed from actionpack/lib/action_view/template.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/error.rb (renamed from actionpack/lib/action_view/template/error.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers.rb (renamed from actionpack/lib/action_view/template/handlers.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers/builder.rb (renamed from actionpack/lib/action_view/template/handlers/builder.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers/erb.rb (renamed from actionpack/lib/action_view/template/handlers/erb.rb) | 1 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers/raw.rb (renamed from actionpack/lib/action_view/template/handlers/raw.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/resolver.rb (renamed from actionpack/lib/action_view/template/resolver.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/text.rb (renamed from actionpack/lib/action_view/template/text.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/template/types.rb (renamed from actionpack/lib/action_view/template/types.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/test_case.rb (renamed from actionpack/lib/action_view/test_case.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/testing/resolvers.rb (renamed from actionpack/lib/action_view/testing/resolvers.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner.rb (renamed from actionpack/lib/action_view/vendor/html-scanner.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/document.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/document.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/node.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/node.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/sanitizer.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/sanitizer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/selector.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/selector.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/tokenizer.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/tokenizer.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/vendor/html-scanner/html/version.rb (renamed from actionpack/lib/action_view/vendor/html-scanner/html/version.rb) | 0 | ||||
-rw-r--r-- | actionview/lib/action_view/version.rb | 11 | ||||
-rw-r--r-- | actionview/test/abstract_unit.rb | 382 | ||||
-rw-r--r-- | actionview/test/active_record_unit.rb | 91 | ||||
-rw-r--r-- | actionview/test/activerecord/controller_runtime_test.rb (renamed from actionpack/test/activerecord/controller_runtime_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/activerecord/form_helper_activerecord_test.rb (renamed from actionpack/test/activerecord/form_helper_activerecord_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb (renamed from actionpack/test/activerecord/polymorphic_routes_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/activerecord/render_partial_with_record_identification_test.rb (renamed from actionpack/test/activerecord/render_partial_with_record_identification_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/_top_level_partial.html.erb (renamed from actionpack/test/fixtures/_top_level_partial.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/_top_level_partial_only.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/blog_public/.gitignore (renamed from actionpack/test/fixtures/blog_public/.gitignore) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/blog_public/blog.html (renamed from actionpack/test/fixtures/blog_public/blog.html) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/blog_public/index.html (renamed from actionpack/test/fixtures/blog_public/index.html) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/blog_public/subdir/index.html (renamed from actionpack/test/fixtures/blog_public/subdir/index.html) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/comments/empty.de.html.erb (renamed from actionpack/test/fixtures/comments/empty.de.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/comments/empty.html.builder (renamed from actionpack/test/fixtures/comments/empty.html.builder) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/comments/empty.html.erb (renamed from actionpack/test/fixtures/comments/empty.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/comments/empty.xml.erb (renamed from actionpack/test/fixtures/comments/empty.xml.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/companies.yml (renamed from actionpack/test/fixtures/companies.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/company.rb | 9 | ||||
-rw-r--r-- | actionview/test/fixtures/custom_pattern/another.html.erb (renamed from actionpack/test/fixtures/custom_pattern/another.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/custom_pattern/html/another.erb (renamed from actionpack/test/fixtures/custom_pattern/html/another.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/custom_pattern/html/path.erb (renamed from actionpack/test/fixtures/custom_pattern/html/path.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/customers/_customer.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/db_definitions/sqlite.sql (renamed from actionpack/test/fixtures/db_definitions/sqlite.sql) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/developer.rb (renamed from actionpack/test/fixtures/developer.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/developers.yml (renamed from actionpack/test/fixtures/developers.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/developers/_developer.erb (renamed from actionpack/test/fixtures/developers/_developer.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/developers_projects.yml (renamed from actionpack/test/fixtures/developers_projects.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/comments/_comment.html.erb (renamed from actionpack/test/fixtures/digestor/comments/_comment.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/comments/_comments.html.erb (renamed from actionpack/test/fixtures/digestor/comments/_comments.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/events/_event.html.erb (renamed from actionpack/test/fixtures/digestor/events/_event.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/level/below/_header.html.erb (renamed from actionpack/test/fixtures/digestor/level/below/_header.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/level/below/index.html.erb (renamed from actionpack/test/fixtures/digestor/level/below/index.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/_form.html.erb (renamed from actionpack/test/fixtures/digestor/messages/_form.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/_header.html.erb (renamed from actionpack/test/fixtures/digestor/messages/_header.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/_message.html.erb (renamed from actionpack/test/fixtures/digestor/messages/_message.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/actions/_move.html.erb (renamed from actionpack/test/fixtures/digestor/messages/actions/_move.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/edit.html.erb (renamed from actionpack/test/fixtures/digestor/messages/edit.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/index.html.erb (renamed from actionpack/test/fixtures/digestor/messages/index.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/digestor/messages/show.html.erb (renamed from actionpack/test/fixtures/digestor/messages/show.html.erb) | 6 | ||||
-rw-r--r-- | actionview/test/fixtures/fun/games/_game.erb (renamed from actionpack/test/fixtures/fun/games/_game.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/fun/games/hello_world.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/fun/serious/games/_game.erb (renamed from actionpack/test/fixtures/fun/serious/games/_game.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb | 3 | ||||
-rw-r--r-- | actionview/test/fixtures/games/_game.erb (renamed from actionpack/test/fixtures/games/_game.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/good_customers/_good_customer.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/happy_path/render_action/hello_world.erb (renamed from actionpack/test/fixtures/happy_path/render_action/hello_world.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layout_tests/alt/hello.erb (renamed from actionpack/test/fixtures/layout_tests/alt/hello.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/_column.html.erb (renamed from actionpack/test/fixtures/layouts/_column.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/_customers.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/_partial_and_yield.erb (renamed from actionpack/test/fixtures/layouts/_partial_and_yield.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/_yield_only.erb (renamed from actionpack/test/fixtures/layouts/_yield_only.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/_yield_with_params.erb (renamed from actionpack/test/fixtures/layouts/_yield_with_params.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/streaming.erb (renamed from actionpack/test/fixtures/layouts/streaming.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/yield.erb | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb (renamed from actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb (renamed from actionpack/test/fixtures/layouts/yield_with_render_partial_inside.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/mascot.rb (renamed from actionpack/test/fixtures/mascot.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/mascots.yml (renamed from actionpack/test/fixtures/mascots.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/mascots/_mascot.html.erb (renamed from actionpack/test/fixtures/mascots/_mascot.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/multipart/bracketed_utf8_param | 5 | ||||
-rw-r--r-- | actionview/test/fixtures/multipart/single_utf8_param | 5 | ||||
-rw-r--r-- | actionview/test/fixtures/plain_text.raw (renamed from actionpack/test/fixtures/plain_text.raw) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/plain_text_with_characters.raw (renamed from actionpack/test/fixtures/plain_text_with_characters.raw) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/project.rb (renamed from actionpack/test/fixtures/project.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/projects.yml (renamed from actionpack/test/fixtures/projects.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/projects/_project.erb (renamed from actionpack/test/fixtures/projects/_project.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/.gitignore (renamed from actionpack/test/fixtures/public/.gitignore) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/elsewhere/cools.js (renamed from actionpack/test/fixtures/public/elsewhere/cools.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/elsewhere/file.css (renamed from actionpack/test/fixtures/public/elsewhere/file.css) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/foo/baz.css | 3 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/application.js (renamed from actionpack/test/fixtures/public/javascripts/application.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/bank.js (renamed from actionpack/test/fixtures/public/javascripts/bank.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/common.javascript (renamed from actionpack/test/fixtures/public/javascripts/common.javascript) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/controls.js (renamed from actionpack/test/fixtures/public/javascripts/controls.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/dragdrop.js (renamed from actionpack/test/fixtures/public/javascripts/dragdrop.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/effects.js (renamed from actionpack/test/fixtures/public/javascripts/effects.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/prototype.js (renamed from actionpack/test/fixtures/public/javascripts/prototype.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/robber.js (renamed from actionpack/test/fixtures/public/javascripts/robber.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/subdir/subdir.js (renamed from actionpack/test/fixtures/public/javascripts/subdir/subdir.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/javascripts/version.1.0.js (renamed from actionpack/test/fixtures/public/javascripts/version.1.0.js) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/stylesheets/bank.css (renamed from actionpack/test/fixtures/public/stylesheets/bank.css) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/stylesheets/random.styles (renamed from actionpack/test/fixtures/public/stylesheets/random.styles) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/stylesheets/robber.css (renamed from actionpack/test/fixtures/public/stylesheets/robber.css) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/stylesheets/subdir/subdir.css (renamed from actionpack/test/fixtures/public/stylesheets/subdir/subdir.css) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/public/stylesheets/version.1.0.css (renamed from actionpack/test/fixtures/public/stylesheets/version.1.0.css) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/replies.yml (renamed from actionpack/test/fixtures/replies.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/replies/_reply.erb (renamed from actionpack/test/fixtures/replies/_reply.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/reply.rb (renamed from actionpack/test/fixtures/reply.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/ruby_template.ruby | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/scope/test/modgreet.erb (renamed from actionpack/test/fixtures/scope/test/modgreet.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/shared.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_200.html.erb (renamed from actionpack/test/fixtures/test/_200.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_b_layout_for_partial.html.erb (renamed from actionpack/test/fixtures/test/_b_layout_for_partial.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb (renamed from actionpack/test/fixtures/test/_b_layout_for_partial_with_object.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb (renamed from actionpack/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_changing_priority.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_changing_priority.json.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb (renamed from actionpack/test/fixtures/test/_content_tag_nested_in_content_tag.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_counter.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_customer.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_customer_greeting.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_customer_with_var.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_first_json_partial.json.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_from_helper.erb (renamed from actionpack/test/fixtures/test/_from_helper.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_json_change_priority.json.erb | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_label_with_block.erb (renamed from actionpack/test/fixtures/test/_label_with_block.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_layout_for_block_with_args.html.erb (renamed from actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_layout_for_partial.html.erb | 3 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb (renamed from actionpack/test/fixtures/test/_layout_with_partial_and_yield.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_local_inspector.html.erb (renamed from actionpack/test/fixtures/test/_local_inspector.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_object_inspector.erb (renamed from actionpack/test/fixtures/test/_object_inspector.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_one.html.erb (renamed from actionpack/test/fixtures/test/_one.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial.js.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_name_local_variable.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_only.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_with_layout.erb (renamed from actionpack/test/fixtures/test/_partial_with_layout.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_with_layout_block_content.erb (renamed from actionpack/test/fixtures/test/_partial_with_layout_block_content.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_with_layout_block_partial.erb (renamed from actionpack/test/fixtures/test/_partial_with_layout_block_partial.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_with_only_html_version.html.erb (renamed from actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_partial_with_partial.erb | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_raise.html.erb (renamed from actionpack/test/fixtures/test/_raise.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_raise_indentation.html.erb | 13 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_second_json_partial.json.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_two.html.erb (renamed from actionpack/test/fixtures/test/_two.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_utf8_partial.html.erb (renamed from actionpack/test/fixtures/test/_utf8_partial.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/_utf8_partial_magic.html.erb (renamed from actionpack/test/fixtures/test/_utf8_partial_magic.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/basic.html.erb (renamed from actionpack/test/fixtures/test/basic.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/calling_partial_with_layout.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/change_priority.html.erb | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/test/dont_pick_me (renamed from actionpack/test/fixtures/test/dont_pick_me) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/greeting.xml.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello.builder | 4 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello/hello.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello_world.da.html.erb (renamed from actionpack/test/fixtures/test/hello_world.da.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello_world.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello_world.erb~ (renamed from actionpack/test/fixtures/test/hello_world.erb~) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello_world.pt-BR.html.erb (renamed from actionpack/test/fixtures/test/hello_world.pt-BR.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/hello_world_with_partial.html.erb | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/test/html_template.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/layout_render_file.erb (renamed from actionpack/test/fixtures/test/layout_render_file.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/layout_render_object.erb (renamed from actionpack/test/fixtures/test/layout_render_object.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/list.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/malformed/malformed.en.html.erb~ (renamed from actionpack/test/fixtures/test/malformed/malformed.en.html.erb~) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/malformed/malformed.erb~ (renamed from actionpack/test/fixtures/test/malformed/malformed.erb~) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/malformed/malformed.html.erb~ (renamed from actionpack/test/fixtures/test/malformed/malformed.html.erb~) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/malformed/malformed~ | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/nested_layout.erb (renamed from actionpack/test/fixtures/test/nested_layout.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/nested_streaming.erb (renamed from actionpack/test/fixtures/test/nested_streaming.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/one.html.erb (renamed from actionpack/test/fixtures/test/one.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/render_file_with_ivar.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/render_file_with_locals.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/render_file_with_locals_and_default.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/render_partial_inside_directory.html.erb | 1 | ||||
-rw-r--r-- | actionview/test/fixtures/test/render_two_partials.html.erb | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/test/streaming.erb (renamed from actionpack/test/fixtures/test/streaming.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/streaming_buster.erb (renamed from actionpack/test/fixtures/test/streaming_buster.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/sub_template_raise.html.erb (renamed from actionpack/test/fixtures/test/sub_template_raise.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/template.erb (renamed from actionpack/test/fixtures/test/template.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/update_element_with_capture.erb (renamed from actionpack/test/fixtures/test/update_element_with_capture.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/utf8.html.erb (renamed from actionpack/test/fixtures/test/utf8.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/utf8_magic.html.erb (renamed from actionpack/test/fixtures/test/utf8_magic.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb (renamed from actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/topic.rb (renamed from actionpack/test/fixtures/topic.rb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/topics.yml (renamed from actionpack/test/fixtures/topics.yml) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/topics/_topic.html.erb (renamed from actionpack/test/fixtures/topics/_topic.html.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/translations/templates/array.erb (renamed from actionpack/test/fixtures/translations/templates/array.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/translations/templates/default.erb (renamed from actionpack/test/fixtures/translations/templates/default.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/translations/templates/found.erb (renamed from actionpack/test/fixtures/translations/templates/found.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/translations/templates/missing.erb (renamed from actionpack/test/fixtures/translations/templates/missing.erb) | 0 | ||||
-rw-r--r-- | actionview/test/fixtures/with_format.json.erb (renamed from actionpack/test/fixtures/with_format.json.erb) | 0 | ||||
-rw-r--r-- | actionview/test/lib/controller/fake_controllers.rb | 35 | ||||
-rw-r--r-- | actionview/test/lib/controller/fake_models.rb | 185 | ||||
-rw-r--r-- | actionview/test/template/active_model_helper_test.rb (renamed from actionpack/test/template/active_model_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/asset_tag_helper_test.rb (renamed from actionpack/test/template/asset_tag_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/atom_feed_helper_test.rb (renamed from actionpack/test/template/atom_feed_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/capture_helper_test.rb (renamed from actionpack/test/template/capture_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/compiled_templates_test.rb (renamed from actionpack/test/template/compiled_templates_test.rb) | 1 | ||||
-rw-r--r-- | actionview/test/template/date_helper_i18n_test.rb (renamed from actionpack/test/template/date_helper_i18n_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/date_helper_test.rb (renamed from actionpack/test/template/date_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/debug_helper_test.rb (renamed from actionpack/test/template/debug_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/dependency_tracker_test.rb (renamed from actionpack/test/template/dependency_tracker_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/digestor_test.rb (renamed from actionpack/test/template/digestor_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/erb/form_for_test.rb (renamed from actionpack/test/template/erb/form_for_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/erb/helper.rb (renamed from actionpack/test/template/erb/helper.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/erb/tag_helper_test.rb (renamed from actionpack/test/template/erb/tag_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/erb_util_test.rb (renamed from actionpack/test/template/erb_util_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/form_collections_helper_test.rb (renamed from actionpack/test/template/form_collections_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/form_helper_test.rb (renamed from actionpack/test/template/form_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/form_options_helper_i18n_test.rb (renamed from actionpack/test/template/form_options_helper_i18n_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/form_options_helper_test.rb (renamed from actionpack/test/template/form_options_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb (renamed from actionpack/test/template/form_tag_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/cdata_node_test.rb (renamed from actionpack/test/template/html-scanner/cdata_node_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/document_test.rb (renamed from actionpack/test/template/html-scanner/document_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/node_test.rb (renamed from actionpack/test/template/html-scanner/node_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/sanitizer_test.rb (renamed from actionpack/test/template/html-scanner/sanitizer_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/tag_node_test.rb (renamed from actionpack/test/template/html-scanner/tag_node_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/text_node_test.rb (renamed from actionpack/test/template/html-scanner/text_node_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/html-scanner/tokenizer_test.rb (renamed from actionpack/test/template/html-scanner/tokenizer_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/javascript_helper_test.rb (renamed from actionpack/test/template/javascript_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/log_subscriber_test.rb (renamed from actionpack/test/template/log_subscriber_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/lookup_context_test.rb (renamed from actionpack/test/template/lookup_context_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/number_helper_test.rb (renamed from actionpack/test/template/number_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/output_buffer_test.rb (renamed from actionpack/test/template/output_buffer_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/output_safety_helper_test.rb (renamed from actionpack/test/template/output_safety_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/record_identifier_test.rb (renamed from actionpack/test/template/record_identifier_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/record_tag_helper_test.rb (renamed from actionpack/test/template/record_tag_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/render_test.rb (renamed from actionpack/test/template/render_test.rb) | 1 | ||||
-rw-r--r-- | actionview/test/template/resolver_patterns_test.rb (renamed from actionpack/test/template/resolver_patterns_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/sanitize_helper_test.rb (renamed from actionpack/test/template/sanitize_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/streaming_render_test.rb (renamed from actionpack/test/template/streaming_render_test.rb) | 1 | ||||
-rw-r--r-- | actionview/test/template/tag_helper_test.rb (renamed from actionpack/test/template/tag_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/template_error_test.rb (renamed from actionpack/test/template/template_error_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/template_test.rb (renamed from actionpack/test/template/template_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/test_case_test.rb (renamed from actionpack/test/template/test_case_test.rb) | 1 | ||||
-rw-r--r-- | actionview/test/template/test_test.rb (renamed from actionpack/test/template/test_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/testing/fixture_resolver_test.rb (renamed from actionpack/test/template/testing/fixture_resolver_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/testing/null_resolver_test.rb (renamed from actionpack/test/template/testing/null_resolver_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/text_helper_test.rb (renamed from actionpack/test/template/text_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/translation_helper_test.rb (renamed from actionpack/test/template/translation_helper_test.rb) | 0 | ||||
-rw-r--r-- | actionview/test/template/url_helper_test.rb (renamed from actionpack/test/template/url_helper_test.rb) | 1 | ||||
-rwxr-xr-x | ci/travis.rb | 3 | ||||
-rw-r--r-- | rails.gemspec | 1 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 2 |
337 files changed, 1040 insertions, 66 deletions
diff --git a/.travis.yml b/.travis.yml index 5214b989af..012e795caa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ rvm: - 2.0.0 env: - "GEM=railties" - - "GEM=ap,am,amo,as" + - "GEM=ap,am,amo,as,av" - "GEM=ar:mysql" - "GEM=ar:mysql2" - "GEM=ar:sqlite3" diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index b1c5987fe4..0e54b33168 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,38 +1,5 @@ -* Use a case insensitive URI Regexp for #asset_path. +* ActionView extracted from ActionPack - This fix a problem where the same asset path using different case are generating - different URIs. - - Before: - - image_tag("HTTP://google.com") - # => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />" - image_tag("http://google.com") - # => "<img alt=\"Google\" src=\"http://google.com\" />" - - After: - - image_tag("HTTP://google.com") - # => "<img alt=\"Google\" src=\"HTTP://google.com\" />" - image_tag("http://google.com") - # => "<img alt=\"Google\" src=\"http://google.com\" />" - - *David Celis* - -* Element of the `collection_check_boxes` and `collection_radio_buttons` can - optionally contain html attributes as the last element of the array. - - *Vasiliy Ermolovich* - -* Update the HTML `BOOLEAN_ATTRIBUTES` in `ActionView::Helpers::TagHelper` - to conform to the latest HTML 5.1 spec. Add attributes `allowfullscreen`, - `default`, `inert`, `sortable`, `truespeed`, `typemustmatch`. Fix attribute - `seamless` (previously misspelled `seemless`). - - *Alex Peattie* - -* Fix an issue where partials with a number in the filename weren't being digested for cache dependencies. - - *Bryan Ricker* + *Piotr Sarnacki*, *Łukasz Strzałkowski* Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/actionpack/CHANGELOG.md) for previous changes. diff --git a/actionpack/Rakefile b/actionpack/Rakefile index 56fc92963a..567d7b589f 100644 --- a/actionpack/Rakefile +++ b/actionpack/Rakefile @@ -7,14 +7,14 @@ task :default => :test # Run the unit tests desc "Run all unit tests" -task :test => [:test_action_pack, :test_active_record_integration] +task :test => [:test_action_pack] Rake::TestTask.new(:test_action_pack) do |t| t.libs << 'test' # make sure we include the tests in alphabetical order as on some systems # this will not happen automatically and the tests (as a whole) will error - t.test_files = Dir.glob('test/{abstract,controller,dispatch,template,assertions,journey}/**/*_test.rb').sort + t.test_files = Dir.glob('test/{abstract,controller,dispatch,assertions,journey}/**/*_test.rb').sort t.warning = true t.verbose = true @@ -23,25 +23,12 @@ end namespace :test do task :isolated do ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) - Dir.glob("test/{abstract,controller,dispatch,template}/**/*_test.rb").all? do |file| + Dir.glob("test/{abstract,controller,dispatch}/**/*_test.rb").all? do |file| sh(ruby, '-Ilib:test', file) end or raise "Failures" end end -namespace :test do - Rake::TestTask.new(:template) do |t| - t.libs << 'test' - t.pattern = 'test/template/**/*.rb' - end -end - -desc 'ActiveRecord Integration Tests' -Rake::TestTask.new(:test_active_record_integration) do |t| - t.libs << 'test' - t.test_files = Dir.glob("test/activerecord/*_test.rb") -end - spec = eval(File.read('actionpack.gemspec')) Gem::PackageTask.new(spec) do |p| diff --git a/actionpack/actionpack.gemspec b/actionpack/actionpack.gemspec index cc8351a489..e3aa84ba0f 100644 --- a/actionpack/actionpack.gemspec +++ b/actionpack/actionpack.gemspec @@ -20,10 +20,10 @@ Gem::Specification.new do |s| s.requirements << 'none' s.add_dependency 'activesupport', version - s.add_dependency 'builder', '~> 3.1.0' + s.add_dependency 'actionview', version + s.add_dependency 'rack', '~> 1.5.2' s.add_dependency 'rack-test', '~> 0.6.2' - s.add_dependency 'erubis', '~> 2.7.0' s.add_development_dependency 'activemodel', version s.add_development_dependency 'tzinfo', '~> 0.3.37' diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index ca86837a2c..e521c6ce96 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -1,6 +1,5 @@ require 'fileutils' require 'abstract_unit' -require 'active_record_unit' CACHE_DIR = 'test_cache' # Don't change '/../temp/' cavalierly or you might hose something you don't want hosed diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md new file mode 100644 index 0000000000..135a96621d --- /dev/null +++ b/actionview/CHANGELOG.md @@ -0,0 +1,42 @@ +* Use a case insensitive URI Regexp for #asset_path. + + This fix a problem where the same asset path using different case are generating + different URIs. + + Before: + + image_tag("HTTP://google.com") + # => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />" + image_tag("http://google.com") + # => "<img alt=\"Google\" src=\"http://google.com\" />" + + After: + + image_tag("HTTP://google.com") + # => "<img alt=\"Google\" src=\"HTTP://google.com\" />" + image_tag("http://google.com") + # => "<img alt=\"Google\" src=\"http://google.com\" />" + + *David Celis* + +* Element of the `collection_check_boxes` and `collection_radio_buttons` can + optionally contain html attributes as the last element of the array. + + *Vasiliy Ermolovich* + +* Update the HTML `BOOLEAN_ATTRIBUTES` in `ActionView::Helpers::TagHelper` + to conform to the latest HTML 5.1 spec. Add attributes `allowfullscreen`, + `default`, `inert`, `sortable`, `truespeed`, `typemustmatch`. Fix attribute + `seamless` (previously misspelled `seemless`). + + *Alex Peattie* + +* Fix an issue where partials with a number in the filename weren't being digested for cache dependencies. + + *Bryan Ricker* + +* First release, ActionView extracted from ActionPack + + *Piotr Sarnacki*, *Łukasz Strzałkowski* + +Please check [4-0-stable (ActionPack's CHANGELOG)](https://github.com/rails/rails/blob/4-0-stable/actionpack/CHANGELOG.md) for previous changes.
\ No newline at end of file diff --git a/actionview/MIT-LICENSE b/actionview/MIT-LICENSE new file mode 100644 index 0000000000..810daf856c --- /dev/null +++ b/actionview/MIT-LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2004-2012 David Heinemeier Hansson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/actionview/README.rdoc b/actionview/README.rdoc new file mode 100644 index 0000000000..09bbfdae0b --- /dev/null +++ b/actionview/README.rdoc @@ -0,0 +1,31 @@ += Action View + + + +== Download and installation + +The latest version of Action View can be installed with RubyGems: + + % [sudo] gem install actionview + +Source code can be downloaded as part of the Rails project on GitHub + +* https://github.com/rails/rails/tree/master/actionview + + +== License + +Action View is released under the MIT license: + +* http://www.opensource.org/licenses/MIT + + +== Support + +API documentation is at + +* http://api.rubyonrails.org + +Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here: + +* https://github.com/rails/rails/issues diff --git a/actionview/RUNNING_UNIT_TESTS b/actionview/RUNNING_UNIT_TESTS new file mode 100644 index 0000000000..a0c35e1810 --- /dev/null +++ b/actionview/RUNNING_UNIT_TESTS @@ -0,0 +1,27 @@ +== Running with Rake + +The easiest way to run the unit tests is through Rake. The default task runs +the entire test suite for all classes. For more information, checkout the +full array of rake tasks with "rake -T" + +Rake can be found at http://rake.rubyforge.org + +== Running by hand + +To run a single test suite + + rake test TEST=path/to/test.rb + +which can be further narrowed down to one test: + + rake test TEST=path/to/test.rb TESTOPTS="--name=test_something" + +== Dependency on Active Record and database setup + +Test cases in the test/active_record/ directory depend on having +activerecord and sqlite installed. If Active Record is not in +actionview/../activerecord directory, or the sqlite rubygem is not installed, +these tests are skipped. + +Other tests are runnable from a fresh copy of actionview without any configuration. + diff --git a/actionview/Rakefile b/actionview/Rakefile new file mode 100644 index 0000000000..087b249dfe --- /dev/null +++ b/actionview/Rakefile @@ -0,0 +1,79 @@ +require 'rake/testtask' +require 'rake/packagetask' +require 'rubygems/package_task' + +desc "Default Task" +task :default => :test + +# Run the unit tests + +desc "Run all unit tests" +task :test => [:test_action_view, :test_active_record_integration] + +Rake::TestTask.new(:test_action_view) do |t| + t.libs << 'test' + + # make sure we include the tests in alphabetical order as on some systems + # this will not happen automatically and the tests (as a whole) will error + t.test_files = Dir.glob('test/template/**/*_test.rb').sort + + t.warning = true + t.verbose = true +end + +namespace :test do + task :isolated do + ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) + Dir.glob("test/{active_record,template}/**/*_test.rb").all? do |file| + sh(ruby, '-Ilib:test', file) + end or raise "Failures" + end + + Rake::TestTask.new(:template) do |t| + t.libs << 'test' + t.pattern = 'test/template/**/*.rb' + end +end + +desc 'ActiveRecord Integration Tests' +Rake::TestTask.new(:test_active_record_integration) do |t| + t.libs << 'test' + t.test_files = Dir.glob("test/activerecord/*_test.rb") +end + +spec = eval(File.read('actionview.gemspec')) + +Gem::PackageTask.new(spec) do |p| + p.gem_spec = spec +end + +desc "Release to gemcutter" +task :release => :package do + require 'rake/gemcutter' + Rake::Gemcutter::Tasks.new(spec).define + Rake::Task['gem:push'].invoke +end + +task :lines do + lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 + + FileList["lib/**/*.rb"].each do |file_name| + next if file_name =~ /vendor/ + File.open(file_name, 'r') do |f| + while line = f.gets + lines += 1 + next if line =~ /^\s*$/ + next if line =~ /^\s*#/ + codelines += 1 + end + end + puts "L: #{sprintf("%4d", lines)}, LOC #{sprintf("%4d", codelines)} | #{file_name}" + + total_lines += lines + total_codelines += codelines + + lines, codelines = 0, 0 + end + + puts "Total: Lines #{total_lines}, LOC #{total_codelines}" +end diff --git a/actionview/actionview.gemspec b/actionview/actionview.gemspec new file mode 100644 index 0000000000..87cb568300 --- /dev/null +++ b/actionview/actionview.gemspec @@ -0,0 +1,29 @@ +version = File.read(File.expand_path("../../RAILS_VERSION", __FILE__)).strip + +Gem::Specification.new do |s| + s.platform = Gem::Platform::RUBY + s.name = 'actionview' + s.version = version + s.summary = 'Rendering framework putting the V in MVC (part of Rails).' + s.description = '' + + s.required_ruby_version = '>= 1.9.3' + + s.license = 'MIT' + + s.author = 'David Heinemeier Hansson' + s.email = 'david@loudthinking.com' + s.homepage = 'http://www.rubyonrails.org' + + s.files = Dir['CHANGELOG.md', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*'] + s.require_path = 'lib' + s.requirements << 'none' + + s.add_dependency 'activesupport', version + s.add_dependency 'activemodel', version + + s.add_dependency 'builder', '~> 3.1.0' + s.add_dependency 'erubis', '~> 2.7.0' + + s.add_development_dependency 'actionpack', version +end diff --git a/actionpack/lib/action_view.rb b/actionview/lib/action_view.rb index 4aafbcb655..8def4ba7c5 100644 --- a/actionpack/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -23,7 +23,6 @@ require 'active_support' require 'active_support/rails' -require 'action_pack' module ActionView extend ActiveSupport::Autoload diff --git a/actionpack/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 08253de3f4..08253de3f4 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb diff --git a/actionpack/lib/action_view/buffers.rb b/actionview/lib/action_view/buffers.rb index 361a0dccbe..361a0dccbe 100644 --- a/actionpack/lib/action_view/buffers.rb +++ b/actionview/lib/action_view/buffers.rb diff --git a/actionpack/lib/action_view/context.rb b/actionview/lib/action_view/context.rb index ee263df484..ee263df484 100644 --- a/actionpack/lib/action_view/context.rb +++ b/actionview/lib/action_view/context.rb diff --git a/actionpack/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index b2e8334077..b2e8334077 100644 --- a/actionpack/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb diff --git a/actionpack/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 9324a1ac50..9324a1ac50 100644 --- a/actionpack/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb diff --git a/actionpack/lib/action_view/flows.rb b/actionview/lib/action_view/flows.rb index c0e458cd41..c0e458cd41 100644 --- a/actionpack/lib/action_view/flows.rb +++ b/actionview/lib/action_view/flows.rb diff --git a/actionpack/lib/action_view/helpers.rb b/actionview/lib/action_view/helpers.rb index 8a78685ae1..8a78685ae1 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionview/lib/action_view/helpers.rb diff --git a/actionpack/lib/action_view/helpers/active_model_helper.rb b/actionview/lib/action_view/helpers/active_model_helper.rb index 901f433c70..901f433c70 100644 --- a/actionpack/lib/action_view/helpers/active_model_helper.rb +++ b/actionview/lib/action_view/helpers/active_model_helper.rb diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index 2b3a3c6a29..2b3a3c6a29 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb diff --git a/actionpack/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index 0b957adb91..0b957adb91 100644 --- a/actionpack/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb diff --git a/actionpack/lib/action_view/helpers/atom_feed_helper.rb b/actionview/lib/action_view/helpers/atom_feed_helper.rb index 42b1dd8933..42b1dd8933 100644 --- a/actionpack/lib/action_view/helpers/atom_feed_helper.rb +++ b/actionview/lib/action_view/helpers/atom_feed_helper.rb diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index 8fc78ea7fb..8fc78ea7fb 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 5afe435459..5afe435459 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb diff --git a/actionpack/lib/action_view/helpers/controller_helper.rb b/actionview/lib/action_view/helpers/controller_helper.rb index 74ef25f7c1..74ef25f7c1 100644 --- a/actionpack/lib/action_view/helpers/controller_helper.rb +++ b/actionview/lib/action_view/helpers/controller_helper.rb diff --git a/actionpack/lib/action_view/helpers/csrf_helper.rb b/actionview/lib/action_view/helpers/csrf_helper.rb index eeb0ed94b9..eeb0ed94b9 100644 --- a/actionpack/lib/action_view/helpers/csrf_helper.rb +++ b/actionview/lib/action_view/helpers/csrf_helper.rb diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 8fb5eb1548..8fb5eb1548 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionview/lib/action_view/helpers/debug_helper.rb index c29c1b1eea..c29c1b1eea 100644 --- a/actionpack/lib/action_view/helpers/debug_helper.rb +++ b/actionview/lib/action_view/helpers/debug_helper.rb diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index f64c0ca30b..f64c0ca30b 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index ad26505086..ad26505086 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 3fa7696b83..3fa7696b83 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index e475d5b018..e475d5b018 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index fda7038a5d..fda7038a5d 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb diff --git a/actionpack/lib/action_view/helpers/output_safety_helper.rb b/actionview/lib/action_view/helpers/output_safety_helper.rb index 60a4478c26..60a4478c26 100644 --- a/actionpack/lib/action_view/helpers/output_safety_helper.rb +++ b/actionview/lib/action_view/helpers/output_safety_helper.rb diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionview/lib/action_view/helpers/record_tag_helper.rb index f767957fa9..f767957fa9 100644 --- a/actionpack/lib/action_view/helpers/record_tag_helper.rb +++ b/actionview/lib/action_view/helpers/record_tag_helper.rb diff --git a/actionpack/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index 458086de96..458086de96 100644 --- a/actionpack/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb diff --git a/actionpack/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb index e5cb843670..e5cb843670 100644 --- a/actionpack/lib/action_view/helpers/sanitize_helper.rb +++ b/actionview/lib/action_view/helpers/sanitize_helper.rb diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 732f35643a..732f35643a 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb diff --git a/actionpack/lib/action_view/helpers/tags.rb b/actionview/lib/action_view/helpers/tags.rb index a05e16979a..a05e16979a 100644 --- a/actionpack/lib/action_view/helpers/tags.rb +++ b/actionview/lib/action_view/helpers/tags.rb diff --git a/actionpack/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb index 3fe3f4e9df..3fe3f4e9df 100644 --- a/actionpack/lib/action_view/helpers/tags/base.rb +++ b/actionview/lib/action_view/helpers/tags/base.rb diff --git a/actionpack/lib/action_view/helpers/tags/check_box.rb b/actionview/lib/action_view/helpers/tags/check_box.rb index 6d51f2629a..6d51f2629a 100644 --- a/actionpack/lib/action_view/helpers/tags/check_box.rb +++ b/actionview/lib/action_view/helpers/tags/check_box.rb diff --git a/actionpack/lib/action_view/helpers/tags/checkable.rb b/actionview/lib/action_view/helpers/tags/checkable.rb index 052e9df662..052e9df662 100644 --- a/actionpack/lib/action_view/helpers/tags/checkable.rb +++ b/actionview/lib/action_view/helpers/tags/checkable.rb diff --git a/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index 52006d856b..52006d856b 100644 --- a/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb diff --git a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb index 388dcf1f13..388dcf1f13 100644 --- a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb diff --git a/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index 20be34c1f2..20be34c1f2 100644 --- a/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb diff --git a/actionpack/lib/action_view/helpers/tags/collection_select.rb b/actionview/lib/action_view/helpers/tags/collection_select.rb index 6cb2b2e0d3..6cb2b2e0d3 100644 --- a/actionpack/lib/action_view/helpers/tags/collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/collection_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/color_field.rb b/actionview/lib/action_view/helpers/tags/color_field.rb index d8fc797035..d8fc797035 100644 --- a/actionpack/lib/action_view/helpers/tags/color_field.rb +++ b/actionview/lib/action_view/helpers/tags/color_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/date_field.rb b/actionview/lib/action_view/helpers/tags/date_field.rb index c22be0db29..c22be0db29 100644 --- a/actionpack/lib/action_view/helpers/tags/date_field.rb +++ b/actionview/lib/action_view/helpers/tags/date_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/date_select.rb b/actionview/lib/action_view/helpers/tags/date_select.rb index 0c4ac40070..0c4ac40070 100644 --- a/actionpack/lib/action_view/helpers/tags/date_select.rb +++ b/actionview/lib/action_view/helpers/tags/date_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb index 9a2279c611..9a2279c611 100644 --- a/actionpack/lib/action_view/helpers/tags/datetime_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/datetime_local_field.rb b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb index b4a74185d1..b4a74185d1 100644 --- a/actionpack/lib/action_view/helpers/tags/datetime_local_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/datetime_select.rb b/actionview/lib/action_view/helpers/tags/datetime_select.rb index 563de1840e..563de1840e 100644 --- a/actionpack/lib/action_view/helpers/tags/datetime_select.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/email_field.rb b/actionview/lib/action_view/helpers/tags/email_field.rb index 7ce3ccb9bf..7ce3ccb9bf 100644 --- a/actionpack/lib/action_view/helpers/tags/email_field.rb +++ b/actionview/lib/action_view/helpers/tags/email_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/file_field.rb b/actionview/lib/action_view/helpers/tags/file_field.rb index 476b820d84..476b820d84 100644 --- a/actionpack/lib/action_view/helpers/tags/file_field.rb +++ b/actionview/lib/action_view/helpers/tags/file_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/grouped_collection_select.rb b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb index 2ed4712dac..2ed4712dac 100644 --- a/actionpack/lib/action_view/helpers/tags/grouped_collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/hidden_field.rb b/actionview/lib/action_view/helpers/tags/hidden_field.rb index c3757c2461..c3757c2461 100644 --- a/actionpack/lib/action_view/helpers/tags/hidden_field.rb +++ b/actionview/lib/action_view/helpers/tags/hidden_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index 35d3ba8434..35d3ba8434 100644 --- a/actionpack/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb diff --git a/actionpack/lib/action_view/helpers/tags/month_field.rb b/actionview/lib/action_view/helpers/tags/month_field.rb index 4c0fb846ee..4c0fb846ee 100644 --- a/actionpack/lib/action_view/helpers/tags/month_field.rb +++ b/actionview/lib/action_view/helpers/tags/month_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/number_field.rb b/actionview/lib/action_view/helpers/tags/number_field.rb index 4f95b1b4de..4f95b1b4de 100644 --- a/actionpack/lib/action_view/helpers/tags/number_field.rb +++ b/actionview/lib/action_view/helpers/tags/number_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/password_field.rb b/actionview/lib/action_view/helpers/tags/password_field.rb index 6099fa6f19..6099fa6f19 100644 --- a/actionpack/lib/action_view/helpers/tags/password_field.rb +++ b/actionview/lib/action_view/helpers/tags/password_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/radio_button.rb b/actionview/lib/action_view/helpers/tags/radio_button.rb index 4849c537a5..4849c537a5 100644 --- a/actionpack/lib/action_view/helpers/tags/radio_button.rb +++ b/actionview/lib/action_view/helpers/tags/radio_button.rb diff --git a/actionpack/lib/action_view/helpers/tags/range_field.rb b/actionview/lib/action_view/helpers/tags/range_field.rb index f98ae88043..f98ae88043 100644 --- a/actionpack/lib/action_view/helpers/tags/range_field.rb +++ b/actionview/lib/action_view/helpers/tags/range_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/search_field.rb b/actionview/lib/action_view/helpers/tags/search_field.rb index c09e2f1be7..c09e2f1be7 100644 --- a/actionpack/lib/action_view/helpers/tags/search_field.rb +++ b/actionview/lib/action_view/helpers/tags/search_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index d64e2f68ef..d64e2f68ef 100644 --- a/actionpack/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb diff --git a/actionpack/lib/action_view/helpers/tags/tel_field.rb b/actionview/lib/action_view/helpers/tags/tel_field.rb index 987bb9e67a..987bb9e67a 100644 --- a/actionpack/lib/action_view/helpers/tags/tel_field.rb +++ b/actionview/lib/action_view/helpers/tags/tel_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/text_area.rb b/actionview/lib/action_view/helpers/tags/text_area.rb index c81156c0c8..c81156c0c8 100644 --- a/actionpack/lib/action_view/helpers/tags/text_area.rb +++ b/actionview/lib/action_view/helpers/tags/text_area.rb diff --git a/actionpack/lib/action_view/helpers/tags/text_field.rb b/actionview/lib/action_view/helpers/tags/text_field.rb index baa5ff768e..baa5ff768e 100644 --- a/actionpack/lib/action_view/helpers/tags/text_field.rb +++ b/actionview/lib/action_view/helpers/tags/text_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/time_field.rb b/actionview/lib/action_view/helpers/tags/time_field.rb index 0e90a3aed7..0e90a3aed7 100644 --- a/actionpack/lib/action_view/helpers/tags/time_field.rb +++ b/actionview/lib/action_view/helpers/tags/time_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/time_select.rb b/actionview/lib/action_view/helpers/tags/time_select.rb index 0b06311d25..0b06311d25 100644 --- a/actionpack/lib/action_view/helpers/tags/time_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/time_zone_select.rb b/actionview/lib/action_view/helpers/tags/time_zone_select.rb index 80d165ec7e..80d165ec7e 100644 --- a/actionpack/lib/action_view/helpers/tags/time_zone_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_zone_select.rb diff --git a/actionpack/lib/action_view/helpers/tags/url_field.rb b/actionview/lib/action_view/helpers/tags/url_field.rb index d76340178d..d76340178d 100644 --- a/actionpack/lib/action_view/helpers/tags/url_field.rb +++ b/actionview/lib/action_view/helpers/tags/url_field.rb diff --git a/actionpack/lib/action_view/helpers/tags/week_field.rb b/actionview/lib/action_view/helpers/tags/week_field.rb index 5b3d0494e9..5b3d0494e9 100644 --- a/actionpack/lib/action_view/helpers/tags/week_field.rb +++ b/actionview/lib/action_view/helpers/tags/week_field.rb diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index 147f9fd8ed..147f9fd8ed 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index ad8eb47f1f..ad8eb47f1f 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 19e5941971..19e5941971 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb diff --git a/actionpack/lib/action_view/locale/en.yml b/actionview/lib/action_view/locale/en.yml index 8a56f147b8..8a56f147b8 100644 --- a/actionpack/lib/action_view/locale/en.yml +++ b/actionview/lib/action_view/locale/en.yml diff --git a/actionpack/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index fd9a543e0a..fd9a543e0a 100644 --- a/actionpack/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index f9d5b97fe3..f9d5b97fe3 100644 --- a/actionpack/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb diff --git a/actionpack/lib/action_view/model_naming.rb b/actionview/lib/action_view/model_naming.rb index e09ebd60df..e09ebd60df 100644 --- a/actionpack/lib/action_view/model_naming.rb +++ b/actionview/lib/action_view/model_naming.rb diff --git a/actionpack/lib/action_view/path_set.rb b/actionview/lib/action_view/path_set.rb index 91ee2ea8f5..91ee2ea8f5 100644 --- a/actionpack/lib/action_view/path_set.rb +++ b/actionview/lib/action_view/path_set.rb diff --git a/actionpack/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index e80e0ed9b0..e80e0ed9b0 100644 --- a/actionpack/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb diff --git a/actionpack/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb index 63f645431a..63f645431a 100644 --- a/actionpack/lib/action_view/record_identifier.rb +++ b/actionview/lib/action_view/record_identifier.rb diff --git a/actionpack/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index 73c19a0ae2..73c19a0ae2 100644 --- a/actionpack/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb diff --git a/actionpack/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 821026268a..821026268a 100644 --- a/actionpack/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb diff --git a/actionpack/lib/action_view/renderer/renderer.rb b/actionview/lib/action_view/renderer/renderer.rb index 964b18337e..964b18337e 100644 --- a/actionpack/lib/action_view/renderer/renderer.rb +++ b/actionview/lib/action_view/renderer/renderer.rb diff --git a/actionpack/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index 9cf6eb0c65..9cf6eb0c65 100644 --- a/actionpack/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 4d5c5db80c..4d5c5db80c 100644 --- a/actionpack/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb diff --git a/actionpack/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb index f10e7e88ba..f10e7e88ba 100644 --- a/actionpack/lib/action_view/routing_url_for.rb +++ b/actionview/lib/action_view/routing_url_for.rb diff --git a/actionpack/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index e2c50fec47..e2c50fec47 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb diff --git a/actionpack/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb index a89d51221e..a89d51221e 100644 --- a/actionpack/lib/action_view/template/error.rb +++ b/actionview/lib/action_view/template/error.rb diff --git a/actionpack/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb index d9cddc0040..d9cddc0040 100644 --- a/actionpack/lib/action_view/template/handlers.rb +++ b/actionview/lib/action_view/template/handlers.rb diff --git a/actionpack/lib/action_view/template/handlers/builder.rb b/actionview/lib/action_view/template/handlers/builder.rb index d90b0c6378..d90b0c6378 100644 --- a/actionpack/lib/action_view/template/handlers/builder.rb +++ b/actionview/lib/action_view/template/handlers/builder.rb diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb index 7d7a7af51d..c8a0059596 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionview/lib/action_view/template/handlers/erb.rb @@ -1,4 +1,3 @@ -require 'action_dispatch/http/mime_type' require 'erubis' module ActionView diff --git a/actionpack/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index 0c0d1fffcb..0c0d1fffcb 100644 --- a/actionpack/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 3304605c1a..3304605c1a 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb diff --git a/actionpack/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 859c7bc3ce..859c7bc3ce 100644 --- a/actionpack/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb diff --git a/actionpack/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index db77cb5d19..db77cb5d19 100644 --- a/actionpack/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb diff --git a/actionpack/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 3145446114..3145446114 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb diff --git a/actionpack/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 7afa2fa613..7afa2fa613 100644 --- a/actionpack/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner.rb b/actionview/lib/action_view/vendor/html-scanner.rb index 775b827529..775b827529 100644 --- a/actionpack/lib/action_view/vendor/html-scanner.rb +++ b/actionview/lib/action_view/vendor/html-scanner.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/document.rb b/actionview/lib/action_view/vendor/html-scanner/html/document.rb index 386820300a..386820300a 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/document.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/document.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/node.rb b/actionview/lib/action_view/vendor/html-scanner/html/node.rb index 7e7cd4f7b6..7e7cd4f7b6 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/node.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/node.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/sanitizer.rb b/actionview/lib/action_view/vendor/html-scanner/html/sanitizer.rb index 30b6b8b141..30b6b8b141 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/sanitizer.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/sanitizer.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/selector.rb b/actionview/lib/action_view/vendor/html-scanner/html/selector.rb index 7f8609c408..7f8609c408 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/selector.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/selector.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/tokenizer.rb b/actionview/lib/action_view/vendor/html-scanner/html/tokenizer.rb index 8ac8d34430..8ac8d34430 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/tokenizer.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/tokenizer.rb diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/version.rb b/actionview/lib/action_view/vendor/html-scanner/html/version.rb index 6d645c3e14..6d645c3e14 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/version.rb +++ b/actionview/lib/action_view/vendor/html-scanner/html/version.rb diff --git a/actionview/lib/action_view/version.rb b/actionview/lib/action_view/version.rb new file mode 100644 index 0000000000..094dd474df --- /dev/null +++ b/actionview/lib/action_view/version.rb @@ -0,0 +1,11 @@ +module ActionView + # Returns the version of the currently loaded ActionView as a Gem::Version + def self.version + Gem::Version.new "4.1.0.beta" + end + + module VERSION #:nodoc: + MAJOR, MINOR, TINY, PRE = ActionView.version.segments + STRING = ActionView.version.to_s + end +end diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb new file mode 100644 index 0000000000..8213997f4e --- /dev/null +++ b/actionview/test/abstract_unit.rb @@ -0,0 +1,382 @@ +require File.expand_path('../../../load_paths', __FILE__) + +$:.unshift(File.dirname(__FILE__) + '/lib') +$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') +$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers') + +ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp') + +require 'active_support/core_ext/kernel/reporting' + +# These are the normal settings that will be set up by Railties +# TODO: Have these tests support other combinations of these values +silence_warnings do + Encoding.default_internal = "UTF-8" + Encoding.default_external = "UTF-8" +end + +require 'active_support/testing/autorun' +require 'abstract_controller' +require 'action_controller' +require 'action_view' +require 'action_view/testing/resolvers' +require 'action_dispatch' +require 'active_support/dependencies' +require 'active_model' +require 'active_record' +require 'action_controller/caching' + +require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late + +module Rails + class << self + def env + @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test") + end + end +end + +ActiveSupport::Dependencies.hook! + +Thread.abort_on_exception = true + +# Show backtraces for deprecated behavior for quicker cleanup. +ActiveSupport::Deprecation.debug = true + +# Register danish language for testing +I18n.backend.store_translations 'da', {} +I18n.backend.store_translations 'pt-BR', {} +ORIGINAL_LOCALES = I18n.available_locales.map {|locale| locale.to_s }.sort + +FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') +FIXTURES = Pathname.new(FIXTURE_LOAD_PATH) + +module RackTestUtils + def body_to_string(body) + if body.respond_to?(:each) + str = "" + body.each {|s| str << s } + str + else + body + end + end + extend self +end + +module RenderERBUtils + def view + @view ||= begin + path = ActionView::FileSystemResolver.new(FIXTURE_LOAD_PATH) + view_paths = ActionView::PathSet.new([path]) + ActionView::Base.new(view_paths) + end + end + + def render_erb(string) + @virtual_path = nil + + template = ActionView::Template.new( + string.strip, + "test template", + ActionView::Template::Handlers::ERB, + {}) + + template.render(self, {}).strip + end +end + +SharedTestRoutes = ActionDispatch::Routing::RouteSet.new + +module ActionDispatch + module SharedRoutes + def before_setup + @routes = SharedTestRoutes + super + end + end + + # Hold off drawing routes until all the possible controller classes + # have been loaded. + module DrawOnce + class << self + attr_accessor :drew + end + self.drew = false + + def before_setup + super + return if DrawOnce.drew + + SharedTestRoutes.draw do + get ':controller(/:action)' + end + + ActionDispatch::IntegrationTest.app.routes.draw do + get ':controller(/:action)' + end + + DrawOnce.drew = true + end + end +end + +module ActiveSupport + class TestCase + include ActionDispatch::DrawOnce + end +end + +class RoutedRackApp + attr_reader :routes + + def initialize(routes, &blk) + @routes = routes + @stack = ActionDispatch::MiddlewareStack.new(&blk).build(@routes) + end + + def call(env) + @stack.call(env) + end +end + +class BasicController + attr_accessor :request + + def config + @config ||= ActiveSupport::InheritableOptions.new(ActionController::Base.config).tap do |config| + # VIEW TODO: View tests should not require a controller + public_dir = File.expand_path("../fixtures/public", __FILE__) + config.assets_dir = public_dir + config.javascripts_dir = "#{public_dir}/javascripts" + config.stylesheets_dir = "#{public_dir}/stylesheets" + config.assets = ActiveSupport::InheritableOptions.new({ :prefix => "assets" }) + config + end + end +end + +class ActionDispatch::IntegrationTest < ActiveSupport::TestCase + include ActionDispatch::SharedRoutes + + def self.build_app(routes = nil) + RoutedRackApp.new(routes || ActionDispatch::Routing::RouteSet.new) do |middleware| + middleware.use "ActionDispatch::ShowExceptions", ActionDispatch::PublicExceptions.new("#{FIXTURE_LOAD_PATH}/public") + middleware.use "ActionDispatch::DebugExceptions" + middleware.use "ActionDispatch::Callbacks" + middleware.use "ActionDispatch::ParamsParser" + middleware.use "ActionDispatch::Cookies" + middleware.use "ActionDispatch::Flash" + middleware.use "Rack::Head" + yield(middleware) if block_given? + end + end + + self.app = build_app + + # Stub Rails dispatcher so it does not get controller references and + # simply return the controller#action as Rack::Body. + class StubDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher + protected + def controller_reference(controller_param) + controller_param + end + + def dispatch(controller, action, env) + [200, {'Content-Type' => 'text/html'}, ["#{controller}##{action}"]] + end + end + + def self.stub_controllers + old_dispatcher = ActionDispatch::Routing::RouteSet::Dispatcher + ActionDispatch::Routing::RouteSet.module_eval { remove_const :Dispatcher } + ActionDispatch::Routing::RouteSet.module_eval { const_set :Dispatcher, StubDispatcher } + yield ActionDispatch::Routing::RouteSet.new + ensure + ActionDispatch::Routing::RouteSet.module_eval { remove_const :Dispatcher } + ActionDispatch::Routing::RouteSet.module_eval { const_set :Dispatcher, old_dispatcher } + end + + def with_routing(&block) + temporary_routes = ActionDispatch::Routing::RouteSet.new + old_app, self.class.app = self.class.app, self.class.build_app(temporary_routes) + old_routes = SharedTestRoutes + silence_warnings { Object.const_set(:SharedTestRoutes, temporary_routes) } + + yield temporary_routes + ensure + self.class.app = old_app + silence_warnings { Object.const_set(:SharedTestRoutes, old_routes) } + end + + def with_autoload_path(path) + path = File.join(File.dirname(__FILE__), "fixtures", path) + if ActiveSupport::Dependencies.autoload_paths.include?(path) + yield + else + begin + ActiveSupport::Dependencies.autoload_paths << path + yield + ensure + ActiveSupport::Dependencies.autoload_paths.reject! {|p| p == path} + ActiveSupport::Dependencies.clear + end + end + end +end + +# Temporary base class +class Rack::TestCase < ActionDispatch::IntegrationTest + def self.testing(klass = nil) + if klass + @testing = "/#{klass.name.underscore}".sub!(/_controller$/, '') + else + @testing + end + end + + def get(thing, *args) + if thing.is_a?(Symbol) + super("#{self.class.testing}/#{thing}", *args) + else + super + end + end + + def assert_body(body) + assert_equal body, Array(response.body).join + end + + def assert_status(code) + assert_equal code, response.status + end + + def assert_response(body, status = 200, headers = {}) + assert_body body + assert_status status + headers.each do |header, value| + assert_header header, value + end + end + + def assert_content_type(type) + assert_equal type, response.headers["Content-Type"] + end + + def assert_header(name, value) + assert_equal value, response.headers[name] + end +end + +module ActionController + class Base + include ActionController::Testing + # This stub emulates the Railtie including the URL helpers from a Rails application + include SharedTestRoutes.url_helpers + include SharedTestRoutes.mounted_helpers + + self.view_paths = FIXTURE_LOAD_PATH + + def self.test_routes(&block) + routes = ActionDispatch::Routing::RouteSet.new + routes.draw(&block) + include routes.url_helpers + end + end + + class TestCase + include ActionDispatch::TestProcess + include ActionDispatch::SharedRoutes + end +end + +class ::ApplicationController < ActionController::Base +end + +module ActionView + class TestCase + # Must repeat the setup because AV::TestCase is a duplication + # of AC::TestCase + include ActionDispatch::SharedRoutes + end +end + +class Workshop + extend ActiveModel::Naming + include ActiveModel::Conversion + attr_accessor :id + + def initialize(id) + @id = id + end + + def persisted? + id.present? + end + + def to_s + id.to_s + end +end + +module ActionDispatch + class DebugExceptions + private + remove_method :stderr_logger + # Silence logger + def stderr_logger + nil + end + end +end + +module ActionDispatch + module RoutingVerbs + def get(uri_or_host, path = nil) + host = uri_or_host.host unless path + path ||= uri_or_host.path + + params = {'PATH_INFO' => path, + 'REQUEST_METHOD' => 'GET', + 'HTTP_HOST' => host} + + routes.call(params)[2].join + end + end +end + +module RoutingTestHelpers + def url_for(set, options, recall = nil) + set.send(:url_for, options.merge(:only_path => true, :_recall => recall)) + end +end + +class ResourcesController < ActionController::Base + def index() render :nothing => true end + alias_method :show, :index +end + +class ThreadsController < ResourcesController; end +class MessagesController < ResourcesController; end +class CommentsController < ResourcesController; end +class ReviewsController < ResourcesController; end +class AuthorsController < ResourcesController; end +class LogosController < ResourcesController; end + +class AccountsController < ResourcesController; end +class AdminController < ResourcesController; end +class ProductsController < ResourcesController; end +class ImagesController < ResourcesController; end +class PreferencesController < ResourcesController; end + +module Backoffice + class ProductsController < ResourcesController; end + class TagsController < ResourcesController; end + class ManufacturersController < ResourcesController; end + class ImagesController < ResourcesController; end + + module Admin + class ProductsController < ResourcesController; end + class ImagesController < ResourcesController; end + end +end diff --git a/actionview/test/active_record_unit.rb b/actionview/test/active_record_unit.rb new file mode 100644 index 0000000000..95fbb112c0 --- /dev/null +++ b/actionview/test/active_record_unit.rb @@ -0,0 +1,91 @@ +require 'abstract_unit' + +# Define the essentials +class ActiveRecordTestConnector + cattr_accessor :able_to_connect + cattr_accessor :connected + + # Set our defaults + self.connected = false + self.able_to_connect = true +end + +# Try to grab AR +unless defined?(ActiveRecord) && defined?(FixtureSet) + begin + PATH_TO_AR = "#{File.dirname(__FILE__)}/../../activerecord/lib" + raise LoadError, "#{PATH_TO_AR} doesn't exist" unless File.directory?(PATH_TO_AR) + $LOAD_PATH.unshift PATH_TO_AR + require 'active_record' + rescue LoadError => e + $stderr.print "Failed to load Active Record. Skipping Active Record assertion tests: #{e}" + ActiveRecordTestConnector.able_to_connect = false + end +end +$stderr.flush + + +# Define the rest of the connector +class ActiveRecordTestConnector + class << self + def setup + unless self.connected || !self.able_to_connect + setup_connection + load_schema + require_fixture_models + self.connected = true + end + rescue Exception => e # errors from ActiveRecord setup + $stderr.puts "\nSkipping ActiveRecord assertion tests: #{e}" + #$stderr.puts " #{e.backtrace.join("\n ")}\n" + self.able_to_connect = false + end + + private + def setup_connection + if Object.const_defined?(:ActiveRecord) + defaults = { :database => ':memory:' } + adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' + options = defaults.merge :adapter => adapter, :timeout => 500 + ActiveRecord::Base.establish_connection(options) + ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => options } + ActiveRecord::Base.connection + + Object.send(:const_set, :QUOTED_TYPE, ActiveRecord::Base.connection.quote_column_name('type')) unless Object.const_defined?(:QUOTED_TYPE) + else + raise "Can't setup connection since ActiveRecord isn't loaded." + end + end + + # Load actionpack sqlite tables + def load_schema + File.read(File.dirname(__FILE__) + "/fixtures/db_definitions/sqlite.sql").split(';').each do |sql| + ActiveRecord::Base.connection.execute(sql) unless sql.blank? + end + end + + def require_fixture_models + Dir.glob(File.dirname(__FILE__) + "/fixtures/*.rb").each {|f| require f} + end + end +end + +class ActiveRecordTestCase < ActionController::TestCase + include ActiveRecord::TestFixtures + + # Set our fixture path + if ActiveRecordTestConnector.able_to_connect + self.fixture_path = [FIXTURE_LOAD_PATH] + self.use_transactional_fixtures = false + end + + def self.fixtures(*args) + super if ActiveRecordTestConnector.connected + end + + def run(*args) + super if ActiveRecordTestConnector.connected + end +end + +ActiveRecordTestConnector.setup diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionview/test/activerecord/controller_runtime_test.rb index 368bec1c70..368bec1c70 100644 --- a/actionpack/test/activerecord/controller_runtime_test.rb +++ b/actionview/test/activerecord/controller_runtime_test.rb diff --git a/actionpack/test/activerecord/form_helper_activerecord_test.rb b/actionview/test/activerecord/form_helper_activerecord_test.rb index 2e302c65a7..2e302c65a7 100644 --- a/actionpack/test/activerecord/form_helper_activerecord_test.rb +++ b/actionview/test/activerecord/form_helper_activerecord_test.rb diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index afb714484b..afb714484b 100644 --- a/actionpack/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb diff --git a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb b/actionview/test/activerecord/render_partial_with_record_identification_test.rb index 409370104d..409370104d 100644 --- a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +++ b/actionview/test/activerecord/render_partial_with_record_identification_test.rb diff --git a/actionpack/test/fixtures/_top_level_partial.html.erb b/actionview/test/fixtures/_top_level_partial.html.erb index 0b1c2e46e0..0b1c2e46e0 100644 --- a/actionpack/test/fixtures/_top_level_partial.html.erb +++ b/actionview/test/fixtures/_top_level_partial.html.erb diff --git a/actionview/test/fixtures/_top_level_partial_only.erb b/actionview/test/fixtures/_top_level_partial_only.erb new file mode 100644 index 0000000000..44f25b61d0 --- /dev/null +++ b/actionview/test/fixtures/_top_level_partial_only.erb @@ -0,0 +1 @@ +top level partial
\ No newline at end of file diff --git a/actionpack/test/fixtures/blog_public/.gitignore b/actionview/test/fixtures/blog_public/.gitignore index 312e635ee6..312e635ee6 100644 --- a/actionpack/test/fixtures/blog_public/.gitignore +++ b/actionview/test/fixtures/blog_public/.gitignore diff --git a/actionpack/test/fixtures/blog_public/blog.html b/actionview/test/fixtures/blog_public/blog.html index 79ad44c010..79ad44c010 100644 --- a/actionpack/test/fixtures/blog_public/blog.html +++ b/actionview/test/fixtures/blog_public/blog.html diff --git a/actionpack/test/fixtures/blog_public/index.html b/actionview/test/fixtures/blog_public/index.html index 2de3825481..2de3825481 100644 --- a/actionpack/test/fixtures/blog_public/index.html +++ b/actionview/test/fixtures/blog_public/index.html diff --git a/actionpack/test/fixtures/blog_public/subdir/index.html b/actionview/test/fixtures/blog_public/subdir/index.html index 517bded335..517bded335 100644 --- a/actionpack/test/fixtures/blog_public/subdir/index.html +++ b/actionview/test/fixtures/blog_public/subdir/index.html diff --git a/actionpack/test/fixtures/comments/empty.de.html.erb b/actionview/test/fixtures/comments/empty.de.html.erb index cffd90dd26..cffd90dd26 100644 --- a/actionpack/test/fixtures/comments/empty.de.html.erb +++ b/actionview/test/fixtures/comments/empty.de.html.erb diff --git a/actionpack/test/fixtures/comments/empty.html.builder b/actionview/test/fixtures/comments/empty.html.builder index 2b0c7207a3..2b0c7207a3 100644 --- a/actionpack/test/fixtures/comments/empty.html.builder +++ b/actionview/test/fixtures/comments/empty.html.builder diff --git a/actionpack/test/fixtures/comments/empty.html.erb b/actionview/test/fixtures/comments/empty.html.erb index 827f3861de..827f3861de 100644 --- a/actionpack/test/fixtures/comments/empty.html.erb +++ b/actionview/test/fixtures/comments/empty.html.erb diff --git a/actionpack/test/fixtures/comments/empty.xml.erb b/actionview/test/fixtures/comments/empty.xml.erb index db1027cd7d..db1027cd7d 100644 --- a/actionpack/test/fixtures/comments/empty.xml.erb +++ b/actionview/test/fixtures/comments/empty.xml.erb diff --git a/actionpack/test/fixtures/companies.yml b/actionview/test/fixtures/companies.yml index ed2992e0b1..ed2992e0b1 100644 --- a/actionpack/test/fixtures/companies.yml +++ b/actionview/test/fixtures/companies.yml diff --git a/actionview/test/fixtures/company.rb b/actionview/test/fixtures/company.rb new file mode 100644 index 0000000000..f3ac3642fa --- /dev/null +++ b/actionview/test/fixtures/company.rb @@ -0,0 +1,9 @@ +class Company < ActiveRecord::Base + has_one :mascot + self.sequence_name = :companies_nonstd_seq + + validates_presence_of :name + def validate + errors.add('rating', 'rating should not be 2') if rating == 2 + end +end diff --git a/actionpack/test/fixtures/custom_pattern/another.html.erb b/actionview/test/fixtures/custom_pattern/another.html.erb index 6d7f3bafbb..6d7f3bafbb 100644 --- a/actionpack/test/fixtures/custom_pattern/another.html.erb +++ b/actionview/test/fixtures/custom_pattern/another.html.erb diff --git a/actionpack/test/fixtures/custom_pattern/html/another.erb b/actionview/test/fixtures/custom_pattern/html/another.erb index dbd7e96ab6..dbd7e96ab6 100644 --- a/actionpack/test/fixtures/custom_pattern/html/another.erb +++ b/actionview/test/fixtures/custom_pattern/html/another.erb diff --git a/actionpack/test/fixtures/custom_pattern/html/path.erb b/actionview/test/fixtures/custom_pattern/html/path.erb index 6d7f3bafbb..6d7f3bafbb 100644 --- a/actionpack/test/fixtures/custom_pattern/html/path.erb +++ b/actionview/test/fixtures/custom_pattern/html/path.erb diff --git a/actionview/test/fixtures/customers/_customer.html.erb b/actionview/test/fixtures/customers/_customer.html.erb new file mode 100644 index 0000000000..483571e22a --- /dev/null +++ b/actionview/test/fixtures/customers/_customer.html.erb @@ -0,0 +1 @@ +<%= greeting %>: <%= customer.name %>
\ No newline at end of file diff --git a/actionpack/test/fixtures/db_definitions/sqlite.sql b/actionview/test/fixtures/db_definitions/sqlite.sql index 99df4b3e61..99df4b3e61 100644 --- a/actionpack/test/fixtures/db_definitions/sqlite.sql +++ b/actionview/test/fixtures/db_definitions/sqlite.sql diff --git a/actionpack/test/fixtures/developer.rb b/actionview/test/fixtures/developer.rb index 4941463015..4941463015 100644 --- a/actionpack/test/fixtures/developer.rb +++ b/actionview/test/fixtures/developer.rb diff --git a/actionpack/test/fixtures/developers.yml b/actionview/test/fixtures/developers.yml index 3656564f63..3656564f63 100644 --- a/actionpack/test/fixtures/developers.yml +++ b/actionview/test/fixtures/developers.yml diff --git a/actionpack/test/fixtures/developers/_developer.erb b/actionview/test/fixtures/developers/_developer.erb index 904a3137e7..904a3137e7 100644 --- a/actionpack/test/fixtures/developers/_developer.erb +++ b/actionview/test/fixtures/developers/_developer.erb diff --git a/actionpack/test/fixtures/developers_projects.yml b/actionview/test/fixtures/developers_projects.yml index cee359c7cf..cee359c7cf 100644 --- a/actionpack/test/fixtures/developers_projects.yml +++ b/actionview/test/fixtures/developers_projects.yml diff --git a/actionpack/test/fixtures/digestor/comments/_comment.html.erb b/actionview/test/fixtures/digestor/comments/_comment.html.erb index f172e749da..f172e749da 100644 --- a/actionpack/test/fixtures/digestor/comments/_comment.html.erb +++ b/actionview/test/fixtures/digestor/comments/_comment.html.erb diff --git a/actionpack/test/fixtures/digestor/comments/_comments.html.erb b/actionview/test/fixtures/digestor/comments/_comments.html.erb index c28646a283..c28646a283 100644 --- a/actionpack/test/fixtures/digestor/comments/_comments.html.erb +++ b/actionview/test/fixtures/digestor/comments/_comments.html.erb diff --git a/actionpack/test/fixtures/digestor/events/_event.html.erb b/actionview/test/fixtures/digestor/events/_event.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionpack/test/fixtures/digestor/events/_event.html.erb +++ b/actionview/test/fixtures/digestor/events/_event.html.erb diff --git a/actionpack/test/fixtures/digestor/level/below/_header.html.erb b/actionview/test/fixtures/digestor/level/below/_header.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionpack/test/fixtures/digestor/level/below/_header.html.erb +++ b/actionview/test/fixtures/digestor/level/below/_header.html.erb diff --git a/actionpack/test/fixtures/digestor/level/below/index.html.erb b/actionview/test/fixtures/digestor/level/below/index.html.erb index b92f49a8f8..b92f49a8f8 100644 --- a/actionpack/test/fixtures/digestor/level/below/index.html.erb +++ b/actionview/test/fixtures/digestor/level/below/index.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/_form.html.erb b/actionview/test/fixtures/digestor/messages/_form.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionpack/test/fixtures/digestor/messages/_form.html.erb +++ b/actionview/test/fixtures/digestor/messages/_form.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/_header.html.erb b/actionview/test/fixtures/digestor/messages/_header.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionpack/test/fixtures/digestor/messages/_header.html.erb +++ b/actionview/test/fixtures/digestor/messages/_header.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/_message.html.erb b/actionview/test/fixtures/digestor/messages/_message.html.erb index 406a0fb848..406a0fb848 100644 --- a/actionpack/test/fixtures/digestor/messages/_message.html.erb +++ b/actionview/test/fixtures/digestor/messages/_message.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/actions/_move.html.erb b/actionview/test/fixtures/digestor/messages/actions/_move.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionpack/test/fixtures/digestor/messages/actions/_move.html.erb +++ b/actionview/test/fixtures/digestor/messages/actions/_move.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/edit.html.erb b/actionview/test/fixtures/digestor/messages/edit.html.erb index a9e0a88e32..a9e0a88e32 100644 --- a/actionpack/test/fixtures/digestor/messages/edit.html.erb +++ b/actionview/test/fixtures/digestor/messages/edit.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/index.html.erb b/actionview/test/fixtures/digestor/messages/index.html.erb index 1937b652e4..1937b652e4 100644 --- a/actionpack/test/fixtures/digestor/messages/index.html.erb +++ b/actionview/test/fixtures/digestor/messages/index.html.erb diff --git a/actionpack/test/fixtures/digestor/messages/show.html.erb b/actionview/test/fixtures/digestor/messages/show.html.erb index 130e67109e..42aa2363dd 100644 --- a/actionpack/test/fixtures/digestor/messages/show.html.erb +++ b/actionview/test/fixtures/digestor/messages/show.html.erb @@ -6,9 +6,9 @@ <%= render @message.history.events %> -<%# render "something_missing" %> -<%# render "something_missing_1" %> +<%# render "something_missing" %> +<%# render "something_missing_1" %> <% # Template Dependency: messages/form -%> +%>
\ No newline at end of file diff --git a/actionpack/test/fixtures/fun/games/_game.erb b/actionview/test/fixtures/fun/games/_game.erb index f0f542ff92..f0f542ff92 100644 --- a/actionpack/test/fixtures/fun/games/_game.erb +++ b/actionview/test/fixtures/fun/games/_game.erb diff --git a/actionview/test/fixtures/fun/games/hello_world.erb b/actionview/test/fixtures/fun/games/hello_world.erb new file mode 100644 index 0000000000..1ebfbe2539 --- /dev/null +++ b/actionview/test/fixtures/fun/games/hello_world.erb @@ -0,0 +1 @@ +Living in a nested world
\ No newline at end of file diff --git a/actionpack/test/fixtures/fun/serious/games/_game.erb b/actionview/test/fixtures/fun/serious/games/_game.erb index 523bc55bd7..523bc55bd7 100644 --- a/actionpack/test/fixtures/fun/serious/games/_game.erb +++ b/actionview/test/fixtures/fun/serious/games/_game.erb diff --git a/actionview/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb b/actionview/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb new file mode 100644 index 0000000000..3125583a28 --- /dev/null +++ b/actionview/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb @@ -0,0 +1,3 @@ +<body> +<%= cache 'nodigest', skip_digest: true do %><p>ERB</p><% end %> +</body> diff --git a/actionpack/test/fixtures/games/_game.erb b/actionview/test/fixtures/games/_game.erb index 1aeb81fcba..1aeb81fcba 100644 --- a/actionpack/test/fixtures/games/_game.erb +++ b/actionview/test/fixtures/games/_game.erb diff --git a/actionview/test/fixtures/good_customers/_good_customer.html.erb b/actionview/test/fixtures/good_customers/_good_customer.html.erb new file mode 100644 index 0000000000..a2d97ebc6d --- /dev/null +++ b/actionview/test/fixtures/good_customers/_good_customer.html.erb @@ -0,0 +1 @@ +<%= greeting %> good customer: <%= good_customer.name %><%= good_customer_counter %>
\ No newline at end of file diff --git a/actionpack/test/fixtures/happy_path/render_action/hello_world.erb b/actionview/test/fixtures/happy_path/render_action/hello_world.erb index 6769dd60bd..6769dd60bd 100644 --- a/actionpack/test/fixtures/happy_path/render_action/hello_world.erb +++ b/actionview/test/fixtures/happy_path/render_action/hello_world.erb diff --git a/actionpack/test/fixtures/layout_tests/alt/hello.erb b/actionview/test/fixtures/layout_tests/alt/hello.erb index 1055c36659..1055c36659 100644 --- a/actionpack/test/fixtures/layout_tests/alt/hello.erb +++ b/actionview/test/fixtures/layout_tests/alt/hello.erb diff --git a/actionpack/test/fixtures/layouts/_column.html.erb b/actionview/test/fixtures/layouts/_column.html.erb index 96db002b8a..96db002b8a 100644 --- a/actionpack/test/fixtures/layouts/_column.html.erb +++ b/actionview/test/fixtures/layouts/_column.html.erb diff --git a/actionview/test/fixtures/layouts/_customers.erb b/actionview/test/fixtures/layouts/_customers.erb new file mode 100644 index 0000000000..ae63f13cd3 --- /dev/null +++ b/actionview/test/fixtures/layouts/_customers.erb @@ -0,0 +1 @@ +<title><%= yield Struct.new(:name).new("David") %></title>
\ No newline at end of file diff --git a/actionpack/test/fixtures/layouts/_partial_and_yield.erb b/actionview/test/fixtures/layouts/_partial_and_yield.erb index 74cc428ffa..74cc428ffa 100644 --- a/actionpack/test/fixtures/layouts/_partial_and_yield.erb +++ b/actionview/test/fixtures/layouts/_partial_and_yield.erb diff --git a/actionpack/test/fixtures/layouts/_yield_only.erb b/actionview/test/fixtures/layouts/_yield_only.erb index 37f0bddbd7..37f0bddbd7 100644 --- a/actionpack/test/fixtures/layouts/_yield_only.erb +++ b/actionview/test/fixtures/layouts/_yield_only.erb diff --git a/actionpack/test/fixtures/layouts/_yield_with_params.erb b/actionview/test/fixtures/layouts/_yield_with_params.erb index 68e6557fb8..68e6557fb8 100644 --- a/actionpack/test/fixtures/layouts/_yield_with_params.erb +++ b/actionview/test/fixtures/layouts/_yield_with_params.erb diff --git a/actionpack/test/fixtures/layouts/streaming.erb b/actionview/test/fixtures/layouts/streaming.erb index d3f896a6ca..d3f896a6ca 100644 --- a/actionpack/test/fixtures/layouts/streaming.erb +++ b/actionview/test/fixtures/layouts/streaming.erb diff --git a/actionview/test/fixtures/layouts/yield.erb b/actionview/test/fixtures/layouts/yield.erb new file mode 100644 index 0000000000..482dc9022e --- /dev/null +++ b/actionview/test/fixtures/layouts/yield.erb @@ -0,0 +1,2 @@ +<title><%= yield :title %></title> +<%= yield %> diff --git a/actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb b/actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb index 7298d79690..7298d79690 100644 --- a/actionpack/test/fixtures/layouts/yield_with_render_inline_inside.erb +++ b/actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb diff --git a/actionpack/test/fixtures/layouts/yield_with_render_partial_inside.erb b/actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb index 74cc428ffa..74cc428ffa 100644 --- a/actionpack/test/fixtures/layouts/yield_with_render_partial_inside.erb +++ b/actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb diff --git a/actionpack/test/fixtures/mascot.rb b/actionview/test/fixtures/mascot.rb index f9f1448b8f..f9f1448b8f 100644 --- a/actionpack/test/fixtures/mascot.rb +++ b/actionview/test/fixtures/mascot.rb diff --git a/actionpack/test/fixtures/mascots.yml b/actionview/test/fixtures/mascots.yml index 17b7dff454..17b7dff454 100644 --- a/actionpack/test/fixtures/mascots.yml +++ b/actionview/test/fixtures/mascots.yml diff --git a/actionpack/test/fixtures/mascots/_mascot.html.erb b/actionview/test/fixtures/mascots/_mascot.html.erb index 432773a1da..432773a1da 100644 --- a/actionpack/test/fixtures/mascots/_mascot.html.erb +++ b/actionview/test/fixtures/mascots/_mascot.html.erb diff --git a/actionview/test/fixtures/multipart/bracketed_utf8_param b/actionview/test/fixtures/multipart/bracketed_utf8_param new file mode 100644 index 0000000000..df9cecea08 --- /dev/null +++ b/actionview/test/fixtures/multipart/bracketed_utf8_param @@ -0,0 +1,5 @@ +--AaB03x +Content-Disposition: form-data; name="Iñtërnâtiônàlizætiøn_name[Iñtërnâtiônàlizætiøn_nested_name]" + +Iñtërnâtiônàlizætiøn_value +--AaB03x-- diff --git a/actionview/test/fixtures/multipart/single_utf8_param b/actionview/test/fixtures/multipart/single_utf8_param new file mode 100644 index 0000000000..1d9fae7b17 --- /dev/null +++ b/actionview/test/fixtures/multipart/single_utf8_param @@ -0,0 +1,5 @@ +--AaB03x +Content-Disposition: form-data; name="Iñtërnâtiônàlizætiøn_name" + +Iñtërnâtiônàlizætiøn_value +--AaB03x-- diff --git a/actionpack/test/fixtures/plain_text.raw b/actionview/test/fixtures/plain_text.raw index b13985337f..b13985337f 100644 --- a/actionpack/test/fixtures/plain_text.raw +++ b/actionview/test/fixtures/plain_text.raw diff --git a/actionpack/test/fixtures/plain_text_with_characters.raw b/actionview/test/fixtures/plain_text_with_characters.raw index 1e86e44fb4..1e86e44fb4 100644 --- a/actionpack/test/fixtures/plain_text_with_characters.raw +++ b/actionview/test/fixtures/plain_text_with_characters.raw diff --git a/actionpack/test/fixtures/project.rb b/actionview/test/fixtures/project.rb index c124a9e605..c124a9e605 100644 --- a/actionpack/test/fixtures/project.rb +++ b/actionview/test/fixtures/project.rb diff --git a/actionpack/test/fixtures/projects.yml b/actionview/test/fixtures/projects.yml index 02800c7824..02800c7824 100644 --- a/actionpack/test/fixtures/projects.yml +++ b/actionview/test/fixtures/projects.yml diff --git a/actionpack/test/fixtures/projects/_project.erb b/actionview/test/fixtures/projects/_project.erb index 480c4c2af3..480c4c2af3 100644 --- a/actionpack/test/fixtures/projects/_project.erb +++ b/actionview/test/fixtures/projects/_project.erb diff --git a/actionpack/test/fixtures/public/.gitignore b/actionview/test/fixtures/public/.gitignore index 312e635ee6..312e635ee6 100644 --- a/actionpack/test/fixtures/public/.gitignore +++ b/actionview/test/fixtures/public/.gitignore diff --git a/actionpack/test/fixtures/public/elsewhere/cools.js b/actionview/test/fixtures/public/elsewhere/cools.js index 6e12fe29c4..6e12fe29c4 100644 --- a/actionpack/test/fixtures/public/elsewhere/cools.js +++ b/actionview/test/fixtures/public/elsewhere/cools.js diff --git a/actionpack/test/fixtures/public/elsewhere/file.css b/actionview/test/fixtures/public/elsewhere/file.css index 6aea0733b1..6aea0733b1 100644 --- a/actionpack/test/fixtures/public/elsewhere/file.css +++ b/actionview/test/fixtures/public/elsewhere/file.css diff --git a/actionview/test/fixtures/public/foo/baz.css b/actionview/test/fixtures/public/foo/baz.css new file mode 100644 index 0000000000..b5173fbef2 --- /dev/null +++ b/actionview/test/fixtures/public/foo/baz.css @@ -0,0 +1,3 @@ +body { +background: #000; +} diff --git a/actionpack/test/fixtures/public/javascripts/application.js b/actionview/test/fixtures/public/javascripts/application.js index 9702692980..9702692980 100644 --- a/actionpack/test/fixtures/public/javascripts/application.js +++ b/actionview/test/fixtures/public/javascripts/application.js diff --git a/actionpack/test/fixtures/public/javascripts/bank.js b/actionview/test/fixtures/public/javascripts/bank.js index 4a1bee7182..4a1bee7182 100644 --- a/actionpack/test/fixtures/public/javascripts/bank.js +++ b/actionview/test/fixtures/public/javascripts/bank.js diff --git a/actionpack/test/fixtures/public/javascripts/common.javascript b/actionview/test/fixtures/public/javascripts/common.javascript index 2ae1929056..2ae1929056 100644 --- a/actionpack/test/fixtures/public/javascripts/common.javascript +++ b/actionview/test/fixtures/public/javascripts/common.javascript diff --git a/actionpack/test/fixtures/public/javascripts/controls.js b/actionview/test/fixtures/public/javascripts/controls.js index 88168d9f13..88168d9f13 100644 --- a/actionpack/test/fixtures/public/javascripts/controls.js +++ b/actionview/test/fixtures/public/javascripts/controls.js diff --git a/actionpack/test/fixtures/public/javascripts/dragdrop.js b/actionview/test/fixtures/public/javascripts/dragdrop.js index c07061ac0c..c07061ac0c 100644 --- a/actionpack/test/fixtures/public/javascripts/dragdrop.js +++ b/actionview/test/fixtures/public/javascripts/dragdrop.js diff --git a/actionpack/test/fixtures/public/javascripts/effects.js b/actionview/test/fixtures/public/javascripts/effects.js index b555d63034..b555d63034 100644 --- a/actionpack/test/fixtures/public/javascripts/effects.js +++ b/actionview/test/fixtures/public/javascripts/effects.js diff --git a/actionpack/test/fixtures/public/javascripts/prototype.js b/actionview/test/fixtures/public/javascripts/prototype.js index 9780064a0e..9780064a0e 100644 --- a/actionpack/test/fixtures/public/javascripts/prototype.js +++ b/actionview/test/fixtures/public/javascripts/prototype.js diff --git a/actionpack/test/fixtures/public/javascripts/robber.js b/actionview/test/fixtures/public/javascripts/robber.js index eb82fcbdf4..eb82fcbdf4 100644 --- a/actionpack/test/fixtures/public/javascripts/robber.js +++ b/actionview/test/fixtures/public/javascripts/robber.js diff --git a/actionpack/test/fixtures/public/javascripts/subdir/subdir.js b/actionview/test/fixtures/public/javascripts/subdir/subdir.js index 9d23a67aa1..9d23a67aa1 100644 --- a/actionpack/test/fixtures/public/javascripts/subdir/subdir.js +++ b/actionview/test/fixtures/public/javascripts/subdir/subdir.js diff --git a/actionpack/test/fixtures/public/javascripts/version.1.0.js b/actionview/test/fixtures/public/javascripts/version.1.0.js index cfd5fce70e..cfd5fce70e 100644 --- a/actionpack/test/fixtures/public/javascripts/version.1.0.js +++ b/actionview/test/fixtures/public/javascripts/version.1.0.js diff --git a/actionpack/test/fixtures/public/stylesheets/bank.css b/actionview/test/fixtures/public/stylesheets/bank.css index ea161b12b2..ea161b12b2 100644 --- a/actionpack/test/fixtures/public/stylesheets/bank.css +++ b/actionview/test/fixtures/public/stylesheets/bank.css diff --git a/actionpack/test/fixtures/public/stylesheets/random.styles b/actionview/test/fixtures/public/stylesheets/random.styles index d4eeead95c..d4eeead95c 100644 --- a/actionpack/test/fixtures/public/stylesheets/random.styles +++ b/actionview/test/fixtures/public/stylesheets/random.styles diff --git a/actionpack/test/fixtures/public/stylesheets/robber.css b/actionview/test/fixtures/public/stylesheets/robber.css index 0fdd00a6a5..0fdd00a6a5 100644 --- a/actionpack/test/fixtures/public/stylesheets/robber.css +++ b/actionview/test/fixtures/public/stylesheets/robber.css diff --git a/actionpack/test/fixtures/public/stylesheets/subdir/subdir.css b/actionview/test/fixtures/public/stylesheets/subdir/subdir.css index 241152a905..241152a905 100644 --- a/actionpack/test/fixtures/public/stylesheets/subdir/subdir.css +++ b/actionview/test/fixtures/public/stylesheets/subdir/subdir.css diff --git a/actionpack/test/fixtures/public/stylesheets/version.1.0.css b/actionview/test/fixtures/public/stylesheets/version.1.0.css index 30f5f9ba6e..30f5f9ba6e 100644 --- a/actionpack/test/fixtures/public/stylesheets/version.1.0.css +++ b/actionview/test/fixtures/public/stylesheets/version.1.0.css diff --git a/actionpack/test/fixtures/replies.yml b/actionview/test/fixtures/replies.yml index 2a3454b8bf..2a3454b8bf 100644 --- a/actionpack/test/fixtures/replies.yml +++ b/actionview/test/fixtures/replies.yml diff --git a/actionpack/test/fixtures/replies/_reply.erb b/actionview/test/fixtures/replies/_reply.erb index 68baf548d8..68baf548d8 100644 --- a/actionpack/test/fixtures/replies/_reply.erb +++ b/actionview/test/fixtures/replies/_reply.erb diff --git a/actionpack/test/fixtures/reply.rb b/actionview/test/fixtures/reply.rb index 047522c55b..047522c55b 100644 --- a/actionpack/test/fixtures/reply.rb +++ b/actionview/test/fixtures/reply.rb diff --git a/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb b/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb new file mode 100644 index 0000000000..9f1f855269 --- /dev/null +++ b/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb @@ -0,0 +1 @@ +HTML! diff --git a/actionview/test/fixtures/ruby_template.ruby b/actionview/test/fixtures/ruby_template.ruby new file mode 100644 index 0000000000..5097bce47c --- /dev/null +++ b/actionview/test/fixtures/ruby_template.ruby @@ -0,0 +1,2 @@ +body = "" +body << ["Hello", "from", "Ruby", "code"].join(" ") diff --git a/actionpack/test/fixtures/scope/test/modgreet.erb b/actionview/test/fixtures/scope/test/modgreet.erb index 8947726e89..8947726e89 100644 --- a/actionpack/test/fixtures/scope/test/modgreet.erb +++ b/actionview/test/fixtures/scope/test/modgreet.erb diff --git a/actionview/test/fixtures/shared.html.erb b/actionview/test/fixtures/shared.html.erb new file mode 100644 index 0000000000..af262fc9f8 --- /dev/null +++ b/actionview/test/fixtures/shared.html.erb @@ -0,0 +1 @@ +Elastica
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_200.html.erb b/actionview/test/fixtures/test/_200.html.erb index c9f45675dc..c9f45675dc 100644 --- a/actionpack/test/fixtures/test/_200.html.erb +++ b/actionview/test/fixtures/test/_200.html.erb diff --git a/actionpack/test/fixtures/test/_b_layout_for_partial.html.erb b/actionview/test/fixtures/test/_b_layout_for_partial.html.erb index e918ba8f83..e918ba8f83 100644 --- a/actionpack/test/fixtures/test/_b_layout_for_partial.html.erb +++ b/actionview/test/fixtures/test/_b_layout_for_partial.html.erb diff --git a/actionpack/test/fixtures/test/_b_layout_for_partial_with_object.html.erb b/actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb index bdd53014cd..bdd53014cd 100644 --- a/actionpack/test/fixtures/test/_b_layout_for_partial_with_object.html.erb +++ b/actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb diff --git a/actionpack/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb b/actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb index 44d6121297..44d6121297 100644 --- a/actionpack/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb +++ b/actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb diff --git a/actionview/test/fixtures/test/_changing_priority.html.erb b/actionview/test/fixtures/test/_changing_priority.html.erb new file mode 100644 index 0000000000..3225efc49a --- /dev/null +++ b/actionview/test/fixtures/test/_changing_priority.html.erb @@ -0,0 +1 @@ +HTML
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_changing_priority.json.erb b/actionview/test/fixtures/test/_changing_priority.json.erb new file mode 100644 index 0000000000..7fa41dce66 --- /dev/null +++ b/actionview/test/fixtures/test/_changing_priority.json.erb @@ -0,0 +1 @@ +JSON
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_content_tag_nested_in_content_tag.erb b/actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb index 2f21a75dd9..2f21a75dd9 100644 --- a/actionpack/test/fixtures/test/_content_tag_nested_in_content_tag.erb +++ b/actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb diff --git a/actionview/test/fixtures/test/_counter.html.erb b/actionview/test/fixtures/test/_counter.html.erb new file mode 100644 index 0000000000..fd245bfc70 --- /dev/null +++ b/actionview/test/fixtures/test/_counter.html.erb @@ -0,0 +1 @@ +<%= counter_counter %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_customer.erb b/actionview/test/fixtures/test/_customer.erb new file mode 100644 index 0000000000..d8220afeda --- /dev/null +++ b/actionview/test/fixtures/test/_customer.erb @@ -0,0 +1 @@ +Hello: <%= customer.name rescue "Anonymous" %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_customer_greeting.erb b/actionview/test/fixtures/test/_customer_greeting.erb new file mode 100644 index 0000000000..6acbcb20c4 --- /dev/null +++ b/actionview/test/fixtures/test/_customer_greeting.erb @@ -0,0 +1 @@ +<%= greeting %>: <%= customer_greeting.name %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_customer_with_var.erb b/actionview/test/fixtures/test/_customer_with_var.erb new file mode 100644 index 0000000000..00047dd20e --- /dev/null +++ b/actionview/test/fixtures/test/_customer_with_var.erb @@ -0,0 +1 @@ +<%= customer.name %> <%= customer.name %> <%= customer.name %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb b/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb new file mode 100644 index 0000000000..1cc8d41475 --- /dev/null +++ b/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb @@ -0,0 +1 @@ +Hello <%= name %> diff --git a/actionview/test/fixtures/test/_first_json_partial.json.erb b/actionview/test/fixtures/test/_first_json_partial.json.erb new file mode 100644 index 0000000000..790ee896db --- /dev/null +++ b/actionview/test/fixtures/test/_first_json_partial.json.erb @@ -0,0 +1 @@ +<%= render :partial => "test/second_json_partial" %>
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_from_helper.erb b/actionview/test/fixtures/test/_from_helper.erb index 16de7c0f8a..16de7c0f8a 100644 --- a/actionpack/test/fixtures/test/_from_helper.erb +++ b/actionview/test/fixtures/test/_from_helper.erb diff --git a/actionview/test/fixtures/test/_json_change_priority.json.erb b/actionview/test/fixtures/test/_json_change_priority.json.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionview/test/fixtures/test/_json_change_priority.json.erb diff --git a/actionpack/test/fixtures/test/_label_with_block.erb b/actionview/test/fixtures/test/_label_with_block.erb index 40117e594e..40117e594e 100644 --- a/actionpack/test/fixtures/test/_label_with_block.erb +++ b/actionview/test/fixtures/test/_label_with_block.erb diff --git a/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb b/actionview/test/fixtures/test/_layout_for_block_with_args.html.erb index 307533208d..307533208d 100644 --- a/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb +++ b/actionview/test/fixtures/test/_layout_for_block_with_args.html.erb diff --git a/actionview/test/fixtures/test/_layout_for_partial.html.erb b/actionview/test/fixtures/test/_layout_for_partial.html.erb new file mode 100644 index 0000000000..666efadbb6 --- /dev/null +++ b/actionview/test/fixtures/test/_layout_for_partial.html.erb @@ -0,0 +1,3 @@ +Before (<%= name %>) +<%= yield %> +After
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_layout_with_partial_and_yield.html.erb b/actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb index 820e7db789..820e7db789 100644 --- a/actionpack/test/fixtures/test/_layout_with_partial_and_yield.html.erb +++ b/actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb diff --git a/actionpack/test/fixtures/test/_local_inspector.html.erb b/actionview/test/fixtures/test/_local_inspector.html.erb index e6765c0882..e6765c0882 100644 --- a/actionpack/test/fixtures/test/_local_inspector.html.erb +++ b/actionview/test/fixtures/test/_local_inspector.html.erb diff --git a/actionpack/test/fixtures/test/_object_inspector.erb b/actionview/test/fixtures/test/_object_inspector.erb index 53af593821..53af593821 100644 --- a/actionpack/test/fixtures/test/_object_inspector.erb +++ b/actionview/test/fixtures/test/_object_inspector.erb diff --git a/actionpack/test/fixtures/test/_one.html.erb b/actionview/test/fixtures/test/_one.html.erb index f796291cb4..f796291cb4 100644 --- a/actionpack/test/fixtures/test/_one.html.erb +++ b/actionview/test/fixtures/test/_one.html.erb diff --git a/actionview/test/fixtures/test/_partial.erb b/actionview/test/fixtures/test/_partial.erb new file mode 100644 index 0000000000..e466dcbd8e --- /dev/null +++ b/actionview/test/fixtures/test/_partial.erb @@ -0,0 +1 @@ +invalid
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_partial.html.erb b/actionview/test/fixtures/test/_partial.html.erb new file mode 100644 index 0000000000..e39f6c9827 --- /dev/null +++ b/actionview/test/fixtures/test/_partial.html.erb @@ -0,0 +1 @@ +partial html
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_partial.js.erb b/actionview/test/fixtures/test/_partial.js.erb new file mode 100644 index 0000000000..b350cdd7ef --- /dev/null +++ b/actionview/test/fixtures/test/_partial.js.erb @@ -0,0 +1 @@ +partial js
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb b/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb new file mode 100644 index 0000000000..3a03a64e31 --- /dev/null +++ b/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb @@ -0,0 +1 @@ +Inside from partial (<%= name %>)
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_partial_name_local_variable.erb b/actionview/test/fixtures/test/_partial_name_local_variable.erb new file mode 100644 index 0000000000..cc3a91c89f --- /dev/null +++ b/actionview/test/fixtures/test/_partial_name_local_variable.erb @@ -0,0 +1 @@ +<%= partial_name_local_variable %> diff --git a/actionview/test/fixtures/test/_partial_only.erb b/actionview/test/fixtures/test/_partial_only.erb new file mode 100644 index 0000000000..a44b3eed40 --- /dev/null +++ b/actionview/test/fixtures/test/_partial_only.erb @@ -0,0 +1 @@ +only partial
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_partial_with_layout.erb b/actionview/test/fixtures/test/_partial_with_layout.erb index 2a50c834fe..2a50c834fe 100644 --- a/actionpack/test/fixtures/test/_partial_with_layout.erb +++ b/actionview/test/fixtures/test/_partial_with_layout.erb diff --git a/actionpack/test/fixtures/test/_partial_with_layout_block_content.erb b/actionview/test/fixtures/test/_partial_with_layout_block_content.erb index 65dafd93a8..65dafd93a8 100644 --- a/actionpack/test/fixtures/test/_partial_with_layout_block_content.erb +++ b/actionview/test/fixtures/test/_partial_with_layout_block_content.erb diff --git a/actionpack/test/fixtures/test/_partial_with_layout_block_partial.erb b/actionview/test/fixtures/test/_partial_with_layout_block_partial.erb index 444197a7d0..444197a7d0 100644 --- a/actionpack/test/fixtures/test/_partial_with_layout_block_partial.erb +++ b/actionview/test/fixtures/test/_partial_with_layout_block_partial.erb diff --git a/actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb b/actionview/test/fixtures/test/_partial_with_only_html_version.html.erb index 00e6b6d6da..00e6b6d6da 100644 --- a/actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb +++ b/actionview/test/fixtures/test/_partial_with_only_html_version.html.erb diff --git a/actionview/test/fixtures/test/_partial_with_partial.erb b/actionview/test/fixtures/test/_partial_with_partial.erb new file mode 100644 index 0000000000..ee0d5037b6 --- /dev/null +++ b/actionview/test/fixtures/test/_partial_with_partial.erb @@ -0,0 +1,2 @@ +<%= render 'test/partial' %> +partial with partial diff --git a/actionpack/test/fixtures/test/_raise.html.erb b/actionview/test/fixtures/test/_raise.html.erb index 68b08181d3..68b08181d3 100644 --- a/actionpack/test/fixtures/test/_raise.html.erb +++ b/actionview/test/fixtures/test/_raise.html.erb diff --git a/actionview/test/fixtures/test/_raise_indentation.html.erb b/actionview/test/fixtures/test/_raise_indentation.html.erb new file mode 100644 index 0000000000..f9a93728fe --- /dev/null +++ b/actionview/test/fixtures/test/_raise_indentation.html.erb @@ -0,0 +1,13 @@ +<p>First paragraph</p> +<p>Second paragraph</p> +<p>Third paragraph</p> +<p>Fourth paragraph</p> +<p>Fifth paragraph</p> +<p>Sixth paragraph</p> +<p>Seventh paragraph</p> +<p>Eight paragraph</p> +<p>Ninth paragraph</p> +<p>Tenth paragraph</p> +<%= raise "error here!" %> +<p>Eleventh paragraph</p> +<p>Twelfth paragraph</p>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/_second_json_partial.json.erb b/actionview/test/fixtures/test/_second_json_partial.json.erb new file mode 100644 index 0000000000..5ebb7f1afd --- /dev/null +++ b/actionview/test/fixtures/test/_second_json_partial.json.erb @@ -0,0 +1 @@ +Third level
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/_two.html.erb b/actionview/test/fixtures/test/_two.html.erb index 5ab2f8a432..5ab2f8a432 100644 --- a/actionpack/test/fixtures/test/_two.html.erb +++ b/actionview/test/fixtures/test/_two.html.erb diff --git a/actionpack/test/fixtures/test/_utf8_partial.html.erb b/actionview/test/fixtures/test/_utf8_partial.html.erb index 8d717fd427..8d717fd427 100644 --- a/actionpack/test/fixtures/test/_utf8_partial.html.erb +++ b/actionview/test/fixtures/test/_utf8_partial.html.erb diff --git a/actionpack/test/fixtures/test/_utf8_partial_magic.html.erb b/actionview/test/fixtures/test/_utf8_partial_magic.html.erb index 4e2224610a..4e2224610a 100644 --- a/actionpack/test/fixtures/test/_utf8_partial_magic.html.erb +++ b/actionview/test/fixtures/test/_utf8_partial_magic.html.erb diff --git a/actionpack/test/fixtures/test/basic.html.erb b/actionview/test/fixtures/test/basic.html.erb index ea696d7e01..ea696d7e01 100644 --- a/actionpack/test/fixtures/test/basic.html.erb +++ b/actionview/test/fixtures/test/basic.html.erb diff --git a/actionview/test/fixtures/test/calling_partial_with_layout.html.erb b/actionview/test/fixtures/test/calling_partial_with_layout.html.erb new file mode 100644 index 0000000000..ac44bc0d81 --- /dev/null +++ b/actionview/test/fixtures/test/calling_partial_with_layout.html.erb @@ -0,0 +1 @@ +<%= render(:layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => { :name => "David" }) %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/change_priority.html.erb b/actionview/test/fixtures/test/change_priority.html.erb new file mode 100644 index 0000000000..5618977d05 --- /dev/null +++ b/actionview/test/fixtures/test/change_priority.html.erb @@ -0,0 +1,2 @@ +<%= render :partial => "test/json_change_priority", formats: :json %> +HTML Template, but <%= render :partial => "test/changing_priority" %> partial
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/dont_pick_me b/actionview/test/fixtures/test/dont_pick_me index 0157c9e503..0157c9e503 100644 --- a/actionpack/test/fixtures/test/dont_pick_me +++ b/actionview/test/fixtures/test/dont_pick_me diff --git a/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb b/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb new file mode 100644 index 0000000000..8b8a449236 --- /dev/null +++ b/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb @@ -0,0 +1 @@ +The secret is <%= @secret %> diff --git a/actionview/test/fixtures/test/greeting.xml.erb b/actionview/test/fixtures/test/greeting.xml.erb new file mode 100644 index 0000000000..62fb0293f0 --- /dev/null +++ b/actionview/test/fixtures/test/greeting.xml.erb @@ -0,0 +1 @@ +<p>This is grand!</p> diff --git a/actionview/test/fixtures/test/hello.builder b/actionview/test/fixtures/test/hello.builder new file mode 100644 index 0000000000..a471553941 --- /dev/null +++ b/actionview/test/fixtures/test/hello.builder @@ -0,0 +1,4 @@ +xml.html do + xml.p "Hello #{@name}" + xml << render(:file => "test/greeting") +end
\ No newline at end of file diff --git a/actionview/test/fixtures/test/hello/hello.erb b/actionview/test/fixtures/test/hello/hello.erb new file mode 100644 index 0000000000..6769dd60bd --- /dev/null +++ b/actionview/test/fixtures/test/hello/hello.erb @@ -0,0 +1 @@ +Hello world!
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/hello_world.da.html.erb b/actionview/test/fixtures/test/hello_world.da.html.erb index 10ec443291..10ec443291 100644 --- a/actionpack/test/fixtures/test/hello_world.da.html.erb +++ b/actionview/test/fixtures/test/hello_world.da.html.erb diff --git a/actionview/test/fixtures/test/hello_world.erb b/actionview/test/fixtures/test/hello_world.erb new file mode 100644 index 0000000000..6769dd60bd --- /dev/null +++ b/actionview/test/fixtures/test/hello_world.erb @@ -0,0 +1 @@ +Hello world!
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/hello_world.erb~ b/actionview/test/fixtures/test/hello_world.erb~ index 21934a1c95..21934a1c95 100644 --- a/actionpack/test/fixtures/test/hello_world.erb~ +++ b/actionview/test/fixtures/test/hello_world.erb~ diff --git a/actionpack/test/fixtures/test/hello_world.pt-BR.html.erb b/actionview/test/fixtures/test/hello_world.pt-BR.html.erb index 773b3c8c6e..773b3c8c6e 100644 --- a/actionpack/test/fixtures/test/hello_world.pt-BR.html.erb +++ b/actionview/test/fixtures/test/hello_world.pt-BR.html.erb diff --git a/actionview/test/fixtures/test/hello_world_with_partial.html.erb b/actionview/test/fixtures/test/hello_world_with_partial.html.erb new file mode 100644 index 0000000000..ec31545356 --- /dev/null +++ b/actionview/test/fixtures/test/hello_world_with_partial.html.erb @@ -0,0 +1,2 @@ +Hello world! +<%= render '/test/partial' %> diff --git a/actionview/test/fixtures/test/html_template.html.erb b/actionview/test/fixtures/test/html_template.html.erb new file mode 100644 index 0000000000..1bbc2b7f09 --- /dev/null +++ b/actionview/test/fixtures/test/html_template.html.erb @@ -0,0 +1 @@ +<%= render :partial => "test/first_json_partial", formats: :json %>
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/layout_render_file.erb b/actionview/test/fixtures/test/layout_render_file.erb index 2f8e921c5f..2f8e921c5f 100644 --- a/actionpack/test/fixtures/test/layout_render_file.erb +++ b/actionview/test/fixtures/test/layout_render_file.erb diff --git a/actionpack/test/fixtures/test/layout_render_object.erb b/actionview/test/fixtures/test/layout_render_object.erb index acc4453c08..acc4453c08 100644 --- a/actionpack/test/fixtures/test/layout_render_object.erb +++ b/actionview/test/fixtures/test/layout_render_object.erb diff --git a/actionview/test/fixtures/test/list.erb b/actionview/test/fixtures/test/list.erb new file mode 100644 index 0000000000..0a4bda58ee --- /dev/null +++ b/actionview/test/fixtures/test/list.erb @@ -0,0 +1 @@ +<%= @test_unchanged = 'goodbye' %><%= render :partial => 'customer', :collection => @customers %><%= @test_unchanged %> diff --git a/actionpack/test/fixtures/test/malformed/malformed.en.html.erb~ b/actionview/test/fixtures/test/malformed/malformed.en.html.erb~ index d009950384..d009950384 100644 --- a/actionpack/test/fixtures/test/malformed/malformed.en.html.erb~ +++ b/actionview/test/fixtures/test/malformed/malformed.en.html.erb~ diff --git a/actionpack/test/fixtures/test/malformed/malformed.erb~ b/actionview/test/fixtures/test/malformed/malformed.erb~ index d009950384..d009950384 100644 --- a/actionpack/test/fixtures/test/malformed/malformed.erb~ +++ b/actionview/test/fixtures/test/malformed/malformed.erb~ diff --git a/actionpack/test/fixtures/test/malformed/malformed.html.erb~ b/actionview/test/fixtures/test/malformed/malformed.html.erb~ index d009950384..d009950384 100644 --- a/actionpack/test/fixtures/test/malformed/malformed.html.erb~ +++ b/actionview/test/fixtures/test/malformed/malformed.html.erb~ diff --git a/actionview/test/fixtures/test/malformed/malformed~ b/actionview/test/fixtures/test/malformed/malformed~ new file mode 100644 index 0000000000..d009950384 --- /dev/null +++ b/actionview/test/fixtures/test/malformed/malformed~ @@ -0,0 +1 @@ +Don't render me!
\ No newline at end of file diff --git a/actionpack/test/fixtures/test/nested_layout.erb b/actionview/test/fixtures/test/nested_layout.erb index 6078f74b4c..6078f74b4c 100644 --- a/actionpack/test/fixtures/test/nested_layout.erb +++ b/actionview/test/fixtures/test/nested_layout.erb diff --git a/actionpack/test/fixtures/test/nested_streaming.erb b/actionview/test/fixtures/test/nested_streaming.erb index 55525e0c92..55525e0c92 100644 --- a/actionpack/test/fixtures/test/nested_streaming.erb +++ b/actionview/test/fixtures/test/nested_streaming.erb diff --git a/actionpack/test/fixtures/test/one.html.erb b/actionview/test/fixtures/test/one.html.erb index 0151874809..0151874809 100644 --- a/actionpack/test/fixtures/test/one.html.erb +++ b/actionview/test/fixtures/test/one.html.erb diff --git a/actionview/test/fixtures/test/render_file_with_ivar.erb b/actionview/test/fixtures/test/render_file_with_ivar.erb new file mode 100644 index 0000000000..8b8a449236 --- /dev/null +++ b/actionview/test/fixtures/test/render_file_with_ivar.erb @@ -0,0 +1 @@ +The secret is <%= @secret %> diff --git a/actionview/test/fixtures/test/render_file_with_locals.erb b/actionview/test/fixtures/test/render_file_with_locals.erb new file mode 100644 index 0000000000..ebe09faee6 --- /dev/null +++ b/actionview/test/fixtures/test/render_file_with_locals.erb @@ -0,0 +1 @@ +The secret is <%= secret %> diff --git a/actionview/test/fixtures/test/render_file_with_locals_and_default.erb b/actionview/test/fixtures/test/render_file_with_locals_and_default.erb new file mode 100644 index 0000000000..9b4900acc5 --- /dev/null +++ b/actionview/test/fixtures/test/render_file_with_locals_and_default.erb @@ -0,0 +1 @@ +<%= secret ||= 'one' %>
\ No newline at end of file diff --git a/actionview/test/fixtures/test/render_partial_inside_directory.html.erb b/actionview/test/fixtures/test/render_partial_inside_directory.html.erb new file mode 100644 index 0000000000..1461b95186 --- /dev/null +++ b/actionview/test/fixtures/test/render_partial_inside_directory.html.erb @@ -0,0 +1 @@ +<%= render partial: 'test/_directory/partial_with_locales', locals: {'name' => 'Jane'} %> diff --git a/actionview/test/fixtures/test/render_two_partials.html.erb b/actionview/test/fixtures/test/render_two_partials.html.erb new file mode 100644 index 0000000000..3db6025860 --- /dev/null +++ b/actionview/test/fixtures/test/render_two_partials.html.erb @@ -0,0 +1,2 @@ +<%= render :partial => 'partial', :locals => {'first' => '1'} %> +<%= render :partial => 'partial', :locals => {'second' => '2'} %> diff --git a/actionpack/test/fixtures/test/streaming.erb b/actionview/test/fixtures/test/streaming.erb index fb9b8b1ade..fb9b8b1ade 100644 --- a/actionpack/test/fixtures/test/streaming.erb +++ b/actionview/test/fixtures/test/streaming.erb diff --git a/actionpack/test/fixtures/test/streaming_buster.erb b/actionview/test/fixtures/test/streaming_buster.erb index 4221d56dcc..4221d56dcc 100644 --- a/actionpack/test/fixtures/test/streaming_buster.erb +++ b/actionview/test/fixtures/test/streaming_buster.erb diff --git a/actionpack/test/fixtures/test/sub_template_raise.html.erb b/actionview/test/fixtures/test/sub_template_raise.html.erb index f38c0bda90..f38c0bda90 100644 --- a/actionpack/test/fixtures/test/sub_template_raise.html.erb +++ b/actionview/test/fixtures/test/sub_template_raise.html.erb diff --git a/actionpack/test/fixtures/test/template.erb b/actionview/test/fixtures/test/template.erb index 785afa8f6a..785afa8f6a 100644 --- a/actionpack/test/fixtures/test/template.erb +++ b/actionview/test/fixtures/test/template.erb diff --git a/actionpack/test/fixtures/test/update_element_with_capture.erb b/actionview/test/fixtures/test/update_element_with_capture.erb index fa3ef200f9..fa3ef200f9 100644 --- a/actionpack/test/fixtures/test/update_element_with_capture.erb +++ b/actionview/test/fixtures/test/update_element_with_capture.erb diff --git a/actionpack/test/fixtures/test/utf8.html.erb b/actionview/test/fixtures/test/utf8.html.erb index ac98c2f012..ac98c2f012 100644 --- a/actionpack/test/fixtures/test/utf8.html.erb +++ b/actionview/test/fixtures/test/utf8.html.erb diff --git a/actionpack/test/fixtures/test/utf8_magic.html.erb b/actionview/test/fixtures/test/utf8_magic.html.erb index 257279c29f..257279c29f 100644 --- a/actionpack/test/fixtures/test/utf8_magic.html.erb +++ b/actionview/test/fixtures/test/utf8_magic.html.erb diff --git a/actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb b/actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb index cb22692f9a..cb22692f9a 100644 --- a/actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +++ b/actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb diff --git a/actionpack/test/fixtures/topic.rb b/actionview/test/fixtures/topic.rb index 9fa9746535..9fa9746535 100644 --- a/actionpack/test/fixtures/topic.rb +++ b/actionview/test/fixtures/topic.rb diff --git a/actionpack/test/fixtures/topics.yml b/actionview/test/fixtures/topics.yml index 7fdd49d54e..7fdd49d54e 100644 --- a/actionpack/test/fixtures/topics.yml +++ b/actionview/test/fixtures/topics.yml diff --git a/actionpack/test/fixtures/topics/_topic.html.erb b/actionview/test/fixtures/topics/_topic.html.erb index 98659ca098..98659ca098 100644 --- a/actionpack/test/fixtures/topics/_topic.html.erb +++ b/actionview/test/fixtures/topics/_topic.html.erb diff --git a/actionpack/test/fixtures/translations/templates/array.erb b/actionview/test/fixtures/translations/templates/array.erb index d86045a172..d86045a172 100644 --- a/actionpack/test/fixtures/translations/templates/array.erb +++ b/actionview/test/fixtures/translations/templates/array.erb diff --git a/actionpack/test/fixtures/translations/templates/default.erb b/actionview/test/fixtures/translations/templates/default.erb index 8b70031071..8b70031071 100644 --- a/actionpack/test/fixtures/translations/templates/default.erb +++ b/actionview/test/fixtures/translations/templates/default.erb diff --git a/actionpack/test/fixtures/translations/templates/found.erb b/actionview/test/fixtures/translations/templates/found.erb index 080c9c0aee..080c9c0aee 100644 --- a/actionpack/test/fixtures/translations/templates/found.erb +++ b/actionview/test/fixtures/translations/templates/found.erb diff --git a/actionpack/test/fixtures/translations/templates/missing.erb b/actionview/test/fixtures/translations/templates/missing.erb index 0f3f17f8ef..0f3f17f8ef 100644 --- a/actionpack/test/fixtures/translations/templates/missing.erb +++ b/actionview/test/fixtures/translations/templates/missing.erb diff --git a/actionpack/test/fixtures/with_format.json.erb b/actionview/test/fixtures/with_format.json.erb index a7f480ab1d..a7f480ab1d 100644 --- a/actionpack/test/fixtures/with_format.json.erb +++ b/actionview/test/fixtures/with_format.json.erb diff --git a/actionview/test/lib/controller/fake_controllers.rb b/actionview/test/lib/controller/fake_controllers.rb new file mode 100644 index 0000000000..1a2863b689 --- /dev/null +++ b/actionview/test/lib/controller/fake_controllers.rb @@ -0,0 +1,35 @@ +class ContentController < ActionController::Base; end + +module Admin + class AccountsController < ActionController::Base; end + class PostsController < ActionController::Base; end + class StuffController < ActionController::Base; end + class UserController < ActionController::Base; end + class UsersController < ActionController::Base; end +end + +module Api + class UsersController < ActionController::Base; end + class ProductsController < ActionController::Base; end +end + +class AccountController < ActionController::Base; end +class ArchiveController < ActionController::Base; end +class ArticlesController < ActionController::Base; end +class BarController < ActionController::Base; end +class BlogController < ActionController::Base; end +class BooksController < ActionController::Base; end +class CarsController < ActionController::Base; end +class CcController < ActionController::Base; end +class CController < ActionController::Base; end +class FooController < ActionController::Base; end +class GeocodeController < ActionController::Base; end +class NewsController < ActionController::Base; end +class NotesController < ActionController::Base; end +class PagesController < ActionController::Base; end +class PeopleController < ActionController::Base; end +class PostsController < ActionController::Base; end +class SubpathBooksController < ActionController::Base; end +class SymbolsController < ActionController::Base; end +class UserController < ActionController::Base; end +class UsersController < ActionController::Base; end diff --git a/actionview/test/lib/controller/fake_models.rb b/actionview/test/lib/controller/fake_models.rb new file mode 100644 index 0000000000..a463a08bb6 --- /dev/null +++ b/actionview/test/lib/controller/fake_models.rb @@ -0,0 +1,185 @@ +require "active_model" + +class Customer < Struct.new(:name, :id) + extend ActiveModel::Naming + include ActiveModel::Conversion + + undef_method :to_json + + def to_xml(options={}) + if options[:builder] + options[:builder].name name + else + "<name>#{name}</name>" + end + end + + def to_js(options={}) + "name: #{name.inspect}" + end + alias :to_text :to_js + + def errors + [] + end + + def persisted? + id.present? + end +end + +class GoodCustomer < Customer +end + +class Post < Struct.new(:title, :author_name, :body, :secret, :persisted, :written_on, :cost) + extend ActiveModel::Naming + include ActiveModel::Conversion + extend ActiveModel::Translation + + alias_method :secret?, :secret + alias_method :persisted?, :persisted + + def initialize(*args) + super + @persisted = false + end + + attr_accessor :author + def author_attributes=(attributes); end + + attr_accessor :comments, :comment_ids + def comments_attributes=(attributes); end + + attr_accessor :tags + def tags_attributes=(attributes); end +end + +class Comment + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + attr_reader :post_id + def initialize(id = nil, post_id = nil); @id, @post_id = id, post_id end + def to_key; id ? [id] : nil end + def save; @id = 1; @post_id = 1 end + def persisted?; @id.present? end + def to_param; @id.to_s; end + def name + @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" + end + + attr_accessor :relevances + def relevances_attributes=(attributes); end + + attr_accessor :body +end + +class Tag + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + attr_reader :post_id + def initialize(id = nil, post_id = nil); @id, @post_id = id, post_id end + def to_key; id ? [id] : nil end + def save; @id = 1; @post_id = 1 end + def persisted?; @id.present? end + def to_param; @id; end + def value + @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" + end + + attr_accessor :relevances + def relevances_attributes=(attributes); end + +end + +class CommentRelevance + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + attr_reader :comment_id + def initialize(id = nil, comment_id = nil); @id, @comment_id = id, comment_id end + def to_key; id ? [id] : nil end + def save; @id = 1; @comment_id = 1 end + def persisted?; @id.present? end + def to_param; @id; end + def value + @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" + end +end + +class Sheep + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + def to_key; id ? [id] : nil end + def save; @id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new sheep' : "sheep ##{@id}" + end +end + +class TagRelevance + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + attr_reader :tag_id + def initialize(id = nil, tag_id = nil); @id, @tag_id = id, tag_id end + def to_key; id ? [id] : nil end + def save; @id = 1; @tag_id = 1 end + def persisted?; @id.present? end + def to_param; @id; end + def value + @id.nil? ? "new #{self.class.name.downcase}" : "#{self.class.name.downcase} ##{@id}" + end +end + +class Author < Comment + attr_accessor :post + def post_attributes=(attributes); end +end + +class HashBackedAuthor < Hash + extend ActiveModel::Naming + include ActiveModel::Conversion + + def persisted?; false; end + + def name + "hash backed author" + end +end + +module Blog + def self.use_relative_model_naming? + true + end + + class Post < Struct.new(:title, :id) + extend ActiveModel::Naming + include ActiveModel::Conversion + + def persisted? + id.present? + end + end +end + +class ArelLike + def to_ary + true + end + def each + a = Array.new(2) { |id| Comment.new(id + 1) } + a.each { |i| yield i } + end +end + +class Car < Struct.new(:color) +end diff --git a/actionpack/test/template/active_model_helper_test.rb b/actionview/test/template/active_model_helper_test.rb index 86bccdfade..86bccdfade 100644 --- a/actionpack/test/template/active_model_helper_test.rb +++ b/actionview/test/template/active_model_helper_test.rb diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index 214a13654e..214a13654e 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb diff --git a/actionpack/test/template/atom_feed_helper_test.rb b/actionview/test/template/atom_feed_helper_test.rb index 63b5ac0fab..63b5ac0fab 100644 --- a/actionpack/test/template/atom_feed_helper_test.rb +++ b/actionview/test/template/atom_feed_helper_test.rb diff --git a/actionpack/test/template/capture_helper_test.rb b/actionview/test/template/capture_helper_test.rb index 938f1c3e54..938f1c3e54 100644 --- a/actionpack/test/template/capture_helper_test.rb +++ b/actionview/test/template/capture_helper_test.rb diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionview/test/template/compiled_templates_test.rb index f5dc2fbb33..2336321f3e 100644 --- a/actionpack/test/template/compiled_templates_test.rb +++ b/actionview/test/template/compiled_templates_test.rb @@ -1,5 +1,4 @@ require 'abstract_unit' -require 'controller/fake_models' class CompiledTemplatesTest < ActiveSupport::TestCase def setup diff --git a/actionpack/test/template/date_helper_i18n_test.rb b/actionview/test/template/date_helper_i18n_test.rb index 21fca35185..21fca35185 100644 --- a/actionpack/test/template/date_helper_i18n_test.rb +++ b/actionview/test/template/date_helper_i18n_test.rb diff --git a/actionpack/test/template/date_helper_test.rb b/actionview/test/template/date_helper_test.rb index 242b56a1fd..242b56a1fd 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionview/test/template/date_helper_test.rb diff --git a/actionpack/test/template/debug_helper_test.rb b/actionview/test/template/debug_helper_test.rb index 42d06bd9ff..42d06bd9ff 100644 --- a/actionpack/test/template/debug_helper_test.rb +++ b/actionview/test/template/debug_helper_test.rb diff --git a/actionpack/test/template/dependency_tracker_test.rb b/actionview/test/template/dependency_tracker_test.rb index 7a9b4b26ac..7a9b4b26ac 100644 --- a/actionpack/test/template/dependency_tracker_test.rb +++ b/actionview/test/template/dependency_tracker_test.rb diff --git a/actionpack/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index 06735c30d3..06735c30d3 100644 --- a/actionpack/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb diff --git a/actionpack/test/template/erb/form_for_test.rb b/actionview/test/template/erb/form_for_test.rb index e722b40a9a..e722b40a9a 100644 --- a/actionpack/test/template/erb/form_for_test.rb +++ b/actionview/test/template/erb/form_for_test.rb diff --git a/actionpack/test/template/erb/helper.rb b/actionview/test/template/erb/helper.rb index a1973068d5..a1973068d5 100644 --- a/actionpack/test/template/erb/helper.rb +++ b/actionview/test/template/erb/helper.rb diff --git a/actionpack/test/template/erb/tag_helper_test.rb b/actionview/test/template/erb/tag_helper_test.rb index 84e328d8be..84e328d8be 100644 --- a/actionpack/test/template/erb/tag_helper_test.rb +++ b/actionview/test/template/erb/tag_helper_test.rb diff --git a/actionpack/test/template/erb_util_test.rb b/actionview/test/template/erb_util_test.rb index 3e5b029cea..3e5b029cea 100644 --- a/actionpack/test/template/erb_util_test.rb +++ b/actionview/test/template/erb_util_test.rb diff --git a/actionpack/test/template/form_collections_helper_test.rb b/actionview/test/template/form_collections_helper_test.rb index bc9c21dfd3..bc9c21dfd3 100644 --- a/actionpack/test/template/form_collections_helper_test.rb +++ b/actionview/test/template/form_collections_helper_test.rb diff --git a/actionpack/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index 1ff320224d..1ff320224d 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb diff --git a/actionpack/test/template/form_options_helper_i18n_test.rb b/actionview/test/template/form_options_helper_i18n_test.rb index 4972ea6511..4972ea6511 100644 --- a/actionpack/test/template/form_options_helper_i18n_test.rb +++ b/actionview/test/template/form_options_helper_i18n_test.rb diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb index 1715902927..1715902927 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionview/test/template/form_options_helper_test.rb diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 70fc6a588b..70fc6a588b 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb diff --git a/actionpack/test/template/html-scanner/cdata_node_test.rb b/actionview/test/template/html-scanner/cdata_node_test.rb index 9b58174641..9b58174641 100644 --- a/actionpack/test/template/html-scanner/cdata_node_test.rb +++ b/actionview/test/template/html-scanner/cdata_node_test.rb diff --git a/actionpack/test/template/html-scanner/document_test.rb b/actionview/test/template/html-scanner/document_test.rb index 17f045d549..17f045d549 100644 --- a/actionpack/test/template/html-scanner/document_test.rb +++ b/actionview/test/template/html-scanner/document_test.rb diff --git a/actionpack/test/template/html-scanner/node_test.rb b/actionview/test/template/html-scanner/node_test.rb index 5b5d092036..5b5d092036 100644 --- a/actionpack/test/template/html-scanner/node_test.rb +++ b/actionview/test/template/html-scanner/node_test.rb diff --git a/actionpack/test/template/html-scanner/sanitizer_test.rb b/actionview/test/template/html-scanner/sanitizer_test.rb index b1c1b83807..b1c1b83807 100644 --- a/actionpack/test/template/html-scanner/sanitizer_test.rb +++ b/actionview/test/template/html-scanner/sanitizer_test.rb diff --git a/actionpack/test/template/html-scanner/tag_node_test.rb b/actionview/test/template/html-scanner/tag_node_test.rb index a29d2d43d7..a29d2d43d7 100644 --- a/actionpack/test/template/html-scanner/tag_node_test.rb +++ b/actionview/test/template/html-scanner/tag_node_test.rb diff --git a/actionpack/test/template/html-scanner/text_node_test.rb b/actionview/test/template/html-scanner/text_node_test.rb index cbcb9e78f0..cbcb9e78f0 100644 --- a/actionpack/test/template/html-scanner/text_node_test.rb +++ b/actionview/test/template/html-scanner/text_node_test.rb diff --git a/actionpack/test/template/html-scanner/tokenizer_test.rb b/actionview/test/template/html-scanner/tokenizer_test.rb index 1d59de23b6..1d59de23b6 100644 --- a/actionpack/test/template/html-scanner/tokenizer_test.rb +++ b/actionview/test/template/html-scanner/tokenizer_test.rb diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb index de6a6eaab3..de6a6eaab3 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionview/test/template/javascript_helper_test.rb diff --git a/actionpack/test/template/log_subscriber_test.rb b/actionview/test/template/log_subscriber_test.rb index 7f4c84929f..7f4c84929f 100644 --- a/actionpack/test/template/log_subscriber_test.rb +++ b/actionview/test/template/log_subscriber_test.rb diff --git a/actionpack/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index 073bd14783..073bd14783 100644 --- a/actionpack/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb diff --git a/actionpack/test/template/number_helper_test.rb b/actionview/test/template/number_helper_test.rb index 6e640889d2..6e640889d2 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionview/test/template/number_helper_test.rb diff --git a/actionpack/test/template/output_buffer_test.rb b/actionview/test/template/output_buffer_test.rb index eb0df3d1ab..eb0df3d1ab 100644 --- a/actionpack/test/template/output_buffer_test.rb +++ b/actionview/test/template/output_buffer_test.rb diff --git a/actionpack/test/template/output_safety_helper_test.rb b/actionview/test/template/output_safety_helper_test.rb index 76c71c9e6d..76c71c9e6d 100644 --- a/actionpack/test/template/output_safety_helper_test.rb +++ b/actionview/test/template/output_safety_helper_test.rb diff --git a/actionpack/test/template/record_identifier_test.rb b/actionview/test/template/record_identifier_test.rb index 22038110a5..22038110a5 100644 --- a/actionpack/test/template/record_identifier_test.rb +++ b/actionview/test/template/record_identifier_test.rb diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionview/test/template/record_tag_helper_test.rb index ab84bccb56..ab84bccb56 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionview/test/template/record_tag_helper_test.rb diff --git a/actionpack/test/template/render_test.rb b/actionview/test/template/render_test.rb index 81f3391fcd..8cffe73cce 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -376,6 +376,7 @@ module RenderTestCases def test_render_ignores_templates_with_malformed_template_handlers ActiveSupport::Deprecation.silence do %w(malformed malformed.erb malformed.html.erb malformed.en.html.erb).each do |name| + assert File.exists?(File.expand_path("#{FIXTURE_LOAD_PATH}/test/malformed/#{name}~")), "Malformed file (#{name}~) which should be ignored does not exists" assert_raises(ActionView::MissingTemplate) { @view.render(:file => "test/malformed/#{name}") } end end diff --git a/actionpack/test/template/resolver_patterns_test.rb b/actionview/test/template/resolver_patterns_test.rb index 97b1bad055..97b1bad055 100644 --- a/actionpack/test/template/resolver_patterns_test.rb +++ b/actionview/test/template/resolver_patterns_test.rb diff --git a/actionpack/test/template/sanitize_helper_test.rb b/actionview/test/template/sanitize_helper_test.rb index 12d5260a9d..12d5260a9d 100644 --- a/actionpack/test/template/sanitize_helper_test.rb +++ b/actionview/test/template/sanitize_helper_test.rb diff --git a/actionpack/test/template/streaming_render_test.rb b/actionview/test/template/streaming_render_test.rb index 520bf3a824..8a24d78e74 100644 --- a/actionpack/test/template/streaming_render_test.rb +++ b/actionview/test/template/streaming_render_test.rb @@ -1,6 +1,5 @@ # encoding: utf-8 require 'abstract_unit' -require 'controller/fake_models' class TestController < ActionController::Base end diff --git a/actionpack/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb index 802da5d566..802da5d566 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionview/test/template/tag_helper_test.rb diff --git a/actionpack/test/template/template_error_test.rb b/actionview/test/template/template_error_test.rb index 91424daeed..91424daeed 100644 --- a/actionpack/test/template/template_error_test.rb +++ b/actionview/test/template/template_error_test.rb diff --git a/actionpack/test/template/template_test.rb b/actionview/test/template/template_test.rb index c94508d678..c94508d678 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionview/test/template/template_test.rb diff --git a/actionpack/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb index acd002ce73..4ee0930341 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionview/test/template/test_case_test.rb @@ -1,5 +1,4 @@ require 'abstract_unit' -require 'controller/fake_controllers' module ActionView diff --git a/actionpack/test/template/test_test.rb b/actionview/test/template/test_test.rb index 108a674d95..108a674d95 100644 --- a/actionpack/test/template/test_test.rb +++ b/actionview/test/template/test_test.rb diff --git a/actionpack/test/template/testing/fixture_resolver_test.rb b/actionview/test/template/testing/fixture_resolver_test.rb index 9649f349cb..9649f349cb 100644 --- a/actionpack/test/template/testing/fixture_resolver_test.rb +++ b/actionview/test/template/testing/fixture_resolver_test.rb diff --git a/actionpack/test/template/testing/null_resolver_test.rb b/actionview/test/template/testing/null_resolver_test.rb index 55ec36e753..55ec36e753 100644 --- a/actionpack/test/template/testing/null_resolver_test.rb +++ b/actionview/test/template/testing/null_resolver_test.rb diff --git a/actionpack/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb index 1b2234f4e2..1b2234f4e2 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionview/test/template/text_helper_test.rb diff --git a/actionpack/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index d496dbb35e..d496dbb35e 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb diff --git a/actionpack/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb index eb4349015a..8373d7f992 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionview/test/template/url_helper_test.rb @@ -1,6 +1,5 @@ # encoding: utf-8 require 'abstract_unit' -require 'controller/fake_controllers' class UrlHelperTest < ActiveSupport::TestCase diff --git a/ci/travis.rb b/ci/travis.rb index 9029c3f41c..7e68993332 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -20,7 +20,8 @@ class Build 'am' => 'actionmailer', 'amo' => 'activemodel', 'as' => 'activesupport', - 'ar' => 'activerecord' + 'ar' => 'activerecord', + 'av' => 'actionview' } attr_reader :component, :options diff --git a/rails.gemspec b/rails.gemspec index 4a17beac69..b426faf0e8 100644 --- a/rails.gemspec +++ b/rails.gemspec @@ -20,6 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'activesupport', version s.add_dependency 'actionpack', version + s.add_dependency 'actionview', version s.add_dependency 'activerecord', version s.add_dependency 'actionmailer', version s.add_dependency 'railties', version diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 05e9c4ab6e..50253fe2bc 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -345,7 +345,7 @@ YAML #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/actionview/lib/action_view/locale/en.yml #{@plugin.path}/config/locales/en.yml #{app_path}/config/locales/en.yml #{app_path}/app/locales/en.yml |