ruby-on-quails 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.codeclimate.yml +13 -0
- data/.gitattributes +2 -0
- data/.github/issue_template.md +15 -0
- data/.github/pull_request_template.md +21 -0
- data/.github/stale.yml +28 -0
- data/.gitignore +24 -0
- data/.rubocop.yml +137 -0
- data/.travis.yml +123 -0
- data/.yardopts +4 -0
- data/CODE_OF_CONDUCT.md +12 -0
- data/CONTRIBUTING.md +49 -0
- data/Gemfile +168 -0
- data/Gemfile.lock +547 -0
- data/MIT-LICENSE +20 -0
- data/RAILS_VERSION +1 -0
- data/README.md +97 -0
- data/RELEASING_RAILS.md +225 -0
- data/Rakefile +72 -0
- data/actioncable/.gitignore +2 -0
- data/actioncable/CHANGELOG.md +26 -0
- data/actioncable/MIT-LICENSE +20 -0
- data/actioncable/README.md +567 -0
- data/actioncable/Rakefile +76 -0
- data/actioncable/actioncable.gemspec +32 -0
- data/actioncable/app/assets/javascripts/action_cable.coffee.erb +38 -0
- data/actioncable/app/assets/javascripts/action_cable/connection.coffee +116 -0
- data/actioncable/app/assets/javascripts/action_cable/connection_monitor.coffee +95 -0
- data/actioncable/app/assets/javascripts/action_cable/consumer.coffee +46 -0
- data/actioncable/app/assets/javascripts/action_cable/subscription.coffee +72 -0
- data/actioncable/app/assets/javascripts/action_cable/subscriptions.coffee +66 -0
- data/actioncable/bin/test +5 -0
- data/actioncable/blade.yml +34 -0
- data/actioncable/lib/action_cable.rb +54 -0
- data/actioncable/lib/action_cable/channel.rb +16 -0
- data/actioncable/lib/action_cable/channel/base.rb +305 -0
- data/actioncable/lib/action_cable/channel/broadcasting.rb +31 -0
- data/actioncable/lib/action_cable/channel/callbacks.rb +37 -0
- data/actioncable/lib/action_cable/channel/naming.rb +25 -0
- data/actioncable/lib/action_cable/channel/periodic_timers.rb +78 -0
- data/actioncable/lib/action_cable/channel/streams.rb +176 -0
- data/actioncable/lib/action_cable/connection.rb +21 -0
- data/actioncable/lib/action_cable/connection/authorization.rb +15 -0
- data/actioncable/lib/action_cable/connection/base.rb +260 -0
- data/actioncable/lib/action_cable/connection/client_socket.rb +157 -0
- data/actioncable/lib/action_cable/connection/identification.rb +47 -0
- data/actioncable/lib/action_cable/connection/internal_channel.rb +45 -0
- data/actioncable/lib/action_cable/connection/message_buffer.rb +57 -0
- data/actioncable/lib/action_cable/connection/stream.rb +115 -0
- data/actioncable/lib/action_cable/connection/stream_event_loop.rb +136 -0
- data/actioncable/lib/action_cable/connection/subscriptions.rb +83 -0
- data/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb +42 -0
- data/actioncable/lib/action_cable/connection/web_socket.rb +43 -0
- data/actioncable/lib/action_cable/engine.rb +79 -0
- data/actioncable/lib/action_cable/gem_version.rb +17 -0
- data/actioncable/lib/action_cable/helpers/action_cable_helper.rb +42 -0
- data/actioncable/lib/action_cable/remote_connections.rb +69 -0
- data/actioncable/lib/action_cable/server.rb +17 -0
- data/actioncable/lib/action_cable/server/base.rb +89 -0
- data/actioncable/lib/action_cable/server/broadcasting.rb +54 -0
- data/actioncable/lib/action_cable/server/configuration.rb +43 -0
- data/actioncable/lib/action_cable/server/connections.rb +36 -0
- data/actioncable/lib/action_cable/server/worker.rb +77 -0
- data/actioncable/lib/action_cable/server/worker/active_record_connection_management.rb +21 -0
- data/actioncable/lib/action_cable/subscription_adapter.rb +11 -0
- data/actioncable/lib/action_cable/subscription_adapter/async.rb +29 -0
- data/actioncable/lib/action_cable/subscription_adapter/base.rb +30 -0
- data/actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb +28 -0
- data/actioncable/lib/action_cable/subscription_adapter/evented_redis.rb +89 -0
- data/actioncable/lib/action_cable/subscription_adapter/inline.rb +37 -0
- data/actioncable/lib/action_cable/subscription_adapter/postgresql.rb +114 -0
- data/actioncable/lib/action_cable/subscription_adapter/redis.rb +178 -0
- data/actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb +59 -0
- data/actioncable/lib/action_cable/version.rb +10 -0
- data/actioncable/lib/rails/generators/channel/USAGE +14 -0
- data/actioncable/lib/rails/generators/channel/channel_generator.rb +49 -0
- data/actioncable/lib/rails/generators/channel/templates/application_cable/channel.rb +4 -0
- data/actioncable/lib/rails/generators/channel/templates/application_cable/connection.rb +4 -0
- data/actioncable/lib/rails/generators/channel/templates/assets/cable.js +13 -0
- data/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee +14 -0
- data/actioncable/lib/rails/generators/channel/templates/assets/channel.js +18 -0
- data/actioncable/lib/rails/generators/channel/templates/channel.rb +16 -0
- data/actioncable/package.json +24 -0
- data/actioncable/test/channel/base_test.rb +272 -0
- data/actioncable/test/channel/broadcasting_test.rb +31 -0
- data/actioncable/test/channel/naming_test.rb +12 -0
- data/actioncable/test/channel/periodic_timers_test.rb +74 -0
- data/actioncable/test/channel/rejection_test.rb +43 -0
- data/actioncable/test/channel/stream_test.rb +208 -0
- data/actioncable/test/client_test.rb +313 -0
- data/actioncable/test/connection/authorization_test.rb +33 -0
- data/actioncable/test/connection/base_test.rb +141 -0
- data/actioncable/test/connection/client_socket_test.rb +84 -0
- data/actioncable/test/connection/cross_site_forgery_test.rb +92 -0
- data/actioncable/test/connection/identifier_test.rb +77 -0
- data/actioncable/test/connection/multiple_identifiers_test.rb +39 -0
- data/actioncable/test/connection/stream_test.rb +66 -0
- data/actioncable/test/connection/string_identifier_test.rb +41 -0
- data/actioncable/test/connection/subscriptions_test.rb +116 -0
- data/actioncable/test/javascript/src/test.coffee +3 -0
- data/actioncable/test/javascript/src/test_helpers/consumer_test_helper.coffee +47 -0
- data/actioncable/test/javascript/src/test_helpers/index.coffee +11 -0
- data/actioncable/test/javascript/src/unit/action_cable_test.coffee +41 -0
- data/actioncable/test/javascript/src/unit/consumer_test.coffee +14 -0
- data/actioncable/test/javascript/src/unit/subscription_test.coffee +40 -0
- data/actioncable/test/javascript/src/unit/subscriptions_test.coffee +25 -0
- data/actioncable/test/javascript/vendor/mock-socket.js +4533 -0
- data/actioncable/test/server/base_test.rb +35 -0
- data/actioncable/test/server/broadcasting_test.rb +62 -0
- data/actioncable/test/stubs/global_id.rb +10 -0
- data/actioncable/test/stubs/room.rb +18 -0
- data/actioncable/test/stubs/test_adapter.rb +12 -0
- data/actioncable/test/stubs/test_connection.rb +35 -0
- data/actioncable/test/stubs/test_server.rb +32 -0
- data/actioncable/test/stubs/user.rb +17 -0
- data/actioncable/test/subscription_adapter/async_test.rb +19 -0
- data/actioncable/test/subscription_adapter/base_test.rb +65 -0
- data/actioncable/test/subscription_adapter/channel_prefix.rb +38 -0
- data/actioncable/test/subscription_adapter/common.rb +131 -0
- data/actioncable/test/subscription_adapter/evented_redis_test.rb +61 -0
- data/actioncable/test/subscription_adapter/inline_test.rb +19 -0
- data/actioncable/test/subscription_adapter/postgresql_test.rb +42 -0
- data/actioncable/test/subscription_adapter/redis_test.rb +28 -0
- data/actioncable/test/subscription_adapter/subscriber_map_test.rb +19 -0
- data/actioncable/test/test_helper.rb +37 -0
- data/actioncable/test/worker_test.rb +46 -0
- data/actionmailer/CHANGELOG.md +12 -0
- data/actionmailer/MIT-LICENSE +21 -0
- data/actionmailer/README.rdoc +175 -0
- data/actionmailer/Rakefile +25 -0
- data/actionmailer/actionmailer.gemspec +35 -0
- data/actionmailer/bin/test +5 -0
- data/actionmailer/lib/action_mailer.rb +62 -0
- data/actionmailer/lib/action_mailer/base.rb +981 -0
- data/actionmailer/lib/action_mailer/collector.rb +32 -0
- data/actionmailer/lib/action_mailer/delivery_job.rb +36 -0
- data/actionmailer/lib/action_mailer/delivery_methods.rb +82 -0
- data/actionmailer/lib/action_mailer/gem_version.rb +17 -0
- data/actionmailer/lib/action_mailer/inline_preview_interceptor.rb +59 -0
- data/actionmailer/lib/action_mailer/log_subscriber.rb +41 -0
- data/actionmailer/lib/action_mailer/mail_helper.rb +72 -0
- data/actionmailer/lib/action_mailer/message_delivery.rb +144 -0
- data/actionmailer/lib/action_mailer/parameterized.rb +154 -0
- data/actionmailer/lib/action_mailer/preview.rb +126 -0
- data/actionmailer/lib/action_mailer/railtie.rb +82 -0
- data/actionmailer/lib/action_mailer/rescuable.rb +29 -0
- data/actionmailer/lib/action_mailer/test_case.rb +123 -0
- data/actionmailer/lib/action_mailer/test_helper.rb +115 -0
- data/actionmailer/lib/action_mailer/version.rb +11 -0
- data/actionmailer/lib/rails/generators/mailer/USAGE +17 -0
- data/actionmailer/lib/rails/generators/mailer/mailer_generator.rb +38 -0
- data/actionmailer/lib/rails/generators/mailer/templates/application_mailer.rb +6 -0
- data/actionmailer/lib/rails/generators/mailer/templates/mailer.rb +17 -0
- data/actionmailer/test/abstract_unit.rb +47 -0
- data/actionmailer/test/assert_select_email_test.rb +49 -0
- data/actionmailer/test/asset_host_test.rb +39 -0
- data/actionmailer/test/base_test.rb +987 -0
- data/actionmailer/test/caching_test.rb +271 -0
- data/actionmailer/test/delivery_methods_test.rb +248 -0
- data/actionmailer/test/fixtures/anonymous/welcome.erb +1 -0
- data/actionmailer/test/fixtures/another.path/base_mailer/welcome.erb +1 -0
- data/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
- data/actionmailer/test/fixtures/asset_mailer/welcome.html.erb +1 -0
- data/actionmailer/test/fixtures/attachments/foo.jpg +0 -0
- data/actionmailer/test/fixtures/attachments/test.jpg +0 -0
- data/actionmailer/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
- data/actionmailer/test/fixtures/auto_layout_mailer/multipart.html.erb +1 -0
- data/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/attachment_with_content.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/attachment_with_hash.html.erb +0 -0
- data/actionmailer/test/fixtures/base_mailer/attachment_with_hash_default_encoding.html.erb +0 -0
- data/actionmailer/test/fixtures/base_mailer/different_layout.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/different_layout.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/email_with_translations.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/explicit_multipart_with_one_template.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/html_only.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_multipart.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_multipart.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de-AT.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.de.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.en.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.html.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.pl.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/implicit_with_locale.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/inline_attachment.html.erb +5 -0
- data/actionmailer/test/fixtures/base_mailer/inline_attachment.text.erb +4 -0
- data/actionmailer/test/fixtures/base_mailer/plain_text_only.text.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/welcome.erb +1 -0
- data/actionmailer/test/fixtures/base_mailer/welcome_with_headers.html.erb +0 -0
- data/actionmailer/test/fixtures/base_mailer/without_mail_call.erb +1 -0
- data/actionmailer/test/fixtures/base_test/after_action_mailer/welcome.html.erb +0 -0
- data/actionmailer/test/fixtures/base_test/before_action_mailer/welcome.html.erb +0 -0
- data/actionmailer/test/fixtures/base_test/default_inline_attachment_mailer/welcome.html.erb +0 -0
- data/actionmailer/test/fixtures/base_test/late_inline_attachment_mailer/on_render.erb +7 -0
- data/actionmailer/test/fixtures/caching_mailer/_partial.html.erb +3 -0
- data/actionmailer/test/fixtures/caching_mailer/fragment_cache.html.erb +3 -0
- data/actionmailer/test/fixtures/caching_mailer/fragment_cache_in_partials.html.erb +1 -0
- data/actionmailer/test/fixtures/caching_mailer/fragment_caching_options.html.erb +3 -0
- data/actionmailer/test/fixtures/caching_mailer/multipart_cache.html.erb +3 -0
- data/actionmailer/test/fixtures/caching_mailer/multipart_cache.text.erb +3 -0
- data/actionmailer/test/fixtures/caching_mailer/skip_fragment_cache_digesting.html.erb +3 -0
- data/actionmailer/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
- data/actionmailer/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
- data/actionmailer/test/fixtures/i18n_test_mailer/mail_with_i18n_subject.erb +4 -0
- data/actionmailer/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
- data/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
- data/actionmailer/test/fixtures/layouts/different_layout.html.erb +1 -0
- data/actionmailer/test/fixtures/layouts/different_layout.text.erb +1 -0
- data/actionmailer/test/fixtures/layouts/spam.html.erb +1 -0
- data/actionmailer/test/fixtures/mail_delivery_test/delivery_mailer/welcome.html.erb +0 -0
- data/actionmailer/test/fixtures/nested_layout_mailer/signup.html.erb +1 -0
- data/actionmailer/test/fixtures/proc_mailer/welcome.html.erb +0 -0
- data/actionmailer/test/fixtures/raw_email +14 -0
- data/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
- data/actionmailer/test/fixtures/test_helper_mailer/welcome +1 -0
- data/actionmailer/test/fixtures/url_test_mailer/exercise_url_for.erb +1 -0
- data/actionmailer/test/fixtures/url_test_mailer/signed_up_with_url.erb +5 -0
- data/actionmailer/test/i18n_with_controller_test.rb +77 -0
- data/actionmailer/test/log_subscriber_test.rb +49 -0
- data/actionmailer/test/mail_helper_test.rb +125 -0
- data/actionmailer/test/mail_layout_test.rb +97 -0
- data/actionmailer/test/mailers/asset_mailer.rb +9 -0
- data/actionmailer/test/mailers/base_mailer.rb +138 -0
- data/actionmailer/test/mailers/caching_mailer.rb +25 -0
- data/actionmailer/test/mailers/delayed_mailer.rb +28 -0
- data/actionmailer/test/mailers/params_mailer.rb +13 -0
- data/actionmailer/test/mailers/proc_mailer.rb +18 -0
- data/actionmailer/test/message_delivery_test.rb +167 -0
- data/actionmailer/test/parameterized_test.rb +56 -0
- data/actionmailer/test/test_case_test.rb +68 -0
- data/actionmailer/test/test_helper_test.rb +223 -0
- data/actionmailer/test/url_test.rb +144 -0
- data/actionpack/CHANGELOG.md +75 -0
- data/actionpack/MIT-LICENSE +21 -0
- data/actionpack/README.rdoc +57 -0
- data/actionpack/Rakefile +40 -0
- data/actionpack/actionpack.gemspec +38 -0
- data/actionpack/bin/test +5 -0
- data/actionpack/lib/abstract_controller.rb +26 -0
- data/actionpack/lib/abstract_controller/asset_paths.rb +12 -0
- data/actionpack/lib/abstract_controller/base.rb +267 -0
- data/actionpack/lib/abstract_controller/caching.rb +66 -0
- data/actionpack/lib/abstract_controller/caching/fragments.rb +166 -0
- data/actionpack/lib/abstract_controller/callbacks.rb +212 -0
- data/actionpack/lib/abstract_controller/collector.rb +43 -0
- data/actionpack/lib/abstract_controller/error.rb +6 -0
- data/actionpack/lib/abstract_controller/helpers.rb +194 -0
- data/actionpack/lib/abstract_controller/logger.rb +14 -0
- data/actionpack/lib/abstract_controller/railties/routes_helpers.rb +20 -0
- data/actionpack/lib/abstract_controller/rendering.rb +136 -0
- data/actionpack/lib/abstract_controller/translation.rb +31 -0
- data/actionpack/lib/abstract_controller/url_for.rb +35 -0
- data/actionpack/lib/action_controller.rb +65 -0
- data/actionpack/lib/action_controller/api.rb +149 -0
- data/actionpack/lib/action_controller/api/api_rendering.rb +16 -0
- data/actionpack/lib/action_controller/base.rb +275 -0
- data/actionpack/lib/action_controller/caching.rb +46 -0
- data/actionpack/lib/action_controller/form_builder.rb +50 -0
- data/actionpack/lib/action_controller/log_subscriber.rb +78 -0
- data/actionpack/lib/action_controller/metal.rb +258 -0
- data/actionpack/lib/action_controller/metal/basic_implicit_render.rb +13 -0
- data/actionpack/lib/action_controller/metal/conditional_get.rb +274 -0
- data/actionpack/lib/action_controller/metal/cookies.rb +16 -0
- data/actionpack/lib/action_controller/metal/data_streaming.rb +152 -0
- data/actionpack/lib/action_controller/metal/etag_with_flash.rb +18 -0
- data/actionpack/lib/action_controller/metal/etag_with_template_digest.rb +57 -0
- data/actionpack/lib/action_controller/metal/exceptions.rb +56 -0
- data/actionpack/lib/action_controller/metal/flash.rb +61 -0
- data/actionpack/lib/action_controller/metal/force_ssl.rb +99 -0
- data/actionpack/lib/action_controller/metal/head.rb +60 -0
- data/actionpack/lib/action_controller/metal/helpers.rb +123 -0
- data/actionpack/lib/action_controller/metal/http_authentication.rb +522 -0
- data/actionpack/lib/action_controller/metal/implicit_render.rb +73 -0
- data/actionpack/lib/action_controller/metal/instrumentation.rb +111 -0
- data/actionpack/lib/action_controller/metal/live.rb +312 -0
- data/actionpack/lib/action_controller/metal/mime_responds.rb +313 -0
- data/actionpack/lib/action_controller/metal/parameter_encoding.rb +51 -0
- data/actionpack/lib/action_controller/metal/params_wrapper.rb +285 -0
- data/actionpack/lib/action_controller/metal/redirecting.rb +124 -0
- data/actionpack/lib/action_controller/metal/renderers.rb +181 -0
- data/actionpack/lib/action_controller/metal/rendering.rb +124 -0
- data/actionpack/lib/action_controller/metal/request_forgery_protection.rb +433 -0
- data/actionpack/lib/action_controller/metal/rescue.rb +28 -0
- data/actionpack/lib/action_controller/metal/streaming.rb +223 -0
- data/actionpack/lib/action_controller/metal/strong_parameters.rb +1085 -0
- data/actionpack/lib/action_controller/metal/testing.rb +22 -0
- data/actionpack/lib/action_controller/metal/url_for.rb +58 -0
- data/actionpack/lib/action_controller/railtie.rb +89 -0
- data/actionpack/lib/action_controller/railties/helpers.rb +24 -0
- data/actionpack/lib/action_controller/renderer.rb +117 -0
- data/actionpack/lib/action_controller/template_assertions.rb +11 -0
- data/actionpack/lib/action_controller/test_case.rb +626 -0
- data/actionpack/lib/action_dispatch.rb +111 -0
- data/actionpack/lib/action_dispatch/http/cache.rb +216 -0
- data/actionpack/lib/action_dispatch/http/filter_parameters.rb +84 -0
- data/actionpack/lib/action_dispatch/http/filter_redirect.rb +37 -0
- data/actionpack/lib/action_dispatch/http/headers.rb +132 -0
- data/actionpack/lib/action_dispatch/http/mime_negotiation.rb +173 -0
- data/actionpack/lib/action_dispatch/http/mime_type.rb +342 -0
- data/actionpack/lib/action_dispatch/http/mime_types.rb +37 -0
- data/actionpack/lib/action_dispatch/http/parameter_filter.rb +86 -0
- data/actionpack/lib/action_dispatch/http/parameters.rb +131 -0
- data/actionpack/lib/action_dispatch/http/rack_cache.rb +63 -0
- data/actionpack/lib/action_dispatch/http/request.rb +412 -0
- data/actionpack/lib/action_dispatch/http/response.rb +519 -0
- data/actionpack/lib/action_dispatch/http/upload.rb +84 -0
- data/actionpack/lib/action_dispatch/http/url.rb +350 -0
- data/actionpack/lib/action_dispatch/journey.rb +7 -0
- data/actionpack/lib/action_dispatch/journey/formatter.rb +189 -0
- data/actionpack/lib/action_dispatch/journey/gtg/builder.rb +164 -0
- data/actionpack/lib/action_dispatch/journey/gtg/simulator.rb +41 -0
- data/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb +158 -0
- data/actionpack/lib/action_dispatch/journey/nfa/builder.rb +78 -0
- data/actionpack/lib/action_dispatch/journey/nfa/dot.rb +36 -0
- data/actionpack/lib/action_dispatch/journey/nfa/simulator.rb +49 -0
- data/actionpack/lib/action_dispatch/journey/nfa/transition_table.rb +120 -0
- data/actionpack/lib/action_dispatch/journey/nodes/node.rb +140 -0
- data/actionpack/lib/action_dispatch/journey/parser.rb +199 -0
- data/actionpack/lib/action_dispatch/journey/parser.y +50 -0
- data/actionpack/lib/action_dispatch/journey/parser_extras.rb +31 -0
- data/actionpack/lib/action_dispatch/journey/path/pattern.rb +198 -0
- data/actionpack/lib/action_dispatch/journey/route.rb +203 -0
- data/actionpack/lib/action_dispatch/journey/router.rb +156 -0
- data/actionpack/lib/action_dispatch/journey/router/utils.rb +102 -0
- data/actionpack/lib/action_dispatch/journey/routes.rb +81 -0
- data/actionpack/lib/action_dispatch/journey/scanner.rb +64 -0
- data/actionpack/lib/action_dispatch/journey/visitors.rb +268 -0
- data/actionpack/lib/action_dispatch/journey/visualizer/fsm.css +30 -0
- data/actionpack/lib/action_dispatch/journey/visualizer/fsm.js +134 -0
- data/actionpack/lib/action_dispatch/journey/visualizer/index.html.erb +52 -0
- data/actionpack/lib/action_dispatch/middleware/callbacks.rb +36 -0
- data/actionpack/lib/action_dispatch/middleware/cookies.rb +686 -0
- data/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +205 -0
- data/actionpack/lib/action_dispatch/middleware/debug_locks.rb +124 -0
- data/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +146 -0
- data/actionpack/lib/action_dispatch/middleware/executor.rb +21 -0
- data/actionpack/lib/action_dispatch/middleware/flash.rb +300 -0
- data/actionpack/lib/action_dispatch/middleware/public_exceptions.rb +57 -0
- data/actionpack/lib/action_dispatch/middleware/reloader.rb +12 -0
- data/actionpack/lib/action_dispatch/middleware/remote_ip.rb +183 -0
- data/actionpack/lib/action_dispatch/middleware/request_id.rb +43 -0
- data/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +92 -0
- data/actionpack/lib/action_dispatch/middleware/session/cache_store.rb +54 -0
- data/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +131 -0
- data/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb +28 -0
- data/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +62 -0
- data/actionpack/lib/action_dispatch/middleware/ssl.rb +144 -0
- data/actionpack/lib/action_dispatch/middleware/stack.rb +116 -0
- data/actionpack/lib/action_dispatch/middleware/static.rb +130 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb +22 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb +23 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +27 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.text.erb +8 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +52 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb +9 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +16 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb +9 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb +160 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +11 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.text.erb +3 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +32 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.text.erb +11 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +20 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb +7 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +6 -0
- data/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.text.erb +3 -0
- data/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb +16 -0
- data/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +200 -0
- data/actionpack/lib/action_dispatch/railtie.rb +50 -0
- data/actionpack/lib/action_dispatch/request/session.rb +233 -0
- data/actionpack/lib/action_dispatch/request/utils.rb +76 -0
- data/actionpack/lib/action_dispatch/routing.rb +260 -0
- data/actionpack/lib/action_dispatch/routing/endpoint.rb +12 -0
- data/actionpack/lib/action_dispatch/routing/inspector.rb +225 -0
- data/actionpack/lib/action_dispatch/routing/mapper.rb +2256 -0
- data/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +352 -0
- data/actionpack/lib/action_dispatch/routing/redirection.rb +201 -0
- data/actionpack/lib/action_dispatch/routing/route_set.rb +870 -0
- data/actionpack/lib/action_dispatch/routing/routes_proxy.rb +69 -0
- data/actionpack/lib/action_dispatch/routing/url_for.rb +218 -0
- data/actionpack/lib/action_dispatch/system_test_case.rb +133 -0
- data/actionpack/lib/action_dispatch/system_testing/driver.rb +55 -0
- data/actionpack/lib/action_dispatch/system_testing/server.rb +45 -0
- data/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb +100 -0
- data/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +27 -0
- data/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +26 -0
- data/actionpack/lib/action_dispatch/testing/assertion_response.rb +47 -0
- data/actionpack/lib/action_dispatch/testing/assertions.rb +24 -0
- data/actionpack/lib/action_dispatch/testing/assertions/response.rb +107 -0
- data/actionpack/lib/action_dispatch/testing/assertions/routing.rb +222 -0
- data/actionpack/lib/action_dispatch/testing/integration.rb +652 -0
- data/actionpack/lib/action_dispatch/testing/request_encoder.rb +55 -0
- data/actionpack/lib/action_dispatch/testing/test_process.rb +50 -0
- data/actionpack/lib/action_dispatch/testing/test_request.rb +71 -0
- data/actionpack/lib/action_dispatch/testing/test_response.rb +53 -0
- data/actionpack/lib/action_pack.rb +26 -0
- data/actionpack/lib/action_pack/gem_version.rb +17 -0
- data/actionpack/lib/action_pack/version.rb +10 -0
- data/actionpack/test/abstract/callbacks_test.rb +270 -0
- data/actionpack/test/abstract/collector_test.rb +65 -0
- data/actionpack/test/abstract/translation_test.rb +79 -0
- data/actionpack/test/abstract_unit.rb +451 -0
- data/actionpack/test/assertions/response_assertions_test.rb +141 -0
- data/actionpack/test/controller/action_pack_assertions_test.rb +493 -0
- data/actionpack/test/controller/api/conditional_get_test.rb +59 -0
- data/actionpack/test/controller/api/data_streaming_test.rb +28 -0
- data/actionpack/test/controller/api/force_ssl_test.rb +22 -0
- data/actionpack/test/controller/api/implicit_render_test.rb +17 -0
- data/actionpack/test/controller/api/params_wrapper_test.rb +28 -0
- data/actionpack/test/controller/api/redirect_to_test.rb +21 -0
- data/actionpack/test/controller/api/renderers_test.rb +50 -0
- data/actionpack/test/controller/api/url_for_test.rb +22 -0
- data/actionpack/test/controller/api/with_cookies_test.rb +23 -0
- data/actionpack/test/controller/api/with_helpers_test.rb +44 -0
- data/actionpack/test/controller/base_test.rb +323 -0
- data/actionpack/test/controller/caching_test.rb +503 -0
- data/actionpack/test/controller/content_type_test.rb +169 -0
- data/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
- data/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
- data/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
- data/actionpack/test/controller/default_url_options_with_before_action_test.rb +28 -0
- data/actionpack/test/controller/filters_test.rb +1050 -0
- data/actionpack/test/controller/flash_hash_test.rb +216 -0
- data/actionpack/test/controller/flash_test.rb +371 -0
- data/actionpack/test/controller/force_ssl_test.rb +333 -0
- data/actionpack/test/controller/form_builder_test.rb +19 -0
- data/actionpack/test/controller/helper_test.rb +295 -0
- data/actionpack/test/controller/http_basic_authentication_test.rb +179 -0
- data/actionpack/test/controller/http_digest_authentication_test.rb +282 -0
- data/actionpack/test/controller/http_token_authentication_test.rb +216 -0
- data/actionpack/test/controller/integration_test.rb +1122 -0
- data/actionpack/test/controller/live_stream_test.rb +518 -0
- data/actionpack/test/controller/localized_templates_test.rb +48 -0
- data/actionpack/test/controller/log_subscriber_test.rb +371 -0
- data/actionpack/test/controller/metal/renderers_test.rb +50 -0
- data/actionpack/test/controller/metal_test.rb +32 -0
- data/actionpack/test/controller/mime/accept_format_test.rb +94 -0
- data/actionpack/test/controller/mime/respond_to_test.rb +843 -0
- data/actionpack/test/controller/new_base/bare_metal_test.rb +184 -0
- data/actionpack/test/controller/new_base/base_test.rb +134 -0
- data/actionpack/test/controller/new_base/content_negotiation_test.rb +28 -0
- data/actionpack/test/controller/new_base/content_type_test.rb +116 -0
- data/actionpack/test/controller/new_base/middleware_test.rb +112 -0
- data/actionpack/test/controller/new_base/render_action_test.rb +314 -0
- data/actionpack/test/controller/new_base/render_body_test.rb +172 -0
- data/actionpack/test/controller/new_base/render_context_test.rb +54 -0
- data/actionpack/test/controller/new_base/render_file_test.rb +72 -0
- data/actionpack/test/controller/new_base/render_html_test.rb +192 -0
- data/actionpack/test/controller/new_base/render_implicit_action_test.rb +59 -0
- data/actionpack/test/controller/new_base/render_layout_test.rb +128 -0
- data/actionpack/test/controller/new_base/render_partial_test.rb +62 -0
- data/actionpack/test/controller/new_base/render_plain_test.rb +170 -0
- data/actionpack/test/controller/new_base/render_streaming_test.rb +116 -0
- data/actionpack/test/controller/new_base/render_template_test.rb +240 -0
- data/actionpack/test/controller/new_base/render_test.rb +142 -0
- data/actionpack/test/controller/new_base/render_xml_test.rb +12 -0
- data/actionpack/test/controller/output_escaping_test.rb +17 -0
- data/actionpack/test/controller/parameter_encoding_test.rb +52 -0
- data/actionpack/test/controller/parameters/accessors_test.rb +279 -0
- data/actionpack/test/controller/parameters/always_permitted_parameters_test.rb +30 -0
- data/actionpack/test/controller/parameters/dup_test.rb +67 -0
- data/actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb +70 -0
- data/actionpack/test/controller/parameters/multi_parameter_attributes_test.rb +39 -0
- data/actionpack/test/controller/parameters/mutators_test.rb +122 -0
- data/actionpack/test/controller/parameters/nested_parameters_permit_test.rb +184 -0
- data/actionpack/test/controller/parameters/parameters_permit_test.rb +513 -0
- data/actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb +33 -0
- data/actionpack/test/controller/parameters/serialization_test.rb +55 -0
- data/actionpack/test/controller/params_wrapper_test.rb +408 -0
- data/actionpack/test/controller/permitted_params_test.rb +27 -0
- data/actionpack/test/controller/redirect_test.rb +358 -0
- data/actionpack/test/controller/render_js_test.rb +36 -0
- data/actionpack/test/controller/render_json_test.rb +137 -0
- data/actionpack/test/controller/render_test.rb +810 -0
- data/actionpack/test/controller/render_xml_test.rb +102 -0
- data/actionpack/test/controller/renderer_test.rb +136 -0
- data/actionpack/test/controller/renderers_test.rb +91 -0
- data/actionpack/test/controller/request/test_request_test.rb +42 -0
- data/actionpack/test/controller/request_forgery_protection_test.rb +998 -0
- data/actionpack/test/controller/required_params_test.rb +100 -0
- data/actionpack/test/controller/rescue_test.rb +364 -0
- data/actionpack/test/controller/resources_test.rb +1369 -0
- data/actionpack/test/controller/routing_test.rb +2108 -0
- data/actionpack/test/controller/runner_test.rb +24 -0
- data/actionpack/test/controller/send_file_test.rb +259 -0
- data/actionpack/test/controller/show_exceptions_test.rb +114 -0
- data/actionpack/test/controller/streaming_test.rb +28 -0
- data/actionpack/test/controller/test_case_test.rb +1120 -0
- data/actionpack/test/controller/url_for_integration_test.rb +193 -0
- data/actionpack/test/controller/url_for_test.rb +519 -0
- data/actionpack/test/controller/url_rewriter_test.rb +92 -0
- data/actionpack/test/controller/webservice_test.rb +135 -0
- data/actionpack/test/dispatch/callbacks_test.rb +47 -0
- data/actionpack/test/dispatch/cookies_test.rb +1288 -0
- data/actionpack/test/dispatch/debug_exceptions_test.rb +502 -0
- data/actionpack/test/dispatch/debug_locks_test.rb +38 -0
- data/actionpack/test/dispatch/exception_wrapper_test.rb +120 -0
- data/actionpack/test/dispatch/executor_test.rb +136 -0
- data/actionpack/test/dispatch/header_test.rb +169 -0
- data/actionpack/test/dispatch/live_response_test.rb +98 -0
- data/actionpack/test/dispatch/mapper_test.rb +210 -0
- data/actionpack/test/dispatch/middleware_stack_test.rb +115 -0
- data/actionpack/test/dispatch/mime_type_test.rb +187 -0
- data/actionpack/test/dispatch/mount_test.rb +95 -0
- data/actionpack/test/dispatch/prefix_generation_test.rb +463 -0
- data/actionpack/test/dispatch/rack_cache_test.rb +23 -0
- data/actionpack/test/dispatch/reloader_test.rb +167 -0
- data/actionpack/test/dispatch/request/json_params_parsing_test.rb +207 -0
- data/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +202 -0
- data/actionpack/test/dispatch/request/query_string_parsing_test.rb +176 -0
- data/actionpack/test/dispatch/request/session_test.rb +164 -0
- data/actionpack/test/dispatch/request/url_encoded_params_parsing_test.rb +181 -0
- data/actionpack/test/dispatch/request_id_test.rb +70 -0
- data/actionpack/test/dispatch/request_test.rb +1306 -0
- data/actionpack/test/dispatch/response_test.rb +536 -0
- data/actionpack/test/dispatch/routing/concerns_test.rb +124 -0
- data/actionpack/test/dispatch/routing/custom_url_helpers_test.rb +333 -0
- data/actionpack/test/dispatch/routing/inspector_test.rb +425 -0
- data/actionpack/test/dispatch/routing/ipv6_redirect_test.rb +46 -0
- data/actionpack/test/dispatch/routing/route_set_test.rb +166 -0
- data/actionpack/test/dispatch/routing_assertions_test.rb +132 -0
- data/actionpack/test/dispatch/routing_test.rb +5055 -0
- data/actionpack/test/dispatch/runner_test.rb +19 -0
- data/actionpack/test/dispatch/session/abstract_store_test.rb +58 -0
- data/actionpack/test/dispatch/session/cache_store_test.rb +183 -0
- data/actionpack/test/dispatch/session/cookie_store_test.rb +370 -0
- data/actionpack/test/dispatch/session/mem_cache_store_test.rb +205 -0
- data/actionpack/test/dispatch/session/test_session_test.rb +65 -0
- data/actionpack/test/dispatch/show_exceptions_test.rb +138 -0
- data/actionpack/test/dispatch/ssl_test.rb +220 -0
- data/actionpack/test/dispatch/static_test.rb +309 -0
- data/actionpack/test/dispatch/system_testing/driver_test.rb +37 -0
- data/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +74 -0
- data/actionpack/test/dispatch/system_testing/server_test.rb +19 -0
- data/actionpack/test/dispatch/system_testing/system_test_case_test.rb +67 -0
- data/actionpack/test/dispatch/test_request_test.rb +131 -0
- data/actionpack/test/dispatch/test_response_test.rb +37 -0
- data/actionpack/test/dispatch/uploaded_file_test.rb +113 -0
- data/actionpack/test/dispatch/url_generation_test.rb +141 -0
- data/actionpack/test/fixtures/_top_level_partial_only.erb +1 -0
- data/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +5 -0
- data/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +1 -0
- data/actionpack/test/fixtures/collection_cache/index.html.erb +1 -0
- data/actionpack/test/fixtures/company.rb +11 -0
- data/actionpack/test/fixtures/customers/_commented_customer.html.erb +5 -0
- data/actionpack/test/fixtures/customers/_customer.html.erb +4 -0
- data/actionpack/test/fixtures/filter_test/implicit_actions/edit.html.erb +1 -0
- data/actionpack/test/fixtures/filter_test/implicit_actions/show.html.erb +1 -0
- data/actionpack/test/fixtures/functional_caching/_partial.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +5 -0
- data/actionpack/test/fixtures/functional_caching/formatted_fragment_cached_with_variant.html+phone.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/fragment_cached_with_options.html.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb +3 -0
- data/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +1 -0
- data/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +2 -0
- data/actionpack/test/fixtures/helpers/abc_helper.rb +5 -0
- data/actionpack/test/fixtures/helpers/fun/games_helper.rb +7 -0
- data/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +7 -0
- data/actionpack/test/fixtures/helpers/just_me_helper.rb +5 -0
- data/actionpack/test/fixtures/helpers/me_too_helper.rb +5 -0
- data/actionpack/test/fixtures/helpers1_pack/pack1_helper.rb +7 -0
- data/actionpack/test/fixtures/helpers2_pack/pack2_helper.rb +7 -0
- data/actionpack/test/fixtures/helpers_typo/admin/users_helper.rb +6 -0
- data/actionpack/test/fixtures/implicit_render_test/empty_action_with_mobile_variant.html+mobile.erb +1 -0
- data/actionpack/test/fixtures/implicit_render_test/empty_action_with_template.html.erb +1 -0
- data/actionpack/test/fixtures/layouts/_customers.erb +1 -0
- data/actionpack/test/fixtures/layouts/block_with_layout.erb +3 -0
- data/actionpack/test/fixtures/layouts/builder.builder +3 -0
- data/actionpack/test/fixtures/layouts/partial_with_layout.erb +3 -0
- data/actionpack/test/fixtures/layouts/standard.html.erb +1 -0
- data/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
- data/actionpack/test/fixtures/layouts/with_html_partial.html.erb +1 -0
- data/actionpack/test/fixtures/layouts/xhr.html.erb +2 -0
- data/actionpack/test/fixtures/layouts/yield.erb +2 -0
- data/actionpack/test/fixtures/load_me.rb +4 -0
- data/actionpack/test/fixtures/localized/hello_world.de.html +1 -0
- data/actionpack/test/fixtures/localized/hello_world.en.html +1 -0
- data/actionpack/test/fixtures/localized/hello_world.it.erb +1 -0
- data/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/actionpack/test/fixtures/multipart/boundary_problem_file +10 -0
- data/actionpack/test/fixtures/multipart/bracketed_param +5 -0
- data/actionpack/test/fixtures/multipart/bracketed_utf8_param +5 -0
- data/actionpack/test/fixtures/multipart/empty +10 -0
- data/actionpack/test/fixtures/multipart/hello.txt +1 -0
- data/actionpack/test/fixtures/multipart/large_text_file +10 -0
- data/actionpack/test/fixtures/multipart/mixed_files +0 -0
- data/actionpack/test/fixtures/multipart/none +9 -0
- data/actionpack/test/fixtures/multipart/ruby_on_rails.jpg +0 -0
- data/actionpack/test/fixtures/multipart/single_parameter +5 -0
- data/actionpack/test/fixtures/multipart/single_utf8_param +5 -0
- data/actionpack/test/fixtures/multipart/text_file +10 -0
- data/actionpack/test/fixtures/multipart/utf8_filename +10 -0
- data/actionpack/test/fixtures/namespaced/implicit_render_test/hello_world.erb +1 -0
- data/actionpack/test/fixtures/old_content_type/render_default_content_types_for_respond_to.xml.erb +1 -0
- data/actionpack/test/fixtures/old_content_type/render_default_for_builder.builder +1 -0
- data/actionpack/test/fixtures/old_content_type/render_default_for_erb.erb +1 -0
- data/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
- data/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
- data/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
- data/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
- data/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
- data/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
- data/actionpack/test/fixtures/public/400.html +1 -0
- data/actionpack/test/fixtures/public/404.html +1 -0
- data/actionpack/test/fixtures/public/500.da.html +1 -0
- data/actionpack/test/fixtures/public/500.html +1 -0
- data/actionpack/test/fixtures/public/bar.html +1 -0
- data/actionpack/test/fixtures/public/bar/index.html +1 -0
- data/actionpack/test/fixtures/public/foo/bar.html +1 -0
- data/actionpack/test/fixtures/public/foo/baz.css +3 -0
- data/actionpack/test/fixtures/public/foo/index.html +1 -0
- data/actionpack/test/fixtures/public/foo/other-index.html +1 -0
- data/actionpack/test/fixtures/public/foo//343/201/223/343/202/223/343/201/253/343/201/241/343/201/257.html +1 -0
- data/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js +4 -0
- data/actionpack/test/fixtures/public/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
- data/actionpack/test/fixtures/public/gzip/foo.zoo +4 -0
- data/actionpack/test/fixtures/public/gzip/foo.zoo.gz +0 -0
- data/actionpack/test/fixtures/public/index.html +1 -0
- data/actionpack/test/fixtures/public/other-index.html +1 -0
- data/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
- data/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
- data/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
- data/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +1 -0
- data/actionpack/test/fixtures/respond_to/using_defaults_with_all.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +1 -0
- data/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb +1 -0
- data/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+tablet.erb +1 -0
- data/actionpack/test/fixtures/respond_to/variant_inline_syntax_without_block.html+phone.erb +1 -0
- data/actionpack/test/fixtures/respond_to/variant_plus_none_for_format.html.erb +1 -0
- data/actionpack/test/fixtures/respond_to/variant_with_implicit_template_rendering.html+mobile.erb +1 -0
- data/actionpack/test/fixtures/ruby_template.ruby +2 -0
- data/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +12 -0
- data/actionpack/test/fixtures/shared.html.erb +1 -0
- data/actionpack/test/fixtures/star_star_mime/index.js.erb +1 -0
- data/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
- data/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
- data/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
- data/actionpack/test/fixtures/test/hello/hello.erb +1 -0
- data/actionpack/test/fixtures/test/hello_world.erb +1 -0
- data/actionpack/test/fixtures/test/hello_world_with_partial.html.erb +2 -0
- data/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
- data/actionpack/test/fixtures/test/implicit_content_type.atom.builder +2 -0
- data/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/actionpack/test/fixtures/test/with_implicit_template.erb +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/bar.html +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/bar/index.html +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/foo/bar.html +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/foo/baz.css +3 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/foo/index.html +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/foo/other-index.html +1 -0
- data/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/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js +4 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/gzip/application-a71b3024f80aea3181c09774ca17e712.js.gz +0 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo +4 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/gzip/foo.zoo.gz +0 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/index.html +1 -0
- data/actionpack/test/fixtures//345/205/254/345/205/261/other-index.html +1 -0
- data/actionpack/test/journey/gtg/builder_test.rb +81 -0
- data/actionpack/test/journey/gtg/transition_table_test.rb +125 -0
- data/actionpack/test/journey/nfa/simulator_test.rb +100 -0
- data/actionpack/test/journey/nfa/transition_table_test.rb +74 -0
- data/actionpack/test/journey/nodes/symbol_test.rb +19 -0
- data/actionpack/test/journey/path/pattern_test.rb +286 -0
- data/actionpack/test/journey/route/definition/parser_test.rb +112 -0
- data/actionpack/test/journey/route/definition/scanner_test.rb +71 -0
- data/actionpack/test/journey/route_test.rb +113 -0
- data/actionpack/test/journey/router/utils_test.rb +48 -0
- data/actionpack/test/journey/router_test.rb +535 -0
- data/actionpack/test/journey/routes_test.rb +62 -0
- data/actionpack/test/lib/controller/fake_controllers.rb +37 -0
- data/actionpack/test/lib/controller/fake_models.rb +79 -0
- data/actionpack/test/routing/helper_test.rb +33 -0
- data/actionview/.gitignore +2 -0
- data/actionview/CHANGELOG.md +35 -0
- data/actionview/MIT-LICENSE +21 -0
- data/actionview/README.rdoc +38 -0
- data/actionview/RUNNING_UJS_TESTS.rdoc +7 -0
- data/actionview/RUNNING_UNIT_TESTS.rdoc +27 -0
- data/actionview/Rakefile +136 -0
- data/actionview/actionview.gemspec +38 -0
- data/actionview/app/assets/javascripts/MIT-LICENSE +20 -0
- data/actionview/app/assets/javascripts/README.md +60 -0
- data/actionview/app/assets/javascripts/rails-ujs.coffee +39 -0
- data/actionview/app/assets/javascripts/rails-ujs/BANNER.js +5 -0
- data/actionview/app/assets/javascripts/rails-ujs/features/confirm.coffee +26 -0
- data/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee +82 -0
- data/actionview/app/assets/javascripts/rails-ujs/features/method.coffee +34 -0
- data/actionview/app/assets/javascripts/rails-ujs/features/remote.coffee +90 -0
- data/actionview/app/assets/javascripts/rails-ujs/start.coffee +70 -0
- data/actionview/app/assets/javascripts/rails-ujs/utils/ajax.coffee +96 -0
- data/actionview/app/assets/javascripts/rails-ujs/utils/csrf.coffee +25 -0
- data/actionview/app/assets/javascripts/rails-ujs/utils/dom.coffee +28 -0
- data/actionview/app/assets/javascripts/rails-ujs/utils/event.coffee +40 -0
- data/actionview/app/assets/javascripts/rails-ujs/utils/form.coffee +36 -0
- data/actionview/bin/test +5 -0
- data/actionview/blade.yml +11 -0
- data/actionview/coffeelint.json +135 -0
- data/actionview/lib/action_view.rb +98 -0
- data/actionview/lib/action_view/base.rb +215 -0
- data/actionview/lib/action_view/buffers.rb +52 -0
- data/actionview/lib/action_view/context.rb +38 -0
- data/actionview/lib/action_view/dependency_tracker.rb +175 -0
- data/actionview/lib/action_view/digestor.rb +128 -0
- data/actionview/lib/action_view/flows.rb +76 -0
- data/actionview/lib/action_view/gem_version.rb +17 -0
- data/actionview/lib/action_view/helpers.rb +66 -0
- data/actionview/lib/action_view/helpers/active_model_helper.rb +51 -0
- data/actionview/lib/action_view/helpers/asset_tag_helper.rb +400 -0
- data/actionview/lib/action_view/helpers/asset_url_helper.rb +469 -0
- data/actionview/lib/action_view/helpers/atom_feed_helper.rb +205 -0
- data/actionview/lib/action_view/helpers/cache_helper.rb +263 -0
- data/actionview/lib/action_view/helpers/capture_helper.rb +212 -0
- data/actionview/lib/action_view/helpers/controller_helper.rb +36 -0
- data/actionview/lib/action_view/helpers/csrf_helper.rb +35 -0
- data/actionview/lib/action_view/helpers/date_helper.rb +1156 -0
- data/actionview/lib/action_view/helpers/debug_helper.rb +36 -0
- data/actionview/lib/action_view/helpers/form_helper.rb +2355 -0
- data/actionview/lib/action_view/helpers/form_options_helper.rb +883 -0
- data/actionview/lib/action_view/helpers/form_tag_helper.rb +916 -0
- data/actionview/lib/action_view/helpers/javascript_helper.rb +83 -0
- data/actionview/lib/action_view/helpers/number_helper.rb +451 -0
- data/actionview/lib/action_view/helpers/output_safety_helper.rb +70 -0
- data/actionview/lib/action_view/helpers/record_tag_helper.rb +23 -0
- data/actionview/lib/action_view/helpers/rendering_helper.rb +100 -0
- data/actionview/lib/action_view/helpers/sanitize_helper.rb +177 -0
- data/actionview/lib/action_view/helpers/tag_helper.rb +313 -0
- data/actionview/lib/action_view/helpers/tags.rb +44 -0
- data/actionview/lib/action_view/helpers/tags/base.rb +192 -0
- data/actionview/lib/action_view/helpers/tags/check_box.rb +66 -0
- data/actionview/lib/action_view/helpers/tags/checkable.rb +18 -0
- data/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +36 -0
- data/actionview/lib/action_view/helpers/tags/collection_helpers.rb +119 -0
- data/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +31 -0
- data/actionview/lib/action_view/helpers/tags/collection_select.rb +30 -0
- data/actionview/lib/action_view/helpers/tags/color_field.rb +27 -0
- data/actionview/lib/action_view/helpers/tags/date_field.rb +15 -0
- data/actionview/lib/action_view/helpers/tags/date_select.rb +74 -0
- data/actionview/lib/action_view/helpers/tags/datetime_field.rb +32 -0
- data/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +21 -0
- data/actionview/lib/action_view/helpers/tags/datetime_select.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/email_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/file_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +31 -0
- data/actionview/lib/action_view/helpers/tags/hidden_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/label.rb +85 -0
- data/actionview/lib/action_view/helpers/tags/month_field.rb +15 -0
- data/actionview/lib/action_view/helpers/tags/number_field.rb +20 -0
- data/actionview/lib/action_view/helpers/tags/password_field.rb +14 -0
- data/actionview/lib/action_view/helpers/tags/placeholderable.rb +24 -0
- data/actionview/lib/action_view/helpers/tags/radio_button.rb +33 -0
- data/actionview/lib/action_view/helpers/tags/range_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/search_field.rb +27 -0
- data/actionview/lib/action_view/helpers/tags/select.rb +43 -0
- data/actionview/lib/action_view/helpers/tags/tel_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/text_area.rb +24 -0
- data/actionview/lib/action_view/helpers/tags/text_field.rb +34 -0
- data/actionview/lib/action_view/helpers/tags/time_field.rb +15 -0
- data/actionview/lib/action_view/helpers/tags/time_select.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/time_zone_select.rb +22 -0
- data/actionview/lib/action_view/helpers/tags/translator.rb +44 -0
- data/actionview/lib/action_view/helpers/tags/url_field.rb +10 -0
- data/actionview/lib/action_view/helpers/tags/week_field.rb +15 -0
- data/actionview/lib/action_view/helpers/text_helper.rb +486 -0
- data/actionview/lib/action_view/helpers/translation_helper.rb +141 -0
- data/actionview/lib/action_view/helpers/url_helper.rb +654 -0
- data/actionview/lib/action_view/layouts.rb +433 -0
- data/actionview/lib/action_view/locale/en.yml +56 -0
- data/actionview/lib/action_view/log_subscriber.rb +96 -0
- data/actionview/lib/action_view/lookup_context.rb +274 -0
- data/actionview/lib/action_view/model_naming.rb +14 -0
- data/actionview/lib/action_view/path_set.rb +100 -0
- data/actionview/lib/action_view/railtie.rb +75 -0
- data/actionview/lib/action_view/record_identifier.rb +112 -0
- data/actionview/lib/action_view/renderer/abstract_renderer.rb +55 -0
- data/actionview/lib/action_view/renderer/partial_renderer.rb +552 -0
- data/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +57 -0
- data/actionview/lib/action_view/renderer/renderer.rb +56 -0
- data/actionview/lib/action_view/renderer/streaming_template_renderer.rb +103 -0
- data/actionview/lib/action_view/renderer/template_renderer.rb +102 -0
- data/actionview/lib/action_view/rendering.rb +155 -0
- data/actionview/lib/action_view/routing_url_for.rb +145 -0
- data/actionview/lib/action_view/tasks/cache_digests.rake +25 -0
- data/actionview/lib/action_view/template.rb +361 -0
- data/actionview/lib/action_view/template/error.rb +144 -0
- data/actionview/lib/action_view/template/handlers.rb +66 -0
- data/actionview/lib/action_view/template/handlers/builder.rb +25 -0
- data/actionview/lib/action_view/template/handlers/erb.rb +77 -0
- data/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb +11 -0
- data/actionview/lib/action_view/template/handlers/erb/erubi.rb +83 -0
- data/actionview/lib/action_view/template/handlers/erb/erubis.rb +83 -0
- data/actionview/lib/action_view/template/handlers/html.rb +11 -0
- data/actionview/lib/action_view/template/handlers/raw.rb +11 -0
- data/actionview/lib/action_view/template/html.rb +34 -0
- data/actionview/lib/action_view/template/resolver.rb +391 -0
- data/actionview/lib/action_view/template/text.rb +33 -0
- data/actionview/lib/action_view/template/types.rb +57 -0
- data/actionview/lib/action_view/test_case.rb +300 -0
- data/actionview/lib/action_view/testing/resolvers.rb +54 -0
- data/actionview/lib/action_view/version.rb +10 -0
- data/actionview/lib/action_view/view_paths.rb +105 -0
- data/actionview/package.json +36 -0
- data/actionview/test/abstract_unit.rb +287 -0
- data/actionview/test/actionpack/abstract/abstract_controller_test.rb +292 -0
- data/actionview/test/actionpack/abstract/helper_test.rb +128 -0
- data/actionview/test/actionpack/abstract/layouts_test.rb +568 -0
- data/actionview/test/actionpack/abstract/render_test.rb +103 -0
- data/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/formatted.html.erb +1 -0
- data/actionview/test/actionpack/abstract/views/abstract_controller/testing/me3/index.erb +1 -0
- data/actionview/test/actionpack/abstract/views/abstract_controller/testing/me4/index.erb +1 -0
- data/actionview/test/actionpack/abstract/views/action_with_ivars.erb +1 -0
- data/actionview/test/actionpack/abstract/views/helper_test.erb +1 -0
- data/actionview/test/actionpack/abstract/views/index.erb +1 -0
- data/actionview/test/actionpack/abstract/views/layouts/abstract_controller/testing/me4.erb +1 -0
- data/actionview/test/actionpack/abstract/views/layouts/application.erb +1 -0
- data/actionview/test/actionpack/abstract/views/naked_render.erb +1 -0
- data/actionview/test/actionpack/controller/capture_test.rb +83 -0
- data/actionview/test/actionpack/controller/layout_test.rb +270 -0
- data/actionview/test/actionpack/controller/render_test.rb +1294 -0
- data/actionview/test/actionpack/controller/view_paths_test.rb +174 -0
- data/actionview/test/active_record_unit.rb +92 -0
- data/actionview/test/activerecord/controller_runtime_test.rb +95 -0
- data/actionview/test/activerecord/debug_helper_test.rb +19 -0
- data/actionview/test/activerecord/form_helper_activerecord_test.rb +90 -0
- data/actionview/test/activerecord/polymorphic_routes_test.rb +780 -0
- data/actionview/test/activerecord/relation_cache_test.rb +23 -0
- data/actionview/test/activerecord/render_partial_with_record_identification_test.rb +198 -0
- data/actionview/test/fixtures/_top_level_partial.html.erb +1 -0
- data/actionview/test/fixtures/_top_level_partial_only.erb +1 -0
- data/actionview/test/fixtures/actionpack/bad_customers/_bad_customer.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/customers/_customer.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/fun/games/_form.erb +1 -0
- data/actionview/test/fixtures/actionpack/fun/games/hello_world.erb +1 -0
- data/actionview/test/fixtures/actionpack/good_customers/_good_customer.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/hello.html +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/alt/layouts/alt.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/controller_name_space/nested.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/item.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/layout_test.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/multiple_extensions.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/symlinked/symlinked_layout.erb +5 -0
- data/actionview/test/fixtures/actionpack/layout_tests/layouts/third_party_template_library.mab +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/views/goodbye.erb +1 -0
- data/actionview/test/fixtures/actionpack/layout_tests/views/hello.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/_column.html.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/_customers.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/_partial_and_yield.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/_yield_only.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/_yield_with_params.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/block_with_layout.erb +3 -0
- data/actionview/test/fixtures/actionpack/layouts/builder.builder +3 -0
- data/actionview/test/fixtures/actionpack/layouts/partial_with_layout.erb +3 -0
- data/actionview/test/fixtures/actionpack/layouts/standard.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/standard.text.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/streaming.erb +4 -0
- data/actionview/test/fixtures/actionpack/layouts/talk_from_action.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/with_html_partial.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/layouts/xhr.html.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/yield.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/yield_with_render_inline_inside.erb +2 -0
- data/actionview/test/fixtures/actionpack/layouts/yield_with_render_partial_inside.erb +2 -0
- data/actionview/test/fixtures/actionpack/quiz/questions/_question.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/shared.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_changing_priority.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_changing_priority.json.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_counter.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_counter.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_counter_with_as.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_greeting.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_iteration.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_iteration_with_as.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_customer_with_var.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_directory/_partial_with_locales.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_first_json_partial.json.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_form.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_hash_greeting.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_hash_object.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/_hello.builder +1 -0
- data/actionview/test/fixtures/actionpack/test/_json_change_priority.json.erb +0 -0
- data/actionview/test/fixtures/actionpack/test/_labelling_form.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_layout_for_partial.html.erb +3 -0
- data/actionview/test/fixtures/actionpack/test/_partial.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial.js.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_for_use_in_layout.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_html_erb.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_name_local_variable.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_only.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_only_html.html +1 -0
- data/actionview/test/fixtures/actionpack/test/_partial_with_partial.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/_person.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/_raise_indentation.html.erb +13 -0
- data/actionview/test/fixtures/actionpack/test/_second_json_partial.json.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/action_talk_to_layout.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/calling_partial_with_layout.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/capturing.erb +4 -0
- data/actionview/test/fixtures/actionpack/test/change_priority.html.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/content_for.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/content_for_concatenated.erb +3 -0
- data/actionview/test/fixtures/actionpack/test/content_for_with_parameter.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/formatted_html_erb.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder +1 -0
- data/actionview/test/fixtures/actionpack/test/formatted_xml_erb.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/formatted_xml_erb.xml.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/greeting.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/greeting.xml.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hello,world.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hello.builder +4 -0
- data/actionview/test/fixtures/actionpack/test/hello/hello.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hello_world.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hello_world_container.builder +3 -0
- data/actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder +3 -0
- data/actionview/test/fixtures/actionpack/test/hello_world_with_layout_false.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hello_world_with_partial.html.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/hello_xml_world.builder +11 -0
- data/actionview/test/fixtures/actionpack/test/html_template.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/hyphen-ated.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder +2 -0
- data/actionview/test/fixtures/actionpack/test/list.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder +4 -0
- data/actionview/test/fixtures/actionpack/test/potential_conflicts.erb +4 -0
- data/actionview/test/fixtures/actionpack/test/proper_block_detection.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_file_from_template.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_file_with_ivar.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_file_with_locals.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_file_with_locals_and_default.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.da.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_implicit_js_template_without_layout.js.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_partial_inside_directory.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_to_string_test.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/render_two_partials.html.erb +2 -0
- data/actionview/test/fixtures/actionpack/test/using_layout_around_block.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/with_html_partial.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/with_partial.html.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/with_partial.text.erb +1 -0
- data/actionview/test/fixtures/actionpack/test/with_xml_template.html.erb +1 -0
- data/actionview/test/fixtures/comments/empty.de.html.erb +1 -0
- data/actionview/test/fixtures/comments/empty.html+grid.erb +1 -0
- data/actionview/test/fixtures/comments/empty.html.builder +1 -0
- data/actionview/test/fixtures/comments/empty.html.erb +1 -0
- data/actionview/test/fixtures/comments/empty.xml.erb +1 -0
- data/actionview/test/fixtures/companies.yml +24 -0
- data/actionview/test/fixtures/company.rb +11 -0
- data/actionview/test/fixtures/custom_pattern/another.html.erb +1 -0
- data/actionview/test/fixtures/custom_pattern/html/another.erb +1 -0
- data/actionview/test/fixtures/custom_pattern/html/path.erb +1 -0
- data/actionview/test/fixtures/customers/_customer.html.erb +1 -0
- data/actionview/test/fixtures/customers/_customer.xml.erb +1 -0
- data/actionview/test/fixtures/db_definitions/sqlite.sql +49 -0
- data/actionview/test/fixtures/developer.rb +8 -0
- data/actionview/test/fixtures/developers.yml +21 -0
- data/actionview/test/fixtures/developers/_developer.erb +1 -0
- data/actionview/test/fixtures/developers_projects.yml +13 -0
- data/actionview/test/fixtures/digestor/api/comments/_comment.json.erb +1 -0
- data/actionview/test/fixtures/digestor/api/comments/_comments.json.erb +1 -0
- data/actionview/test/fixtures/digestor/comments/_comment.html.erb +1 -0
- data/actionview/test/fixtures/digestor/comments/_comments.html.erb +1 -0
- data/actionview/test/fixtures/digestor/events/_completed.html.erb +0 -0
- data/actionview/test/fixtures/digestor/events/_event.html.erb +0 -0
- data/actionview/test/fixtures/digestor/events/index.html.erb +1 -0
- data/actionview/test/fixtures/digestor/level/_recursion.html.erb +1 -0
- data/actionview/test/fixtures/digestor/level/below/_header.html.erb +0 -0
- data/actionview/test/fixtures/digestor/level/below/index.html.erb +1 -0
- data/actionview/test/fixtures/digestor/level/recursion.html.erb +1 -0
- data/actionview/test/fixtures/digestor/messages/_form.html.erb +0 -0
- data/actionview/test/fixtures/digestor/messages/_header.html.erb +0 -0
- data/actionview/test/fixtures/digestor/messages/_message.html.erb +1 -0
- data/actionview/test/fixtures/digestor/messages/actions/_move.html.erb +0 -0
- data/actionview/test/fixtures/digestor/messages/edit.html.erb +5 -0
- data/actionview/test/fixtures/digestor/messages/index.html.erb +2 -0
- data/actionview/test/fixtures/digestor/messages/new.html+iphone.erb +15 -0
- data/actionview/test/fixtures/digestor/messages/peek.html.erb +2 -0
- data/actionview/test/fixtures/digestor/messages/show.html.erb +14 -0
- data/actionview/test/fixtures/digestor/messages/thread.json.erb +1 -0
- data/actionview/test/fixtures/fun/games/_game.erb +1 -0
- data/actionview/test/fixtures/fun/games/hello_world.erb +1 -0
- data/actionview/test/fixtures/fun/serious/games/_game.erb +1 -0
- data/actionview/test/fixtures/games/_game.erb +1 -0
- data/actionview/test/fixtures/good_customers/_good_customer.html.erb +1 -0
- data/actionview/test/fixtures/helpers/abc_helper.rb +5 -0
- data/actionview/test/fixtures/helpers/helpery_test_helper.rb +7 -0
- data/actionview/test/fixtures/helpers_missing/invalid_require_helper.rb +6 -0
- data/actionview/test/fixtures/layout_tests/alt/hello.erb +1 -0
- data/actionview/test/fixtures/layouts/_column.html.erb +2 -0
- data/actionview/test/fixtures/layouts/_customers.erb +1 -0
- data/actionview/test/fixtures/layouts/_partial_and_yield.erb +2 -0
- data/actionview/test/fixtures/layouts/_yield_only.erb +1 -0
- data/actionview/test/fixtures/layouts/_yield_with_params.erb +1 -0
- data/actionview/test/fixtures/layouts/render_partial_html.erb +2 -0
- data/actionview/test/fixtures/layouts/streaming.erb +4 -0
- data/actionview/test/fixtures/layouts/streaming_with_capture.erb +6 -0
- data/actionview/test/fixtures/layouts/yield.erb +2 -0
- data/actionview/test/fixtures/layouts/yield_with_render_inline_inside.erb +2 -0
- data/actionview/test/fixtures/layouts/yield_with_render_partial_inside.erb +2 -0
- data/actionview/test/fixtures/mascot.rb +5 -0
- data/actionview/test/fixtures/mascots.yml +4 -0
- data/actionview/test/fixtures/mascots/_mascot.html.erb +1 -0
- data/actionview/test/fixtures/override/test/hello_world.erb +1 -0
- data/actionview/test/fixtures/override2/layouts/test/sub.erb +1 -0
- data/actionview/test/fixtures/plain_text.raw +1 -0
- data/actionview/test/fixtures/plain_text_with_characters.raw +1 -0
- data/actionview/test/fixtures/project.rb +9 -0
- data/actionview/test/fixtures/projects.yml +7 -0
- data/actionview/test/fixtures/projects/_project.erb +1 -0
- data/actionview/test/fixtures/public/.gitignore +1 -0
- data/actionview/test/fixtures/public/elsewhere/cools.js +1 -0
- data/actionview/test/fixtures/public/elsewhere/file.css +1 -0
- data/actionview/test/fixtures/public/foo/baz.css +3 -0
- data/actionview/test/fixtures/public/javascripts/application.js +1 -0
- data/actionview/test/fixtures/public/javascripts/bank.js +1 -0
- data/actionview/test/fixtures/public/javascripts/common.javascript +1 -0
- data/actionview/test/fixtures/public/javascripts/controls.js +1 -0
- data/actionview/test/fixtures/public/javascripts/dragdrop.js +1 -0
- data/actionview/test/fixtures/public/javascripts/effects.js +1 -0
- data/actionview/test/fixtures/public/javascripts/prototype.js +1 -0
- data/actionview/test/fixtures/public/javascripts/robber.js +1 -0
- data/actionview/test/fixtures/public/javascripts/subdir/subdir.js +1 -0
- data/actionview/test/fixtures/public/javascripts/version.1.0.js +1 -0
- data/actionview/test/fixtures/public/stylesheets/bank.css +1 -0
- data/actionview/test/fixtures/public/stylesheets/random.styles +1 -0
- data/actionview/test/fixtures/public/stylesheets/robber.css +1 -0
- data/actionview/test/fixtures/public/stylesheets/subdir/subdir.css +1 -0
- data/actionview/test/fixtures/public/stylesheets/version.1.0.css +1 -0
- data/actionview/test/fixtures/replies.yml +15 -0
- data/actionview/test/fixtures/replies/_reply.erb +1 -0
- data/actionview/test/fixtures/reply.rb +9 -0
- data/actionview/test/fixtures/respond_to/using_defaults_with_all.html.erb +1 -0
- data/actionview/test/fixtures/ruby_template.ruby +2 -0
- data/actionview/test/fixtures/shared.html.erb +1 -0
- data/actionview/test/fixtures/test/_200.html.erb +1 -0
- data/actionview/test/fixtures/test/_FooBar.html.erb +1 -0
- data/actionview/test/fixtures/test/_a-in.html.erb +0 -0
- data/actionview/test/fixtures/test/_b_layout_for_partial.html.erb +1 -0
- data/actionview/test/fixtures/test/_b_layout_for_partial_with_object.html.erb +1 -0
- data/actionview/test/fixtures/test/_b_layout_for_partial_with_object_counter.html.erb +1 -0
- data/actionview/test/fixtures/test/_builder_tag_nested_in_content_tag.erb +3 -0
- data/actionview/test/fixtures/test/_cached_customer.erb +3 -0
- data/actionview/test/fixtures/test/_cached_customer_as.erb +3 -0
- data/actionview/test/fixtures/test/_cached_nested_cached_customer.erb +3 -0
- data/actionview/test/fixtures/test/_changing_priority.html.erb +1 -0
- data/actionview/test/fixtures/test/_changing_priority.json.erb +1 -0
- data/actionview/test/fixtures/test/_content_tag_nested_in_content_tag.erb +3 -0
- data/actionview/test/fixtures/test/_counter.html.erb +1 -0
- data/actionview/test/fixtures/test/_customer.erb +1 -0
- data/actionview/test/fixtures/test/_customer.mobile.erb +1 -0
- data/actionview/test/fixtures/test/_customer_greeting.erb +1 -0
- data/actionview/test/fixtures/test/_customer_with_var.erb +1 -0
- data/actionview/test/fixtures/test/_directory/_partial_with_locales.html.erb +1 -0
- data/actionview/test/fixtures/test/_first_json_partial.json.erb +1 -0
- data/actionview/test/fixtures/test/_from_helper.erb +1 -0
- data/actionview/test/fixtures/test/_json_change_priority.json.erb +0 -0
- data/actionview/test/fixtures/test/_klass.erb +1 -0
- data/actionview/test/fixtures/test/_label_with_block.erb +4 -0
- data/actionview/test/fixtures/test/_layout_for_block_with_args.html.erb +3 -0
- data/actionview/test/fixtures/test/_layout_for_partial.html.erb +3 -0
- data/actionview/test/fixtures/test/_layout_with_partial_and_yield.html.erb +4 -0
- data/actionview/test/fixtures/test/_local_inspector.html.erb +1 -0
- data/actionview/test/fixtures/test/_nested_cached_customer.erb +1 -0
- data/actionview/test/fixtures/test/_object_inspector.erb +1 -0
- data/actionview/test/fixtures/test/_one.html.erb +1 -0
- data/actionview/test/fixtures/test/_partial.erb +1 -0
- data/actionview/test/fixtures/test/_partial.html.erb +1 -0
- data/actionview/test/fixtures/test/_partial.js.erb +1 -0
- data/actionview/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
- data/actionview/test/fixtures/test/_partial_iteration_1.erb +1 -0
- data/actionview/test/fixtures/test/_partial_iteration_2.erb +1 -0
- data/actionview/test/fixtures/test/_partial_name_in_local_assigns.erb +1 -0
- data/actionview/test/fixtures/test/_partial_name_local_variable.erb +1 -0
- data/actionview/test/fixtures/test/_partial_only.erb +1 -0
- data/actionview/test/fixtures/test/_partial_shortcut_with_block_content.html.erb +3 -0
- data/actionview/test/fixtures/test/_partial_with_layout.erb +2 -0
- data/actionview/test/fixtures/test/_partial_with_layout_block_content.erb +4 -0
- data/actionview/test/fixtures/test/_partial_with_layout_block_partial.erb +4 -0
- data/actionview/test/fixtures/test/_partial_with_only_html_version.html.erb +1 -0
- data/actionview/test/fixtures/test/_partial_with_partial.erb +2 -0
- data/actionview/test/fixtures/test/_partial_with_variants.html+grid.erb +1 -0
- data/actionview/test/fixtures/test/_partialhtml.html +1 -0
- data/actionview/test/fixtures/test/_raise.html.erb +1 -0
- data/actionview/test/fixtures/test/_raise_indentation.html.erb +13 -0
- data/actionview/test/fixtures/test/_second_json_partial.json.erb +1 -0
- data/actionview/test/fixtures/test/_two.html.erb +1 -0
- data/actionview/test/fixtures/test/_utf8_partial.html.erb +1 -0
- data/actionview/test/fixtures/test/_utf8_partial_magic.html.erb +2 -0
- data/actionview/test/fixtures/test/_/360/237/215/243.erb +1 -0
- data/actionview/test/fixtures/test/basic.html.erb +1 -0
- data/actionview/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
- data/actionview/test/fixtures/test/change_priority.html.erb +2 -0
- data/actionview/test/fixtures/test/dont_pick_me +1 -0
- data/actionview/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/actionview/test/fixtures/test/greeting.xml.erb +1 -0
- data/actionview/test/fixtures/test/hello.builder +4 -0
- data/actionview/test/fixtures/test/hello/hello.erb +1 -0
- data/actionview/test/fixtures/test/hello_world.da.html.erb +1 -0
- data/actionview/test/fixtures/test/hello_world.erb +1 -0
- data/actionview/test/fixtures/test/hello_world.erb~ +1 -0
- data/actionview/test/fixtures/test/hello_world.html+phone.erb +1 -0
- data/actionview/test/fixtures/test/hello_world.pt-BR.html.erb +1 -0
- data/actionview/test/fixtures/test/hello_world.text+phone.erb +1 -0
- data/actionview/test/fixtures/test/hello_world_with_partial.html.erb +2 -0
- data/actionview/test/fixtures/test/html_template.html.erb +1 -0
- data/actionview/test/fixtures/test/layout_render_file.erb +2 -0
- data/actionview/test/fixtures/test/layout_render_object.erb +1 -0
- data/actionview/test/fixtures/test/list.erb +1 -0
- data/actionview/test/fixtures/test/malformed/malformed.en.html.erb~ +1 -0
- data/actionview/test/fixtures/test/malformed/malformed.erb~ +1 -0
- data/actionview/test/fixtures/test/malformed/malformed.html.erb~ +1 -0
- data/actionview/test/fixtures/test/malformed/malformed~ +1 -0
- data/actionview/test/fixtures/test/nested_layout.erb +3 -0
- data/actionview/test/fixtures/test/nested_streaming.erb +3 -0
- data/actionview/test/fixtures/test/nil_return.erb +1 -0
- data/actionview/test/fixtures/test/one.html.erb +1 -0
- data/actionview/test/fixtures/test/render_file_inspect_local_assigns.erb +1 -0
- data/actionview/test/fixtures/test/render_file_instance_variable.erb +1 -0
- data/actionview/test/fixtures/test/render_file_unicode_local.erb +1 -0
- data/actionview/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/actionview/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/actionview/test/fixtures/test/render_file_with_locals_and_default.erb +1 -0
- data/actionview/test/fixtures/test/render_file_with_ruby_keyword_locals.erb +1 -0
- data/actionview/test/fixtures/test/render_partial_inside_directory.html.erb +1 -0
- data/actionview/test/fixtures/test/render_two_partials.html.erb +2 -0
- data/actionview/test/fixtures/test/streaming.erb +3 -0
- data/actionview/test/fixtures/test/streaming_buster.erb +3 -0
- data/actionview/test/fixtures/test/sub_template_raise.html.erb +1 -0
- data/actionview/test/fixtures/test/template.erb +1 -0
- data/actionview/test/fixtures/test/test_template_with_delegation_reserved_keywords.erb +1 -0
- data/actionview/test/fixtures/test/update_element_with_capture.erb +9 -0
- data/actionview/test/fixtures/test/utf8.html.erb +4 -0
- data/actionview/test/fixtures/test/utf8_magic.html.erb +5 -0
- data/actionview/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +5 -0
- data/actionview/test/fixtures/topic.rb +5 -0
- data/actionview/test/fixtures/topics.yml +22 -0
- data/actionview/test/fixtures/topics/_topic.html.erb +1 -0
- data/actionview/test/fixtures/translations/templates/array.erb +1 -0
- data/actionview/test/fixtures/translations/templates/default.erb +1 -0
- data/actionview/test/fixtures/translations/templates/found.erb +1 -0
- data/actionview/test/fixtures/translations/templates/missing.erb +1 -0
- data/actionview/test/fixtures/with_format.json.erb +1 -0
- data/actionview/test/lib/controller/fake_models.rb +204 -0
- data/actionview/test/template/active_model_helper_test.rb +100 -0
- data/actionview/test/template/asset_tag_helper_test.rb +831 -0
- data/actionview/test/template/atom_feed_helper_test.rb +375 -0
- data/actionview/test/template/capture_helper_test.rb +228 -0
- data/actionview/test/template/compiled_templates_test.rb +94 -0
- data/actionview/test/template/controller_helper_test.rb +34 -0
- data/actionview/test/template/date_helper_i18n_test.rb +166 -0
- data/actionview/test/template/date_helper_test.rb +3642 -0
- data/actionview/test/template/dependency_tracker_test.rb +195 -0
- data/actionview/test/template/digestor_test.rb +388 -0
- data/actionview/test/template/erb/deprecated_erubis_implementation_test.rb +15 -0
- data/actionview/test/template/erb/form_for_test.rb +13 -0
- data/actionview/test/template/erb/helper.rb +26 -0
- data/actionview/test/template/erb/tag_helper_test.rb +32 -0
- data/actionview/test/template/erb_util_test.rb +114 -0
- data/actionview/test/template/form_collections_helper_test.rb +527 -0
- data/actionview/test/template/form_helper/form_with_test.rb +2239 -0
- data/actionview/test/template/form_helper_test.rb +3522 -0
- data/actionview/test/template/form_options_helper_i18n_test.rb +30 -0
- data/actionview/test/template/form_options_helper_test.rb +1417 -0
- data/actionview/test/template/form_tag_helper_test.rb +785 -0
- data/actionview/test/template/html_test.rb +19 -0
- data/actionview/test/template/javascript_helper_test.rb +64 -0
- data/actionview/test/template/log_subscriber_test.rb +224 -0
- data/actionview/test/template/lookup_context_test.rb +289 -0
- data/actionview/test/template/number_helper_test.rb +204 -0
- data/actionview/test/template/output_safety_helper_test.rb +119 -0
- data/actionview/test/template/partial_iteration_test.rb +35 -0
- data/actionview/test/template/record_identifier_test.rb +93 -0
- data/actionview/test/template/record_tag_helper_test.rb +33 -0
- data/actionview/test/template/render_test.rb +725 -0
- data/actionview/test/template/resolver_cache_test.rb +9 -0
- data/actionview/test/template/resolver_patterns_test.rb +44 -0
- data/actionview/test/template/sanitize_helper_test.rb +43 -0
- data/actionview/test/template/streaming_render_test.rb +113 -0
- data/actionview/test/template/tag_helper_test.rb +357 -0
- data/actionview/test/template/template_error_test.rb +37 -0
- data/actionview/test/template/template_test.rb +207 -0
- data/actionview/test/template/test_case_test.rb +335 -0
- data/actionview/test/template/test_test.rb +94 -0
- data/actionview/test/template/testing/fixture_resolver_test.rb +20 -0
- data/actionview/test/template/testing/null_resolver_test.rb +14 -0
- data/actionview/test/template/text_helper_test.rb +535 -0
- data/actionview/test/template/text_test.rb +25 -0
- data/actionview/test/template/translation_helper_test.rb +238 -0
- data/actionview/test/template/url_helper_test.rb +969 -0
- data/actionview/test/ujs/.gitignore +1 -0
- data/actionview/test/ujs/config.ru +6 -0
- data/actionview/test/ujs/public/test/.eslintrc.yml +21 -0
- data/actionview/test/ujs/public/test/call-remote-callbacks.js +273 -0
- data/actionview/test/ujs/public/test/call-remote.js +275 -0
- data/actionview/test/ujs/public/test/csrf-refresh.js +24 -0
- data/actionview/test/ujs/public/test/csrf-token.js +27 -0
- data/actionview/test/ujs/public/test/data-confirm.js +316 -0
- data/actionview/test/ujs/public/test/data-disable-with.js +391 -0
- data/actionview/test/ujs/public/test/data-disable.js +321 -0
- data/actionview/test/ujs/public/test/data-method.js +85 -0
- data/actionview/test/ujs/public/test/data-remote.js +438 -0
- data/actionview/test/ujs/public/test/override.js +56 -0
- data/actionview/test/ujs/public/test/settings.js +116 -0
- data/actionview/test/ujs/public/vendor/jquery-2.2.0.js +9831 -0
- data/actionview/test/ujs/public/vendor/jquery.metadata.js +122 -0
- data/actionview/test/ujs/public/vendor/qunit.css +237 -0
- data/actionview/test/ujs/public/vendor/qunit.js +2288 -0
- data/actionview/test/ujs/server.rb +74 -0
- data/actionview/test/ujs/views/layouts/application.html.erb +25 -0
- data/actionview/test/ujs/views/tests/index.html.erb +11 -0
- data/activejob/CHANGELOG.md +8 -0
- data/activejob/MIT-LICENSE +21 -0
- data/activejob/README.md +126 -0
- data/activejob/Rakefile +79 -0
- data/activejob/activejob.gemspec +30 -0
- data/activejob/bin/test +5 -0
- data/activejob/lib/active_job.rb +39 -0
- data/activejob/lib/active_job/arguments.rb +156 -0
- data/activejob/lib/active_job/base.rb +74 -0
- data/activejob/lib/active_job/callbacks.rb +155 -0
- data/activejob/lib/active_job/configured_job.rb +18 -0
- data/activejob/lib/active_job/core.rb +140 -0
- data/activejob/lib/active_job/enqueuing.rb +59 -0
- data/activejob/lib/active_job/exceptions.rb +124 -0
- data/activejob/lib/active_job/execution.rb +49 -0
- data/activejob/lib/active_job/gem_version.rb +17 -0
- data/activejob/lib/active_job/logging.rb +130 -0
- data/activejob/lib/active_job/queue_adapter.rb +66 -0
- data/activejob/lib/active_job/queue_adapters.rb +139 -0
- data/activejob/lib/active_job/queue_adapters/async_adapter.rb +116 -0
- data/activejob/lib/active_job/queue_adapters/backburner_adapter.rb +36 -0
- data/activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb +43 -0
- data/activejob/lib/active_job/queue_adapters/inline_adapter.rb +23 -0
- data/activejob/lib/active_job/queue_adapters/qu_adapter.rb +46 -0
- data/activejob/lib/active_job/queue_adapters/que_adapter.rb +39 -0
- data/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb +58 -0
- data/activejob/lib/active_job/queue_adapters/resque_adapter.rb +53 -0
- data/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb +47 -0
- data/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb +48 -0
- data/activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb +49 -0
- data/activejob/lib/active_job/queue_adapters/test_adapter.rb +67 -0
- data/activejob/lib/active_job/queue_name.rb +49 -0
- data/activejob/lib/active_job/queue_priority.rb +43 -0
- data/activejob/lib/active_job/railtie.rb +34 -0
- data/activejob/lib/active_job/test_case.rb +11 -0
- data/activejob/lib/active_job/test_helper.rb +448 -0
- data/activejob/lib/active_job/translation.rb +13 -0
- data/activejob/lib/active_job/version.rb +10 -0
- data/activejob/lib/rails/generators/job/job_generator.rb +40 -0
- data/activejob/lib/rails/generators/job/templates/application_job.rb +9 -0
- data/activejob/lib/rails/generators/job/templates/job.rb +9 -0
- data/activejob/test/adapters/async.rb +4 -0
- data/activejob/test/adapters/backburner.rb +5 -0
- data/activejob/test/adapters/delayed_job.rb +8 -0
- data/activejob/test/adapters/inline.rb +3 -0
- data/activejob/test/adapters/qu.rb +5 -0
- data/activejob/test/adapters/que.rb +6 -0
- data/activejob/test/adapters/queue_classic.rb +4 -0
- data/activejob/test/adapters/resque.rb +4 -0
- data/activejob/test/adapters/sidekiq.rb +4 -0
- data/activejob/test/adapters/sneakers.rb +4 -0
- data/activejob/test/adapters/sucker_punch.rb +4 -0
- data/activejob/test/adapters/test.rb +5 -0
- data/activejob/test/cases/adapter_test.rb +9 -0
- data/activejob/test/cases/argument_serialization_test.rb +113 -0
- data/activejob/test/cases/callbacks_test.rb +25 -0
- data/activejob/test/cases/exceptions_test.rb +109 -0
- data/activejob/test/cases/job_serialization_test.rb +57 -0
- data/activejob/test/cases/logging_test.rb +137 -0
- data/activejob/test/cases/queue_adapter_test.rb +51 -0
- data/activejob/test/cases/queue_naming_test.rb +104 -0
- data/activejob/test/cases/queue_priority_test.rb +49 -0
- data/activejob/test/cases/queuing_test.rb +44 -0
- data/activejob/test/cases/rescue_test.rb +36 -0
- data/activejob/test/cases/test_case_test.rb +25 -0
- data/activejob/test/cases/test_helper_test.rb +929 -0
- data/activejob/test/cases/translation_test.rb +22 -0
- data/activejob/test/helper.rb +18 -0
- data/activejob/test/integration/queuing_test.rb +117 -0
- data/activejob/test/jobs/application_job.rb +4 -0
- data/activejob/test/jobs/callback_job.rb +29 -0
- data/activejob/test/jobs/gid_job.rb +9 -0
- data/activejob/test/jobs/hello_job.rb +9 -0
- data/activejob/test/jobs/inherited_job.rb +7 -0
- data/activejob/test/jobs/kwargs_job.rb +9 -0
- data/activejob/test/jobs/logging_job.rb +11 -0
- data/activejob/test/jobs/nested_job.rb +11 -0
- data/activejob/test/jobs/overridden_logging_job.rb +11 -0
- data/activejob/test/jobs/provider_jid_job.rb +9 -0
- data/activejob/test/jobs/queue_adapter_job.rb +5 -0
- data/activejob/test/jobs/queue_as_job.rb +12 -0
- data/activejob/test/jobs/rescue_job.rb +29 -0
- data/activejob/test/jobs/retry_job.rb +31 -0
- data/activejob/test/jobs/translated_hello_job.rb +12 -0
- data/activejob/test/models/person.rb +22 -0
- data/activejob/test/support/backburner/inline.rb +10 -0
- data/activejob/test/support/delayed_job/delayed/backend/test.rb +112 -0
- data/activejob/test/support/delayed_job/delayed/serialization/test.rb +0 -0
- data/activejob/test/support/integration/adapters/async.rb +12 -0
- data/activejob/test/support/integration/adapters/backburner.rb +39 -0
- data/activejob/test/support/integration/adapters/delayed_job.rb +23 -0
- data/activejob/test/support/integration/adapters/inline.rb +16 -0
- data/activejob/test/support/integration/adapters/qu.rb +40 -0
- data/activejob/test/support/integration/adapters/que.rb +41 -0
- data/activejob/test/support/integration/adapters/queue_classic.rb +39 -0
- data/activejob/test/support/integration/adapters/resque.rb +51 -0
- data/activejob/test/support/integration/adapters/sidekiq.rb +104 -0
- data/activejob/test/support/integration/adapters/sneakers.rb +90 -0
- data/activejob/test/support/integration/adapters/sucker_punch.rb +8 -0
- data/activejob/test/support/integration/dummy_app_template.rb +32 -0
- data/activejob/test/support/integration/helper.rb +33 -0
- data/activejob/test/support/integration/jobs_manager.rb +29 -0
- data/activejob/test/support/integration/test_case_helpers.rb +65 -0
- data/activejob/test/support/job_buffer.rb +21 -0
- data/activejob/test/support/que/inline.rb +16 -0
- data/activejob/test/support/queue_classic/inline.rb +25 -0
- data/activejob/test/support/sneakers/inline.rb +14 -0
- data/activemodel/CHANGELOG.md +41 -0
- data/activemodel/MIT-LICENSE +21 -0
- data/activemodel/README.rdoc +264 -0
- data/activemodel/Rakefile +23 -0
- data/activemodel/activemodel.gemspec +29 -0
- data/activemodel/bin/test +5 -0
- data/activemodel/lib/active_model.rb +74 -0
- data/activemodel/lib/active_model/attribute_assignment.rb +55 -0
- data/activemodel/lib/active_model/attribute_methods.rb +478 -0
- data/activemodel/lib/active_model/callbacks.rb +153 -0
- data/activemodel/lib/active_model/conversion.rb +111 -0
- data/activemodel/lib/active_model/dirty.rb +274 -0
- data/activemodel/lib/active_model/errors.rb +513 -0
- data/activemodel/lib/active_model/forbidden_attributes_protection.rb +31 -0
- data/activemodel/lib/active_model/gem_version.rb +17 -0
- data/activemodel/lib/active_model/lint.rb +118 -0
- data/activemodel/lib/active_model/locale/en.yml +36 -0
- data/activemodel/lib/active_model/model.rb +99 -0
- data/activemodel/lib/active_model/naming.rb +318 -0
- data/activemodel/lib/active_model/railtie.rb +14 -0
- data/activemodel/lib/active_model/secure_password.rb +129 -0
- data/activemodel/lib/active_model/serialization.rb +192 -0
- data/activemodel/lib/active_model/serializers/json.rb +146 -0
- data/activemodel/lib/active_model/translation.rb +70 -0
- data/activemodel/lib/active_model/type.rb +49 -0
- data/activemodel/lib/active_model/type/big_integer.rb +15 -0
- data/activemodel/lib/active_model/type/binary.rb +52 -0
- data/activemodel/lib/active_model/type/boolean.rb +34 -0
- data/activemodel/lib/active_model/type/date.rb +56 -0
- data/activemodel/lib/active_model/type/date_time.rb +50 -0
- data/activemodel/lib/active_model/type/decimal.rb +70 -0
- data/activemodel/lib/active_model/type/float.rb +36 -0
- data/activemodel/lib/active_model/type/helpers.rb +6 -0
- data/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb +41 -0
- data/activemodel/lib/active_model/type/helpers/mutable.rb +20 -0
- data/activemodel/lib/active_model/type/helpers/numeric.rb +37 -0
- data/activemodel/lib/active_model/type/helpers/time_value.rb +79 -0
- data/activemodel/lib/active_model/type/immutable_string.rb +32 -0
- data/activemodel/lib/active_model/type/integer.rb +70 -0
- data/activemodel/lib/active_model/type/registry.rb +70 -0
- data/activemodel/lib/active_model/type/string.rb +26 -0
- data/activemodel/lib/active_model/type/time.rb +48 -0
- data/activemodel/lib/active_model/type/value.rb +122 -0
- data/activemodel/lib/active_model/validations.rb +439 -0
- data/activemodel/lib/active_model/validations/absence.rb +33 -0
- data/activemodel/lib/active_model/validations/acceptance.rb +106 -0
- data/activemodel/lib/active_model/validations/callbacks.rb +116 -0
- data/activemodel/lib/active_model/validations/clusivity.rb +54 -0
- data/activemodel/lib/active_model/validations/confirmation.rb +80 -0
- data/activemodel/lib/active_model/validations/exclusion.rb +49 -0
- data/activemodel/lib/active_model/validations/format.rb +114 -0
- data/activemodel/lib/active_model/validations/helper_methods.rb +15 -0
- data/activemodel/lib/active_model/validations/inclusion.rb +47 -0
- data/activemodel/lib/active_model/validations/length.rb +123 -0
- data/activemodel/lib/active_model/validations/numericality.rb +165 -0
- data/activemodel/lib/active_model/validations/presence.rb +39 -0
- data/activemodel/lib/active_model/validations/validates.rb +174 -0
- data/activemodel/lib/active_model/validations/with.rb +147 -0
- data/activemodel/lib/active_model/validator.rb +183 -0
- data/activemodel/lib/active_model/version.rb +10 -0
- data/activemodel/test/cases/attribute_assignment_test.rb +131 -0
- data/activemodel/test/cases/attribute_methods_test.rb +283 -0
- data/activemodel/test/cases/callbacks_test.rb +134 -0
- data/activemodel/test/cases/conversion_test.rb +52 -0
- data/activemodel/test/cases/dirty_test.rb +222 -0
- data/activemodel/test/cases/errors_test.rb +420 -0
- data/activemodel/test/cases/forbidden_attributes_protection_test.rb +44 -0
- data/activemodel/test/cases/helper.rb +25 -0
- data/activemodel/test/cases/lint_test.rb +22 -0
- data/activemodel/test/cases/model_test.rb +79 -0
- data/activemodel/test/cases/naming_test.rb +282 -0
- data/activemodel/test/cases/railtie_test.rb +34 -0
- data/activemodel/test/cases/secure_password_test.rb +220 -0
- data/activemodel/test/cases/serialization_test.rb +177 -0
- data/activemodel/test/cases/serializers/json_serialization_test.rb +204 -0
- data/activemodel/test/cases/translation_test.rb +113 -0
- data/activemodel/test/cases/type/big_integer_test.rb +26 -0
- data/activemodel/test/cases/type/binary_test.rb +17 -0
- data/activemodel/test/cases/type/boolean_test.rb +41 -0
- data/activemodel/test/cases/type/date_test.rb +21 -0
- data/activemodel/test/cases/type/date_time_test.rb +40 -0
- data/activemodel/test/cases/type/decimal_test.rb +74 -0
- data/activemodel/test/cases/type/float_test.rb +32 -0
- data/activemodel/test/cases/type/immutable_string_test.rb +23 -0
- data/activemodel/test/cases/type/integer_test.rb +118 -0
- data/activemodel/test/cases/type/registry_test.rb +43 -0
- data/activemodel/test/cases/type/string_test.rb +39 -0
- data/activemodel/test/cases/type/time_test.rb +23 -0
- data/activemodel/test/cases/type/value_test.rb +16 -0
- data/activemodel/test/cases/validations/absence_validation_test.rb +69 -0
- data/activemodel/test/cases/validations/acceptance_validation_test.rb +88 -0
- data/activemodel/test/cases/validations/callbacks_test.rb +145 -0
- data/activemodel/test/cases/validations/conditional_validation_test.rb +149 -0
- data/activemodel/test/cases/validations/confirmation_validation_test.rb +121 -0
- data/activemodel/test/cases/validations/exclusion_validation_test.rb +109 -0
- data/activemodel/test/cases/validations/format_validation_test.rb +149 -0
- data/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb +152 -0
- data/activemodel/test/cases/validations/i18n_validation_test.rb +344 -0
- data/activemodel/test/cases/validations/inclusion_validation_test.rb +161 -0
- data/activemodel/test/cases/validations/length_validation_test.rb +413 -0
- data/activemodel/test/cases/validations/numericality_validation_test.rb +305 -0
- data/activemodel/test/cases/validations/presence_validation_test.rb +107 -0
- data/activemodel/test/cases/validations/validates_test.rb +159 -0
- data/activemodel/test/cases/validations/validations_context_test.rb +70 -0
- data/activemodel/test/cases/validations/with_validation_test.rb +185 -0
- data/activemodel/test/cases/validations_test.rb +465 -0
- data/activemodel/test/models/account.rb +7 -0
- data/activemodel/test/models/blog_post.rb +11 -0
- data/activemodel/test/models/contact.rb +42 -0
- data/activemodel/test/models/custom_reader.rb +17 -0
- data/activemodel/test/models/helicopter.rb +9 -0
- data/activemodel/test/models/person.rb +19 -0
- data/activemodel/test/models/person_with_validator.rb +26 -0
- data/activemodel/test/models/reply.rb +34 -0
- data/activemodel/test/models/sheep.rb +5 -0
- data/activemodel/test/models/topic.rb +41 -0
- data/activemodel/test/models/track_back.rb +13 -0
- data/activemodel/test/models/user.rb +12 -0
- data/activemodel/test/models/visitor.rb +12 -0
- data/activemodel/test/validators/email_validator.rb +8 -0
- data/activemodel/test/validators/namespace/email_validator.rb +8 -0
- data/activerecord/CHANGELOG.md +242 -0
- data/activerecord/MIT-LICENSE +20 -0
- data/activerecord/README.rdoc +217 -0
- data/activerecord/RUNNING_UNIT_TESTS.rdoc +51 -0
- data/activerecord/Rakefile +142 -0
- data/activerecord/activerecord.gemspec +35 -0
- data/activerecord/bin/test +20 -0
- data/activerecord/examples/.gitignore +1 -0
- data/activerecord/examples/performance.rb +185 -0
- data/activerecord/examples/simple.rb +15 -0
- data/activerecord/lib/active_record.rb +183 -0
- data/activerecord/lib/active_record/aggregations.rb +284 -0
- data/activerecord/lib/active_record/association_relation.rb +40 -0
- data/activerecord/lib/active_record/associations.rb +1885 -0
- data/activerecord/lib/active_record/associations/alias_tracker.rb +94 -0
- data/activerecord/lib/active_record/associations/association.rb +284 -0
- data/activerecord/lib/active_record/associations/association_scope.rb +181 -0
- data/activerecord/lib/active_record/associations/belongs_to_association.rb +113 -0
- data/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +42 -0
- data/activerecord/lib/active_record/associations/builder/association.rb +145 -0
- data/activerecord/lib/active_record/associations/builder/belongs_to.rb +150 -0
- data/activerecord/lib/active_record/associations/builder/collection_association.rb +82 -0
- data/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb +135 -0
- data/activerecord/lib/active_record/associations/builder/has_many.rb +17 -0
- data/activerecord/lib/active_record/associations/builder/has_one.rb +30 -0
- data/activerecord/lib/active_record/associations/builder/singular_association.rb +42 -0
- data/activerecord/lib/active_record/associations/collection_association.rb +505 -0
- data/activerecord/lib/active_record/associations/collection_proxy.rb +1159 -0
- data/activerecord/lib/active_record/associations/foreign_association.rb +13 -0
- data/activerecord/lib/active_record/associations/has_many_association.rb +135 -0
- data/activerecord/lib/active_record/associations/has_many_through_association.rb +216 -0
- data/activerecord/lib/active_record/associations/has_one_association.rb +111 -0
- data/activerecord/lib/active_record/associations/has_one_through_association.rb +42 -0
- data/activerecord/lib/active_record/associations/join_dependency.rb +287 -0
- data/activerecord/lib/active_record/associations/join_dependency/join_association.rb +61 -0
- data/activerecord/lib/active_record/associations/join_dependency/join_base.rb +23 -0
- data/activerecord/lib/active_record/associations/join_dependency/join_part.rb +64 -0
- data/activerecord/lib/active_record/associations/preloader.rb +204 -0
- data/activerecord/lib/active_record/associations/preloader/association.rb +133 -0
- data/activerecord/lib/active_record/associations/preloader/belongs_to.rb +17 -0
- data/activerecord/lib/active_record/associations/preloader/collection_association.rb +19 -0
- data/activerecord/lib/active_record/associations/preloader/has_many.rb +17 -0
- data/activerecord/lib/active_record/associations/preloader/has_many_through.rb +21 -0
- data/activerecord/lib/active_record/associations/preloader/has_one.rb +17 -0
- data/activerecord/lib/active_record/associations/preloader/has_one_through.rb +11 -0
- data/activerecord/lib/active_record/associations/preloader/singular_association.rb +20 -0
- data/activerecord/lib/active_record/associations/preloader/through_association.rb +111 -0
- data/activerecord/lib/active_record/associations/singular_association.rb +79 -0
- data/activerecord/lib/active_record/associations/through_association.rb +108 -0
- data/activerecord/lib/active_record/attribute.rb +242 -0
- data/activerecord/lib/active_record/attribute/user_provided_default.rb +32 -0
- data/activerecord/lib/active_record/attribute_assignment.rb +93 -0
- data/activerecord/lib/active_record/attribute_decorators.rb +90 -0
- data/activerecord/lib/active_record/attribute_methods.rb +449 -0
- data/activerecord/lib/active_record/attribute_methods/before_type_cast.rb +78 -0
- data/activerecord/lib/active_record/attribute_methods/dirty.rb +251 -0
- data/activerecord/lib/active_record/attribute_methods/primary_key.rb +141 -0
- data/activerecord/lib/active_record/attribute_methods/query.rb +42 -0
- data/activerecord/lib/active_record/attribute_methods/read.rb +84 -0
- data/activerecord/lib/active_record/attribute_methods/serialization.rb +90 -0
- data/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +91 -0
- data/activerecord/lib/active_record/attribute_methods/write.rb +67 -0
- data/activerecord/lib/active_record/attribute_mutation_tracker.rb +111 -0
- data/activerecord/lib/active_record/attribute_set.rb +113 -0
- data/activerecord/lib/active_record/attribute_set/builder.rb +126 -0
- data/activerecord/lib/active_record/attribute_set/yaml_encoder.rb +43 -0
- data/activerecord/lib/active_record/attributes.rb +266 -0
- data/activerecord/lib/active_record/autosave_association.rb +490 -0
- data/activerecord/lib/active_record/base.rb +329 -0
- data/activerecord/lib/active_record/callbacks.rb +349 -0
- data/activerecord/lib/active_record/coders/json.rb +15 -0
- data/activerecord/lib/active_record/coders/yaml_column.rb +50 -0
- data/activerecord/lib/active_record/collection_cache_key.rb +51 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +990 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb +67 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +491 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +140 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +216 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb +23 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb +145 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +654 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb +95 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +1378 -0
- data/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb +274 -0
- data/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +599 -0
- data/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +885 -0
- data/activerecord/lib/active_record/connection_adapters/column.rb +91 -0
- data/activerecord/lib/active_record/connection_adapters/connection_specification.rb +275 -0
- data/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb +24 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/column.rb +27 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb +97 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb +72 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb +44 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb +73 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb +92 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb +73 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb +139 -0
- data/activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb +35 -0
- data/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +125 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/column.rb +17 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb +163 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb +44 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +33 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb +82 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb +56 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb +15 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb +17 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb +50 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb +23 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb +15 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb +21 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb +71 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb +15 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb +15 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb +45 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb +41 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb +15 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb +65 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb +93 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb +18 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb +111 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb +23 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb +28 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb +30 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb +152 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb +51 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb +17 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb +195 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb +38 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +678 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb +39 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb +81 -0
- data/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +838 -0
- data/activerecord/lib/active_record/connection_adapters/schema_cache.rb +118 -0
- data/activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb +34 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb +21 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb +62 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb +17 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb +30 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb +18 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb +102 -0
- data/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +531 -0
- data/activerecord/lib/active_record/connection_adapters/statement_pool.rb +61 -0
- data/activerecord/lib/active_record/connection_handling.rb +145 -0
- data/activerecord/lib/active_record/core.rb +560 -0
- data/activerecord/lib/active_record/counter_cache.rb +214 -0
- data/activerecord/lib/active_record/define_callbacks.rb +22 -0
- data/activerecord/lib/active_record/dynamic_matchers.rb +122 -0
- data/activerecord/lib/active_record/enum.rb +241 -0
- data/activerecord/lib/active_record/errors.rb +342 -0
- data/activerecord/lib/active_record/explain.rb +50 -0
- data/activerecord/lib/active_record/explain_registry.rb +32 -0
- data/activerecord/lib/active_record/explain_subscriber.rb +34 -0
- data/activerecord/lib/active_record/fixture_set/file.rb +82 -0
- data/activerecord/lib/active_record/fixtures.rb +1074 -0
- data/activerecord/lib/active_record/gem_version.rb +17 -0
- data/activerecord/lib/active_record/inheritance.rb +254 -0
- data/activerecord/lib/active_record/integration.rb +155 -0
- data/activerecord/lib/active_record/internal_metadata.rb +45 -0
- data/activerecord/lib/active_record/legacy_yaml_adapter.rb +48 -0
- data/activerecord/lib/active_record/locale/en.yml +48 -0
- data/activerecord/lib/active_record/locking/optimistic.rb +212 -0
- data/activerecord/lib/active_record/locking/pessimistic.rb +88 -0
- data/activerecord/lib/active_record/log_subscriber.rb +96 -0
- data/activerecord/lib/active_record/migration.rb +1340 -0
- data/activerecord/lib/active_record/migration/command_recorder.rb +240 -0
- data/activerecord/lib/active_record/migration/compatibility.rb +170 -0
- data/activerecord/lib/active_record/migration/join_table.rb +17 -0
- data/activerecord/lib/active_record/model_schema.rb +515 -0
- data/activerecord/lib/active_record/nested_attributes.rb +589 -0
- data/activerecord/lib/active_record/no_touching.rb +58 -0
- data/activerecord/lib/active_record/null_relation.rb +68 -0
- data/activerecord/lib/active_record/persistence.rb +623 -0
- data/activerecord/lib/active_record/query_cache.rb +49 -0
- data/activerecord/lib/active_record/querying.rb +70 -0
- data/activerecord/lib/active_record/railtie.rb +214 -0
- data/activerecord/lib/active_record/railties/console_sandbox.rb +7 -0
- data/activerecord/lib/active_record/railties/controller_runtime.rb +56 -0
- data/activerecord/lib/active_record/railties/databases.rake +369 -0
- data/activerecord/lib/active_record/railties/jdbcmysql_error.rb +18 -0
- data/activerecord/lib/active_record/readonly_attributes.rb +24 -0
- data/activerecord/lib/active_record/reflection.rb +1102 -0
- data/activerecord/lib/active_record/relation.rb +730 -0
- data/activerecord/lib/active_record/relation/batches.rb +280 -0
- data/activerecord/lib/active_record/relation/batches/batch_enumerator.rb +69 -0
- data/activerecord/lib/active_record/relation/calculations.rb +407 -0
- data/activerecord/lib/active_record/relation/delegation.rb +113 -0
- data/activerecord/lib/active_record/relation/finder_methods.rb +566 -0
- data/activerecord/lib/active_record/relation/from_clause.rb +26 -0
- data/activerecord/lib/active_record/relation/merger.rb +168 -0
- data/activerecord/lib/active_record/relation/predicate_builder.rb +133 -0
- data/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb +48 -0
- data/activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb +46 -0
- data/activerecord/lib/active_record/relation/predicate_builder/base_handler.rb +19 -0
- data/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb +20 -0
- data/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb +54 -0
- data/activerecord/lib/active_record/relation/predicate_builder/range_handler.rb +41 -0
- data/activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb +15 -0
- data/activerecord/lib/active_record/relation/query_attribute.rb +26 -0
- data/activerecord/lib/active_record/relation/query_methods.rb +1194 -0
- data/activerecord/lib/active_record/relation/record_fetch_warning.rb +51 -0
- data/activerecord/lib/active_record/relation/spawn_methods.rb +77 -0
- data/activerecord/lib/active_record/relation/where_clause.rb +172 -0
- data/activerecord/lib/active_record/relation/where_clause_factory.rb +35 -0
- data/activerecord/lib/active_record/result.rb +149 -0
- data/activerecord/lib/active_record/runtime_registry.rb +24 -0
- data/activerecord/lib/active_record/sanitization.rb +216 -0
- data/activerecord/lib/active_record/schema.rb +70 -0
- data/activerecord/lib/active_record/schema_dumper.rb +254 -0
- data/activerecord/lib/active_record/schema_migration.rb +56 -0
- data/activerecord/lib/active_record/scoping.rb +106 -0
- data/activerecord/lib/active_record/scoping/default.rb +152 -0
- data/activerecord/lib/active_record/scoping/named.rb +199 -0
- data/activerecord/lib/active_record/secure_token.rb +40 -0
- data/activerecord/lib/active_record/serialization.rb +22 -0
- data/activerecord/lib/active_record/statement_cache.rb +121 -0
- data/activerecord/lib/active_record/store.rb +211 -0
- data/activerecord/lib/active_record/suppressor.rb +61 -0
- data/activerecord/lib/active_record/table_metadata.rb +75 -0
- data/activerecord/lib/active_record/tasks/database_tasks.rb +327 -0
- data/activerecord/lib/active_record/tasks/mysql_database_tasks.rb +162 -0
- data/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +143 -0
- data/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb +83 -0
- data/activerecord/lib/active_record/timestamp.rb +146 -0
- data/activerecord/lib/active_record/touch_later.rb +64 -0
- data/activerecord/lib/active_record/transactions.rb +499 -0
- data/activerecord/lib/active_record/translation.rb +24 -0
- data/activerecord/lib/active_record/type.rb +79 -0
- data/activerecord/lib/active_record/type/adapter_specific_registry.rb +136 -0
- data/activerecord/lib/active_record/type/date.rb +9 -0
- data/activerecord/lib/active_record/type/date_time.rb +9 -0
- data/activerecord/lib/active_record/type/decimal_without_scale.rb +15 -0
- data/activerecord/lib/active_record/type/hash_lookup_type_map.rb +25 -0
- data/activerecord/lib/active_record/type/internal/timezone.rb +17 -0
- data/activerecord/lib/active_record/type/json.rb +30 -0
- data/activerecord/lib/active_record/type/serialized.rb +67 -0
- data/activerecord/lib/active_record/type/text.rb +11 -0
- data/activerecord/lib/active_record/type/time.rb +21 -0
- data/activerecord/lib/active_record/type/type_map.rb +62 -0
- data/activerecord/lib/active_record/type/unsigned_integer.rb +17 -0
- data/activerecord/lib/active_record/type_caster.rb +9 -0
- data/activerecord/lib/active_record/type_caster/connection.rb +33 -0
- data/activerecord/lib/active_record/type_caster/map.rb +23 -0
- data/activerecord/lib/active_record/validations.rb +93 -0
- data/activerecord/lib/active_record/validations/absence.rb +25 -0
- data/activerecord/lib/active_record/validations/associated.rb +60 -0
- data/activerecord/lib/active_record/validations/length.rb +26 -0
- data/activerecord/lib/active_record/validations/presence.rb +68 -0
- data/activerecord/lib/active_record/validations/uniqueness.rb +240 -0
- data/activerecord/lib/active_record/version.rb +10 -0
- data/activerecord/lib/rails/generators/active_record.rb +19 -0
- data/activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb +27 -0
- data/activerecord/lib/rails/generators/active_record/application_record/templates/application_record.rb +5 -0
- data/activerecord/lib/rails/generators/active_record/migration.rb +35 -0
- data/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb +78 -0
- data/activerecord/lib/rails/generators/active_record/migration/templates/create_table_migration.rb +24 -0
- data/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb +46 -0
- data/activerecord/lib/rails/generators/active_record/model/model_generator.rb +48 -0
- data/activerecord/lib/rails/generators/active_record/model/templates/model.rb +13 -0
- data/activerecord/lib/rails/generators/active_record/model/templates/module.rb +7 -0
- data/activerecord/test/.gitignore +1 -0
- data/activerecord/test/active_record/connection_adapters/fake_adapter.rb +51 -0
- data/activerecord/test/assets/example.log +1 -0
- data/activerecord/test/assets/flowers.jpg +0 -0
- data/activerecord/test/assets/schema_dump_5_1.yml +345 -0
- data/activerecord/test/assets/test.txt +1 -0
- data/activerecord/test/cases/adapter_test.rb +404 -0
- data/activerecord/test/cases/adapters/mysql2/active_schema_test.rb +195 -0
- data/activerecord/test/cases/adapters/mysql2/bind_parameter_test.rb +52 -0
- data/activerecord/test/cases/adapters/mysql2/boolean_test.rb +102 -0
- data/activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb +65 -0
- data/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb +56 -0
- data/activerecord/test/cases/adapters/mysql2/connection_test.rb +225 -0
- data/activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb +54 -0
- data/activerecord/test/cases/adapters/mysql2/enum_test.rb +23 -0
- data/activerecord/test/cases/adapters/mysql2/explain_test.rb +23 -0
- data/activerecord/test/cases/adapters/mysql2/json_test.rb +24 -0
- data/activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rb +77 -0
- data/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb +65 -0
- data/activerecord/test/cases/adapters/mysql2/schema_test.rb +128 -0
- data/activerecord/test/cases/adapters/mysql2/sp_test.rb +38 -0
- data/activerecord/test/cases/adapters/mysql2/sql_types_test.rb +16 -0
- data/activerecord/test/cases/adapters/mysql2/table_options_test.rb +44 -0
- data/activerecord/test/cases/adapters/mysql2/transaction_test.rb +69 -0
- data/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb +68 -0
- data/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb +61 -0
- data/activerecord/test/cases/adapters/postgresql/active_schema_test.rb +100 -0
- data/activerecord/test/cases/adapters/postgresql/array_test.rb +388 -0
- data/activerecord/test/cases/adapters/postgresql/bit_string_test.rb +84 -0
- data/activerecord/test/cases/adapters/postgresql/bytea_test.rb +137 -0
- data/activerecord/test/cases/adapters/postgresql/case_insensitive_test.rb +28 -0
- data/activerecord/test/cases/adapters/postgresql/change_schema_test.rb +40 -0
- data/activerecord/test/cases/adapters/postgresql/cidr_test.rb +27 -0
- data/activerecord/test/cases/adapters/postgresql/citext_test.rb +80 -0
- data/activerecord/test/cases/adapters/postgresql/collation_test.rb +55 -0
- data/activerecord/test/cases/adapters/postgresql/composite_test.rb +134 -0
- data/activerecord/test/cases/adapters/postgresql/connection_test.rb +272 -0
- data/activerecord/test/cases/adapters/postgresql/datatype_test.rb +93 -0
- data/activerecord/test/cases/adapters/postgresql/domain_test.rb +49 -0
- data/activerecord/test/cases/adapters/postgresql/enum_test.rb +93 -0
- data/activerecord/test/cases/adapters/postgresql/explain_test.rb +22 -0
- data/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb +65 -0
- data/activerecord/test/cases/adapters/postgresql/full_text_test.rb +46 -0
- data/activerecord/test/cases/adapters/postgresql/geometric_test.rb +373 -0
- data/activerecord/test/cases/adapters/postgresql/hstore_test.rb +380 -0
- data/activerecord/test/cases/adapters/postgresql/infinity_test.rb +71 -0
- data/activerecord/test/cases/adapters/postgresql/integer_test.rb +27 -0
- data/activerecord/test/cases/adapters/postgresql/json_test.rb +52 -0
- data/activerecord/test/cases/adapters/postgresql/ltree_test.rb +55 -0
- data/activerecord/test/cases/adapters/postgresql/money_test.rb +98 -0
- data/activerecord/test/cases/adapters/postgresql/network_test.rb +96 -0
- data/activerecord/test/cases/adapters/postgresql/numbers_test.rb +51 -0
- data/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +390 -0
- data/activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rb +27 -0
- data/activerecord/test/cases/adapters/postgresql/quoting_test.rb +45 -0
- data/activerecord/test/cases/adapters/postgresql/range_test.rb +351 -0
- data/activerecord/test/cases/adapters/postgresql/referential_integrity_test.rb +113 -0
- data/activerecord/test/cases/adapters/postgresql/rename_table_test.rb +36 -0
- data/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb +110 -0
- data/activerecord/test/cases/adapters/postgresql/schema_test.rb +592 -0
- data/activerecord/test/cases/adapters/postgresql/serial_test.rb +88 -0
- data/activerecord/test/cases/adapters/postgresql/statement_pool_test.rb +43 -0
- data/activerecord/test/cases/adapters/postgresql/timestamp_test.rb +92 -0
- data/activerecord/test/cases/adapters/postgresql/transaction_test.rb +104 -0
- data/activerecord/test/cases/adapters/postgresql/type_lookup_test.rb +35 -0
- data/activerecord/test/cases/adapters/postgresql/utils_test.rb +64 -0
- data/activerecord/test/cases/adapters/postgresql/uuid_test.rb +376 -0
- data/activerecord/test/cases/adapters/postgresql/xml_test.rb +56 -0
- data/activerecord/test/cases/adapters/sqlite3/collation_test.rb +55 -0
- data/activerecord/test/cases/adapters/sqlite3/copy_table_test.rb +101 -0
- data/activerecord/test/cases/adapters/sqlite3/explain_test.rb +23 -0
- data/activerecord/test/cases/adapters/sqlite3/quoting_test.rb +58 -0
- data/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +421 -0
- data/activerecord/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb +26 -0
- data/activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb +21 -0
- data/activerecord/test/cases/aggregations_test.rb +170 -0
- data/activerecord/test/cases/ar_schema_test.rb +145 -0
- data/activerecord/test/cases/associations/belongs_to_associations_test.rb +1196 -0
- data/activerecord/test/cases/associations/bidirectional_destroy_dependencies_test.rb +43 -0
- data/activerecord/test/cases/associations/callbacks_test.rb +191 -0
- data/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +184 -0
- data/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +44 -0
- data/activerecord/test/cases/associations/eager_load_nested_include_test.rb +126 -0
- data/activerecord/test/cases/associations/eager_singularization_test.rb +148 -0
- data/activerecord/test/cases/associations/eager_test.rb +1500 -0
- data/activerecord/test/cases/associations/extension_test.rb +94 -0
- data/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +1033 -0
- data/activerecord/test/cases/associations/has_many_associations_test.rb +2619 -0
- data/activerecord/test/cases/associations/has_many_through_associations_test.rb +1309 -0
- data/activerecord/test/cases/associations/has_one_associations_test.rb +727 -0
- data/activerecord/test/cases/associations/has_one_through_associations_test.rb +392 -0
- data/activerecord/test/cases/associations/inner_join_association_test.rb +141 -0
- data/activerecord/test/cases/associations/inverse_associations_test.rb +727 -0
- data/activerecord/test/cases/associations/join_model_test.rb +778 -0
- data/activerecord/test/cases/associations/left_outer_join_association_test.rb +90 -0
- data/activerecord/test/cases/associations/nested_through_associations_test.rb +581 -0
- data/activerecord/test/cases/associations/required_test.rb +132 -0
- data/activerecord/test/cases/associations_test.rb +370 -0
- data/activerecord/test/cases/attribute_decorators_test.rb +127 -0
- data/activerecord/test/cases/attribute_methods/read_test.rb +61 -0
- data/activerecord/test/cases/attribute_methods_test.rb +1038 -0
- data/activerecord/test/cases/attribute_set_test.rb +255 -0
- data/activerecord/test/cases/attribute_test.rb +255 -0
- data/activerecord/test/cases/attributes_test.rb +269 -0
- data/activerecord/test/cases/autosave_association_test.rb +1738 -0
- data/activerecord/test/cases/base_test.rb +1460 -0
- data/activerecord/test/cases/batches_test.rb +676 -0
- data/activerecord/test/cases/binary_test.rb +46 -0
- data/activerecord/test/cases/bind_parameter_test.rb +108 -0
- data/activerecord/test/cases/cache_key_test.rb +53 -0
- data/activerecord/test/cases/calculations_test.rb +894 -0
- data/activerecord/test/cases/callbacks_test.rb +479 -0
- data/activerecord/test/cases/clone_test.rb +42 -0
- data/activerecord/test/cases/coders/json_test.rb +17 -0
- data/activerecord/test/cases/coders/yaml_column_test.rb +66 -0
- data/activerecord/test/cases/collection_cache_key_test.rb +117 -0
- data/activerecord/test/cases/column_alias_test.rb +19 -0
- data/activerecord/test/cases/column_definition_test.rb +34 -0
- data/activerecord/test/cases/comment_test.rb +146 -0
- data/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb +58 -0
- data/activerecord/test/cases/connection_adapters/connection_handler_test.rb +232 -0
- data/activerecord/test/cases/connection_adapters/connection_specification_test.rb +14 -0
- data/activerecord/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb +257 -0
- data/activerecord/test/cases/connection_adapters/mysql_type_lookup_test.rb +78 -0
- data/activerecord/test/cases/connection_adapters/schema_cache_test.rb +101 -0
- data/activerecord/test/cases/connection_adapters/type_lookup_test.rb +120 -0
- data/activerecord/test/cases/connection_management_test.rb +114 -0
- data/activerecord/test/cases/connection_pool_test.rb +569 -0
- data/activerecord/test/cases/connection_specification/resolver_test.rb +137 -0
- data/activerecord/test/cases/core_test.rb +114 -0
- data/activerecord/test/cases/counter_cache_test.rb +367 -0
- data/activerecord/test/cases/custom_locking_test.rb +19 -0
- data/activerecord/test/cases/database_statements_test.rb +37 -0
- data/activerecord/test/cases/date_test.rb +46 -0
- data/activerecord/test/cases/date_time_precision_test.rb +89 -0
- data/activerecord/test/cases/date_time_test.rb +76 -0
- data/activerecord/test/cases/defaults_test.rb +209 -0
- data/activerecord/test/cases/dirty_test.rb +871 -0
- data/activerecord/test/cases/disconnected_test.rb +32 -0
- data/activerecord/test/cases/dup_test.rb +161 -0
- data/activerecord/test/cases/enum_test.rb +493 -0
- data/activerecord/test/cases/errors_test.rb +18 -0
- data/activerecord/test/cases/explain_subscriber_test.rb +66 -0
- data/activerecord/test/cases/explain_test.rb +89 -0
- data/activerecord/test/cases/finder_respond_to_test.rb +61 -0
- data/activerecord/test/cases/finder_test.rb +1282 -0
- data/activerecord/test/cases/fixture_set/file_test.rb +158 -0
- data/activerecord/test/cases/fixtures_test.rb +1096 -0
- data/activerecord/test/cases/forbidden_attributes_protection_test.rb +166 -0
- data/activerecord/test/cases/habtm_destroy_order_test.rb +63 -0
- data/activerecord/test/cases/helper.rb +187 -0
- data/activerecord/test/cases/hot_compatibility_test.rb +144 -0
- data/activerecord/test/cases/i18n_test.rb +46 -0
- data/activerecord/test/cases/inheritance_test.rb +613 -0
- data/activerecord/test/cases/integration_test.rb +234 -0
- data/activerecord/test/cases/invalid_connection_test.rb +26 -0
- data/activerecord/test/cases/invertible_migration_test.rb +380 -0
- data/activerecord/test/cases/json_attribute_test.rb +35 -0
- data/activerecord/test/cases/json_serialization_test.rb +311 -0
- data/activerecord/test/cases/json_shared_test_cases.rb +256 -0
- data/activerecord/test/cases/locking_test.rb +651 -0
- data/activerecord/test/cases/log_subscriber_test.rb +219 -0
- data/activerecord/test/cases/migration/change_schema_test.rb +468 -0
- data/activerecord/test/cases/migration/change_table_test.rb +258 -0
- data/activerecord/test/cases/migration/column_attributes_test.rb +188 -0
- data/activerecord/test/cases/migration/column_positioning_test.rb +58 -0
- data/activerecord/test/cases/migration/columns_test.rb +319 -0
- data/activerecord/test/cases/migration/command_recorder_test.rb +347 -0
- data/activerecord/test/cases/migration/compatibility_test.rb +238 -0
- data/activerecord/test/cases/migration/create_join_table_test.rb +168 -0
- data/activerecord/test/cases/migration/foreign_key_test.rb +339 -0
- data/activerecord/test/cases/migration/helper.rb +41 -0
- data/activerecord/test/cases/migration/index_test.rb +218 -0
- data/activerecord/test/cases/migration/logger_test.rb +38 -0
- data/activerecord/test/cases/migration/pending_migrations_test.rb +42 -0
- data/activerecord/test/cases/migration/references_foreign_key_test.rb +257 -0
- data/activerecord/test/cases/migration/references_index_test.rb +103 -0
- data/activerecord/test/cases/migration/references_statements_test.rb +138 -0
- data/activerecord/test/cases/migration/rename_table_test.rb +118 -0
- data/activerecord/test/cases/migration_test.rb +1122 -0
- data/activerecord/test/cases/migrator_test.rb +473 -0
- data/activerecord/test/cases/mixin_test.rb +64 -0
- data/activerecord/test/cases/modules_test.rb +174 -0
- data/activerecord/test/cases/multiparameter_attributes_test.rb +399 -0
- data/activerecord/test/cases/multiple_db_test.rb +119 -0
- data/activerecord/test/cases/nested_attributes_test.rb +1097 -0
- data/activerecord/test/cases/nested_attributes_with_callbacks_test.rb +146 -0
- data/activerecord/test/cases/null_relation_test.rb +84 -0
- data/activerecord/test/cases/numeric_data_test.rb +73 -0
- data/activerecord/test/cases/persistence_test.rb +1063 -0
- data/activerecord/test/cases/pooled_connections_test.rb +83 -0
- data/activerecord/test/cases/primary_keys_test.rb +466 -0
- data/activerecord/test/cases/query_cache_test.rb +577 -0
- data/activerecord/test/cases/quoting_test.rb +275 -0
- data/activerecord/test/cases/readonly_test.rb +120 -0
- data/activerecord/test/cases/reaper_test.rb +87 -0
- data/activerecord/test/cases/reflection_test.rb +533 -0
- data/activerecord/test/cases/relation/delegation_test.rb +57 -0
- data/activerecord/test/cases/relation/merging_test.rb +157 -0
- data/activerecord/test/cases/relation/mutation_test.rb +145 -0
- data/activerecord/test/cases/relation/or_test.rb +130 -0
- data/activerecord/test/cases/relation/predicate_builder_test.rb +18 -0
- data/activerecord/test/cases/relation/record_fetch_warning_test.rb +42 -0
- data/activerecord/test/cases/relation/where_chain_test.rb +107 -0
- data/activerecord/test/cases/relation/where_clause_test.rb +241 -0
- data/activerecord/test/cases/relation/where_test.rb +366 -0
- data/activerecord/test/cases/relation_test.rb +331 -0
- data/activerecord/test/cases/relations_test.rb +1923 -0
- data/activerecord/test/cases/reload_models_test.rb +26 -0
- data/activerecord/test/cases/reserved_word_test.rb +134 -0
- data/activerecord/test/cases/result_test.rb +90 -0
- data/activerecord/test/cases/sanitize_test.rb +182 -0
- data/activerecord/test/cases/schema_dumper_test.rb +507 -0
- data/activerecord/test/cases/schema_loading_test.rb +54 -0
- data/activerecord/test/cases/scoping/default_scoping_test.rb +547 -0
- data/activerecord/test/cases/scoping/named_scoping_test.rb +577 -0
- data/activerecord/test/cases/scoping/relation_scoping_test.rb +402 -0
- data/activerecord/test/cases/secure_token_test.rb +34 -0
- data/activerecord/test/cases/serialization_test.rb +106 -0
- data/activerecord/test/cases/serialized_attribute_test.rb +382 -0
- data/activerecord/test/cases/statement_cache_test.rb +137 -0
- data/activerecord/test/cases/store_test.rb +197 -0
- data/activerecord/test/cases/suppressor_test.rb +77 -0
- data/activerecord/test/cases/tasks/database_tasks_test.rb +491 -0
- data/activerecord/test/cases/tasks/mysql_rake_test.rb +388 -0
- data/activerecord/test/cases/tasks/postgresql_rake_test.rb +374 -0
- data/activerecord/test/cases/tasks/sqlite_rake_test.rb +267 -0
- data/activerecord/test/cases/test_case.rb +138 -0
- data/activerecord/test/cases/test_fixtures_test.rb +20 -0
- data/activerecord/test/cases/time_precision_test.rb +85 -0
- data/activerecord/test/cases/timestamp_test.rb +478 -0
- data/activerecord/test/cases/touch_later_test.rb +123 -0
- data/activerecord/test/cases/transaction_callbacks_test.rb +595 -0
- data/activerecord/test/cases/transaction_isolation_test.rb +108 -0
- data/activerecord/test/cases/transactions_test.rb +1030 -0
- data/activerecord/test/cases/type/adapter_specific_registry_test.rb +135 -0
- data/activerecord/test/cases/type/date_time_test.rb +16 -0
- data/activerecord/test/cases/type/integer_test.rb +29 -0
- data/activerecord/test/cases/type/string_test.rb +24 -0
- data/activerecord/test/cases/type/type_map_test.rb +178 -0
- data/activerecord/test/cases/type/unsigned_integer_test.rb +19 -0
- data/activerecord/test/cases/type_test.rb +41 -0
- data/activerecord/test/cases/types_test.rb +26 -0
- data/activerecord/test/cases/unconnected_test.rb +35 -0
- data/activerecord/test/cases/validations/absence_validation_test.rb +75 -0
- data/activerecord/test/cases/validations/association_validation_test.rb +99 -0
- data/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb +86 -0
- data/activerecord/test/cases/validations/i18n_validation_test.rb +85 -0
- data/activerecord/test/cases/validations/length_validation_test.rb +80 -0
- data/activerecord/test/cases/validations/presence_validation_test.rb +105 -0
- data/activerecord/test/cases/validations/uniqueness_validation_test.rb +557 -0
- data/activerecord/test/cases/validations_repair_helper.rb +21 -0
- data/activerecord/test/cases/validations_test.rb +196 -0
- data/activerecord/test/cases/view_test.rb +224 -0
- data/activerecord/test/cases/yaml_serialization_test.rb +141 -0
- data/activerecord/test/config.example.yml +100 -0
- data/activerecord/test/config.rb +7 -0
- data/activerecord/test/fixtures/.gitignore +1 -0
- data/activerecord/test/fixtures/accounts.yml +29 -0
- data/activerecord/test/fixtures/admin/accounts.yml +2 -0
- data/activerecord/test/fixtures/admin/randomly_named_a9.yml +7 -0
- data/activerecord/test/fixtures/admin/randomly_named_b0.yml +7 -0
- data/activerecord/test/fixtures/admin/users.yml +10 -0
- data/activerecord/test/fixtures/all/admin +1 -0
- data/activerecord/test/fixtures/all/developers.yml +0 -0
- data/activerecord/test/fixtures/all/namespaced/accounts.yml +2 -0
- data/activerecord/test/fixtures/all/people.yml +0 -0
- data/activerecord/test/fixtures/all/tasks.yml +0 -0
- data/activerecord/test/fixtures/author_addresses.yml +11 -0
- data/activerecord/test/fixtures/author_favorites.yml +4 -0
- data/activerecord/test/fixtures/authors.yml +17 -0
- data/activerecord/test/fixtures/bad_posts.yml +9 -0
- data/activerecord/test/fixtures/binaries.yml +137 -0
- data/activerecord/test/fixtures/books.yml +33 -0
- data/activerecord/test/fixtures/bulbs.yml +5 -0
- data/activerecord/test/fixtures/cars.yml +9 -0
- data/activerecord/test/fixtures/categories.yml +19 -0
- data/activerecord/test/fixtures/categories/special_categories.yml +9 -0
- data/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
- data/activerecord/test/fixtures/categories_ordered.yml +7 -0
- data/activerecord/test/fixtures/categories_posts.yml +31 -0
- data/activerecord/test/fixtures/categorizations.yml +23 -0
- data/activerecord/test/fixtures/clubs.yml +8 -0
- data/activerecord/test/fixtures/collections.yml +3 -0
- data/activerecord/test/fixtures/colleges.yml +3 -0
- data/activerecord/test/fixtures/comments.yml +65 -0
- data/activerecord/test/fixtures/companies.yml +67 -0
- data/activerecord/test/fixtures/computers.yml +10 -0
- data/activerecord/test/fixtures/content.yml +3 -0
- data/activerecord/test/fixtures/content_positions.yml +3 -0
- data/activerecord/test/fixtures/courses.yml +8 -0
- data/activerecord/test/fixtures/customers.yml +26 -0
- data/activerecord/test/fixtures/dashboards.yml +6 -0
- data/activerecord/test/fixtures/dead_parrots.yml +5 -0
- data/activerecord/test/fixtures/developers.yml +22 -0
- data/activerecord/test/fixtures/developers_projects.yml +17 -0
- data/activerecord/test/fixtures/dog_lovers.yml +7 -0
- data/activerecord/test/fixtures/dogs.yml +4 -0
- data/activerecord/test/fixtures/doubloons.yml +3 -0
- data/activerecord/test/fixtures/edges.yml +5 -0
- data/activerecord/test/fixtures/entrants.yml +14 -0
- data/activerecord/test/fixtures/essays.yml +6 -0
- data/activerecord/test/fixtures/faces.yml +11 -0
- data/activerecord/test/fixtures/fk_test_has_fk.yml +3 -0
- data/activerecord/test/fixtures/fk_test_has_pk.yml +2 -0
- data/activerecord/test/fixtures/friendships.yml +4 -0
- data/activerecord/test/fixtures/funny_jokes.yml +10 -0
- data/activerecord/test/fixtures/interests.yml +33 -0
- data/activerecord/test/fixtures/items.yml +3 -0
- data/activerecord/test/fixtures/jobs.yml +7 -0
- data/activerecord/test/fixtures/legacy_things.yml +3 -0
- data/activerecord/test/fixtures/live_parrots.yml +4 -0
- data/activerecord/test/fixtures/mateys.yml +4 -0
- data/activerecord/test/fixtures/member_details.yml +8 -0
- data/activerecord/test/fixtures/member_types.yml +6 -0
- data/activerecord/test/fixtures/members.yml +11 -0
- data/activerecord/test/fixtures/memberships.yml +34 -0
- data/activerecord/test/fixtures/men.yml +5 -0
- data/activerecord/test/fixtures/minimalistics.yml +2 -0
- data/activerecord/test/fixtures/minivans.yml +5 -0
- data/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
- data/activerecord/test/fixtures/mixins.yml +29 -0
- data/activerecord/test/fixtures/movies.yml +7 -0
- data/activerecord/test/fixtures/naked/yml/accounts.yml +1 -0
- data/activerecord/test/fixtures/naked/yml/companies.yml +1 -0
- data/activerecord/test/fixtures/naked/yml/courses.yml +1 -0
- data/activerecord/test/fixtures/naked/yml/courses_with_invalid_key.yml +3 -0
- data/activerecord/test/fixtures/naked/yml/parrots.yml +3 -0
- data/activerecord/test/fixtures/naked/yml/trees.yml +3 -0
- data/activerecord/test/fixtures/nodes.yml +29 -0
- data/activerecord/test/fixtures/organizations.yml +5 -0
- data/activerecord/test/fixtures/other_comments.yml +6 -0
- data/activerecord/test/fixtures/other_dogs.yml +2 -0
- data/activerecord/test/fixtures/other_posts.yml +7 -0
- data/activerecord/test/fixtures/other_topics.yml +42 -0
- data/activerecord/test/fixtures/owners.yml +9 -0
- data/activerecord/test/fixtures/parrots.yml +27 -0
- data/activerecord/test/fixtures/parrots_pirates.yml +7 -0
- data/activerecord/test/fixtures/people.yml +24 -0
- data/activerecord/test/fixtures/peoples_treasures.yml +3 -0
- data/activerecord/test/fixtures/pets.yml +19 -0
- data/activerecord/test/fixtures/pirates.yml +15 -0
- data/activerecord/test/fixtures/posts.yml +80 -0
- data/activerecord/test/fixtures/price_estimates.yml +16 -0
- data/activerecord/test/fixtures/products.yml +4 -0
- data/activerecord/test/fixtures/projects.yml +7 -0
- data/activerecord/test/fixtures/randomly_named_a9.yml +7 -0
- data/activerecord/test/fixtures/ratings.yml +14 -0
- data/activerecord/test/fixtures/readers.yml +11 -0
- data/activerecord/test/fixtures/references.yml +17 -0
- data/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
- data/activerecord/test/fixtures/reserved_words/distinct_select.yml +11 -0
- data/activerecord/test/fixtures/reserved_words/group.yml +14 -0
- data/activerecord/test/fixtures/reserved_words/select.yml +8 -0
- data/activerecord/test/fixtures/reserved_words/values.yml +7 -0
- data/activerecord/test/fixtures/ships.yml +6 -0
- data/activerecord/test/fixtures/speedometers.yml +8 -0
- data/activerecord/test/fixtures/sponsors.yml +12 -0
- data/activerecord/test/fixtures/string_key_objects.yml +7 -0
- data/activerecord/test/fixtures/subscribers.yml +11 -0
- data/activerecord/test/fixtures/subscriptions.yml +12 -0
- data/activerecord/test/fixtures/taggings.yml +78 -0
- data/activerecord/test/fixtures/tags.yml +11 -0
- data/activerecord/test/fixtures/tasks.yml +7 -0
- data/activerecord/test/fixtures/teapots.yml +3 -0
- data/activerecord/test/fixtures/to_be_linked/accounts.yml +2 -0
- data/activerecord/test/fixtures/to_be_linked/users.yml +10 -0
- data/activerecord/test/fixtures/topics.yml +49 -0
- data/activerecord/test/fixtures/toys.yml +14 -0
- data/activerecord/test/fixtures/traffic_lights.yml +10 -0
- data/activerecord/test/fixtures/treasures.yml +10 -0
- data/activerecord/test/fixtures/trees.yml +3 -0
- data/activerecord/test/fixtures/uuid_children.yml +3 -0
- data/activerecord/test/fixtures/uuid_parents.yml +2 -0
- data/activerecord/test/fixtures/variants.yml +4 -0
- data/activerecord/test/fixtures/vegetables.yml +20 -0
- data/activerecord/test/fixtures/vertices.yml +4 -0
- data/activerecord/test/fixtures/warehouse-things.yml +3 -0
- data/activerecord/test/fixtures/zines.yml +5 -0
- data/activerecord/test/migrations/10_urban/9_add_expressions.rb +13 -0
- data/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +17 -0
- data/activerecord/test/migrations/empty/.gitkeep +0 -0
- data/activerecord/test/migrations/magic/1_currencies_have_symbols.rb +13 -0
- data/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +11 -0
- data/activerecord/test/migrations/missing/1_people_have_last_names.rb +11 -0
- data/activerecord/test/migrations/missing/3_we_need_reminders.rb +14 -0
- data/activerecord/test/migrations/missing/4_innocent_jointable.rb +14 -0
- data/activerecord/test/migrations/rename/1_we_need_things.rb +13 -0
- data/activerecord/test/migrations/rename/2_rename_things.rb +11 -0
- data/activerecord/test/migrations/to_copy/1_people_have_hobbies.rb +11 -0
- data/activerecord/test/migrations/to_copy/2_people_have_descriptions.rb +11 -0
- data/activerecord/test/migrations/to_copy2/1_create_articles.rb +9 -0
- data/activerecord/test/migrations/to_copy2/2_create_comments.rb +9 -0
- data/activerecord/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb +11 -0
- data/activerecord/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb +11 -0
- data/activerecord/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb +11 -0
- data/activerecord/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb +9 -0
- data/activerecord/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb +9 -0
- data/activerecord/test/migrations/valid/1_valid_people_have_last_names.rb +11 -0
- data/activerecord/test/migrations/valid/2_we_need_reminders.rb +14 -0
- data/activerecord/test/migrations/valid/3_innocent_jointable.rb +14 -0
- data/activerecord/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb +11 -0
- data/activerecord/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb +14 -0
- data/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb +14 -0
- data/activerecord/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb +11 -0
- data/activerecord/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb +14 -0
- data/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb +14 -0
- data/activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb +10 -0
- data/activerecord/test/models/account.rb +34 -0
- data/activerecord/test/models/admin.rb +7 -0
- data/activerecord/test/models/admin/account.rb +5 -0
- data/activerecord/test/models/admin/randomly_named_c1.rb +9 -0
- data/activerecord/test/models/admin/user.rb +42 -0
- data/activerecord/test/models/aircraft.rb +7 -0
- data/activerecord/test/models/arunit2_model.rb +5 -0
- data/activerecord/test/models/author.rb +211 -0
- data/activerecord/test/models/auto_id.rb +6 -0
- data/activerecord/test/models/autoloadable/extra_firm.rb +4 -0
- data/activerecord/test/models/binary.rb +4 -0
- data/activerecord/test/models/bird.rb +14 -0
- data/activerecord/test/models/book.rb +26 -0
- data/activerecord/test/models/boolean.rb +7 -0
- data/activerecord/test/models/bulb.rb +54 -0
- data/activerecord/test/models/cake_designer.rb +5 -0
- data/activerecord/test/models/car.rb +31 -0
- data/activerecord/test/models/carrier.rb +4 -0
- data/activerecord/test/models/cat.rb +12 -0
- data/activerecord/test/models/categorization.rb +21 -0
- data/activerecord/test/models/category.rb +46 -0
- data/activerecord/test/models/chef.rb +10 -0
- data/activerecord/test/models/citation.rb +5 -0
- data/activerecord/test/models/club.rb +27 -0
- data/activerecord/test/models/college.rb +12 -0
- data/activerecord/test/models/column.rb +5 -0
- data/activerecord/test/models/column_name.rb +5 -0
- data/activerecord/test/models/comment.rb +88 -0
- data/activerecord/test/models/company.rb +190 -0
- data/activerecord/test/models/company_in_module.rb +100 -0
- data/activerecord/test/models/computer.rb +5 -0
- data/activerecord/test/models/contact.rb +43 -0
- data/activerecord/test/models/content.rb +42 -0
- data/activerecord/test/models/contract.rb +22 -0
- data/activerecord/test/models/country.rb +7 -0
- data/activerecord/test/models/course.rb +8 -0
- data/activerecord/test/models/customer.rb +85 -0
- data/activerecord/test/models/customer_carrier.rb +16 -0
- data/activerecord/test/models/dashboard.rb +5 -0
- data/activerecord/test/models/default.rb +4 -0
- data/activerecord/test/models/department.rb +6 -0
- data/activerecord/test/models/developer.rb +270 -0
- data/activerecord/test/models/dog.rb +7 -0
- data/activerecord/test/models/dog_lover.rb +7 -0
- data/activerecord/test/models/doubloon.rb +14 -0
- data/activerecord/test/models/drink_designer.rb +5 -0
- data/activerecord/test/models/edge.rb +7 -0
- data/activerecord/test/models/electron.rb +7 -0
- data/activerecord/test/models/engine.rb +5 -0
- data/activerecord/test/models/entrant.rb +5 -0
- data/activerecord/test/models/essay.rb +8 -0
- data/activerecord/test/models/event.rb +5 -0
- data/activerecord/test/models/eye.rb +39 -0
- data/activerecord/test/models/face.rb +11 -0
- data/activerecord/test/models/family.rb +6 -0
- data/activerecord/test/models/family_tree.rb +6 -0
- data/activerecord/test/models/friendship.rb +8 -0
- data/activerecord/test/models/guid.rb +4 -0
- data/activerecord/test/models/guitar.rb +6 -0
- data/activerecord/test/models/hotel.rb +13 -0
- data/activerecord/test/models/image.rb +5 -0
- data/activerecord/test/models/interest.rb +7 -0
- data/activerecord/test/models/invoice.rb +6 -0
- data/activerecord/test/models/item.rb +9 -0
- data/activerecord/test/models/job.rb +9 -0
- data/activerecord/test/models/joke.rb +9 -0
- data/activerecord/test/models/keyboard.rb +5 -0
- data/activerecord/test/models/legacy_thing.rb +5 -0
- data/activerecord/test/models/lesson.rb +13 -0
- data/activerecord/test/models/line_item.rb +5 -0
- data/activerecord/test/models/liquid.rb +6 -0
- data/activerecord/test/models/man.rb +13 -0
- data/activerecord/test/models/matey.rb +6 -0
- data/activerecord/test/models/member.rb +44 -0
- data/activerecord/test/models/member_detail.rb +10 -0
- data/activerecord/test/models/member_type.rb +5 -0
- data/activerecord/test/models/membership.rb +38 -0
- data/activerecord/test/models/mentor.rb +5 -0
- data/activerecord/test/models/minimalistic.rb +4 -0
- data/activerecord/test/models/minivan.rb +10 -0
- data/activerecord/test/models/mixed_case_monkey.rb +5 -0
- data/activerecord/test/models/mocktail_designer.rb +4 -0
- data/activerecord/test/models/molecule.rb +8 -0
- data/activerecord/test/models/movie.rb +7 -0
- data/activerecord/test/models/node.rb +7 -0
- data/activerecord/test/models/non_primary_key.rb +4 -0
- data/activerecord/test/models/notification.rb +5 -0
- data/activerecord/test/models/numeric_data.rb +10 -0
- data/activerecord/test/models/order.rb +6 -0
- data/activerecord/test/models/organization.rb +16 -0
- data/activerecord/test/models/other_dog.rb +7 -0
- data/activerecord/test/models/owner.rb +39 -0
- data/activerecord/test/models/parrot.rb +30 -0
- data/activerecord/test/models/person.rb +143 -0
- data/activerecord/test/models/personal_legacy_thing.rb +6 -0
- data/activerecord/test/models/pet.rb +20 -0
- data/activerecord/test/models/pet_treasure.rb +8 -0
- data/activerecord/test/models/pirate.rb +94 -0
- data/activerecord/test/models/possession.rb +5 -0
- data/activerecord/test/models/post.rb +322 -0
- data/activerecord/test/models/price_estimate.rb +6 -0
- data/activerecord/test/models/professor.rb +7 -0
- data/activerecord/test/models/project.rb +42 -0
- data/activerecord/test/models/publisher.rb +4 -0
- data/activerecord/test/models/publisher/article.rb +6 -0
- data/activerecord/test/models/publisher/magazine.rb +5 -0
- data/activerecord/test/models/randomly_named_c1.rb +5 -0
- data/activerecord/test/models/rating.rb +6 -0
- data/activerecord/test/models/reader.rb +25 -0
- data/activerecord/test/models/recipe.rb +5 -0
- data/activerecord/test/models/record.rb +4 -0
- data/activerecord/test/models/reference.rb +24 -0
- data/activerecord/test/models/reply.rb +63 -0
- data/activerecord/test/models/ship.rb +41 -0
- data/activerecord/test/models/ship_part.rb +10 -0
- data/activerecord/test/models/shop.rb +19 -0
- data/activerecord/test/models/shop_account.rb +8 -0
- data/activerecord/test/models/speedometer.rb +8 -0
- data/activerecord/test/models/sponsor.rb +9 -0
- data/activerecord/test/models/string_key_object.rb +5 -0
- data/activerecord/test/models/student.rb +6 -0
- data/activerecord/test/models/subscriber.rb +10 -0
- data/activerecord/test/models/subscription.rb +6 -0
- data/activerecord/test/models/tag.rb +15 -0
- data/activerecord/test/models/tagging.rb +15 -0
- data/activerecord/test/models/task.rb +7 -0
- data/activerecord/test/models/topic.rb +120 -0
- data/activerecord/test/models/toy.rb +8 -0
- data/activerecord/test/models/traffic_light.rb +6 -0
- data/activerecord/test/models/treasure.rb +16 -0
- data/activerecord/test/models/treaty.rb +7 -0
- data/activerecord/test/models/tree.rb +5 -0
- data/activerecord/test/models/tuning_peg.rb +6 -0
- data/activerecord/test/models/tyre.rb +13 -0
- data/activerecord/test/models/user.rb +20 -0
- data/activerecord/test/models/uuid_child.rb +5 -0
- data/activerecord/test/models/uuid_item.rb +8 -0
- data/activerecord/test/models/uuid_parent.rb +5 -0
- data/activerecord/test/models/vegetables.rb +25 -0
- data/activerecord/test/models/vehicle.rb +9 -0
- data/activerecord/test/models/vertex.rb +11 -0
- data/activerecord/test/models/warehouse_thing.rb +7 -0
- data/activerecord/test/models/wheel.rb +5 -0
- data/activerecord/test/models/without_table.rb +5 -0
- data/activerecord/test/models/zine.rb +5 -0
- data/activerecord/test/schema/mysql2_specific_schema.rb +75 -0
- data/activerecord/test/schema/oracle_specific_schema.rb +42 -0
- data/activerecord/test/schema/postgresql_specific_schema.rb +112 -0
- data/activerecord/test/schema/schema.rb +1081 -0
- data/activerecord/test/support/config.rb +46 -0
- data/activerecord/test/support/connection.rb +28 -0
- data/activerecord/test/support/connection_helper.rb +16 -0
- data/activerecord/test/support/ddl_helper.rb +10 -0
- data/activerecord/test/support/schema_dumping_helper.rb +22 -0
- data/activerecord/test/support/yaml_compatibility_fixtures/rails_4_1.yml +22 -0
- data/activerecord/test/support/yaml_compatibility_fixtures/rails_4_2_0.yml +182 -0
- data/activestorage/.babelrc +5 -0
- data/activestorage/.eslintrc +19 -0
- data/activestorage/.gitignore +6 -0
- data/activestorage/CHANGELOG.md +3 -0
- data/activestorage/MIT-LICENSE +20 -0
- data/activestorage/README.md +141 -0
- data/activestorage/Rakefile +14 -0
- data/activestorage/activestorage.gemspec +30 -0
- data/activestorage/app/assets/javascripts/activestorage.js +1 -0
- data/activestorage/app/controllers/active_storage/blobs_controller.rb +25 -0
- data/activestorage/app/controllers/active_storage/direct_uploads_controller.rb +23 -0
- data/activestorage/app/controllers/active_storage/disk_controller.rb +53 -0
- data/activestorage/app/controllers/active_storage/variants_controller.rb +29 -0
- data/activestorage/app/javascript/activestorage/blob_record.js +54 -0
- data/activestorage/app/javascript/activestorage/blob_upload.js +34 -0
- data/activestorage/app/javascript/activestorage/direct_upload.js +42 -0
- data/activestorage/app/javascript/activestorage/direct_upload_controller.js +67 -0
- data/activestorage/app/javascript/activestorage/direct_uploads_controller.js +50 -0
- data/activestorage/app/javascript/activestorage/file_checksum.js +53 -0
- data/activestorage/app/javascript/activestorage/helpers.js +42 -0
- data/activestorage/app/javascript/activestorage/index.js +11 -0
- data/activestorage/app/javascript/activestorage/ujs.js +74 -0
- data/activestorage/app/jobs/active_storage/purge_job.rb +11 -0
- data/activestorage/app/models/active_storage/attachment.rb +28 -0
- data/activestorage/app/models/active_storage/blob.rb +199 -0
- data/activestorage/app/models/active_storage/filename.rb +65 -0
- data/activestorage/app/models/active_storage/filename/parameters.rb +36 -0
- data/activestorage/app/models/active_storage/variant.rb +82 -0
- data/activestorage/app/models/active_storage/variation.rb +55 -0
- data/activestorage/bin/test +5 -0
- data/activestorage/config/routes.rb +30 -0
- data/activestorage/db/migrate/20170806125915_create_active_storage_tables.rb +25 -0
- data/activestorage/lib/active_storage.rb +38 -0
- data/activestorage/lib/active_storage/attached.rb +40 -0
- data/activestorage/lib/active_storage/attached/macros.rb +82 -0
- data/activestorage/lib/active_storage/attached/many.rb +55 -0
- data/activestorage/lib/active_storage/attached/one.rb +76 -0
- data/activestorage/lib/active_storage/engine.rb +65 -0
- data/activestorage/lib/active_storage/gem_version.rb +17 -0
- data/activestorage/lib/active_storage/log_subscriber.rb +52 -0
- data/activestorage/lib/active_storage/service.rb +117 -0
- data/activestorage/lib/active_storage/service/azure_storage_service.rb +124 -0
- data/activestorage/lib/active_storage/service/configurator.rb +32 -0
- data/activestorage/lib/active_storage/service/disk_service.rb +128 -0
- data/activestorage/lib/active_storage/service/gcs_service.rb +83 -0
- data/activestorage/lib/active_storage/service/mirror_service.rb +50 -0
- data/activestorage/lib/active_storage/service/s3_service.rb +100 -0
- data/activestorage/lib/active_storage/version.rb +10 -0
- data/activestorage/lib/tasks/activestorage.rake +8 -0
- data/activestorage/package.json +33 -0
- data/activestorage/test/controllers/blobs_controller_test.rb +17 -0
- data/activestorage/test/controllers/direct_uploads_controller_test.rb +124 -0
- data/activestorage/test/controllers/disk_controller_test.rb +59 -0
- data/activestorage/test/controllers/variants_controller_test.rb +23 -0
- data/activestorage/test/database/create_users_migration.rb +9 -0
- data/activestorage/test/database/setup.rb +7 -0
- data/activestorage/test/dummy/Rakefile +5 -0
- data/activestorage/test/dummy/app/assets/config/manifest.js +5 -0
- data/activestorage/test/dummy/app/assets/images/.keep +0 -0
- data/activestorage/test/dummy/app/assets/javascripts/application.js +13 -0
- data/activestorage/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/activestorage/test/dummy/app/controllers/application_controller.rb +5 -0
- data/activestorage/test/dummy/app/controllers/concerns/.keep +0 -0
- data/activestorage/test/dummy/app/helpers/application_helper.rb +4 -0
- data/activestorage/test/dummy/app/jobs/application_job.rb +4 -0
- data/activestorage/test/dummy/app/models/application_record.rb +5 -0
- data/activestorage/test/dummy/app/models/concerns/.keep +0 -0
- data/activestorage/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/activestorage/test/dummy/bin/bundle +5 -0
- data/activestorage/test/dummy/bin/rails +6 -0
- data/activestorage/test/dummy/bin/rake +6 -0
- data/activestorage/test/dummy/bin/yarn +13 -0
- data/activestorage/test/dummy/config.ru +7 -0
- data/activestorage/test/dummy/config/application.rb +26 -0
- data/activestorage/test/dummy/config/boot.rb +7 -0
- data/activestorage/test/dummy/config/database.yml +25 -0
- data/activestorage/test/dummy/config/environment.rb +7 -0
- data/activestorage/test/dummy/config/environments/development.rb +51 -0
- data/activestorage/test/dummy/config/environments/production.rb +84 -0
- data/activestorage/test/dummy/config/environments/test.rb +35 -0
- data/activestorage/test/dummy/config/initializers/application_controller_renderer.rb +7 -0
- data/activestorage/test/dummy/config/initializers/assets.rb +16 -0
- data/activestorage/test/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/activestorage/test/dummy/config/initializers/cookies_serializer.rb +7 -0
- data/activestorage/test/dummy/config/initializers/filter_parameter_logging.rb +6 -0
- data/activestorage/test/dummy/config/initializers/inflections.rb +17 -0
- data/activestorage/test/dummy/config/initializers/mime_types.rb +5 -0
- data/activestorage/test/dummy/config/initializers/wrap_parameters.rb +16 -0
- data/activestorage/test/dummy/config/routes.rb +4 -0
- data/activestorage/test/dummy/config/secrets.yml +32 -0
- data/activestorage/test/dummy/config/spring.rb +8 -0
- data/activestorage/test/dummy/config/storage.yml +3 -0
- data/activestorage/test/dummy/lib/assets/.keep +0 -0
- data/activestorage/test/dummy/log/.keep +0 -0
- data/activestorage/test/dummy/package.json +5 -0
- data/activestorage/test/dummy/public/404.html +67 -0
- data/activestorage/test/dummy/public/422.html +67 -0
- data/activestorage/test/dummy/public/500.html +66 -0
- data/activestorage/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/activestorage/test/dummy/public/apple-touch-icon.png +0 -0
- data/activestorage/test/dummy/public/favicon.ico +0 -0
- data/activestorage/test/fixtures/files/racecar.jpg +0 -0
- data/activestorage/test/models/attachments_test.rb +150 -0
- data/activestorage/test/models/blob_test.rb +56 -0
- data/activestorage/test/models/filename/parameters_test.rb +32 -0
- data/activestorage/test/models/filename_test.rb +56 -0
- data/activestorage/test/models/variant_test.rb +29 -0
- data/activestorage/test/service/azure_storage_service_test.rb +22 -0
- data/activestorage/test/service/configurations.yml +30 -0
- data/activestorage/test/service/configurations.yml.enc +0 -0
- data/activestorage/test/service/configurator_test.rb +16 -0
- data/activestorage/test/service/disk_service_test.rb +14 -0
- data/activestorage/test/service/gcs_service_test.rb +46 -0
- data/activestorage/test/service/mirror_service_test.rb +64 -0
- data/activestorage/test/service/s3_service_test.rb +59 -0
- data/activestorage/test/service/shared_service_tests.rb +69 -0
- data/activestorage/test/template/image_tag_test.rb +38 -0
- data/activestorage/test/test_helper.rb +69 -0
- data/activestorage/webpack.config.js +27 -0
- data/activestorage/yarn.lock +3164 -0
- data/activesupport/CHANGELOG.md +190 -0
- data/activesupport/MIT-LICENSE +20 -0
- data/activesupport/README.rdoc +39 -0
- data/activesupport/Rakefile +23 -0
- data/activesupport/activesupport.gemspec +34 -0
- data/activesupport/bin/generate_tables +141 -0
- data/activesupport/bin/test +5 -0
- data/activesupport/lib/active_support.rb +106 -0
- data/activesupport/lib/active_support/all.rb +5 -0
- data/activesupport/lib/active_support/array_inquirer.rb +48 -0
- data/activesupport/lib/active_support/backtrace_cleaner.rb +105 -0
- data/activesupport/lib/active_support/benchmarkable.rb +51 -0
- data/activesupport/lib/active_support/builder.rb +8 -0
- data/activesupport/lib/active_support/cache.rb +759 -0
- data/activesupport/lib/active_support/cache/file_store.rb +197 -0
- data/activesupport/lib/active_support/cache/mem_cache_store.rb +205 -0
- data/activesupport/lib/active_support/cache/memory_store.rb +169 -0
- data/activesupport/lib/active_support/cache/null_store.rb +43 -0
- data/activesupport/lib/active_support/cache/strategy/local_cache.rb +170 -0
- data/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb +45 -0
- data/activesupport/lib/active_support/callbacks.rb +856 -0
- data/activesupport/lib/active_support/concern.rb +144 -0
- data/activesupport/lib/active_support/concurrency/share_lock.rb +227 -0
- data/activesupport/lib/active_support/configurable.rb +150 -0
- data/activesupport/lib/active_support/core_ext.rb +5 -0
- data/activesupport/lib/active_support/core_ext/array.rb +9 -0
- data/activesupport/lib/active_support/core_ext/array/access.rb +92 -0
- data/activesupport/lib/active_support/core_ext/array/conversions.rb +213 -0
- data/activesupport/lib/active_support/core_ext/array/extract_options.rb +31 -0
- data/activesupport/lib/active_support/core_ext/array/grouping.rb +109 -0
- data/activesupport/lib/active_support/core_ext/array/inquiry.rb +19 -0
- data/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb +9 -0
- data/activesupport/lib/active_support/core_ext/array/wrap.rb +48 -0
- data/activesupport/lib/active_support/core_ext/benchmark.rb +16 -0
- data/activesupport/lib/active_support/core_ext/big_decimal.rb +3 -0
- data/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb +14 -0
- data/activesupport/lib/active_support/core_ext/class.rb +4 -0
- data/activesupport/lib/active_support/core_ext/class/attribute.rb +149 -0
- data/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +6 -0
- data/activesupport/lib/active_support/core_ext/class/subclasses.rb +57 -0
- data/activesupport/lib/active_support/core_ext/date.rb +7 -0
- data/activesupport/lib/active_support/core_ext/date/acts_like.rb +10 -0
- data/activesupport/lib/active_support/core_ext/date/blank.rb +14 -0
- data/activesupport/lib/active_support/core_ext/date/calculations.rb +145 -0
- data/activesupport/lib/active_support/core_ext/date/conversions.rb +100 -0
- data/activesupport/lib/active_support/core_ext/date/zones.rb +8 -0
- data/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +358 -0
- data/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb +16 -0
- data/activesupport/lib/active_support/core_ext/date_and_time/zones.rb +41 -0
- data/activesupport/lib/active_support/core_ext/date_time.rb +7 -0
- data/activesupport/lib/active_support/core_ext/date_time/acts_like.rb +16 -0
- data/activesupport/lib/active_support/core_ext/date_time/blank.rb +14 -0
- data/activesupport/lib/active_support/core_ext/date_time/calculations.rb +211 -0
- data/activesupport/lib/active_support/core_ext/date_time/compatibility.rb +18 -0
- data/activesupport/lib/active_support/core_ext/date_time/conversions.rb +107 -0
- data/activesupport/lib/active_support/core_ext/digest/uuid.rb +53 -0
- data/activesupport/lib/active_support/core_ext/enumerable.rb +159 -0
- data/activesupport/lib/active_support/core_ext/file.rb +3 -0
- data/activesupport/lib/active_support/core_ext/file/atomic.rb +70 -0
- data/activesupport/lib/active_support/core_ext/hash.rb +11 -0
- data/activesupport/lib/active_support/core_ext/hash/compact.rb +29 -0
- data/activesupport/lib/active_support/core_ext/hash/conversions.rb +263 -0
- data/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +34 -0
- data/activesupport/lib/active_support/core_ext/hash/except.rb +24 -0
- data/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +24 -0
- data/activesupport/lib/active_support/core_ext/hash/keys.rb +172 -0
- data/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +25 -0
- data/activesupport/lib/active_support/core_ext/hash/slice.rb +50 -0
- data/activesupport/lib/active_support/core_ext/hash/transform_values.rb +32 -0
- data/activesupport/lib/active_support/core_ext/integer.rb +5 -0
- data/activesupport/lib/active_support/core_ext/integer/inflections.rb +31 -0
- data/activesupport/lib/active_support/core_ext/integer/multiple.rb +12 -0
- data/activesupport/lib/active_support/core_ext/integer/time.rb +31 -0
- data/activesupport/lib/active_support/core_ext/kernel.rb +6 -0
- data/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +13 -0
- data/activesupport/lib/active_support/core_ext/kernel/concern.rb +14 -0
- data/activesupport/lib/active_support/core_ext/kernel/reporting.rb +45 -0
- data/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb +8 -0
- data/activesupport/lib/active_support/core_ext/load_error.rb +9 -0
- data/activesupport/lib/active_support/core_ext/marshal.rb +24 -0
- data/activesupport/lib/active_support/core_ext/module.rb +13 -0
- data/activesupport/lib/active_support/core_ext/module/aliasing.rb +31 -0
- data/activesupport/lib/active_support/core_ext/module/anonymous.rb +30 -0
- data/activesupport/lib/active_support/core_ext/module/attr_internal.rb +38 -0
- data/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +215 -0
- data/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +150 -0
- data/activesupport/lib/active_support/core_ext/module/concerning.rb +137 -0
- data/activesupport/lib/active_support/core_ext/module/delegation.rb +290 -0
- data/activesupport/lib/active_support/core_ext/module/deprecation.rb +25 -0
- data/activesupport/lib/active_support/core_ext/module/introspection.rb +62 -0
- data/activesupport/lib/active_support/core_ext/module/reachable.rb +10 -0
- data/activesupport/lib/active_support/core_ext/module/remove_method.rb +37 -0
- data/activesupport/lib/active_support/core_ext/name_error.rb +33 -0
- data/activesupport/lib/active_support/core_ext/numeric.rb +6 -0
- data/activesupport/lib/active_support/core_ext/numeric/bytes.rb +66 -0
- data/activesupport/lib/active_support/core_ext/numeric/conversions.rb +140 -0
- data/activesupport/lib/active_support/core_ext/numeric/inquiry.rb +28 -0
- data/activesupport/lib/active_support/core_ext/numeric/time.rb +76 -0
- data/activesupport/lib/active_support/core_ext/object.rb +16 -0
- data/activesupport/lib/active_support/core_ext/object/acts_like.rb +12 -0
- data/activesupport/lib/active_support/core_ext/object/blank.rb +147 -0
- data/activesupport/lib/active_support/core_ext/object/conversions.rb +6 -0
- data/activesupport/lib/active_support/core_ext/object/deep_dup.rb +55 -0
- data/activesupport/lib/active_support/core_ext/object/duplicable.rb +156 -0
- data/activesupport/lib/active_support/core_ext/object/inclusion.rb +29 -0
- data/activesupport/lib/active_support/core_ext/object/instance_variables.rb +30 -0
- data/activesupport/lib/active_support/core_ext/object/json.rb +221 -0
- data/activesupport/lib/active_support/core_ext/object/to_param.rb +3 -0
- data/activesupport/lib/active_support/core_ext/object/to_query.rb +86 -0
- data/activesupport/lib/active_support/core_ext/object/try.rb +148 -0
- data/activesupport/lib/active_support/core_ext/object/with_options.rb +82 -0
- data/activesupport/lib/active_support/core_ext/range.rb +6 -0
- data/activesupport/lib/active_support/core_ext/range/conversions.rb +33 -0
- data/activesupport/lib/active_support/core_ext/range/each.rb +23 -0
- data/activesupport/lib/active_support/core_ext/range/include_range.rb +25 -0
- data/activesupport/lib/active_support/core_ext/range/overlaps.rb +10 -0
- data/activesupport/lib/active_support/core_ext/regexp.rb +11 -0
- data/activesupport/lib/active_support/core_ext/securerandom.rb +25 -0
- data/activesupport/lib/active_support/core_ext/string.rb +15 -0
- data/activesupport/lib/active_support/core_ext/string/access.rb +106 -0
- data/activesupport/lib/active_support/core_ext/string/behavior.rb +8 -0
- data/activesupport/lib/active_support/core_ext/string/conversions.rb +59 -0
- data/activesupport/lib/active_support/core_ext/string/exclude.rb +13 -0
- data/activesupport/lib/active_support/core_ext/string/filters.rb +104 -0
- data/activesupport/lib/active_support/core_ext/string/indent.rb +45 -0
- data/activesupport/lib/active_support/core_ext/string/inflections.rb +254 -0
- data/activesupport/lib/active_support/core_ext/string/inquiry.rb +15 -0
- data/activesupport/lib/active_support/core_ext/string/multibyte.rb +55 -0
- data/activesupport/lib/active_support/core_ext/string/output_safety.rb +261 -0
- data/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +6 -0
- data/activesupport/lib/active_support/core_ext/string/strip.rb +25 -0
- data/activesupport/lib/active_support/core_ext/string/zones.rb +16 -0
- data/activesupport/lib/active_support/core_ext/time.rb +7 -0
- data/activesupport/lib/active_support/core_ext/time/acts_like.rb +10 -0
- data/activesupport/lib/active_support/core_ext/time/calculations.rb +315 -0
- data/activesupport/lib/active_support/core_ext/time/compatibility.rb +16 -0
- data/activesupport/lib/active_support/core_ext/time/conversions.rb +72 -0
- data/activesupport/lib/active_support/core_ext/time/zones.rb +113 -0
- data/activesupport/lib/active_support/core_ext/uri.rb +26 -0
- data/activesupport/lib/active_support/current_attributes.rb +195 -0
- data/activesupport/lib/active_support/dependencies.rb +744 -0
- data/activesupport/lib/active_support/dependencies/autoload.rb +79 -0
- data/activesupport/lib/active_support/dependencies/interlock.rb +57 -0
- data/activesupport/lib/active_support/deprecation.rb +46 -0
- data/activesupport/lib/active_support/deprecation/behaviors.rb +105 -0
- data/activesupport/lib/active_support/deprecation/constant_accessor.rb +52 -0
- data/activesupport/lib/active_support/deprecation/instance_delegator.rb +39 -0
- data/activesupport/lib/active_support/deprecation/method_wrappers.rb +72 -0
- data/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +153 -0
- data/activesupport/lib/active_support/deprecation/reporting.rb +114 -0
- data/activesupport/lib/active_support/descendants_tracker.rb +62 -0
- data/activesupport/lib/active_support/duration.rb +422 -0
- data/activesupport/lib/active_support/duration/iso8601_parser.rb +125 -0
- data/activesupport/lib/active_support/duration/iso8601_serializer.rb +55 -0
- data/activesupport/lib/active_support/evented_file_update_checker.rb +205 -0
- data/activesupport/lib/active_support/execution_wrapper.rb +128 -0
- data/activesupport/lib/active_support/executor.rb +8 -0
- data/activesupport/lib/active_support/file_update_checker.rb +163 -0
- data/activesupport/lib/active_support/gem_version.rb +17 -0
- data/activesupport/lib/active_support/gzip.rb +38 -0
- data/activesupport/lib/active_support/hash_with_indifferent_access.rb +358 -0
- data/activesupport/lib/active_support/i18n.rb +15 -0
- data/activesupport/lib/active_support/i18n_railtie.rb +114 -0
- data/activesupport/lib/active_support/inflections.rb +72 -0
- data/activesupport/lib/active_support/inflector.rb +9 -0
- data/activesupport/lib/active_support/inflector/inflections.rb +246 -0
- data/activesupport/lib/active_support/inflector/methods.rb +408 -0
- data/activesupport/lib/active_support/inflector/transliterate.rb +112 -0
- data/activesupport/lib/active_support/json.rb +4 -0
- data/activesupport/lib/active_support/json/decoding.rb +76 -0
- data/activesupport/lib/active_support/json/encoding.rb +130 -0
- data/activesupport/lib/active_support/key_generator.rb +73 -0
- data/activesupport/lib/active_support/lazy_load_hooks.rb +78 -0
- data/activesupport/lib/active_support/locale/en.yml +135 -0
- data/activesupport/lib/active_support/log_subscriber.rb +112 -0
- data/activesupport/lib/active_support/log_subscriber/test_helper.rb +106 -0
- data/activesupport/lib/active_support/logger.rb +108 -0
- data/activesupport/lib/active_support/logger_silence.rb +29 -0
- data/activesupport/lib/active_support/logger_thread_safe_level.rb +33 -0
- data/activesupport/lib/active_support/message_encryptor.rb +202 -0
- data/activesupport/lib/active_support/message_verifier.rb +178 -0
- data/activesupport/lib/active_support/messages/metadata.rb +71 -0
- data/activesupport/lib/active_support/multibyte.rb +23 -0
- data/activesupport/lib/active_support/multibyte/chars.rb +235 -0
- data/activesupport/lib/active_support/multibyte/unicode.rb +394 -0
- data/activesupport/lib/active_support/notifications.rb +216 -0
- data/activesupport/lib/active_support/notifications/fanout.rb +159 -0
- data/activesupport/lib/active_support/notifications/instrumenter.rb +93 -0
- data/activesupport/lib/active_support/number_helper.rb +371 -0
- data/activesupport/lib/active_support/number_helper/number_converter.rb +184 -0
- data/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb +46 -0
- data/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb +29 -0
- data/activesupport/lib/active_support/number_helper/number_to_human_converter.rb +68 -0
- data/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb +59 -0
- data/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb +14 -0
- data/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb +58 -0
- data/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb +74 -0
- data/activesupport/lib/active_support/number_helper/rounding_helper.rb +66 -0
- data/activesupport/lib/active_support/option_merger.rb +27 -0
- data/activesupport/lib/active_support/ordered_hash.rb +50 -0
- data/activesupport/lib/active_support/ordered_options.rb +85 -0
- data/activesupport/lib/active_support/per_thread_registry.rb +60 -0
- data/activesupport/lib/active_support/proxy_object.rb +15 -0
- data/activesupport/lib/active_support/rails.rb +35 -0
- data/activesupport/lib/active_support/railtie.rb +59 -0
- data/activesupport/lib/active_support/reloader.rb +128 -0
- data/activesupport/lib/active_support/rescuable.rb +174 -0
- data/activesupport/lib/active_support/security_utils.rb +29 -0
- data/activesupport/lib/active_support/string_inquirer.rb +34 -0
- data/activesupport/lib/active_support/subscriber.rb +126 -0
- data/activesupport/lib/active_support/tagged_logging.rb +79 -0
- data/activesupport/lib/active_support/test_case.rb +73 -0
- data/activesupport/lib/active_support/testing/assertions.rb +199 -0
- data/activesupport/lib/active_support/testing/autorun.rb +7 -0
- data/activesupport/lib/active_support/testing/constant_lookup.rb +51 -0
- data/activesupport/lib/active_support/testing/declarative.rb +28 -0
- data/activesupport/lib/active_support/testing/deprecation.rb +39 -0
- data/activesupport/lib/active_support/testing/file_fixtures.rb +36 -0
- data/activesupport/lib/active_support/testing/isolation.rb +108 -0
- data/activesupport/lib/active_support/testing/method_call_assertions.rb +43 -0
- data/activesupport/lib/active_support/testing/setup_and_teardown.rb +52 -0
- data/activesupport/lib/active_support/testing/stream.rb +44 -0
- data/activesupport/lib/active_support/testing/tagged_logging.rb +27 -0
- data/activesupport/lib/active_support/testing/time_helpers.rb +199 -0
- data/activesupport/lib/active_support/time.rb +20 -0
- data/activesupport/lib/active_support/time_with_zone.rb +551 -0
- data/activesupport/lib/active_support/values/time_zone.rb +555 -0
- data/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/activesupport/lib/active_support/version.rb +10 -0
- data/activesupport/lib/active_support/xml_mini.rb +209 -0
- data/activesupport/lib/active_support/xml_mini/jdom.rb +183 -0
- data/activesupport/lib/active_support/xml_mini/libxml.rb +80 -0
- data/activesupport/lib/active_support/xml_mini/libxmlsax.rb +83 -0
- data/activesupport/lib/active_support/xml_mini/nokogiri.rb +83 -0
- data/activesupport/lib/active_support/xml_mini/nokogirisax.rb +86 -0
- data/activesupport/lib/active_support/xml_mini/rexml.rb +130 -0
- data/activesupport/test/abstract_unit.rb +41 -0
- data/activesupport/test/array_inquirer_test.rb +63 -0
- data/activesupport/test/autoload_test.rb +83 -0
- data/activesupport/test/autoloading_fixtures/a/b.rb +4 -0
- data/activesupport/test/autoloading_fixtures/a/c/d.rb +4 -0
- data/activesupport/test/autoloading_fixtures/a/c/em/f.rb +4 -0
- data/activesupport/test/autoloading_fixtures/application.rb +3 -0
- data/activesupport/test/autoloading_fixtures/circular1.rb +8 -0
- data/activesupport/test/autoloading_fixtures/circular2.rb +6 -0
- data/activesupport/test/autoloading_fixtures/class_folder.rb +5 -0
- data/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +5 -0
- data/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +4 -0
- data/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +9 -0
- data/activesupport/test/autoloading_fixtures/conflict.rb +3 -0
- data/activesupport/test/autoloading_fixtures/counting_loader.rb +7 -0
- data/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +4 -0
- data/activesupport/test/autoloading_fixtures/d.rb +4 -0
- data/activesupport/test/autoloading_fixtures/em.rb +4 -0
- data/activesupport/test/autoloading_fixtures/html/some_class.rb +6 -0
- data/activesupport/test/autoloading_fixtures/load_path/loaded_constant.rb +4 -0
- data/activesupport/test/autoloading_fixtures/loads_constant.rb +7 -0
- data/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +4 -0
- data/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +6 -0
- data/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +4 -0
- data/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +3 -0
- data/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +4 -0
- data/activesupport/test/autoloading_fixtures/prepend.rb +10 -0
- data/activesupport/test/autoloading_fixtures/prepend/sub_class_conflict.rb +4 -0
- data/activesupport/test/autoloading_fixtures/raises_arbitrary_exception.rb +6 -0
- data/activesupport/test/autoloading_fixtures/raises_name_error.rb +5 -0
- data/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +5 -0
- data/activesupport/test/autoloading_fixtures/requires_constant.rb +6 -0
- data/activesupport/test/autoloading_fixtures/should_not_be_required.rb +3 -0
- data/activesupport/test/autoloading_fixtures/throws.rb +6 -0
- data/activesupport/test/autoloading_fixtures/typo.rb +3 -0
- data/activesupport/test/benchmarkable_test.rb +78 -0
- data/activesupport/test/broadcast_logger_test.rb +172 -0
- data/activesupport/test/cache/behaviors.rb +9 -0
- data/activesupport/test/cache/behaviors/autoloading_cache_behavior.rb +43 -0
- data/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb +15 -0
- data/activesupport/test/cache/behaviors/cache_increment_decrement_behavior.rb +23 -0
- data/activesupport/test/cache/behaviors/cache_store_behavior.rb +331 -0
- data/activesupport/test/cache/behaviors/cache_store_version_behavior.rb +88 -0
- data/activesupport/test/cache/behaviors/encoded_key_cache_behavior.rb +36 -0
- data/activesupport/test/cache/behaviors/local_cache_behavior.rb +128 -0
- data/activesupport/test/cache/cache_entry_test.rb +30 -0
- data/activesupport/test/cache/cache_key_test.rb +90 -0
- data/activesupport/test/cache/cache_store_logger_test.rb +36 -0
- data/activesupport/test/cache/cache_store_namespace_test.rb +40 -0
- data/activesupport/test/cache/cache_store_setting_test.rb +68 -0
- data/activesupport/test/cache/cache_store_write_multi_test.rb +62 -0
- data/activesupport/test/cache/local_cache_middleware_test.rb +63 -0
- data/activesupport/test/cache/stores/file_store_test.rb +130 -0
- data/activesupport/test/cache/stores/mem_cache_store_test.rb +76 -0
- data/activesupport/test/cache/stores/memory_store_test.rb +109 -0
- data/activesupport/test/cache/stores/null_store_test.rb +59 -0
- data/activesupport/test/callback_inheritance_test.rb +178 -0
- data/activesupport/test/callbacks_test.rb +1205 -0
- data/activesupport/test/class_cache_test.rb +80 -0
- data/activesupport/test/clean_backtrace_test.rb +76 -0
- data/activesupport/test/clean_logger_test.rb +31 -0
- data/activesupport/test/concern_test.rb +131 -0
- data/activesupport/test/configurable_test.rb +133 -0
- data/activesupport/test/constantize_test_cases.rb +127 -0
- data/activesupport/test/core_ext/array/access_test.rb +38 -0
- data/activesupport/test/core_ext/array/conversions_test.rb +205 -0
- data/activesupport/test/core_ext/array/extract_options_test.rb +47 -0
- data/activesupport/test/core_ext/array/grouping_test.rb +137 -0
- data/activesupport/test/core_ext/array/prepend_append_test.rb +14 -0
- data/activesupport/test/core_ext/array/wrap_test.rb +79 -0
- data/activesupport/test/core_ext/bigdecimal_test.rb +13 -0
- data/activesupport/test/core_ext/class/attribute_test.rb +101 -0
- data/activesupport/test/core_ext/class_test.rb +40 -0
- data/activesupport/test/core_ext/date_and_time_behavior.rb +325 -0
- data/activesupport/test/core_ext/date_and_time_compatibility_test.rb +275 -0
- data/activesupport/test/core_ext/date_ext_test.rb +415 -0
- data/activesupport/test/core_ext/date_time_ext_test.rb +463 -0
- data/activesupport/test/core_ext/digest/uuid_test.rb +26 -0
- data/activesupport/test/core_ext/duration_test.rb +651 -0
- data/activesupport/test/core_ext/enumerable_test.rb +223 -0
- data/activesupport/test/core_ext/file_test.rb +80 -0
- data/activesupport/test/core_ext/hash/transform_keys_test.rb +64 -0
- data/activesupport/test/core_ext/hash/transform_values_test.rb +77 -0
- data/activesupport/test/core_ext/hash_ext_test.rb +1131 -0
- data/activesupport/test/core_ext/integer_ext_test.rb +32 -0
- data/activesupport/test/core_ext/kernel/concern_test.rb +15 -0
- data/activesupport/test/core_ext/kernel_test.rb +53 -0
- data/activesupport/test/core_ext/load_error_test.rb +19 -0
- data/activesupport/test/core_ext/marshal_test.rb +165 -0
- data/activesupport/test/core_ext/module/anonymous_test.rb +16 -0
- data/activesupport/test/core_ext/module/attr_internal_test.rb +55 -0
- data/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb +133 -0
- data/activesupport/test/core_ext/module/attribute_accessor_test.rb +137 -0
- data/activesupport/test/core_ext/module/attribute_aliasing_test.rb +61 -0
- data/activesupport/test/core_ext/module/concerning_test.rb +67 -0
- data/activesupport/test/core_ext/module/introspection_test.rb +39 -0
- data/activesupport/test/core_ext/module/reachable_test.rb +43 -0
- data/activesupport/test/core_ext/module/remove_method_test.rb +59 -0
- data/activesupport/test/core_ext/module_test.rb +443 -0
- data/activesupport/test/core_ext/name_error_test.rb +23 -0
- data/activesupport/test/core_ext/numeric_ext_test.rb +491 -0
- data/activesupport/test/core_ext/object/acts_like_test.rb +35 -0
- data/activesupport/test/core_ext/object/blank_test.rb +36 -0
- data/activesupport/test/core_ext/object/deep_dup_test.rb +59 -0
- data/activesupport/test/core_ext/object/duplicable_test.rb +37 -0
- data/activesupport/test/core_ext/object/inclusion_test.rb +61 -0
- data/activesupport/test/core_ext/object/instance_variables_test.rb +33 -0
- data/activesupport/test/core_ext/object/json_cherry_pick_test.rb +44 -0
- data/activesupport/test/core_ext/object/json_gem_encoding_test.rb +68 -0
- data/activesupport/test/core_ext/object/to_param_test.rb +39 -0
- data/activesupport/test/core_ext/object/to_query_test.rb +84 -0
- data/activesupport/test/core_ext/object/try_test.rb +165 -0
- data/activesupport/test/core_ext/range_ext_test.rb +133 -0
- data/activesupport/test/core_ext/regexp_ext_test.rb +36 -0
- data/activesupport/test/core_ext/secure_random_test.rb +22 -0
- data/activesupport/test/core_ext/string_ext_test.rb +932 -0
- data/activesupport/test/core_ext/time_ext_test.rb +999 -0
- data/activesupport/test/core_ext/time_with_zone_test.rb +1304 -0
- data/activesupport/test/core_ext/uri_ext_test.rb +14 -0
- data/activesupport/test/current_attributes_test.rb +105 -0
- data/activesupport/test/dependencies/check_warnings.rb +4 -0
- data/activesupport/test/dependencies/conflict.rb +3 -0
- data/activesupport/test/dependencies/cross_site_depender.rb +5 -0
- data/activesupport/test/dependencies/mutual_one.rb +6 -0
- data/activesupport/test/dependencies/mutual_two.rb +6 -0
- data/activesupport/test/dependencies/raises_exception.rb +5 -0
- data/activesupport/test/dependencies/raises_exception_without_blame_file.rb +7 -0
- data/activesupport/test/dependencies/requires_nonexistent0.rb +3 -0
- data/activesupport/test/dependencies/requires_nonexistent1.rb +3 -0
- data/activesupport/test/dependencies/service_one.rb +7 -0
- data/activesupport/test/dependencies/service_two.rb +4 -0
- data/activesupport/test/dependencies_test.rb +1077 -0
- data/activesupport/test/dependencies_test_helpers.rb +30 -0
- data/activesupport/test/deprecation/method_wrappers_test.rb +36 -0
- data/activesupport/test/deprecation/proxy_wrappers_test.rb +24 -0
- data/activesupport/test/deprecation_test.rb +430 -0
- data/activesupport/test/descendants_tracker_test_cases.rb +67 -0
- data/activesupport/test/descendants_tracker_with_autoloading_test.rb +36 -0
- data/activesupport/test/descendants_tracker_without_autoloading_test.rb +19 -0
- data/activesupport/test/evented_file_update_checker_test.rb +197 -0
- data/activesupport/test/executor_test.rb +242 -0
- data/activesupport/test/file_fixtures/sample.txt +1 -0
- data/activesupport/test/file_update_checker_shared_tests.rb +284 -0
- data/activesupport/test/file_update_checker_test.rb +21 -0
- data/activesupport/test/fixtures/autoload/another_class.rb +4 -0
- data/activesupport/test/fixtures/autoload/some_class.rb +4 -0
- data/activesupport/test/fixtures/xml/jdom_doctype.dtd +1 -0
- data/activesupport/test/fixtures/xml/jdom_entities.txt +1 -0
- data/activesupport/test/fixtures/xml/jdom_include.txt +1 -0
- data/activesupport/test/gzip_test.rb +45 -0
- data/activesupport/test/hash_with_indifferent_access_test.rb +773 -0
- data/activesupport/test/i18n_test.rb +106 -0
- data/activesupport/test/inflector_test.rb +548 -0
- data/activesupport/test/inflector_test_cases.rb +375 -0
- data/activesupport/test/json/decoding_test.rb +124 -0
- data/activesupport/test/json/encoding_test.rb +477 -0
- data/activesupport/test/json/encoding_test_cases.rb +98 -0
- data/activesupport/test/key_generator_test.rb +79 -0
- data/activesupport/test/lazy_load_hooks_test.rb +140 -0
- data/activesupport/test/log_subscriber_test.rb +126 -0
- data/activesupport/test/logger_test.rb +270 -0
- data/activesupport/test/message_encryptor_test.rb +176 -0
- data/activesupport/test/message_verifier_test.rb +158 -0
- data/activesupport/test/metadata/shared_metadata_tests.rb +93 -0
- data/activesupport/test/multibyte_chars_test.rb +752 -0
- data/activesupport/test/multibyte_conformance_test.rb +110 -0
- data/activesupport/test/multibyte_grapheme_break_conformance_test.rb +62 -0
- data/activesupport/test/multibyte_normalization_conformance_test.rb +112 -0
- data/activesupport/test/multibyte_proxy_test.rb +34 -0
- data/activesupport/test/multibyte_test_helpers.rb +41 -0
- data/activesupport/test/multibyte_unicode_database_test.rb +26 -0
- data/activesupport/test/notifications/evented_notification_test.rb +89 -0
- data/activesupport/test/notifications/instrumenter_test.rb +60 -0
- data/activesupport/test/notifications_test.rb +283 -0
- data/activesupport/test/number_helper_i18n_test.rb +151 -0
- data/activesupport/test/number_helper_test.rb +411 -0
- data/activesupport/test/option_merger_test.rb +97 -0
- data/activesupport/test/ordered_hash_test.rb +324 -0
- data/activesupport/test/ordered_options_test.rb +105 -0
- data/activesupport/test/reloader_test.rb +99 -0
- data/activesupport/test/rescuable_test.rb +176 -0
- data/activesupport/test/safe_buffer_test.rb +182 -0
- data/activesupport/test/security_utils_test.rb +16 -0
- data/activesupport/test/share_lock_test.rb +580 -0
- data/activesupport/test/string_inquirer_test.rb +46 -0
- data/activesupport/test/subscriber_test.rb +56 -0
- data/activesupport/test/tagged_logging_test.rb +117 -0
- data/activesupport/test/test_case_test.rb +339 -0
- data/activesupport/test/testing/constant_lookup_test.rb +78 -0
- data/activesupport/test/testing/file_fixtures_test.rb +32 -0
- data/activesupport/test/testing/method_call_assertions_test.rb +125 -0
- data/activesupport/test/time_travel_test.rb +189 -0
- data/activesupport/test/time_zone_test.rb +738 -0
- data/activesupport/test/time_zone_test_helpers.rb +26 -0
- data/activesupport/test/transliterate_test.rb +54 -0
- data/activesupport/test/xml_mini/jdom_engine_test.rb +53 -0
- data/activesupport/test/xml_mini/libxml_engine_test.rb +21 -0
- data/activesupport/test/xml_mini/libxmlsax_engine_test.rb +16 -0
- data/activesupport/test/xml_mini/nokogiri_engine_test.rb +16 -0
- data/activesupport/test/xml_mini/nokogirisax_engine_test.rb +16 -0
- data/activesupport/test/xml_mini/rexml_engine_test.rb +27 -0
- data/activesupport/test/xml_mini/xml_mini_engine_test.rb +264 -0
- data/activesupport/test/xml_mini_test.rb +355 -0
- data/ci/phantomjs.js +149 -0
- data/ci/travis.rb +187 -0
- data/guides/.document +0 -0
- data/guides/CHANGELOG.md +1 -0
- data/guides/Rakefile +91 -0
- data/guides/assets/images/akshaysurve.jpg +0 -0
- data/guides/assets/images/belongs_to.png +0 -0
- data/guides/assets/images/book_icon.gif +0 -0
- data/guides/assets/images/bullet.gif +0 -0
- data/guides/assets/images/chapters_icon.gif +0 -0
- data/guides/assets/images/check_bullet.gif +0 -0
- data/guides/assets/images/credits_pic_blank.gif +0 -0
- data/guides/assets/images/csrf.png +0 -0
- data/guides/assets/images/edge_badge.png +0 -0
- data/guides/assets/images/favicon.ico +0 -0
- data/guides/assets/images/feature_tile.gif +0 -0
- data/guides/assets/images/footer_tile.gif +0 -0
- data/guides/assets/images/fxn.png +0 -0
- data/guides/assets/images/getting_started/article_with_comments.png +0 -0
- data/guides/assets/images/getting_started/challenge.png +0 -0
- data/guides/assets/images/getting_started/confirm_dialog.png +0 -0
- data/guides/assets/images/getting_started/forbidden_attributes_for_new_article.png +0 -0
- data/guides/assets/images/getting_started/form_with_errors.png +0 -0
- data/guides/assets/images/getting_started/index_action_with_edit_link.png +0 -0
- data/guides/assets/images/getting_started/new_article.png +0 -0
- data/guides/assets/images/getting_started/rails_welcome.png +0 -0
- data/guides/assets/images/getting_started/routing_error_no_controller.png +0 -0
- data/guides/assets/images/getting_started/routing_error_no_route_matches.png +0 -0
- data/guides/assets/images/getting_started/show_action_for_articles.png +0 -0
- data/guides/assets/images/getting_started/template_is_missing_articles_new.png +0 -0
- data/guides/assets/images/getting_started/unknown_action_create_for_articles.png +0 -0
- data/guides/assets/images/getting_started/unknown_action_new_for_articles.png +0 -0
- data/guides/assets/images/grey_bullet.gif +0 -0
- data/guides/assets/images/habtm.png +0 -0
- data/guides/assets/images/has_many.png +0 -0
- data/guides/assets/images/has_many_through.png +0 -0
- data/guides/assets/images/has_one.png +0 -0
- data/guides/assets/images/has_one_through.png +0 -0
- data/guides/assets/images/header_backdrop.png +0 -0
- data/guides/assets/images/header_tile.gif +0 -0
- data/guides/assets/images/i18n/demo_html_safe.png +0 -0
- data/guides/assets/images/i18n/demo_localized_pirate.png +0 -0
- data/guides/assets/images/i18n/demo_translated_en.png +0 -0
- data/guides/assets/images/i18n/demo_translated_pirate.png +0 -0
- data/guides/assets/images/i18n/demo_translation_missing.png +0 -0
- data/guides/assets/images/i18n/demo_untranslated.png +0 -0
- data/guides/assets/images/icons/README +5 -0
- data/guides/assets/images/icons/callouts/1.png +0 -0
- data/guides/assets/images/icons/callouts/10.png +0 -0
- data/guides/assets/images/icons/callouts/11.png +0 -0
- data/guides/assets/images/icons/callouts/12.png +0 -0
- data/guides/assets/images/icons/callouts/13.png +0 -0
- data/guides/assets/images/icons/callouts/14.png +0 -0
- data/guides/assets/images/icons/callouts/15.png +0 -0
- data/guides/assets/images/icons/callouts/2.png +0 -0
- data/guides/assets/images/icons/callouts/3.png +0 -0
- data/guides/assets/images/icons/callouts/4.png +0 -0
- data/guides/assets/images/icons/callouts/5.png +0 -0
- data/guides/assets/images/icons/callouts/6.png +0 -0
- data/guides/assets/images/icons/callouts/7.png +0 -0
- data/guides/assets/images/icons/callouts/8.png +0 -0
- data/guides/assets/images/icons/callouts/9.png +0 -0
- data/guides/assets/images/icons/caution.png +0 -0
- data/guides/assets/images/icons/example.png +0 -0
- data/guides/assets/images/icons/home.png +0 -0
- data/guides/assets/images/icons/important.png +0 -0
- data/guides/assets/images/icons/next.png +0 -0
- data/guides/assets/images/icons/note.png +0 -0
- data/guides/assets/images/icons/prev.png +0 -0
- data/guides/assets/images/icons/tip.png +0 -0
- data/guides/assets/images/icons/up.png +0 -0
- data/guides/assets/images/icons/warning.png +0 -0
- data/guides/assets/images/nav_arrow.gif +0 -0
- data/guides/assets/images/oscardelben.jpg +0 -0
- data/guides/assets/images/polymorphic.png +0 -0
- data/guides/assets/images/radar.png +0 -0
- data/guides/assets/images/rails4_features.png +0 -0
- data/guides/assets/images/rails_guides_kindle_cover.jpg +0 -0
- data/guides/assets/images/rails_guides_logo.gif +0 -0
- data/guides/assets/images/rails_logo_remix.gif +0 -0
- data/guides/assets/images/session_fixation.png +0 -0
- data/guides/assets/images/tab_grey.gif +0 -0
- data/guides/assets/images/tab_info.gif +0 -0
- data/guides/assets/images/tab_note.gif +0 -0
- data/guides/assets/images/tab_red.gif +0 -0
- data/guides/assets/images/tab_yellow.gif +0 -0
- data/guides/assets/images/tab_yellow.png +0 -0
- data/guides/assets/images/vijaydev.jpg +0 -0
- data/guides/assets/javascripts/guides.js +53 -0
- data/guides/assets/javascripts/jquery.min.js +4 -0
- data/guides/assets/javascripts/responsive-tables.js +43 -0
- data/guides/assets/javascripts/syntaxhighlighter.js +20 -0
- data/guides/assets/stylesheets/fixes.css +16 -0
- data/guides/assets/stylesheets/kindle.css +11 -0
- data/guides/assets/stylesheets/main.css +718 -0
- data/guides/assets/stylesheets/print.css +52 -0
- data/guides/assets/stylesheets/reset.css +43 -0
- data/guides/assets/stylesheets/responsive-tables.css +50 -0
- data/guides/assets/stylesheets/style.css +13 -0
- data/guides/assets/stylesheets/syntaxhighlighter/shCore.css +226 -0
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.css +116 -0
- data/guides/bug_report_templates/action_controller_gem.rb +58 -0
- data/guides/bug_report_templates/action_controller_master.rb +54 -0
- data/guides/bug_report_templates/active_job_gem.rb +34 -0
- data/guides/bug_report_templates/active_job_master.rb +34 -0
- data/guides/bug_report_templates/active_record_gem.rb +54 -0
- data/guides/bug_report_templates/active_record_master.rb +51 -0
- data/guides/bug_report_templates/active_record_migrations_gem.rb +65 -0
- data/guides/bug_report_templates/active_record_migrations_master.rb +65 -0
- data/guides/bug_report_templates/benchmark.rb +52 -0
- data/guides/bug_report_templates/generic_gem.rb +27 -0
- data/guides/bug_report_templates/generic_master.rb +25 -0
- data/guides/rails_guides.rb +29 -0
- data/guides/rails_guides/generator.rb +208 -0
- data/guides/rails_guides/helpers.rb +55 -0
- data/guides/rails_guides/indexer.rb +70 -0
- data/guides/rails_guides/kindle.rb +116 -0
- data/guides/rails_guides/levenshtein.rb +44 -0
- data/guides/rails_guides/markdown.rb +173 -0
- data/guides/rails_guides/markdown/renderer.rb +123 -0
- data/guides/source/2_2_release_notes.md +436 -0
- data/guides/source/2_3_release_notes.md +623 -0
- data/guides/source/3_0_release_notes.md +612 -0
- data/guides/source/3_1_release_notes.md +561 -0
- data/guides/source/3_2_release_notes.md +570 -0
- data/guides/source/4_0_release_notes.md +284 -0
- data/guides/source/4_1_release_notes.md +732 -0
- data/guides/source/4_2_release_notes.md +890 -0
- data/guides/source/5_0_release_notes.md +1096 -0
- data/guides/source/5_1_release_notes.md +652 -0
- data/guides/source/_license.html.erb +2 -0
- data/guides/source/_welcome.html.erb +25 -0
- data/guides/source/action_cable_overview.md +691 -0
- data/guides/source/action_controller_overview.md +1218 -0
- data/guides/source/action_mailer_basics.md +826 -0
- data/guides/source/action_view_overview.md +1511 -0
- data/guides/source/active_job_basics.md +403 -0
- data/guides/source/active_model_basics.md +505 -0
- data/guides/source/active_record_basics.md +377 -0
- data/guides/source/active_record_callbacks.md +459 -0
- data/guides/source/active_record_migrations.md +1055 -0
- data/guides/source/active_record_postgresql.md +517 -0
- data/guides/source/active_record_querying.md +2048 -0
- data/guides/source/active_record_validations.md +1296 -0
- data/guides/source/active_support_core_extensions.md +3748 -0
- data/guides/source/active_support_instrumentation.md +552 -0
- data/guides/source/api_app.md +426 -0
- data/guides/source/api_documentation_guidelines.md +366 -0
- data/guides/source/asset_pipeline.md +1299 -0
- data/guides/source/association_basics.md +2467 -0
- data/guides/source/autoloading_and_reloading_constants.md +1323 -0
- data/guides/source/caching_with_rails.md +615 -0
- data/guides/source/command_line.md +664 -0
- data/guides/source/configuring.md +1341 -0
- data/guides/source/contributing_to_ruby_on_rails.md +667 -0
- data/guides/source/credits.html.erb +80 -0
- data/guides/source/debugging_rails_applications.md +954 -0
- data/guides/source/development_dependencies_install.md +378 -0
- data/guides/source/documents.yaml +230 -0
- data/guides/source/engines.md +1527 -0
- data/guides/source/form_helpers.md +1023 -0
- data/guides/source/generators.md +716 -0
- data/guides/source/getting_started.md +2100 -0
- data/guides/source/i18n.md +1208 -0
- data/guides/source/index.html.erb +28 -0
- data/guides/source/initialization.md +712 -0
- data/guides/source/kindle/copyright.html.erb +1 -0
- data/guides/source/kindle/layout.html.erb +27 -0
- data/guides/source/kindle/rails_guides.opf.erb +52 -0
- data/guides/source/kindle/toc.html.erb +24 -0
- data/guides/source/kindle/toc.ncx.erb +64 -0
- data/guides/source/kindle/welcome.html.erb +7 -0
- data/guides/source/layout.html.erb +138 -0
- data/guides/source/layouts_and_rendering.md +1330 -0
- data/guides/source/maintenance_policy.md +80 -0
- data/guides/source/plugins.md +484 -0
- data/guides/source/rails_application_templates.md +282 -0
- data/guides/source/rails_on_rack.md +310 -0
- data/guides/source/routing.md +1182 -0
- data/guides/source/ruby_on_rails_guides_guidelines.md +173 -0
- data/guides/source/security.md +1066 -0
- data/guides/source/testing.md +1566 -0
- data/guides/source/upgrading_ruby_on_rails.md +1552 -0
- data/guides/source/working_with_javascript_in_rails.md +550 -0
- data/guides/w3c_validator.rb +98 -0
- data/rails.gemspec +36 -0
- data/railties/.gitignore +1 -0
- data/railties/CHANGELOG.md +129 -0
- data/railties/MIT-LICENSE +20 -0
- data/railties/RDOC_MAIN.rdoc +73 -0
- data/railties/README.rdoc +40 -0
- data/railties/Rakefile +37 -0
- data/railties/bin/test +5 -0
- data/railties/exe/rails +10 -0
- data/railties/lib/minitest/rails_plugin.rb +54 -0
- data/railties/lib/rails.rb +114 -0
- data/railties/lib/rails/all.rb +20 -0
- data/railties/lib/rails/api/generator.rb +37 -0
- data/railties/lib/rails/api/task.rb +185 -0
- data/railties/lib/rails/app_loader.rb +77 -0
- data/railties/lib/rails/app_updater.rb +33 -0
- data/railties/lib/rails/application.rb +531 -0
- data/railties/lib/rails/application/bootstrap.rb +89 -0
- data/railties/lib/rails/application/configuration.rb +252 -0
- data/railties/lib/rails/application/default_middleware_stack.rb +101 -0
- data/railties/lib/rails/application/finisher.rb +196 -0
- data/railties/lib/rails/application/routes_reloader.rb +71 -0
- data/railties/lib/rails/application_controller.rb +18 -0
- data/railties/lib/rails/backtrace_cleaner.rb +34 -0
- data/railties/lib/rails/cli.rb +19 -0
- data/railties/lib/rails/code_statistics.rb +115 -0
- data/railties/lib/rails/code_statistics_calculator.rb +88 -0
- data/railties/lib/rails/command.rb +113 -0
- data/railties/lib/rails/command/actions.rb +44 -0
- data/railties/lib/rails/command/base.rb +157 -0
- data/railties/lib/rails/command/behavior.rb +125 -0
- data/railties/lib/rails/command/environment_argument.rb +47 -0
- data/railties/lib/rails/commands.rb +18 -0
- data/railties/lib/rails/commands/application/application_command.rb +31 -0
- data/railties/lib/rails/commands/console/console_command.rb +100 -0
- data/railties/lib/rails/commands/dbconsole/dbconsole_command.rb +170 -0
- data/railties/lib/rails/commands/destroy/destroy_command.rb +28 -0
- data/railties/lib/rails/commands/generate/generate_command.rb +30 -0
- data/railties/lib/rails/commands/help/USAGE +16 -0
- data/railties/lib/rails/commands/help/help_command.rb +15 -0
- data/railties/lib/rails/commands/new/new_command.rb +19 -0
- data/railties/lib/rails/commands/plugin/plugin_command.rb +45 -0
- data/railties/lib/rails/commands/rake/rake_command.rb +51 -0
- data/railties/lib/rails/commands/runner/USAGE +20 -0
- data/railties/lib/rails/commands/runner/runner_command.rb +53 -0
- data/railties/lib/rails/commands/secrets/USAGE +60 -0
- data/railties/lib/rails/commands/secrets/secrets_command.rb +66 -0
- data/railties/lib/rails/commands/server/server_command.rb +243 -0
- data/railties/lib/rails/commands/test/test_command.rb +37 -0
- data/railties/lib/rails/commands/version/version_command.rb +11 -0
- data/railties/lib/rails/configuration.rb +137 -0
- data/railties/lib/rails/console/app.rb +38 -0
- data/railties/lib/rails/console/helpers.rb +19 -0
- data/railties/lib/rails/dev_caching.rb +44 -0
- data/railties/lib/rails/engine.rb +705 -0
- data/railties/lib/rails/engine/commands.rb +9 -0
- data/railties/lib/rails/engine/configuration.rb +88 -0
- data/railties/lib/rails/engine/railties.rb +23 -0
- data/railties/lib/rails/engine/updater.rb +21 -0
- data/railties/lib/rails/gem_version.rb +17 -0
- data/railties/lib/rails/generators.rb +319 -0
- data/railties/lib/rails/generators/actions.rb +326 -0
- data/railties/lib/rails/generators/actions/create_migration.rb +71 -0
- data/railties/lib/rails/generators/active_model.rb +80 -0
- data/railties/lib/rails/generators/app_base.rb +447 -0
- data/railties/lib/rails/generators/base.rb +417 -0
- data/railties/lib/rails/generators/css/assets/assets_generator.rb +15 -0
- data/railties/lib/rails/generators/css/assets/templates/stylesheet.css +4 -0
- data/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb +18 -0
- data/railties/lib/rails/generators/erb.rb +27 -0
- data/railties/lib/rails/generators/erb/controller/controller_generator.rb +24 -0
- data/railties/lib/rails/generators/erb/controller/templates/view.html.erb +2 -0
- data/railties/lib/rails/generators/erb/mailer/mailer_generator.rb +42 -0
- data/railties/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +13 -0
- data/railties/lib/rails/generators/erb/mailer/templates/layout.text.erb.tt +1 -0
- data/railties/lib/rails/generators/erb/mailer/templates/view.html.erb +5 -0
- data/railties/lib/rails/generators/erb/mailer/templates/view.text.erb +3 -0
- data/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb +33 -0
- data/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb +34 -0
- data/railties/lib/rails/generators/erb/scaffold/templates/edit.html.erb +6 -0
- data/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +31 -0
- data/railties/lib/rails/generators/erb/scaffold/templates/new.html.erb +5 -0
- data/railties/lib/rails/generators/erb/scaffold/templates/show.html.erb +11 -0
- data/railties/lib/rails/generators/generated_attribute.rb +177 -0
- data/railties/lib/rails/generators/js/assets/assets_generator.rb +15 -0
- data/railties/lib/rails/generators/js/assets/templates/javascript.js +2 -0
- data/railties/lib/rails/generators/migration.rb +71 -0
- data/railties/lib/rails/generators/model_helpers.rb +30 -0
- data/railties/lib/rails/generators/named_base.rb +207 -0
- data/railties/lib/rails/generators/rails/app/USAGE +14 -0
- data/railties/lib/rails/generators/rails/app/app_generator.rb +579 -0
- data/railties/lib/rails/generators/rails/app/templates/Gemfile +69 -0
- data/railties/lib/rails/generators/rails/app/templates/README.md +24 -0
- data/railties/lib/rails/generators/rails/app/templates/Rakefile +6 -0
- data/railties/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +5 -0
- data/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +20 -0
- data/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.js +13 -0
- data/railties/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +15 -0
- data/railties/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +2 -0
- data/railties/lib/rails/generators/rails/app/templates/app/helpers/application_helper.rb +2 -0
- data/railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb +2 -0
- data/railties/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/app/models/application_record.rb +3 -0
- data/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +23 -0
- data/railties/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +13 -0
- data/railties/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.text.erb.tt +1 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/bundle +2 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/rails +3 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/rake +3 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/setup.tt +39 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/update.tt +29 -0
- data/railties/lib/rails/generators/rails/app/templates/bin/yarn +10 -0
- data/railties/lib/rails/generators/rails/app/templates/config.ru +5 -0
- data/railties/lib/rails/generators/rails/app/templates/config/application.rb +44 -0
- data/railties/lib/rails/generators/rails/app/templates/config/boot.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/config/cable.yml +10 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml +50 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml +86 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml +69 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml +53 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml +69 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml +24 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml +58 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml +61 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml +85 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml +25 -0
- data/railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml +52 -0
- data/railties/lib/rails/generators/rails/app/templates/config/environment.rb +5 -0
- data/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +64 -0
- data/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +107 -0
- data/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +47 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb +8 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +16 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb +7 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb +5 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/cors.rb +16 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb +16 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb +4 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_5_2.rb.tt +27 -0
- data/railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +16 -0
- data/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml +33 -0
- data/railties/lib/rails/generators/rails/app/templates/config/puma.rb +56 -0
- data/railties/lib/rails/generators/rails/app/templates/config/routes.rb +3 -0
- data/railties/lib/rails/generators/rails/app/templates/config/secrets.yml +32 -0
- data/railties/lib/rails/generators/rails/app/templates/config/spring.rb +6 -0
- data/railties/lib/rails/generators/rails/app/templates/config/storage.yml +35 -0
- data/railties/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +7 -0
- data/railties/lib/rails/generators/rails/app/templates/gitignore +35 -0
- data/railties/lib/rails/generators/rails/app/templates/package.json +5 -0
- data/railties/lib/rails/generators/rails/app/templates/public/404.html +67 -0
- data/railties/lib/rails/generators/rails/app/templates/public/422.html +67 -0
- data/railties/lib/rails/generators/rails/app/templates/public/500.html +66 -0
- data/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png +0 -0
- data/railties/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png +0 -0
- data/railties/lib/rails/generators/rails/app/templates/public/favicon.ico +0 -0
- data/railties/lib/rails/generators/rails/app/templates/public/robots.txt +1 -0
- data/railties/lib/rails/generators/rails/app/templates/ruby-version +1 -0
- data/railties/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb +5 -0
- data/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb +11 -0
- data/railties/lib/rails/generators/rails/application_record/application_record_generator.rb +9 -0
- data/railties/lib/rails/generators/rails/assets/USAGE +20 -0
- data/railties/lib/rails/generators/rails/assets/assets_generator.rb +27 -0
- data/railties/lib/rails/generators/rails/assets/templates/javascript.js +2 -0
- data/railties/lib/rails/generators/rails/assets/templates/stylesheet.css +4 -0
- data/railties/lib/rails/generators/rails/controller/USAGE +18 -0
- data/railties/lib/rails/generators/rails/controller/controller_generator.rb +66 -0
- data/railties/lib/rails/generators/rails/controller/templates/controller.rb +13 -0
- data/railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb +72 -0
- data/railties/lib/rails/generators/rails/generator/USAGE +13 -0
- data/railties/lib/rails/generators/rails/generator/generator_generator.rb +28 -0
- data/railties/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +3 -0
- data/railties/lib/rails/generators/rails/generator/templates/USAGE.tt +8 -0
- data/railties/lib/rails/generators/rails/generator/templates/templates/.empty_directory +0 -0
- data/railties/lib/rails/generators/rails/helper/USAGE +13 -0
- data/railties/lib/rails/generators/rails/helper/helper_generator.rb +15 -0
- data/railties/lib/rails/generators/rails/helper/templates/helper.rb +4 -0
- data/railties/lib/rails/generators/rails/integration_test/USAGE +10 -0
- data/railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb +9 -0
- data/railties/lib/rails/generators/rails/migration/USAGE +35 -0
- data/railties/lib/rails/generators/rails/migration/migration_generator.rb +10 -0
- data/railties/lib/rails/generators/rails/model/USAGE +114 -0
- data/railties/lib/rails/generators/rails/model/model_generator.rb +14 -0
- data/railties/lib/rails/generators/rails/plugin/USAGE +10 -0
- data/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +450 -0
- data/railties/lib/rails/generators/rails/plugin/templates/%name%.gemspec +24 -0
- data/railties/lib/rails/generators/rails/plugin/templates/Gemfile +48 -0
- data/railties/lib/rails/generators/rails/plugin/templates/MIT-LICENSE +20 -0
- data/railties/lib/rails/generators/rails/plugin/templates/README.md +28 -0
- data/railties/lib/rails/generators/rails/plugin/templates/Rakefile +28 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +6 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/helpers/%namespaced_name%/application_helper.rb.tt +5 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/jobs/%namespaced_name%/application_job.rb.tt +5 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +7 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt +6 -0
- data/railties/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +14 -0
- data/railties/lib/rails/generators/rails/plugin/templates/bin/rails.tt +30 -0
- data/railties/lib/rails/generators/rails/plugin/templates/bin/test.tt +4 -0
- data/railties/lib/rails/generators/rails/plugin/templates/config/routes.rb +6 -0
- data/railties/lib/rails/generators/rails/plugin/templates/gitignore +15 -0
- data/railties/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb +7 -0
- data/railties/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb +7 -0
- data/railties/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/railtie.rb +5 -0
- data/railties/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb +1 -0
- data/railties/lib/rails/generators/rails/plugin/templates/lib/tasks/%namespaced_name%_tasks.rake +4 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb +23 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/boot.rb +5 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js +10 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js +6 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/javascripts.js +13 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/routes.rb +3 -0
- data/railties/lib/rails/generators/rails/plugin/templates/rails/stylesheets.css +15 -0
- data/railties/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb +7 -0
- data/railties/lib/rails/generators/rails/plugin/templates/test/application_system_test_case.rb +5 -0
- data/railties/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb +7 -0
- data/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +26 -0
- data/railties/lib/rails/generators/rails/resource/USAGE +23 -0
- data/railties/lib/rails/generators/rails/resource/resource_generator.rb +21 -0
- data/railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb +48 -0
- data/railties/lib/rails/generators/rails/scaffold/USAGE +41 -0
- data/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb +36 -0
- data/railties/lib/rails/generators/rails/scaffold/templates/scaffold.css +80 -0
- data/railties/lib/rails/generators/rails/scaffold_controller/USAGE +19 -0
- data/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +37 -0
- data/railties/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb +61 -0
- data/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +68 -0
- data/railties/lib/rails/generators/rails/system_test/USAGE +10 -0
- data/railties/lib/rails/generators/rails/system_test/system_test_generator.rb +9 -0
- data/railties/lib/rails/generators/rails/task/USAGE +9 -0
- data/railties/lib/rails/generators/rails/task/task_generator.rb +13 -0
- data/railties/lib/rails/generators/rails/task/templates/task.rb +8 -0
- data/railties/lib/rails/generators/resource_helpers.rb +87 -0
- data/railties/lib/rails/generators/test_case.rb +37 -0
- data/railties/lib/rails/generators/test_unit.rb +10 -0
- data/railties/lib/rails/generators/test_unit/controller/controller_generator.rb +17 -0
- data/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb +25 -0
- data/railties/lib/rails/generators/test_unit/generator/generator_generator.rb +28 -0
- data/railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb +18 -0
- data/railties/lib/rails/generators/test_unit/helper/helper_generator.rb +11 -0
- data/railties/lib/rails/generators/test_unit/integration/integration_generator.rb +15 -0
- data/railties/lib/rails/generators/test_unit/integration/templates/integration_test.rb +11 -0
- data/railties/lib/rails/generators/test_unit/job/job_generator.rb +15 -0
- data/railties/lib/rails/generators/test_unit/job/templates/unit_test.rb.erb +9 -0
- data/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb +28 -0
- data/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb +23 -0
- data/railties/lib/rails/generators/test_unit/mailer/templates/preview.rb +15 -0
- data/railties/lib/rails/generators/test_unit/model/model_generator.rb +37 -0
- data/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml +29 -0
- data/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb +11 -0
- data/railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb +15 -0
- data/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +7 -0
- data/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +4 -0
- data/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +59 -0
- data/railties/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb +46 -0
- data/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +56 -0
- data/railties/lib/rails/generators/test_unit/scaffold/templates/system_test.rb +51 -0
- data/railties/lib/rails/generators/test_unit/system/system_generator.rb +19 -0
- data/railties/lib/rails/generators/test_unit/system/templates/application_system_test_case.rb +7 -0
- data/railties/lib/rails/generators/test_unit/system/templates/system_test.rb +11 -0
- data/railties/lib/rails/generators/testing/assertions.rb +127 -0
- data/railties/lib/rails/generators/testing/behaviour.rb +111 -0
- data/railties/lib/rails/generators/testing/setup_and_teardown.rb +20 -0
- data/railties/lib/rails/info.rb +105 -0
- data/railties/lib/rails/info_controller.rb +46 -0
- data/railties/lib/rails/initializable.rb +95 -0
- data/railties/lib/rails/mailers_controller.rb +87 -0
- data/railties/lib/rails/paths.rb +227 -0
- data/railties/lib/rails/plugin/test.rb +9 -0
- data/railties/lib/rails/rack.rb +7 -0
- data/railties/lib/rails/rack/logger.rb +80 -0
- data/railties/lib/rails/railtie.rb +260 -0
- data/railties/lib/rails/railtie/configurable.rb +37 -0
- data/railties/lib/rails/railtie/configuration.rb +102 -0
- data/railties/lib/rails/ruby_version_check.rb +15 -0
- data/railties/lib/rails/secrets.rb +123 -0
- data/railties/lib/rails/source_annotation_extractor.rb +141 -0
- data/railties/lib/rails/tasks.rb +22 -0
- data/railties/lib/rails/tasks/annotations.rake +22 -0
- data/railties/lib/rails/tasks/dev.rake +10 -0
- data/railties/lib/rails/tasks/engine.rake +85 -0
- data/railties/lib/rails/tasks/framework.rake +58 -0
- data/railties/lib/rails/tasks/initializers.rake +8 -0
- data/railties/lib/rails/tasks/log.rake +42 -0
- data/railties/lib/rails/tasks/middleware.rake +9 -0
- data/railties/lib/rails/tasks/misc.rake +79 -0
- data/railties/lib/rails/tasks/restart.rake +9 -0
- data/railties/lib/rails/tasks/routes.rake +31 -0
- data/railties/lib/rails/tasks/statistics.rake +31 -0
- data/railties/lib/rails/tasks/tmp.rake +44 -0
- data/railties/lib/rails/tasks/yarn.rake +13 -0
- data/railties/lib/rails/templates/layouts/application.html.erb +36 -0
- data/railties/lib/rails/templates/rails/info/properties.html.erb +1 -0
- data/railties/lib/rails/templates/rails/info/routes.html.erb +9 -0
- data/railties/lib/rails/templates/rails/mailers/email.html.erb +133 -0
- data/railties/lib/rails/templates/rails/mailers/index.html.erb +8 -0
- data/railties/lib/rails/templates/rails/mailers/mailer.html.erb +6 -0
- data/railties/lib/rails/templates/rails/welcome/index.html.erb +74 -0
- data/railties/lib/rails/test_help.rb +52 -0
- data/railties/lib/rails/test_unit/line_filtering.rb +13 -0
- data/railties/lib/rails/test_unit/railtie.rb +29 -0
- data/railties/lib/rails/test_unit/reporter.rb +104 -0
- data/railties/lib/rails/test_unit/runner.rb +143 -0
- data/railties/lib/rails/test_unit/testing.rake +58 -0
- data/railties/lib/rails/version.rb +10 -0
- data/railties/lib/rails/welcome_controller.rb +10 -0
- data/railties/railties.gemspec +41 -0
- data/railties/test/abstract_unit.rb +33 -0
- data/railties/test/app_loader_test.rb +91 -0
- data/railties/test/application/asset_debugging_test.rb +171 -0
- data/railties/test/application/assets_test.rb +524 -0
- data/railties/test/application/bin_setup_test.rb +62 -0
- data/railties/test/application/configuration/custom_test.rb +47 -0
- data/railties/test/application/configuration_test.rb +1816 -0
- data/railties/test/application/console_test.rb +158 -0
- data/railties/test/application/current_attributes_integration_test.rb +86 -0
- data/railties/test/application/dbconsole_test.rb +78 -0
- data/railties/test/application/generators_test.rb +200 -0
- data/railties/test/application/help_test.rb +25 -0
- data/railties/test/application/initializers/frameworks_test.rb +276 -0
- data/railties/test/application/initializers/hooks_test.rb +91 -0
- data/railties/test/application/initializers/i18n_test.rb +296 -0
- data/railties/test/application/initializers/load_path_test.rb +111 -0
- data/railties/test/application/initializers/notifications_test.rb +57 -0
- data/railties/test/application/integration_test_case_test.rb +75 -0
- data/railties/test/application/loading_test.rb +373 -0
- data/railties/test/application/mailer_previews_test.rb +787 -0
- data/railties/test/application/middleware/cache_test.rb +181 -0
- data/railties/test/application/middleware/cookies_test.rb +48 -0
- data/railties/test/application/middleware/exceptions_test.rb +140 -0
- data/railties/test/application/middleware/remote_ip_test.rb +80 -0
- data/railties/test/application/middleware/sendfile_test.rb +75 -0
- data/railties/test/application/middleware/session_test.rb +459 -0
- data/railties/test/application/middleware/static_test.rb +70 -0
- data/railties/test/application/middleware_test.rb +312 -0
- data/railties/test/application/multiple_applications_test.rb +177 -0
- data/railties/test/application/paths_test.rb +84 -0
- data/railties/test/application/per_request_digest_cache_test.rb +72 -0
- data/railties/test/application/rack/logger_test.rb +58 -0
- data/railties/test/application/rackup_test.rb +44 -0
- data/railties/test/application/rake/dbs_test.rb +320 -0
- data/railties/test/application/rake/dev_test.rb +49 -0
- data/railties/test/application/rake/framework_test.rb +48 -0
- data/railties/test/application/rake/log_test.rb +35 -0
- data/railties/test/application/rake/migrations_test.rb +306 -0
- data/railties/test/application/rake/notes_test.rb +171 -0
- data/railties/test/application/rake/restart_test.rb +40 -0
- data/railties/test/application/rake/tmp_test.rb +45 -0
- data/railties/test/application/rake_test.rb +425 -0
- data/railties/test/application/rendering_test.rb +46 -0
- data/railties/test/application/routing_test.rb +682 -0
- data/railties/test/application/runner_test.rb +135 -0
- data/railties/test/application/server_test.rb +61 -0
- data/railties/test/application/test_runner_test.rb +771 -0
- data/railties/test/application/test_test.rb +340 -0
- data/railties/test/application/url_generation_test.rb +59 -0
- data/railties/test/application/version_test.rb +26 -0
- data/railties/test/backtrace_cleaner_test.rb +34 -0
- data/railties/test/code_statistics_calculator_test.rb +332 -0
- data/railties/test/code_statistics_test.rb +34 -0
- data/railties/test/command/base_test.rb +13 -0
- data/railties/test/commands/console_test.rb +192 -0
- data/railties/test/commands/dbconsole_test.rb +355 -0
- data/railties/test/commands/secrets_test.rb +49 -0
- data/railties/test/commands/server_test.rb +204 -0
- data/railties/test/configuration/middleware_stack_proxy_test.rb +63 -0
- data/railties/test/console_helpers.rb +25 -0
- data/railties/test/engine/commands_test.rb +80 -0
- data/railties/test/engine_test.rb +27 -0
- data/railties/test/env_helpers.rb +32 -0
- data/railties/test/fixtures/about_yml_plugins/bad_about_yml/about.yml +1 -0
- data/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +3 -0
- data/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +3 -0
- data/railties/test/fixtures/lib/create_test_dummy_template.rb +3 -0
- data/railties/test/fixtures/lib/generators/active_record/fixjour_generator.rb +10 -0
- data/railties/test/fixtures/lib/generators/fixjour_generator.rb +4 -0
- data/railties/test/fixtures/lib/generators/model_generator.rb +3 -0
- data/railties/test/fixtures/lib/generators/usage_template/USAGE +1 -0
- data/railties/test/fixtures/lib/generators/usage_template/usage_template_generator.rb +7 -0
- data/railties/test/fixtures/lib/rails/generators/foobar/foobar_generator.rb +6 -0
- data/railties/test/fixtures/lib/template.rb +3 -0
- data/railties/test/generators/actions_test.rb +442 -0
- data/railties/test/generators/api_app_generator_test.rb +164 -0
- data/railties/test/generators/app_generator_test.rb +823 -0
- data/railties/test/generators/application_record_generator_test.rb +16 -0
- data/railties/test/generators/argv_scrubber_test.rb +138 -0
- data/railties/test/generators/assets_generator_test.rb +21 -0
- data/railties/test/generators/channel_generator_test.rb +79 -0
- data/railties/test/generators/controller_generator_test.rb +112 -0
- data/railties/test/generators/create_migration_test.rb +136 -0
- data/railties/test/generators/encrypted_secrets_generator_test.rb +44 -0
- data/railties/test/generators/generated_attribute_test.rb +154 -0
- data/railties/test/generators/generator_generator_test.rb +73 -0
- data/railties/test/generators/generator_test.rb +102 -0
- data/railties/test/generators/generators_test_helper.rb +51 -0
- data/railties/test/generators/helper_generator_test.rb +41 -0
- data/railties/test/generators/integration_test_generator_test.rb +18 -0
- data/railties/test/generators/job_generator_test.rb +38 -0
- data/railties/test/generators/mailer_generator_test.rb +179 -0
- data/railties/test/generators/migration_generator_test.rb +356 -0
- data/railties/test/generators/model_generator_test.rb +469 -0
- data/railties/test/generators/named_base_test.rb +141 -0
- data/railties/test/generators/namespaced_generators_test.rb +436 -0
- data/railties/test/generators/orm_test.rb +40 -0
- data/railties/test/generators/plugin_generator_test.rb +756 -0
- data/railties/test/generators/plugin_test_helper.rb +26 -0
- data/railties/test/generators/plugin_test_runner_test.rb +116 -0
- data/railties/test/generators/resource_generator_test.rb +90 -0
- data/railties/test/generators/scaffold_controller_generator_test.rb +254 -0
- data/railties/test/generators/scaffold_generator_test.rb +652 -0
- data/railties/test/generators/shared_generator_tests.rb +270 -0
- data/railties/test/generators/system_test_generator_test.rb +19 -0
- data/railties/test/generators/task_generator_test.rb +26 -0
- data/railties/test/generators/test_runner_in_engine_test.rb +34 -0
- data/railties/test/generators_test.rb +248 -0
- data/railties/test/initializable_test.rb +236 -0
- data/railties/test/isolation/abstract_unit.rb +332 -0
- data/railties/test/json_params_parsing_test.rb +51 -0
- data/railties/test/path_generation_test.rb +85 -0
- data/railties/test/paths_test.rb +298 -0
- data/railties/test/rack_logger_test.rb +77 -0
- data/railties/test/rails_info_controller_test.rb +89 -0
- data/railties/test/rails_info_test.rb +73 -0
- data/railties/test/railties/engine_test.rb +1476 -0
- data/railties/test/railties/generators_test.rb +132 -0
- data/railties/test/railties/mounted_engine_test.rb +281 -0
- data/railties/test/railties/railtie_test.rb +216 -0
- data/railties/test/secrets_test.rb +178 -0
- data/railties/test/test_unit/reporter_test.rb +198 -0
- data/railties/test/version_test.rb +14 -0
- data/tasks/release.rb +253 -0
- data/tasks/release_announcement_draft.erb +38 -0
- data/tools/README.md +10 -0
- data/tools/console +11 -0
- data/tools/line_statistics +42 -0
- data/tools/profile +138 -0
- data/tools/test.rb +26 -0
- data/version.rb +17 -0
- metadata +3544 -0
@@ -0,0 +1,122 @@
|
|
1
|
+
/*
|
2
|
+
* Metadata - jQuery plugin for parsing metadata from elements
|
3
|
+
*
|
4
|
+
* Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
|
5
|
+
*
|
6
|
+
* Dual licensed under the MIT and GPL licenses:
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
* http://www.gnu.org/licenses/gpl.html
|
9
|
+
*
|
10
|
+
* Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Sets the type of metadata to use. Metadata is encoded in JSON, and each property
|
16
|
+
* in the JSON will become a property of the element itself.
|
17
|
+
*
|
18
|
+
* There are three supported types of metadata storage:
|
19
|
+
*
|
20
|
+
* attr: Inside an attribute. The name parameter indicates *which* attribute.
|
21
|
+
*
|
22
|
+
* class: Inside the class attribute, wrapped in curly braces: { }
|
23
|
+
*
|
24
|
+
* elem: Inside a child element (e.g. a script tag). The
|
25
|
+
* name parameter indicates *which* element.
|
26
|
+
*
|
27
|
+
* The metadata for an element is loaded the first time the element is accessed via jQuery.
|
28
|
+
*
|
29
|
+
* As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
|
30
|
+
* matched by expr, then redefine the metadata type and run another $(expr) for other elements.
|
31
|
+
*
|
32
|
+
* @name $.metadata.setType
|
33
|
+
*
|
34
|
+
* @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
|
35
|
+
* @before $.metadata.setType("class")
|
36
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
37
|
+
* @desc Reads metadata from the class attribute
|
38
|
+
*
|
39
|
+
* @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
|
40
|
+
* @before $.metadata.setType("attr", "data")
|
41
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
42
|
+
* @desc Reads metadata from a "data" attribute
|
43
|
+
*
|
44
|
+
* @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
|
45
|
+
* @before $.metadata.setType("elem", "script")
|
46
|
+
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
|
47
|
+
* @desc Reads metadata from a nested script element
|
48
|
+
*
|
49
|
+
* @param String type The encoding type
|
50
|
+
* @param String name The name of the attribute to be used to get metadata (optional)
|
51
|
+
* @cat Plugins/Metadata
|
52
|
+
* @descr Sets the type of encoding to be used when loading metadata for the first time
|
53
|
+
* @type undefined
|
54
|
+
* @see metadata()
|
55
|
+
*/
|
56
|
+
|
57
|
+
(function($) {
|
58
|
+
|
59
|
+
$.extend({
|
60
|
+
metadata : {
|
61
|
+
defaults : {
|
62
|
+
type: 'class',
|
63
|
+
name: 'metadata',
|
64
|
+
cre: /({.*})/,
|
65
|
+
single: 'metadata'
|
66
|
+
},
|
67
|
+
setType: function( type, name ){
|
68
|
+
this.defaults.type = type;
|
69
|
+
this.defaults.name = name;
|
70
|
+
},
|
71
|
+
get: function( elem, opts ){
|
72
|
+
var settings = $.extend({},this.defaults,opts);
|
73
|
+
// check for empty string in single property
|
74
|
+
if ( !settings.single.length ) settings.single = 'metadata';
|
75
|
+
|
76
|
+
var data = $.data(elem, settings.single);
|
77
|
+
// returned cached data if it already exists
|
78
|
+
if ( data ) return data;
|
79
|
+
|
80
|
+
data = "{}";
|
81
|
+
|
82
|
+
if ( settings.type == "class" ) {
|
83
|
+
var m = settings.cre.exec( elem.className );
|
84
|
+
if ( m )
|
85
|
+
data = m[1];
|
86
|
+
} else if ( settings.type == "elem" ) {
|
87
|
+
if( !elem.getElementsByTagName )
|
88
|
+
return undefined;
|
89
|
+
var e = elem.getElementsByTagName(settings.name);
|
90
|
+
if ( e.length )
|
91
|
+
data = $.trim(e[0].innerHTML);
|
92
|
+
} else if ( elem.getAttribute != undefined ) {
|
93
|
+
var attr = elem.getAttribute( settings.name );
|
94
|
+
if ( attr )
|
95
|
+
data = attr;
|
96
|
+
}
|
97
|
+
|
98
|
+
if ( data.indexOf( '{' ) <0 )
|
99
|
+
data = "{" + data + "}";
|
100
|
+
|
101
|
+
data = eval("(" + data + ")");
|
102
|
+
|
103
|
+
$.data( elem, settings.single, data );
|
104
|
+
return data;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
});
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Returns the metadata object for the first member of the jQuery object.
|
111
|
+
*
|
112
|
+
* @name metadata
|
113
|
+
* @descr Returns element's metadata object
|
114
|
+
* @param Object opts An object containing settings to override the defaults
|
115
|
+
* @type jQuery
|
116
|
+
* @cat Plugins/Metadata
|
117
|
+
*/
|
118
|
+
$.fn.metadata = function( opts ){
|
119
|
+
return $.metadata.get( this[0], opts );
|
120
|
+
};
|
121
|
+
|
122
|
+
})(jQuery);
|
@@ -0,0 +1,237 @@
|
|
1
|
+
/*!
|
2
|
+
* QUnit 1.14.0
|
3
|
+
* http://qunitjs.com/
|
4
|
+
*
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
* Date: 2014-01-31T16:40Z
|
10
|
+
*/
|
11
|
+
|
12
|
+
/** Font Family and Sizes */
|
13
|
+
|
14
|
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
15
|
+
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
16
|
+
}
|
17
|
+
|
18
|
+
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
19
|
+
#qunit-tests { font-size: smaller; }
|
20
|
+
|
21
|
+
|
22
|
+
/** Resets */
|
23
|
+
|
24
|
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
25
|
+
margin: 0;
|
26
|
+
padding: 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
/** Header */
|
31
|
+
|
32
|
+
#qunit-header {
|
33
|
+
padding: 0.5em 0 0.5em 1em;
|
34
|
+
|
35
|
+
color: #8699A4;
|
36
|
+
background-color: #0D3349;
|
37
|
+
|
38
|
+
font-size: 1.5em;
|
39
|
+
line-height: 1em;
|
40
|
+
font-weight: 400;
|
41
|
+
|
42
|
+
border-radius: 5px 5px 0 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
#qunit-header a {
|
46
|
+
text-decoration: none;
|
47
|
+
color: #C2CCD1;
|
48
|
+
}
|
49
|
+
|
50
|
+
#qunit-header a:hover,
|
51
|
+
#qunit-header a:focus {
|
52
|
+
color: #FFF;
|
53
|
+
}
|
54
|
+
|
55
|
+
#qunit-testrunner-toolbar label {
|
56
|
+
display: inline-block;
|
57
|
+
padding: 0 0.5em 0 0.1em;
|
58
|
+
}
|
59
|
+
|
60
|
+
#qunit-banner {
|
61
|
+
height: 5px;
|
62
|
+
}
|
63
|
+
|
64
|
+
#qunit-testrunner-toolbar {
|
65
|
+
padding: 0.5em 0 0.5em 2em;
|
66
|
+
color: #5E740B;
|
67
|
+
background-color: #EEE;
|
68
|
+
overflow: hidden;
|
69
|
+
}
|
70
|
+
|
71
|
+
#qunit-userAgent {
|
72
|
+
padding: 0.5em 0 0.5em 2.5em;
|
73
|
+
background-color: #2B81AF;
|
74
|
+
color: #FFF;
|
75
|
+
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
76
|
+
}
|
77
|
+
|
78
|
+
#qunit-modulefilter-container {
|
79
|
+
float: right;
|
80
|
+
}
|
81
|
+
|
82
|
+
/** Tests: Pass/Fail */
|
83
|
+
|
84
|
+
#qunit-tests {
|
85
|
+
list-style-position: inside;
|
86
|
+
}
|
87
|
+
|
88
|
+
#qunit-tests li {
|
89
|
+
padding: 0.4em 0.5em 0.4em 2.5em;
|
90
|
+
border-bottom: 1px solid #FFF;
|
91
|
+
list-style-position: inside;
|
92
|
+
}
|
93
|
+
|
94
|
+
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
95
|
+
display: none;
|
96
|
+
}
|
97
|
+
|
98
|
+
#qunit-tests li strong {
|
99
|
+
cursor: pointer;
|
100
|
+
}
|
101
|
+
|
102
|
+
#qunit-tests li a {
|
103
|
+
padding: 0.5em;
|
104
|
+
color: #C2CCD1;
|
105
|
+
text-decoration: none;
|
106
|
+
}
|
107
|
+
#qunit-tests li a:hover,
|
108
|
+
#qunit-tests li a:focus {
|
109
|
+
color: #000;
|
110
|
+
}
|
111
|
+
|
112
|
+
#qunit-tests li .runtime {
|
113
|
+
float: right;
|
114
|
+
font-size: smaller;
|
115
|
+
}
|
116
|
+
|
117
|
+
.qunit-assert-list {
|
118
|
+
margin-top: 0.5em;
|
119
|
+
padding: 0.5em;
|
120
|
+
|
121
|
+
background-color: #FFF;
|
122
|
+
|
123
|
+
border-radius: 5px;
|
124
|
+
}
|
125
|
+
|
126
|
+
.qunit-collapsed {
|
127
|
+
display: none;
|
128
|
+
}
|
129
|
+
|
130
|
+
#qunit-tests table {
|
131
|
+
border-collapse: collapse;
|
132
|
+
margin-top: 0.2em;
|
133
|
+
}
|
134
|
+
|
135
|
+
#qunit-tests th {
|
136
|
+
text-align: right;
|
137
|
+
vertical-align: top;
|
138
|
+
padding: 0 0.5em 0 0;
|
139
|
+
}
|
140
|
+
|
141
|
+
#qunit-tests td {
|
142
|
+
vertical-align: top;
|
143
|
+
}
|
144
|
+
|
145
|
+
#qunit-tests pre {
|
146
|
+
margin: 0;
|
147
|
+
white-space: pre-wrap;
|
148
|
+
word-wrap: break-word;
|
149
|
+
}
|
150
|
+
|
151
|
+
#qunit-tests del {
|
152
|
+
background-color: #E0F2BE;
|
153
|
+
color: #374E0C;
|
154
|
+
text-decoration: none;
|
155
|
+
}
|
156
|
+
|
157
|
+
#qunit-tests ins {
|
158
|
+
background-color: #FFCACA;
|
159
|
+
color: #500;
|
160
|
+
text-decoration: none;
|
161
|
+
}
|
162
|
+
|
163
|
+
/*** Test Counts */
|
164
|
+
|
165
|
+
#qunit-tests b.counts { color: #000; }
|
166
|
+
#qunit-tests b.passed { color: #5E740B; }
|
167
|
+
#qunit-tests b.failed { color: #710909; }
|
168
|
+
|
169
|
+
#qunit-tests li li {
|
170
|
+
padding: 5px;
|
171
|
+
background-color: #FFF;
|
172
|
+
border-bottom: none;
|
173
|
+
list-style-position: inside;
|
174
|
+
}
|
175
|
+
|
176
|
+
/*** Passing Styles */
|
177
|
+
|
178
|
+
#qunit-tests li li.pass {
|
179
|
+
color: #3C510C;
|
180
|
+
background-color: #FFF;
|
181
|
+
border-left: 10px solid #C6E746;
|
182
|
+
}
|
183
|
+
|
184
|
+
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
185
|
+
#qunit-tests .pass .test-name { color: #366097; }
|
186
|
+
|
187
|
+
#qunit-tests .pass .test-actual,
|
188
|
+
#qunit-tests .pass .test-expected { color: #999; }
|
189
|
+
|
190
|
+
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
191
|
+
|
192
|
+
/*** Failing Styles */
|
193
|
+
|
194
|
+
#qunit-tests li li.fail {
|
195
|
+
color: #710909;
|
196
|
+
background-color: #FFF;
|
197
|
+
border-left: 10px solid #EE5757;
|
198
|
+
white-space: pre;
|
199
|
+
}
|
200
|
+
|
201
|
+
#qunit-tests > li:last-child {
|
202
|
+
border-radius: 0 0 5px 5px;
|
203
|
+
}
|
204
|
+
|
205
|
+
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
206
|
+
#qunit-tests .fail .test-name,
|
207
|
+
#qunit-tests .fail .module-name { color: #000; }
|
208
|
+
|
209
|
+
#qunit-tests .fail .test-actual { color: #EE5757; }
|
210
|
+
#qunit-tests .fail .test-expected { color: #008000; }
|
211
|
+
|
212
|
+
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
213
|
+
|
214
|
+
|
215
|
+
/** Result */
|
216
|
+
|
217
|
+
#qunit-testresult {
|
218
|
+
padding: 0.5em 0.5em 0.5em 2.5em;
|
219
|
+
|
220
|
+
color: #2B81AF;
|
221
|
+
background-color: #D2E0E6;
|
222
|
+
|
223
|
+
border-bottom: 1px solid #FFF;
|
224
|
+
}
|
225
|
+
#qunit-testresult .module-name {
|
226
|
+
font-weight: 700;
|
227
|
+
}
|
228
|
+
|
229
|
+
/** Fixture */
|
230
|
+
|
231
|
+
#qunit-fixture {
|
232
|
+
position: absolute;
|
233
|
+
top: -10000px;
|
234
|
+
left: -10000px;
|
235
|
+
width: 1000px;
|
236
|
+
height: 1000px;
|
237
|
+
}
|
@@ -0,0 +1,2288 @@
|
|
1
|
+
/*!
|
2
|
+
* QUnit 1.14.0
|
3
|
+
* http://qunitjs.com/
|
4
|
+
*
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
* Date: 2014-01-31T16:40Z
|
10
|
+
*/
|
11
|
+
|
12
|
+
(function( window ) {
|
13
|
+
|
14
|
+
var QUnit,
|
15
|
+
assert,
|
16
|
+
config,
|
17
|
+
onErrorFnPrev,
|
18
|
+
testId = 0,
|
19
|
+
fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
|
20
|
+
toString = Object.prototype.toString,
|
21
|
+
hasOwn = Object.prototype.hasOwnProperty,
|
22
|
+
// Keep a local reference to Date (GH-283)
|
23
|
+
Date = window.Date,
|
24
|
+
setTimeout = window.setTimeout,
|
25
|
+
clearTimeout = window.clearTimeout,
|
26
|
+
defined = {
|
27
|
+
document: typeof window.document !== "undefined",
|
28
|
+
setTimeout: typeof window.setTimeout !== "undefined",
|
29
|
+
sessionStorage: (function() {
|
30
|
+
var x = "qunit-test-string";
|
31
|
+
try {
|
32
|
+
sessionStorage.setItem( x, x );
|
33
|
+
sessionStorage.removeItem( x );
|
34
|
+
return true;
|
35
|
+
} catch( e ) {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
}())
|
39
|
+
},
|
40
|
+
/**
|
41
|
+
* Provides a normalized error string, correcting an issue
|
42
|
+
* with IE 7 (and prior) where Error.prototype.toString is
|
43
|
+
* not properly implemented
|
44
|
+
*
|
45
|
+
* Based on https://es5.github.io/#x15.11.4.4
|
46
|
+
*
|
47
|
+
* @param {String|Error} error
|
48
|
+
* @return {String} error message
|
49
|
+
*/
|
50
|
+
errorString = function( error ) {
|
51
|
+
var name, message,
|
52
|
+
errorString = error.toString();
|
53
|
+
if ( errorString.substring( 0, 7 ) === "[object" ) {
|
54
|
+
name = error.name ? error.name.toString() : "Error";
|
55
|
+
message = error.message ? error.message.toString() : "";
|
56
|
+
if ( name && message ) {
|
57
|
+
return name + ": " + message;
|
58
|
+
} else if ( name ) {
|
59
|
+
return name;
|
60
|
+
} else if ( message ) {
|
61
|
+
return message;
|
62
|
+
} else {
|
63
|
+
return "Error";
|
64
|
+
}
|
65
|
+
} else {
|
66
|
+
return errorString;
|
67
|
+
}
|
68
|
+
},
|
69
|
+
/**
|
70
|
+
* Makes a clone of an object using only Array or Object as base,
|
71
|
+
* and copies over the own enumerable properties.
|
72
|
+
*
|
73
|
+
* @param {Object} obj
|
74
|
+
* @return {Object} New object with only the own properties (recursively).
|
75
|
+
*/
|
76
|
+
objectValues = function( obj ) {
|
77
|
+
// Grunt 0.3.x uses an older version of jshint that still has jshint/jshint#392.
|
78
|
+
/*jshint newcap: false */
|
79
|
+
var key, val,
|
80
|
+
vals = QUnit.is( "array", obj ) ? [] : {};
|
81
|
+
for ( key in obj ) {
|
82
|
+
if ( hasOwn.call( obj, key ) ) {
|
83
|
+
val = obj[key];
|
84
|
+
vals[key] = val === Object(val) ? objectValues(val) : val;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
return vals;
|
88
|
+
};
|
89
|
+
|
90
|
+
|
91
|
+
// Root QUnit object.
|
92
|
+
// `QUnit` initialized at top of scope
|
93
|
+
QUnit = {
|
94
|
+
|
95
|
+
// call on start of module test to prepend name to all tests
|
96
|
+
module: function( name, testEnvironment ) {
|
97
|
+
config.currentModule = name;
|
98
|
+
config.currentModuleTestEnvironment = testEnvironment;
|
99
|
+
config.modules[name] = true;
|
100
|
+
},
|
101
|
+
|
102
|
+
asyncTest: function( testName, expected, callback ) {
|
103
|
+
if ( arguments.length === 2 ) {
|
104
|
+
callback = expected;
|
105
|
+
expected = null;
|
106
|
+
}
|
107
|
+
|
108
|
+
QUnit.test( testName, expected, callback, true );
|
109
|
+
},
|
110
|
+
|
111
|
+
test: function( testName, expected, callback, async ) {
|
112
|
+
var test,
|
113
|
+
nameHtml = "<span class='test-name'>" + escapeText( testName ) + "</span>";
|
114
|
+
|
115
|
+
if ( arguments.length === 2 ) {
|
116
|
+
callback = expected;
|
117
|
+
expected = null;
|
118
|
+
}
|
119
|
+
|
120
|
+
if ( config.currentModule ) {
|
121
|
+
nameHtml = "<span class='module-name'>" + escapeText( config.currentModule ) + "</span>: " + nameHtml;
|
122
|
+
}
|
123
|
+
|
124
|
+
test = new Test({
|
125
|
+
nameHtml: nameHtml,
|
126
|
+
testName: testName,
|
127
|
+
expected: expected,
|
128
|
+
async: async,
|
129
|
+
callback: callback,
|
130
|
+
module: config.currentModule,
|
131
|
+
moduleTestEnvironment: config.currentModuleTestEnvironment,
|
132
|
+
stack: sourceFromStacktrace( 2 )
|
133
|
+
});
|
134
|
+
|
135
|
+
if ( !validTest( test ) ) {
|
136
|
+
return;
|
137
|
+
}
|
138
|
+
|
139
|
+
test.queue();
|
140
|
+
},
|
141
|
+
|
142
|
+
// Specify the number of expected assertions to guarantee that failed test (no assertions are run at all) don't slip through.
|
143
|
+
expect: function( asserts ) {
|
144
|
+
if (arguments.length === 1) {
|
145
|
+
config.current.expected = asserts;
|
146
|
+
} else {
|
147
|
+
return config.current.expected;
|
148
|
+
}
|
149
|
+
},
|
150
|
+
|
151
|
+
start: function( count ) {
|
152
|
+
// QUnit hasn't been initialized yet.
|
153
|
+
// Note: RequireJS (et al) may delay onLoad
|
154
|
+
if ( config.semaphore === undefined ) {
|
155
|
+
QUnit.begin(function() {
|
156
|
+
// This is triggered at the top of QUnit.load, push start() to the event loop, to allow QUnit.load to finish first
|
157
|
+
setTimeout(function() {
|
158
|
+
QUnit.start( count );
|
159
|
+
});
|
160
|
+
});
|
161
|
+
return;
|
162
|
+
}
|
163
|
+
|
164
|
+
config.semaphore -= count || 1;
|
165
|
+
// don't start until equal number of stop-calls
|
166
|
+
if ( config.semaphore > 0 ) {
|
167
|
+
return;
|
168
|
+
}
|
169
|
+
// ignore if start is called more often then stop
|
170
|
+
if ( config.semaphore < 0 ) {
|
171
|
+
config.semaphore = 0;
|
172
|
+
QUnit.pushFailure( "Called start() while already started (QUnit.config.semaphore was 0 already)", null, sourceFromStacktrace(2) );
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
// A slight delay, to avoid any current callbacks
|
176
|
+
if ( defined.setTimeout ) {
|
177
|
+
setTimeout(function() {
|
178
|
+
if ( config.semaphore > 0 ) {
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
if ( config.timeout ) {
|
182
|
+
clearTimeout( config.timeout );
|
183
|
+
}
|
184
|
+
|
185
|
+
config.blocking = false;
|
186
|
+
process( true );
|
187
|
+
}, 13);
|
188
|
+
} else {
|
189
|
+
config.blocking = false;
|
190
|
+
process( true );
|
191
|
+
}
|
192
|
+
},
|
193
|
+
|
194
|
+
stop: function( count ) {
|
195
|
+
config.semaphore += count || 1;
|
196
|
+
config.blocking = true;
|
197
|
+
|
198
|
+
if ( config.testTimeout && defined.setTimeout ) {
|
199
|
+
clearTimeout( config.timeout );
|
200
|
+
config.timeout = setTimeout(function() {
|
201
|
+
QUnit.ok( false, "Test timed out" );
|
202
|
+
config.semaphore = 1;
|
203
|
+
QUnit.start();
|
204
|
+
}, config.testTimeout );
|
205
|
+
}
|
206
|
+
}
|
207
|
+
};
|
208
|
+
|
209
|
+
// We use the prototype to distinguish between properties that should
|
210
|
+
// be exposed as globals (and in exports) and those that shouldn't
|
211
|
+
(function() {
|
212
|
+
function F() {}
|
213
|
+
F.prototype = QUnit;
|
214
|
+
QUnit = new F();
|
215
|
+
// Make F QUnit's constructor so that we can add to the prototype later
|
216
|
+
QUnit.constructor = F;
|
217
|
+
}());
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Config object: Maintain internal state
|
221
|
+
* Later exposed as QUnit.config
|
222
|
+
* `config` initialized at top of scope
|
223
|
+
*/
|
224
|
+
config = {
|
225
|
+
// The queue of tests to run
|
226
|
+
queue: [],
|
227
|
+
|
228
|
+
// block until document ready
|
229
|
+
blocking: true,
|
230
|
+
|
231
|
+
// when enabled, show only failing tests
|
232
|
+
// gets persisted through sessionStorage and can be changed in UI via checkbox
|
233
|
+
hidepassed: false,
|
234
|
+
|
235
|
+
// by default, run previously failed tests first
|
236
|
+
// very useful in combination with "Hide passed tests" checked
|
237
|
+
reorder: true,
|
238
|
+
|
239
|
+
// by default, modify document.title when suite is done
|
240
|
+
altertitle: true,
|
241
|
+
|
242
|
+
// by default, scroll to top of the page when suite is done
|
243
|
+
scrolltop: true,
|
244
|
+
|
245
|
+
// when enabled, all tests must call expect()
|
246
|
+
requireExpects: false,
|
247
|
+
|
248
|
+
// add checkboxes that are persisted in the query-string
|
249
|
+
// when enabled, the id is set to `true` as a `QUnit.config` property
|
250
|
+
urlConfig: [
|
251
|
+
{
|
252
|
+
id: "noglobals",
|
253
|
+
label: "Check for Globals",
|
254
|
+
tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."
|
255
|
+
},
|
256
|
+
{
|
257
|
+
id: "notrycatch",
|
258
|
+
label: "No try-catch",
|
259
|
+
tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."
|
260
|
+
}
|
261
|
+
],
|
262
|
+
|
263
|
+
// Set of all modules.
|
264
|
+
modules: {},
|
265
|
+
|
266
|
+
// logging callback queues
|
267
|
+
begin: [],
|
268
|
+
done: [],
|
269
|
+
log: [],
|
270
|
+
testStart: [],
|
271
|
+
testDone: [],
|
272
|
+
moduleStart: [],
|
273
|
+
moduleDone: []
|
274
|
+
};
|
275
|
+
|
276
|
+
// Initialize more QUnit.config and QUnit.urlParams
|
277
|
+
(function() {
|
278
|
+
var i, current,
|
279
|
+
location = window.location || { search: "", protocol: "file:" },
|
280
|
+
params = location.search.slice( 1 ).split( "&" ),
|
281
|
+
length = params.length,
|
282
|
+
urlParams = {};
|
283
|
+
|
284
|
+
if ( params[ 0 ] ) {
|
285
|
+
for ( i = 0; i < length; i++ ) {
|
286
|
+
current = params[ i ].split( "=" );
|
287
|
+
current[ 0 ] = decodeURIComponent( current[ 0 ] );
|
288
|
+
|
289
|
+
// allow just a key to turn on a flag, e.g., test.html?noglobals
|
290
|
+
current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
|
291
|
+
if ( urlParams[ current[ 0 ] ] ) {
|
292
|
+
urlParams[ current[ 0 ] ] = [].concat( urlParams[ current[ 0 ] ], current[ 1 ] );
|
293
|
+
} else {
|
294
|
+
urlParams[ current[ 0 ] ] = current[ 1 ];
|
295
|
+
}
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
QUnit.urlParams = urlParams;
|
300
|
+
|
301
|
+
// String search anywhere in moduleName+testName
|
302
|
+
config.filter = urlParams.filter;
|
303
|
+
|
304
|
+
// Exact match of the module name
|
305
|
+
config.module = urlParams.module;
|
306
|
+
|
307
|
+
config.testNumber = [];
|
308
|
+
if ( urlParams.testNumber ) {
|
309
|
+
|
310
|
+
// Ensure that urlParams.testNumber is an array
|
311
|
+
urlParams.testNumber = [].concat( urlParams.testNumber );
|
312
|
+
for ( i = 0; i < urlParams.testNumber.length; i++ ) {
|
313
|
+
current = urlParams.testNumber[ i ];
|
314
|
+
config.testNumber.push( parseInt( current, 10 ) );
|
315
|
+
}
|
316
|
+
}
|
317
|
+
|
318
|
+
// Figure out if we're running the tests from a server or not
|
319
|
+
QUnit.isLocal = location.protocol === "file:";
|
320
|
+
}());
|
321
|
+
|
322
|
+
extend( QUnit, {
|
323
|
+
|
324
|
+
config: config,
|
325
|
+
|
326
|
+
// Initialize the configuration options
|
327
|
+
init: function() {
|
328
|
+
extend( config, {
|
329
|
+
stats: { all: 0, bad: 0 },
|
330
|
+
moduleStats: { all: 0, bad: 0 },
|
331
|
+
started: +new Date(),
|
332
|
+
updateRate: 1000,
|
333
|
+
blocking: false,
|
334
|
+
autostart: true,
|
335
|
+
autorun: false,
|
336
|
+
filter: "",
|
337
|
+
queue: [],
|
338
|
+
semaphore: 1
|
339
|
+
});
|
340
|
+
|
341
|
+
var tests, banner, result,
|
342
|
+
qunit = id( "qunit" );
|
343
|
+
|
344
|
+
if ( qunit ) {
|
345
|
+
qunit.innerHTML =
|
346
|
+
"<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
|
347
|
+
"<h2 id='qunit-banner'></h2>" +
|
348
|
+
"<div id='qunit-testrunner-toolbar'></div>" +
|
349
|
+
"<h2 id='qunit-userAgent'></h2>" +
|
350
|
+
"<ol id='qunit-tests'></ol>";
|
351
|
+
}
|
352
|
+
|
353
|
+
tests = id( "qunit-tests" );
|
354
|
+
banner = id( "qunit-banner" );
|
355
|
+
result = id( "qunit-testresult" );
|
356
|
+
|
357
|
+
if ( tests ) {
|
358
|
+
tests.innerHTML = "";
|
359
|
+
}
|
360
|
+
|
361
|
+
if ( banner ) {
|
362
|
+
banner.className = "";
|
363
|
+
}
|
364
|
+
|
365
|
+
if ( result ) {
|
366
|
+
result.parentNode.removeChild( result );
|
367
|
+
}
|
368
|
+
|
369
|
+
if ( tests ) {
|
370
|
+
result = document.createElement( "p" );
|
371
|
+
result.id = "qunit-testresult";
|
372
|
+
result.className = "result";
|
373
|
+
tests.parentNode.insertBefore( result, tests );
|
374
|
+
result.innerHTML = "Running...<br/> ";
|
375
|
+
}
|
376
|
+
},
|
377
|
+
|
378
|
+
// Resets the test setup. Useful for tests that modify the DOM.
|
379
|
+
/*
|
380
|
+
DEPRECATED: Use multiple tests instead of resetting inside a test.
|
381
|
+
Use testStart or testDone for custom cleanup.
|
382
|
+
This method will throw an error in 2.0, and will be removed in 2.1
|
383
|
+
*/
|
384
|
+
reset: function() {
|
385
|
+
var fixture = id( "qunit-fixture" );
|
386
|
+
if ( fixture ) {
|
387
|
+
fixture.innerHTML = config.fixture;
|
388
|
+
}
|
389
|
+
},
|
390
|
+
|
391
|
+
// Safe object type checking
|
392
|
+
is: function( type, obj ) {
|
393
|
+
return QUnit.objectType( obj ) === type;
|
394
|
+
},
|
395
|
+
|
396
|
+
objectType: function( obj ) {
|
397
|
+
if ( typeof obj === "undefined" ) {
|
398
|
+
return "undefined";
|
399
|
+
}
|
400
|
+
|
401
|
+
// Consider: typeof null === object
|
402
|
+
if ( obj === null ) {
|
403
|
+
return "null";
|
404
|
+
}
|
405
|
+
|
406
|
+
var match = toString.call( obj ).match(/^\[object\s(.*)\]$/),
|
407
|
+
type = match && match[1] || "";
|
408
|
+
|
409
|
+
switch ( type ) {
|
410
|
+
case "Number":
|
411
|
+
if ( isNaN(obj) ) {
|
412
|
+
return "nan";
|
413
|
+
}
|
414
|
+
return "number";
|
415
|
+
case "String":
|
416
|
+
case "Boolean":
|
417
|
+
case "Array":
|
418
|
+
case "Date":
|
419
|
+
case "RegExp":
|
420
|
+
case "Function":
|
421
|
+
return type.toLowerCase();
|
422
|
+
}
|
423
|
+
if ( typeof obj === "object" ) {
|
424
|
+
return "object";
|
425
|
+
}
|
426
|
+
return undefined;
|
427
|
+
},
|
428
|
+
|
429
|
+
push: function( result, actual, expected, message ) {
|
430
|
+
if ( !config.current ) {
|
431
|
+
throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
|
432
|
+
}
|
433
|
+
|
434
|
+
var output, source,
|
435
|
+
details = {
|
436
|
+
module: config.current.module,
|
437
|
+
name: config.current.testName,
|
438
|
+
result: result,
|
439
|
+
message: message,
|
440
|
+
actual: actual,
|
441
|
+
expected: expected
|
442
|
+
};
|
443
|
+
|
444
|
+
message = escapeText( message ) || ( result ? "okay" : "failed" );
|
445
|
+
message = "<span class='test-message'>" + message + "</span>";
|
446
|
+
output = message;
|
447
|
+
|
448
|
+
if ( !result ) {
|
449
|
+
expected = escapeText( QUnit.jsDump.parse(expected) );
|
450
|
+
actual = escapeText( QUnit.jsDump.parse(actual) );
|
451
|
+
output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
|
452
|
+
|
453
|
+
if ( actual !== expected ) {
|
454
|
+
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
|
455
|
+
output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
|
456
|
+
}
|
457
|
+
|
458
|
+
source = sourceFromStacktrace();
|
459
|
+
|
460
|
+
if ( source ) {
|
461
|
+
details.source = source;
|
462
|
+
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
463
|
+
}
|
464
|
+
|
465
|
+
output += "</table>";
|
466
|
+
}
|
467
|
+
|
468
|
+
runLoggingCallbacks( "log", QUnit, details );
|
469
|
+
|
470
|
+
config.current.assertions.push({
|
471
|
+
result: !!result,
|
472
|
+
message: output
|
473
|
+
});
|
474
|
+
},
|
475
|
+
|
476
|
+
pushFailure: function( message, source, actual ) {
|
477
|
+
if ( !config.current ) {
|
478
|
+
throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
|
479
|
+
}
|
480
|
+
|
481
|
+
var output,
|
482
|
+
details = {
|
483
|
+
module: config.current.module,
|
484
|
+
name: config.current.testName,
|
485
|
+
result: false,
|
486
|
+
message: message
|
487
|
+
};
|
488
|
+
|
489
|
+
message = escapeText( message ) || "error";
|
490
|
+
message = "<span class='test-message'>" + message + "</span>";
|
491
|
+
output = message;
|
492
|
+
|
493
|
+
output += "<table>";
|
494
|
+
|
495
|
+
if ( actual ) {
|
496
|
+
output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText( actual ) + "</pre></td></tr>";
|
497
|
+
}
|
498
|
+
|
499
|
+
if ( source ) {
|
500
|
+
details.source = source;
|
501
|
+
output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
|
502
|
+
}
|
503
|
+
|
504
|
+
output += "</table>";
|
505
|
+
|
506
|
+
runLoggingCallbacks( "log", QUnit, details );
|
507
|
+
|
508
|
+
config.current.assertions.push({
|
509
|
+
result: false,
|
510
|
+
message: output
|
511
|
+
});
|
512
|
+
},
|
513
|
+
|
514
|
+
url: function( params ) {
|
515
|
+
params = extend( extend( {}, QUnit.urlParams ), params );
|
516
|
+
var key,
|
517
|
+
querystring = "?";
|
518
|
+
|
519
|
+
for ( key in params ) {
|
520
|
+
if ( hasOwn.call( params, key ) ) {
|
521
|
+
querystring += encodeURIComponent( key ) + "=" +
|
522
|
+
encodeURIComponent( params[ key ] ) + "&";
|
523
|
+
}
|
524
|
+
}
|
525
|
+
return window.location.protocol + "//" + window.location.host +
|
526
|
+
window.location.pathname + querystring.slice( 0, -1 );
|
527
|
+
},
|
528
|
+
|
529
|
+
extend: extend,
|
530
|
+
id: id,
|
531
|
+
addEvent: addEvent,
|
532
|
+
addClass: addClass,
|
533
|
+
hasClass: hasClass,
|
534
|
+
removeClass: removeClass
|
535
|
+
// load, equiv, jsDump, diff: Attached later
|
536
|
+
});
|
537
|
+
|
538
|
+
/**
|
539
|
+
* @deprecated: Created for backwards compatibility with test runner that set the hook function
|
540
|
+
* into QUnit.{hook}, instead of invoking it and passing the hook function.
|
541
|
+
* QUnit.constructor is set to the empty F() above so that we can add to it's prototype here.
|
542
|
+
* Doing this allows us to tell if the following methods have been overwritten on the actual
|
543
|
+
* QUnit object.
|
544
|
+
*/
|
545
|
+
extend( QUnit.constructor.prototype, {
|
546
|
+
|
547
|
+
// Logging callbacks; all receive a single argument with the listed properties
|
548
|
+
// run test/logs.html for any related changes
|
549
|
+
begin: registerLoggingCallback( "begin" ),
|
550
|
+
|
551
|
+
// done: { failed, passed, total, runtime }
|
552
|
+
done: registerLoggingCallback( "done" ),
|
553
|
+
|
554
|
+
// log: { result, actual, expected, message }
|
555
|
+
log: registerLoggingCallback( "log" ),
|
556
|
+
|
557
|
+
// testStart: { name }
|
558
|
+
testStart: registerLoggingCallback( "testStart" ),
|
559
|
+
|
560
|
+
// testDone: { name, failed, passed, total, runtime }
|
561
|
+
testDone: registerLoggingCallback( "testDone" ),
|
562
|
+
|
563
|
+
// moduleStart: { name }
|
564
|
+
moduleStart: registerLoggingCallback( "moduleStart" ),
|
565
|
+
|
566
|
+
// moduleDone: { name, failed, passed, total }
|
567
|
+
moduleDone: registerLoggingCallback( "moduleDone" )
|
568
|
+
});
|
569
|
+
|
570
|
+
if ( !defined.document || document.readyState === "complete" ) {
|
571
|
+
config.autorun = true;
|
572
|
+
}
|
573
|
+
|
574
|
+
QUnit.load = function() {
|
575
|
+
runLoggingCallbacks( "begin", QUnit, {} );
|
576
|
+
|
577
|
+
// Initialize the config, saving the execution queue
|
578
|
+
var banner, filter, i, j, label, len, main, ol, toolbar, val, selection,
|
579
|
+
urlConfigContainer, moduleFilter, userAgent,
|
580
|
+
numModules = 0,
|
581
|
+
moduleNames = [],
|
582
|
+
moduleFilterHtml = "",
|
583
|
+
urlConfigHtml = "",
|
584
|
+
oldconfig = extend( {}, config );
|
585
|
+
|
586
|
+
QUnit.init();
|
587
|
+
extend(config, oldconfig);
|
588
|
+
|
589
|
+
config.blocking = false;
|
590
|
+
|
591
|
+
len = config.urlConfig.length;
|
592
|
+
|
593
|
+
for ( i = 0; i < len; i++ ) {
|
594
|
+
val = config.urlConfig[i];
|
595
|
+
if ( typeof val === "string" ) {
|
596
|
+
val = {
|
597
|
+
id: val,
|
598
|
+
label: val
|
599
|
+
};
|
600
|
+
}
|
601
|
+
config[ val.id ] = QUnit.urlParams[ val.id ];
|
602
|
+
if ( !val.value || typeof val.value === "string" ) {
|
603
|
+
urlConfigHtml += "<input id='qunit-urlconfig-" + escapeText( val.id ) +
|
604
|
+
"' name='" + escapeText( val.id ) +
|
605
|
+
"' type='checkbox'" +
|
606
|
+
( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
|
607
|
+
( config[ val.id ] ? " checked='checked'" : "" ) +
|
608
|
+
" title='" + escapeText( val.tooltip ) +
|
609
|
+
"'><label for='qunit-urlconfig-" + escapeText( val.id ) +
|
610
|
+
"' title='" + escapeText( val.tooltip ) + "'>" + val.label + "</label>";
|
611
|
+
} else {
|
612
|
+
urlConfigHtml += "<label for='qunit-urlconfig-" + escapeText( val.id ) +
|
613
|
+
"' title='" + escapeText( val.tooltip ) +
|
614
|
+
"'>" + val.label +
|
615
|
+
": </label><select id='qunit-urlconfig-" + escapeText( val.id ) +
|
616
|
+
"' name='" + escapeText( val.id ) +
|
617
|
+
"' title='" + escapeText( val.tooltip ) +
|
618
|
+
"'><option></option>";
|
619
|
+
selection = false;
|
620
|
+
if ( QUnit.is( "array", val.value ) ) {
|
621
|
+
for ( j = 0; j < val.value.length; j++ ) {
|
622
|
+
urlConfigHtml += "<option value='" + escapeText( val.value[j] ) + "'" +
|
623
|
+
( config[ val.id ] === val.value[j] ?
|
624
|
+
(selection = true) && " selected='selected'" :
|
625
|
+
"" ) +
|
626
|
+
">" + escapeText( val.value[j] ) + "</option>";
|
627
|
+
}
|
628
|
+
} else {
|
629
|
+
for ( j in val.value ) {
|
630
|
+
if ( hasOwn.call( val.value, j ) ) {
|
631
|
+
urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
|
632
|
+
( config[ val.id ] === j ?
|
633
|
+
(selection = true) && " selected='selected'" :
|
634
|
+
"" ) +
|
635
|
+
">" + escapeText( val.value[j] ) + "</option>";
|
636
|
+
}
|
637
|
+
}
|
638
|
+
}
|
639
|
+
if ( config[ val.id ] && !selection ) {
|
640
|
+
urlConfigHtml += "<option value='" + escapeText( config[ val.id ] ) +
|
641
|
+
"' selected='selected' disabled='disabled'>" +
|
642
|
+
escapeText( config[ val.id ] ) +
|
643
|
+
"</option>";
|
644
|
+
}
|
645
|
+
urlConfigHtml += "</select>";
|
646
|
+
}
|
647
|
+
}
|
648
|
+
for ( i in config.modules ) {
|
649
|
+
if ( config.modules.hasOwnProperty( i ) ) {
|
650
|
+
moduleNames.push(i);
|
651
|
+
}
|
652
|
+
}
|
653
|
+
numModules = moduleNames.length;
|
654
|
+
moduleNames.sort( function( a, b ) {
|
655
|
+
return a.localeCompare( b );
|
656
|
+
});
|
657
|
+
moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " +
|
658
|
+
( config.module === undefined ? "selected='selected'" : "" ) +
|
659
|
+
">< All Modules ></option>";
|
660
|
+
|
661
|
+
|
662
|
+
for ( i = 0; i < numModules; i++) {
|
663
|
+
moduleFilterHtml += "<option value='" + escapeText( encodeURIComponent(moduleNames[i]) ) + "' " +
|
664
|
+
( config.module === moduleNames[i] ? "selected='selected'" : "" ) +
|
665
|
+
">" + escapeText(moduleNames[i]) + "</option>";
|
666
|
+
}
|
667
|
+
moduleFilterHtml += "</select>";
|
668
|
+
|
669
|
+
// `userAgent` initialized at top of scope
|
670
|
+
userAgent = id( "qunit-userAgent" );
|
671
|
+
if ( userAgent ) {
|
672
|
+
userAgent.innerHTML = navigator.userAgent;
|
673
|
+
}
|
674
|
+
|
675
|
+
// `banner` initialized at top of scope
|
676
|
+
banner = id( "qunit-header" );
|
677
|
+
if ( banner ) {
|
678
|
+
banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) + "'>" + banner.innerHTML + "</a> ";
|
679
|
+
}
|
680
|
+
|
681
|
+
// `toolbar` initialized at top of scope
|
682
|
+
toolbar = id( "qunit-testrunner-toolbar" );
|
683
|
+
if ( toolbar ) {
|
684
|
+
// `filter` initialized at top of scope
|
685
|
+
filter = document.createElement( "input" );
|
686
|
+
filter.type = "checkbox";
|
687
|
+
filter.id = "qunit-filter-pass";
|
688
|
+
|
689
|
+
addEvent( filter, "click", function() {
|
690
|
+
var tmp,
|
691
|
+
ol = id( "qunit-tests" );
|
692
|
+
|
693
|
+
if ( filter.checked ) {
|
694
|
+
ol.className = ol.className + " hidepass";
|
695
|
+
} else {
|
696
|
+
tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
|
697
|
+
ol.className = tmp.replace( / hidepass /, " " );
|
698
|
+
}
|
699
|
+
if ( defined.sessionStorage ) {
|
700
|
+
if (filter.checked) {
|
701
|
+
sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
|
702
|
+
} else {
|
703
|
+
sessionStorage.removeItem( "qunit-filter-passed-tests" );
|
704
|
+
}
|
705
|
+
}
|
706
|
+
});
|
707
|
+
|
708
|
+
if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
|
709
|
+
filter.checked = true;
|
710
|
+
// `ol` initialized at top of scope
|
711
|
+
ol = id( "qunit-tests" );
|
712
|
+
ol.className = ol.className + " hidepass";
|
713
|
+
}
|
714
|
+
toolbar.appendChild( filter );
|
715
|
+
|
716
|
+
// `label` initialized at top of scope
|
717
|
+
label = document.createElement( "label" );
|
718
|
+
label.setAttribute( "for", "qunit-filter-pass" );
|
719
|
+
label.setAttribute( "title", "Only show tests and assertions that fail. Stored in sessionStorage." );
|
720
|
+
label.innerHTML = "Hide passed tests";
|
721
|
+
toolbar.appendChild( label );
|
722
|
+
|
723
|
+
urlConfigContainer = document.createElement("span");
|
724
|
+
urlConfigContainer.innerHTML = urlConfigHtml;
|
725
|
+
// For oldIE support:
|
726
|
+
// * Add handlers to the individual elements instead of the container
|
727
|
+
// * Use "click" instead of "change" for checkboxes
|
728
|
+
// * Fallback from event.target to event.srcElement
|
729
|
+
addEvents( urlConfigContainer.getElementsByTagName("input"), "click", function( event ) {
|
730
|
+
var params = {},
|
731
|
+
target = event.target || event.srcElement;
|
732
|
+
params[ target.name ] = target.checked ?
|
733
|
+
target.defaultValue || true :
|
734
|
+
undefined;
|
735
|
+
window.location = QUnit.url( params );
|
736
|
+
});
|
737
|
+
addEvents( urlConfigContainer.getElementsByTagName("select"), "change", function( event ) {
|
738
|
+
var params = {},
|
739
|
+
target = event.target || event.srcElement;
|
740
|
+
params[ target.name ] = target.options[ target.selectedIndex ].value || undefined;
|
741
|
+
window.location = QUnit.url( params );
|
742
|
+
});
|
743
|
+
toolbar.appendChild( urlConfigContainer );
|
744
|
+
|
745
|
+
if (numModules > 1) {
|
746
|
+
moduleFilter = document.createElement( "span" );
|
747
|
+
moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
|
748
|
+
moduleFilter.innerHTML = moduleFilterHtml;
|
749
|
+
addEvent( moduleFilter.lastChild, "change", function() {
|
750
|
+
var selectBox = moduleFilter.getElementsByTagName("select")[0],
|
751
|
+
selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value);
|
752
|
+
|
753
|
+
window.location = QUnit.url({
|
754
|
+
module: ( selectedModule === "" ) ? undefined : selectedModule,
|
755
|
+
// Remove any existing filters
|
756
|
+
filter: undefined,
|
757
|
+
testNumber: undefined
|
758
|
+
});
|
759
|
+
});
|
760
|
+
toolbar.appendChild(moduleFilter);
|
761
|
+
}
|
762
|
+
}
|
763
|
+
|
764
|
+
// `main` initialized at top of scope
|
765
|
+
main = id( "qunit-fixture" );
|
766
|
+
if ( main ) {
|
767
|
+
config.fixture = main.innerHTML;
|
768
|
+
}
|
769
|
+
|
770
|
+
if ( config.autostart ) {
|
771
|
+
QUnit.start();
|
772
|
+
}
|
773
|
+
};
|
774
|
+
|
775
|
+
if ( defined.document ) {
|
776
|
+
addEvent( window, "load", QUnit.load );
|
777
|
+
}
|
778
|
+
|
779
|
+
// `onErrorFnPrev` initialized at top of scope
|
780
|
+
// Preserve other handlers
|
781
|
+
onErrorFnPrev = window.onerror;
|
782
|
+
|
783
|
+
// Cover uncaught exceptions
|
784
|
+
// Returning true will suppress the default browser handler,
|
785
|
+
// returning false will let it run.
|
786
|
+
window.onerror = function ( error, filePath, linerNr ) {
|
787
|
+
var ret = false;
|
788
|
+
if ( onErrorFnPrev ) {
|
789
|
+
ret = onErrorFnPrev( error, filePath, linerNr );
|
790
|
+
}
|
791
|
+
|
792
|
+
// Treat return value as window.onerror itself does,
|
793
|
+
// Only do our handling if not suppressed.
|
794
|
+
if ( ret !== true ) {
|
795
|
+
if ( QUnit.config.current ) {
|
796
|
+
if ( QUnit.config.current.ignoreGlobalErrors ) {
|
797
|
+
return true;
|
798
|
+
}
|
799
|
+
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
800
|
+
} else {
|
801
|
+
QUnit.test( "global failure", extend( function() {
|
802
|
+
QUnit.pushFailure( error, filePath + ":" + linerNr );
|
803
|
+
}, { validTest: validTest } ) );
|
804
|
+
}
|
805
|
+
return false;
|
806
|
+
}
|
807
|
+
|
808
|
+
return ret;
|
809
|
+
};
|
810
|
+
|
811
|
+
function done() {
|
812
|
+
config.autorun = true;
|
813
|
+
|
814
|
+
// Log the last module results
|
815
|
+
if ( config.previousModule ) {
|
816
|
+
runLoggingCallbacks( "moduleDone", QUnit, {
|
817
|
+
name: config.previousModule,
|
818
|
+
failed: config.moduleStats.bad,
|
819
|
+
passed: config.moduleStats.all - config.moduleStats.bad,
|
820
|
+
total: config.moduleStats.all
|
821
|
+
});
|
822
|
+
}
|
823
|
+
delete config.previousModule;
|
824
|
+
|
825
|
+
var i, key,
|
826
|
+
banner = id( "qunit-banner" ),
|
827
|
+
tests = id( "qunit-tests" ),
|
828
|
+
runtime = +new Date() - config.started,
|
829
|
+
passed = config.stats.all - config.stats.bad,
|
830
|
+
html = [
|
831
|
+
"Tests completed in ",
|
832
|
+
runtime,
|
833
|
+
" milliseconds.<br/>",
|
834
|
+
"<span class='passed'>",
|
835
|
+
passed,
|
836
|
+
"</span> assertions of <span class='total'>",
|
837
|
+
config.stats.all,
|
838
|
+
"</span> passed, <span class='failed'>",
|
839
|
+
config.stats.bad,
|
840
|
+
"</span> failed."
|
841
|
+
].join( "" );
|
842
|
+
|
843
|
+
if ( banner ) {
|
844
|
+
banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
|
845
|
+
}
|
846
|
+
|
847
|
+
if ( tests ) {
|
848
|
+
id( "qunit-testresult" ).innerHTML = html;
|
849
|
+
}
|
850
|
+
|
851
|
+
if ( config.altertitle && defined.document && document.title ) {
|
852
|
+
// show ✖ for good, ✔ for bad suite result in title
|
853
|
+
// use escape sequences in case file gets loaded with non-utf-8-charset
|
854
|
+
document.title = [
|
855
|
+
( config.stats.bad ? "\u2716" : "\u2714" ),
|
856
|
+
document.title.replace( /^[\u2714\u2716] /i, "" )
|
857
|
+
].join( " " );
|
858
|
+
}
|
859
|
+
|
860
|
+
// clear own sessionStorage items if all tests passed
|
861
|
+
if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
|
862
|
+
// `key` & `i` initialized at top of scope
|
863
|
+
for ( i = 0; i < sessionStorage.length; i++ ) {
|
864
|
+
key = sessionStorage.key( i++ );
|
865
|
+
if ( key.indexOf( "qunit-test-" ) === 0 ) {
|
866
|
+
sessionStorage.removeItem( key );
|
867
|
+
}
|
868
|
+
}
|
869
|
+
}
|
870
|
+
|
871
|
+
// scroll back to top to show results
|
872
|
+
if ( config.scrolltop && window.scrollTo ) {
|
873
|
+
window.scrollTo(0, 0);
|
874
|
+
}
|
875
|
+
|
876
|
+
runLoggingCallbacks( "done", QUnit, {
|
877
|
+
failed: config.stats.bad,
|
878
|
+
passed: passed,
|
879
|
+
total: config.stats.all,
|
880
|
+
runtime: runtime
|
881
|
+
});
|
882
|
+
}
|
883
|
+
|
884
|
+
/** @return Boolean: true if this test should be ran */
|
885
|
+
function validTest( test ) {
|
886
|
+
var include,
|
887
|
+
filter = config.filter && config.filter.toLowerCase(),
|
888
|
+
module = config.module && config.module.toLowerCase(),
|
889
|
+
fullName = ( test.module + ": " + test.testName ).toLowerCase();
|
890
|
+
|
891
|
+
// Internally-generated tests are always valid
|
892
|
+
if ( test.callback && test.callback.validTest === validTest ) {
|
893
|
+
delete test.callback.validTest;
|
894
|
+
return true;
|
895
|
+
}
|
896
|
+
|
897
|
+
if ( config.testNumber.length > 0 ) {
|
898
|
+
if ( inArray( test.testNumber, config.testNumber ) < 0 ) {
|
899
|
+
return false;
|
900
|
+
}
|
901
|
+
}
|
902
|
+
|
903
|
+
if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) {
|
904
|
+
return false;
|
905
|
+
}
|
906
|
+
|
907
|
+
if ( !filter ) {
|
908
|
+
return true;
|
909
|
+
}
|
910
|
+
|
911
|
+
include = filter.charAt( 0 ) !== "!";
|
912
|
+
if ( !include ) {
|
913
|
+
filter = filter.slice( 1 );
|
914
|
+
}
|
915
|
+
|
916
|
+
// If the filter matches, we need to honour include
|
917
|
+
if ( fullName.indexOf( filter ) !== -1 ) {
|
918
|
+
return include;
|
919
|
+
}
|
920
|
+
|
921
|
+
// Otherwise, do the opposite
|
922
|
+
return !include;
|
923
|
+
}
|
924
|
+
|
925
|
+
// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
|
926
|
+
// Later Safari and IE10 are supposed to support error.stack as well
|
927
|
+
// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
|
928
|
+
function extractStacktrace( e, offset ) {
|
929
|
+
offset = offset === undefined ? 3 : offset;
|
930
|
+
|
931
|
+
var stack, include, i;
|
932
|
+
|
933
|
+
if ( e.stacktrace ) {
|
934
|
+
// Opera
|
935
|
+
return e.stacktrace.split( "\n" )[ offset + 3 ];
|
936
|
+
} else if ( e.stack ) {
|
937
|
+
// Firefox, Chrome
|
938
|
+
stack = e.stack.split( "\n" );
|
939
|
+
if (/^error$/i.test( stack[0] ) ) {
|
940
|
+
stack.shift();
|
941
|
+
}
|
942
|
+
if ( fileName ) {
|
943
|
+
include = [];
|
944
|
+
for ( i = offset; i < stack.length; i++ ) {
|
945
|
+
if ( stack[ i ].indexOf( fileName ) !== -1 ) {
|
946
|
+
break;
|
947
|
+
}
|
948
|
+
include.push( stack[ i ] );
|
949
|
+
}
|
950
|
+
if ( include.length ) {
|
951
|
+
return include.join( "\n" );
|
952
|
+
}
|
953
|
+
}
|
954
|
+
return stack[ offset ];
|
955
|
+
} else if ( e.sourceURL ) {
|
956
|
+
// Safari, PhantomJS
|
957
|
+
// hopefully one day Safari provides actual stacktraces
|
958
|
+
// exclude useless self-reference for generated Error objects
|
959
|
+
if ( /qunit.js$/.test( e.sourceURL ) ) {
|
960
|
+
return;
|
961
|
+
}
|
962
|
+
// for actual exceptions, this is useful
|
963
|
+
return e.sourceURL + ":" + e.line;
|
964
|
+
}
|
965
|
+
}
|
966
|
+
function sourceFromStacktrace( offset ) {
|
967
|
+
try {
|
968
|
+
throw new Error();
|
969
|
+
} catch ( e ) {
|
970
|
+
return extractStacktrace( e, offset );
|
971
|
+
}
|
972
|
+
}
|
973
|
+
|
974
|
+
/**
|
975
|
+
* Escape text for attribute or text content.
|
976
|
+
*/
|
977
|
+
function escapeText( s ) {
|
978
|
+
if ( !s ) {
|
979
|
+
return "";
|
980
|
+
}
|
981
|
+
s = s + "";
|
982
|
+
// Both single quotes and double quotes (for attributes)
|
983
|
+
return s.replace( /['"<>&]/g, function( s ) {
|
984
|
+
switch( s ) {
|
985
|
+
case "'":
|
986
|
+
return "'";
|
987
|
+
case "\"":
|
988
|
+
return """;
|
989
|
+
case "<":
|
990
|
+
return "<";
|
991
|
+
case ">":
|
992
|
+
return ">";
|
993
|
+
case "&":
|
994
|
+
return "&";
|
995
|
+
}
|
996
|
+
});
|
997
|
+
}
|
998
|
+
|
999
|
+
function synchronize( callback, last ) {
|
1000
|
+
config.queue.push( callback );
|
1001
|
+
|
1002
|
+
if ( config.autorun && !config.blocking ) {
|
1003
|
+
process( last );
|
1004
|
+
}
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
function process( last ) {
|
1008
|
+
function next() {
|
1009
|
+
process( last );
|
1010
|
+
}
|
1011
|
+
var start = new Date().getTime();
|
1012
|
+
config.depth = config.depth ? config.depth + 1 : 1;
|
1013
|
+
|
1014
|
+
while ( config.queue.length && !config.blocking ) {
|
1015
|
+
if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
|
1016
|
+
config.queue.shift()();
|
1017
|
+
} else {
|
1018
|
+
setTimeout( next, 13 );
|
1019
|
+
break;
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
config.depth--;
|
1023
|
+
if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
|
1024
|
+
done();
|
1025
|
+
}
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
function saveGlobal() {
|
1029
|
+
config.pollution = [];
|
1030
|
+
|
1031
|
+
if ( config.noglobals ) {
|
1032
|
+
for ( var key in window ) {
|
1033
|
+
if ( hasOwn.call( window, key ) ) {
|
1034
|
+
// in Opera sometimes DOM element ids show up here, ignore them
|
1035
|
+
if ( /^qunit-test-output/.test( key ) ) {
|
1036
|
+
continue;
|
1037
|
+
}
|
1038
|
+
config.pollution.push( key );
|
1039
|
+
}
|
1040
|
+
}
|
1041
|
+
}
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
function checkPollution() {
|
1045
|
+
var newGlobals,
|
1046
|
+
deletedGlobals,
|
1047
|
+
old = config.pollution;
|
1048
|
+
|
1049
|
+
saveGlobal();
|
1050
|
+
|
1051
|
+
newGlobals = diff( config.pollution, old );
|
1052
|
+
if ( newGlobals.length > 0 ) {
|
1053
|
+
QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
|
1054
|
+
}
|
1055
|
+
|
1056
|
+
deletedGlobals = diff( old, config.pollution );
|
1057
|
+
if ( deletedGlobals.length > 0 ) {
|
1058
|
+
QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
|
1059
|
+
}
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
// returns a new Array with the elements that are in a but not in b
|
1063
|
+
function diff( a, b ) {
|
1064
|
+
var i, j,
|
1065
|
+
result = a.slice();
|
1066
|
+
|
1067
|
+
for ( i = 0; i < result.length; i++ ) {
|
1068
|
+
for ( j = 0; j < b.length; j++ ) {
|
1069
|
+
if ( result[i] === b[j] ) {
|
1070
|
+
result.splice( i, 1 );
|
1071
|
+
i--;
|
1072
|
+
break;
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
}
|
1076
|
+
return result;
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
function extend( a, b ) {
|
1080
|
+
for ( var prop in b ) {
|
1081
|
+
if ( hasOwn.call( b, prop ) ) {
|
1082
|
+
// Avoid "Member not found" error in IE8 caused by messing with window.constructor
|
1083
|
+
if ( !( prop === "constructor" && a === window ) ) {
|
1084
|
+
if ( b[ prop ] === undefined ) {
|
1085
|
+
delete a[ prop ];
|
1086
|
+
} else {
|
1087
|
+
a[ prop ] = b[ prop ];
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
return a;
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
/**
|
1097
|
+
* @param {HTMLElement} elem
|
1098
|
+
* @param {string} type
|
1099
|
+
* @param {Function} fn
|
1100
|
+
*/
|
1101
|
+
function addEvent( elem, type, fn ) {
|
1102
|
+
if ( elem.addEventListener ) {
|
1103
|
+
|
1104
|
+
// Standards-based browsers
|
1105
|
+
elem.addEventListener( type, fn, false );
|
1106
|
+
} else if ( elem.attachEvent ) {
|
1107
|
+
|
1108
|
+
// support: IE <9
|
1109
|
+
elem.attachEvent( "on" + type, fn );
|
1110
|
+
} else {
|
1111
|
+
|
1112
|
+
// Caller must ensure support for event listeners is present
|
1113
|
+
throw new Error( "addEvent() was called in a context without event listener support" );
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
/**
|
1118
|
+
* @param {Array|NodeList} elems
|
1119
|
+
* @param {string} type
|
1120
|
+
* @param {Function} fn
|
1121
|
+
*/
|
1122
|
+
function addEvents( elems, type, fn ) {
|
1123
|
+
var i = elems.length;
|
1124
|
+
while ( i-- ) {
|
1125
|
+
addEvent( elems[i], type, fn );
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
function hasClass( elem, name ) {
|
1130
|
+
return (" " + elem.className + " ").indexOf(" " + name + " ") > -1;
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
function addClass( elem, name ) {
|
1134
|
+
if ( !hasClass( elem, name ) ) {
|
1135
|
+
elem.className += (elem.className ? " " : "") + name;
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
function removeClass( elem, name ) {
|
1140
|
+
var set = " " + elem.className + " ";
|
1141
|
+
// Class name may appear multiple times
|
1142
|
+
while ( set.indexOf(" " + name + " ") > -1 ) {
|
1143
|
+
set = set.replace(" " + name + " " , " ");
|
1144
|
+
}
|
1145
|
+
// If possible, trim it for prettiness, but not necessarily
|
1146
|
+
elem.className = typeof set.trim === "function" ? set.trim() : set.replace(/^\s+|\s+$/g, "");
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
function id( name ) {
|
1150
|
+
return defined.document && document.getElementById && document.getElementById( name );
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
function registerLoggingCallback( key ) {
|
1154
|
+
return function( callback ) {
|
1155
|
+
config[key].push( callback );
|
1156
|
+
};
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
// Supports deprecated method of completely overwriting logging callbacks
|
1160
|
+
function runLoggingCallbacks( key, scope, args ) {
|
1161
|
+
var i, callbacks;
|
1162
|
+
if ( QUnit.hasOwnProperty( key ) ) {
|
1163
|
+
QUnit[ key ].call(scope, args );
|
1164
|
+
} else {
|
1165
|
+
callbacks = config[ key ];
|
1166
|
+
for ( i = 0; i < callbacks.length; i++ ) {
|
1167
|
+
callbacks[ i ].call( scope, args );
|
1168
|
+
}
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
// from jquery.js
|
1173
|
+
function inArray( elem, array ) {
|
1174
|
+
if ( array.indexOf ) {
|
1175
|
+
return array.indexOf( elem );
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
for ( var i = 0, length = array.length; i < length; i++ ) {
|
1179
|
+
if ( array[ i ] === elem ) {
|
1180
|
+
return i;
|
1181
|
+
}
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
return -1;
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
function Test( settings ) {
|
1188
|
+
extend( this, settings );
|
1189
|
+
this.assertions = [];
|
1190
|
+
this.testNumber = ++Test.count;
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
Test.count = 0;
|
1194
|
+
|
1195
|
+
Test.prototype = {
|
1196
|
+
init: function() {
|
1197
|
+
var a, b, li,
|
1198
|
+
tests = id( "qunit-tests" );
|
1199
|
+
|
1200
|
+
if ( tests ) {
|
1201
|
+
b = document.createElement( "strong" );
|
1202
|
+
b.innerHTML = this.nameHtml;
|
1203
|
+
|
1204
|
+
// `a` initialized at top of scope
|
1205
|
+
a = document.createElement( "a" );
|
1206
|
+
a.innerHTML = "Rerun";
|
1207
|
+
a.href = QUnit.url({ testNumber: this.testNumber });
|
1208
|
+
|
1209
|
+
li = document.createElement( "li" );
|
1210
|
+
li.appendChild( b );
|
1211
|
+
li.appendChild( a );
|
1212
|
+
li.className = "running";
|
1213
|
+
li.id = this.id = "qunit-test-output" + testId++;
|
1214
|
+
|
1215
|
+
tests.appendChild( li );
|
1216
|
+
}
|
1217
|
+
},
|
1218
|
+
setup: function() {
|
1219
|
+
if (
|
1220
|
+
// Emit moduleStart when we're switching from one module to another
|
1221
|
+
this.module !== config.previousModule ||
|
1222
|
+
// They could be equal (both undefined) but if the previousModule property doesn't
|
1223
|
+
// yet exist it means this is the first test in a suite that isn't wrapped in a
|
1224
|
+
// module, in which case we'll just emit a moduleStart event for 'undefined'.
|
1225
|
+
// Without this, reporters can get testStart before moduleStart which is a problem.
|
1226
|
+
!hasOwn.call( config, "previousModule" )
|
1227
|
+
) {
|
1228
|
+
if ( hasOwn.call( config, "previousModule" ) ) {
|
1229
|
+
runLoggingCallbacks( "moduleDone", QUnit, {
|
1230
|
+
name: config.previousModule,
|
1231
|
+
failed: config.moduleStats.bad,
|
1232
|
+
passed: config.moduleStats.all - config.moduleStats.bad,
|
1233
|
+
total: config.moduleStats.all
|
1234
|
+
});
|
1235
|
+
}
|
1236
|
+
config.previousModule = this.module;
|
1237
|
+
config.moduleStats = { all: 0, bad: 0 };
|
1238
|
+
runLoggingCallbacks( "moduleStart", QUnit, {
|
1239
|
+
name: this.module
|
1240
|
+
});
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
config.current = this;
|
1244
|
+
|
1245
|
+
this.testEnvironment = extend({
|
1246
|
+
setup: function() {},
|
1247
|
+
teardown: function() {}
|
1248
|
+
}, this.moduleTestEnvironment );
|
1249
|
+
|
1250
|
+
this.started = +new Date();
|
1251
|
+
runLoggingCallbacks( "testStart", QUnit, {
|
1252
|
+
name: this.testName,
|
1253
|
+
module: this.module
|
1254
|
+
});
|
1255
|
+
|
1256
|
+
/*jshint camelcase:false */
|
1257
|
+
|
1258
|
+
|
1259
|
+
/**
|
1260
|
+
* Expose the current test environment.
|
1261
|
+
*
|
1262
|
+
* @deprecated since 1.12.0: Use QUnit.config.current.testEnvironment instead.
|
1263
|
+
*/
|
1264
|
+
QUnit.current_testEnvironment = this.testEnvironment;
|
1265
|
+
|
1266
|
+
/*jshint camelcase:true */
|
1267
|
+
|
1268
|
+
if ( !config.pollution ) {
|
1269
|
+
saveGlobal();
|
1270
|
+
}
|
1271
|
+
if ( config.notrycatch ) {
|
1272
|
+
this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
|
1273
|
+
return;
|
1274
|
+
}
|
1275
|
+
try {
|
1276
|
+
this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
|
1277
|
+
} catch( e ) {
|
1278
|
+
QUnit.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
1279
|
+
}
|
1280
|
+
},
|
1281
|
+
run: function() {
|
1282
|
+
config.current = this;
|
1283
|
+
|
1284
|
+
var running = id( "qunit-testresult" );
|
1285
|
+
|
1286
|
+
if ( running ) {
|
1287
|
+
running.innerHTML = "Running: <br/>" + this.nameHtml;
|
1288
|
+
}
|
1289
|
+
|
1290
|
+
if ( this.async ) {
|
1291
|
+
QUnit.stop();
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
this.callbackStarted = +new Date();
|
1295
|
+
|
1296
|
+
if ( config.notrycatch ) {
|
1297
|
+
this.callback.call( this.testEnvironment, QUnit.assert );
|
1298
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
1299
|
+
return;
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
try {
|
1303
|
+
this.callback.call( this.testEnvironment, QUnit.assert );
|
1304
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
1305
|
+
} catch( e ) {
|
1306
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
1307
|
+
|
1308
|
+
QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
|
1309
|
+
// else next test will carry the responsibility
|
1310
|
+
saveGlobal();
|
1311
|
+
|
1312
|
+
// Restart the tests if they're blocking
|
1313
|
+
if ( config.blocking ) {
|
1314
|
+
QUnit.start();
|
1315
|
+
}
|
1316
|
+
}
|
1317
|
+
},
|
1318
|
+
teardown: function() {
|
1319
|
+
config.current = this;
|
1320
|
+
if ( config.notrycatch ) {
|
1321
|
+
if ( typeof this.callbackRuntime === "undefined" ) {
|
1322
|
+
this.callbackRuntime = +new Date() - this.callbackStarted;
|
1323
|
+
}
|
1324
|
+
this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
|
1325
|
+
return;
|
1326
|
+
} else {
|
1327
|
+
try {
|
1328
|
+
this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
|
1329
|
+
} catch( e ) {
|
1330
|
+
QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
|
1331
|
+
}
|
1332
|
+
}
|
1333
|
+
checkPollution();
|
1334
|
+
},
|
1335
|
+
finish: function() {
|
1336
|
+
config.current = this;
|
1337
|
+
if ( config.requireExpects && this.expected === null ) {
|
1338
|
+
QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
|
1339
|
+
} else if ( this.expected !== null && this.expected !== this.assertions.length ) {
|
1340
|
+
QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
|
1341
|
+
} else if ( this.expected === null && !this.assertions.length ) {
|
1342
|
+
QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
var i, assertion, a, b, time, li, ol,
|
1346
|
+
test = this,
|
1347
|
+
good = 0,
|
1348
|
+
bad = 0,
|
1349
|
+
tests = id( "qunit-tests" );
|
1350
|
+
|
1351
|
+
this.runtime = +new Date() - this.started;
|
1352
|
+
config.stats.all += this.assertions.length;
|
1353
|
+
config.moduleStats.all += this.assertions.length;
|
1354
|
+
|
1355
|
+
if ( tests ) {
|
1356
|
+
ol = document.createElement( "ol" );
|
1357
|
+
ol.className = "qunit-assert-list";
|
1358
|
+
|
1359
|
+
for ( i = 0; i < this.assertions.length; i++ ) {
|
1360
|
+
assertion = this.assertions[i];
|
1361
|
+
|
1362
|
+
li = document.createElement( "li" );
|
1363
|
+
li.className = assertion.result ? "pass" : "fail";
|
1364
|
+
li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
|
1365
|
+
ol.appendChild( li );
|
1366
|
+
|
1367
|
+
if ( assertion.result ) {
|
1368
|
+
good++;
|
1369
|
+
} else {
|
1370
|
+
bad++;
|
1371
|
+
config.stats.bad++;
|
1372
|
+
config.moduleStats.bad++;
|
1373
|
+
}
|
1374
|
+
}
|
1375
|
+
|
1376
|
+
// store result when possible
|
1377
|
+
if ( QUnit.config.reorder && defined.sessionStorage ) {
|
1378
|
+
if ( bad ) {
|
1379
|
+
sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
|
1380
|
+
} else {
|
1381
|
+
sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
|
1382
|
+
}
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
if ( bad === 0 ) {
|
1386
|
+
addClass( ol, "qunit-collapsed" );
|
1387
|
+
}
|
1388
|
+
|
1389
|
+
// `b` initialized at top of scope
|
1390
|
+
b = document.createElement( "strong" );
|
1391
|
+
b.innerHTML = this.nameHtml + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
|
1392
|
+
|
1393
|
+
addEvent(b, "click", function() {
|
1394
|
+
var next = b.parentNode.lastChild,
|
1395
|
+
collapsed = hasClass( next, "qunit-collapsed" );
|
1396
|
+
( collapsed ? removeClass : addClass )( next, "qunit-collapsed" );
|
1397
|
+
});
|
1398
|
+
|
1399
|
+
addEvent(b, "dblclick", function( e ) {
|
1400
|
+
var target = e && e.target ? e.target : window.event.srcElement;
|
1401
|
+
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
|
1402
|
+
target = target.parentNode;
|
1403
|
+
}
|
1404
|
+
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
1405
|
+
window.location = QUnit.url({ testNumber: test.testNumber });
|
1406
|
+
}
|
1407
|
+
});
|
1408
|
+
|
1409
|
+
// `time` initialized at top of scope
|
1410
|
+
time = document.createElement( "span" );
|
1411
|
+
time.className = "runtime";
|
1412
|
+
time.innerHTML = this.runtime + " ms";
|
1413
|
+
|
1414
|
+
// `li` initialized at top of scope
|
1415
|
+
li = id( this.id );
|
1416
|
+
li.className = bad ? "fail" : "pass";
|
1417
|
+
li.removeChild( li.firstChild );
|
1418
|
+
a = li.firstChild;
|
1419
|
+
li.appendChild( b );
|
1420
|
+
li.appendChild( a );
|
1421
|
+
li.appendChild( time );
|
1422
|
+
li.appendChild( ol );
|
1423
|
+
|
1424
|
+
} else {
|
1425
|
+
for ( i = 0; i < this.assertions.length; i++ ) {
|
1426
|
+
if ( !this.assertions[i].result ) {
|
1427
|
+
bad++;
|
1428
|
+
config.stats.bad++;
|
1429
|
+
config.moduleStats.bad++;
|
1430
|
+
}
|
1431
|
+
}
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
runLoggingCallbacks( "testDone", QUnit, {
|
1435
|
+
name: this.testName,
|
1436
|
+
module: this.module,
|
1437
|
+
failed: bad,
|
1438
|
+
passed: this.assertions.length - bad,
|
1439
|
+
total: this.assertions.length,
|
1440
|
+
runtime: this.runtime,
|
1441
|
+
// DEPRECATED: this property will be removed in 2.0.0, use runtime instead
|
1442
|
+
duration: this.runtime
|
1443
|
+
});
|
1444
|
+
|
1445
|
+
QUnit.reset();
|
1446
|
+
|
1447
|
+
config.current = undefined;
|
1448
|
+
},
|
1449
|
+
|
1450
|
+
queue: function() {
|
1451
|
+
var bad,
|
1452
|
+
test = this;
|
1453
|
+
|
1454
|
+
synchronize(function() {
|
1455
|
+
test.init();
|
1456
|
+
});
|
1457
|
+
function run() {
|
1458
|
+
// each of these can by async
|
1459
|
+
synchronize(function() {
|
1460
|
+
test.setup();
|
1461
|
+
});
|
1462
|
+
synchronize(function() {
|
1463
|
+
test.run();
|
1464
|
+
});
|
1465
|
+
synchronize(function() {
|
1466
|
+
test.teardown();
|
1467
|
+
});
|
1468
|
+
synchronize(function() {
|
1469
|
+
test.finish();
|
1470
|
+
});
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
// `bad` initialized at top of scope
|
1474
|
+
// defer when previous test run passed, if storage is available
|
1475
|
+
bad = QUnit.config.reorder && defined.sessionStorage &&
|
1476
|
+
+sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
|
1477
|
+
|
1478
|
+
if ( bad ) {
|
1479
|
+
run();
|
1480
|
+
} else {
|
1481
|
+
synchronize( run, true );
|
1482
|
+
}
|
1483
|
+
}
|
1484
|
+
};
|
1485
|
+
|
1486
|
+
// `assert` initialized at top of scope
|
1487
|
+
// Assert helpers
|
1488
|
+
// All of these must either call QUnit.push() or manually do:
|
1489
|
+
// - runLoggingCallbacks( "log", .. );
|
1490
|
+
// - config.current.assertions.push({ .. });
|
1491
|
+
assert = QUnit.assert = {
|
1492
|
+
/**
|
1493
|
+
* Asserts rough true-ish result.
|
1494
|
+
* @name ok
|
1495
|
+
* @function
|
1496
|
+
* @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
|
1497
|
+
*/
|
1498
|
+
ok: function( result, msg ) {
|
1499
|
+
if ( !config.current ) {
|
1500
|
+
throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
|
1501
|
+
}
|
1502
|
+
result = !!result;
|
1503
|
+
msg = msg || ( result ? "okay" : "failed" );
|
1504
|
+
|
1505
|
+
var source,
|
1506
|
+
details = {
|
1507
|
+
module: config.current.module,
|
1508
|
+
name: config.current.testName,
|
1509
|
+
result: result,
|
1510
|
+
message: msg
|
1511
|
+
};
|
1512
|
+
|
1513
|
+
msg = "<span class='test-message'>" + escapeText( msg ) + "</span>";
|
1514
|
+
|
1515
|
+
if ( !result ) {
|
1516
|
+
source = sourceFromStacktrace( 2 );
|
1517
|
+
if ( source ) {
|
1518
|
+
details.source = source;
|
1519
|
+
msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" +
|
1520
|
+
escapeText( source ) +
|
1521
|
+
"</pre></td></tr></table>";
|
1522
|
+
}
|
1523
|
+
}
|
1524
|
+
runLoggingCallbacks( "log", QUnit, details );
|
1525
|
+
config.current.assertions.push({
|
1526
|
+
result: result,
|
1527
|
+
message: msg
|
1528
|
+
});
|
1529
|
+
},
|
1530
|
+
|
1531
|
+
/**
|
1532
|
+
* Assert that the first two arguments are equal, with an optional message.
|
1533
|
+
* Prints out both actual and expected values.
|
1534
|
+
* @name equal
|
1535
|
+
* @function
|
1536
|
+
* @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
|
1537
|
+
*/
|
1538
|
+
equal: function( actual, expected, message ) {
|
1539
|
+
/*jshint eqeqeq:false */
|
1540
|
+
QUnit.push( expected == actual, actual, expected, message );
|
1541
|
+
},
|
1542
|
+
|
1543
|
+
/**
|
1544
|
+
* @name notEqual
|
1545
|
+
* @function
|
1546
|
+
*/
|
1547
|
+
notEqual: function( actual, expected, message ) {
|
1548
|
+
/*jshint eqeqeq:false */
|
1549
|
+
QUnit.push( expected != actual, actual, expected, message );
|
1550
|
+
},
|
1551
|
+
|
1552
|
+
/**
|
1553
|
+
* @name propEqual
|
1554
|
+
* @function
|
1555
|
+
*/
|
1556
|
+
propEqual: function( actual, expected, message ) {
|
1557
|
+
actual = objectValues(actual);
|
1558
|
+
expected = objectValues(expected);
|
1559
|
+
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
|
1560
|
+
},
|
1561
|
+
|
1562
|
+
/**
|
1563
|
+
* @name notPropEqual
|
1564
|
+
* @function
|
1565
|
+
*/
|
1566
|
+
notPropEqual: function( actual, expected, message ) {
|
1567
|
+
actual = objectValues(actual);
|
1568
|
+
expected = objectValues(expected);
|
1569
|
+
QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
|
1570
|
+
},
|
1571
|
+
|
1572
|
+
/**
|
1573
|
+
* @name deepEqual
|
1574
|
+
* @function
|
1575
|
+
*/
|
1576
|
+
deepEqual: function( actual, expected, message ) {
|
1577
|
+
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
|
1578
|
+
},
|
1579
|
+
|
1580
|
+
/**
|
1581
|
+
* @name notDeepEqual
|
1582
|
+
* @function
|
1583
|
+
*/
|
1584
|
+
notDeepEqual: function( actual, expected, message ) {
|
1585
|
+
QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
|
1586
|
+
},
|
1587
|
+
|
1588
|
+
/**
|
1589
|
+
* @name strictEqual
|
1590
|
+
* @function
|
1591
|
+
*/
|
1592
|
+
strictEqual: function( actual, expected, message ) {
|
1593
|
+
QUnit.push( expected === actual, actual, expected, message );
|
1594
|
+
},
|
1595
|
+
|
1596
|
+
/**
|
1597
|
+
* @name notStrictEqual
|
1598
|
+
* @function
|
1599
|
+
*/
|
1600
|
+
notStrictEqual: function( actual, expected, message ) {
|
1601
|
+
QUnit.push( expected !== actual, actual, expected, message );
|
1602
|
+
},
|
1603
|
+
|
1604
|
+
"throws": function( block, expected, message ) {
|
1605
|
+
var actual,
|
1606
|
+
expectedOutput = expected,
|
1607
|
+
ok = false;
|
1608
|
+
|
1609
|
+
// 'expected' is optional
|
1610
|
+
if ( !message && typeof expected === "string" ) {
|
1611
|
+
message = expected;
|
1612
|
+
expected = null;
|
1613
|
+
}
|
1614
|
+
|
1615
|
+
config.current.ignoreGlobalErrors = true;
|
1616
|
+
try {
|
1617
|
+
block.call( config.current.testEnvironment );
|
1618
|
+
} catch (e) {
|
1619
|
+
actual = e;
|
1620
|
+
}
|
1621
|
+
config.current.ignoreGlobalErrors = false;
|
1622
|
+
|
1623
|
+
if ( actual ) {
|
1624
|
+
|
1625
|
+
// we don't want to validate thrown error
|
1626
|
+
if ( !expected ) {
|
1627
|
+
ok = true;
|
1628
|
+
expectedOutput = null;
|
1629
|
+
|
1630
|
+
// expected is an Error object
|
1631
|
+
} else if ( expected instanceof Error ) {
|
1632
|
+
ok = actual instanceof Error &&
|
1633
|
+
actual.name === expected.name &&
|
1634
|
+
actual.message === expected.message;
|
1635
|
+
|
1636
|
+
// expected is a regexp
|
1637
|
+
} else if ( QUnit.objectType( expected ) === "regexp" ) {
|
1638
|
+
ok = expected.test( errorString( actual ) );
|
1639
|
+
|
1640
|
+
// expected is a string
|
1641
|
+
} else if ( QUnit.objectType( expected ) === "string" ) {
|
1642
|
+
ok = expected === errorString( actual );
|
1643
|
+
|
1644
|
+
// expected is a constructor
|
1645
|
+
} else if ( actual instanceof expected ) {
|
1646
|
+
ok = true;
|
1647
|
+
|
1648
|
+
// expected is a validation function which returns true is validation passed
|
1649
|
+
} else if ( expected.call( {}, actual ) === true ) {
|
1650
|
+
expectedOutput = null;
|
1651
|
+
ok = true;
|
1652
|
+
}
|
1653
|
+
|
1654
|
+
QUnit.push( ok, actual, expectedOutput, message );
|
1655
|
+
} else {
|
1656
|
+
QUnit.pushFailure( message, null, "No exception was thrown." );
|
1657
|
+
}
|
1658
|
+
}
|
1659
|
+
};
|
1660
|
+
|
1661
|
+
/**
|
1662
|
+
* @deprecated since 1.8.0
|
1663
|
+
* Kept assertion helpers in root for backwards compatibility.
|
1664
|
+
*/
|
1665
|
+
extend( QUnit.constructor.prototype, assert );
|
1666
|
+
|
1667
|
+
/**
|
1668
|
+
* @deprecated since 1.9.0
|
1669
|
+
* Kept to avoid TypeErrors for undefined methods.
|
1670
|
+
*/
|
1671
|
+
QUnit.constructor.prototype.raises = function() {
|
1672
|
+
QUnit.push( false, false, false, "QUnit.raises has been deprecated since 2012 (fad3c1ea), use QUnit.throws instead" );
|
1673
|
+
};
|
1674
|
+
|
1675
|
+
/**
|
1676
|
+
* @deprecated since 1.0.0, replaced with error pushes since 1.3.0
|
1677
|
+
* Kept to avoid TypeErrors for undefined methods.
|
1678
|
+
*/
|
1679
|
+
QUnit.constructor.prototype.equals = function() {
|
1680
|
+
QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
|
1681
|
+
};
|
1682
|
+
QUnit.constructor.prototype.same = function() {
|
1683
|
+
QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
|
1684
|
+
};
|
1685
|
+
|
1686
|
+
// Test for equality any JavaScript type.
|
1687
|
+
// Author: Philippe Rathé <prathe@gmail.com>
|
1688
|
+
QUnit.equiv = (function() {
|
1689
|
+
|
1690
|
+
// Call the o related callback with the given arguments.
|
1691
|
+
function bindCallbacks( o, callbacks, args ) {
|
1692
|
+
var prop = QUnit.objectType( o );
|
1693
|
+
if ( prop ) {
|
1694
|
+
if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
|
1695
|
+
return callbacks[ prop ].apply( callbacks, args );
|
1696
|
+
} else {
|
1697
|
+
return callbacks[ prop ]; // or undefined
|
1698
|
+
}
|
1699
|
+
}
|
1700
|
+
}
|
1701
|
+
|
1702
|
+
// the real equiv function
|
1703
|
+
var innerEquiv,
|
1704
|
+
// stack to decide between skip/abort functions
|
1705
|
+
callers = [],
|
1706
|
+
// stack to avoiding loops from circular referencing
|
1707
|
+
parents = [],
|
1708
|
+
parentsB = [],
|
1709
|
+
|
1710
|
+
getProto = Object.getPrototypeOf || function ( obj ) {
|
1711
|
+
/*jshint camelcase:false */
|
1712
|
+
return obj.__proto__;
|
1713
|
+
},
|
1714
|
+
callbacks = (function () {
|
1715
|
+
|
1716
|
+
// for string, boolean, number and null
|
1717
|
+
function useStrictEquality( b, a ) {
|
1718
|
+
/*jshint eqeqeq:false */
|
1719
|
+
if ( b instanceof a.constructor || a instanceof b.constructor ) {
|
1720
|
+
// to catch short annotation VS 'new' annotation of a
|
1721
|
+
// declaration
|
1722
|
+
// e.g. var i = 1;
|
1723
|
+
// var j = new Number(1);
|
1724
|
+
return a == b;
|
1725
|
+
} else {
|
1726
|
+
return a === b;
|
1727
|
+
}
|
1728
|
+
}
|
1729
|
+
|
1730
|
+
return {
|
1731
|
+
"string": useStrictEquality,
|
1732
|
+
"boolean": useStrictEquality,
|
1733
|
+
"number": useStrictEquality,
|
1734
|
+
"null": useStrictEquality,
|
1735
|
+
"undefined": useStrictEquality,
|
1736
|
+
|
1737
|
+
"nan": function( b ) {
|
1738
|
+
return isNaN( b );
|
1739
|
+
},
|
1740
|
+
|
1741
|
+
"date": function( b, a ) {
|
1742
|
+
return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
|
1743
|
+
},
|
1744
|
+
|
1745
|
+
"regexp": function( b, a ) {
|
1746
|
+
return QUnit.objectType( b ) === "regexp" &&
|
1747
|
+
// the regex itself
|
1748
|
+
a.source === b.source &&
|
1749
|
+
// and its modifiers
|
1750
|
+
a.global === b.global &&
|
1751
|
+
// (gmi) ...
|
1752
|
+
a.ignoreCase === b.ignoreCase &&
|
1753
|
+
a.multiline === b.multiline &&
|
1754
|
+
a.sticky === b.sticky;
|
1755
|
+
},
|
1756
|
+
|
1757
|
+
// - skip when the property is a method of an instance (OOP)
|
1758
|
+
// - abort otherwise,
|
1759
|
+
// initial === would have catch identical references anyway
|
1760
|
+
"function": function() {
|
1761
|
+
var caller = callers[callers.length - 1];
|
1762
|
+
return caller !== Object && typeof caller !== "undefined";
|
1763
|
+
},
|
1764
|
+
|
1765
|
+
"array": function( b, a ) {
|
1766
|
+
var i, j, len, loop, aCircular, bCircular;
|
1767
|
+
|
1768
|
+
// b could be an object literal here
|
1769
|
+
if ( QUnit.objectType( b ) !== "array" ) {
|
1770
|
+
return false;
|
1771
|
+
}
|
1772
|
+
|
1773
|
+
len = a.length;
|
1774
|
+
if ( len !== b.length ) {
|
1775
|
+
// safe and faster
|
1776
|
+
return false;
|
1777
|
+
}
|
1778
|
+
|
1779
|
+
// track reference to avoid circular references
|
1780
|
+
parents.push( a );
|
1781
|
+
parentsB.push( b );
|
1782
|
+
for ( i = 0; i < len; i++ ) {
|
1783
|
+
loop = false;
|
1784
|
+
for ( j = 0; j < parents.length; j++ ) {
|
1785
|
+
aCircular = parents[j] === a[i];
|
1786
|
+
bCircular = parentsB[j] === b[i];
|
1787
|
+
if ( aCircular || bCircular ) {
|
1788
|
+
if ( a[i] === b[i] || aCircular && bCircular ) {
|
1789
|
+
loop = true;
|
1790
|
+
} else {
|
1791
|
+
parents.pop();
|
1792
|
+
parentsB.pop();
|
1793
|
+
return false;
|
1794
|
+
}
|
1795
|
+
}
|
1796
|
+
}
|
1797
|
+
if ( !loop && !innerEquiv(a[i], b[i]) ) {
|
1798
|
+
parents.pop();
|
1799
|
+
parentsB.pop();
|
1800
|
+
return false;
|
1801
|
+
}
|
1802
|
+
}
|
1803
|
+
parents.pop();
|
1804
|
+
parentsB.pop();
|
1805
|
+
return true;
|
1806
|
+
},
|
1807
|
+
|
1808
|
+
"object": function( b, a ) {
|
1809
|
+
/*jshint forin:false */
|
1810
|
+
var i, j, loop, aCircular, bCircular,
|
1811
|
+
// Default to true
|
1812
|
+
eq = true,
|
1813
|
+
aProperties = [],
|
1814
|
+
bProperties = [];
|
1815
|
+
|
1816
|
+
// comparing constructors is more strict than using
|
1817
|
+
// instanceof
|
1818
|
+
if ( a.constructor !== b.constructor ) {
|
1819
|
+
// Allow objects with no prototype to be equivalent to
|
1820
|
+
// objects with Object as their constructor.
|
1821
|
+
if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
|
1822
|
+
( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
|
1823
|
+
return false;
|
1824
|
+
}
|
1825
|
+
}
|
1826
|
+
|
1827
|
+
// stack constructor before traversing properties
|
1828
|
+
callers.push( a.constructor );
|
1829
|
+
|
1830
|
+
// track reference to avoid circular references
|
1831
|
+
parents.push( a );
|
1832
|
+
parentsB.push( b );
|
1833
|
+
|
1834
|
+
// be strict: don't ensure hasOwnProperty and go deep
|
1835
|
+
for ( i in a ) {
|
1836
|
+
loop = false;
|
1837
|
+
for ( j = 0; j < parents.length; j++ ) {
|
1838
|
+
aCircular = parents[j] === a[i];
|
1839
|
+
bCircular = parentsB[j] === b[i];
|
1840
|
+
if ( aCircular || bCircular ) {
|
1841
|
+
if ( a[i] === b[i] || aCircular && bCircular ) {
|
1842
|
+
loop = true;
|
1843
|
+
} else {
|
1844
|
+
eq = false;
|
1845
|
+
break;
|
1846
|
+
}
|
1847
|
+
}
|
1848
|
+
}
|
1849
|
+
aProperties.push(i);
|
1850
|
+
if ( !loop && !innerEquiv(a[i], b[i]) ) {
|
1851
|
+
eq = false;
|
1852
|
+
break;
|
1853
|
+
}
|
1854
|
+
}
|
1855
|
+
|
1856
|
+
parents.pop();
|
1857
|
+
parentsB.pop();
|
1858
|
+
callers.pop(); // unstack, we are done
|
1859
|
+
|
1860
|
+
for ( i in b ) {
|
1861
|
+
bProperties.push( i ); // collect b's properties
|
1862
|
+
}
|
1863
|
+
|
1864
|
+
// Ensures identical properties name
|
1865
|
+
return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
|
1866
|
+
}
|
1867
|
+
};
|
1868
|
+
}());
|
1869
|
+
|
1870
|
+
innerEquiv = function() { // can take multiple arguments
|
1871
|
+
var args = [].slice.apply( arguments );
|
1872
|
+
if ( args.length < 2 ) {
|
1873
|
+
return true; // end transition
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
return (function( a, b ) {
|
1877
|
+
if ( a === b ) {
|
1878
|
+
return true; // catch the most you can
|
1879
|
+
} else if ( a === null || b === null || typeof a === "undefined" ||
|
1880
|
+
typeof b === "undefined" ||
|
1881
|
+
QUnit.objectType(a) !== QUnit.objectType(b) ) {
|
1882
|
+
return false; // don't lose time with error prone cases
|
1883
|
+
} else {
|
1884
|
+
return bindCallbacks(a, callbacks, [ b, a ]);
|
1885
|
+
}
|
1886
|
+
|
1887
|
+
// apply transition with (1..n) arguments
|
1888
|
+
}( args[0], args[1] ) && innerEquiv.apply( this, args.splice(1, args.length - 1 )) );
|
1889
|
+
};
|
1890
|
+
|
1891
|
+
return innerEquiv;
|
1892
|
+
}());
|
1893
|
+
|
1894
|
+
/**
|
1895
|
+
* jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
|
1896
|
+
* http://flesler.blogspot.com Licensed under BSD
|
1897
|
+
* (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
|
1898
|
+
*
|
1899
|
+
* @projectDescription Advanced and extensible data dumping for Javascript.
|
1900
|
+
* @version 1.0.0
|
1901
|
+
* @author Ariel Flesler
|
1902
|
+
* @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
|
1903
|
+
*/
|
1904
|
+
QUnit.jsDump = (function() {
|
1905
|
+
function quote( str ) {
|
1906
|
+
return "\"" + str.toString().replace( /"/g, "\\\"" ) + "\"";
|
1907
|
+
}
|
1908
|
+
function literal( o ) {
|
1909
|
+
return o + "";
|
1910
|
+
}
|
1911
|
+
function join( pre, arr, post ) {
|
1912
|
+
var s = jsDump.separator(),
|
1913
|
+
base = jsDump.indent(),
|
1914
|
+
inner = jsDump.indent(1);
|
1915
|
+
if ( arr.join ) {
|
1916
|
+
arr = arr.join( "," + s + inner );
|
1917
|
+
}
|
1918
|
+
if ( !arr ) {
|
1919
|
+
return pre + post;
|
1920
|
+
}
|
1921
|
+
return [ pre, inner + arr, base + post ].join(s);
|
1922
|
+
}
|
1923
|
+
function array( arr, stack ) {
|
1924
|
+
var i = arr.length, ret = new Array(i);
|
1925
|
+
this.up();
|
1926
|
+
while ( i-- ) {
|
1927
|
+
ret[i] = this.parse( arr[i] , undefined , stack);
|
1928
|
+
}
|
1929
|
+
this.down();
|
1930
|
+
return join( "[", ret, "]" );
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
var reName = /^function (\w+)/,
|
1934
|
+
jsDump = {
|
1935
|
+
// type is used mostly internally, you can fix a (custom)type in advance
|
1936
|
+
parse: function( obj, type, stack ) {
|
1937
|
+
stack = stack || [ ];
|
1938
|
+
var inStack, res,
|
1939
|
+
parser = this.parsers[ type || this.typeOf(obj) ];
|
1940
|
+
|
1941
|
+
type = typeof parser;
|
1942
|
+
inStack = inArray( obj, stack );
|
1943
|
+
|
1944
|
+
if ( inStack !== -1 ) {
|
1945
|
+
return "recursion(" + (inStack - stack.length) + ")";
|
1946
|
+
}
|
1947
|
+
if ( type === "function" ) {
|
1948
|
+
stack.push( obj );
|
1949
|
+
res = parser.call( this, obj, stack );
|
1950
|
+
stack.pop();
|
1951
|
+
return res;
|
1952
|
+
}
|
1953
|
+
return ( type === "string" ) ? parser : this.parsers.error;
|
1954
|
+
},
|
1955
|
+
typeOf: function( obj ) {
|
1956
|
+
var type;
|
1957
|
+
if ( obj === null ) {
|
1958
|
+
type = "null";
|
1959
|
+
} else if ( typeof obj === "undefined" ) {
|
1960
|
+
type = "undefined";
|
1961
|
+
} else if ( QUnit.is( "regexp", obj) ) {
|
1962
|
+
type = "regexp";
|
1963
|
+
} else if ( QUnit.is( "date", obj) ) {
|
1964
|
+
type = "date";
|
1965
|
+
} else if ( QUnit.is( "function", obj) ) {
|
1966
|
+
type = "function";
|
1967
|
+
} else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
|
1968
|
+
type = "window";
|
1969
|
+
} else if ( obj.nodeType === 9 ) {
|
1970
|
+
type = "document";
|
1971
|
+
} else if ( obj.nodeType ) {
|
1972
|
+
type = "node";
|
1973
|
+
} else if (
|
1974
|
+
// native arrays
|
1975
|
+
toString.call( obj ) === "[object Array]" ||
|
1976
|
+
// NodeList objects
|
1977
|
+
( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
|
1978
|
+
) {
|
1979
|
+
type = "array";
|
1980
|
+
} else if ( obj.constructor === Error.prototype.constructor ) {
|
1981
|
+
type = "error";
|
1982
|
+
} else {
|
1983
|
+
type = typeof obj;
|
1984
|
+
}
|
1985
|
+
return type;
|
1986
|
+
},
|
1987
|
+
separator: function() {
|
1988
|
+
return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
|
1989
|
+
},
|
1990
|
+
// extra can be a number, shortcut for increasing-calling-decreasing
|
1991
|
+
indent: function( extra ) {
|
1992
|
+
if ( !this.multiline ) {
|
1993
|
+
return "";
|
1994
|
+
}
|
1995
|
+
var chr = this.indentChar;
|
1996
|
+
if ( this.HTML ) {
|
1997
|
+
chr = chr.replace( /\t/g, " " ).replace( / /g, " " );
|
1998
|
+
}
|
1999
|
+
return new Array( this.depth + ( extra || 0 ) ).join(chr);
|
2000
|
+
},
|
2001
|
+
up: function( a ) {
|
2002
|
+
this.depth += a || 1;
|
2003
|
+
},
|
2004
|
+
down: function( a ) {
|
2005
|
+
this.depth -= a || 1;
|
2006
|
+
},
|
2007
|
+
setParser: function( name, parser ) {
|
2008
|
+
this.parsers[name] = parser;
|
2009
|
+
},
|
2010
|
+
// The next 3 are exposed so you can use them
|
2011
|
+
quote: quote,
|
2012
|
+
literal: literal,
|
2013
|
+
join: join,
|
2014
|
+
//
|
2015
|
+
depth: 1,
|
2016
|
+
// This is the list of parsers, to modify them, use jsDump.setParser
|
2017
|
+
parsers: {
|
2018
|
+
window: "[Window]",
|
2019
|
+
document: "[Document]",
|
2020
|
+
error: function(error) {
|
2021
|
+
return "Error(\"" + error.message + "\")";
|
2022
|
+
},
|
2023
|
+
unknown: "[Unknown]",
|
2024
|
+
"null": "null",
|
2025
|
+
"undefined": "undefined",
|
2026
|
+
"function": function( fn ) {
|
2027
|
+
var ret = "function",
|
2028
|
+
// functions never have name in IE
|
2029
|
+
name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];
|
2030
|
+
|
2031
|
+
if ( name ) {
|
2032
|
+
ret += " " + name;
|
2033
|
+
}
|
2034
|
+
ret += "( ";
|
2035
|
+
|
2036
|
+
ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
|
2037
|
+
return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
|
2038
|
+
},
|
2039
|
+
array: array,
|
2040
|
+
nodelist: array,
|
2041
|
+
"arguments": array,
|
2042
|
+
object: function( map, stack ) {
|
2043
|
+
/*jshint forin:false */
|
2044
|
+
var ret = [ ], keys, key, val, i;
|
2045
|
+
QUnit.jsDump.up();
|
2046
|
+
keys = [];
|
2047
|
+
for ( key in map ) {
|
2048
|
+
keys.push( key );
|
2049
|
+
}
|
2050
|
+
keys.sort();
|
2051
|
+
for ( i = 0; i < keys.length; i++ ) {
|
2052
|
+
key = keys[ i ];
|
2053
|
+
val = map[ key ];
|
2054
|
+
ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
|
2055
|
+
}
|
2056
|
+
QUnit.jsDump.down();
|
2057
|
+
return join( "{", ret, "}" );
|
2058
|
+
},
|
2059
|
+
node: function( node ) {
|
2060
|
+
var len, i, val,
|
2061
|
+
open = QUnit.jsDump.HTML ? "<" : "<",
|
2062
|
+
close = QUnit.jsDump.HTML ? ">" : ">",
|
2063
|
+
tag = node.nodeName.toLowerCase(),
|
2064
|
+
ret = open + tag,
|
2065
|
+
attrs = node.attributes;
|
2066
|
+
|
2067
|
+
if ( attrs ) {
|
2068
|
+
for ( i = 0, len = attrs.length; i < len; i++ ) {
|
2069
|
+
val = attrs[i].nodeValue;
|
2070
|
+
// IE6 includes all attributes in .attributes, even ones not explicitly set.
|
2071
|
+
// Those have values like undefined, null, 0, false, "" or "inherit".
|
2072
|
+
if ( val && val !== "inherit" ) {
|
2073
|
+
ret += " " + attrs[i].nodeName + "=" + QUnit.jsDump.parse( val, "attribute" );
|
2074
|
+
}
|
2075
|
+
}
|
2076
|
+
}
|
2077
|
+
ret += close;
|
2078
|
+
|
2079
|
+
// Show content of TextNode or CDATASection
|
2080
|
+
if ( node.nodeType === 3 || node.nodeType === 4 ) {
|
2081
|
+
ret += node.nodeValue;
|
2082
|
+
}
|
2083
|
+
|
2084
|
+
return ret + open + "/" + tag + close;
|
2085
|
+
},
|
2086
|
+
// function calls it internally, it's the arguments part of the function
|
2087
|
+
functionArgs: function( fn ) {
|
2088
|
+
var args,
|
2089
|
+
l = fn.length;
|
2090
|
+
|
2091
|
+
if ( !l ) {
|
2092
|
+
return "";
|
2093
|
+
}
|
2094
|
+
|
2095
|
+
args = new Array(l);
|
2096
|
+
while ( l-- ) {
|
2097
|
+
// 97 is 'a'
|
2098
|
+
args[l] = String.fromCharCode(97+l);
|
2099
|
+
}
|
2100
|
+
return " " + args.join( ", " ) + " ";
|
2101
|
+
},
|
2102
|
+
// object calls it internally, the key part of an item in a map
|
2103
|
+
key: quote,
|
2104
|
+
// function calls it internally, it's the content of the function
|
2105
|
+
functionCode: "[code]",
|
2106
|
+
// node calls it internally, it's an html attribute value
|
2107
|
+
attribute: quote,
|
2108
|
+
string: quote,
|
2109
|
+
date: quote,
|
2110
|
+
regexp: literal,
|
2111
|
+
number: literal,
|
2112
|
+
"boolean": literal
|
2113
|
+
},
|
2114
|
+
// if true, entities are escaped ( <, >, \t, space and \n )
|
2115
|
+
HTML: false,
|
2116
|
+
// indentation unit
|
2117
|
+
indentChar: " ",
|
2118
|
+
// if true, items in a collection, are separated by a \n, else just a space.
|
2119
|
+
multiline: true
|
2120
|
+
};
|
2121
|
+
|
2122
|
+
return jsDump;
|
2123
|
+
}());
|
2124
|
+
|
2125
|
+
/*
|
2126
|
+
* Javascript Diff Algorithm
|
2127
|
+
* By John Resig (http://ejohn.org/)
|
2128
|
+
* Modified by Chu Alan "sprite"
|
2129
|
+
*
|
2130
|
+
* Released under the MIT license.
|
2131
|
+
*
|
2132
|
+
* More Info:
|
2133
|
+
* http://ejohn.org/projects/javascript-diff-algorithm/
|
2134
|
+
*
|
2135
|
+
* Usage: QUnit.diff(expected, actual)
|
2136
|
+
*
|
2137
|
+
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
|
2138
|
+
*/
|
2139
|
+
QUnit.diff = (function() {
|
2140
|
+
/*jshint eqeqeq:false, eqnull:true */
|
2141
|
+
function diff( o, n ) {
|
2142
|
+
var i,
|
2143
|
+
ns = {},
|
2144
|
+
os = {};
|
2145
|
+
|
2146
|
+
for ( i = 0; i < n.length; i++ ) {
|
2147
|
+
if ( !hasOwn.call( ns, n[i] ) ) {
|
2148
|
+
ns[ n[i] ] = {
|
2149
|
+
rows: [],
|
2150
|
+
o: null
|
2151
|
+
};
|
2152
|
+
}
|
2153
|
+
ns[ n[i] ].rows.push( i );
|
2154
|
+
}
|
2155
|
+
|
2156
|
+
for ( i = 0; i < o.length; i++ ) {
|
2157
|
+
if ( !hasOwn.call( os, o[i] ) ) {
|
2158
|
+
os[ o[i] ] = {
|
2159
|
+
rows: [],
|
2160
|
+
n: null
|
2161
|
+
};
|
2162
|
+
}
|
2163
|
+
os[ o[i] ].rows.push( i );
|
2164
|
+
}
|
2165
|
+
|
2166
|
+
for ( i in ns ) {
|
2167
|
+
if ( hasOwn.call( ns, i ) ) {
|
2168
|
+
if ( ns[i].rows.length === 1 && hasOwn.call( os, i ) && os[i].rows.length === 1 ) {
|
2169
|
+
n[ ns[i].rows[0] ] = {
|
2170
|
+
text: n[ ns[i].rows[0] ],
|
2171
|
+
row: os[i].rows[0]
|
2172
|
+
};
|
2173
|
+
o[ os[i].rows[0] ] = {
|
2174
|
+
text: o[ os[i].rows[0] ],
|
2175
|
+
row: ns[i].rows[0]
|
2176
|
+
};
|
2177
|
+
}
|
2178
|
+
}
|
2179
|
+
}
|
2180
|
+
|
2181
|
+
for ( i = 0; i < n.length - 1; i++ ) {
|
2182
|
+
if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
|
2183
|
+
n[ i + 1 ] == o[ n[i].row + 1 ] ) {
|
2184
|
+
|
2185
|
+
n[ i + 1 ] = {
|
2186
|
+
text: n[ i + 1 ],
|
2187
|
+
row: n[i].row + 1
|
2188
|
+
};
|
2189
|
+
o[ n[i].row + 1 ] = {
|
2190
|
+
text: o[ n[i].row + 1 ],
|
2191
|
+
row: i + 1
|
2192
|
+
};
|
2193
|
+
}
|
2194
|
+
}
|
2195
|
+
|
2196
|
+
for ( i = n.length - 1; i > 0; i-- ) {
|
2197
|
+
if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
|
2198
|
+
n[ i - 1 ] == o[ n[i].row - 1 ]) {
|
2199
|
+
|
2200
|
+
n[ i - 1 ] = {
|
2201
|
+
text: n[ i - 1 ],
|
2202
|
+
row: n[i].row - 1
|
2203
|
+
};
|
2204
|
+
o[ n[i].row - 1 ] = {
|
2205
|
+
text: o[ n[i].row - 1 ],
|
2206
|
+
row: i - 1
|
2207
|
+
};
|
2208
|
+
}
|
2209
|
+
}
|
2210
|
+
|
2211
|
+
return {
|
2212
|
+
o: o,
|
2213
|
+
n: n
|
2214
|
+
};
|
2215
|
+
}
|
2216
|
+
|
2217
|
+
return function( o, n ) {
|
2218
|
+
o = o.replace( /\s+$/, "" );
|
2219
|
+
n = n.replace( /\s+$/, "" );
|
2220
|
+
|
2221
|
+
var i, pre,
|
2222
|
+
str = "",
|
2223
|
+
out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
|
2224
|
+
oSpace = o.match(/\s+/g),
|
2225
|
+
nSpace = n.match(/\s+/g);
|
2226
|
+
|
2227
|
+
if ( oSpace == null ) {
|
2228
|
+
oSpace = [ " " ];
|
2229
|
+
}
|
2230
|
+
else {
|
2231
|
+
oSpace.push( " " );
|
2232
|
+
}
|
2233
|
+
|
2234
|
+
if ( nSpace == null ) {
|
2235
|
+
nSpace = [ " " ];
|
2236
|
+
}
|
2237
|
+
else {
|
2238
|
+
nSpace.push( " " );
|
2239
|
+
}
|
2240
|
+
|
2241
|
+
if ( out.n.length === 0 ) {
|
2242
|
+
for ( i = 0; i < out.o.length; i++ ) {
|
2243
|
+
str += "<del>" + out.o[i] + oSpace[i] + "</del>";
|
2244
|
+
}
|
2245
|
+
}
|
2246
|
+
else {
|
2247
|
+
if ( out.n[0].text == null ) {
|
2248
|
+
for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
|
2249
|
+
str += "<del>" + out.o[n] + oSpace[n] + "</del>";
|
2250
|
+
}
|
2251
|
+
}
|
2252
|
+
|
2253
|
+
for ( i = 0; i < out.n.length; i++ ) {
|
2254
|
+
if (out.n[i].text == null) {
|
2255
|
+
str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
|
2256
|
+
}
|
2257
|
+
else {
|
2258
|
+
// `pre` initialized at top of scope
|
2259
|
+
pre = "";
|
2260
|
+
|
2261
|
+
for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
|
2262
|
+
pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
|
2263
|
+
}
|
2264
|
+
str += " " + out.n[i].text + nSpace[i] + pre;
|
2265
|
+
}
|
2266
|
+
}
|
2267
|
+
}
|
2268
|
+
|
2269
|
+
return str;
|
2270
|
+
};
|
2271
|
+
}());
|
2272
|
+
|
2273
|
+
// For browser, export only select globals
|
2274
|
+
if ( typeof window !== "undefined" ) {
|
2275
|
+
extend( window, QUnit.constructor.prototype );
|
2276
|
+
window.QUnit = QUnit;
|
2277
|
+
}
|
2278
|
+
|
2279
|
+
// For CommonJS environments, export everything
|
2280
|
+
if ( typeof module !== "undefined" && module.exports ) {
|
2281
|
+
module.exports = QUnit;
|
2282
|
+
}
|
2283
|
+
|
2284
|
+
|
2285
|
+
// Get a reference to the global object, like window in browsers
|
2286
|
+
}( (function() {
|
2287
|
+
return this;
|
2288
|
+
})() ));
|