jets 1.4.11 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +6 -5
- data/jets.gemspec +3 -2
- data/lib/jets.rb +8 -2
- data/lib/jets/builders/tidy.rb +2 -1
- data/lib/jets/commands/db.rb +3 -3
- data/lib/jets/commands/db/tasks.rb +5 -4
- data/lib/jets/generator.rb +3 -2
- data/lib/jets/router.rb +29 -4
- data/lib/jets/router/scope.rb +30 -0
- data/lib/jets/version.rb +1 -1
- data/vendor/rails/Brewfile +13 -0
- data/vendor/rails/CODE_OF_CONDUCT.md +12 -0
- data/vendor/rails/CONTRIBUTING.md +49 -0
- data/vendor/rails/Gemfile +174 -0
- data/vendor/rails/Gemfile.lock +564 -0
- data/vendor/rails/MIT-LICENSE +20 -0
- data/vendor/rails/RAILS_VERSION +1 -0
- data/vendor/rails/README.md +97 -0
- data/vendor/rails/RELEASING_RAILS.md +225 -0
- data/vendor/rails/Rakefile +72 -0
- data/vendor/rails/actionpack/CHANGELOG.md +407 -0
- data/vendor/rails/actionpack/MIT-LICENSE +21 -0
- data/vendor/rails/actionpack/README.rdoc +57 -0
- data/vendor/rails/actionpack/Rakefile +40 -0
- data/vendor/rails/actionpack/actionpack.gemspec +38 -0
- data/vendor/rails/actionpack/bin/test +5 -0
- data/vendor/rails/actionpack/lib/abstract_controller.rb +27 -0
- data/vendor/rails/actionpack/lib/abstract_controller/asset_paths.rb +12 -0
- data/vendor/rails/actionpack/lib/abstract_controller/base.rb +265 -0
- data/vendor/rails/actionpack/lib/abstract_controller/caching.rb +66 -0
- data/vendor/rails/actionpack/lib/abstract_controller/caching/fragments.rb +166 -0
- data/vendor/rails/actionpack/lib/abstract_controller/callbacks.rb +212 -0
- data/vendor/rails/actionpack/lib/abstract_controller/collector.rb +43 -0
- data/vendor/rails/actionpack/lib/abstract_controller/error.rb +6 -0
- data/vendor/rails/actionpack/lib/abstract_controller/helpers.rb +194 -0
- data/vendor/rails/actionpack/lib/abstract_controller/logger.rb +14 -0
- data/vendor/rails/actionpack/lib/abstract_controller/railties/routes_helpers.rb +20 -0
- data/vendor/rails/actionpack/lib/abstract_controller/rendering.rb +127 -0
- data/vendor/rails/actionpack/lib/abstract_controller/translation.rb +31 -0
- data/vendor/rails/actionpack/lib/abstract_controller/url_for.rb +35 -0
- data/vendor/rails/actionpack/lib/action_controller.rb +66 -0
- data/vendor/rails/actionpack/lib/action_controller/api.rb +149 -0
- data/vendor/rails/actionpack/lib/action_controller/api/api_rendering.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/base.rb +276 -0
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +46 -0
- data/vendor/rails/actionpack/lib/action_controller/form_builder.rb +50 -0
- data/vendor/rails/actionpack/lib/action_controller/log_subscriber.rb +78 -0
- data/vendor/rails/actionpack/lib/action_controller/metal.rb +256 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/basic_implicit_render.rb +13 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/conditional_get.rb +274 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/content_security_policy.rb +52 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/cookies.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/data_streaming.rb +152 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/etag_with_flash.rb +18 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/etag_with_template_digest.rb +57 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/exceptions.rb +53 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/flash.rb +61 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/force_ssl.rb +99 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/head.rb +60 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/helpers.rb +123 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/http_authentication.rb +519 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/implicit_render.rb +73 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/instrumentation.rb +107 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/live.rb +312 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/mime_responds.rb +313 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/parameter_encoding.rb +51 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/params_wrapper.rb +293 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/redirecting.rb +133 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/renderers.rb +181 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/rendering.rb +122 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/request_forgery_protection.rb +445 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/rescue.rb +28 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/streaming.rb +223 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/strong_parameters.rb +1086 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/testing.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/metal/url_for.rb +58 -0
- data/vendor/rails/actionpack/lib/action_controller/railtie.rb +89 -0
- data/vendor/rails/actionpack/lib/action_controller/railties/helpers.rb +24 -0
- data/vendor/rails/actionpack/lib/action_controller/renderer.rb +117 -0
- data/vendor/rails/actionpack/lib/action_controller/template_assertions.rb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +629 -0
- data/vendor/rails/actionpack/lib/action_dispatch.rb +112 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/cache.rb +220 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/content_security_policy.rb +272 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/filter_parameters.rb +84 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/filter_redirect.rb +37 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/headers.rb +132 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/mime_negotiation.rb +170 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/mime_type.rb +342 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/mime_types.rb +50 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/parameter_filter.rb +86 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/parameters.rb +126 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/rack_cache.rb +63 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/request.rb +430 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/response.rb +520 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/upload.rb +84 -0
- data/vendor/rails/actionpack/lib/action_dispatch/http/url.rb +350 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey.rb +7 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/formatter.rb +189 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/builder.rb +164 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/simulator.rb +41 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +158 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/builder.rb +78 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/dot.rb +36 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/simulator.rb +49 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb +120 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/nodes/node.rb +140 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/parser.rb +199 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/parser.y +50 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/parser_extras.rb +31 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/path/pattern.rb +198 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/route.rb +203 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/router.rb +156 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/router/utils.rb +102 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/routes.rb +82 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/scanner.rb +64 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/visitors.rb +268 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/fsm.css +30 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/fsm.js +134 -0
- data/vendor/rails/actionpack/lib/action_dispatch/journey/visualizer/index.html.erb +52 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb +36 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/cookies.rb +685 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +205 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/debug_locks.rb +124 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +147 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/executor.rb +21 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/flash.rb +300 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/public_exceptions.rb +57 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/reloader.rb +12 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb +183 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/request_id.rb +43 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +92 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/cache_store.rb +54 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +117 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +28 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +62 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/ssl.rb +150 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/stack.rb +116 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/static.rb +130 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +22 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +23 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +27 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +52 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb +9 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +16 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +9 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +21 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb +13 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb +161 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +11 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb +3 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +32 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.text.erb +11 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +20 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +7 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +6 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.text.erb +3 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb +16 -0
- data/vendor/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +200 -0
- data/vendor/rails/actionpack/lib/action_dispatch/railtie.rb +55 -0
- data/vendor/rails/actionpack/lib/action_dispatch/request/session.rb +234 -0
- data/vendor/rails/actionpack/lib/action_dispatch/request/utils.rb +78 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing.rb +260 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/endpoint.rb +17 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/inspector.rb +225 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/mapper.rb +2267 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +352 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/redirection.rb +201 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb +890 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/routes_proxy.rb +69 -0
- data/vendor/rails/actionpack/lib/action_dispatch/routing/url_for.rb +236 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_test_case.rb +147 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/browser.rb +49 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/driver.rb +59 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/server.rb +31 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +96 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +31 -0
- data/vendor/rails/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +26 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/assertion_response.rb +47 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions.rb +24 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions/response.rb +107 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/assertions/routing.rb +222 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/integration.rb +652 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/request_encoder.rb +55 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/test_process.rb +50 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/test_request.rb +71 -0
- data/vendor/rails/actionpack/lib/action_dispatch/testing/test_response.rb +53 -0
- data/vendor/rails/actionpack/lib/action_pack.rb +26 -0
- data/vendor/rails/actionpack/lib/action_pack/gem_version.rb +17 -0
- data/vendor/rails/actionpack/lib/action_pack/version.rb +10 -0
- data/vendor/rails/actionpack/test/abstract/callbacks_test.rb +270 -0
- data/vendor/rails/actionpack/test/abstract/collector_test.rb +65 -0
- data/vendor/rails/actionpack/test/abstract/translation_test.rb +79 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +457 -0
- data/vendor/rails/actionpack/test/assertions/response_assertions_test.rb +141 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +493 -0
- data/vendor/rails/actionpack/test/controller/api/conditional_get_test.rb +59 -0
- data/vendor/rails/actionpack/test/controller/api/data_streaming_test.rb +28 -0
- data/vendor/rails/actionpack/test/controller/api/force_ssl_test.rb +22 -0
- data/vendor/rails/actionpack/test/controller/api/implicit_render_test.rb +17 -0
- data/vendor/rails/actionpack/test/controller/api/params_wrapper_test.rb +28 -0
- data/vendor/rails/actionpack/test/controller/api/redirect_to_test.rb +21 -0
- data/vendor/rails/actionpack/test/controller/api/renderers_test.rb +50 -0
- data/vendor/rails/actionpack/test/controller/api/url_for_test.rb +22 -0
- data/vendor/rails/actionpack/test/controller/api/with_cookies_test.rb +23 -0
- data/vendor/rails/actionpack/test/controller/api/with_helpers_test.rb +44 -0
- data/vendor/rails/actionpack/test/controller/base_test.rb +323 -0
- data/vendor/rails/actionpack/test/controller/caching_test.rb +511 -0
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +169 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/default_url_options_with_before_action_test.rb +28 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +1050 -0
- data/vendor/rails/actionpack/test/controller/flash_hash_test.rb +216 -0
- data/vendor/rails/actionpack/test/controller/flash_test.rb +373 -0
- data/vendor/rails/actionpack/test/controller/force_ssl_test.rb +333 -0
- data/vendor/rails/actionpack/test/controller/form_builder_test.rb +19 -0
- data/vendor/rails/actionpack/test/controller/helper_test.rb +295 -0
- data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +179 -0
- data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +282 -0
- data/vendor/rails/actionpack/test/controller/http_token_authentication_test.rb +216 -0
- data/vendor/rails/actionpack/test/controller/integration_test.rb +1136 -0
- data/vendor/rails/actionpack/test/controller/live_stream_test.rb +518 -0
- data/vendor/rails/actionpack/test/controller/localized_templates_test.rb +48 -0
- data/vendor/rails/actionpack/test/controller/log_subscriber_test.rb +371 -0
- data/vendor/rails/actionpack/test/controller/metal/renderers_test.rb +50 -0
- data/vendor/rails/actionpack/test/controller/metal_test.rb +32 -0
- data/vendor/rails/actionpack/test/controller/mime/accept_format_test.rb +94 -0
- data/vendor/rails/actionpack/test/controller/mime/respond_to_test.rb +843 -0
- data/vendor/rails/actionpack/test/controller/new_base/bare_metal_test.rb +184 -0
- data/vendor/rails/actionpack/test/controller/new_base/base_test.rb +131 -0
- data/vendor/rails/actionpack/test/controller/new_base/content_negotiation_test.rb +28 -0
- data/vendor/rails/actionpack/test/controller/new_base/content_type_test.rb +116 -0
- data/vendor/rails/actionpack/test/controller/new_base/middleware_test.rb +112 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_action_test.rb +314 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_body_test.rb +172 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_context_test.rb +54 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_file_test.rb +72 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_html_test.rb +192 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_implicit_action_test.rb +59 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_layout_test.rb +128 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_partial_test.rb +62 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_plain_test.rb +170 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_streaming_test.rb +116 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_template_test.rb +240 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_test.rb +142 -0
- data/vendor/rails/actionpack/test/controller/new_base/render_xml_test.rb +12 -0
- data/vendor/rails/actionpack/test/controller/output_escaping_test.rb +17 -0
- data/vendor/rails/actionpack/test/controller/parameter_encoding_test.rb +52 -0
- data/vendor/rails/actionpack/test/controller/parameters/accessors_test.rb +324 -0
- data/vendor/rails/actionpack/test/controller/parameters/always_permitted_parameters_test.rb +30 -0
- data/vendor/rails/actionpack/test/controller/parameters/dup_test.rb +67 -0
- data/vendor/rails/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb +70 -0
- data/vendor/rails/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb +39 -0
- data/vendor/rails/actionpack/test/controller/parameters/mutators_test.rb +122 -0
- data/vendor/rails/actionpack/test/controller/parameters/nested_parameters_permit_test.rb +184 -0
- data/vendor/rails/actionpack/test/controller/parameters/parameters_permit_test.rb +516 -0
- data/vendor/rails/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb +33 -0
- data/vendor/rails/actionpack/test/controller/parameters/serialization_test.rb +55 -0
- data/vendor/rails/actionpack/test/controller/params_wrapper_test.rb +422 -0
- data/vendor/rails/actionpack/test/controller/permitted_params_test.rb +27 -0
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +395 -0
- data/vendor/rails/actionpack/test/controller/render_js_test.rb +36 -0
- data/vendor/rails/actionpack/test/controller/render_json_test.rb +137 -0
- data/vendor/rails/actionpack/test/controller/render_test.rb +843 -0
- data/vendor/rails/actionpack/test/controller/render_xml_test.rb +102 -0
- data/vendor/rails/actionpack/test/controller/renderer_test.rb +136 -0
- data/vendor/rails/actionpack/test/controller/renderers_test.rb +91 -0
- data/vendor/rails/actionpack/test/controller/request/test_request_test.rb +42 -0
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +1013 -0
- data/vendor/rails/actionpack/test/controller/required_params_test.rb +100 -0
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +364 -0
- data/vendor/rails/actionpack/test/controller/resources_test.rb +1369 -0
- data/vendor/rails/actionpack/test/controller/routing_test.rb +2108 -0
- data/vendor/rails/actionpack/test/controller/runner_test.rb +24 -0
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +259 -0
- data/vendor/rails/actionpack/test/controller/show_exceptions_test.rb +114 -0
- data/vendor/rails/actionpack/test/controller/streaming_test.rb +28 -0
- data/vendor/rails/actionpack/test/controller/test_case_test.rb +1157 -0
- data/vendor/rails/actionpack/test/controller/url_for_integration_test.rb +192 -0
- data/vendor/rails/actionpack/test/controller/url_for_test.rb +519 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +92 -0
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +135 -0
- data/vendor/rails/actionpack/test/dispatch/callbacks_test.rb +47 -0
- data/vendor/rails/actionpack/test/dispatch/content_security_policy_test.rb +525 -0
- data/vendor/rails/actionpack/test/dispatch/cookies_test.rb +1345 -0
- data/vendor/rails/actionpack/test/dispatch/debug_exceptions_test.rb +502 -0
- data/vendor/rails/actionpack/test/dispatch/debug_locks_test.rb +38 -0
- data/vendor/rails/actionpack/test/dispatch/exception_wrapper_test.rb +120 -0
- data/vendor/rails/actionpack/test/dispatch/executor_test.rb +136 -0
- data/vendor/rails/actionpack/test/dispatch/header_test.rb +169 -0
- data/vendor/rails/actionpack/test/dispatch/live_response_test.rb +98 -0
- data/vendor/rails/actionpack/test/dispatch/mapper_test.rb +210 -0
- data/vendor/rails/actionpack/test/dispatch/middleware_stack_test.rb +115 -0
- data/vendor/rails/actionpack/test/dispatch/mime_type_test.rb +187 -0
- data/vendor/rails/actionpack/test/dispatch/mount_test.rb +95 -0
- data/vendor/rails/actionpack/test/dispatch/prefix_generation_test.rb +463 -0
- data/vendor/rails/actionpack/test/dispatch/rack_cache_test.rb +23 -0
- data/vendor/rails/actionpack/test/dispatch/reloader_test.rb +167 -0
- data/vendor/rails/actionpack/test/dispatch/request/json_params_parsing_test.rb +207 -0
- data/vendor/rails/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +202 -0
- data/vendor/rails/actionpack/test/dispatch/request/query_string_parsing_test.rb +176 -0
- data/vendor/rails/actionpack/test/dispatch/request/session_test.rb +165 -0
- data/vendor/rails/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb +181 -0
- data/vendor/rails/actionpack/test/dispatch/request_id_test.rb +75 -0
- data/vendor/rails/actionpack/test/dispatch/request_test.rb +1307 -0
- data/vendor/rails/actionpack/test/dispatch/response_test.rb +542 -0
- data/vendor/rails/actionpack/test/dispatch/routing/concerns_test.rb +124 -0
- data/vendor/rails/actionpack/test/dispatch/routing/custom_url_helpers_test.rb +333 -0
- data/vendor/rails/actionpack/test/dispatch/routing/inspector_test.rb +425 -0
- data/vendor/rails/actionpack/test/dispatch/routing/ipv6_redirect_test.rb +46 -0
- data/vendor/rails/actionpack/test/dispatch/routing/route_set_test.rb +166 -0
- data/vendor/rails/actionpack/test/dispatch/routing_assertions_test.rb +209 -0
- data/vendor/rails/actionpack/test/dispatch/routing_test.rb +5112 -0
- data/vendor/rails/actionpack/test/dispatch/runner_test.rb +19 -0
- data/vendor/rails/actionpack/test/dispatch/session/abstract_store_test.rb +58 -0
- data/vendor/rails/actionpack/test/dispatch/session/cache_store_test.rb +183 -0
- data/vendor/rails/actionpack/test/dispatch/session/cookie_store_test.rb +417 -0
- data/vendor/rails/actionpack/test/dispatch/session/mem_cache_store_test.rb +205 -0
- data/vendor/rails/actionpack/test/dispatch/session/test_session_test.rb +65 -0
- data/vendor/rails/actionpack/test/dispatch/show_exceptions_test.rb +138 -0
- data/vendor/rails/actionpack/test/dispatch/ssl_test.rb +228 -0
- data/vendor/rails/actionpack/test/dispatch/static_test.rb +318 -0
- data/vendor/rails/actionpack/test/dispatch/system_testing/driver_test.rb +54 -0
- data/vendor/rails/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +81 -0
- data/vendor/rails/actionpack/test/dispatch/system_testing/server_test.rb +32 -0
- data/vendor/rails/actionpack/test/dispatch/system_testing/system_test_case_test.rb +84 -0
- data/vendor/rails/actionpack/test/dispatch/test_request_test.rb +131 -0
- data/vendor/rails/actionpack/test/dispatch/test_response_test.rb +37 -0
- data/vendor/rails/actionpack/test/dispatch/uploaded_file_test.rb +113 -0
- data/vendor/rails/actionpack/test/dispatch/url_generation_test.rb +141 -0
- data/vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/collection_cache/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/company.rb +11 -0
- data/vendor/rails/actionpack/test/fixtures/customers/_commented_customer.html.erb +5 -0
- data/vendor/rails/actionpack/test/fixtures/customers/_customer.html.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/filter_test/implicit_actions/edit.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/filter_test/implicit_actions/show.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/_formatted_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +5 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached_with_variant.html+phone.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached_with_options.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/xml_fragment_cached_with_html_partial.xml.builder +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +7 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +7 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/just_me_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/me_too_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb +7 -0
- data/vendor/rails/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb +7 -0
- data/vendor/rails/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb +6 -0
- data/vendor/rails/actionpack/test/fixtures/implicit_render_test/empty_action_with_mobile_variant.html+mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/implicit_render_test/empty_action_with_template.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/_customers.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/with_html_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/xhr.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/load_me.rb +4 -0
- data/vendor/rails/actionpack/test/fixtures/localized/hello_world.de.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/localized/hello_world.en.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/localized/hello_world.it.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_utf8_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/empty +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/hello.txt +1 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/none +9 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/ruby_on_rails.jpg +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/single_utf8_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/utf8_filename +10 -0
- data/vendor/rails/actionpack/test/fixtures/namespaced/implicit_render_test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/old_content_type/render_default_for_erb.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/400.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.da.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/bar.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/bar/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo/bar.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo/baz.css +3 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo/other-index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/223/343/202/223/343/201/253/343/201/241/343/201/257.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js +4 -0
- data/vendor/rails/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/gzip/foo.zoo +4 -0
- data/vendor/rails/actionpack/test/fixtures/public/gzip/foo.zoo.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/other-index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_all.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+tablet.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/variant_inline_syntax_without_block.html+phone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/variant_plus_none_for_format.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/variant_with_implicit_template_rendering.html+mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/ruby_template.ruby +2 -0
- data/vendor/rails/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +12 -0
- data/vendor/rails/actionpack/test/fixtures/shared.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/star_star_mime/index.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello/hello.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_partial.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
- data/vendor/rails/actionpack/test/fixtures/test/implicit_content_type.atom.builder +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/with_implicit_template.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/bar.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/bar/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/bar.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/baz.css +3 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo/other-index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/223/343/202/223/343/201/253/343/201/241/343/201/257.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/foo//343/201/225/343/202/210/343/201/206/343/201/252/343/202/211.html.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js +4 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo +4 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo.gz +0 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/index.html +1 -0
- data/vendor/rails/actionpack/test/fixtures//345/205/254/345/205/261/other-index.html +1 -0
- data/vendor/rails/actionpack/test/journey/gtg/builder_test.rb +81 -0
- data/vendor/rails/actionpack/test/journey/gtg/transition_table_test.rb +125 -0
- data/vendor/rails/actionpack/test/journey/nfa/simulator_test.rb +100 -0
- data/vendor/rails/actionpack/test/journey/nfa/transition_table_test.rb +74 -0
- data/vendor/rails/actionpack/test/journey/nodes/symbol_test.rb +19 -0
- data/vendor/rails/actionpack/test/journey/path/pattern_test.rb +286 -0
- data/vendor/rails/actionpack/test/journey/route/definition/parser_test.rb +112 -0
- data/vendor/rails/actionpack/test/journey/route/definition/scanner_test.rb +71 -0
- data/vendor/rails/actionpack/test/journey/route_test.rb +113 -0
- data/vendor/rails/actionpack/test/journey/router/utils_test.rb +48 -0
- data/vendor/rails/actionpack/test/journey/router_test.rb +544 -0
- data/vendor/rails/actionpack/test/journey/routes_test.rb +62 -0
- data/vendor/rails/actionpack/test/lib/controller/fake_controllers.rb +37 -0
- data/vendor/rails/actionpack/test/lib/controller/fake_models.rb +79 -0
- data/vendor/rails/actionpack/test/routing/helper_test.rb +33 -0
- data/vendor/rails/actionview/CHANGELOG.md +122 -0
- data/vendor/rails/actionview/MIT-LICENSE +21 -0
- data/vendor/rails/actionview/README.rdoc +38 -0
- data/vendor/rails/actionview/RUNNING_UJS_TESTS.rdoc +8 -0
- data/vendor/rails/actionview/RUNNING_UNIT_TESTS.rdoc +26 -0
- data/vendor/rails/actionview/Rakefile +136 -0
- data/vendor/rails/actionview/actionview.gemspec +38 -0
- data/vendor/rails/actionview/app/assets/javascripts/MIT-LICENSE +20 -0
- data/vendor/rails/actionview/app/assets/javascripts/README.md +55 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs.coffee +39 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/BANNER.js +5 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/confirm.coffee +26 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee +82 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/method.coffee +34 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee +90 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/start.coffee +71 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee +97 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee +4 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/csrf.coffee +25 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/dom.coffee +35 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee +68 -0
- data/vendor/rails/actionview/app/assets/javascripts/rails-ujs/utils/form.coffee +36 -0
- data/vendor/rails/actionview/bin/test +5 -0
- data/vendor/rails/actionview/blade.yml +11 -0
- data/vendor/rails/actionview/coffeelint.json +135 -0
- data/vendor/rails/actionview/lib/action_view.rb +97 -0
- data/vendor/rails/actionview/lib/action_view/base.rb +215 -0
- data/vendor/rails/actionview/lib/action_view/buffers.rb +52 -0
- data/vendor/rails/actionview/lib/action_view/context.rb +36 -0
- data/vendor/rails/actionview/lib/action_view/dependency_tracker.rb +175 -0
- data/vendor/rails/actionview/lib/action_view/digestor.rb +136 -0
- data/vendor/rails/actionview/lib/action_view/flows.rb +76 -0
- data/vendor/rails/actionview/lib/action_view/gem_version.rb +17 -0
- data/vendor/rails/actionview/lib/action_view/helpers.rb +68 -0
- data/vendor/rails/actionview/lib/action_view/helpers/active_model_helper.rb +55 -0
- data/vendor/rails/actionview/lib/action_view/helpers/asset_tag_helper.rb +511 -0
- data/vendor/rails/actionview/lib/action_view/helpers/asset_url_helper.rb +469 -0
- data/vendor/rails/actionview/lib/action_view/helpers/atom_feed_helper.rb +205 -0
- data/vendor/rails/actionview/lib/action_view/helpers/cache_helper.rb +263 -0
- data/vendor/rails/actionview/lib/action_view/helpers/capture_helper.rb +212 -0
- data/vendor/rails/actionview/lib/action_view/helpers/controller_helper.rb +36 -0
- data/vendor/rails/actionview/lib/action_view/helpers/csp_helper.rb +24 -0
- data/vendor/rails/actionview/lib/action_view/helpers/csrf_helper.rb +35 -0
- data/vendor/rails/actionview/lib/action_view/helpers/date_helper.rb +1156 -0
- data/vendor/rails/actionview/lib/action_view/helpers/debug_helper.rb +36 -0
- data/vendor/rails/actionview/lib/action_view/helpers/form_helper.rb +2337 -0
- data/vendor/rails/actionview/lib/action_view/helpers/form_options_helper.rb +887 -0
- data/vendor/rails/actionview/lib/action_view/helpers/form_tag_helper.rb +917 -0
- data/vendor/rails/actionview/lib/action_view/helpers/javascript_helper.rb +94 -0
- data/vendor/rails/actionview/lib/action_view/helpers/number_helper.rb +451 -0
- data/vendor/rails/actionview/lib/action_view/helpers/output_safety_helper.rb +70 -0
- data/vendor/rails/actionview/lib/action_view/helpers/record_tag_helper.rb +23 -0
- data/vendor/rails/actionview/lib/action_view/helpers/rendering_helper.rb +99 -0
- data/vendor/rails/actionview/lib/action_view/helpers/sanitize_helper.rb +177 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tag_helper.rb +313 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags.rb +44 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/base.rb +192 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/check_box.rb +66 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/checkable.rb +18 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +36 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_helpers.rb +119 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +31 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/collection_select.rb +30 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/color_field.rb +27 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/date_field.rb +15 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/date_select.rb +74 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_field.rb +32 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +21 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/datetime_select.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/email_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/file_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +31 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/hidden_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/label.rb +81 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/month_field.rb +15 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/number_field.rb +20 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/password_field.rb +14 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/placeholderable.rb +24 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/radio_button.rb +33 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/range_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/search_field.rb +27 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/select.rb +43 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/tel_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/text_area.rb +24 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/text_field.rb +34 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/time_field.rb +15 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/time_select.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/time_zone_select.rb +22 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/translator.rb +44 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/url_field.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/helpers/tags/week_field.rb +15 -0
- data/vendor/rails/actionview/lib/action_view/helpers/text_helper.rb +486 -0
- data/vendor/rails/actionview/lib/action_view/helpers/translation_helper.rb +141 -0
- data/vendor/rails/actionview/lib/action_view/helpers/url_helper.rb +676 -0
- data/vendor/rails/actionview/lib/action_view/layouts.rb +433 -0
- data/vendor/rails/actionview/lib/action_view/locale/en.yml +56 -0
- data/vendor/rails/actionview/lib/action_view/log_subscriber.rb +96 -0
- data/vendor/rails/actionview/lib/action_view/lookup_context.rb +274 -0
- data/vendor/rails/actionview/lib/action_view/model_naming.rb +14 -0
- data/vendor/rails/actionview/lib/action_view/path_set.rb +100 -0
- data/vendor/rails/actionview/lib/action_view/railtie.rb +82 -0
- data/vendor/rails/actionview/lib/action_view/record_identifier.rb +112 -0
- data/vendor/rails/actionview/lib/action_view/renderer/abstract_renderer.rb +55 -0
- data/vendor/rails/actionview/lib/action_view/renderer/partial_renderer.rb +552 -0
- data/vendor/rails/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +57 -0
- data/vendor/rails/actionview/lib/action_view/renderer/renderer.rb +56 -0
- data/vendor/rails/actionview/lib/action_view/renderer/streaming_template_renderer.rb +105 -0
- data/vendor/rails/actionview/lib/action_view/renderer/template_renderer.rb +102 -0
- data/vendor/rails/actionview/lib/action_view/rendering.rb +151 -0
- data/vendor/rails/actionview/lib/action_view/routing_url_for.rb +145 -0
- data/vendor/rails/actionview/lib/action_view/tasks/cache_digests.rake +25 -0
- data/vendor/rails/actionview/lib/action_view/template.rb +361 -0
- data/vendor/rails/actionview/lib/action_view/template/error.rb +141 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers.rb +66 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers/builder.rb +25 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers/erb.rb +74 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers/erb/erubi.rb +83 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers/html.rb +11 -0
- data/vendor/rails/actionview/lib/action_view/template/handlers/raw.rb +11 -0
- data/vendor/rails/actionview/lib/action_view/template/html.rb +34 -0
- data/vendor/rails/actionview/lib/action_view/template/resolver.rb +391 -0
- data/vendor/rails/actionview/lib/action_view/template/text.rb +33 -0
- data/vendor/rails/actionview/lib/action_view/template/types.rb +57 -0
- data/vendor/rails/actionview/lib/action_view/test_case.rb +300 -0
- data/vendor/rails/actionview/lib/action_view/testing/resolvers.rb +54 -0
- data/vendor/rails/actionview/lib/action_view/version.rb +10 -0
- data/vendor/rails/actionview/lib/action_view/view_paths.rb +105 -0
- data/vendor/rails/actionview/package.json +36 -0
- data/vendor/rails/actionview/test/abstract_unit.rb +236 -0
- data/vendor/rails/actionview/test/actionpack/abstract/abstract_controller_test.rb +292 -0
- data/vendor/rails/actionview/test/actionpack/abstract/helper_test.rb +128 -0
- data/vendor/rails/actionview/test/actionpack/abstract/layouts_test.rb +568 -0
- data/vendor/rails/actionview/test/actionpack/abstract/render_test.rb +103 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/formatted.html.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/index.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/abstract_controller/testing/me4/index.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/action_with_ivars.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/helper_test.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/index.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/layouts/abstract_controller/testing/me4.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/layouts/application.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/abstract/views/naked_render.erb +1 -0
- data/vendor/rails/actionview/test/actionpack/controller/capture_test.rb +83 -0
- data/vendor/rails/actionview/test/actionpack/controller/layout_test.rb +270 -0
- data/vendor/rails/actionview/test/actionpack/controller/render_test.rb +1294 -0
- data/vendor/rails/actionview/test/actionpack/controller/view_paths_test.rb +174 -0
- data/vendor/rails/actionview/test/active_record_unit.rb +92 -0
- data/vendor/rails/actionview/test/activerecord/controller_runtime_test.rb +95 -0
- data/vendor/rails/actionview/test/activerecord/debug_helper_test.rb +19 -0
- data/vendor/rails/actionview/test/activerecord/form_helper_activerecord_test.rb +90 -0
- data/vendor/rails/actionview/test/activerecord/polymorphic_routes_test.rb +780 -0
- data/vendor/rails/actionview/test/activerecord/relation_cache_test.rb +23 -0
- data/vendor/rails/actionview/test/activerecord/render_partial_with_record_identification_test.rb +188 -0
- data/vendor/rails/actionview/test/fixtures/_top_level_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/_top_level_partial_only.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/bad_customers/_bad_customer.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/customers/_customer.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/fun/games/_form.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/fun/games/hello_world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/good_customers/_good_customer.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/hello.html +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/alt/layouts/alt.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/controller_name_space/nested.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/item.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/layout_test.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/multiple_extensions.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/symlinked/symlinked_layout.erb +5 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/layouts/third_party_template_library.mab +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/views/goodbye.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layout_tests/views/hello.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_column.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_customers.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_partial_and_yield.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_yield_only.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/_yield_with_params.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/block_with_layout.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/builder.builder +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/partial_with_layout.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/standard.text.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/streaming.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/talk_from_action.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/with_html_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/xhr.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield_with_render_inline_inside.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/layouts/yield_with_render_partial_inside.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/quiz/questions/_question.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/shared.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_changing_priority.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_changing_priority.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_counter.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_counter.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_counter_with_as.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_greeting.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_iteration.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_iteration_with_as.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_customer_with_var.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_directory/_partial_with_locales.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_first_json_partial.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_form.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_hash_greeting.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_hash_object.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_hello.builder +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_json_change_priority.json.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_labelling_form.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_layout_for_partial.html.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial.js.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_for_use_in_layout.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_html_erb.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_name_local_variable.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_only.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_only_html.html +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_partial_with_partial.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_person.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_raise_indentation.html.erb +13 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/_second_json_partial.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/action_talk_to_layout.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/calling_partial_with_layout.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/capturing.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/change_priority.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for_concatenated.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/content_for_with_parameter.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_html_erb.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/formatted_xml_erb.xml.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/greeting.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/greeting.xml.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello,world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello.builder +4 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello/hello.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_container.builder +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder +3 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_with_layout_false.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_world_with_partial.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hello_xml_world.builder +11 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/html_template.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/hyphen-ated.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/list.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder +4 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/potential_conflicts.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/proper_block_detection.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_from_template.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_file_with_locals_and_default.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.da.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_implicit_js_template_without_layout.js.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_partial_inside_directory.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_to_string_test.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/render_two_partials.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/using_layout_around_block.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/with_html_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/with_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/with_partial.text.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/actionpack/test/with_xml_template.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/comments/empty.de.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/comments/empty.html+grid.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/comments/empty.html.builder +1 -0
- data/vendor/rails/actionview/test/fixtures/comments/empty.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/comments/empty.xml.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/companies.yml +24 -0
- data/vendor/rails/actionview/test/fixtures/company.rb +11 -0
- data/vendor/rails/actionview/test/fixtures/custom_pattern/another.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/custom_pattern/html/another.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/custom_pattern/html/path.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/customers/_customer.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/customers/_customer.xml.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/db_definitions/sqlite.sql +49 -0
- data/vendor/rails/actionview/test/fixtures/developer.rb +8 -0
- data/vendor/rails/actionview/test/fixtures/developers.yml +21 -0
- data/vendor/rails/actionview/test/fixtures/developers/_developer.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/developers_projects.yml +13 -0
- data/vendor/rails/actionview/test/fixtures/digestor/api/comments/_comment.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/api/comments/_comments.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/comments/_comment.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/comments/_comments.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/comments/show.js.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/events/_completed.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/events/_event.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/events/index.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/level/_recursion.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/level/below/_header.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/level/below/index.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/level/recursion.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/_form.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/_header.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/_message.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/actions/_move.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/edit.html.erb +5 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/index.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/new.html+iphone.erb +15 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/peek.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/show.html.erb +14 -0
- data/vendor/rails/actionview/test/fixtures/digestor/messages/thread.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/fun/games/_game.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/fun/games/hello_world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/fun/serious/games/_game.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/games/_game.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/good_customers/_good_customer.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/helpers/abc_helper.rb +5 -0
- data/vendor/rails/actionview/test/fixtures/helpers/helpery_test_helper.rb +7 -0
- data/vendor/rails/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb +6 -0
- data/vendor/rails/actionview/test/fixtures/layout_tests/alt/hello.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/layouts/_column.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/_customers.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/layouts/_partial_and_yield.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/_yield_only.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/layouts/_yield_with_params.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/layouts/render_partial_html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/streaming.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/layouts/streaming_with_capture.erb +6 -0
- data/vendor/rails/actionview/test/fixtures/layouts/streaming_with_locale.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/yield.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/mascot.rb +5 -0
- data/vendor/rails/actionview/test/fixtures/mascots.yml +4 -0
- data/vendor/rails/actionview/test/fixtures/mascots/_mascot.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/override/test/hello_world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/override2/layouts/test/sub.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/plain_text.raw +1 -0
- data/vendor/rails/actionview/test/fixtures/plain_text_with_characters.raw +1 -0
- data/vendor/rails/actionview/test/fixtures/project.rb +9 -0
- data/vendor/rails/actionview/test/fixtures/projects.yml +7 -0
- data/vendor/rails/actionview/test/fixtures/projects/_project.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/public/elsewhere/cools.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/elsewhere/file.css +1 -0
- data/vendor/rails/actionview/test/fixtures/public/foo/baz.css +3 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/application.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/bank.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/common.javascript +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/controls.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/dragdrop.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/effects.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/prototype.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/robber.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/subdir/subdir.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/javascripts/version.1.0.js +1 -0
- data/vendor/rails/actionview/test/fixtures/public/stylesheets/bank.css +1 -0
- data/vendor/rails/actionview/test/fixtures/public/stylesheets/random.styles +1 -0
- data/vendor/rails/actionview/test/fixtures/public/stylesheets/robber.css +1 -0
- data/vendor/rails/actionview/test/fixtures/public/stylesheets/subdir/subdir.css +1 -0
- data/vendor/rails/actionview/test/fixtures/public/stylesheets/version.1.0.css +1 -0
- data/vendor/rails/actionview/test/fixtures/replies.yml +15 -0
- data/vendor/rails/actionview/test/fixtures/replies/_reply.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/reply.rb +9 -0
- data/vendor/rails/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/ruby_template.ruby +2 -0
- data/vendor/rails/actionview/test/fixtures/shared.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_200.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_FooBar.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_a-in.html.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_builder_tag_nested_in_content_tag.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_cached_customer.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_cached_customer_as.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_cached_nested_cached_customer.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_changing_priority.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_changing_priority.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_counter.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_customer.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_customer.mobile.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_customer_greeting.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_customer_with_var.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_first_json_partial.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_from_helper.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_json_change_priority.json.erb +0 -0
- data/vendor/rails/actionview/test/fixtures/test/_klass.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_label_with_block.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/test/_layout_for_block_with_args.html.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_layout_for_partial.html.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/test/_local_inspector.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_nested_cached_customer.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_object_inspector.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_one.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_iteration_1.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_iteration_2.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_name_local_variable.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_only.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_shortcut_with_block_content.html.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout_block_content.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_layout_block_partial.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_only_html_version.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_partial.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/_partial_with_variants.html+grid.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_partialhtml.html +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_raise.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_raise_indentation.html.erb +13 -0
- data/vendor/rails/actionview/test/fixtures/test/_second_json_partial.json.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_two.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_utf8_partial.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/_utf8_partial_magic.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/_/360/237/215/243.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/basic.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/change_priority.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/dont_pick_me +1 -0
- data/vendor/rails/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/greeting.xml.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello.builder +4 -0
- data/vendor/rails/actionview/test/fixtures/test/hello/hello.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.da.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.erb~ +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.html+phone.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.pt-BR.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world.text+phone.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/hello_world_with_partial.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/html_template.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/layout_render_file.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/layout_render_object.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/list.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.en.html.erb~ +1 -0
- data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.erb~ +1 -0
- data/vendor/rails/actionview/test/fixtures/test/malformed/malformed.html.erb~ +1 -0
- data/vendor/rails/actionview/test/fixtures/test/malformed/malformed~ +1 -0
- data/vendor/rails/actionview/test/fixtures/test/nested_layout.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/nested_streaming.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/nil_return.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/one.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_inspect_local_assigns.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_instance_variable.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_unicode_local.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_with_locals_and_default.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_file_with_ruby_keyword_locals.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_partial_inside_directory.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/render_two_partials.html.erb +2 -0
- data/vendor/rails/actionview/test/fixtures/test/streaming.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/streaming_buster.erb +3 -0
- data/vendor/rails/actionview/test/fixtures/test/streaming_with_locale.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/sub_template_raise.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/template.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/test/update_element_with_capture.erb +9 -0
- data/vendor/rails/actionview/test/fixtures/test/utf8.html.erb +4 -0
- data/vendor/rails/actionview/test/fixtures/test/utf8_magic.html.erb +5 -0
- data/vendor/rails/actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +5 -0
- data/vendor/rails/actionview/test/fixtures/topic.rb +5 -0
- data/vendor/rails/actionview/test/fixtures/topics.yml +22 -0
- data/vendor/rails/actionview/test/fixtures/topics/_topic.html.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/translations/templates/array.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/translations/templates/default.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/translations/templates/found.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/translations/templates/missing.erb +1 -0
- data/vendor/rails/actionview/test/fixtures/with_format.json.erb +1 -0
- data/vendor/rails/actionview/test/lib/controller/fake_models.rb +204 -0
- data/vendor/rails/actionview/test/template/active_model_helper_test.rb +172 -0
- data/vendor/rails/actionview/test/template/asset_tag_helper_test.rb +913 -0
- data/vendor/rails/actionview/test/template/atom_feed_helper_test.rb +375 -0
- data/vendor/rails/actionview/test/template/capture_helper_test.rb +228 -0
- data/vendor/rails/actionview/test/template/compiled_templates_test.rb +94 -0
- data/vendor/rails/actionview/test/template/controller_helper_test.rb +34 -0
- data/vendor/rails/actionview/test/template/date_helper_i18n_test.rb +166 -0
- data/vendor/rails/actionview/test/template/date_helper_test.rb +3642 -0
- data/vendor/rails/actionview/test/template/dependency_tracker_test.rb +195 -0
- data/vendor/rails/actionview/test/template/digestor_test.rb +389 -0
- data/vendor/rails/actionview/test/template/erb/form_for_test.rb +13 -0
- data/vendor/rails/actionview/test/template/erb/helper.rb +26 -0
- data/vendor/rails/actionview/test/template/erb/tag_helper_test.rb +32 -0
- data/vendor/rails/actionview/test/template/erb_util_test.rb +114 -0
- data/vendor/rails/actionview/test/template/form_collections_helper_test.rb +527 -0
- data/vendor/rails/actionview/test/template/form_helper/form_with_test.rb +2293 -0
- data/vendor/rails/actionview/test/template/form_helper_test.rb +3554 -0
- data/vendor/rails/actionview/test/template/form_options_helper_i18n_test.rb +30 -0
- data/vendor/rails/actionview/test/template/form_options_helper_test.rb +1452 -0
- data/vendor/rails/actionview/test/template/form_tag_helper_test.rb +785 -0
- data/vendor/rails/actionview/test/template/html_test.rb +19 -0
- data/vendor/rails/actionview/test/template/javascript_helper_test.rb +68 -0
- data/vendor/rails/actionview/test/template/log_subscriber_test.rb +224 -0
- data/vendor/rails/actionview/test/template/lookup_context_test.rb +289 -0
- data/vendor/rails/actionview/test/template/number_helper_test.rb +204 -0
- data/vendor/rails/actionview/test/template/output_safety_helper_test.rb +119 -0
- data/vendor/rails/actionview/test/template/partial_iteration_test.rb +35 -0
- data/vendor/rails/actionview/test/template/record_identifier_test.rb +93 -0
- data/vendor/rails/actionview/test/template/record_tag_helper_test.rb +33 -0
- data/vendor/rails/actionview/test/template/render_test.rb +725 -0
- data/vendor/rails/actionview/test/template/resolver_cache_test.rb +9 -0
- data/vendor/rails/actionview/test/template/resolver_patterns_test.rb +44 -0
- data/vendor/rails/actionview/test/template/sanitize_helper_test.rb +43 -0
- data/vendor/rails/actionview/test/template/streaming_render_test.rb +132 -0
- data/vendor/rails/actionview/test/template/tag_helper_test.rb +357 -0
- data/vendor/rails/actionview/test/template/template_error_test.rb +37 -0
- data/vendor/rails/actionview/test/template/template_test.rb +207 -0
- data/vendor/rails/actionview/test/template/test_case_test.rb +335 -0
- data/vendor/rails/actionview/test/template/test_test.rb +94 -0
- data/vendor/rails/actionview/test/template/testing/fixture_resolver_test.rb +20 -0
- data/vendor/rails/actionview/test/template/testing/null_resolver_test.rb +14 -0
- data/vendor/rails/actionview/test/template/text_helper_test.rb +535 -0
- data/vendor/rails/actionview/test/template/text_test.rb +25 -0
- data/vendor/rails/actionview/test/template/translation_helper_test.rb +238 -0
- data/vendor/rails/actionview/test/template/url_helper_test.rb +976 -0
- data/vendor/rails/actionview/test/ujs/config.ru +6 -0
- data/vendor/rails/actionview/test/ujs/public/test/call-ajax.js +26 -0
- data/vendor/rails/actionview/test/ujs/public/test/call-remote-callbacks.js +239 -0
- data/vendor/rails/actionview/test/ujs/public/test/call-remote.js +275 -0
- data/vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js +24 -0
- data/vendor/rails/actionview/test/ujs/public/test/csrf-token.js +27 -0
- data/vendor/rails/actionview/test/ujs/public/test/data-confirm.js +316 -0
- data/vendor/rails/actionview/test/ujs/public/test/data-disable-with.js +394 -0
- data/vendor/rails/actionview/test/ujs/public/test/data-disable.js +322 -0
- data/vendor/rails/actionview/test/ujs/public/test/data-method.js +85 -0
- data/vendor/rails/actionview/test/ujs/public/test/data-remote.js +441 -0
- data/vendor/rails/actionview/test/ujs/public/test/override.js +56 -0
- data/vendor/rails/actionview/test/ujs/public/test/settings.js +118 -0
- data/vendor/rails/actionview/test/ujs/public/vendor/jquery-2.2.0.js +9831 -0
- data/vendor/rails/actionview/test/ujs/public/vendor/jquery.metadata.js +122 -0
- data/vendor/rails/actionview/test/ujs/public/vendor/qunit.css +237 -0
- data/vendor/rails/actionview/test/ujs/public/vendor/qunit.js +2288 -0
- data/vendor/rails/actionview/test/ujs/server.rb +86 -0
- data/vendor/rails/actionview/test/ujs/views/layouts/application.html.erb +26 -0
- data/vendor/rails/actionview/test/ujs/views/tests/index.html.erb +11 -0
- data/vendor/rails/ci/qunit-selenium-runner.rb +16 -0
- data/vendor/rails/ci/travis.rb +187 -0
- data/vendor/rails/rails.gemspec +36 -0
- data/vendor/rails/version.rb +17 -0
- metadata +1030 -30
@@ -0,0 +1,94 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "abstract_unit"
|
4
|
+
|
5
|
+
module PeopleHelper
|
6
|
+
def title(text)
|
7
|
+
content_tag(:h1, text)
|
8
|
+
end
|
9
|
+
|
10
|
+
def homepage_path
|
11
|
+
people_path
|
12
|
+
end
|
13
|
+
|
14
|
+
def homepage_url
|
15
|
+
people_url
|
16
|
+
end
|
17
|
+
|
18
|
+
def link_to_person(person)
|
19
|
+
link_to person.name, person
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class PeopleHelperTest < ActionView::TestCase
|
24
|
+
def test_title
|
25
|
+
assert_equal "<h1>Ruby on Rails</h1>", title("Ruby on Rails")
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_homepage_path
|
29
|
+
with_test_route_set do
|
30
|
+
assert_equal "/people", homepage_path
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_homepage_url
|
35
|
+
with_test_route_set do
|
36
|
+
assert_equal "http://test.host/people", homepage_url
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_link_to_person
|
41
|
+
with_test_route_set do
|
42
|
+
person = Struct.new(:name) {
|
43
|
+
extend ActiveModel::Naming
|
44
|
+
def to_model; self; end
|
45
|
+
def persisted?; true; end
|
46
|
+
def self.name; "Minitest::Mock"; end
|
47
|
+
}.new "David"
|
48
|
+
|
49
|
+
the_model = nil
|
50
|
+
extend Module.new {
|
51
|
+
define_method(:minitest_mock_path) { |model, *args|
|
52
|
+
the_model = model
|
53
|
+
"/people/1"
|
54
|
+
}
|
55
|
+
}
|
56
|
+
assert_equal '<a href="/people/1">David</a>', link_to_person(person)
|
57
|
+
assert_equal person, the_model
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
def with_test_route_set
|
63
|
+
with_routing do |set|
|
64
|
+
set.draw do
|
65
|
+
get "people", to: "people#index", as: :people
|
66
|
+
end
|
67
|
+
yield
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class CrazyHelperTest < ActionView::TestCase
|
73
|
+
tests PeopleHelper
|
74
|
+
|
75
|
+
def test_helper_class_can_be_set_manually_not_just_inferred
|
76
|
+
assert_equal PeopleHelper, self.class.helper_class
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class CrazySymbolHelperTest < ActionView::TestCase
|
81
|
+
tests :people
|
82
|
+
|
83
|
+
def test_set_helper_class_using_symbol
|
84
|
+
assert_equal PeopleHelper, self.class.helper_class
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class CrazyStringHelperTest < ActionView::TestCase
|
89
|
+
tests "people"
|
90
|
+
|
91
|
+
def test_set_helper_class_using_string
|
92
|
+
assert_equal PeopleHelper, self.class.helper_class
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "abstract_unit"
|
4
|
+
|
5
|
+
class FixtureResolverTest < ActiveSupport::TestCase
|
6
|
+
def test_should_return_empty_list_for_unknown_path
|
7
|
+
resolver = ActionView::FixtureResolver.new()
|
8
|
+
templates = resolver.find_all("path", "arbitrary", false, locale: [], formats: [:html], variants: [], handlers: [])
|
9
|
+
assert_equal [], templates, "expected an empty list of templates"
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_should_return_template_for_declared_path
|
13
|
+
resolver = ActionView::FixtureResolver.new("arbitrary/path.erb" => "this text")
|
14
|
+
templates = resolver.find_all("path", "arbitrary", false, locale: [], formats: [:html], variants: [], handlers: [:erb])
|
15
|
+
assert_equal 1, templates.size, "expected one template"
|
16
|
+
assert_equal "this text", templates.first.source
|
17
|
+
assert_equal "arbitrary/path", templates.first.virtual_path
|
18
|
+
assert_equal [:html], templates.first.formats
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "abstract_unit"
|
4
|
+
|
5
|
+
class NullResolverTest < ActiveSupport::TestCase
|
6
|
+
def test_should_return_template_for_any_path
|
7
|
+
resolver = ActionView::NullResolver.new()
|
8
|
+
templates = resolver.find_all("path.erb", "arbitrary", false, locale: [], formats: [:html], handlers: [])
|
9
|
+
assert_equal 1, templates.size, "expected one template"
|
10
|
+
assert_equal "Template generated by Null Resolver", templates.first.source
|
11
|
+
assert_equal "arbitrary/path.erb", templates.first.virtual_path.to_s
|
12
|
+
assert_equal [:html], templates.first.formats
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,535 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "abstract_unit"
|
4
|
+
|
5
|
+
class TextHelperTest < ActionView::TestCase
|
6
|
+
tests ActionView::Helpers::TextHelper
|
7
|
+
|
8
|
+
def setup
|
9
|
+
super
|
10
|
+
# This simulates the fact that instance variables are reset every time
|
11
|
+
# a view is rendered. The cycle helper depends on this behavior.
|
12
|
+
@_cycles = nil if (defined? @_cycles)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_concat
|
16
|
+
self.output_buffer = "foo".dup
|
17
|
+
assert_equal "foobar", concat("bar")
|
18
|
+
assert_equal "foobar", output_buffer
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_simple_format_should_be_html_safe
|
22
|
+
assert_predicate simple_format("<b> test with html tags </b>"), :html_safe?
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_simple_format_included_in_isolation
|
26
|
+
helper_klass = Class.new { include ActionView::Helpers::TextHelper }
|
27
|
+
assert_predicate helper_klass.new.simple_format("<b> test with html tags </b>"), :html_safe?
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_simple_format
|
31
|
+
assert_equal "<p></p>", simple_format(nil)
|
32
|
+
|
33
|
+
assert_equal "<p>crazy\n<br /> cross\n<br /> platform linebreaks</p>", simple_format("crazy\r\n cross\r platform linebreaks")
|
34
|
+
assert_equal "<p>A paragraph</p>\n\n<p>and another one!</p>", simple_format("A paragraph\n\nand another one!")
|
35
|
+
assert_equal "<p>A paragraph\n<br /> With a newline</p>", simple_format("A paragraph\n With a newline")
|
36
|
+
|
37
|
+
text = "A\nB\nC\nD".freeze
|
38
|
+
assert_equal "<p>A\n<br />B\n<br />C\n<br />D</p>", simple_format(text)
|
39
|
+
|
40
|
+
text = "A\r\n \nB\n\n\r\n\t\nC\nD".freeze
|
41
|
+
assert_equal "<p>A\n<br /> \n<br />B</p>\n\n<p>\t\n<br />C\n<br />D</p>", simple_format(text)
|
42
|
+
|
43
|
+
assert_equal '<p class="test">This is a classy test</p>', simple_format("This is a classy test", class: "test")
|
44
|
+
assert_equal %Q(<p class="test">para 1</p>\n\n<p class="test">para 2</p>), simple_format("para 1\n\npara 2", class: "test")
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_simple_format_should_sanitize_input_when_sanitize_option_is_not_false
|
48
|
+
assert_equal "<p><b> test with unsafe string </b>code!</p>", simple_format("<b> test with unsafe string </b><script>code!</script>")
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_simple_format_should_sanitize_input_when_sanitize_option_is_true
|
52
|
+
assert_equal "<p><b> test with unsafe string </b>code!</p>",
|
53
|
+
simple_format("<b> test with unsafe string </b><script>code!</script>", {}, { sanitize: true })
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_simple_format_should_not_sanitize_input_when_sanitize_option_is_false
|
57
|
+
assert_equal "<p><b> test with unsafe string </b><script>code!</script></p>", simple_format("<b> test with unsafe string </b><script>code!</script>", {}, { sanitize: false })
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_simple_format_with_custom_wrapper
|
61
|
+
assert_equal "<div></div>", simple_format(nil, {}, { wrapper_tag: "div" })
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_simple_format_with_custom_wrapper_and_multi_line_breaks
|
65
|
+
assert_equal "<div>We want to put a wrapper...</div>\n\n<div>...right there.</div>", simple_format("We want to put a wrapper...\n\n...right there.", {}, { wrapper_tag: "div" })
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_simple_format_should_not_change_the_text_passed
|
69
|
+
text = "<b>Ok</b><script>code!</script>"
|
70
|
+
text_clone = text.dup
|
71
|
+
simple_format(text)
|
72
|
+
assert_equal text_clone, text
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_simple_format_does_not_modify_the_html_options_hash
|
76
|
+
options = { class: "foobar" }
|
77
|
+
passed_options = options.dup
|
78
|
+
simple_format("some text", passed_options)
|
79
|
+
assert_equal options, passed_options
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_simple_format_does_not_modify_the_options_hash
|
83
|
+
options = { wrapper_tag: :div, sanitize: false }
|
84
|
+
passed_options = options.dup
|
85
|
+
simple_format("some text", {}, passed_options)
|
86
|
+
assert_equal options, passed_options
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_truncate
|
90
|
+
assert_equal "Hello World!", truncate("Hello World!", length: 12)
|
91
|
+
assert_equal "Hello Wor...", truncate("Hello World!!", length: 12)
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_truncate_should_use_default_length_of_30
|
95
|
+
str = "This is a string that will go longer then the default truncate length of 30"
|
96
|
+
assert_equal str[0...27] + "...", truncate(str)
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_truncate_with_options_hash
|
100
|
+
assert_equal "This is a string that wil[...]", truncate("This is a string that will go longer then the default truncate length of 30", omission: "[...]")
|
101
|
+
assert_equal "Hello W...", truncate("Hello World!", length: 10)
|
102
|
+
assert_equal "Hello[...]", truncate("Hello World!", omission: "[...]", length: 10)
|
103
|
+
assert_equal "Hello[...]", truncate("Hello Big World!", omission: "[...]", length: 13, separator: " ")
|
104
|
+
assert_equal "Hello Big[...]", truncate("Hello Big World!", omission: "[...]", length: 14, separator: " ")
|
105
|
+
assert_equal "Hello Big[...]", truncate("Hello Big World!", omission: "[...]", length: 15, separator: " ")
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_truncate_multibyte
|
109
|
+
assert_equal "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 ...".dup.force_encoding(Encoding::UTF_8),
|
110
|
+
truncate("\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 \354\225\204\353\235\274\353\246\254\354\230\244".dup.force_encoding(Encoding::UTF_8), length: 10)
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_truncate_does_not_modify_the_options_hash
|
114
|
+
options = { length: 10 }
|
115
|
+
passed_options = options.dup
|
116
|
+
truncate("some text", passed_options)
|
117
|
+
assert_equal options, passed_options
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_truncate_with_link_options
|
121
|
+
assert_equal "Here is a long test and ...<a href=\"#\">Continue</a>",
|
122
|
+
truncate("Here is a long test and I need a continue to read link", length: 27) { link_to "Continue", "#" }
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_truncate_should_be_html_safe
|
126
|
+
assert_predicate truncate("Hello World!", length: 12), :html_safe?
|
127
|
+
end
|
128
|
+
|
129
|
+
def test_truncate_should_escape_the_input
|
130
|
+
assert_equal "Hello <sc...", truncate("Hello <script>code!</script>World!!", length: 12)
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_truncate_should_not_escape_the_input_with_escape_false
|
134
|
+
assert_equal "Hello <sc...", truncate("Hello <script>code!</script>World!!", length: 12, escape: false)
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_truncate_with_escape_false_should_be_html_safe
|
138
|
+
truncated = truncate("Hello <script>code!</script>World!!", length: 12, escape: false)
|
139
|
+
assert_predicate truncated, :html_safe?
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_truncate_with_block_should_be_html_safe
|
143
|
+
truncated = truncate("Here's a long test and I need a continue to read link", length: 27) { link_to "Continue", "#" }
|
144
|
+
assert_predicate truncated, :html_safe?
|
145
|
+
end
|
146
|
+
|
147
|
+
def test_truncate_with_block_should_escape_the_input
|
148
|
+
assert_equal "<script>code!</script>He...<a href=\"#\">Continue</a>",
|
149
|
+
truncate("<script>code!</script>Here's a long test and I need a continue to read link", length: 27) { link_to "Continue", "#" }
|
150
|
+
end
|
151
|
+
|
152
|
+
def test_truncate_with_block_should_not_escape_the_input_with_escape_false
|
153
|
+
assert_equal "<script>code!</script>He...<a href=\"#\">Continue</a>",
|
154
|
+
truncate("<script>code!</script>Here's a long test and I need a continue to read link", length: 27, escape: false) { link_to "Continue", "#" }
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_truncate_with_block_with_escape_false_should_be_html_safe
|
158
|
+
truncated = truncate("<script>code!</script>Here's a long test and I need a continue to read link", length: 27, escape: false) { link_to "Continue", "#" }
|
159
|
+
assert_predicate truncated, :html_safe?
|
160
|
+
end
|
161
|
+
|
162
|
+
def test_truncate_with_block_should_escape_the_block
|
163
|
+
assert_equal "Here is a long test and ...<script>alert('foo');</script>",
|
164
|
+
truncate("Here is a long test and I need a continue to read link", length: 27) { "<script>alert('foo');</script>" }
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_highlight_should_be_html_safe
|
168
|
+
assert_predicate highlight("This is a beautiful morning", "beautiful"), :html_safe?
|
169
|
+
end
|
170
|
+
|
171
|
+
def test_highlight
|
172
|
+
assert_equal(
|
173
|
+
"This is a <mark>beautiful</mark> morning",
|
174
|
+
highlight("This is a beautiful morning", "beautiful")
|
175
|
+
)
|
176
|
+
|
177
|
+
assert_equal(
|
178
|
+
"This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day",
|
179
|
+
highlight("This is a beautiful morning, but also a beautiful day", "beautiful")
|
180
|
+
)
|
181
|
+
|
182
|
+
assert_equal(
|
183
|
+
"This is a <b>beautiful</b> morning, but also a <b>beautiful</b> day",
|
184
|
+
highlight("This is a beautiful morning, but also a beautiful day", "beautiful", highlighter: '<b>\1</b>')
|
185
|
+
)
|
186
|
+
|
187
|
+
assert_equal(
|
188
|
+
"This text is not changed because we supplied an empty phrase",
|
189
|
+
highlight("This text is not changed because we supplied an empty phrase", nil)
|
190
|
+
)
|
191
|
+
end
|
192
|
+
|
193
|
+
def test_highlight_pending
|
194
|
+
assert_equal " ", highlight(" ", "blank text is returned verbatim")
|
195
|
+
end
|
196
|
+
|
197
|
+
def test_highlight_should_return_blank_string_for_nil
|
198
|
+
assert_equal "", highlight(nil, "blank string is returned for nil")
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_highlight_should_sanitize_input
|
202
|
+
assert_equal(
|
203
|
+
"This is a <mark>beautiful</mark> morningcode!",
|
204
|
+
highlight("This is a beautiful morning<script>code!</script>", "beautiful")
|
205
|
+
)
|
206
|
+
end
|
207
|
+
|
208
|
+
def test_highlight_should_not_sanitize_if_sanitize_option_if_false
|
209
|
+
assert_equal(
|
210
|
+
"This is a <mark>beautiful</mark> morning<script>code!</script>",
|
211
|
+
highlight("This is a beautiful morning<script>code!</script>", "beautiful", sanitize: false)
|
212
|
+
)
|
213
|
+
end
|
214
|
+
|
215
|
+
def test_highlight_with_regexp
|
216
|
+
assert_equal(
|
217
|
+
"This is a <mark>beautiful!</mark> morning",
|
218
|
+
highlight("This is a beautiful! morning", "beautiful!")
|
219
|
+
)
|
220
|
+
|
221
|
+
assert_equal(
|
222
|
+
"This is a <mark>beautiful! morning</mark>",
|
223
|
+
highlight("This is a beautiful! morning", "beautiful! morning")
|
224
|
+
)
|
225
|
+
|
226
|
+
assert_equal(
|
227
|
+
"This is a <mark>beautiful? morning</mark>",
|
228
|
+
highlight("This is a beautiful? morning", "beautiful? morning")
|
229
|
+
)
|
230
|
+
end
|
231
|
+
|
232
|
+
def test_highlight_accepts_regexp
|
233
|
+
assert_equal("This day was challenging for judge <mark>Allen</mark> and his colleagues.",
|
234
|
+
highlight("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i))
|
235
|
+
end
|
236
|
+
|
237
|
+
def test_highlight_with_multiple_phrases_in_one_pass
|
238
|
+
assert_equal %(<em>wow</em> <em>em</em>), highlight("wow em", %w(wow em), highlighter: '<em>\1</em>')
|
239
|
+
end
|
240
|
+
|
241
|
+
def test_highlight_with_html
|
242
|
+
assert_equal(
|
243
|
+
"<p>This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day</p>",
|
244
|
+
highlight("<p>This is a beautiful morning, but also a beautiful day</p>", "beautiful")
|
245
|
+
)
|
246
|
+
assert_equal(
|
247
|
+
"<p>This is a <em><mark>beautiful</mark></em> morning, but also a <mark>beautiful</mark> day</p>",
|
248
|
+
highlight("<p>This is a <em>beautiful</em> morning, but also a beautiful day</p>", "beautiful")
|
249
|
+
)
|
250
|
+
assert_equal(
|
251
|
+
"<p>This is a <em class=\"error\"><mark>beautiful</mark></em> morning, but also a <mark>beautiful</mark> <span class=\"last\">day</span></p>",
|
252
|
+
highlight("<p>This is a <em class=\"error\">beautiful</em> morning, but also a beautiful <span class=\"last\">day</span></p>", "beautiful")
|
253
|
+
)
|
254
|
+
assert_equal(
|
255
|
+
"<p class=\"beautiful\">This is a <mark>beautiful</mark> morning, but also a <mark>beautiful</mark> day</p>",
|
256
|
+
highlight("<p class=\"beautiful\">This is a beautiful morning, but also a beautiful day</p>", "beautiful")
|
257
|
+
)
|
258
|
+
assert_equal(
|
259
|
+
"<p>This is a <mark>beautiful</mark> <a href=\"http://example.com/beautiful#top?what=beautiful%20morning&when=now+then\">morning</a>, but also a <mark>beautiful</mark> day</p>",
|
260
|
+
highlight("<p>This is a beautiful <a href=\"http://example.com/beautiful\#top?what=beautiful%20morning&when=now+then\">morning</a>, but also a beautiful day</p>", "beautiful")
|
261
|
+
)
|
262
|
+
assert_equal(
|
263
|
+
"<div>abc <b>div</b></div>",
|
264
|
+
highlight("<div>abc div</div>", "div", highlighter: '<b>\1</b>')
|
265
|
+
)
|
266
|
+
end
|
267
|
+
|
268
|
+
def test_highlight_does_not_modify_the_options_hash
|
269
|
+
options = { highlighter: '<b>\1</b>', sanitize: false }
|
270
|
+
passed_options = options.dup
|
271
|
+
highlight("<div>abc div</div>", "div", passed_options)
|
272
|
+
assert_equal options, passed_options
|
273
|
+
end
|
274
|
+
|
275
|
+
def test_highlight_with_block
|
276
|
+
assert_equal(
|
277
|
+
"<b>one</b> <b>two</b> <b>three</b>",
|
278
|
+
highlight("one two three", ["one", "two", "three"]) { |word| "<b>#{word}</b>" }
|
279
|
+
)
|
280
|
+
end
|
281
|
+
|
282
|
+
def test_excerpt
|
283
|
+
assert_equal("...is a beautiful morn...", excerpt("This is a beautiful morning", "beautiful", radius: 5))
|
284
|
+
assert_equal("This is a...", excerpt("This is a beautiful morning", "this", radius: 5))
|
285
|
+
assert_equal("...iful morning", excerpt("This is a beautiful morning", "morning", radius: 5))
|
286
|
+
assert_nil excerpt("This is a beautiful morning", "day")
|
287
|
+
end
|
288
|
+
|
289
|
+
def test_excerpt_with_regex
|
290
|
+
assert_equal("...is a beautiful! mor...", excerpt("This is a beautiful! morning", "beautiful", radius: 5))
|
291
|
+
assert_equal("...is a beautiful? mor...", excerpt("This is a beautiful? morning", "beautiful", radius: 5))
|
292
|
+
assert_equal("...is a beautiful? mor...", excerpt("This is a beautiful? morning", /\bbeau\w*\b/i, radius: 5))
|
293
|
+
assert_equal("...is a beautiful? mor...", excerpt("This is a beautiful? morning", /\b(beau\w*)\b/i, radius: 5))
|
294
|
+
assert_equal("...udge Allen and...", excerpt("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i, radius: 5))
|
295
|
+
assert_equal("...judge Allen and...", excerpt("This day was challenging for judge Allen and his colleagues.", /\ballen\b/i, radius: 1, separator: " "))
|
296
|
+
assert_equal("...was challenging for...", excerpt("This day was challenging for judge Allen and his colleagues.", /\b(\w*allen\w*)\b/i, radius: 5))
|
297
|
+
end
|
298
|
+
|
299
|
+
def test_excerpt_should_not_be_html_safe
|
300
|
+
assert_not_predicate excerpt("This is a beautiful! morning", "beautiful", radius: 5), :html_safe?
|
301
|
+
end
|
302
|
+
|
303
|
+
def test_excerpt_in_borderline_cases
|
304
|
+
assert_equal("", excerpt("", "", radius: 0))
|
305
|
+
assert_equal("a", excerpt("a", "a", radius: 0))
|
306
|
+
assert_equal("...b...", excerpt("abc", "b", radius: 0))
|
307
|
+
assert_equal("abc", excerpt("abc", "b", radius: 1))
|
308
|
+
assert_equal("abc...", excerpt("abcd", "b", radius: 1))
|
309
|
+
assert_equal("...abc", excerpt("zabc", "b", radius: 1))
|
310
|
+
assert_equal("...abc...", excerpt("zabcd", "b", radius: 1))
|
311
|
+
assert_equal("zabcd", excerpt("zabcd", "b", radius: 2))
|
312
|
+
|
313
|
+
# excerpt strips the resulting string before ap-/prepending excerpt_string.
|
314
|
+
# whether this behavior is meaningful when excerpt_string is not to be
|
315
|
+
# appended is questionable.
|
316
|
+
assert_equal("zabcd", excerpt(" zabcd ", "b", radius: 4))
|
317
|
+
assert_equal("...abc...", excerpt("z abc d", "b", radius: 1))
|
318
|
+
end
|
319
|
+
|
320
|
+
def test_excerpt_with_omission
|
321
|
+
assert_equal("[...]is a beautiful morn[...]", excerpt("This is a beautiful morning", "beautiful", omission: "[...]", radius: 5))
|
322
|
+
assert_equal(
|
323
|
+
"This is the ultimate supercalifragilisticexpialidoceous very looooooooooooooooooong looooooooooooong beautiful morning with amazing sunshine and awesome tempera[...]",
|
324
|
+
excerpt("This is the ultimate supercalifragilisticexpialidoceous very looooooooooooooooooong looooooooooooong beautiful morning with amazing sunshine and awesome temperatures. So what are you gonna do about it?", "very",
|
325
|
+
omission: "[...]")
|
326
|
+
)
|
327
|
+
end
|
328
|
+
|
329
|
+
def test_excerpt_with_utf8
|
330
|
+
assert_equal("...\357\254\203ciency could not be...".dup.force_encoding(Encoding::UTF_8), excerpt("That's why e\357\254\203ciency could not be helped".dup.force_encoding(Encoding::UTF_8), "could", radius: 8))
|
331
|
+
end
|
332
|
+
|
333
|
+
def test_excerpt_does_not_modify_the_options_hash
|
334
|
+
options = { omission: "[...]", radius: 5 }
|
335
|
+
passed_options = options.dup
|
336
|
+
excerpt("This is a beautiful morning", "beautiful", passed_options)
|
337
|
+
assert_equal options, passed_options
|
338
|
+
end
|
339
|
+
|
340
|
+
def test_excerpt_with_separator
|
341
|
+
options = { separator: " ", radius: 1 }
|
342
|
+
assert_equal("...a very beautiful...", excerpt("This is a very beautiful morning", "very", options))
|
343
|
+
assert_equal("This is...", excerpt("This is a very beautiful morning", "this", options))
|
344
|
+
assert_equal("...beautiful morning", excerpt("This is a very beautiful morning", "morning", options))
|
345
|
+
|
346
|
+
options = { separator: "\n", radius: 0 }
|
347
|
+
assert_equal("...very long...", excerpt("my very\nvery\nvery long\nstring", "long", options))
|
348
|
+
|
349
|
+
options = { separator: "\n", radius: 1 }
|
350
|
+
assert_equal("...very\nvery long\nstring", excerpt("my very\nvery\nvery long\nstring", "long", options))
|
351
|
+
|
352
|
+
assert_equal excerpt("This is a beautiful morning", "a"),
|
353
|
+
excerpt("This is a beautiful morning", "a", separator: nil)
|
354
|
+
end
|
355
|
+
|
356
|
+
def test_word_wrap
|
357
|
+
assert_equal("my very very\nvery long\nstring", word_wrap("my very very very long string", line_width: 15))
|
358
|
+
end
|
359
|
+
|
360
|
+
def test_word_wrap_with_extra_newlines
|
361
|
+
assert_equal("my very very\nvery long\nstring\n\nwith another\nline", word_wrap("my very very very long string\n\nwith another line", line_width: 15))
|
362
|
+
end
|
363
|
+
|
364
|
+
def test_word_wrap_does_not_modify_the_options_hash
|
365
|
+
options = { line_width: 15 }
|
366
|
+
passed_options = options.dup
|
367
|
+
word_wrap("some text", passed_options)
|
368
|
+
assert_equal options, passed_options
|
369
|
+
end
|
370
|
+
|
371
|
+
def test_word_wrap_with_custom_break_sequence
|
372
|
+
assert_equal("1234567890\r\n1234567890\r\n1234567890", word_wrap("1234567890 " * 3, line_width: 2, break_sequence: "\r\n"))
|
373
|
+
end
|
374
|
+
|
375
|
+
def test_pluralization
|
376
|
+
assert_equal("1 count", pluralize(1, "count"))
|
377
|
+
assert_equal("2 counts", pluralize(2, "count"))
|
378
|
+
assert_equal("1 count", pluralize("1", "count"))
|
379
|
+
assert_equal("2 counts", pluralize("2", "count"))
|
380
|
+
assert_equal("1,066 counts", pluralize("1,066", "count"))
|
381
|
+
assert_equal("1.25 counts", pluralize("1.25", "count"))
|
382
|
+
assert_equal("1.0 count", pluralize("1.0", "count"))
|
383
|
+
assert_equal("1.00 count", pluralize("1.00", "count"))
|
384
|
+
assert_equal("2 counters", pluralize(2, "count", "counters"))
|
385
|
+
assert_equal("0 counters", pluralize(nil, "count", "counters"))
|
386
|
+
assert_equal("2 counters", pluralize(2, "count", plural: "counters"))
|
387
|
+
assert_equal("0 counters", pluralize(nil, "count", plural: "counters"))
|
388
|
+
assert_equal("2 people", pluralize(2, "person"))
|
389
|
+
assert_equal("10 buffaloes", pluralize(10, "buffalo"))
|
390
|
+
assert_equal("1 berry", pluralize(1, "berry"))
|
391
|
+
assert_equal("12 berries", pluralize(12, "berry"))
|
392
|
+
end
|
393
|
+
|
394
|
+
def test_localized_pluralization
|
395
|
+
old_locale = I18n.locale
|
396
|
+
|
397
|
+
begin
|
398
|
+
I18n.locale = :de
|
399
|
+
|
400
|
+
ActiveSupport::Inflector.inflections(:de) do |inflect|
|
401
|
+
inflect.irregular "region", "regionen"
|
402
|
+
end
|
403
|
+
|
404
|
+
assert_equal("1 region", pluralize(1, "region"))
|
405
|
+
assert_equal("2 regionen", pluralize(2, "region"))
|
406
|
+
assert_equal("2 regions", pluralize(2, "region", locale: :en))
|
407
|
+
ensure
|
408
|
+
I18n.locale = old_locale
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
def test_cycle_class
|
413
|
+
value = Cycle.new("one", 2, "3")
|
414
|
+
assert_equal("one", value.to_s)
|
415
|
+
assert_equal("2", value.to_s)
|
416
|
+
assert_equal("3", value.to_s)
|
417
|
+
assert_equal("one", value.to_s)
|
418
|
+
value.reset
|
419
|
+
assert_equal("one", value.to_s)
|
420
|
+
assert_equal("2", value.to_s)
|
421
|
+
assert_equal("3", value.to_s)
|
422
|
+
end
|
423
|
+
|
424
|
+
def test_cycle_class_with_no_arguments
|
425
|
+
assert_raise(ArgumentError) { Cycle.new }
|
426
|
+
end
|
427
|
+
|
428
|
+
def test_cycle
|
429
|
+
assert_equal("one", cycle("one", 2, "3"))
|
430
|
+
assert_equal("2", cycle("one", 2, "3"))
|
431
|
+
assert_equal("3", cycle("one", 2, "3"))
|
432
|
+
assert_equal("one", cycle("one", 2, "3"))
|
433
|
+
assert_equal("2", cycle("one", 2, "3"))
|
434
|
+
assert_equal("3", cycle("one", 2, "3"))
|
435
|
+
end
|
436
|
+
|
437
|
+
def test_cycle_with_array
|
438
|
+
array = [1, 2, 3]
|
439
|
+
assert_equal("1", cycle(array))
|
440
|
+
assert_equal("2", cycle(array))
|
441
|
+
assert_equal("3", cycle(array))
|
442
|
+
end
|
443
|
+
|
444
|
+
def test_cycle_with_no_arguments
|
445
|
+
assert_raise(ArgumentError) { cycle }
|
446
|
+
end
|
447
|
+
|
448
|
+
def test_cycle_resets_with_new_values
|
449
|
+
assert_equal("even", cycle("even", "odd"))
|
450
|
+
assert_equal("odd", cycle("even", "odd"))
|
451
|
+
assert_equal("even", cycle("even", "odd"))
|
452
|
+
assert_equal("1", cycle(1, 2, 3))
|
453
|
+
assert_equal("2", cycle(1, 2, 3))
|
454
|
+
assert_equal("3", cycle(1, 2, 3))
|
455
|
+
assert_equal("1", cycle(1, 2, 3))
|
456
|
+
end
|
457
|
+
|
458
|
+
def test_named_cycles
|
459
|
+
assert_equal("1", cycle(1, 2, 3, name: "numbers"))
|
460
|
+
assert_equal("red", cycle("red", "blue", name: "colors"))
|
461
|
+
assert_equal("2", cycle(1, 2, 3, name: "numbers"))
|
462
|
+
assert_equal("blue", cycle("red", "blue", name: "colors"))
|
463
|
+
assert_equal("3", cycle(1, 2, 3, name: "numbers"))
|
464
|
+
assert_equal("red", cycle("red", "blue", name: "colors"))
|
465
|
+
end
|
466
|
+
|
467
|
+
def test_current_cycle_with_default_name
|
468
|
+
cycle("even", "odd")
|
469
|
+
assert_equal "even", current_cycle
|
470
|
+
cycle("even", "odd")
|
471
|
+
assert_equal "odd", current_cycle
|
472
|
+
cycle("even", "odd")
|
473
|
+
assert_equal "even", current_cycle
|
474
|
+
end
|
475
|
+
|
476
|
+
def test_current_cycle_with_named_cycles
|
477
|
+
cycle("red", "blue", name: "colors")
|
478
|
+
assert_equal "red", current_cycle("colors")
|
479
|
+
cycle("red", "blue", name: "colors")
|
480
|
+
assert_equal "blue", current_cycle("colors")
|
481
|
+
cycle("red", "blue", name: "colors")
|
482
|
+
assert_equal "red", current_cycle("colors")
|
483
|
+
end
|
484
|
+
|
485
|
+
def test_current_cycle_safe_call
|
486
|
+
assert_nothing_raised { current_cycle }
|
487
|
+
assert_nothing_raised { current_cycle("colors") }
|
488
|
+
end
|
489
|
+
|
490
|
+
def test_current_cycle_with_more_than_two_names
|
491
|
+
cycle(1, 2, 3)
|
492
|
+
assert_equal "1", current_cycle
|
493
|
+
cycle(1, 2, 3)
|
494
|
+
assert_equal "2", current_cycle
|
495
|
+
cycle(1, 2, 3)
|
496
|
+
assert_equal "3", current_cycle
|
497
|
+
cycle(1, 2, 3)
|
498
|
+
assert_equal "1", current_cycle
|
499
|
+
end
|
500
|
+
|
501
|
+
def test_default_named_cycle
|
502
|
+
assert_equal("1", cycle(1, 2, 3))
|
503
|
+
assert_equal("2", cycle(1, 2, 3, name: "default"))
|
504
|
+
assert_equal("3", cycle(1, 2, 3))
|
505
|
+
end
|
506
|
+
|
507
|
+
def test_reset_cycle
|
508
|
+
assert_equal("1", cycle(1, 2, 3))
|
509
|
+
assert_equal("2", cycle(1, 2, 3))
|
510
|
+
reset_cycle
|
511
|
+
assert_equal("1", cycle(1, 2, 3))
|
512
|
+
end
|
513
|
+
|
514
|
+
def test_reset_unknown_cycle
|
515
|
+
reset_cycle("colors")
|
516
|
+
end
|
517
|
+
|
518
|
+
def test_reset_named_cycle
|
519
|
+
assert_equal("1", cycle(1, 2, 3, name: "numbers"))
|
520
|
+
assert_equal("red", cycle("red", "blue", name: "colors"))
|
521
|
+
reset_cycle("numbers")
|
522
|
+
assert_equal("1", cycle(1, 2, 3, name: "numbers"))
|
523
|
+
assert_equal("blue", cycle("red", "blue", name: "colors"))
|
524
|
+
assert_equal("2", cycle(1, 2, 3, name: "numbers"))
|
525
|
+
assert_equal("red", cycle("red", "blue", name: "colors"))
|
526
|
+
end
|
527
|
+
|
528
|
+
def test_cycle_no_instance_variable_clashes
|
529
|
+
@cycles = %w{Specialized Fuji Giant}
|
530
|
+
assert_equal("red", cycle("red", "blue"))
|
531
|
+
assert_equal("blue", cycle("red", "blue"))
|
532
|
+
assert_equal("red", cycle("red", "blue"))
|
533
|
+
assert_equal(%w{Specialized Fuji Giant}, @cycles)
|
534
|
+
end
|
535
|
+
end
|