From 498b5700bef45dae9c5d25c5d996995c7f9064d3 Mon Sep 17 00:00:00 2001
From: lukemelia
Date: Thu, 25 Jan 2007 03:56:17 +0000
Subject: [PATCH] prepare to upgrade to Rails 1.2.1
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@404 a4c988fc-2ded-0310-b66e-134b36920a42
---
tracks/vendor/rails/TAG_rel_1-2-0_RC2 | 0
tracks/vendor/rails/actionmailer/CHANGELOG | 282 --
tracks/vendor/rails/actionmailer/MIT-LICENSE | 21 -
tracks/vendor/rails/actionmailer/README | 145 -
tracks/vendor/rails/actionmailer/Rakefile | 95 -
tracks/vendor/rails/actionmailer/install.rb | 30 -
.../rails/actionmailer/lib/action_mailer.rb | 50 -
.../lib/action_mailer/adv_attr_accessor.rb | 30 -
.../actionmailer/lib/action_mailer/base.rb | 562 ---
.../actionmailer/lib/action_mailer/helpers.rb | 111 -
.../lib/action_mailer/mail_helper.rb | 19 -
.../actionmailer/lib/action_mailer/part.rb | 113 -
.../lib/action_mailer/part_container.rb | 51 -
.../actionmailer/lib/action_mailer/quoting.rb | 59 -
.../actionmailer/lib/action_mailer/utils.rb | 8 -
.../lib/action_mailer/vendor/text/format.rb | 1466 --------
.../lib/action_mailer/vendor/tmail.rb | 3 -
.../lib/action_mailer/vendor/tmail/address.rb | 242 --
.../action_mailer/vendor/tmail/attachments.rb | 39 -
.../lib/action_mailer/vendor/tmail/base64.rb | 71 -
.../lib/action_mailer/vendor/tmail/config.rb | 69 -
.../lib/action_mailer/vendor/tmail/encode.rb | 467 ---
.../lib/action_mailer/vendor/tmail/facade.rb | 552 ---
.../lib/action_mailer/vendor/tmail/header.rb | 914 -----
.../lib/action_mailer/vendor/tmail/info.rb | 35 -
.../lib/action_mailer/vendor/tmail/loader.rb | 1 -
.../lib/action_mailer/vendor/tmail/mail.rb | 447 ---
.../lib/action_mailer/vendor/tmail/mailbox.rb | 433 ---
.../lib/action_mailer/vendor/tmail/mbox.rb | 1 -
.../lib/action_mailer/vendor/tmail/net.rb | 280 --
.../action_mailer/vendor/tmail/obsolete.rb | 135 -
.../lib/action_mailer/vendor/tmail/parser.rb | 1522 --------
.../lib/action_mailer/vendor/tmail/port.rb | 377 --
.../lib/action_mailer/vendor/tmail/quoting.rb | 131 -
.../lib/action_mailer/vendor/tmail/scanner.rb | 41 -
.../action_mailer/vendor/tmail/scanner_r.rb | 263 --
.../action_mailer/vendor/tmail/stringio.rb | 277 --
.../lib/action_mailer/vendor/tmail/tmail.rb | 1 -
.../lib/action_mailer/vendor/tmail/utils.rb | 238 --
.../actionmailer/lib/action_mailer/version.rb | 9 -
.../rails/actionmailer/test/abstract_unit.rb | 30 -
.../test/fixtures/first_mailer/share.rhtml | 1 -
.../fixtures/helper_mailer/use_helper.rhtml | 1 -
.../helper_mailer/use_helper_method.rhtml | 1 -
.../helper_mailer/use_mail_helper.rhtml | 5 -
.../helper_mailer/use_test_helper.rhtml | 1 -
.../test/fixtures/helpers/test_helper.rb | 5 -
...ltipart_with_template_path_with_dots.rhtml | 1 -
...ltipart_with_template_path_with_dots.rhtml | 0
.../actionmailer/test/fixtures/raw_email | 14 -
.../actionmailer/test/fixtures/raw_email10 | 20 -
.../actionmailer/test/fixtures/raw_email11 | 34 -
.../actionmailer/test/fixtures/raw_email12 | 32 -
.../actionmailer/test/fixtures/raw_email13 | 29 -
.../actionmailer/test/fixtures/raw_email2 | 114 -
.../actionmailer/test/fixtures/raw_email3 | 70 -
.../actionmailer/test/fixtures/raw_email4 | 59 -
.../actionmailer/test/fixtures/raw_email5 | 19 -
.../actionmailer/test/fixtures/raw_email6 | 20 -
.../actionmailer/test/fixtures/raw_email7 | 66 -
.../actionmailer/test/fixtures/raw_email8 | 47 -
.../actionmailer/test/fixtures/raw_email9 | 28 -
.../test/fixtures/raw_email_quoted_with_0d0a | 14 -
.../raw_email_with_partially_quoted_subject | 14 -
.../test/fixtures/second_mailer/share.rhtml | 1 -
.../test/fixtures/templates/signed_up.rhtml | 3 -
...implicitly_multipart_example.ignored.rhtml | 1 -
.../implicitly_multipart_example.rhtml.bak | 1 -
...plicitly_multipart_example.text.html.rhtml | 10 -
...licitly_multipart_example.text.plain.rhtml | 2 -
...plicitly_multipart_example.text.yaml.rhtml | 1 -
.../test/fixtures/test_mailer/signed_up.rhtml | 3 -
.../test_mailer/signed_up_with_url.rhtml | 3 -
.../actionmailer/test/mail_helper_test.rb | 91 -
.../actionmailer/test/mail_render_test.rb | 79 -
.../actionmailer/test/mail_service_test.rb | 803 -----
.../rails/actionmailer/test/quoting_test.rb | 57 -
.../rails/actionmailer/test/tmail_test.rb | 13 -
.../rails/actionmailer/test/url_test.rb | 68 -
tracks/vendor/rails/actionpack/CHANGELOG | 3072 -----------------
tracks/vendor/rails/actionpack/MIT-LICENSE | 21 -
tracks/vendor/rails/actionpack/README | 469 ---
.../rails/actionpack/RUNNING_UNIT_TESTS | 25 -
tracks/vendor/rails/actionpack/Rakefile | 154 -
.../rails/actionpack/examples/.htaccess | 24 -
.../examples/address_book/index.rhtml | 33 -
.../examples/address_book/layout.rhtml | 8 -
.../examples/address_book_controller.cgi | 9 -
.../examples/address_book_controller.fcgi | 6 -
.../examples/address_book_controller.rb | 52 -
.../examples/address_book_controller.rbx | 4 -
.../rails/actionpack/examples/benchmark.rb | 52 -
.../examples/benchmark_with_ar.fcgi | 89 -
.../actionpack/examples/blog_controller.cgi | 53 -
.../actionpack/examples/debate/index.rhtml | 14 -
.../examples/debate/new_topic.rhtml | 22 -
.../actionpack/examples/debate/topic.rhtml | 32 -
.../actionpack/examples/debate_controller.cgi | 57 -
tracks/vendor/rails/actionpack/install.rb | 30 -
.../rails/actionpack/lib/action_controller.rb | 83 -
.../lib/action_controller/assertions.rb | 82 -
.../assertions/deprecated_assertions.rb | 228 --
.../assertions/dom_assertions.rb | 25 -
.../assertions/model_assertions.rb | 12 -
.../assertions/response_assertions.rb | 140 -
.../assertions/routing_assertions.rb | 82 -
.../assertions/selector_assertions.rb | 571 ---
.../assertions/tag_assertions.rb | 117 -
.../actionpack/lib/action_controller/base.rb | 1229 -------
.../lib/action_controller/benchmarking.rb | 89 -
.../lib/action_controller/caching.rb | 616 ----
.../lib/action_controller/cgi_ext/cgi_ext.rb | 36 -
.../action_controller/cgi_ext/cgi_methods.rb | 210 --
.../cgi_ext/cookie_performance_fix.rb | 125 -
.../cgi_ext/raw_post_data_fix.rb | 95 -
.../lib/action_controller/cgi_process.rb | 230 --
.../lib/action_controller/components.rb | 182 -
.../lib/action_controller/cookies.rb | 78 -
.../deprecated_dependencies.rb | 65 -
.../action_controller/deprecated_redirects.rb | 17 -
.../deprecated_request_methods.rb | 34 -
.../lib/action_controller/filters.rb | 667 ----
.../actionpack/lib/action_controller/flash.rb | 182 -
.../lib/action_controller/helpers.rb | 131 -
.../lib/action_controller/integration.rb | 552 ---
.../lib/action_controller/layout.rb | 313 --
.../action_controller/macros/auto_complete.rb | 53 -
.../macros/in_place_editing.rb | 33 -
.../lib/action_controller/mime_responds.rb | 181 -
.../lib/action_controller/mime_type.rb | 200 --
.../lib/action_controller/pagination.rb | 402 ---
.../lib/action_controller/request.rb | 263 --
.../lib/action_controller/rescue.rb | 142 -
.../lib/action_controller/resources.rb | 294 --
.../lib/action_controller/response.rb | 35 -
.../lib/action_controller/routing.rb | 1314 -------
.../lib/action_controller/scaffolding.rb | 189 -
.../session/active_record_store.rb | 335 --
.../action_controller/session/drb_server.rb | 32 -
.../action_controller/session/drb_store.rb | 35 -
.../session/mem_cache_store.rb | 105 -
.../action_controller/session_management.rb | 142 -
.../lib/action_controller/status_codes.rb | 89 -
.../lib/action_controller/streaming.rb | 138 -
.../rescues/_request_and_response.rhtml | 44 -
.../templates/rescues/_trace.rhtml | 26 -
.../templates/rescues/diagnostics.rhtml | 11 -
.../templates/rescues/layout.rhtml | 29 -
.../templates/rescues/missing_template.rhtml | 2 -
.../templates/rescues/routing_error.rhtml | 10 -
.../templates/rescues/template_error.rhtml | 21 -
.../templates/rescues/unknown_action.rhtml | 2 -
.../templates/scaffolds/edit.rhtml | 7 -
.../templates/scaffolds/layout.rhtml | 69 -
.../templates/scaffolds/list.rhtml | 27 -
.../templates/scaffolds/new.rhtml | 6 -
.../templates/scaffolds/show.rhtml | 9 -
.../lib/action_controller/test_process.rb | 504 ---
.../lib/action_controller/url_rewriter.rb | 108 -
.../vendor/html-scanner/html/document.rb | 65 -
.../vendor/html-scanner/html/node.rb | 532 ---
.../vendor/html-scanner/html/selector.rb | 822 -----
.../vendor/html-scanner/html/tokenizer.rb | 105 -
.../vendor/html-scanner/html/version.rb | 11 -
.../lib/action_controller/vendor/xml_node.rb | 97 -
.../lib/action_controller/verification.rb | 107 -
.../rails/actionpack/lib/action_pack.rb | 24 -
.../actionpack/lib/action_pack/version.rb | 9 -
.../rails/actionpack/lib/action_view.rb | 32 -
.../rails/actionpack/lib/action_view/base.rb | 538 ---
.../lib/action_view/compiled_templates.rb | 70 -
.../helpers/active_record_helper.rb | 237 --
.../action_view/helpers/asset_tag_helper.rb | 178 -
.../action_view/helpers/benchmark_helper.rb | 24 -
.../lib/action_view/helpers/cache_helper.rb | 10 -
.../lib/action_view/helpers/capture_helper.rb | 128 -
.../lib/action_view/helpers/date_helper.rb | 429 ---
.../lib/action_view/helpers/debug_helper.rb | 17 -
.../action_view/helpers/deprecated_helper.rb | 34 -
.../lib/action_view/helpers/form_helper.rb | 446 ---
.../helpers/form_options_helper.rb | 363 --
.../action_view/helpers/form_tag_helper.rb | 176 -
.../helpers/java_script_macros_helper.rb | 233 --
.../action_view/helpers/javascript_helper.rb | 193 --
.../helpers/javascripts/controls.js | 833 -----
.../helpers/javascripts/dragdrop.js | 942 -----
.../helpers/javascripts/effects.js | 1088 ------
.../helpers/javascripts/prototype.js | 2426 -------------
.../lib/action_view/helpers/number_helper.rb | 155 -
.../action_view/helpers/pagination_helper.rb | 86 -
.../action_view/helpers/prototype_helper.rb | 876 -----
.../helpers/scriptaculous_helper.rb | 140 -
.../lib/action_view/helpers/tag_helper.rb | 84 -
.../lib/action_view/helpers/text_helper.rb | 406 ---
.../lib/action_view/helpers/url_helper.rb | 400 ---
.../actionpack/lib/action_view/partials.rb | 128 -
.../lib/action_view/template_error.rb | 110 -
.../rails/actionpack/test/abstract_unit.rb | 16 -
.../actionpack/test/active_record_unit.rb | 116 -
.../active_record_assertions_test.rb | 92 -
.../activerecord/active_record_store_test.rb | 142 -
.../test/activerecord/pagination_test.rb | 156 -
.../controller/action_pack_assertions_test.rb | 610 ----
.../test/controller/addresses_render_test.rb | 45 -
.../test/controller/assert_select_test.rb | 576 ----
.../actionpack/test/controller/base_test.rb | 136 -
.../test/controller/benchmark_test.rb | 33 -
.../test/controller/caching_test.rb | 228 --
.../test/controller/capture_test.rb | 82 -
.../actionpack/test/controller/cgi_test.rb | 428 ---
.../test/controller/components_test.rb | 151 -
.../test/controller/content_type_test.rb | 139 -
.../app/controllers/admin/user_controller.rb | 0
.../app/controllers/user_controller.rb | 0
.../bad_plugin/lib/plugin_controller.rb | 0
.../actionpack/test/controller/cookie_test.rb | 80 -
.../test/controller/custom_handler_test.rb | 41 -
.../deprecated_instance_variables_test.rb | 48 -
.../deprecated_base_methods_test.rb | 60 -
.../test/controller/fake_controllers.rb | 16 -
.../test/controller/filter_params_test.rb | 42 -
.../test/controller/filters_test.rb | 695 ----
.../actionpack/test/controller/flash_test.rb | 102 -
.../controller/fragment_store_setting_test.rb | 45 -
.../actionpack/test/controller/helper_test.rb | 187 -
.../test/controller/integration_test.rb | 154 -
.../actionpack/test/controller/layout_test.rb | 176 -
.../test/controller/mime_responds_test.rb | 351 --
.../test/controller/mime_type_test.rb | 33 -
.../test/controller/new_render_test.rb | 738 ----
.../test/controller/raw_post_test.rb | 68 -
.../test/controller/redirect_test.rb | 156 -
.../actionpack/test/controller/render_test.rb | 293 --
.../test/controller/request_test.rb | 311 --
.../test/controller/resources_test.rb | 267 --
.../test/controller/routing_test.rb | 1758 ----------
.../test/controller/selector_test.rb | 628 ----
.../test/controller/send_file_test.rb | 117 -
.../controller/session_management_test.rb | 145 -
.../actionpack/test/controller/test_test.rb | 495 ---
.../test/controller/url_rewriter_test.rb | 115 -
.../test/controller/verification_test.rb | 227 --
.../test/controller/webservice_test.rb | 248 --
.../test/fixtures/addresses/list.rhtml | 1 -
.../actionpack/test/fixtures/companies.yml | 24 -
.../rails/actionpack/test/fixtures/company.rb | 9 -
...default_content_types_for_respond_to.rhtml | 1 -
.../render_default_for_rhtml.rhtml | 1 -
.../content_type/render_default_for_rjs.rjs | 1 -
.../content_type/render_default_for_rxml.rxml | 1 -
.../test/fixtures/db_definitions/sqlite.sql | 42 -
.../_cookies_ivar.rhtml | 1 -
.../_cookies_method.rhtml | 1 -
.../_flash_ivar.rhtml | 1 -
.../_flash_method.rhtml | 1 -
.../_headers_ivar.rhtml | 1 -
.../_headers_method.rhtml | 1 -
.../_params_ivar.rhtml | 1 -
.../_params_method.rhtml | 1 -
.../_request_ivar.rhtml | 1 -
.../_request_method.rhtml | 1 -
.../_response_ivar.rhtml | 1 -
.../_response_method.rhtml | 1 -
.../_session_ivar.rhtml | 1 -
.../_session_method.rhtml | 1 -
.../actionpack/test/fixtures/developer.rb | 7 -
.../actionpack/test/fixtures/developers.yml | 21 -
.../test/fixtures/developers_projects.yml | 13 -
.../test/fixtures/fun/games/hello_world.rhtml | 1 -
.../test/fixtures/helpers/abc_helper.rb | 5 -
.../test/fixtures/helpers/fun/games_helper.rb | 3 -
.../test/fixtures/helpers/fun/pdf_helper.rb | 3 -
.../controller_name_space/nested.rhtml | 1 -
.../fixtures/layout_tests/layouts/item.rhtml | 1 -
.../layout_tests/layouts/layout_test.rhtml | 1 -
.../layouts/third_party_template_library.mab | 1 -
.../fixtures/layout_tests/views/hello.rhtml | 1 -
.../test/fixtures/layouts/builder.rxml | 3 -
.../test/fixtures/layouts/standard.rhtml | 1 -
.../fixtures/layouts/talk_from_action.rhtml | 2 -
.../test/fixtures/layouts/yield.rhtml | 2 -
.../test/fixtures/multipart/binary_file | Bin 19846 -> 0 bytes
.../test/fixtures/multipart/large_text_file | 10 -
.../test/fixtures/multipart/mixed_files | Bin 19937 -> 0 bytes
.../test/fixtures/multipart/mona_lisa.jpg | Bin 159528 -> 0 bytes
.../test/fixtures/multipart/single_parameter | 5 -
.../test/fixtures/multipart/text_file | 10 -
.../rails/actionpack/test/fixtures/project.rb | 3 -
.../actionpack/test/fixtures/projects.yml | 7 -
.../test/fixtures/public/images/rails.png | Bin 1787 -> 0 bytes
.../actionpack/test/fixtures/replies.yml | 13 -
.../rails/actionpack/test/fixtures/reply.rb | 5 -
.../respond_to/all_types_with_layout.rhtml | 1 -
.../respond_to/all_types_with_layout.rjs | 1 -
.../respond_to/layouts/standard.rhtml | 1 -
.../fixtures/respond_to/using_defaults.rhtml | 1 -
.../fixtures/respond_to/using_defaults.rjs | 1 -
.../fixtures/respond_to/using_defaults.rxml | 1 -
.../using_defaults_with_type_list.rhtml | 1 -
.../using_defaults_with_type_list.rjs | 1 -
.../using_defaults_with_type_list.rxml | 1 -
.../test/fixtures/scope/test/modgreet.rhtml | 1 -
.../test/fixtures/test/_customer.rhtml | 1 -
.../fixtures/test/_customer_greeting.rhtml | 1 -
.../test/fixtures/test/_hash_object.rhtml | 1 -
.../actionpack/test/fixtures/test/_hello.rxml | 1 -
.../test/fixtures/test/_partial_only.rhtml | 1 -
.../test/fixtures/test/_person.rhtml | 2 -
.../fixtures/test/action_talk_to_layout.rhtml | 2 -
.../fixtures/test/block_content_for.rhtml | 2 -
.../test/fixtures/test/capturing.rhtml | 4 -
.../test/fixtures/test/content_for.rhtml | 2 -
.../test/fixtures/test/delete_with_js.rjs | 2 -
.../dot.directory/render_file_with_ivar.rhtml | 1 -
.../test/fixtures/test/enum_rjs_test.rjs | 6 -
.../test/fixtures/test/erb_content_for.rhtml | 2 -
.../test/fixtures/test/greeting.rhtml | 1 -
.../actionpack/test/fixtures/test/hello.rxml | 4 -
.../test/fixtures/test/hello_world.rhtml | 1 -
.../test/fixtures/test/hello_world.rxml | 3 -
.../fixtures/test/hello_world_container.rxml | 3 -
.../test/hello_world_with_layout_false.rhtml | 1 -
.../test/fixtures/test/hello_xml_world.rxml | 11 -
.../actionpack/test/fixtures/test/list.rhtml | 1 -
.../test/non_erb_block_content_for.rxml | 4 -
.../fixtures/test/potential_conflicts.rhtml | 4 -
.../fixtures/test/render_file_with_ivar.rhtml | 1 -
.../test/render_file_with_locals.rhtml | 1 -
.../fixtures/test/render_to_string_test.rhtml | 1 -
.../test/update_element_with_capture.rhtml | 9 -
.../rails/actionpack/test/fixtures/topic.rb | 3 -
.../rails/actionpack/test/fixtures/topics.yml | 22 -
.../template/active_record_helper_test.rb | 200 --
.../test/template/asset_tag_helper_test.rb | 271 --
.../test/template/benchmark_helper_test.rb | 72 -
.../test/template/compiled_templates_test.rb | 135 -
.../test/template/date_helper_test.rb | 1322 -------
.../test/template/deprecated_helper_test.rb | 36 -
.../deprecated_instance_variables_test.rb | 43 -
.../test/template/form_helper_test.rb | 499 ---
.../test/template/form_options_helper_test.rb | 470 ---
.../test/template/form_tag_helper_test.rb | 172 -
.../java_script_macros_helper_test.rb | 109 -
.../test/template/javascript_helper_test.rb | 67 -
.../test/template/number_helper_test.rb | 92 -
.../test/template/prototype_helper_test.rb | 466 ---
.../template/scriptaculous_helper_test.rb | 90 -
.../test/template/tag_helper_test.rb | 68 -
.../test/template/text_helper_test.rb | 325 --
.../test/template/url_helper_test.rb | 303 --
.../rails/actionpack/test/testing_sandbox.rb | 11 -
.../vendor/rails/actionwebservice/CHANGELOG | 264 --
.../vendor/rails/actionwebservice/MIT-LICENSE | 21 -
tracks/vendor/rails/actionwebservice/README | 364 --
tracks/vendor/rails/actionwebservice/Rakefile | 171 -
tracks/vendor/rails/actionwebservice/TODO | 32 -
.../examples/googlesearch/README | 143 -
.../autoloading/google_search_api.rb | 50 -
.../autoloading/google_search_controller.rb | 57 -
.../delegated/google_search_service.rb | 108 -
.../delegated/search_controller.rb | 7 -
.../googlesearch/direct/google_search_api.rb | 50 -
.../googlesearch/direct/search_controller.rb | 58 -
.../examples/metaWeblog/README | 17 -
.../examples/metaWeblog/apis/blogger_api.rb | 60 -
.../metaWeblog/apis/blogger_service.rb | 34 -
.../metaWeblog/apis/meta_weblog_api.rb | 67 -
.../metaWeblog/apis/meta_weblog_service.rb | 48 -
.../controllers/xmlrpc_controller.rb | 16 -
.../vendor/rails/actionwebservice/install.rb | 30 -
.../lib/action_web_service.rb | 66 -
.../lib/action_web_service/api.rb | 249 --
.../lib/action_web_service/base.rb | 42 -
.../lib/action_web_service/casting.rb | 136 -
.../lib/action_web_service/client.rb | 3 -
.../lib/action_web_service/client/base.rb | 28 -
.../action_web_service/client/soap_client.rb | 113 -
.../client/xmlrpc_client.rb | 58 -
.../lib/action_web_service/container.rb | 3 -
.../container/action_controller_container.rb | 93 -
.../container/delegated_container.rb | 86 -
.../container/direct_container.rb | 69 -
.../lib/action_web_service/dispatcher.rb | 2 -
.../action_web_service/dispatcher/abstract.rb | 203 --
.../action_controller_dispatcher.rb | 376 --
.../lib/action_web_service/invocation.rb | 202 --
.../lib/action_web_service/protocol.rb | 4 -
.../action_web_service/protocol/abstract.rb | 112 -
.../action_web_service/protocol/discovery.rb | 37 -
.../protocol/soap_protocol.rb | 176 -
.../protocol/soap_protocol/marshaler.rb | 241 --
.../protocol/xmlrpc_protocol.rb | 110 -
.../lib/action_web_service/scaffolding.rb | 283 --
.../lib/action_web_service/struct.rb | 68 -
.../support/class_inheritable_options.rb | 26 -
.../support/signature_types.rb | 222 --
.../templates/scaffolds/layout.rhtml | 65 -
.../templates/scaffolds/methods.rhtml | 6 -
.../templates/scaffolds/parameters.rhtml | 29 -
.../templates/scaffolds/result.rhtml | 30 -
.../lib/action_web_service/test_invoke.rb | 110 -
.../lib/action_web_service/version.rb | 9 -
tracks/vendor/rails/actionwebservice/setup.rb | 1379 --------
.../actionwebservice/test/abstract_client.rb | 183 -
.../test/abstract_dispatcher.rb | 505 ---
.../actionwebservice/test/abstract_unit.rb | 45 -
.../rails/actionwebservice/test/api_test.rb | 102 -
.../test/apis/auto_load_api.rb | 3 -
.../test/apis/broken_auto_load_api.rb | 2 -
.../rails/actionwebservice/test/base_test.rb | 42 -
.../actionwebservice/test/casting_test.rb | 86 -
.../actionwebservice/test/client_soap_test.rb | 152 -
.../test/client_xmlrpc_test.rb | 151 -
.../actionwebservice/test/container_test.rb | 73 -
.../dispatcher_action_controller_soap_test.rb | 137 -
...ispatcher_action_controller_xmlrpc_test.rb | 59 -
.../test/fixtures/db_definitions/mysql.sql | 7 -
.../actionwebservice/test/fixtures/users.yml | 10 -
.../vendor/rails/actionwebservice/test/gencov | 3 -
.../actionwebservice/test/invocation_test.rb | 185 -
tracks/vendor/rails/actionwebservice/test/run | 6 -
.../test/scaffolded_controller_test.rb | 146 -
.../actionwebservice/test/struct_test.rb | 52 -
.../actionwebservice/test/test_invoke_test.rb | 112 -
tracks/vendor/rails/activerecord/CHANGELOG | 2988 ----------------
tracks/vendor/rails/activerecord/MIT-LICENSE | 20 -
tracks/vendor/rails/activerecord/README | 360 --
.../rails/activerecord/RUNNING_UNIT_TESTS | 64 -
tracks/vendor/rails/activerecord/Rakefile | 226 --
.../activerecord/benchmarks/benchmark.rb | 26 -
.../benchmarks/mysql_benchmark.rb | 19 -
.../activerecord/examples/associations.png | Bin 40623 -> 0 bytes
.../activerecord/examples/associations.rb | 87 -
.../activerecord/examples/shared_setup.rb | 15 -
.../rails/activerecord/examples/validation.rb | 85 -
tracks/vendor/rails/activerecord/install.rb | 30 -
.../rails/activerecord/lib/active_record.rb | 85 -
.../lib/active_record/acts/list.rb | 244 --
.../lib/active_record/acts/nested_set.rb | 211 --
.../lib/active_record/acts/tree.rb | 89 -
.../lib/active_record/aggregations.rb | 191 -
.../lib/active_record/associations.rb | 1598 ---------
.../associations/association_collection.rb | 190 -
.../associations/association_proxy.rb | 158 -
.../associations/belongs_to_association.rb | 56 -
.../belongs_to_polymorphic_association.rb | 50 -
.../has_and_belongs_to_many_association.rb | 169 -
.../associations/has_many_association.rb | 210 --
.../has_many_through_association.rb | 237 --
.../associations/has_one_association.rb | 80 -
.../lib/active_record/attribute_methods.rb | 75 -
.../activerecord/lib/active_record/base.rb | 2152 ------------
.../lib/active_record/calculations.rb | 267 --
.../lib/active_record/callbacks.rb | 367 --
.../abstract/connection_specification.rb | 277 --
.../abstract/database_statements.rb | 130 -
.../connection_adapters/abstract/quoting.rb | 58 -
.../abstract/schema_definitions.rb | 343 --
.../abstract/schema_statements.rb | 292 --
.../connection_adapters/abstract_adapter.rb | 161 -
.../connection_adapters/db2_adapter.rb | 228 --
.../connection_adapters/firebird_adapter.rb | 728 ----
.../connection_adapters/frontbase_adapter.rb | 863 -----
.../connection_adapters/mysql_adapter.rb | 409 ---
.../connection_adapters/openbase_adapter.rb | 350 --
.../connection_adapters/oracle_adapter.rb | 679 ----
.../connection_adapters/postgresql_adapter.rb | 569 ---
.../connection_adapters/sqlite_adapter.rb | 398 ---
.../connection_adapters/sqlserver_adapter.rb | 590 ----
.../connection_adapters/sybase_adapter.rb | 662 ----
.../active_record/deprecated_associations.rb | 104 -
.../lib/active_record/deprecated_finders.rb | 44 -
.../lib/active_record/fixtures.rb | 614 ----
.../lib/active_record/locking/optimistic.rb | 106 -
.../lib/active_record/locking/pessimistic.rb | 77 -
.../lib/active_record/migration.rb | 394 ---
.../lib/active_record/observer.rb | 178 -
.../lib/active_record/query_cache.rb | 64 -
.../lib/active_record/reflection.rb | 204 --
.../activerecord/lib/active_record/schema.rb | 58 -
.../lib/active_record/schema_dumper.rb | 149 -
.../lib/active_record/timestamp.rb | 51 -
.../lib/active_record/transactions.rb | 136 -
.../lib/active_record/validations.rb | 842 -----
.../lib/active_record/vendor/db2.rb | 362 --
.../lib/active_record/vendor/mysql.rb | 1210 -------
.../lib/active_record/vendor/simple.rb | 693 ----
.../activerecord/lib/active_record/version.rb | 9 -
.../active_record/wrappers/yaml_wrapper.rb | 15 -
.../lib/active_record/wrappings.rb | 58 -
.../lib/active_record/xml_serialization.rb | 308 --
.../test/aaa_create_tables_test.rb | 59 -
.../rails/activerecord/test/abstract_unit.rb | 77 -
.../test/active_schema_test_mysql.rb | 31 -
.../rails/activerecord/test/adapter_test.rb | 87 -
.../test/adapter_test_sqlserver.rb | 81 -
.../activerecord/test/aggregations_test.rb | 95 -
tracks/vendor/rails/activerecord/test/all.sh | 8 -
.../rails/activerecord/test/ar_schema_test.rb | 33 -
.../test/association_inheritance_reload.rb | 14 -
.../test/associations/callbacks_test.rb | 126 -
.../cascaded_eager_loading_test.rb | 138 -
.../test/associations/eager_test.rb | 383 --
.../test/associations/extension_test.rb | 42 -
.../test/associations/join_model_test.rb | 480 ---
.../activerecord/test/associations_test.rb | 1809 ----------
.../test/attribute_methods_test.rb | 49 -
.../rails/activerecord/test/base_test.rb | 1559 ---------
.../rails/activerecord/test/binary_test.rb | 37 -
.../activerecord/test/calculations_test.rb | 211 --
.../rails/activerecord/test/callbacks_test.rb | 377 --
.../test/class_inheritable_attributes_test.rb | 32 -
.../activerecord/test/column_alias_test.rb | 17 -
.../test/connection_test_firebird.rb | 8 -
.../test/connections/native_db2/connection.rb | 25 -
.../connections/native_firebird/connection.rb | 26 -
.../native_frontbase/connection.rb | 27 -
.../connections/native_mysql/connection.rb | 24 -
.../connections/native_openbase/connection.rb | 21 -
.../connections/native_oracle/connection.rb | 27 -
.../native_postgresql/connection.rb | 23 -
.../connections/native_sqlite/connection.rb | 34 -
.../connections/native_sqlite3/connection.rb | 34 -
.../native_sqlite3/in_memory_connection.rb | 18 -
.../native_sqlserver/connection.rb | 23 -
.../native_sqlserver_odbc/connection.rb | 25 -
.../connections/native_sybase/connection.rb | 23 -
.../activerecord/test/copy_table_sqlite.rb | 64 -
.../test/datatype_test_postgresql.rb | 52 -
.../test/default_test_firebird.rb | 16 -
.../rails/activerecord/test/defaults_test.rb | 32 -
.../test/deprecated_associations_test.rb | 396 ---
.../test/deprecated_finder_test.rb | 151 -
.../activerecord/test/empty_date_time_test.rb | 25 -
.../rails/activerecord/test/finder_test.rb | 488 ---
.../activerecord/test/fixtures/accounts.yml | 28 -
.../activerecord/test/fixtures/author.rb | 99 -
.../test/fixtures/author_favorites.yml | 4 -
.../activerecord/test/fixtures/authors.yml | 7 -
.../activerecord/test/fixtures/auto_id.rb | 4 -
.../bad_fixtures/attr_with_numeric_first_char | 1 -
.../fixtures/bad_fixtures/attr_with_spaces | 1 -
.../test/fixtures/bad_fixtures/blank_line | 3 -
.../bad_fixtures/duplicate_attributes | 3 -
.../test/fixtures/bad_fixtures/missing_value | 1 -
.../activerecord/test/fixtures/binary.rb | 2 -
.../activerecord/test/fixtures/categories.yml | 14 -
.../categories/special_categories.yml | 9 -
.../subsubdir/arbitrary_filename.yml | 4 -
.../test/fixtures/categories_ordered.yml | 7 -
.../test/fixtures/categories_posts.yml | 23 -
.../test/fixtures/categorization.rb | 5 -
.../test/fixtures/categorizations.yml | 17 -
.../activerecord/test/fixtures/category.rb | 20 -
.../activerecord/test/fixtures/column_name.rb | 3 -
.../activerecord/test/fixtures/comment.rb | 23 -
.../activerecord/test/fixtures/comments.yml | 59 -
.../activerecord/test/fixtures/companies.yml | 55 -
.../activerecord/test/fixtures/company.rb | 107 -
.../test/fixtures/company_in_module.rb | 59 -
.../activerecord/test/fixtures/computer.rb | 3 -
.../activerecord/test/fixtures/computers.yml | 4 -
.../activerecord/test/fixtures/course.rb | 3 -
.../activerecord/test/fixtures/courses.yml | 7 -
.../activerecord/test/fixtures/customer.rb | 55 -
.../activerecord/test/fixtures/customers.yml | 17 -
.../test/fixtures/db_definitions/db2.drop.sql | 31 -
.../test/fixtures/db_definitions/db2.sql | 226 --
.../fixtures/db_definitions/db22.drop.sql | 2 -
.../test/fixtures/db_definitions/db22.sql | 5 -
.../fixtures/db_definitions/firebird.drop.sql | 61 -
.../test/fixtures/db_definitions/firebird.sql | 297 --
.../db_definitions/firebird2.drop.sql | 2 -
.../fixtures/db_definitions/firebird2.sql | 6 -
.../db_definitions/frontbase.drop.sql | 31 -
.../fixtures/db_definitions/frontbase.sql | 262 --
.../db_definitions/frontbase2.drop.sql | 1 -
.../fixtures/db_definitions/frontbase2.sql | 4 -
.../fixtures/db_definitions/mysql.drop.sql | 31 -
.../test/fixtures/db_definitions/mysql.sql | 228 --
.../fixtures/db_definitions/mysql2.drop.sql | 2 -
.../test/fixtures/db_definitions/mysql2.sql | 5 -
.../fixtures/db_definitions/openbase.drop.sql | 2 -
.../test/fixtures/db_definitions/openbase.sql | 294 --
.../db_definitions/openbase2.drop.sql | 2 -
.../fixtures/db_definitions/openbase2.sql | 7 -
.../fixtures/db_definitions/oracle.drop.sql | 63 -
.../test/fixtures/db_definitions/oracle.sql | 302 --
.../fixtures/db_definitions/oracle2.drop.sql | 2 -
.../test/fixtures/db_definitions/oracle2.sql | 6 -
.../db_definitions/postgresql.drop.sql | 36 -
.../fixtures/db_definitions/postgresql.sql | 258 --
.../db_definitions/postgresql2.drop.sql | 2 -
.../fixtures/db_definitions/postgresql2.sql | 5 -
.../test/fixtures/db_definitions/schema.rb | 60 -
.../fixtures/db_definitions/sqlite.drop.sql | 31 -
.../test/fixtures/db_definitions/sqlite.sql | 210 --
.../fixtures/db_definitions/sqlite2.drop.sql | 2 -
.../test/fixtures/db_definitions/sqlite2.sql | 5 -
.../db_definitions/sqlserver.drop.sql | 32 -
.../fixtures/db_definitions/sqlserver.sql | 230 --
.../db_definitions/sqlserver2.drop.sql | 2 -
.../fixtures/db_definitions/sqlserver2.sql | 5 -
.../fixtures/db_definitions/sybase.drop.sql | 33 -
.../test/fixtures/db_definitions/sybase.sql | 213 --
.../fixtures/db_definitions/sybase2.drop.sql | 4 -
.../test/fixtures/db_definitions/sybase2.sql | 5 -
.../activerecord/test/fixtures/default.rb | 2 -
.../activerecord/test/fixtures/developer.rb | 52 -
.../activerecord/test/fixtures/developers.yml | 21 -
.../test/fixtures/developers_projects.yml | 17 -
.../david_action_controller | 3 -
.../developers_projects/david_active_record | 3 -
.../developers_projects/jamis_active_record | 2 -
.../rails/activerecord/test/fixtures/edge.rb | 5 -
.../activerecord/test/fixtures/edges.yml | 6 -
.../activerecord/test/fixtures/entrant.rb | 3 -
.../activerecord/test/fixtures/entrants.yml | 14 -
.../test/fixtures/fk_test_has_fk.yml | 3 -
.../test/fixtures/fk_test_has_pk.yml | 2 -
.../activerecord/test/fixtures/flowers.jpg | Bin 19512 -> 0 bytes
.../test/fixtures/funny_jokes.yml | 10 -
.../rails/activerecord/test/fixtures/joke.rb | 6 -
.../activerecord/test/fixtures/keyboard.rb | 3 -
.../test/fixtures/legacy_thing.rb | 3 -
.../test/fixtures/legacy_things.yml | 3 -
.../migrations/1_people_have_last_names.rb | 9 -
.../migrations/2_we_need_reminders.rb | 12 -
.../migrations/3_innocent_jointable.rb | 12 -
.../1_give_me_big_numbers.rb | 15 -
.../1_people_have_last_names.rb | 9 -
.../2_we_need_reminders.rb | 12 -
.../migrations_with_duplicate/3_foo.rb | 7 -
.../3_innocent_jointable.rb | 12 -
.../1000_people_have_middle_names.rb | 9 -
.../1_people_have_last_names.rb | 9 -
.../3_we_need_reminders.rb | 12 -
.../4_innocent_jointable.rb | 12 -
.../rails/activerecord/test/fixtures/mixin.rb | 53 -
.../activerecord/test/fixtures/mixins.yml | 109 -
.../rails/activerecord/test/fixtures/movie.rb | 5 -
.../activerecord/test/fixtures/movies.yml | 7 -
.../test/fixtures/naked/csv/accounts.csv | 1 -
.../test/fixtures/naked/yml/accounts.yml | 1 -
.../test/fixtures/naked/yml/companies.yml | 1 -
.../test/fixtures/naked/yml/courses.yml | 1 -
.../rails/activerecord/test/fixtures/order.rb | 4 -
.../activerecord/test/fixtures/people.yml | 3 -
.../activerecord/test/fixtures/person.rb | 4 -
.../rails/activerecord/test/fixtures/post.rb | 58 -
.../activerecord/test/fixtures/posts.yml | 48 -
.../activerecord/test/fixtures/project.rb | 27 -
.../activerecord/test/fixtures/projects.yml | 7 -
.../activerecord/test/fixtures/reader.rb | 4 -
.../activerecord/test/fixtures/readers.yml | 4 -
.../rails/activerecord/test/fixtures/reply.rb | 37 -
.../activerecord/test/fixtures/subject.rb | 4 -
.../activerecord/test/fixtures/subscriber.rb | 6 -
.../test/fixtures/subscribers/first | 2 -
.../test/fixtures/subscribers/second | 2 -
.../rails/activerecord/test/fixtures/tag.rb | 5 -
.../activerecord/test/fixtures/tagging.rb | 6 -
.../activerecord/test/fixtures/taggings.yml | 18 -
.../rails/activerecord/test/fixtures/tags.yml | 7 -
.../rails/activerecord/test/fixtures/task.rb | 3 -
.../activerecord/test/fixtures/tasks.yml | 7 -
.../rails/activerecord/test/fixtures/topic.rb | 25 -
.../activerecord/test/fixtures/topics.yml | 22 -
.../activerecord/test/fixtures/vertex.rb | 9 -
.../activerecord/test/fixtures/vertices.yml | 4 -
.../rails/activerecord/test/fixtures_test.rb | 390 ---
.../activerecord/test/inheritance_test.rb | 205 --
.../rails/activerecord/test/lifecycle_test.rb | 137 -
.../rails/activerecord/test/locking_test.rb | 190 -
.../activerecord/test/method_scoping_test.rb | 416 ---
.../rails/activerecord/test/migration_test.rb | 706 ----
.../test/migration_test_firebird.rb | 124 -
.../test/mixin_nested_set_test.rb | 184 -
.../rails/activerecord/test/mixin_test.rb | 550 ---
.../rails/activerecord/test/modules_test.rb | 34 -
.../activerecord/test/multiple_db_test.rb | 60 -
.../vendor/rails/activerecord/test/pk_test.rb | 81 -
.../rails/activerecord/test/readonly_test.rb | 107 -
.../activerecord/test/reflection_test.rb | 159 -
.../schema_authorization_test_postgresql.rb | 75 -
.../activerecord/test/schema_dumper_test.rb | 96 -
.../test/schema_test_postgresql.rb | 64 -
.../activerecord/test/synonym_test_oracle.rb | 17 -
.../test/threaded_connections_test.rb | 48 -
.../activerecord/test/transactions_test.rb | 230 --
.../activerecord/test/unconnected_test.rb | 32 -
.../activerecord/test/validations_test.rb | 1097 ------
.../test/xml_serialization_test.rb | 125 -
tracks/vendor/rails/activesupport/CHANGELOG | 685 ----
tracks/vendor/rails/activesupport/MIT-LICENSE | 20 -
tracks/vendor/rails/activesupport/README | 43 -
tracks/vendor/rails/activesupport/Rakefile | 82 -
tracks/vendor/rails/activesupport/install.rb | 30 -
.../rails/activesupport/lib/active_support.rb | 44 -
.../lib/active_support/binding_of_caller.rb | 84 -
.../lib/active_support/breakpoint.rb | 528 ---
.../lib/active_support/caching_tools.rb | 62 -
.../lib/active_support/clean_logger.rb | 38 -
.../lib/active_support/core_ext.rb | 1 -
.../lib/active_support/core_ext/array.rb | 7 -
.../core_ext/array/conversions.rb | 72 -
.../active_support/core_ext/array/grouping.rb | 55 -
.../lib/active_support/core_ext/bigdecimal.rb | 3 -
.../core_ext/bigdecimal/formatting.rb | 7 -
.../lib/active_support/core_ext/blank.rb | 50 -
.../lib/active_support/core_ext/cgi.rb | 5 -
.../core_ext/cgi/escape_skipping_slashes.rb | 14 -
.../lib/active_support/core_ext/class.rb | 3 -
.../core_ext/class/attribute_accessors.rb | 44 -
.../core_ext/class/inheritable_attributes.rb | 120 -
.../active_support/core_ext/class/removal.rb | 24 -
.../lib/active_support/core_ext/date.rb | 6 -
.../core_ext/date/conversions.rb | 39 -
.../lib/active_support/core_ext/enumerable.rb | 62 -
.../lib/active_support/core_ext/exception.rb | 33 -
.../lib/active_support/core_ext/hash.rb | 13 -
.../core_ext/hash/conversions.rb | 155 -
.../lib/active_support/core_ext/hash/diff.rb | 11 -
.../core_ext/hash/indifferent_access.rb | 88 -
.../lib/active_support/core_ext/hash/keys.rb | 53 -
.../core_ext/hash/reverse_merge.rb | 25 -
.../lib/active_support/core_ext/integer.rb | 7 -
.../core_ext/integer/even_odd.rb | 24 -
.../core_ext/integer/inflections.rb | 15 -
.../lib/active_support/core_ext/kernel.rb | 4 -
.../core_ext/kernel/agnostics.rb | 11 -
.../core_ext/kernel/daemonizing.rb | 15 -
.../core_ext/kernel/reporting.rb | 51 -
.../core_ext/kernel/requires.rb | 24 -
.../lib/active_support/core_ext/load_error.rb | 38 -
.../lib/active_support/core_ext/logger.rb | 16 -
.../lib/active_support/core_ext/module.rb | 7 -
.../core_ext/module/aliasing.rb | 58 -
.../core_ext/module/attr_internal.rb | 31 -
.../core_ext/module/attribute_accessors.rb | 44 -
.../core_ext/module/delegation.rb | 41 -
.../core_ext/module/inclusion.rb | 11 -
.../core_ext/module/introspection.rb | 21 -
.../active_support/core_ext/module/loading.rb | 13 -
.../lib/active_support/core_ext/name_error.rb | 20 -
.../lib/active_support/core_ext/numeric.rb | 7 -
.../active_support/core_ext/numeric/bytes.rb | 44 -
.../active_support/core_ext/numeric/time.rb | 72 -
.../lib/active_support/core_ext/object.rb | 2 -
.../core_ext/object/extending.rb | 47 -
.../active_support/core_ext/object/misc.rb | 34 -
.../lib/active_support/core_ext/pathname.rb | 7 -
.../core_ext/pathname/clean_within.rb | 14 -
.../lib/active_support/core_ext/proc.rb | 12 -
.../lib/active_support/core_ext/range.rb | 5 -
.../core_ext/range/conversions.rb | 21 -
.../lib/active_support/core_ext/string.rb | 15 -
.../active_support/core_ext/string/access.rb | 58 -
.../core_ext/string/conversions.rb | 19 -
.../core_ext/string/inflections.rb | 153 -
.../core_ext/string/iterators.rb | 17 -
.../core_ext/string/starts_ends_with.rb | 20 -
.../active_support/core_ext/string/unicode.rb | 42 -
.../lib/active_support/core_ext/symbol.rb | 12 -
.../lib/active_support/core_ext/time.rb | 7 -
.../core_ext/time/calculations.rb | 191 -
.../core_ext/time/conversions.rb | 36 -
.../lib/active_support/dependencies.rb | 540 ---
.../lib/active_support/deprecation.rb | 201 --
.../lib/active_support/inflections.rb | 52 -
.../lib/active_support/inflector.rb | 179 -
.../activesupport/lib/active_support/json.rb | 48 -
.../lib/active_support/json/encoders.rb | 25 -
.../lib/active_support/json/encoders/core.rb | 68 -
.../lib/active_support/multibyte.rb | 7 -
.../lib/active_support/multibyte/chars.rb | 129 -
.../multibyte/generators/generate_tables.rb | 149 -
.../multibyte/handlers/passthru_handler.rb | 9 -
.../multibyte/handlers/utf8_handler.rb | 453 ---
.../multibyte/handlers/utf8_handler_proc.rb | 44 -
.../lib/active_support/option_merger.rb | 25 -
.../lib/active_support/ordered_options.rb | 44 -
.../lib/active_support/reloadable.rb | 64 -
.../lib/active_support/values/time_zone.rb | 180 -
.../active_support/values/unicode_tables.dat | Bin 656156 -> 0 bytes
.../lib/active_support/vendor/builder.rb | 13 -
.../vendor/builder/blankslate.rb | 63 -
.../active_support/vendor/builder/xchar.rb | 112 -
.../active_support/vendor/builder/xmlbase.rb | 145 -
.../vendor/builder/xmlevents.rb | 63 -
.../vendor/builder/xmlmarkup.rb | 327 --
.../lib/active_support/vendor/flexmock.rb | 1068 ------
.../lib/active_support/vendor/xml_simple.rb | 1021 ------
.../lib/active_support/version.rb | 9 -
.../lib/active_support/whiny_nil.rb | 38 -
.../rails/activesupport/test/abstract_unit.rb | 7 -
.../test/autoloading_fixtures/a/b.rb | 2 -
.../test/autoloading_fixtures/a/c/d.rb | 2 -
.../test/autoloading_fixtures/a/c/e/f.rb | 2 -
.../test/autoloading_fixtures/application.rb | 1 -
.../test/autoloading_fixtures/class_folder.rb | 3 -
.../class_folder/class_folder_subclass.rb | 3 -
.../class_folder/inline_class.rb | 2 -
.../class_folder/nested_class.rb | 7 -
.../test/autoloading_fixtures/conflict.rb | 1 -
.../autoloading_fixtures/counting_loader.rb | 5 -
.../cross_site_dependency.rb | 2 -
.../test/autoloading_fixtures/e.rb | 2 -
.../module_folder/inline_class.rb | 2 -
.../module_folder/nested_class.rb | 4 -
.../module_folder/nested_sibling.rb | 2 -
.../module_with_custom_const_missing/a/b.rb | 1 -
.../multiple_constant_file.rb | 2 -
.../autoloading_fixtures/raises_name_error.rb | 3 -
.../raises_no_method_error.rb | 3 -
.../activesupport/test/caching_tools_test.rb | 79 -
.../test/class_inheritable_attributes_test.rb | 170 -
.../activesupport/test/clean_logger_test.rb | 80 -
.../test/core_ext/array_ext_test.rb | 182 -
.../activesupport/test/core_ext/blank_test.rb | 11 -
.../test/core_ext/cgi_ext_test.rb | 14 -
.../activesupport/test/core_ext/class_test.rb | 36 -
.../test/core_ext/date_ext_test.rb | 20 -
.../test/core_ext/enumerable_test.rb | 61 -
.../test/core_ext/exception_test.rb | 64 -
.../test/core_ext/hash_ext_test.rb | 472 ---
.../test/core_ext/integer_ext_test.rb | 37 -
.../test/core_ext/kernel_test.rb | 43 -
.../test/core_ext/load_error_tests.rb | 16 -
.../core_ext/module/attr_internal_test.rb | 52 -
.../module/attribute_aliasing_test.rb | 31 -
.../test/core_ext/module_test.rb | 221 --
.../test/core_ext/name_error_test.rb | 24 -
.../test/core_ext/numeric_ext_test.rb | 57 -
.../core_ext/object_and_class_ext_test.rb | 151 -
.../test/core_ext/pathname_test.rb | 9 -
.../activesupport/test/core_ext/proc_test.rb | 11 -
.../test/core_ext/range_ext_test.rb | 13 -
.../test/core_ext/string_ext_test.rb | 134 -
.../test/core_ext/symbol_test.rb | 9 -
.../test/core_ext/time_ext_test.rb | 335 --
.../test/dependencies/check_warnings.rb | 2 -
.../test/dependencies/conflict.rb | 1 -
.../test/dependencies/cross_site_depender.rb | 3 -
.../test/dependencies/mutual_one.rb | 4 -
.../test/dependencies/mutual_two.rb | 4 -
.../test/dependencies/raises_exception.rb | 3 -
.../dependencies/requires_nonexistent0.rb | 1 -
.../dependencies/requires_nonexistent1.rb | 1 -
.../test/dependencies/service_one.rb | 5 -
.../test/dependencies/service_two.rb | 2 -
.../activesupport/test/dependencies_test.rb | 741 ----
.../activesupport/test/deprecation_test.rb | 151 -
.../activesupport/test/inflector_test.rb | 329 --
.../vendor/rails/activesupport/test/json.rb | 87 -
.../test/multibyte_chars_test.rb | 164 -
.../test/multibyte_conformance.rb | 141 -
.../test/multibyte_handler_test.rb | 274 --
.../activesupport/test/option_merger_test.rb | 50 -
.../test/ordered_options_test.rb | 80 -
.../activesupport/test/reloadable_test.rb | 123 -
.../activesupport/test/time_zone_test.rb | 91 -
.../activesupport/test/whiny_nil_test.rb | 38 -
tracks/vendor/rails/railties/CHANGELOG | 1345 --------
tracks/vendor/rails/railties/MIT-LICENSE | 20 -
tracks/vendor/rails/railties/README | 182 -
tracks/vendor/rails/railties/Rakefile | 331 --
tracks/vendor/rails/railties/bin/about | 3 -
tracks/vendor/rails/railties/bin/breakpointer | 3 -
tracks/vendor/rails/railties/bin/console | 3 -
tracks/vendor/rails/railties/bin/destroy | 3 -
tracks/vendor/rails/railties/bin/generate | 3 -
.../railties/bin/performance/benchmarker | 3 -
.../rails/railties/bin/performance/profiler | 3 -
tracks/vendor/rails/railties/bin/plugin | 3 -
.../rails/railties/bin/process/inspector | 3 -
.../vendor/rails/railties/bin/process/reaper | 3 -
.../vendor/rails/railties/bin/process/spawner | 3 -
tracks/vendor/rails/railties/bin/rails | 19 -
tracks/vendor/rails/railties/bin/runner | 3 -
tracks/vendor/rails/railties/bin/server | 3 -
.../railties/builtin/rails_info/rails/info.rb | 123 -
.../rails_info/rails/info_controller.rb | 9 -
.../builtin/rails_info/rails/info_helper.rb | 2 -
.../rails_info/rails_info_controller.rb | 2 -
.../vendor/rails/railties/configs/apache.conf | 40 -
.../railties/configs/databases/frontbase.yml | 28 -
.../railties/configs/databases/mysql.yml | 48 -
.../railties/configs/databases/oracle.yml | 39 -
.../railties/configs/databases/postgresql.yml | 44 -
.../railties/configs/databases/sqlite2.yml | 16 -
.../railties/configs/databases/sqlite3.yml | 19 -
.../vendor/rails/railties/configs/empty.log | 0
.../rails/railties/configs/lighttpd.conf | 54 -
.../vendor/rails/railties/configs/routes.rb | 23 -
.../rails/railties/dispatches/dispatch.fcgi | 24 -
.../rails/railties/dispatches/dispatch.rb | 10 -
.../rails/railties/dispatches/gateway.cgi | 97 -
.../vendor/rails/railties/doc/README_FOR_APP | 2 -
.../rails/railties/environments/boot.rb | 45 -
.../railties/environments/development.rb | 21 -
.../railties/environments/environment.rb | 60 -
.../rails/railties/environments/production.rb | 18 -
.../rails/railties/environments/test.rb | 19 -
tracks/vendor/rails/railties/fresh_rakefile | 10 -
.../rails/railties/helpers/application.rb | 7 -
.../railties/helpers/application_helper.rb | 3 -
.../rails/railties/helpers/test_helper.rb | 28 -
tracks/vendor/rails/railties/html/404.html | 30 -
tracks/vendor/rails/railties/html/500.html | 30 -
tracks/vendor/rails/railties/html/favicon.ico | 0
.../rails/railties/html/images/rails.png | Bin 1787 -> 0 bytes
tracks/vendor/rails/railties/html/index.html | 277 --
.../railties/html/javascripts/application.js | 2 -
.../railties/html/javascripts/controls.js | 833 -----
.../railties/html/javascripts/dragdrop.js | 942 -----
.../railties/html/javascripts/effects.js | 1088 ------
.../railties/html/javascripts/prototype.js | 2426 -------------
tracks/vendor/rails/railties/html/robots.txt | 1 -
.../rails/railties/lib/binding_of_caller.rb | 85 -
.../vendor/rails/railties/lib/breakpoint.rb | 553 ---
.../rails/railties/lib/breakpoint_client.rb | 196 --
.../rails/railties/lib/code_statistics.rb | 107 -
tracks/vendor/rails/railties/lib/commands.rb | 17 -
.../rails/railties/lib/commands/about.rb | 2 -
.../railties/lib/commands/breakpointer.rb | 1 -
.../rails/railties/lib/commands/console.rb | 25 -
.../rails/railties/lib/commands/destroy.rb | 6 -
.../rails/railties/lib/commands/generate.rb | 6 -
.../rails/railties/lib/commands/ncgi/listener | 86 -
.../rails/railties/lib/commands/ncgi/tracker | 69 -
.../lib/commands/performance/benchmarker.rb | 24 -
.../lib/commands/performance/profiler.rb | 50 -
.../rails/railties/lib/commands/plugin.rb | 917 -----
.../lib/commands/process/inspector.rb | 68 -
.../railties/lib/commands/process/reaper.rb | 149 -
.../railties/lib/commands/process/spawner.rb | 209 --
.../railties/lib/commands/process/spinner.rb | 57 -
.../rails/railties/lib/commands/runner.rb | 48 -
.../rails/railties/lib/commands/server.rb | 39 -
.../railties/lib/commands/servers/base.rb | 19 -
.../railties/lib/commands/servers/lighttpd.rb | 94 -
.../railties/lib/commands/servers/mongrel.rb | 65 -
.../railties/lib/commands/servers/webrick.rb | 59 -
.../rails/railties/lib/commands/update.rb | 4 -
.../vendor/rails/railties/lib/console_app.rb | 27 -
.../rails/railties/lib/console_sandbox.rb | 6 -
.../railties/lib/console_with_helpers.rb | 23 -
.../vendor/rails/railties/lib/dispatcher.rb | 173 -
.../vendor/rails/railties/lib/fcgi_handler.rb | 225 --
.../vendor/rails/railties/lib/initializer.rb | 701 ----
.../rails/railties/lib/rails/version.rb | 9 -
.../rails/railties/lib/rails_generator.rb | 43 -
.../railties/lib/rails_generator/base.rb | 261 --
.../railties/lib/rails_generator/commands.rb | 581 ----
.../rails_generator/generated_attribute.rb | 42 -
.../generators/applications/app/USAGE | 16 -
.../applications/app/app_generator.rb | 160 -
.../generators/components/controller/USAGE | 30 -
.../controller/controller_generator.rb | 37 -
.../controller/templates/controller.rb | 10 -
.../controller/templates/functional_test.rb | 18 -
.../components/controller/templates/helper.rb | 2 -
.../controller/templates/view.rhtml | 2 -
.../components/integration_test/USAGE | 14 -
.../integration_test_generator.rb | 16 -
.../templates/integration_test.rb | 10 -
.../generators/components/mailer/USAGE | 18 -
.../components/mailer/mailer_generator.rb | 34 -
.../components/mailer/templates/fixture.rhtml | 3 -
.../components/mailer/templates/mailer.rb | 13 -
.../components/mailer/templates/unit_test.rb | 37 -
.../components/mailer/templates/view.rhtml | 3 -
.../generators/components/migration/USAGE | 14 -
.../migration/migration_generator.rb | 7 -
.../migration/templates/migration.rb | 7 -
.../generators/components/model/USAGE | 26 -
.../components/model/model_generator.rb | 38 -
.../components/model/templates/fixtures.yml | 11 -
.../components/model/templates/migration.rb | 13 -
.../components/model/templates/model.rb | 2 -
.../components/model/templates/unit_test.rb | 10 -
.../generators/components/observer/USAGE | 15 -
.../components/observer/observer_generator.rb | 16 -
.../components/observer/templates/observer.rb | 2 -
.../observer/templates/unit_test.rb | 10 -
.../generators/components/plugin/USAGE | 35 -
.../components/plugin/plugin_generator.rb | 38 -
.../components/plugin/templates/README | 4 -
.../components/plugin/templates/Rakefile | 22 -
.../components/plugin/templates/USAGE | 8 -
.../components/plugin/templates/generator.rb | 8 -
.../components/plugin/templates/init.rb | 1 -
.../components/plugin/templates/install.rb | 1 -
.../components/plugin/templates/plugin.rb | 1 -
.../components/plugin/templates/tasks.rake | 4 -
.../components/plugin/templates/uninstall.rb | 1 -
.../components/plugin/templates/unit_test.rb | 8 -
.../components/resource/resource_generator.rb | 76 -
.../components/resource/templates/USAGE | 18 -
.../resource/templates/controller.rb | 2 -
.../resource/templates/fixtures.yml | 11 -
.../resource/templates/functional_test.rb | 20 -
.../components/resource/templates/helper.rb | 2 -
.../resource/templates/migration.rb | 13 -
.../components/resource/templates/model.rb | 2 -
.../resource/templates/unit_test.rb | 10 -
.../generators/components/scaffold/USAGE | 32 -
.../components/scaffold/scaffold_generator.rb | 193 --
.../scaffold/templates/controller.rb | 58 -
.../components/scaffold/templates/form.rhtml | 3 -
.../scaffold/templates/form_scaffolding.rhtml | 1 -
.../scaffold/templates/functional_test.rb | 102 -
.../components/scaffold/templates/helper.rb | 2 -
.../scaffold/templates/layout.rhtml | 17 -
.../components/scaffold/templates/style.css | 74 -
.../scaffold/templates/view_edit.rhtml | 9 -
.../scaffold/templates/view_list.rhtml | 27 -
.../scaffold/templates/view_new.rhtml | 8 -
.../scaffold/templates/view_show.rhtml | 8 -
.../components/scaffold_resource/USAGE | 29 -
.../scaffold_resource_generator.rb | 92 -
.../scaffold_resource/templates/controller.rb | 79 -
.../scaffold_resource/templates/fixtures.yml | 11 -
.../templates/functional_test.rb | 57 -
.../scaffold_resource/templates/helper.rb | 2 -
.../scaffold_resource/templates/layout.rhtml | 17 -
.../scaffold_resource/templates/migration.rb | 13 -
.../scaffold_resource/templates/model.rb | 2 -
.../scaffold_resource/templates/style.css | 74 -
.../scaffold_resource/templates/unit_test.rb | 10 -
.../templates/view_edit.rhtml | 19 -
.../templates/view_index.rhtml | 24 -
.../templates/view_new.rhtml | 18 -
.../templates/view_show.rhtml | 10 -
.../components/session_migration/USAGE | 15 -
.../session_migration_generator.rb | 18 -
.../session_migration/templates/migration.rb | 16 -
.../generators/components/web_service/USAGE | 28 -
.../web_service/templates/api_definition.rb | 5 -
.../web_service/templates/controller.rb | 8 -
.../web_service/templates/functional_test.rb | 19 -
.../web_service/web_service_generator.rb | 29 -
.../railties/lib/rails_generator/lookup.rb | 209 --
.../railties/lib/rails_generator/manifest.rb | 53 -
.../railties/lib/rails_generator/options.rb | 143 -
.../railties/lib/rails_generator/scripts.rb | 83 -
.../lib/rails_generator/scripts/destroy.rb | 7 -
.../lib/rails_generator/scripts/generate.rb | 7 -
.../lib/rails_generator/scripts/update.rb | 12 -
.../lib/rails_generator/simple_logger.rb | 46 -
.../railties/lib/rails_generator/spec.rb | 44 -
.../rails/railties/lib/railties_path.rb | 1 -
.../rails/railties/lib/ruby_version_check.rb | 17 -
.../vendor/rails/railties/lib/rubyprof_ext.rb | 35 -
.../rails/railties/lib/tasks/databases.rake | 187 -
.../railties/lib/tasks/documentation.rake | 82 -
.../rails/railties/lib/tasks/framework.rake | 112 -
.../vendor/rails/railties/lib/tasks/log.rake | 9 -
.../vendor/rails/railties/lib/tasks/misc.rake | 4 -
.../lib/tasks/pre_namespace_aliases.rake | 53 -
.../vendor/rails/railties/lib/tasks/rails.rb | 8 -
.../rails/railties/lib/tasks/statistics.rake | 18 -
.../rails/railties/lib/tasks/testing.rake | 117 -
.../vendor/rails/railties/lib/tasks/tmp.rake | 37 -
tracks/vendor/rails/railties/lib/test_help.rb | 19 -
.../rails/railties/lib/webrick_server.rb | 166 -
.../rails/railties/test/abstract_unit.rb | 20 -
.../rails/railties/test/dispatcher_test.rb | 141 -
.../railties/test/fcgi_dispatcher_test.rb | 294 --
.../fixtures/environment_with_constant.rb | 1 -
.../missing_class/missing_class_generator.rb | 0
.../generators/working/working_generator.rb | 2 -
.../fixtures/plugins/default/stubby/init.rb | 7 -
.../default/stubby/lib/stubby_mixin.rb | 2 -
.../rails/railties/test/initializer_test.rb | 33 -
.../rails/railties/test/mocks/dispatcher.rb | 13 -
.../vendor/rails/railties/test/mocks/fcgi.rb | 15 -
.../rails/railties/test/mocks/routes.rb | 6 -
.../railties/test/mocks/stubbed_breakpoint.rb | 2 -
.../railties/test/mocks/stubbed_kernel.rb | 5 -
.../vendor/rails/railties/test/plugin_test.rb | 111 -
.../railties/test/rails_generator_test.rb | 127 -
.../test/rails_info_controller_test.rb | 48 -
.../rails/railties/test/rails_info_test.rb | 98 -
1085 files changed, 134076 deletions(-)
delete mode 100644 tracks/vendor/rails/TAG_rel_1-2-0_RC2
delete mode 100644 tracks/vendor/rails/actionmailer/CHANGELOG
delete mode 100644 tracks/vendor/rails/actionmailer/MIT-LICENSE
delete mode 100755 tracks/vendor/rails/actionmailer/README
delete mode 100755 tracks/vendor/rails/actionmailer/Rakefile
delete mode 100644 tracks/vendor/rails/actionmailer/install.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/base.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/part.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/part_container.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/quoting.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/utils.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/text/format.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/info.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/loader.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mbox.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/tmail.rb
delete mode 100755 tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb
delete mode 100644 tracks/vendor/rails/actionmailer/lib/action_mailer/version.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email10
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email11
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email12
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email13
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email2
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email3
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email4
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email5
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email6
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email7
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email8
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email9
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml
delete mode 100644 tracks/vendor/rails/actionmailer/test/mail_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/mail_render_test.rb
delete mode 100755 tracks/vendor/rails/actionmailer/test/mail_service_test.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/quoting_test.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/tmail_test.rb
delete mode 100644 tracks/vendor/rails/actionmailer/test/url_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/CHANGELOG
delete mode 100644 tracks/vendor/rails/actionpack/MIT-LICENSE
delete mode 100755 tracks/vendor/rails/actionpack/README
delete mode 100644 tracks/vendor/rails/actionpack/RUNNING_UNIT_TESTS
delete mode 100755 tracks/vendor/rails/actionpack/Rakefile
delete mode 100644 tracks/vendor/rails/actionpack/examples/.htaccess
delete mode 100644 tracks/vendor/rails/actionpack/examples/address_book/index.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/examples/address_book/layout.rhtml
delete mode 100755 tracks/vendor/rails/actionpack/examples/address_book_controller.cgi
delete mode 100755 tracks/vendor/rails/actionpack/examples/address_book_controller.fcgi
delete mode 100644 tracks/vendor/rails/actionpack/examples/address_book_controller.rb
delete mode 100644 tracks/vendor/rails/actionpack/examples/address_book_controller.rbx
delete mode 100644 tracks/vendor/rails/actionpack/examples/benchmark.rb
delete mode 100755 tracks/vendor/rails/actionpack/examples/benchmark_with_ar.fcgi
delete mode 100755 tracks/vendor/rails/actionpack/examples/blog_controller.cgi
delete mode 100644 tracks/vendor/rails/actionpack/examples/debate/index.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/examples/debate/new_topic.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/examples/debate/topic.rhtml
delete mode 100755 tracks/vendor/rails/actionpack/examples/debate_controller.cgi
delete mode 100644 tracks/vendor/rails/actionpack/install.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/deprecated_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller/base.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/caching.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/cgi_process.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/components.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/cookies.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/deprecated_dependencies.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/deprecated_redirects.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/deprecated_request_methods.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/filters.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/flash.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/helpers.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/integration.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/layout.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/macros/auto_complete.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/mime_responds.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/mime_type.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/pagination.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller/request.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/rescue.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/resources.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_controller/response.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/routing.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/scaffolding.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/session_management.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/status_codes.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/streaming.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/list.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/new.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/show.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/test_process.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/vendor/xml_node.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_controller/verification.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_pack.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_pack/version.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/base.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/compiled_templates.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb
delete mode 100755 tracks/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/partials.rb
delete mode 100644 tracks/vendor/rails/actionpack/lib/action_view/template_error.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/active_record_unit.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/activerecord/pagination_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/addresses_render_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/assert_select_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/base_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/benchmark_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/caching_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/capture_test.rb
delete mode 100755 tracks/vendor/rails/actionpack/test/controller/cgi_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/components_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/content_type_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/cookie_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/custom_handler_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/fake_controllers.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/filter_params_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/filters_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/flash_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/integration_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/layout_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/mime_responds_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/mime_type_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/new_render_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/raw_post_test.rb
delete mode 100755 tracks/vendor/rails/actionpack/test/controller/redirect_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/render_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/request_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/resources_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/routing_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/selector_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/send_file_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/session_management_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/test_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/url_rewriter_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/verification_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/controller/webservice_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/addresses/list.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/companies.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/company.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/developer.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/developers.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/developers_projects.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layouts/builder.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layouts/standard.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/layouts/yield.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/binary_file
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/large_text_file
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/mixed_files
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/single_parameter
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/multipart/text_file
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/project.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/projects.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/public/images/rails.png
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/replies.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/reply.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_customer.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_hash_object.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_hello.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_partial_only.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/_person.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/block_content_for.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/capturing.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/content_for.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/erb_content_for.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/greeting.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello_world.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello_world.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello_world_container.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/list.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.rxml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.rhtml
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/topic.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/fixtures/topics.yml
delete mode 100644 tracks/vendor/rails/actionpack/test/template/active_record_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/benchmark_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/compiled_templates_test.rb
delete mode 100755 tracks/vendor/rails/actionpack/test/template/date_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/deprecated_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/deprecated_instance_variables_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/form_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/form_options_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/form_tag_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/java_script_macros_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/javascript_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/number_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/prototype_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/tag_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/text_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/template/url_helper_test.rb
delete mode 100644 tracks/vendor/rails/actionpack/test/testing_sandbox.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/CHANGELOG
delete mode 100644 tracks/vendor/rails/actionwebservice/MIT-LICENSE
delete mode 100644 tracks/vendor/rails/actionwebservice/README
delete mode 100644 tracks/vendor/rails/actionwebservice/Rakefile
delete mode 100644 tracks/vendor/rails/actionwebservice/TODO
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/README
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/README
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/install.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/base.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/casting.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/client.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/container.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/struct.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/lib/action_web_service/version.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/setup.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/abstract_client.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/abstract_dispatcher.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/api_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/apis/auto_load_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/base_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/casting_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/client_soap_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/container_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql
delete mode 100644 tracks/vendor/rails/actionwebservice/test/fixtures/users.yml
delete mode 100755 tracks/vendor/rails/actionwebservice/test/gencov
delete mode 100644 tracks/vendor/rails/actionwebservice/test/invocation_test.rb
delete mode 100755 tracks/vendor/rails/actionwebservice/test/run
delete mode 100644 tracks/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/struct_test.rb
delete mode 100644 tracks/vendor/rails/actionwebservice/test/test_invoke_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/CHANGELOG
delete mode 100644 tracks/vendor/rails/activerecord/MIT-LICENSE
delete mode 100755 tracks/vendor/rails/activerecord/README
delete mode 100644 tracks/vendor/rails/activerecord/RUNNING_UNIT_TESTS
delete mode 100755 tracks/vendor/rails/activerecord/Rakefile
delete mode 100644 tracks/vendor/rails/activerecord/benchmarks/benchmark.rb
delete mode 100644 tracks/vendor/rails/activerecord/benchmarks/mysql_benchmark.rb
delete mode 100644 tracks/vendor/rails/activerecord/examples/associations.png
delete mode 100644 tracks/vendor/rails/activerecord/examples/associations.rb
delete mode 100644 tracks/vendor/rails/activerecord/examples/shared_setup.rb
delete mode 100644 tracks/vendor/rails/activerecord/examples/validation.rb
delete mode 100644 tracks/vendor/rails/activerecord/install.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/acts/list.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/acts/nested_set.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/acts/tree.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/aggregations.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/associations.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/attribute_methods.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/base.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/calculations.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/callbacks.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/deprecated_associations.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/deprecated_finders.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/fixtures.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/migration.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/observer.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/query_cache.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/reflection.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/schema.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/schema_dumper.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/timestamp.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/transactions.rb
delete mode 100755 tracks/vendor/rails/activerecord/lib/active_record/validations.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/vendor/db2.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/vendor/simple.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/version.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/wrappers/yaml_wrapper.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/wrappings.rb
delete mode 100644 tracks/vendor/rails/activerecord/lib/active_record/xml_serialization.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/aaa_create_tables_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/active_schema_test_mysql.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/adapter_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/adapter_test_sqlserver.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/aggregations_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/all.sh
delete mode 100644 tracks/vendor/rails/activerecord/test/ar_schema_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/association_inheritance_reload.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/associations/callbacks_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/associations/eager_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/associations/extension_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/associations/join_model_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/associations_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/attribute_methods_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/base_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/binary_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/calculations_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/callbacks_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/column_alias_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connection_test_firebird.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_db2/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_firebird/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_mysql/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_openbase/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_oracle/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sqlserver/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sqlserver_odbc/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/connections/native_sybase/connection.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/copy_table_sqlite.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/datatype_test_postgresql.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/default_test_firebird.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/defaults_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/deprecated_associations_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/deprecated_finder_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/empty_date_time_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/finder_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/accounts.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/author.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/author_favorites.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/authors.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/auto_id.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/binary.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categories.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categories_ordered.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categories_posts.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categorization.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/categorizations.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/category.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/column_name.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/comment.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/comments.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/companies.yml
delete mode 100755 tracks/vendor/rails/activerecord/test/fixtures/company.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/company_in_module.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/computer.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/computers.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/course.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/courses.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/customer.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/customers.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.drop.sql
delete mode 100755 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/default.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developer.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developers.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developers_projects.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/edge.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/edges.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/entrant.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/entrants.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/flowers.jpg
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/funny_jokes.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/joke.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/keyboard.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/legacy_thing.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/legacy_things.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations/3_innocent_jointable.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_decimal/1_give_me_big_numbers.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_foo.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_innocent_jointable.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/mixin.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/mixins.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/movie.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/movies.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/order.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/people.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/person.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/post.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/posts.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/project.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/projects.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/reader.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/readers.yml
delete mode 100755 tracks/vendor/rails/activerecord/test/fixtures/reply.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/subject.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/subscriber.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/subscribers/first
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/subscribers/second
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/tag.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/tagging.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/taggings.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/tags.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/task.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/tasks.yml
delete mode 100755 tracks/vendor/rails/activerecord/test/fixtures/topic.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/topics.yml
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/vertex.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/fixtures/vertices.yml
delete mode 100755 tracks/vendor/rails/activerecord/test/fixtures_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/inheritance_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/lifecycle_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/locking_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/method_scoping_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/migration_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/migration_test_firebird.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/mixin_nested_set_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/mixin_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/modules_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/multiple_db_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/pk_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/readonly_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/reflection_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/schema_dumper_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/schema_test_postgresql.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/synonym_test_oracle.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/threaded_connections_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/transactions_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/unconnected_test.rb
delete mode 100755 tracks/vendor/rails/activerecord/test/validations_test.rb
delete mode 100644 tracks/vendor/rails/activerecord/test/xml_serialization_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/CHANGELOG
delete mode 100644 tracks/vendor/rails/activesupport/MIT-LICENSE
delete mode 100644 tracks/vendor/rails/activesupport/README
delete mode 100644 tracks/vendor/rails/activesupport/Rakefile
delete mode 100644 tracks/vendor/rails/activesupport/install.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/binding_of_caller.rb
delete mode 100755 tracks/vendor/rails/activesupport/lib/active_support/breakpoint.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/caching_tools.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/clean_logger.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/array.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/formatting.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/class.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/date.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/object.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/range.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/time.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/dependencies.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/deprecation.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/inflections.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/inflector.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/json.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/json/encoders.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/json/encoders/core.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/option_merger.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/ordered_options.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/reloadable.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/values/time_zone.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder/blankslate.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder/xchar.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlbase.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlevents.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlmarkup.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/flexmock.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/version.rb
delete mode 100644 tracks/vendor/rails/activesupport/lib/active_support/whiny_nil.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/application.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/e.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/caching_tools_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/class_inheritable_attributes_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/clean_logger_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/array_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/blank_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/class_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/date_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/enumerable_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/exception_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/kernel_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/load_error_tests.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/module_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/name_error_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/pathname_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/proc_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/range_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/string_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/symbol_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/core_ext/time_ext_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/check_warnings.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/conflict.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/mutual_one.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/mutual_two.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/raises_exception.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/service_one.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies/service_two.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/dependencies_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/deprecation_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/inflector_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/json.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/multibyte_chars_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/multibyte_conformance.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/multibyte_handler_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/option_merger_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/ordered_options_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/reloadable_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/time_zone_test.rb
delete mode 100644 tracks/vendor/rails/activesupport/test/whiny_nil_test.rb
delete mode 100644 tracks/vendor/rails/railties/CHANGELOG
delete mode 100644 tracks/vendor/rails/railties/MIT-LICENSE
delete mode 100644 tracks/vendor/rails/railties/README
delete mode 100644 tracks/vendor/rails/railties/Rakefile
delete mode 100644 tracks/vendor/rails/railties/bin/about
delete mode 100644 tracks/vendor/rails/railties/bin/breakpointer
delete mode 100644 tracks/vendor/rails/railties/bin/console
delete mode 100644 tracks/vendor/rails/railties/bin/destroy
delete mode 100644 tracks/vendor/rails/railties/bin/generate
delete mode 100644 tracks/vendor/rails/railties/bin/performance/benchmarker
delete mode 100644 tracks/vendor/rails/railties/bin/performance/profiler
delete mode 100644 tracks/vendor/rails/railties/bin/plugin
delete mode 100644 tracks/vendor/rails/railties/bin/process/inspector
delete mode 100644 tracks/vendor/rails/railties/bin/process/reaper
delete mode 100644 tracks/vendor/rails/railties/bin/process/spawner
delete mode 100755 tracks/vendor/rails/railties/bin/rails
delete mode 100644 tracks/vendor/rails/railties/bin/runner
delete mode 100644 tracks/vendor/rails/railties/bin/server
delete mode 100644 tracks/vendor/rails/railties/builtin/rails_info/rails/info.rb
delete mode 100644 tracks/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb
delete mode 100644 tracks/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb
delete mode 100644 tracks/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb
delete mode 100755 tracks/vendor/rails/railties/configs/apache.conf
delete mode 100644 tracks/vendor/rails/railties/configs/databases/frontbase.yml
delete mode 100644 tracks/vendor/rails/railties/configs/databases/mysql.yml
delete mode 100644 tracks/vendor/rails/railties/configs/databases/oracle.yml
delete mode 100644 tracks/vendor/rails/railties/configs/databases/postgresql.yml
delete mode 100644 tracks/vendor/rails/railties/configs/databases/sqlite2.yml
delete mode 100644 tracks/vendor/rails/railties/configs/databases/sqlite3.yml
delete mode 100644 tracks/vendor/rails/railties/configs/empty.log
delete mode 100644 tracks/vendor/rails/railties/configs/lighttpd.conf
delete mode 100644 tracks/vendor/rails/railties/configs/routes.rb
delete mode 100755 tracks/vendor/rails/railties/dispatches/dispatch.fcgi
delete mode 100755 tracks/vendor/rails/railties/dispatches/dispatch.rb
delete mode 100644 tracks/vendor/rails/railties/dispatches/gateway.cgi
delete mode 100644 tracks/vendor/rails/railties/doc/README_FOR_APP
delete mode 100644 tracks/vendor/rails/railties/environments/boot.rb
delete mode 100644 tracks/vendor/rails/railties/environments/development.rb
delete mode 100644 tracks/vendor/rails/railties/environments/environment.rb
delete mode 100644 tracks/vendor/rails/railties/environments/production.rb
delete mode 100644 tracks/vendor/rails/railties/environments/test.rb
delete mode 100755 tracks/vendor/rails/railties/fresh_rakefile
delete mode 100644 tracks/vendor/rails/railties/helpers/application.rb
delete mode 100644 tracks/vendor/rails/railties/helpers/application_helper.rb
delete mode 100644 tracks/vendor/rails/railties/helpers/test_helper.rb
delete mode 100644 tracks/vendor/rails/railties/html/404.html
delete mode 100644 tracks/vendor/rails/railties/html/500.html
delete mode 100644 tracks/vendor/rails/railties/html/favicon.ico
delete mode 100644 tracks/vendor/rails/railties/html/images/rails.png
delete mode 100644 tracks/vendor/rails/railties/html/index.html
delete mode 100644 tracks/vendor/rails/railties/html/javascripts/application.js
delete mode 100644 tracks/vendor/rails/railties/html/javascripts/controls.js
delete mode 100644 tracks/vendor/rails/railties/html/javascripts/dragdrop.js
delete mode 100644 tracks/vendor/rails/railties/html/javascripts/effects.js
delete mode 100644 tracks/vendor/rails/railties/html/javascripts/prototype.js
delete mode 100644 tracks/vendor/rails/railties/html/robots.txt
delete mode 100644 tracks/vendor/rails/railties/lib/binding_of_caller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/breakpoint.rb
delete mode 100644 tracks/vendor/rails/railties/lib/breakpoint_client.rb
delete mode 100644 tracks/vendor/rails/railties/lib/code_statistics.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/about.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/breakpointer.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/console.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/destroy.rb
delete mode 100755 tracks/vendor/rails/railties/lib/commands/generate.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/ncgi/listener
delete mode 100644 tracks/vendor/rails/railties/lib/commands/ncgi/tracker
delete mode 100644 tracks/vendor/rails/railties/lib/commands/performance/benchmarker.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/performance/profiler.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/plugin.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/process/inspector.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/process/reaper.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/process/spawner.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/process/spinner.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/runner.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/server.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/servers/base.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/servers/lighttpd.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/servers/mongrel.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/servers/webrick.rb
delete mode 100644 tracks/vendor/rails/railties/lib/commands/update.rb
delete mode 100644 tracks/vendor/rails/railties/lib/console_app.rb
delete mode 100644 tracks/vendor/rails/railties/lib/console_sandbox.rb
delete mode 100644 tracks/vendor/rails/railties/lib/console_with_helpers.rb
delete mode 100644 tracks/vendor/rails/railties/lib/dispatcher.rb
delete mode 100644 tracks/vendor/rails/railties/lib/fcgi_handler.rb
delete mode 100644 tracks/vendor/rails/railties/lib/initializer.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails/version.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/base.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/commands.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generated_attribute.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README
delete mode 100755 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/uninstall.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/fixtures.yml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/migration.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/model.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form_scaffolding.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/web_service/USAGE
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/api_definition.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/controller.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/functional_test.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/generators/components/web_service/web_service_generator.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/lookup.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/manifest.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/options.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/scripts.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/scripts/generate.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/scripts/update.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/simple_logger.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rails_generator/spec.rb
delete mode 100644 tracks/vendor/rails/railties/lib/railties_path.rb
delete mode 100644 tracks/vendor/rails/railties/lib/ruby_version_check.rb
delete mode 100644 tracks/vendor/rails/railties/lib/rubyprof_ext.rb
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/databases.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/documentation.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/framework.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/log.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/misc.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/pre_namespace_aliases.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/rails.rb
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/statistics.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/testing.rake
delete mode 100644 tracks/vendor/rails/railties/lib/tasks/tmp.rake
delete mode 100644 tracks/vendor/rails/railties/lib/test_help.rb
delete mode 100644 tracks/vendor/rails/railties/lib/webrick_server.rb
delete mode 100644 tracks/vendor/rails/railties/test/abstract_unit.rb
delete mode 100644 tracks/vendor/rails/railties/test/dispatcher_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/fcgi_dispatcher_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/fixtures/environment_with_constant.rb
delete mode 100644 tracks/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb
delete mode 100644 tracks/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb
delete mode 100644 tracks/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb
delete mode 100644 tracks/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb
delete mode 100644 tracks/vendor/rails/railties/test/initializer_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/mocks/dispatcher.rb
delete mode 100644 tracks/vendor/rails/railties/test/mocks/fcgi.rb
delete mode 100644 tracks/vendor/rails/railties/test/mocks/routes.rb
delete mode 100644 tracks/vendor/rails/railties/test/mocks/stubbed_breakpoint.rb
delete mode 100644 tracks/vendor/rails/railties/test/mocks/stubbed_kernel.rb
delete mode 100644 tracks/vendor/rails/railties/test/plugin_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/rails_generator_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/rails_info_controller_test.rb
delete mode 100644 tracks/vendor/rails/railties/test/rails_info_test.rb
diff --git a/tracks/vendor/rails/TAG_rel_1-2-0_RC2 b/tracks/vendor/rails/TAG_rel_1-2-0_RC2
deleted file mode 100644
index e69de29b..00000000
diff --git a/tracks/vendor/rails/actionmailer/CHANGELOG b/tracks/vendor/rails/actionmailer/CHANGELOG
deleted file mode 100644
index ea221639..00000000
--- a/tracks/vendor/rails/actionmailer/CHANGELOG
+++ /dev/null
@@ -1,282 +0,0 @@
-*1.3.0 RC1* (r5619, November 22nd, 2006)
-
-* Make mime version default to 1.0. closes #2323 [ror@andreas-s.net]
-
-* Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154. [jon@siliconcircus.com]
-
-* Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes #4166 and #4452. [Jamis Buck]
-
-* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com]
-
-* Tighten rescue clauses. #5985 [james@grayproductions.net]
-
-* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH]
-
-* Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
-
-* Resolve action naming collision. #5520 [ssinghi@kreeti.com]
-
-* ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, Marcel Molina Jr.]
-
-* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
-
-* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
-
-
-*1.2.5* (August 10th, 2006)
-
-* Depend on Action Pack 1.12.5
-
-
-*1.2.4* (August 8th, 2006)
-
-* Backport of documentation enhancements. [Kevin Clark, Marcel Molina Jr]
-
-* Correct spurious documentation example code which results in a SyntaxError. [Marcel Molina Jr.]
-
-* Mailer template root applies to a class and its subclasses rather than acting globally. #5555 [somekool@gmail.com]
-
-
-*1.2.3* (June 29th, 2006)
-
-* Depend on Action Pack 1.12.3
-
-
-*1.2.2* (June 27th, 2006)
-
-* Depend on Action Pack 1.12.2
-
-
-*1.2.1* (April 6th, 2006)
-
-* Be part of Rails 1.1.1
-
-
-*1.2.0* (March 27th, 2006)
-
-* Nil charset caused subject line to be improperly quoted in implicitly multipart messages #2662 [ehalvorsen+rails@runbox.com]
-
-* Parse content-type apart before using it so that sub-parts of the header can be set correctly #2918 [Jamis Buck]
-
-* Make custom headers work in subparts #4034 [elan@bluemandrill.com]
-
-* Template paths with dot chars in them no longer mess up implicit template selection for multipart messages #3332 [Chad Fowler]
-
-* Make sure anything with content-disposition of "attachment" is passed to the attachment presenter when parsing an email body [Jamis Buck]
-
-* Make sure TMail#attachments includes anything with content-disposition of "attachment", regardless of content-type [Jamis Buck]
-
-
-*1.1.5* (December 13th, 2005)
-
-* Become part of Rails 1.0
-
-
-*1.1.4* (December 7th, 2005)
-
-* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
-
-* Stricter matching for implicitly multipart filenames excludes files ending in unsupported extensions (such as foo.rhtml.bak) and without a two-part content type (such as foo.text.rhtml or foo.text.really.plain.rhtml). #2398 [Dave Burt , Jeremy Kemper]
-
-
-*1.1.3* (November 7th, 2005)
-
-* Allow Mailers to have custom initialize methods that set default instance variables for all mail actions #2563 [mrj@bigpond.net.au]
-
-
-*1.1.2* (October 26th, 2005)
-
-* Upgraded to Action Pack 1.10.2
-
-
-*1.1.1* (October 19th, 2005)
-
-* Upgraded to Action Pack 1.10.1
-
-
-*1.1.0* (October 16th, 2005)
-
-* Update and extend documentation (rdoc)
-
-* Minero Aoki made TMail available to Rails/ActionMailer under the MIT license (instead of LGPL) [RubyConf '05]
-
-* Austin Ziegler made Text::Simple available to Rails/ActionMailer under a MIT-like licens [See rails ML, subject "Text::Format Licence Exception" on Oct 15, 2005]
-
-* Fix vendor require paths to prevent files being required twice
-
-* Don't add charset to content-type header for a part that contains subparts (for AOL compatibility) #2013 [John Long]
-
-* Preserve underscores when unquoting message bodies #1930
-
-* Encode multibyte characters correctly #1894
-
-* Multipart messages specify a MIME-Version header automatically #2003 [John Long]
-
-* Add a unified render method to ActionMailer (delegates to ActionView::Base#render)
-
-* Move mailer initialization to a separate (overridable) method, so that subclasses may alter the various defaults #1727
-
-* Look at content-location header (if available) to determine filename of attachments #1670
-
-* ActionMailer::Base.deliver(email) had been accidentally removed, but was documented in the Rails book #1849
-
-* Fix problem with sendmail delivery where headers should be delimited by \n characters instead of \r\n, which confuses some mail readers #1742 [Kent Sibilev]
-
-
-*1.0.1* (11 July, 2005)
-
-* Bind to Action Pack 1.9.1
-
-
-*1.0.0* (6 July, 2005)
-
-* Avoid adding nil header values #1392
-
-* Better multipart support with implicit multipart/alternative and sorting of subparts [John Long]
-
-* Allow for nested parts in multipart mails #1570 [Flurin Egger]
-
-* Normalize line endings in outgoing mail bodies to "\n" #1536 [John Long]
-
-* Allow template to be explicitly specified #1448 [tuxie@dekadance.se]
-
-* Allow specific "multipart/xxx" content-type to be set on multipart messages #1412 [Flurin Egger]
-
-* Unquoted @ characters in headers are now accepted in spite of RFC 822 #1206
-
-* Helper support (borrowed from ActionPack)
-
-* Silently ignore Errno::EINVAL errors when converting text.
-
-* Don't cause an error when parsing an encoded attachment name #1340 [lon@speedymac.com]
-
-* Nested multipart message parts are correctly processed in TMail::Mail#body
-
-* BCC headers are removed when sending via SMTP #1402
-
-* Added 'content_type' accessor, to allow content type to be set on a per-message basis. content_type defaults to "text/plain".
-
-* Silently ignore Iconv::IllegalSequence errors when converting text #1341 [lon@speedymac.com]
-
-* Support attachments and multipart messages.
-
-* Added new accessors for the various mail properties.
-
-* Fix to only perform the charset conversion if a 'from' and a 'to' charset are given (make no assumptions about what the charset was) #1276 [Jamis Buck]
-
-* Fix attachments and content-type problems #1276 [Jamis Buck]
-
-* Fixed the TMail#body method to look at the content-transfer-encoding header and unquote the body according to the rules it specifies #1265 [Jamis Buck]
-
-* Added unquoting even if the iconv lib can't be loaded--in that case, only the charset conversion is skipped #1265 [Jamis Buck]
-
-* Added automatic decoding of base64 bodies #1214 [Jamis Buck]
-
-* Added that delivery errors are caught in a way so the mail is still returned whether the delivery was successful or not
-
-* Fixed that email address like "Jamis Buck, M.D." would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 [Jamis Buck]
-
-
-*0.9.1* (20th April, 2005)
-
-* Depend on Action Pack 1.8.1
-
-
-*0.9.0* (19th April, 2005)
-
-* Added that deliver_* will now return the email that was sent
-
-* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
-
-* Fixed quoting for all address headers, not just to #955 [Jamis Buck]
-
-* Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
-
-
-*0.8.1* (27th March, 2005)
-
-* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
-
-* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com]
-
-* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com]
-
-* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
-
-
-*0.8.0* (22th March, 2005)
-
-* Added framework support for processing incoming emails with an Action Mailer class. See example in README.
-
-
-*0.7.1* (7th March, 2005)
-
-* Bind to newest Action Pack (1.5.1)
-
-
-*0.7.0* (24th February, 2005)
-
-* Added support for charsets for both subject and body. The default charset is now UTF-8 #673 [Jamis Buck]. Examples:
-
- def iso_charset(recipient)
- @recipients = recipient
- @subject = "testing iso charsets"
- @from = "system@loudthinking.com"
- @body = "Nothing to see here."
- @charset = "iso-8859-1"
- end
-
- def unencoded_subject(recipient)
- @recipients = recipient
- @subject = "testing unencoded subject"
- @from = "system@loudthinking.com"
- @body = "Nothing to see here."
- @encode_subject = false
- @charset = "iso-8859-1"
- end
-
-
-*0.6.1* (January 18th, 2005)
-
-* Fixed sending of emails to use Tmail#from not the deprecated Tmail#from_address
-
-
-*0.6* (January 17th, 2005)
-
-* Fixed that bcc and cc should be settable through @bcc and @cc -- not just @headers["Bcc"] and @headers["Cc"] #453 [Eric Hodel]
-
-* Fixed Action Mailer to be "warnings safe" so you can run with ruby -w and not get framework warnings #453 [Eric Hodel]
-
-
-*0.5*
-
-* Added access to custom headers, like cc, bcc, and reply-to #268 [Andreas Schwarz]. Example:
-
- def post_notification(recipients, post)
- @recipients = recipients
- @from = post.author.email_address_with_name
- @headers["bcc"] = SYSTEM_ADMINISTRATOR_EMAIL
- @headers["reply-to"] = "notifications@example.com"
- @subject = "[#{post.account.name} #{post.title}]"
- @body["post"] = post
- end
-
-*0.4* (5)
-
-* Consolidated the server configuration options into Base#server_settings= and expanded that with controls for authentication and more [Marten]
- NOTE: This is an API change that could potentially break your application if you used the old application form. Please do change!
-
-* Added Base#deliveries as an accessor for an array of emails sent out through that ActionMailer class when using the :test delivery option. [Jeremy Kemper]
-
-* Added Base#perform_deliveries= which can be set to false to turn off the actual delivery of the email through smtp or sendmail.
- This is especially useful for functional testing that shouldn't send off real emails, but still trigger delivery_* methods.
-
-* Added option to specify delivery method with Base#delivery_method=. Default is :smtp and :sendmail is currently the only other option.
- Sendmail is assumed to be present at "/usr/sbin/sendmail" if that option is used. [Kent Sibilev]
-
-* Dropped "include TMail" as it added to much baggage into the default namespace (like Version) [Chad Fowler]
-
-
-*0.3*
-
-* First release
diff --git a/tracks/vendor/rails/actionmailer/MIT-LICENSE b/tracks/vendor/rails/actionmailer/MIT-LICENSE
deleted file mode 100644
index 5856add6..00000000
--- a/tracks/vendor/rails/actionmailer/MIT-LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2004-2006 David Heinemeier Hansson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/tracks/vendor/rails/actionmailer/README b/tracks/vendor/rails/actionmailer/README
deleted file mode 100755
index 354c1ab8..00000000
--- a/tracks/vendor/rails/actionmailer/README
+++ /dev/null
@@ -1,145 +0,0 @@
-= Action Mailer -- Easy email delivery and testing
-
-Action Mailer is a framework for designing email-service layers. These layers
-are used to consolidate code for sending out forgotten passwords, welcome
-wishes on signup, invoices for billing, and any other use case that requires
-a written notification to either a person or another system.
-
-Additionally, an Action Mailer class can be used to process incoming email,
-such as allowing a weblog to accept new posts from an email (which could even
-have been sent from a phone).
-
-== Sending emails
-
-The framework works by setting up all the email details, except the body,
-in methods on the service layer. Subject, recipients, sender, and timestamp
-are all set up this way. An example of such a method:
-
- def signed_up(recipient)
- recipients recipient
- subject "[Signed up] Welcome #{recipient}"
- from "system@loudthinking.com"
-
- body(:recipient => recipient)
- end
-
-The body of the email is created by using an Action View template (regular
-ERb) that has the content of the body hash parameter available as instance variables.
-So the corresponding body template for the method above could look like this:
-
- Hello there,
-
- Mr. <%= @recipient %>
-
-And if the recipient was given as "david@loudthinking.com", the email
-generated would look like this:
-
- Date: Sun, 12 Dec 2004 00:00:00 +0100
- From: system@loudthinking.com
- To: david@loudthinking.com
- Subject: [Signed up] Welcome david@loudthinking.com
-
- Hello there,
-
- Mr. david@loudthinking.com
-
-You never actually call the instance methods like signed_up directly. Instead,
-you call class methods like deliver_* and create_* that are automatically
-created for each instance method. So if the signed_up method sat on
-ApplicationMailer, it would look like this:
-
- ApplicationMailer.create_signed_up("david@loudthinking.com") # => tmail object for testing
- ApplicationMailer.deliver_signed_up("david@loudthinking.com") # sends the email
- ApplicationMailer.new.signed_up("david@loudthinking.com") # won't work!
-
-== Receiving emails
-
-To receive emails, you need to implement a public instance method called receive that takes a
-tmail object as its single parameter. The Action Mailer framework has a corresponding class method,
-which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns
-into the tmail object and calls the receive instance method.
-
-Example:
-
- class Mailman < ActionMailer::Base
- def receive(email)
- page = Page.find_by_address(email.to.first)
- page.emails.create(
- :subject => email.subject, :body => email.body
- )
-
- if email.has_attachments?
- for attachment in email.attachments
- page.attachments.create({
- :file => attachment, :description => email.subject
- })
- end
- end
- end
- end
-
-This Mailman can be the target for Postfix. In Rails, you would use the runner like this:
-
- ./script/runner 'Mailman.receive(STDIN.read)'
-
-== Configuration
-
-The Base class has the full list of configuration options. Here's an example:
-
-ActionMailer::Base.server_settings = {
- :address=>'smtp.yourserver.com', # default: localhost
- :port=>'25', # default: 25
- :user_name=>'user',
- :password=>'pass',
- :authentication=>:plain # :plain, :login or :cram_md5
-}
-
-== Dependencies
-
-Action Mailer requires that the Action Pack is either available to be required immediately
-or is accessible as a GEM.
-
-
-== Bundled software
-
-* tmail 0.10.8 by Minero Aoki released under LGPL
- Read more on http://i.loveruby.net/en/prog/tmail.html
-
-* Text::Format 0.63 by Austin Ziegler released under OpenSource
- Read more on http://www.halostatue.ca/ruby/Text__Format.html
-
-
-== Download
-
-The latest version of Action Mailer can be found at
-
-* http://rubyforge.org/project/showfiles.php?group_id=361
-
-Documentation can be found at
-
-* http://actionmailer.rubyonrails.org
-
-
-== Installation
-
-You can install Action Mailer with the following command.
-
- % [sudo] ruby install.rb
-
-from its distribution directory.
-
-
-== License
-
-Action Mailer is released under the MIT license.
-
-
-== Support
-
-The Action Mailer homepage is http://www.rubyonrails.org. You can find
-the Action Mailer RubyForge page at http://rubyforge.org/projects/actionmailer.
-And as Jim from Rake says:
-
- Feel free to submit commits or feature requests. If you send a patch,
- remember to update the corresponding unit tests. If fact, I prefer
- new feature to be submitted in the form of new unit tests.
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/Rakefile b/tracks/vendor/rails/actionmailer/Rakefile
deleted file mode 100755
index 6095c6dc..00000000
--- a/tracks/vendor/rails/actionmailer/Rakefile
+++ /dev/null
@@ -1,95 +0,0 @@
-require 'rubygems'
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/packagetask'
-require 'rake/gempackagetask'
-require 'rake/contrib/rubyforgepublisher'
-require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')
-
-PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
-PKG_NAME = 'actionmailer'
-PKG_VERSION = ActionMailer::VERSION::STRING + PKG_BUILD
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
-
-RELEASE_NAME = "REL #{PKG_VERSION}"
-
-RUBY_FORGE_PROJECT = "actionmailer"
-RUBY_FORGE_USER = "webster132"
-
-desc "Default Task"
-task :default => [ :test ]
-
-# Run the unit tests
-Rake::TestTask.new { |t|
- t.libs << "test"
- t.pattern = 'test/*_test.rb'
- t.verbose = true
- t.warning = false
-}
-
-
-# Genereate the RDoc documentation
-Rake::RDocTask.new { |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "Action Mailer -- Easy email delivery and testing"
- rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
- rdoc.rdoc_files.include('README', 'CHANGELOG')
- rdoc.rdoc_files.include('lib/action_mailer.rb')
- rdoc.rdoc_files.include('lib/action_mailer/*.rb')
-}
-
-
-# Create compressed packages
-spec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = PKG_NAME
- s.summary = "Service layer for easy email delivery and testing."
- s.description = %q{Makes it trivial to test and deliver emails sent from a single service layer.}
- s.version = PKG_VERSION
-
- s.author = "David Heinemeier Hansson"
- s.email = "david@loudthinking.com"
- s.rubyforge_project = "actionmailer"
- s.homepage = "http://www.rubyonrails.org"
-
- s.add_dependency('actionpack', '= 1.12.5' + PKG_BUILD)
-
- s.has_rdoc = true
- s.requirements << 'none'
- s.require_path = 'lib'
- s.autorequire = 'action_mailer'
-
- s.files = [ "Rakefile", "install.rb", "README", "CHANGELOG", "MIT-LICENSE" ]
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
-end
-
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar = true
- p.need_zip = true
-end
-
-
-desc "Publish the API documentation"
-task :pgem => [:package] do
- Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
-end
-
-desc "Publish the API documentation"
-task :pdoc => [:rdoc] do
- Rake::SshDirPublisher.new("davidhh@wrath.rubyonrails.org", "public_html/am", "doc").upload
-end
-
-desc "Publish the release files to RubyForge."
-task :release => [ :package ] do
- `rubyforge login`
-
- for ext in %w( gem tgz zip )
- release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}"
- puts release_command
- system(release_command)
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/install.rb b/tracks/vendor/rails/actionmailer/install.rb
deleted file mode 100644
index c559edff..00000000
--- a/tracks/vendor/rails/actionmailer/install.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-require 'rbconfig'
-require 'find'
-require 'ftools'
-
-include Config
-
-# this was adapted from rdoc's install.rb by way of Log4r
-
-$sitedir = CONFIG["sitelibdir"]
-unless $sitedir
- version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
- $libdir = File.join(CONFIG["libdir"], "ruby", version)
- $sitedir = $:.find {|x| x =~ /site_ruby/ }
- if !$sitedir
- $sitedir = File.join($libdir, "site_ruby")
- elsif $sitedir !~ Regexp.quote(version)
- $sitedir = File.join($sitedir, version)
- end
-end
-
-# the acual gruntwork
-Dir.chdir("lib")
-
-Find.find("action_mailer", "action_mailer.rb") { |f|
- if f[-3..-1] == ".rb"
- File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
- else
- File::makedirs(File.join($sitedir, *f.split(/\//)))
- end
-}
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer.rb
deleted file mode 100755
index d1777220..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-#--
-# Copyright (c) 2004-2006 David Heinemeier Hansson
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#++
-
-unless defined?(ActionController)
- begin
- $:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib"
- require 'action_controller'
- rescue LoadError
- require 'rubygems'
- require_gem 'actionpack', '>= 1.12.5'
- end
-end
-
-$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/")
-
-require 'action_mailer/base'
-require 'action_mailer/helpers'
-require 'action_mailer/mail_helper'
-require 'action_mailer/quoting'
-require 'tmail'
-require 'net/smtp'
-
-ActionMailer::Base.class_eval do
- include ActionMailer::Quoting
- include ActionMailer::Helpers
-
- helper MailHelper
-end
-
-silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) }
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
deleted file mode 100644
index cfd72301..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module ActionMailer
- module AdvAttrAccessor #:nodoc:
- def self.included(base)
- base.extend(ClassMethods)
- end
-
- module ClassMethods #:nodoc:
- def adv_attr_accessor(*names)
- names.each do |name|
- ivar = "@#{name}"
-
- define_method("#{name}=") do |value|
- instance_variable_set(ivar, value)
- end
-
- define_method(name) do |*parameters|
- raise ArgumentError, "expected 0 or 1 parameters" unless parameters.length <= 1
- if parameters.empty?
- if instance_variables.include?(ivar)
- instance_variable_get(ivar)
- end
- else
- instance_variable_set(ivar, parameters.first)
- end
- end
- end
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/base.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/base.rb
deleted file mode 100644
index 444bea95..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/base.rb
+++ /dev/null
@@ -1,562 +0,0 @@
-require 'action_mailer/adv_attr_accessor'
-require 'action_mailer/part'
-require 'action_mailer/part_container'
-require 'action_mailer/utils'
-require 'tmail/net'
-
-module ActionMailer #:nodoc:
- # ActionMailer allows you to send email from your application using a mailer model and views.
- #
- #
- # = Mailer Models
- #
- # To use ActionMailer, you need to create a mailer model.
- #
- # $ script/generate mailer Notifier
- #
- # The generated model inherits from ActionMailer::Base. Emails are defined by creating methods within the model which are then
- # used to set variables to be used in the mail template, to change options on the mail, or
- # to add attachments.
- #
- # Examples:
- #
- # class Notifier < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # from "system@example.com"
- # subject "New account information"
- # body :account => recipient
- # end
- # end
- #
- # Mailer methods have the following configuration methods available.
- #
- # * recipients - Takes one or more email addresses. These addresses are where your email will be delivered to. Sets the To: header.
- # * subject - The subject of your email. Sets the Subject: header.
- # * from - Who the email you are sending is from. Sets the From: header.
- # * cc - Takes one or more email addresses. These addresses will receive a carbon copy of your email. Sets the Cc: header.
- # * bcc - Takes one or more email address. These addresses will receive a blind carbon copy of your email. Sets the Bcc header.
- # * sent_on - The date on which the message was sent. If not set, the header wil be set by the delivery agent.
- # * content_type - Specify the content type of the message. Defaults to text/plain .
- # * headers - Specify additional headers to be set for the message, e.g. headers 'X-Mail-Count' => 107370 .
- #
- # The body method has special behavior. It takes a hash which generates an instance variable
- # named after each key in the hash containing the value that that key points to.
- #
- # So, for example, body "account" => recipient would result
- # in an instance variable @account with the value of recipient being accessible in the
- # view.
- #
- #
- # = Mailer views
- #
- # Like ActionController, each mailer class has a corresponding view directory
- # in which each method of the class looks for a template with its name.
- # To define a template to be used with a mailing, create an .rhtml file with the same name as the method
- # in your mailer model. For example, in the mailer defined above, the template at
- # app/views/notifier/signup_notification.rhtml would be used to generate the email.
- #
- # Variables defined in the model are accessible as instance variables in the view.
- #
- # Emails by default are sent in plain text, so a sample view for our model example might look like this:
- #
- # Hi <%= @account.name %>,
- # Thanks for joining our service! Please check back often.
- #
- # You can even use Action Pack helpers in these views. For example:
- #
- # You got a new note!
- # <%= truncate(note.body, 25) %>
- #
- #
- # = Generating URLs for mailer views
- #
- # If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view.
- # Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's
- # why you need to jump this little hoop and supply all the details needed for the URL. Example:
- #
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # from "system@example.com"
- # subject "New account information"
- # body :account => recipient,
- # :home_page => url_for(:host => "example.com", :controller => "welcome", :action => "greeting")
- # end
- #
- # You can now access @home_page in the template and get http://example.com/welcome/greeting.
- #
- # = Sending mail
- #
- # Once a mailer action and template are defined, you can deliver your message or create it and save it
- # for delivery later:
- #
- # Notifier.deliver_signup_notification(david) # sends the email
- # mail = Notifier.create_signup_notification(david) # => a tmail object
- # Notifier.deliver(mail)
- #
- # You never instantiate your mailer class. Rather, your delivery instance
- # methods are automatically wrapped in class methods that start with the word
- # deliver_ followed by the name of the mailer method that you would
- # like to deliver. The signup_notification method defined above is
- # delivered by invoking Notifier.deliver_signup_notification .
- #
- #
- # = HTML email
- #
- # To send mail as HTML, make sure your view (the .rhtml file) generates HTML and
- # set the content type to html.
- #
- # class MyMailer < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # body "account" => recipient
- # from "system@example.com"
- # content_type "text/html" # Here's where the magic happens
- # end
- # end
- #
- #
- # = Multipart email
- #
- # You can explicitly specify multipart messages:
- #
- # class ApplicationMailer < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # from "system@example.com"
- #
- # part :content_type => "text/html",
- # :body => render_message("signup-as-html", :account => recipient)
- #
- # part "text/plain" do |p|
- # p.body = render_message("signup-as-plain", :account => recipient)
- # p.transfer_encoding = "base64"
- # end
- # end
- # end
- #
- # Multipart messages can also be used implicitly because ActionMailer will automatically
- # detect and use multipart templates, where each template is named after the name of the action, followed
- # by the content type. Each such detected template will be added as separate part to the message.
- #
- # For example, if the following templates existed:
- # * signup_notification.text.plain.rhtml
- # * signup_notification.text.html.rhtml
- # * signup_notification.text.xml.rxml
- # * signup_notification.text.x-yaml.rhtml
- #
- # Each would be rendered and added as a separate part to the message,
- # with the corresponding content type. The same body hash is passed to
- # each template.
- #
- #
- # = Attachments
- #
- # Attachments can be added by using the +attachment+ method.
- #
- # Example:
- #
- # class ApplicationMailer < ActionMailer::Base
- # # attachments
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # from "system@example.com"
- #
- # attachment :content_type => "image/jpeg",
- # :body => File.read("an-image.jpg")
- #
- # attachment "application/pdf" do |a|
- # a.body = generate_your_pdf_here()
- # end
- # end
- # end
- #
- #
- # = Configuration options
- #
- # These options are specified on the class level, like ActionMailer::Base.template_root = "/my/templates"
- #
- # * template_root - template root determines the base from which template references will be made.
- #
- # * logger - the logger is used for generating information on the mailing run if available.
- # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
- #
- # * server_settings - Allows detailed configuration of the server:
- # * :address Allows you to use a remote mail server. Just change it from its default "localhost" setting.
- # * :port On the off chance that your mail server doesn't run on port 25, you can change it.
- # * :domain If you need to specify a HELO domain, you can do it here.
- # * :user_name If your mail server requires authentication, set the username in this setting.
- # * :password If your mail server requires authentication, set the password in this setting.
- # * :authentication If your mail server requires authentication, you need to specify the authentication type here.
- # This is a symbol and one of :plain, :login, :cram_md5
- #
- # * raise_delivery_errors - whether or not errors should be raised if the email fails to be delivered.
- #
- # * delivery_method - Defines a delivery method. Possible values are :smtp (default), :sendmail, and :test.
- # Sendmail is assumed to be present at "/usr/sbin/sendmail".
- #
- # * perform_deliveries - Determines whether deliver_* methods are actually carried out. By default they are,
- # but this can be turned off to help functional testing.
- #
- # * deliveries - Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful
- # for unit and functional testing.
- #
- # * default_charset - The default charset used for the body and to encode the subject. Defaults to UTF-8. You can also
- # pick a different charset from inside a method with @charset .
- # * default_content_type - The default content type used for the main part of the message. Defaults to "text/plain". You
- # can also pick a different content type from inside a method with @content_type .
- # * default_mime_version - The default mime version used for the message. Defaults to "1.0". You
- # can also pick a different value from inside a method with @mime_version .
- # * default_implicit_parts_order - When a message is built implicitly (i.e. multiple parts are assembled from templates
- # which specify the content type in their filenames) this variable controls how the parts are ordered. Defaults to
- # ["text/html", "text/enriched", "text/plain"]. Items that appear first in the array have higher priority in the mail client
- # and appear last in the mime encoded message. You can also pick a different order from inside a method with
- # @implicit_parts_order .
- class Base
- include AdvAttrAccessor, PartContainer
- include ActionController::UrlWriter
-
- # Action Mailer subclasses should be reloaded by the dispatcher in Rails
- # when Dependencies.mechanism = :load.
- include Reloadable::Deprecated
-
- private_class_method :new #:nodoc:
-
- class_inheritable_accessor :template_root
- cattr_accessor :logger
-
- @@server_settings = {
- :address => "localhost",
- :port => 25,
- :domain => 'localhost.localdomain',
- :user_name => nil,
- :password => nil,
- :authentication => nil
- }
- cattr_accessor :server_settings
-
- @@raise_delivery_errors = true
- cattr_accessor :raise_delivery_errors
-
- @@delivery_method = :smtp
- cattr_accessor :delivery_method
-
- @@perform_deliveries = true
- cattr_accessor :perform_deliveries
-
- @@deliveries = []
- cattr_accessor :deliveries
-
- @@default_charset = "utf-8"
- cattr_accessor :default_charset
-
- @@default_content_type = "text/plain"
- cattr_accessor :default_content_type
-
- @@default_mime_version = "1.0"
- cattr_accessor :default_mime_version
-
- @@default_implicit_parts_order = [ "text/html", "text/enriched", "text/plain" ]
- cattr_accessor :default_implicit_parts_order
-
- # Specify the BCC addresses for the message
- adv_attr_accessor :bcc
-
- # Define the body of the message. This is either a Hash (in which case it
- # specifies the variables to pass to the template when it is rendered),
- # or a string, in which case it specifies the actual text of the message.
- adv_attr_accessor :body
-
- # Specify the CC addresses for the message.
- adv_attr_accessor :cc
-
- # Specify the charset to use for the message. This defaults to the
- # +default_charset+ specified for ActionMailer::Base.
- adv_attr_accessor :charset
-
- # Specify the content type for the message. This defaults to text/plain
- # in most cases, but can be automatically set in some situations.
- adv_attr_accessor :content_type
-
- # Specify the from address for the message.
- adv_attr_accessor :from
-
- # Specify additional headers to be added to the message.
- adv_attr_accessor :headers
-
- # Specify the order in which parts should be sorted, based on content-type.
- # This defaults to the value for the +default_implicit_parts_order+.
- adv_attr_accessor :implicit_parts_order
-
- # Override the mailer name, which defaults to an inflected version of the
- # mailer's class name. If you want to use a template in a non-standard
- # location, you can use this to specify that location.
- adv_attr_accessor :mailer_name
-
- # Defaults to "1.0", but may be explicitly given if needed.
- adv_attr_accessor :mime_version
-
- # The recipient addresses for the message, either as a string (for a single
- # address) or an array (for multiple addresses).
- adv_attr_accessor :recipients
-
- # The date on which the message was sent. If not set (the default), the
- # header will be set by the delivery agent.
- adv_attr_accessor :sent_on
-
- # Specify the subject of the message.
- adv_attr_accessor :subject
-
- # Specify the template name to use for current message. This is the "base"
- # template name, without the extension or directory, and may be used to
- # have multiple mailer methods share the same template.
- adv_attr_accessor :template
-
- # The mail object instance referenced by this mailer.
- attr_reader :mail
-
- class << self
- def method_missing(method_symbol, *parameters)#:nodoc:
- case method_symbol.id2name
- when /^create_([_a-z]\w*)/ then new($1, *parameters).mail
- when /^deliver_([_a-z]\w*)/ then new($1, *parameters).deliver!
- when "new" then nil
- else super
- end
- end
-
- # Receives a raw email, parses it into an email object, decodes it,
- # instantiates a new mailer, and passes the email object to the mailer
- # object's #receive method. If you want your mailer to be able to
- # process incoming messages, you'll need to implement a #receive
- # method that accepts the email object as a parameter:
- #
- # class MyMailer < ActionMailer::Base
- # def receive(mail)
- # ...
- # end
- # end
- def receive(raw_email)
- logger.info "Received mail:\n #{raw_email}" unless logger.nil?
- mail = TMail::Mail.parse(raw_email)
- mail.base64_decode
- new.receive(mail)
- end
-
- # Deliver the given mail object directly. This can be used to deliver
- # a preconstructed mail object, like:
- #
- # email = MyMailer.create_some_mail(parameters)
- # email.set_some_obscure_header "frobnicate"
- # MyMailer.deliver(email)
- def deliver(mail)
- new.deliver!(mail)
- end
- end
-
- # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
- # will be initialized according to the named method. If not, the mailer will
- # remain uninitialized (useful when you only need to invoke the "receive"
- # method, for instance).
- def initialize(method_name=nil, *parameters) #:nodoc:
- create!(method_name, *parameters) if method_name
- end
-
- # Initialize the mailer via the given +method_name+. The body will be
- # rendered and a new TMail::Mail object created.
- def create!(method_name, *parameters) #:nodoc:
- initialize_defaults(method_name)
- send(method_name, *parameters)
-
- # If an explicit, textual body has not been set, we check assumptions.
- unless String === @body
- # First, we look to see if there are any likely templates that match,
- # which include the content-type in their file name (i.e.,
- # "the_template_file.text.html.rhtml", etc.). Only do this if parts
- # have not already been specified manually.
- if @parts.empty?
- templates = Dir.glob("#{template_path}/#{@template}.*")
- templates.each do |path|
- # TODO: don't hardcode rhtml|rxml
- basename = File.basename(path)
- next unless md = /^([^\.]+)\.([^\.]+\.[^\.]+)\.(rhtml|rxml)$/.match(basename)
- template_name = basename
- content_type = md.captures[1].gsub('.', '/')
- @parts << Part.new(:content_type => content_type,
- :disposition => "inline", :charset => charset,
- :body => render_message(template_name, @body))
- end
- unless @parts.empty?
- @content_type = "multipart/alternative"
- @parts = sort_parts(@parts, @implicit_parts_order)
- end
- end
-
- # Then, if there were such templates, we check to see if we ought to
- # also render a "normal" template (without the content type). If a
- # normal template exists (or if there were no implicit parts) we render
- # it.
- template_exists = @parts.empty?
- template_exists ||= Dir.glob("#{template_path}/#{@template}.*").any? { |i| File.basename(i).split(".").length == 2 }
- @body = render_message(@template, @body) if template_exists
-
- # Finally, if there are other message parts and a textual body exists,
- # we shift it onto the front of the parts and set the body to nil (so
- # that create_mail doesn't try to render it in addition to the parts).
- if !@parts.empty? && String === @body
- @parts.unshift Part.new(:charset => charset, :body => @body)
- @body = nil
- end
- end
-
- # If this is a multipart e-mail add the mime_version if it is not
- # already set.
- @mime_version ||= "1.0" if !@parts.empty?
-
- # build the mail object itself
- @mail = create_mail
- end
-
- # Delivers a TMail::Mail object. By default, it delivers the cached mail
- # object (from the #create! method). If no cached mail object exists, and
- # no alternate has been given as the parameter, this will fail.
- def deliver!(mail = @mail)
- raise "no mail object available for delivery!" unless mail
- logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
-
- begin
- send("perform_delivery_#{delivery_method}", mail) if perform_deliveries
- rescue Exception => e # Net::SMTP errors or sendmail pipe errors
- raise e if raise_delivery_errors
- end
-
- return mail
- end
-
- private
- # Set up the default values for the various instance variables of this
- # mailer. Subclasses may override this method to provide different
- # defaults.
- def initialize_defaults(method_name)
- @charset ||= @@default_charset.dup
- @content_type ||= @@default_content_type.dup
- @implicit_parts_order ||= @@default_implicit_parts_order.dup
- @template ||= method_name
- @mailer_name ||= Inflector.underscore(self.class.name)
- @parts ||= []
- @headers ||= {}
- @body ||= {}
- @mime_version = @@default_mime_version.dup if @@default_mime_version
- end
-
- def render_message(method_name, body)
- render :file => method_name, :body => body
- end
-
- def render(opts)
- body = opts.delete(:body)
- initialize_template_class(body).render(opts)
- end
-
- def template_path
- "#{template_root}/#{mailer_name}"
- end
-
- def initialize_template_class(assigns)
- ActionView::Base.new(template_path, assigns, self)
- end
-
- def sort_parts(parts, order = [])
- order = order.collect { |s| s.downcase }
-
- parts = parts.sort do |a, b|
- a_ct = a.content_type.downcase
- b_ct = b.content_type.downcase
-
- a_in = order.include? a_ct
- b_in = order.include? b_ct
-
- s = case
- when a_in && b_in
- order.index(a_ct) <=> order.index(b_ct)
- when a_in
- -1
- when b_in
- 1
- else
- a_ct <=> b_ct
- end
-
- # reverse the ordering because parts that come last are displayed
- # first in mail clients
- (s * -1)
- end
-
- parts
- end
-
- def create_mail
- m = TMail::Mail.new
-
- m.subject, = quote_any_if_necessary(charset, subject)
- m.to, m.from = quote_any_address_if_necessary(charset, recipients, from)
- m.bcc = quote_address_if_necessary(bcc, charset) unless bcc.nil?
- m.cc = quote_address_if_necessary(cc, charset) unless cc.nil?
-
- m.mime_version = mime_version unless mime_version.nil?
- m.date = sent_on.to_time rescue sent_on if sent_on
- headers.each { |k, v| m[k] = v }
-
- real_content_type, ctype_attrs = parse_content_type
-
- if @parts.empty?
- m.set_content_type(real_content_type, nil, ctype_attrs)
- m.body = Utils.normalize_new_lines(body)
- else
- if String === body
- part = TMail::Mail.new
- part.body = Utils.normalize_new_lines(body)
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition "inline"
- m.parts << part
- end
-
- @parts.each do |p|
- part = (TMail::Mail === p ? p : p.to_mail(self))
- m.parts << part
- end
-
- if real_content_type =~ /multipart/
- ctype_attrs.delete "charset"
- m.set_content_type(real_content_type, nil, ctype_attrs)
- end
- end
-
- @mail = m
- end
-
- def perform_delivery_smtp(mail)
- destinations = mail.destinations
- mail.ready_to_send
-
- Net::SMTP.start(server_settings[:address], server_settings[:port], server_settings[:domain],
- server_settings[:user_name], server_settings[:password], server_settings[:authentication]) do |smtp|
- smtp.sendmail(mail.encoded, mail.from, destinations)
- end
- end
-
- def perform_delivery_sendmail(mail)
- IO.popen("/usr/sbin/sendmail -i -t","w+") do |sm|
- sm.print(mail.encoded.gsub(/\r/, ''))
- sm.flush
- end
- end
-
- def perform_delivery_test(mail)
- deliveries << mail
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/helpers.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
deleted file mode 100644
index 8176ba8a..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-module ActionMailer
- module Helpers #:nodoc:
- def self.included(base) #:nodoc:
- # Initialize the base module to aggregate its helpers.
- base.class_inheritable_accessor :master_helper_module
- base.master_helper_module = Module.new
-
- # Extend base with class methods to declare helpers.
- base.extend(ClassMethods)
-
- base.class_eval do
- # Wrap inherited to create a new master helper module for subclasses.
- class << self
- alias_method_chain :inherited, :helper
- end
-
- # Wrap initialize_template_class to extend new template class
- # instances with the master helper module.
- alias_method_chain :initialize_template_class, :helper
- end
- end
-
- module ClassMethods
- # Makes all the (instance) methods in the helper module available to templates rendered through this controller.
- # See ActionView::Helpers (link:classes/ActionView/Helpers.html) for more about making your own helper modules
- # available to the templates.
- def add_template_helper(helper_module) #:nodoc:
- master_helper_module.module_eval "include #{helper_module}"
- end
-
- # Declare a helper:
- # helper :foo
- # requires 'foo_helper' and includes FooHelper in the template class.
- # helper FooHelper
- # includes FooHelper in the template class.
- # helper { def foo() "#{bar} is the very best" end }
- # evaluates the block in the template class, adding method #foo.
- # helper(:three, BlindHelper) { def mice() 'mice' end }
- # does all three.
- def helper(*args, &block)
- args.flatten.each do |arg|
- case arg
- when Module
- add_template_helper(arg)
- when String, Symbol
- file_name = arg.to_s.underscore + '_helper'
- class_name = file_name.camelize
-
- begin
- require_dependency(file_name)
- rescue LoadError => load_error
- requiree = / -- (.*?)(\.rb)?$/.match(load_error).to_a[1]
- msg = (requiree == file_name) ? "Missing helper file helpers/#{file_name}.rb" : "Can't load file: #{requiree}"
- raise LoadError.new(msg).copy_blame!(load_error)
- end
-
- add_template_helper(class_name.constantize)
- else
- raise ArgumentError, 'helper expects String, Symbol, or Module argument'
- end
- end
-
- # Evaluate block in template class if given.
- master_helper_module.module_eval(&block) if block_given?
- end
-
- # Declare a controller method as a helper. For example,
- # helper_method :link_to
- # def link_to(name, options) ... end
- # makes the link_to controller method available in the view.
- def helper_method(*methods)
- methods.flatten.each do |method|
- master_helper_module.module_eval <<-end_eval
- def #{method}(*args, &block)
- controller.send(%(#{method}), *args, &block)
- end
- end_eval
- end
- end
-
- # Declare a controller attribute as a helper. For example,
- # helper_attr :name
- # attr_accessor :name
- # makes the name and name= controller methods available in the view.
- # The is a convenience wrapper for helper_method.
- def helper_attr(*attrs)
- attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
- end
-
- private
- def inherited_with_helper(child)
- inherited_without_helper(child)
- begin
- child.master_helper_module = Module.new
- child.master_helper_module.send :include, master_helper_module
- child.helper child.name.underscore
- rescue MissingSourceFile => e
- raise unless e.is_missing?("helpers/#{child.name.underscore}_helper")
- end
- end
- end
-
- private
- # Extend the template class instance with our controller's helper module.
- def initialize_template_class_with_helper(assigns)
- returning(template = initialize_template_class_without_helper(assigns)) do
- template.extend self.class.master_helper_module
- end
- end
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb
deleted file mode 100644
index 11fd7d77..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'text/format'
-
-module MailHelper
- # Uses Text::Format to take the text and format it, indented two spaces for
- # each line, and wrapped at 72 columns.
- def block_format(text)
- formatted = text.split(/\n\r\n/).collect { |paragraph|
- Text::Format.new(
- :columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph
- ).format
- }.join("\n")
-
- # Make list points stand on their own line
- formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" }
- formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" }
-
- formatted
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/part.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/part.rb
deleted file mode 100644
index 31f5b441..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/part.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-require 'action_mailer/adv_attr_accessor'
-require 'action_mailer/part_container'
-require 'action_mailer/utils'
-
-module ActionMailer
- # Represents a subpart of an email message. It shares many similar
- # attributes of ActionMailer::Base. Although you can create parts manually
- # and add them to the #parts list of the mailer, it is easier
- # to use the helper methods in ActionMailer::PartContainer.
- class Part
- include ActionMailer::AdvAttrAccessor
- include ActionMailer::PartContainer
-
- # Represents the body of the part, as a string. This should not be a
- # Hash (like ActionMailer::Base), but if you want a template to be rendered
- # into the body of a subpart you can do it with the mailer's #render method
- # and assign the result here.
- adv_attr_accessor :body
-
- # Specify the charset for this subpart. By default, it will be the charset
- # of the containing part or mailer.
- adv_attr_accessor :charset
-
- # The content disposition of this part, typically either "inline" or
- # "attachment".
- adv_attr_accessor :content_disposition
-
- # The content type of the part.
- adv_attr_accessor :content_type
-
- # The filename to use for this subpart (usually for attachments).
- adv_attr_accessor :filename
-
- # Accessor for specifying additional headers to include with this part.
- adv_attr_accessor :headers
-
- # The transfer encoding to use for this subpart, like "base64" or
- # "quoted-printable".
- adv_attr_accessor :transfer_encoding
-
- # Create a new part from the given +params+ hash. The valid params keys
- # correspond to the accessors.
- def initialize(params)
- @content_type = params[:content_type]
- @content_disposition = params[:disposition] || "inline"
- @charset = params[:charset]
- @body = params[:body]
- @filename = params[:filename]
- @transfer_encoding = params[:transfer_encoding] || "quoted-printable"
- @headers = params[:headers] || {}
- @parts = []
- end
-
- # Convert the part to a mail object which can be included in the parts
- # list of another mail object.
- def to_mail(defaults)
- part = TMail::Mail.new
-
- real_content_type, ctype_attrs = parse_content_type(defaults)
-
- if @parts.empty?
- part.content_transfer_encoding = transfer_encoding || "quoted-printable"
- case (transfer_encoding || "").downcase
- when "base64" then
- part.body = TMail::Base64.folding_encode(body)
- when "quoted-printable"
- part.body = [Utils.normalize_new_lines(body)].pack("M*")
- else
- part.body = body
- end
-
- # Always set the content_type after setting the body and or parts!
- # Also don't set filename and name when there is none (like in
- # non-attachment parts)
- if content_disposition == "attachment"
- ctype_attrs.delete "charset"
- part.set_content_type(real_content_type, nil,
- squish("name" => filename).merge(ctype_attrs))
- part.set_content_disposition(content_disposition,
- squish("filename" => filename).merge(ctype_attrs))
- else
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition(content_disposition)
- end
- else
- if String === body
- part = TMail::Mail.new
- part.body = body
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition "inline"
- m.parts << part
- end
-
- @parts.each do |p|
- prt = (TMail::Mail === p ? p : p.to_mail(defaults))
- part.parts << prt
- end
-
- part.set_content_type(real_content_type, nil, ctype_attrs) if real_content_type =~ /multipart/
- end
-
- headers.each { |k,v| part[k] = v }
-
- part
- end
-
- private
-
- def squish(values={})
- values.delete_if { |k,v| v.nil? }
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/part_container.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/part_container.rb
deleted file mode 100644
index 3e3d6b9d..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/part_container.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-module ActionMailer
- # Accessors and helpers that ActionMailer::Base and ActionMailer::Part have
- # in common. Using these helpers you can easily add subparts or attachments
- # to your message:
- #
- # def my_mail_message(...)
- # ...
- # part "text/plain" do |p|
- # p.body "hello, world"
- # p.transfer_encoding "base64"
- # end
- #
- # attachment "image/jpg" do |a|
- # a.body = File.read("hello.jpg")
- # a.filename = "hello.jpg"
- # end
- # end
- module PartContainer
- # The list of subparts of this container
- attr_reader :parts
-
- # Add a part to a multipart message, with the given content-type. The
- # part itself is yielded to the block so that other properties (charset,
- # body, headers, etc.) can be set on it.
- def part(params)
- params = {:content_type => params} if String === params
- part = Part.new(params)
- yield part if block_given?
- @parts << part
- end
-
- # Add an attachment to a multipart message. This is simply a part with the
- # content-disposition set to "attachment".
- def attachment(params, &block)
- params = { :content_type => params } if String === params
- params = { :disposition => "attachment",
- :transfer_encoding => "base64" }.merge(params)
- part(params, &block)
- end
-
- private
-
- def parse_content_type(defaults=nil)
- return [defaults && defaults.content_type, {}] if content_type.blank?
- ctype, *attrs = content_type.split(/;\s*/)
- attrs = attrs.inject({}) { |h,s| k,v = s.split(/=/, 2); h[k] = v; h }
- [ctype, {"charset" => charset || defaults && defaults.charset}.merge(attrs)]
- end
-
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/quoting.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/quoting.rb
deleted file mode 100644
index d6e04e4d..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/quoting.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-module ActionMailer
- module Quoting #:nodoc:
- # Convert the given text into quoted printable format, with an instruction
- # that the text be eventually interpreted in the given charset.
- def quoted_printable(text, charset)
- text = text.gsub( /[^a-z ]/i ) { quoted_printable_encode($&) }.
- gsub( / /, "_" )
- "=?#{charset}?Q?#{text}?="
- end
-
- # Convert the given character to quoted printable format, taking into
- # account multi-byte characters (if executing with $KCODE="u", for instance)
- def quoted_printable_encode(character)
- result = ""
- character.each_byte { |b| result << "=%02x" % b }
- result
- end
-
- # A quick-and-dirty regexp for determining whether a string contains any
- # characters that need escaping.
- if !defined?(CHARS_NEEDING_QUOTING)
- CHARS_NEEDING_QUOTING = /[\000-\011\013\014\016-\037\177-\377]/
- end
-
- # Quote the given text if it contains any "illegal" characters
- def quote_if_necessary(text, charset)
- (text =~ CHARS_NEEDING_QUOTING) ?
- quoted_printable(text, charset) :
- text
- end
-
- # Quote any of the given strings if they contain any "illegal" characters
- def quote_any_if_necessary(charset, *args)
- args.map { |v| quote_if_necessary(v, charset) }
- end
-
- # Quote the given address if it needs to be. The address may be a
- # regular email address, or it can be a phrase followed by an address in
- # brackets. The phrase is the only part that will be quoted, and only if
- # it needs to be. This allows extended characters to be used in the
- # "to", "from", "cc", and "bcc" headers.
- def quote_address_if_necessary(address, charset)
- if Array === address
- address.map { |a| quote_address_if_necessary(a, charset) }
- elsif address =~ /^(\S.*)\s+(<.*>)$/
- address = $2
- phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset)
- "\"#{phrase}\" #{address}"
- else
- address
- end
- end
-
- # Quote any of the given addresses, if they need to be.
- def quote_any_address_if_necessary(charset, *args)
- args.map { |v| quote_address_if_necessary(v, charset) }
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/utils.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/utils.rb
deleted file mode 100644
index 552f695a..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/utils.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-module ActionMailer
- module Utils #:nodoc:
- def normalize_new_lines(text)
- text.to_s.gsub(/\r\n?/, "\n")
- end
- module_function :normalize_new_lines
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/text/format.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/text/format.rb
deleted file mode 100755
index de054db8..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/text/format.rb
+++ /dev/null
@@ -1,1466 +0,0 @@
-#--
-# Text::Format for Ruby
-# Version 0.63
-#
-# Copyright (c) 2002 - 2003 Austin Ziegler
-#
-# $Id: format.rb,v 1.1.1.1 2004/10/14 11:59:57 webster132 Exp $
-#
-# ==========================================================================
-# Revision History ::
-# YYYY.MM.DD Change ID Developer
-# Description
-# --------------------------------------------------------------------------
-# 2002.10.18 Austin Ziegler
-# Fixed a minor problem with tabs not being counted. Changed
-# abbreviations from Hash to Array to better suit Ruby's
-# capabilities. Fixed problems with the way that Array arguments
-# are handled in calls to the major object types, excepting in
-# Text::Format#expand and Text::Format#unexpand (these will
-# probably need to be fixed).
-# 2002.10.30 Austin Ziegler
-# Fixed the ordering of the <=> for binary tests. Fixed
-# Text::Format#expand and Text::Format#unexpand to handle array
-# arguments better.
-# 2003.01.24 Austin Ziegler
-# Fixed a problem with Text::Format::RIGHT_FILL handling where a
-# single word is larger than #columns. Removed Comparable
-# capabilities (<=> doesn't make sense; == does). Added Symbol
-# equivalents for the Hash initialization. Hash initialization has
-# been modified so that values are set as follows (Symbols are
-# highest priority; strings are middle; defaults are lowest):
-# @columns = arg[:columns] || arg['columns'] || @columns
-# Added #hard_margins, #split_rules, #hyphenator, and #split_words.
-# 2003.02.07 Austin Ziegler
-# Fixed the installer for proper case-sensitive handling.
-# 2003.03.28 Austin Ziegler
-# Added the ability for a hyphenator to receive the formatter
-# object. Fixed a bug for strings matching /\A\s*\Z/ failing
-# entirely. Fixed a test case failing under 1.6.8.
-# 2003.04.04 Austin Ziegler
-# Handle the case of hyphenators returning nil for first/rest.
-# 2003.09.17 Austin Ziegler
-# Fixed a problem where #paragraphs(" ") was raising
-# NoMethodError.
-#
-# ==========================================================================
-#++
-
-module Text #:nodoc:
- # Text::Format for Ruby is copyright 2002 - 2005 by Austin Ziegler. It
- # is available under Ruby's licence, the Perl Artistic licence, or the
- # GNU GPL version 2 (or at your option, any later version). As a
- # special exception, for use with official Rails (provided by the
- # rubyonrails.org development team) and any project created with
- # official Rails, the following alternative MIT-style licence may be
- # used:
- #
- # == Text::Format Licence for Rails and Rails Applications
- # Permission is hereby granted, free of charge, to any person
- # obtaining a copy of this software and associated documentation files
- # (the "Software"), to deal in the Software without restriction,
- # including without limitation the rights to use, copy, modify, merge,
- # publish, distribute, sublicense, and/or sell copies of the Software,
- # and to permit persons to whom the Software is furnished to do so,
- # subject to the following conditions:
- #
- # * The names of its contributors may not be used to endorse or
- # promote products derived from this software without specific prior
- # written permission.
- #
- # The above copyright notice and this permission notice shall be
- # included in all copies or substantial portions of the Software.
- #
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- # SOFTWARE.
- class Format
- VERSION = '0.63'
-
- # Local abbreviations. More can be added with Text::Format.abbreviations
- ABBREV = [ 'Mr', 'Mrs', 'Ms', 'Jr', 'Sr' ]
-
- # Formatting values
- LEFT_ALIGN = 0
- RIGHT_ALIGN = 1
- RIGHT_FILL = 2
- JUSTIFY = 3
-
- # Word split modes (only applies when #hard_margins is true).
- SPLIT_FIXED = 1
- SPLIT_CONTINUATION = 2
- SPLIT_HYPHENATION = 4
- SPLIT_CONTINUATION_FIXED = SPLIT_CONTINUATION | SPLIT_FIXED
- SPLIT_HYPHENATION_FIXED = SPLIT_HYPHENATION | SPLIT_FIXED
- SPLIT_HYPHENATION_CONTINUATION = SPLIT_HYPHENATION | SPLIT_CONTINUATION
- SPLIT_ALL = SPLIT_HYPHENATION | SPLIT_CONTINUATION | SPLIT_FIXED
-
- # Words forcibly split by Text::Format will be stored as split words.
- # This class represents a word forcibly split.
- class SplitWord
- # The word that was split.
- attr_reader :word
- # The first part of the word that was split.
- attr_reader :first
- # The remainder of the word that was split.
- attr_reader :rest
-
- def initialize(word, first, rest) #:nodoc:
- @word = word
- @first = first
- @rest = rest
- end
- end
-
- private
- LEQ_RE = /[.?!]['"]?$/
-
- def brk_re(i) #:nodoc:
- %r/((?:\S+\s+){#{i}})(.+)/
- end
-
- def posint(p) #:nodoc:
- p.to_i.abs
- end
-
- public
- # Compares two Text::Format objects. All settings of the objects are
- # compared *except* #hyphenator. Generated results (e.g., #split_words)
- # are not compared, either.
- def ==(o)
- (@text == o.text) &&
- (@columns == o.columns) &&
- (@left_margin == o.left_margin) &&
- (@right_margin == o.right_margin) &&
- (@hard_margins == o.hard_margins) &&
- (@split_rules == o.split_rules) &&
- (@first_indent == o.first_indent) &&
- (@body_indent == o.body_indent) &&
- (@tag_text == o.tag_text) &&
- (@tabstop == o.tabstop) &&
- (@format_style == o.format_style) &&
- (@extra_space == o.extra_space) &&
- (@tag_paragraph == o.tag_paragraph) &&
- (@nobreak == o.nobreak) &&
- (@abbreviations == o.abbreviations) &&
- (@nobreak_regex == o.nobreak_regex)
- end
-
- # The text to be manipulated. Note that value is optional, but if the
- # formatting functions are called without values, this text is what will
- # be formatted.
- #
- # *Default*:: []
- # Used in :: All methods
- attr_accessor :text
-
- # The total width of the format area. The margins, indentation, and text
- # are formatted into this space.
- #
- # COLUMNS
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin indent text is formatted into here right margin
- #
- # *Default*:: 72
- # Used in :: #format , #paragraphs ,
- # #center
- attr_reader :columns
-
- # The total width of the format area. The margins, indentation, and text
- # are formatted into this space. The value provided is silently
- # converted to a positive integer.
- #
- # COLUMNS
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin indent text is formatted into here right margin
- #
- # *Default*:: 72
- # Used in :: #format , #paragraphs ,
- # #center
- def columns=(c)
- @columns = posint(c)
- end
-
- # The number of spaces used for the left margin.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # LEFT MARGIN indent text is formatted into here right margin
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs ,
- # #center
- attr_reader :left_margin
-
- # The number of spaces used for the left margin. The value provided is
- # silently converted to a positive integer value.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # LEFT MARGIN indent text is formatted into here right margin
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs ,
- # #center
- def left_margin=(left)
- @left_margin = posint(left)
- end
-
- # The number of spaces used for the right margin.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin indent text is formatted into here RIGHT MARGIN
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs ,
- # #center
- attr_reader :right_margin
-
- # The number of spaces used for the right margin. The value provided is
- # silently converted to a positive integer value.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin indent text is formatted into here RIGHT MARGIN
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs ,
- # #center
- def right_margin=(r)
- @right_margin = posint(r)
- end
-
- # The number of spaces to indent the first line of a paragraph.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin INDENT text is formatted into here right margin
- #
- # *Default*:: 4
- # Used in :: #format , #paragraphs
- attr_reader :first_indent
-
- # The number of spaces to indent the first line of a paragraph. The
- # value provided is silently converted to a positive integer value.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin INDENT text is formatted into here right margin
- #
- # *Default*:: 4
- # Used in :: #format , #paragraphs
- def first_indent=(f)
- @first_indent = posint(f)
- end
-
- # The number of spaces to indent all lines after the first line of a
- # paragraph.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin INDENT text is formatted into here right margin
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs
- attr_reader :body_indent
-
- # The number of spaces to indent all lines after the first line of
- # a paragraph. The value provided is silently converted to a
- # positive integer value.
- #
- # columns
- # <-------------------------------------------------------------->
- # <-----------><------><---------------------------><------------>
- # left margin INDENT text is formatted into here right margin
- #
- # *Default*:: 0
- # Used in :: #format , #paragraphs
- def body_indent=(b)
- @body_indent = posint(b)
- end
-
- # Normally, words larger than the format area will be placed on a line
- # by themselves. Setting this to +true+ will force words larger than the
- # format area to be split into one or more "words" each at most the size
- # of the format area. The first line and the original word will be
- # placed into #split_words . Note that this will cause the
- # output to look *similar* to a #format_style of JUSTIFY. (Lines will be
- # filled as much as possible.)
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- attr_accessor :hard_margins
-
- # An array of words split during formatting if #hard_margins is set to
- # +true+.
- # #split_words << Text::Format::SplitWord.new(word, first, rest)
- attr_reader :split_words
-
- # The object responsible for hyphenating. It must respond to
- # #hyphenate_to(word, size) or #hyphenate_to(word, size, formatter) and
- # return an array of the word split into two parts; if there is a
- # hyphenation mark to be applied, responsibility belongs to the
- # hyphenator object. The size is the MAXIMUM size permitted, including
- # any hyphenation marks. If the #hyphenate_to method has an arity of 3,
- # the formatter will be provided to the method. This allows the
- # hyphenator to make decisions about the hyphenation based on the
- # formatting rules.
- #
- # *Default*:: +nil+
- # Used in :: #format , #paragraphs
- attr_reader :hyphenator
-
- # The object responsible for hyphenating. It must respond to
- # #hyphenate_to(word, size) and return an array of the word hyphenated
- # into two parts. The size is the MAXIMUM size permitted, including any
- # hyphenation marks.
- #
- # *Default*:: +nil+
- # Used in :: #format , #paragraphs
- def hyphenator=(h)
- raise ArgumentError, "#{h.inspect} is not a valid hyphenator." unless h.respond_to?(:hyphenate_to)
- arity = h.method(:hyphenate_to).arity
- raise ArgumentError, "#{h.inspect} must have exactly two or three arguments." unless [2, 3].include?(arity)
- @hyphenator = h
- @hyphenator_arity = arity
- end
-
- # Specifies the split mode; used only when #hard_margins is set to
- # +true+. Allowable values are:
- # [+SPLIT_FIXED+] The word will be split at the number of
- # characters needed, with no marking at all.
- # repre
- # senta
- # ion
- # [+SPLIT_CONTINUATION+] The word will be split at the number of
- # characters needed, with a C-style continuation
- # character. If a word is the only item on a
- # line and it cannot be split into an
- # appropriate size, SPLIT_FIXED will be used.
- # repr\
- # esen\
- # tati\
- # on
- # [+SPLIT_HYPHENATION+] The word will be split according to the
- # hyphenator specified in #hyphenator. If there
- # is no #hyphenator specified, works like
- # SPLIT_CONTINUATION. The example is using
- # TeX::Hyphen. If a word is the only item on a
- # line and it cannot be split into an
- # appropriate size, SPLIT_CONTINUATION mode will
- # be used.
- # rep-
- # re-
- # sen-
- # ta-
- # tion
- #
- # *Default*:: Text::Format::SPLIT_FIXED
- # Used in :: #format , #paragraphs
- attr_reader :split_rules
-
- # Specifies the split mode; used only when #hard_margins is set to
- # +true+. Allowable values are:
- # [+SPLIT_FIXED+] The word will be split at the number of
- # characters needed, with no marking at all.
- # repre
- # senta
- # ion
- # [+SPLIT_CONTINUATION+] The word will be split at the number of
- # characters needed, with a C-style continuation
- # character.
- # repr\
- # esen\
- # tati\
- # on
- # [+SPLIT_HYPHENATION+] The word will be split according to the
- # hyphenator specified in #hyphenator. If there
- # is no #hyphenator specified, works like
- # SPLIT_CONTINUATION. The example is using
- # TeX::Hyphen as the #hyphenator.
- # rep-
- # re-
- # sen-
- # ta-
- # tion
- #
- # These values can be bitwise ORed together (e.g., SPLIT_FIXED |
- # SPLIT_CONTINUATION ) to provide fallback split methods. In the
- # example given, an attempt will be made to split the word using the
- # rules of SPLIT_CONTINUATION; if there is not enough room, the word
- # will be split with the rules of SPLIT_FIXED. These combinations are
- # also available as the following values:
- # * +SPLIT_CONTINUATION_FIXED+
- # * +SPLIT_HYPHENATION_FIXED+
- # * +SPLIT_HYPHENATION_CONTINUATION+
- # * +SPLIT_ALL+
- #
- # *Default*:: Text::Format::SPLIT_FIXED
- # Used in :: #format , #paragraphs
- def split_rules=(s)
- raise ArgumentError, "Invalid value provided for split_rules." if ((s < SPLIT_FIXED) || (s > SPLIT_ALL))
- @split_rules = s
- end
-
- # Indicates whether sentence terminators should be followed by a single
- # space (+false+), or two spaces (+true+).
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- attr_accessor :extra_space
-
- # Defines the current abbreviations as an array. This is only used if
- # extra_space is turned on.
- #
- # If one is abbreviating "President" as "Pres." (abbreviations =
- # ["Pres"]), then the results of formatting will be as illustrated in
- # the table below:
- #
- # extra_space | include? | !include?
- # true | Pres. Lincoln | Pres. Lincoln
- # false | Pres. Lincoln | Pres. Lincoln
- #
- # *Default*:: {}
- # Used in :: #format , #paragraphs
- attr_accessor :abbreviations
-
- # Indicates whether the formatting of paragraphs should be done with
- # tagged paragraphs. Useful only with #tag_text .
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- attr_accessor :tag_paragraph
-
- # The array of text to be placed before each paragraph when
- # #tag_paragraph is +true+. When #format() is called,
- # only the first element of the array is used. When #paragraphs
- # is called, then each entry in the array will be used once, with
- # corresponding paragraphs. If the tag elements are exhausted before the
- # text is exhausted, then the remaining paragraphs will not be tagged.
- # Regardless of indentation settings, a blank line will be inserted
- # between all paragraphs when #tag_paragraph is +true+.
- #
- # *Default*:: []
- # Used in :: #format , #paragraphs
- attr_accessor :tag_text
-
- # Indicates whether or not the non-breaking space feature should be
- # used.
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- attr_accessor :nobreak
-
- # A hash which holds the regular expressions on which spaces should not
- # be broken. The hash is set up such that the key is the first word and
- # the value is the second word.
- #
- # For example, if +nobreak_regex+ contains the following hash:
- #
- # { '^Mrs?\.$' => '\S+$', '^\S+$' => '^(?:S|J)r\.$'}
- #
- # Then "Mr. Jones", "Mrs. Jones", and "Jones Jr." would not be broken.
- # If this simple matching algorithm indicates that there should not be a
- # break at the current end of line, then a backtrack is done until there
- # are two words on which line breaking is permitted. If two such words
- # are not found, then the end of the line will be broken *regardless*.
- # If there is a single word on the current line, then no backtrack is
- # done and the word is stuck on the end.
- #
- # *Default*:: {}
- # Used in :: #format , #paragraphs
- attr_accessor :nobreak_regex
-
- # Indicates the number of spaces that a single tab represents.
- #
- # *Default*:: 8
- # Used in :: #expand , #unexpand ,
- # #paragraphs
- attr_reader :tabstop
-
- # Indicates the number of spaces that a single tab represents.
- #
- # *Default*:: 8
- # Used in :: #expand , #unexpand ,
- # #paragraphs
- def tabstop=(t)
- @tabstop = posint(t)
- end
-
- # Specifies the format style. Allowable values are:
- # [+LEFT_ALIGN+] Left justified, ragged right.
- # |A paragraph that is|
- # |left aligned.|
- # [+RIGHT_ALIGN+] Right justified, ragged left.
- # |A paragraph that is|
- # | right aligned.|
- # [+RIGHT_FILL+] Left justified, right ragged, filled to width by
- # spaces. (Essentially the same as +LEFT_ALIGN+ except
- # that lines are padded on the right.)
- # |A paragraph that is|
- # |left aligned. |
- # [+JUSTIFY+] Fully justified, words filled to width by spaces,
- # except the last line.
- # |A paragraph that|
- # |is justified.|
- #
- # *Default*:: Text::Format::LEFT_ALIGN
- # Used in :: #format , #paragraphs
- attr_reader :format_style
-
- # Specifies the format style. Allowable values are:
- # [+LEFT_ALIGN+] Left justified, ragged right.
- # |A paragraph that is|
- # |left aligned.|
- # [+RIGHT_ALIGN+] Right justified, ragged left.
- # |A paragraph that is|
- # | right aligned.|
- # [+RIGHT_FILL+] Left justified, right ragged, filled to width by
- # spaces. (Essentially the same as +LEFT_ALIGN+ except
- # that lines are padded on the right.)
- # |A paragraph that is|
- # |left aligned. |
- # [+JUSTIFY+] Fully justified, words filled to width by spaces.
- # |A paragraph that|
- # |is justified.|
- #
- # *Default*:: Text::Format::LEFT_ALIGN
- # Used in :: #format , #paragraphs
- def format_style=(fs)
- raise ArgumentError, "Invalid value provided for format_style." if ((fs < LEFT_ALIGN) || (fs > JUSTIFY))
- @format_style = fs
- end
-
- # Indicates that the format style is left alignment.
- #
- # *Default*:: +true+
- # Used in :: #format , #paragraphs
- def left_align?
- return @format_style == LEFT_ALIGN
- end
-
- # Indicates that the format style is right alignment.
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- def right_align?
- return @format_style == RIGHT_ALIGN
- end
-
- # Indicates that the format style is right fill.
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- def right_fill?
- return @format_style == RIGHT_FILL
- end
-
- # Indicates that the format style is full justification.
- #
- # *Default*:: +false+
- # Used in :: #format , #paragraphs
- def justify?
- return @format_style == JUSTIFY
- end
-
- # The default implementation of #hyphenate_to implements
- # SPLIT_CONTINUATION.
- def hyphenate_to(word, size)
- [word[0 .. (size - 2)] + "\\", word[(size - 1) .. -1]]
- end
-
- private
- def __do_split_word(word, size) #:nodoc:
- [word[0 .. (size - 1)], word[size .. -1]]
- end
-
- def __format(to_wrap) #:nodoc:
- words = to_wrap.split(/\s+/).compact
- words.shift if words[0].nil? or words[0].empty?
- to_wrap = []
-
- abbrev = false
- width = @columns - @first_indent - @left_margin - @right_margin
- indent_str = ' ' * @first_indent
- first_line = true
- line = words.shift
- abbrev = __is_abbrev(line) unless line.nil? || line.empty?
-
- while w = words.shift
- if (w.size + line.size < (width - 1)) ||
- ((line !~ LEQ_RE || abbrev) && (w.size + line.size < width))
- line << " " if (line =~ LEQ_RE) && (not abbrev)
- line << " #{w}"
- else
- line, w = __do_break(line, w) if @nobreak
- line, w = __do_hyphenate(line, w, width) if @hard_margins
- if w.index(/\s+/)
- w, *w2 = w.split(/\s+/)
- words.unshift(w2)
- words.flatten!
- end
- to_wrap << __make_line(line, indent_str, width, w.nil?) unless line.nil?
- if first_line
- first_line = false
- width = @columns - @body_indent - @left_margin - @right_margin
- indent_str = ' ' * @body_indent
- end
- line = w
- end
-
- abbrev = __is_abbrev(w) unless w.nil?
- end
-
- loop do
- break if line.nil? or line.empty?
- line, w = __do_hyphenate(line, w, width) if @hard_margins
- to_wrap << __make_line(line, indent_str, width, w.nil?)
- line = w
- end
-
- if (@tag_paragraph && (to_wrap.size > 0)) then
- clr = %r{`(\w+)'}.match([caller(1)].flatten[0])[1]
- clr = "" if clr.nil?
-
- if ((not @tag_text[0].nil?) && (@tag_cur.size < 1) &&
- (clr != "__paragraphs")) then
- @tag_cur = @tag_text[0]
- end
-
- fchar = /(\S)/.match(to_wrap[0])[1]
- white = to_wrap[0].index(fchar)
- if ((white - @left_margin - 1) > @tag_cur.size) then
- white = @tag_cur.size + @left_margin
- to_wrap[0].gsub!(/^ {#{white}}/, "#{' ' * @left_margin}#{@tag_cur}")
- else
- to_wrap.unshift("#{' ' * @left_margin}#{@tag_cur}\n")
- end
- end
- to_wrap.join('')
- end
-
- # format lines in text into paragraphs with each element of @wrap a
- # paragraph; uses Text::Format.format for the formatting
- def __paragraphs(to_wrap) #:nodoc:
- if ((@first_indent == @body_indent) || @tag_paragraph) then
- p_end = "\n"
- else
- p_end = ''
- end
-
- cnt = 0
- ret = []
- to_wrap.each do |tw|
- @tag_cur = @tag_text[cnt] if @tag_paragraph
- @tag_cur = '' if @tag_cur.nil?
- line = __format(tw)
- ret << "#{line}#{p_end}" if (not line.nil?) && (line.size > 0)
- cnt += 1
- end
-
- ret[-1].chomp! unless ret.empty?
- ret.join('')
- end
-
- # center text using spaces on left side to pad it out empty lines
- # are preserved
- def __center(to_center) #:nodoc:
- tabs = 0
- width = @columns - @left_margin - @right_margin
- centered = []
- to_center.each do |tc|
- s = tc.strip
- tabs = s.count("\t")
- tabs = 0 if tabs.nil?
- ct = ((width - s.size - (tabs * @tabstop) + tabs) / 2)
- ct = (width - @left_margin - @right_margin) - ct
- centered << "#{s.rjust(ct)}\n"
- end
- centered.join('')
- end
-
- # expand tabs to spaces should be similar to Text::Tabs::expand
- def __expand(to_expand) #:nodoc:
- expanded = []
- to_expand.split("\n").each { |te| expanded << te.gsub(/\t/, ' ' * @tabstop) }
- expanded.join('')
- end
-
- def __unexpand(to_unexpand) #:nodoc:
- unexpanded = []
- to_unexpand.split("\n").each { |tu| unexpanded << tu.gsub(/ {#{@tabstop}}/, "\t") }
- unexpanded.join('')
- end
-
- def __is_abbrev(word) #:nodoc:
- # remove period if there is one.
- w = word.gsub(/\.$/, '') unless word.nil?
- return true if (!@extra_space || ABBREV.include?(w) || @abbreviations.include?(w))
- false
- end
-
- def __make_line(line, indent, width, last = false) #:nodoc:
- lmargin = " " * @left_margin
- fill = " " * (width - line.size) if right_fill? && (line.size <= width)
-
- if (justify? && ((not line.nil?) && (not line.empty?)) && line =~ /\S+\s+\S+/ && !last)
- spaces = width - line.size
- words = line.split(/(\s+)/)
- ws = spaces / (words.size / 2)
- spaces = spaces % (words.size / 2) if ws > 0
- words.reverse.each do |rw|
- next if (rw =~ /^\S/)
- rw.sub!(/^/, " " * ws)
- next unless (spaces > 0)
- rw.sub!(/^/, " ")
- spaces -= 1
- end
- line = words.join('')
- end
- line = "#{lmargin}#{indent}#{line}#{fill}\n" unless line.nil?
- if right_align? && (not line.nil?)
- line.sub(/^/, " " * (@columns - @right_margin - (line.size - 1)))
- else
- line
- end
- end
-
- def __do_hyphenate(line, next_line, width) #:nodoc:
- rline = line.dup rescue line
- rnext = next_line.dup rescue next_line
- loop do
- if rline.size == width
- break
- elsif rline.size > width
- words = rline.strip.split(/\s+/)
- word = words[-1].dup
- size = width - rline.size + word.size
- if (size <= 0)
- words[-1] = nil
- rline = words.join(' ').strip
- rnext = "#{word} #{rnext}".strip
- next
- end
-
- first = rest = nil
-
- if ((@split_rules & SPLIT_HYPHENATION) != 0)
- if @hyphenator_arity == 2
- first, rest = @hyphenator.hyphenate_to(word, size)
- else
- first, rest = @hyphenator.hyphenate_to(word, size, self)
- end
- end
-
- if ((@split_rules & SPLIT_CONTINUATION) != 0) and first.nil?
- first, rest = self.hyphenate_to(word, size)
- end
-
- if ((@split_rules & SPLIT_FIXED) != 0) and first.nil?
- first.nil? or @split_rules == SPLIT_FIXED
- first, rest = __do_split_word(word, size)
- end
-
- if first.nil?
- words[-1] = nil
- rest = word
- else
- words[-1] = first
- @split_words << SplitWord.new(word, first, rest)
- end
- rline = words.join(' ').strip
- rnext = "#{rest} #{rnext}".strip
- break
- else
- break if rnext.nil? or rnext.empty? or rline.nil? or rline.empty?
- words = rnext.split(/\s+/)
- word = words.shift
- size = width - rline.size - 1
-
- if (size <= 0)
- rnext = "#{word} #{words.join(' ')}".strip
- break
- end
-
- first = rest = nil
-
- if ((@split_rules & SPLIT_HYPHENATION) != 0)
- if @hyphenator_arity == 2
- first, rest = @hyphenator.hyphenate_to(word, size)
- else
- first, rest = @hyphenator.hyphenate_to(word, size, self)
- end
- end
-
- first, rest = self.hyphenate_to(word, size) if ((@split_rules & SPLIT_CONTINUATION) != 0) and first.nil?
-
- first, rest = __do_split_word(word, size) if ((@split_rules & SPLIT_FIXED) != 0) and first.nil?
-
- if (rline.size + (first ? first.size : 0)) < width
- @split_words << SplitWord.new(word, first, rest)
- rline = "#{rline} #{first}".strip
- rnext = "#{rest} #{words.join(' ')}".strip
- end
- break
- end
- end
- [rline, rnext]
- end
-
- def __do_break(line, next_line) #:nodoc:
- no_brk = false
- words = []
- words = line.split(/\s+/) unless line.nil?
- last_word = words[-1]
-
- @nobreak_regex.each { |k, v| no_brk = ((last_word =~ /#{k}/) and (next_line =~ /#{v}/)) }
-
- if no_brk && words.size > 1
- i = words.size
- while i > 0
- no_brk = false
- @nobreak_regex.each { |k, v| no_brk = ((words[i + 1] =~ /#{k}/) && (words[i] =~ /#{v}/)) }
- i -= 1
- break if not no_brk
- end
- if i > 0
- l = brk_re(i).match(line)
- line.sub!(brk_re(i), l[1])
- next_line = "#{l[2]} #{next_line}"
- line.sub!(/\s+$/, '')
- end
- end
- [line, next_line]
- end
-
- def __create(arg = nil, &block) #:nodoc:
- # Format::Text.new(text-to-wrap)
- @text = arg unless arg.nil?
- # Defaults
- @columns = 72
- @tabstop = 8
- @first_indent = 4
- @body_indent = 0
- @format_style = LEFT_ALIGN
- @left_margin = 0
- @right_margin = 0
- @extra_space = false
- @text = Array.new if @text.nil?
- @tag_paragraph = false
- @tag_text = Array.new
- @tag_cur = ""
- @abbreviations = Array.new
- @nobreak = false
- @nobreak_regex = Hash.new
- @split_words = Array.new
- @hard_margins = false
- @split_rules = SPLIT_FIXED
- @hyphenator = self
- @hyphenator_arity = self.method(:hyphenate_to).arity
-
- instance_eval(&block) unless block.nil?
- end
-
- public
- # Formats text into a nice paragraph format. The text is separated
- # into words and then reassembled a word at a time using the settings
- # of this Format object. If a word is larger than the number of
- # columns available for formatting, then that word will appear on the
- # line by itself.
- #
- # If +to_wrap+ is +nil+, then the value of #text will be
- # worked on.
- def format(to_wrap = nil)
- to_wrap = @text if to_wrap.nil?
- if to_wrap.class == Array
- __format(to_wrap[0])
- else
- __format(to_wrap)
- end
- end
-
- # Considers each element of text (provided or internal) as a paragraph.
- # If #first_indent is the same as #body_indent , then
- # paragraphs will be separated by a single empty line in the result;
- # otherwise, the paragraphs will follow immediately after each other.
- # Uses #format to do the heavy lifting.
- def paragraphs(to_wrap = nil)
- to_wrap = @text if to_wrap.nil?
- __paragraphs([to_wrap].flatten)
- end
-
- # Centers the text, preserving empty lines and tabs.
- def center(to_center = nil)
- to_center = @text if to_center.nil?
- __center([to_center].flatten)
- end
-
- # Replaces all tab characters in the text with #tabstop spaces.
- def expand(to_expand = nil)
- to_expand = @text if to_expand.nil?
- if to_expand.class == Array
- to_expand.collect { |te| __expand(te) }
- else
- __expand(to_expand)
- end
- end
-
- # Replaces all occurrences of #tabstop consecutive spaces
- # with a tab character.
- def unexpand(to_unexpand = nil)
- to_unexpand = @text if to_unexpand.nil?
- if to_unexpand.class == Array
- to_unexpand.collect { |te| v << __unexpand(te) }
- else
- __unexpand(to_unexpand)
- end
- end
-
- # This constructor takes advantage of a technique for Ruby object
- # construction introduced by Andy Hunt and Dave Thomas (see reference),
- # where optional values are set using commands in a block.
- #
- # Text::Format.new {
- # columns = 72
- # left_margin = 0
- # right_margin = 0
- # first_indent = 4
- # body_indent = 0
- # format_style = Text::Format::LEFT_ALIGN
- # extra_space = false
- # abbreviations = {}
- # tag_paragraph = false
- # tag_text = []
- # nobreak = false
- # nobreak_regex = {}
- # tabstop = 8
- # text = nil
- # }
- #
- # As shown above, +arg+ is optional. If +arg+ is specified and is a
- # +String+, then arg is used as the default value of #text .
- # Alternately, an existing Text::Format object can be used or a Hash can
- # be used. With all forms, a block can be specified.
- #
- # *Reference*:: "Object Construction and Blocks"
- #
- #
- def initialize(arg = nil, &block)
- case arg
- when Text::Format
- __create(arg.text) do
- @columns = arg.columns
- @tabstop = arg.tabstop
- @first_indent = arg.first_indent
- @body_indent = arg.body_indent
- @format_style = arg.format_style
- @left_margin = arg.left_margin
- @right_margin = arg.right_margin
- @extra_space = arg.extra_space
- @tag_paragraph = arg.tag_paragraph
- @tag_text = arg.tag_text
- @abbreviations = arg.abbreviations
- @nobreak = arg.nobreak
- @nobreak_regex = arg.nobreak_regex
- @text = arg.text
- @hard_margins = arg.hard_margins
- @split_words = arg.split_words
- @split_rules = arg.split_rules
- @hyphenator = arg.hyphenator
- end
- instance_eval(&block) unless block.nil?
- when Hash
- __create do
- @columns = arg[:columns] || arg['columns'] || @columns
- @tabstop = arg[:tabstop] || arg['tabstop'] || @tabstop
- @first_indent = arg[:first_indent] || arg['first_indent'] || @first_indent
- @body_indent = arg[:body_indent] || arg['body_indent'] || @body_indent
- @format_style = arg[:format_style] || arg['format_style'] || @format_style
- @left_margin = arg[:left_margin] || arg['left_margin'] || @left_margin
- @right_margin = arg[:right_margin] || arg['right_margin'] || @right_margin
- @extra_space = arg[:extra_space] || arg['extra_space'] || @extra_space
- @text = arg[:text] || arg['text'] || @text
- @tag_paragraph = arg[:tag_paragraph] || arg['tag_paragraph'] || @tag_paragraph
- @tag_text = arg[:tag_text] || arg['tag_text'] || @tag_text
- @abbreviations = arg[:abbreviations] || arg['abbreviations'] || @abbreviations
- @nobreak = arg[:nobreak] || arg['nobreak'] || @nobreak
- @nobreak_regex = arg[:nobreak_regex] || arg['nobreak_regex'] || @nobreak_regex
- @hard_margins = arg[:hard_margins] || arg['hard_margins'] || @hard_margins
- @split_rules = arg[:split_rules] || arg['split_rules'] || @split_rules
- @hyphenator = arg[:hyphenator] || arg['hyphenator'] || @hyphenator
- end
- instance_eval(&block) unless block.nil?
- when String
- __create(arg, &block)
- when NilClass
- __create(&block)
- else
- raise TypeError
- end
- end
- end
-end
-
-if __FILE__ == $0
- require 'test/unit'
-
- class TestText__Format < Test::Unit::TestCase #:nodoc:
- attr_accessor :format_o
-
- GETTYSBURG = <<-'EOS'
- Four score and seven years ago our fathers brought forth on this
- continent a new nation, conceived in liberty and dedicated to the
- proposition that all men are created equal. Now we are engaged in
- a great civil war, testing whether that nation or any nation so
- conceived and so dedicated can long endure. We are met on a great
- battlefield of that war. We have come to dedicate a portion of
- that field as a final resting-place for those who here gave their
- lives that that nation might live. It is altogether fitting and
- proper that we should do this. But in a larger sense, we cannot
- dedicate, we cannot consecrate, we cannot hallow this ground.
- The brave men, living and dead who struggled here have consecrated
- it far above our poor power to add or detract. The world will
- little note nor long remember what we say here, but it can never
- forget what they did here. It is for us the living rather to be
- dedicated here to the unfinished work which they who fought here
- have thus far so nobly advanced. It is rather for us to be here
- dedicated to the great task remaining before us--that from these
- honored dead we take increased devotion to that cause for which
- they gave the last full measure of devotion--that we here highly
- resolve that these dead shall not have died in vain, that this
- nation under God shall have a new birth of freedom, and that
- government of the people, by the people, for the people shall
- not perish from the earth.
-
- -- Pres. Abraham Lincoln, 19 November 1863
- EOS
-
- FIVE_COL = "Four \nscore\nand s\neven \nyears\nago o\nur fa\nthers\nbroug\nht fo\nrth o\nn thi\ns con\ntinen\nt a n\new na\ntion,\nconce\nived \nin li\nberty\nand d\nedica\nted t\no the\npropo\nsitio\nn tha\nt all\nmen a\nre cr\neated\nequal\n. Now\nwe ar\ne eng\naged \nin a \ngreat\ncivil\nwar, \ntesti\nng wh\nether\nthat \nnatio\nn or \nany n\nation\nso co\nnceiv\ned an\nd so \ndedic\nated \ncan l\nong e\nndure\n. We \nare m\net on\na gre\nat ba\nttlef\nield \nof th\nat wa\nr. We\nhave \ncome \nto de\ndicat\ne a p\nortio\nn of \nthat \nfield\nas a \nfinal\nresti\nng-pl\nace f\nor th\nose w\nho he\nre ga\nve th\neir l\nives \nthat \nthat \nnatio\nn mig\nht li\nve. I\nt is \naltog\nether\nfitti\nng an\nd pro\nper t\nhat w\ne sho\nuld d\no thi\ns. Bu\nt in \na lar\nger s\nense,\nwe ca\nnnot \ndedic\nate, \nwe ca\nnnot \nconse\ncrate\n, we \ncanno\nt hal\nlow t\nhis g\nround\n. The\nbrave\nmen, \nlivin\ng and\ndead \nwho s\ntrugg\nled h\nere h\nave c\nonsec\nrated\nit fa\nr abo\nve ou\nr poo\nr pow\ner to\nadd o\nr det\nract.\nThe w\norld \nwill \nlittl\ne not\ne nor\nlong \nremem\nber w\nhat w\ne say\nhere,\nbut i\nt can\nnever\nforge\nt wha\nt the\ny did\nhere.\nIt is\nfor u\ns the\nlivin\ng rat\nher t\no be \ndedic\nated \nhere \nto th\ne unf\ninish\ned wo\nrk wh\nich t\nhey w\nho fo\nught \nhere \nhave \nthus \nfar s\no nob\nly ad\nvance\nd. It\nis ra\nther \nfor u\ns to \nbe he\nre de\ndicat\ned to\nthe g\nreat \ntask \nremai\nning \nbefor\ne us-\n-that\nfrom \nthese\nhonor\ned de\nad we\ntake \nincre\nased \ndevot\nion t\no tha\nt cau\nse fo\nr whi\nch th\ney ga\nve th\ne las\nt ful\nl mea\nsure \nof de\nvotio\nn--th\nat we\nhere \nhighl\ny res\nolve \nthat \nthese\ndead \nshall\nnot h\nave d\nied i\nn vai\nn, th\nat th\nis na\ntion \nunder\nGod s\nhall \nhave \na new\nbirth\nof fr\needom\n, and\nthat \ngover\nnment\nof th\ne peo\nple, \nby th\ne peo\nple, \nfor t\nhe pe\nople \nshall\nnot p\nerish\nfrom \nthe e\narth.\n-- Pr\nes. A\nbraha\nm Lin\ncoln,\n19 No\nvembe\nr 186\n3 \n"
-
- FIVE_CNT = "Four \nscore\nand \nseven\nyears\nago \nour \nfath\\\ners \nbrou\\\nght \nforth\non t\\\nhis \ncont\\\ninent\na new\nnati\\\non, \nconc\\\neived\nin l\\\niber\\\nty a\\\nnd d\\\nedic\\\nated \nto t\\\nhe p\\\nropo\\\nsiti\\\non t\\\nhat \nall \nmen \nare \ncrea\\\nted \nequa\\\nl. N\\\now we\nare \nenga\\\nged \nin a \ngreat\ncivil\nwar, \ntest\\\ning \nwhet\\\nher \nthat \nnati\\\non or\nany \nnati\\\non so\nconc\\\neived\nand \nso d\\\nedic\\\nated \ncan \nlong \nendu\\\nre. \nWe a\\\nre m\\\net on\na gr\\\neat \nbatt\\\nlefi\\\neld \nof t\\\nhat \nwar. \nWe h\\\nave \ncome \nto d\\\nedic\\\nate a\nport\\\nion \nof t\\\nhat \nfield\nas a \nfinal\nrest\\\ning-\\\nplace\nfor \nthose\nwho \nhere \ngave \ntheir\nlives\nthat \nthat \nnati\\\non m\\\night \nlive.\nIt is\nalto\\\ngeth\\\ner f\\\nitti\\\nng a\\\nnd p\\\nroper\nthat \nwe s\\\nhould\ndo t\\\nhis. \nBut \nin a \nlarg\\\ner s\\\nense,\nwe c\\\nannot\ndedi\\\ncate,\nwe c\\\nannot\ncons\\\necra\\\nte, \nwe c\\\nannot\nhall\\\now t\\\nhis \ngrou\\\nnd. \nThe \nbrave\nmen, \nlivi\\\nng a\\\nnd d\\\nead \nwho \nstru\\\nggled\nhere \nhave \ncons\\\necra\\\nted \nit f\\\nar a\\\nbove \nour \npoor \npower\nto a\\\ndd or\ndetr\\\nact. \nThe \nworld\nwill \nlitt\\\nle n\\\note \nnor \nlong \nreme\\\nmber \nwhat \nwe s\\\nay h\\\nere, \nbut \nit c\\\nan n\\\never \nforg\\\net w\\\nhat \nthey \ndid \nhere.\nIt is\nfor \nus t\\\nhe l\\\niving\nrath\\\ner to\nbe d\\\nedic\\\nated \nhere \nto t\\\nhe u\\\nnfin\\\nished\nwork \nwhich\nthey \nwho \nfoug\\\nht h\\\nere \nhave \nthus \nfar \nso n\\\nobly \nadva\\\nnced.\nIt is\nrath\\\ner f\\\nor us\nto be\nhere \ndedi\\\ncated\nto t\\\nhe g\\\nreat \ntask \nrema\\\nining\nbefo\\\nre u\\\ns--t\\\nhat \nfrom \nthese\nhono\\\nred \ndead \nwe t\\\nake \nincr\\\neased\ndevo\\\ntion \nto t\\\nhat \ncause\nfor \nwhich\nthey \ngave \nthe \nlast \nfull \nmeas\\\nure \nof d\\\nevot\\\nion-\\\n-that\nwe h\\\nere \nhigh\\\nly r\\\nesol\\\nve t\\\nhat \nthese\ndead \nshall\nnot \nhave \ndied \nin v\\\nain, \nthat \nthis \nnati\\\non u\\\nnder \nGod \nshall\nhave \na new\nbirth\nof f\\\nreed\\\nom, \nand \nthat \ngove\\\nrnme\\\nnt of\nthe \npeop\\\nle, \nby t\\\nhe p\\\neopl\\\ne, f\\\nor t\\\nhe p\\\neople\nshall\nnot \nperi\\\nsh f\\\nrom \nthe \neart\\\nh. --\nPres.\nAbra\\\nham \nLinc\\\noln, \n19 N\\\novem\\\nber \n1863 \n"
-
- # Tests both abbreviations and abbreviations=
- def test_abbreviations
- abbr = [" Pres. Abraham Lincoln\n", " Pres. Abraham Lincoln\n"]
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal([], @format_o.abbreviations)
- assert_nothing_raised { @format_o.abbreviations = [ 'foo', 'bar' ] }
- assert_equal([ 'foo', 'bar' ], @format_o.abbreviations)
- assert_equal(abbr[0], @format_o.format(abbr[0]))
- assert_nothing_raised { @format_o.extra_space = true }
- assert_equal(abbr[1], @format_o.format(abbr[0]))
- assert_nothing_raised { @format_o.abbreviations = [ "Pres" ] }
- assert_equal([ "Pres" ], @format_o.abbreviations)
- assert_equal(abbr[0], @format_o.format(abbr[0]))
- assert_nothing_raised { @format_o.extra_space = false }
- assert_equal(abbr[0], @format_o.format(abbr[0]))
- end
-
- # Tests both body_indent and body_indent=
- def test_body_indent
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(0, @format_o.body_indent)
- assert_nothing_raised { @format_o.body_indent = 7 }
- assert_equal(7, @format_o.body_indent)
- assert_nothing_raised { @format_o.body_indent = -3 }
- assert_equal(3, @format_o.body_indent)
- assert_nothing_raised { @format_o.body_indent = "9" }
- assert_equal(9, @format_o.body_indent)
- assert_nothing_raised { @format_o.body_indent = "-2" }
- assert_equal(2, @format_o.body_indent)
- assert_match(/^ [^ ]/, @format_o.format(GETTYSBURG).split("\n")[1])
- end
-
- # Tests both columns and columns=
- def test_columns
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(72, @format_o.columns)
- assert_nothing_raised { @format_o.columns = 7 }
- assert_equal(7, @format_o.columns)
- assert_nothing_raised { @format_o.columns = -3 }
- assert_equal(3, @format_o.columns)
- assert_nothing_raised { @format_o.columns = "9" }
- assert_equal(9, @format_o.columns)
- assert_nothing_raised { @format_o.columns = "-2" }
- assert_equal(2, @format_o.columns)
- assert_nothing_raised { @format_o.columns = 40 }
- assert_equal(40, @format_o.columns)
- assert_match(/this continent$/,
- @format_o.format(GETTYSBURG).split("\n")[1])
- end
-
- # Tests both extra_space and extra_space=
- def test_extra_space
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.extra_space)
- assert_nothing_raised { @format_o.extra_space = true }
- assert(@format_o.extra_space)
- # The behaviour of extra_space is tested in test_abbreviations. There
- # is no need to reproduce it here.
- end
-
- # Tests both first_indent and first_indent=
- def test_first_indent
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(4, @format_o.first_indent)
- assert_nothing_raised { @format_o.first_indent = 7 }
- assert_equal(7, @format_o.first_indent)
- assert_nothing_raised { @format_o.first_indent = -3 }
- assert_equal(3, @format_o.first_indent)
- assert_nothing_raised { @format_o.first_indent = "9" }
- assert_equal(9, @format_o.first_indent)
- assert_nothing_raised { @format_o.first_indent = "-2" }
- assert_equal(2, @format_o.first_indent)
- assert_match(/^ [^ ]/, @format_o.format(GETTYSBURG).split("\n")[0])
- end
-
- def test_format_style
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(Text::Format::LEFT_ALIGN, @format_o.format_style)
- assert_match(/^November 1863$/,
- @format_o.format(GETTYSBURG).split("\n")[-1])
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_ALIGN
- }
- assert_equal(Text::Format::RIGHT_ALIGN, @format_o.format_style)
- assert_match(/^ +November 1863$/,
- @format_o.format(GETTYSBURG).split("\n")[-1])
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert_equal(Text::Format::RIGHT_FILL, @format_o.format_style)
- assert_match(/^November 1863 +$/,
- @format_o.format(GETTYSBURG).split("\n")[-1])
- assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY }
- assert_equal(Text::Format::JUSTIFY, @format_o.format_style)
- assert_match(/^of freedom, and that government of the people, by the people, for the$/,
- @format_o.format(GETTYSBURG).split("\n")[-3])
- assert_raises(ArgumentError) { @format_o.format_style = 33 }
- end
-
- def test_tag_paragraph
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.tag_paragraph)
- assert_nothing_raised { @format_o.tag_paragraph = true }
- assert(@format_o.tag_paragraph)
- assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG]),
- Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG]))
- end
-
- def test_tag_text
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal([], @format_o.tag_text)
- assert_equal(@format_o.format(GETTYSBURG),
- Text::Format.new.format(GETTYSBURG))
- assert_nothing_raised {
- @format_o.tag_paragraph = true
- @format_o.tag_text = ["Gettysburg Address", "---"]
- }
- assert_not_equal(@format_o.format(GETTYSBURG),
- Text::Format.new.format(GETTYSBURG))
- assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG]),
- Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG]))
- assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG,
- GETTYSBURG]),
- Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG,
- GETTYSBURG]))
- end
-
- def test_justify?
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.justify?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_ALIGN
- }
- assert(!@format_o.justify?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert(!@format_o.justify?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::JUSTIFY
- }
- assert(@format_o.justify?)
- # The format testing is done in test_format_style
- end
-
- def test_left_align?
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(@format_o.left_align?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_ALIGN
- }
- assert(!@format_o.left_align?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert(!@format_o.left_align?)
- assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY }
- assert(!@format_o.left_align?)
- # The format testing is done in test_format_style
- end
-
- def test_left_margin
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(0, @format_o.left_margin)
- assert_nothing_raised { @format_o.left_margin = -3 }
- assert_equal(3, @format_o.left_margin)
- assert_nothing_raised { @format_o.left_margin = "9" }
- assert_equal(9, @format_o.left_margin)
- assert_nothing_raised { @format_o.left_margin = "-2" }
- assert_equal(2, @format_o.left_margin)
- assert_nothing_raised { @format_o.left_margin = 7 }
- assert_equal(7, @format_o.left_margin)
- assert_nothing_raised {
- ft = @format_o.format(GETTYSBURG).split("\n")
- assert_match(/^ {11}Four score/, ft[0])
- assert_match(/^ {7}November/, ft[-1])
- }
- end
-
- def test_hard_margins
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.hard_margins)
- assert_nothing_raised {
- @format_o.hard_margins = true
- @format_o.columns = 5
- @format_o.first_indent = 0
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert(@format_o.hard_margins)
- assert_equal(FIVE_COL, @format_o.format(GETTYSBURG))
- assert_nothing_raised {
- @format_o.split_rules |= Text::Format::SPLIT_CONTINUATION
- assert_equal(Text::Format::SPLIT_CONTINUATION_FIXED,
- @format_o.split_rules)
- }
- assert_equal(FIVE_CNT, @format_o.format(GETTYSBURG))
- end
-
- # Tests both nobreak and nobreak_regex, since one is only useful
- # with the other.
- def test_nobreak
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.nobreak)
- assert(@format_o.nobreak_regex.empty?)
- assert_nothing_raised {
- @format_o.nobreak = true
- @format_o.nobreak_regex = { '^this$' => '^continent$' }
- @format_o.columns = 77
- }
- assert(@format_o.nobreak)
- assert_equal({ '^this$' => '^continent$' }, @format_o.nobreak_regex)
- assert_match(/^this continent/,
- @format_o.format(GETTYSBURG).split("\n")[1])
- end
-
- def test_right_align?
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.right_align?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_ALIGN
- }
- assert(@format_o.right_align?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert(!@format_o.right_align?)
- assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY }
- assert(!@format_o.right_align?)
- # The format testing is done in test_format_style
- end
-
- def test_right_fill?
- assert_nothing_raised { @format_o = Text::Format.new }
- assert(!@format_o.right_fill?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_ALIGN
- }
- assert(!@format_o.right_fill?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::RIGHT_FILL
- }
- assert(@format_o.right_fill?)
- assert_nothing_raised {
- @format_o.format_style = Text::Format::JUSTIFY
- }
- assert(!@format_o.right_fill?)
- # The format testing is done in test_format_style
- end
-
- def test_right_margin
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(0, @format_o.right_margin)
- assert_nothing_raised { @format_o.right_margin = -3 }
- assert_equal(3, @format_o.right_margin)
- assert_nothing_raised { @format_o.right_margin = "9" }
- assert_equal(9, @format_o.right_margin)
- assert_nothing_raised { @format_o.right_margin = "-2" }
- assert_equal(2, @format_o.right_margin)
- assert_nothing_raised { @format_o.right_margin = 7 }
- assert_equal(7, @format_o.right_margin)
- assert_nothing_raised {
- ft = @format_o.format(GETTYSBURG).split("\n")
- assert_match(/^ {4}Four score.*forth on$/, ft[0])
- assert_match(/^November/, ft[-1])
- }
- end
-
- def test_tabstop
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(8, @format_o.tabstop)
- assert_nothing_raised { @format_o.tabstop = 7 }
- assert_equal(7, @format_o.tabstop)
- assert_nothing_raised { @format_o.tabstop = -3 }
- assert_equal(3, @format_o.tabstop)
- assert_nothing_raised { @format_o.tabstop = "9" }
- assert_equal(9, @format_o.tabstop)
- assert_nothing_raised { @format_o.tabstop = "-2" }
- assert_equal(2, @format_o.tabstop)
- end
-
- def test_text
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal([], @format_o.text)
- assert_nothing_raised { @format_o.text = "Test Text" }
- assert_equal("Test Text", @format_o.text)
- assert_nothing_raised { @format_o.text = ["Line 1", "Line 2"] }
- assert_equal(["Line 1", "Line 2"], @format_o.text)
- end
-
- def test_s_new
- # new(NilClass) { block }
- assert_nothing_raised do
- @format_o = Text::Format.new {
- self.text = "Test 1, 2, 3"
- }
- end
- assert_equal("Test 1, 2, 3", @format_o.text)
-
- # new(Hash Symbols)
- assert_nothing_raised { @format_o = Text::Format.new(:columns => 72) }
- assert_equal(72, @format_o.columns)
-
- # new(Hash String)
- assert_nothing_raised { @format_o = Text::Format.new('columns' => 72) }
- assert_equal(72, @format_o.columns)
-
- # new(Hash) { block }
- assert_nothing_raised do
- @format_o = Text::Format.new('columns' => 80) {
- self.text = "Test 4, 5, 6"
- }
- end
- assert_equal("Test 4, 5, 6", @format_o.text)
- assert_equal(80, @format_o.columns)
-
- # new(Text::Format)
- assert_nothing_raised do
- fo = Text::Format.new(@format_o)
- assert(fo == @format_o)
- end
-
- # new(Text::Format) { block }
- assert_nothing_raised do
- fo = Text::Format.new(@format_o) { self.columns = 79 }
- assert(fo != @format_o)
- end
-
- # new(String)
- assert_nothing_raised { @format_o = Text::Format.new("Test A, B, C") }
- assert_equal("Test A, B, C", @format_o.text)
-
- # new(String) { block }
- assert_nothing_raised do
- @format_o = Text::Format.new("Test X, Y, Z") { self.columns = -5 }
- end
- assert_equal("Test X, Y, Z", @format_o.text)
- assert_equal(5, @format_o.columns)
- end
-
- def test_center
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_nothing_raised do
- ct = @format_o.center(GETTYSBURG.split("\n")).split("\n")
- assert_match(/^ Four score and seven years ago our fathers brought forth on this/, ct[0])
- assert_match(/^ not perish from the earth./, ct[-3])
- end
- end
-
- def test_expand
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal(" ", @format_o.expand("\t "))
- assert_nothing_raised { @format_o.tabstop = 4 }
- assert_equal(" ", @format_o.expand("\t "))
- end
-
- def test_unexpand
- assert_nothing_raised { @format_o = Text::Format.new }
- assert_equal("\t ", @format_o.unexpand(" "))
- assert_nothing_raised { @format_o.tabstop = 4 }
- assert_equal("\t ", @format_o.unexpand(" "))
- end
-
- def test_space_only
- assert_equal("", Text::Format.new.format(" "))
- assert_equal("", Text::Format.new.format("\n"))
- assert_equal("", Text::Format.new.format(" "))
- assert_equal("", Text::Format.new.format(" \n"))
- assert_equal("", Text::Format.new.paragraphs("\n"))
- assert_equal("", Text::Format.new.paragraphs(" "))
- assert_equal("", Text::Format.new.paragraphs(" "))
- assert_equal("", Text::Format.new.paragraphs(" \n"))
- assert_equal("", Text::Format.new.paragraphs(["\n"]))
- assert_equal("", Text::Format.new.paragraphs([" "]))
- assert_equal("", Text::Format.new.paragraphs([" "]))
- assert_equal("", Text::Format.new.paragraphs([" \n"]))
- end
-
- def test_splendiferous
- h = nil
- test = "This is a splendiferous test"
- assert_nothing_raised { @format_o = Text::Format.new(:columns => 6, :left_margin => 0, :indent => 0, :first_indent => 0) }
- assert_match(/^splendiferous$/, @format_o.format(test))
- assert_nothing_raised { @format_o.hard_margins = true }
- assert_match(/^lendif$/, @format_o.format(test))
- assert_nothing_raised { h = Object.new }
- assert_nothing_raised do
- @format_o.split_rules = Text::Format::SPLIT_HYPHENATION
- class << h #:nodoc:
- def hyphenate_to(word, size)
- return ["", word] if size < 2
- [word[0 ... size], word[size .. -1]]
- end
- end
- @format_o.hyphenator = h
- end
- assert_match(/^iferou$/, @format_o.format(test))
- assert_nothing_raised { h = Object.new }
- assert_nothing_raised do
- class << h #:nodoc:
- def hyphenate_to(word, size, formatter)
- return ["", word] if word.size < formatter.columns
- [word[0 ... size], word[size .. -1]]
- end
- end
- @format_o.hyphenator = h
- end
- assert_match(/^ferous$/, @format_o.format(test))
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb
deleted file mode 100755
index 8cea88d3..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-require 'tmail/info'
-require 'tmail/mail'
-require 'tmail/mailbox'
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb
deleted file mode 100755
index 235ec761..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb
+++ /dev/null
@@ -1,242 +0,0 @@
-#
-# address.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/encode'
-require 'tmail/parser'
-
-
-module TMail
-
- class Address
-
- include TextUtils
-
- def Address.parse( str )
- Parser.parse :ADDRESS, str
- end
-
- def address_group?
- false
- end
-
- def initialize( local, domain )
- if domain
- domain.each do |s|
- raise SyntaxError, 'empty word in domain' if s.empty?
- end
- end
- @local = local
- @domain = domain
- @name = nil
- @routes = []
- end
-
- attr_reader :name
-
- def name=( str )
- @name = str
- @name = nil if str and str.empty?
- end
-
- alias phrase name
- alias phrase= name=
-
- attr_reader :routes
-
- def inspect
- "#<#{self.class} #{address()}>"
- end
-
- def local
- return nil unless @local
- return '""' if @local.size == 1 and @local[0].empty?
- @local.map {|i| quote_atom(i) }.join('.')
- end
-
- def domain
- return nil unless @domain
- join_domain(@domain)
- end
-
- def spec
- s = self.local
- d = self.domain
- if s and d
- s + '@' + d
- else
- s
- end
- end
-
- alias address spec
-
-
- def ==( other )
- other.respond_to? :spec and self.spec == other.spec
- end
-
- alias eql? ==
-
- def hash
- @local.hash ^ @domain.hash
- end
-
- def dup
- obj = self.class.new(@local.dup, @domain.dup)
- obj.name = @name.dup if @name
- obj.routes.replace @routes
- obj
- end
-
- include StrategyInterface
-
- def accept( strategy, dummy1 = nil, dummy2 = nil )
- unless @local
- strategy.meta '<>' # empty return-path
- return
- end
-
- spec_p = (not @name and @routes.empty?)
- if @name
- strategy.phrase @name
- strategy.space
- end
- tmp = spec_p ? '' : '<'
- unless @routes.empty?
- tmp << @routes.map {|i| '@' + i }.join(',') << ':'
- end
- tmp << self.spec
- tmp << '>' unless spec_p
- strategy.meta tmp
- strategy.lwsp ''
- end
-
- end
-
-
- class AddressGroup
-
- include Enumerable
-
- def address_group?
- true
- end
-
- def initialize( name, addrs )
- @name = name
- @addresses = addrs
- end
-
- attr_reader :name
-
- def ==( other )
- other.respond_to? :to_a and @addresses == other.to_a
- end
-
- alias eql? ==
-
- def hash
- map {|i| i.hash }.hash
- end
-
- def []( idx )
- @addresses[idx]
- end
-
- def size
- @addresses.size
- end
-
- def empty?
- @addresses.empty?
- end
-
- def each( &block )
- @addresses.each(&block)
- end
-
- def to_a
- @addresses.dup
- end
-
- alias to_ary to_a
-
- def include?( a )
- @addresses.include? a
- end
-
- def flatten
- set = []
- @addresses.each do |a|
- if a.respond_to? :flatten
- set.concat a.flatten
- else
- set.push a
- end
- end
- set
- end
-
- def each_address( &block )
- flatten.each(&block)
- end
-
- def add( a )
- @addresses.push a
- end
-
- alias push add
-
- def delete( a )
- @addresses.delete a
- end
-
- include StrategyInterface
-
- def accept( strategy, dummy1 = nil, dummy2 = nil )
- strategy.phrase @name
- strategy.meta ':'
- strategy.space
- first = true
- each do |mbox|
- if first
- first = false
- else
- strategy.meta ','
- end
- strategy.space
- mbox.accept strategy
- end
- strategy.meta ';'
- strategy.lwsp ''
- end
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb
deleted file mode 100644
index 4d8d106a..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require 'stringio'
-
-module TMail
- class Attachment < StringIO
- attr_accessor :original_filename, :content_type
- end
-
- class Mail
- def has_attachments?
- multipart? && parts.any? { |part| attachment?(part) }
- end
-
- def attachment?(part)
- (part['content-disposition'] && part['content-disposition'].disposition == "attachment") ||
- part.header['content-type'].main_type != "text"
- end
-
- def attachments
- if multipart?
- parts.collect { |part|
- if attachment?(part)
- content = part.body # unquoted automatically by TMail#body
- file_name = (part['content-location'] &&
- part['content-location'].body) ||
- part.sub_header("content-type", "name") ||
- part.sub_header("content-disposition", "filename")
-
- next if file_name.blank? || content.blank?
-
- attachment = Attachment.new(content)
- attachment.original_filename = file_name.strip
- attachment.content_type = part.content_type
- attachment
- end
- }.compact
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb
deleted file mode 100755
index 8f89a489..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# base64.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-module TMail
-
- module Base64
-
- module_function
-
- def rb_folding_encode( str, eol = "\n", limit = 60 )
- [str].pack('m')
- end
-
- def rb_encode( str )
- [str].pack('m').tr( "\r\n", '' )
- end
-
- def rb_decode( str, strict = false )
- str.unpack('m')
- end
-
- begin
- require 'tmail/base64.so'
- alias folding_encode c_folding_encode
- alias encode c_encode
- alias decode c_decode
- class << self
- alias folding_encode c_folding_encode
- alias encode c_encode
- alias decode c_decode
- end
- rescue LoadError
- alias folding_encode rb_folding_encode
- alias encode rb_encode
- alias decode rb_decode
- class << self
- alias folding_encode rb_folding_encode
- alias encode rb_encode
- alias decode rb_decode
- end
- end
-
- end
-
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb
deleted file mode 100755
index b075299b..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# config.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-module TMail
-
- class Config
-
- def initialize( strict )
- @strict_parse = strict
- @strict_base64decode = strict
- end
-
- def strict_parse?
- @strict_parse
- end
-
- attr_writer :strict_parse
-
- def strict_base64decode?
- @strict_base64decode
- end
-
- attr_writer :strict_base64decode
-
- def new_body_port( mail )
- StringPort.new
- end
-
- alias new_preamble_port new_body_port
- alias new_part_port new_body_port
-
- end
-
- DEFAULT_CONFIG = Config.new(false)
- DEFAULT_STRICT_CONFIG = Config.new(true)
-
- def Config.to_config( arg )
- return DEFAULT_STRICT_CONFIG if arg == true
- return DEFAULT_CONFIG if arg == false
- arg or DEFAULT_CONFIG
- end
-
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb
deleted file mode 100755
index 91bd289c..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb
+++ /dev/null
@@ -1,467 +0,0 @@
-#
-# encode.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'nkf'
-require 'tmail/base64.rb'
-require 'tmail/stringio'
-require 'tmail/utils'
-
-
-module TMail
-
- module StrategyInterface
-
- def create_dest( obj )
- case obj
- when nil
- StringOutput.new
- when String
- StringOutput.new(obj)
- when IO, StringOutput
- obj
- else
- raise TypeError, 'cannot handle this type of object for dest'
- end
- end
- module_function :create_dest
-
- def encoded( eol = "\r\n", charset = 'j', dest = nil )
- accept_strategy Encoder, eol, charset, dest
- end
-
- def decoded( eol = "\n", charset = 'e', dest = nil )
- accept_strategy Decoder, eol, charset, dest
- end
-
- alias to_s decoded
-
- def accept_strategy( klass, eol, charset, dest = nil )
- dest ||= ''
- accept klass.new(create_dest(dest), charset, eol)
- dest
- end
-
- end
-
-
- ###
- ### MIME B encoding decoder
- ###
-
- class Decoder
-
- include TextUtils
-
- encoded = '=\?(?:iso-2022-jp|euc-jp|shift_jis)\?[QB]\?[a-z0-9+/=]+\?='
- ENCODED_WORDS = /#{encoded}(?:\s+#{encoded})*/i
-
- OUTPUT_ENCODING = {
- 'EUC' => 'e',
- 'SJIS' => 's',
- }
-
- def self.decode( str, encoding = nil )
- encoding ||= (OUTPUT_ENCODING[$KCODE] || 'j')
- opt = '-m' + encoding
- str.gsub(ENCODED_WORDS) {|s| NKF.nkf(opt, s) }
- end
-
- def initialize( dest, encoding = nil, eol = "\n" )
- @f = StrategyInterface.create_dest(dest)
- @encoding = (/\A[ejs]/ === encoding) ? encoding[0,1] : nil
- @eol = eol
- end
-
- def decode( str )
- self.class.decode(str, @encoding)
- end
- private :decode
-
- def terminate
- end
-
- def header_line( str )
- @f << decode(str)
- end
-
- def header_name( nm )
- @f << nm << ': '
- end
-
- def header_body( str )
- @f << decode(str)
- end
-
- def space
- @f << ' '
- end
-
- alias spc space
-
- def lwsp( str )
- @f << str
- end
-
- def meta( str )
- @f << str
- end
-
- def text( str )
- @f << decode(str)
- end
-
- def phrase( str )
- @f << quote_phrase(decode(str))
- end
-
- def kv_pair( k, v )
- @f << k << '=' << v
- end
-
- def puts( str = nil )
- @f << str if str
- @f << @eol
- end
-
- def write( str )
- @f << str
- end
-
- end
-
-
- ###
- ### MIME B-encoding encoder
- ###
-
- #
- # FIXME: This class can handle only (euc-jp/shift_jis -> iso-2022-jp).
- #
- class Encoder
-
- include TextUtils
-
- BENCODE_DEBUG = false unless defined?(BENCODE_DEBUG)
-
- def Encoder.encode( str )
- e = new()
- e.header_body str
- e.terminate
- e.dest.string
- end
-
- SPACER = "\t"
- MAX_LINE_LEN = 70
-
- OPTIONS = {
- 'EUC' => '-Ej -m0',
- 'SJIS' => '-Sj -m0',
- 'UTF8' => nil, # FIXME
- 'NONE' => nil
- }
-
- def initialize( dest = nil, encoding = nil, eol = "\r\n", limit = nil )
- @f = StrategyInterface.create_dest(dest)
- @opt = OPTIONS[$KCODE]
- @eol = eol
- reset
- end
-
- def normalize_encoding( str )
- if @opt
- then NKF.nkf(@opt, str)
- else str
- end
- end
-
- def reset
- @text = ''
- @lwsp = ''
- @curlen = 0
- end
-
- def terminate
- add_lwsp ''
- reset
- end
-
- def dest
- @f
- end
-
- def puts( str = nil )
- @f << str if str
- @f << @eol
- end
-
- def write( str )
- @f << str
- end
-
- #
- # add
- #
-
- def header_line( line )
- scanadd line
- end
-
- def header_name( name )
- add_text name.split(/-/).map {|i| i.capitalize }.join('-')
- add_text ':'
- add_lwsp ' '
- end
-
- def header_body( str )
- scanadd normalize_encoding(str)
- end
-
- def space
- add_lwsp ' '
- end
-
- alias spc space
-
- def lwsp( str )
- add_lwsp str.sub(/[\r\n]+[^\r\n]*\z/, '')
- end
-
- def meta( str )
- add_text str
- end
-
- def text( str )
- scanadd normalize_encoding(str)
- end
-
- def phrase( str )
- str = normalize_encoding(str)
- if CONTROL_CHAR === str
- scanadd str
- else
- add_text quote_phrase(str)
- end
- end
-
- # FIXME: implement line folding
- #
- def kv_pair( k, v )
- return if v.nil?
- v = normalize_encoding(v)
- if token_safe?(v)
- add_text k + '=' + v
- elsif not CONTROL_CHAR === v
- add_text k + '=' + quote_token(v)
- else
- # apply RFC2231 encoding
- kv = k + '*=' + "iso-2022-jp'ja'" + encode_value(v)
- add_text kv
- end
- end
-
- def encode_value( str )
- str.gsub(TOKEN_UNSAFE) {|s| '%%%02x' % s[0] }
- end
-
- private
-
- def scanadd( str, force = false )
- types = ''
- strs = []
-
- until str.empty?
- if m = /\A[^\e\t\r\n ]+/.match(str)
- types << (force ? 'j' : 'a')
- strs.push m[0]
-
- elsif m = /\A[\t\r\n ]+/.match(str)
- types << 's'
- strs.push m[0]
-
- elsif m = /\A\e../.match(str)
- esc = m[0]
- str = m.post_match
- if esc != "\e(B" and m = /\A[^\e]+/.match(str)
- types << 'j'
- strs.push m[0]
- end
-
- else
- raise 'TMail FATAL: encoder scan fail'
- end
- (str = m.post_match) unless m.nil?
- end
-
- do_encode types, strs
- end
-
- def do_encode( types, strs )
- #
- # result : (A|E)(S(A|E))*
- # E : W(SW)*
- # W : (J|A)+ but must contain J # (J|A)*J(J|A)*
- # A : <>
- # J : < >
- # S : <>
- #
- # An encoding unit is `E'.
- # Input (parameter `types') is (J|A)(J|A|S)*(J|A)
- #
- if BENCODE_DEBUG
- puts
- puts '-- do_encode ------------'
- puts types.split(//).join(' ')
- p strs
- end
-
- e = /[ja]*j[ja]*(?:s[ja]*j[ja]*)*/
-
- while m = e.match(types)
- pre = m.pre_match
- concat_A_S pre, strs[0, pre.size] unless pre.empty?
- concat_E m[0], strs[m.begin(0) ... m.end(0)]
- types = m.post_match
- strs.slice! 0, m.end(0)
- end
- concat_A_S types, strs
- end
-
- def concat_A_S( types, strs )
- i = 0
- types.each_byte do |t|
- case t
- when ?a then add_text strs[i]
- when ?s then add_lwsp strs[i]
- else
- raise "TMail FATAL: unknown flag: #{t.chr}"
- end
- i += 1
- end
- end
-
- METHOD_ID = {
- ?j => :extract_J,
- ?e => :extract_E,
- ?a => :extract_A,
- ?s => :extract_S
- }
-
- def concat_E( types, strs )
- if BENCODE_DEBUG
- puts '---- concat_E'
- puts "types=#{types.split(//).join(' ')}"
- puts "strs =#{strs.inspect}"
- end
-
- flush() unless @text.empty?
-
- chunk = ''
- strs.each_with_index do |s,i|
- mid = METHOD_ID[types[i]]
- until s.empty?
- unless c = __send__(mid, chunk.size, s)
- add_with_encode chunk unless chunk.empty?
- flush
- chunk = ''
- fold
- c = __send__(mid, 0, s)
- raise 'TMail FATAL: extract fail' unless c
- end
- chunk << c
- end
- end
- add_with_encode chunk unless chunk.empty?
- end
-
- def extract_J( chunksize, str )
- size = max_bytes(chunksize, str.size) - 6
- size = (size % 2 == 0) ? (size) : (size - 1)
- return nil if size <= 0
- "\e$B#{str.slice!(0, size)}\e(B"
- end
-
- def extract_A( chunksize, str )
- size = max_bytes(chunksize, str.size)
- return nil if size <= 0
- str.slice!(0, size)
- end
-
- alias extract_S extract_A
-
- def max_bytes( chunksize, ssize )
- (restsize() - '=?iso-2022-jp?B??='.size) / 4 * 3 - chunksize
- end
-
- #
- # free length buffer
- #
-
- def add_text( str )
- @text << str
- # puts '---- text -------------------------------------'
- # puts "+ #{str.inspect}"
- # puts "txt >>>#{@text.inspect}<<<"
- end
-
- def add_with_encode( str )
- @text << "=?iso-2022-jp?B?#{Base64.encode(str)}?="
- end
-
- def add_lwsp( lwsp )
- # puts '---- lwsp -------------------------------------'
- # puts "+ #{lwsp.inspect}"
- fold if restsize() <= 0
- flush
- @lwsp = lwsp
- end
-
- def flush
- # puts '---- flush ----'
- # puts "spc >>>#{@lwsp.inspect}<<<"
- # puts "txt >>>#{@text.inspect}<<<"
- @f << @lwsp << @text
- @curlen += (@lwsp.size + @text.size)
- @text = ''
- @lwsp = ''
- end
-
- def fold
- # puts '---- fold ----'
- @f << @eol
- @curlen = 0
- @lwsp = SPACER
- end
-
- def restsize
- MAX_LINE_LEN - (@curlen + @lwsp.size + @text.size)
- end
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/facade.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
deleted file mode 100755
index 1ecd64bf..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/facade.rb
+++ /dev/null
@@ -1,552 +0,0 @@
-#
-# facade.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/utils'
-
-
-module TMail
-
- class Mail
-
- def header_string( name, default = nil )
- h = @header[name.downcase] or return default
- h.to_s
- end
-
- ###
- ### attributes
- ###
-
- include TextUtils
-
- def set_string_array_attr( key, strs )
- strs.flatten!
- if strs.empty?
- @header.delete key.downcase
- else
- store key, strs.join(', ')
- end
- strs
- end
- private :set_string_array_attr
-
- def set_string_attr( key, str )
- if str
- store key, str
- else
- @header.delete key.downcase
- end
- str
- end
- private :set_string_attr
-
- def set_addrfield( name, arg )
- if arg
- h = HeaderField.internal_new(name, @config)
- h.addrs.replace [arg].flatten
- @header[name] = h
- else
- @header.delete name
- end
- arg
- end
- private :set_addrfield
-
- def addrs2specs( addrs )
- return nil unless addrs
- list = addrs.map {|addr|
- if addr.address_group?
- then addr.map {|a| a.spec }
- else addr.spec
- end
- }.flatten
- return nil if list.empty?
- list
- end
- private :addrs2specs
-
-
- #
- # date time
- #
-
- def date( default = nil )
- if h = @header['date']
- h.date
- else
- default
- end
- end
-
- def date=( time )
- if time
- store 'Date', time2str(time)
- else
- @header.delete 'date'
- end
- time
- end
-
- def strftime( fmt, default = nil )
- if t = date
- t.strftime(fmt)
- else
- default
- end
- end
-
-
- #
- # destination
- #
-
- def to_addrs( default = nil )
- if h = @header['to']
- h.addrs
- else
- default
- end
- end
-
- def cc_addrs( default = nil )
- if h = @header['cc']
- h.addrs
- else
- default
- end
- end
-
- def bcc_addrs( default = nil )
- if h = @header['bcc']
- h.addrs
- else
- default
- end
- end
-
- def to_addrs=( arg )
- set_addrfield 'to', arg
- end
-
- def cc_addrs=( arg )
- set_addrfield 'cc', arg
- end
-
- def bcc_addrs=( arg )
- set_addrfield 'bcc', arg
- end
-
- def to( default = nil )
- addrs2specs(to_addrs(nil)) || default
- end
-
- def cc( default = nil )
- addrs2specs(cc_addrs(nil)) || default
- end
-
- def bcc( default = nil )
- addrs2specs(bcc_addrs(nil)) || default
- end
-
- def to=( *strs )
- set_string_array_attr 'To', strs
- end
-
- def cc=( *strs )
- set_string_array_attr 'Cc', strs
- end
-
- def bcc=( *strs )
- set_string_array_attr 'Bcc', strs
- end
-
-
- #
- # originator
- #
-
- def from_addrs( default = nil )
- if h = @header['from']
- h.addrs
- else
- default
- end
- end
-
- def from_addrs=( arg )
- set_addrfield 'from', arg
- end
-
- def from( default = nil )
- addrs2specs(from_addrs(nil)) || default
- end
-
- def from=( *strs )
- set_string_array_attr 'From', strs
- end
-
- def friendly_from( default = nil )
- h = @header['from']
- a, = h.addrs
- return default unless a
- return a.phrase if a.phrase
- return h.comments.join(' ') unless h.comments.empty?
- a.spec
- end
-
-
- def reply_to_addrs( default = nil )
- if h = @header['reply-to']
- h.addrs
- else
- default
- end
- end
-
- def reply_to_addrs=( arg )
- set_addrfield 'reply-to', arg
- end
-
- def reply_to( default = nil )
- addrs2specs(reply_to_addrs(nil)) || default
- end
-
- def reply_to=( *strs )
- set_string_array_attr 'Reply-To', strs
- end
-
-
- def sender_addr( default = nil )
- f = @header['sender'] or return default
- f.addr or return default
- end
-
- def sender_addr=( addr )
- if addr
- h = HeaderField.internal_new('sender', @config)
- h.addr = addr
- @header['sender'] = h
- else
- @header.delete 'sender'
- end
- addr
- end
-
- def sender( default )
- f = @header['sender'] or return default
- a = f.addr or return default
- a.spec
- end
-
- def sender=( str )
- set_string_attr 'Sender', str
- end
-
-
- #
- # subject
- #
-
- def subject( default = nil )
- if h = @header['subject']
- h.body
- else
- default
- end
- end
- alias quoted_subject subject
-
- def subject=( str )
- set_string_attr 'Subject', str
- end
-
-
- #
- # identity & threading
- #
-
- def message_id( default = nil )
- if h = @header['message-id']
- h.id || default
- else
- default
- end
- end
-
- def message_id=( str )
- set_string_attr 'Message-Id', str
- end
-
- def in_reply_to( default = nil )
- if h = @header['in-reply-to']
- h.ids
- else
- default
- end
- end
-
- def in_reply_to=( *idstrs )
- set_string_array_attr 'In-Reply-To', idstrs
- end
-
- def references( default = nil )
- if h = @header['references']
- h.refs
- else
- default
- end
- end
-
- def references=( *strs )
- set_string_array_attr 'References', strs
- end
-
-
- #
- # MIME headers
- #
-
- def mime_version( default = nil )
- if h = @header['mime-version']
- h.version || default
- else
- default
- end
- end
-
- def mime_version=( m, opt = nil )
- if opt
- if h = @header['mime-version']
- h.major = m
- h.minor = opt
- else
- store 'Mime-Version', "#{m}.#{opt}"
- end
- else
- store 'Mime-Version', m
- end
- m
- end
-
-
- def content_type( default = nil )
- if h = @header['content-type']
- h.content_type || default
- else
- default
- end
- end
-
- def main_type( default = nil )
- if h = @header['content-type']
- h.main_type || default
- else
- default
- end
- end
-
- def sub_type( default = nil )
- if h = @header['content-type']
- h.sub_type || default
- else
- default
- end
- end
-
- def set_content_type( str, sub = nil, param = nil )
- if sub
- main, sub = str, sub
- else
- main, sub = str.split(%r>, 2)
- raise ArgumentError, "sub type missing: #{str.inspect}" unless sub
- end
- if h = @header['content-type']
- h.main_type = main
- h.sub_type = sub
- h.params.clear
- else
- store 'Content-Type', "#{main}/#{sub}"
- end
- @header['content-type'].params.replace param if param
-
- str
- end
-
- alias content_type= set_content_type
-
- def type_param( name, default = nil )
- if h = @header['content-type']
- h[name] || default
- else
- default
- end
- end
-
- def charset( default = nil )
- if h = @header['content-type']
- h['charset'] or default
- else
- default
- end
- end
-
- def charset=( str )
- if str
- if h = @header[ 'content-type' ]
- h['charset'] = str
- else
- store 'Content-Type', "text/plain; charset=#{str}"
- end
- end
- str
- end
-
-
- def transfer_encoding( default = nil )
- if h = @header['content-transfer-encoding']
- h.encoding || default
- else
- default
- end
- end
-
- def transfer_encoding=( str )
- set_string_attr 'Content-Transfer-Encoding', str
- end
-
- alias encoding transfer_encoding
- alias encoding= transfer_encoding=
- alias content_transfer_encoding transfer_encoding
- alias content_transfer_encoding= transfer_encoding=
-
-
- def disposition( default = nil )
- if h = @header['content-disposition']
- h.disposition || default
- else
- default
- end
- end
-
- alias content_disposition disposition
-
- def set_disposition( str, params = nil )
- if h = @header['content-disposition']
- h.disposition = str
- h.params.clear
- else
- store('Content-Disposition', str)
- h = @header['content-disposition']
- end
- h.params.replace params if params
- end
-
- alias disposition= set_disposition
- alias set_content_disposition set_disposition
- alias content_disposition= set_disposition
-
- def disposition_param( name, default = nil )
- if h = @header['content-disposition']
- h[name] || default
- else
- default
- end
- end
-
- ###
- ### utils
- ###
-
- def create_reply
- mail = TMail::Mail.parse('')
- mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '')
- mail.to_addrs = reply_addresses([])
- mail.in_reply_to = [message_id(nil)].compact
- mail.references = references([]) + [message_id(nil)].compact
- mail.mime_version = '1.0'
- mail
- end
-
-
- def base64_encode
- store 'Content-Transfer-Encoding', 'Base64'
- self.body = Base64.folding_encode(self.body)
- end
-
- def base64_decode
- if /base64/i === self.transfer_encoding('')
- store 'Content-Transfer-Encoding', '8bit'
- self.body = Base64.decode(self.body, @config.strict_base64decode?)
- end
- end
-
-
- def destinations( default = nil )
- ret = []
- %w( to cc bcc ).each do |nm|
- if h = @header[nm]
- h.addrs.each {|i| ret.push i.address }
- end
- end
- ret.empty? ? default : ret
- end
-
- def each_destination( &block )
- destinations([]).each do |i|
- if Address === i
- yield i
- else
- i.each(&block)
- end
- end
- end
-
- alias each_dest each_destination
-
-
- def reply_addresses( default = nil )
- reply_to_addrs(nil) or from_addrs(nil) or default
- end
-
- def error_reply_addresses( default = nil )
- if s = sender(nil)
- [s]
- else
- from_addrs(default)
- end
- end
-
-
- def multipart?
- main_type('').downcase == 'multipart'
- end
-
- end # class Mail
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb
deleted file mode 100755
index be97803d..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb
+++ /dev/null
@@ -1,914 +0,0 @@
-#
-# header.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/encode'
-require 'tmail/address'
-require 'tmail/parser'
-require 'tmail/config'
-require 'tmail/utils'
-
-
-module TMail
-
- class HeaderField
-
- include TextUtils
-
- class << self
-
- alias newobj new
-
- def new( name, body, conf = DEFAULT_CONFIG )
- klass = FNAME_TO_CLASS[name.downcase] || UnstructuredHeader
- klass.newobj body, conf
- end
-
- def new_from_port( port, name, conf = DEFAULT_CONFIG )
- re = Regep.new('\A(' + Regexp.quote(name) + '):', 'i')
- str = nil
- port.ropen {|f|
- f.each do |line|
- if m = re.match(line) then str = m.post_match.strip
- elsif str and /\A[\t ]/ === line then str << ' ' << line.strip
- elsif /\A-*\s*\z/ === line then break
- elsif str then break
- end
- end
- }
- new(name, str, Config.to_config(conf))
- end
-
- def internal_new( name, conf )
- FNAME_TO_CLASS[name].newobj('', conf, true)
- end
-
- end # class << self
-
- def initialize( body, conf, intern = false )
- @body = body
- @config = conf
-
- @illegal = false
- @parsed = false
- if intern
- @parsed = true
- parse_init
- end
- end
-
- def inspect
- "#<#{self.class} #{@body.inspect}>"
- end
-
- def illegal?
- @illegal
- end
-
- def empty?
- ensure_parsed
- return true if @illegal
- isempty?
- end
-
- private
-
- def ensure_parsed
- return if @parsed
- @parsed = true
- parse
- end
-
- # defabstract parse
- # end
-
- def clear_parse_status
- @parsed = false
- @illegal = false
- end
-
- public
-
- def body
- ensure_parsed
- v = Decoder.new(s = '')
- do_accept v
- v.terminate
- s
- end
-
- def body=( str )
- @body = str
- clear_parse_status
- end
-
- include StrategyInterface
-
- def accept( strategy, dummy1 = nil, dummy2 = nil )
- ensure_parsed
- do_accept strategy
- strategy.terminate
- end
-
- # abstract do_accept
-
- end
-
-
- class UnstructuredHeader < HeaderField
-
- def body
- ensure_parsed
- @body
- end
-
- def body=( arg )
- ensure_parsed
- @body = arg
- end
-
- private
-
- def parse_init
- end
-
- def parse
- @body = Decoder.decode(@body.gsub(/\n|\r\n|\r/, ''))
- end
-
- def isempty?
- not @body
- end
-
- def do_accept( strategy )
- strategy.text @body
- end
-
- end
-
-
- class StructuredHeader < HeaderField
-
- def comments
- ensure_parsed
- @comments
- end
-
- private
-
- def parse
- save = nil
-
- begin
- parse_init
- do_parse
- rescue SyntaxError
- if not save and mime_encoded? @body
- save = @body
- @body = Decoder.decode(save)
- retry
- elsif save
- @body = save
- end
-
- @illegal = true
- raise if @config.strict_parse?
- end
- end
-
- def parse_init
- @comments = []
- init
- end
-
- def do_parse
- obj = Parser.parse(self.class::PARSE_TYPE, @body, @comments)
- set obj if obj
- end
-
- end
-
-
- class DateTimeHeader < StructuredHeader
-
- PARSE_TYPE = :DATETIME
-
- def date
- ensure_parsed
- @date
- end
-
- def date=( arg )
- ensure_parsed
- @date = arg
- end
-
- private
-
- def init
- @date = nil
- end
-
- def set( t )
- @date = t
- end
-
- def isempty?
- not @date
- end
-
- def do_accept( strategy )
- strategy.meta time2str(@date)
- end
-
- end
-
-
- class AddressHeader < StructuredHeader
-
- PARSE_TYPE = :MADDRESS
-
- def addrs
- ensure_parsed
- @addrs
- end
-
- private
-
- def init
- @addrs = []
- end
-
- def set( a )
- @addrs = a
- end
-
- def isempty?
- @addrs.empty?
- end
-
- def do_accept( strategy )
- first = true
- @addrs.each do |a|
- if first
- first = false
- else
- strategy.meta ','
- strategy.space
- end
- a.accept strategy
- end
-
- @comments.each do |c|
- strategy.space
- strategy.meta '('
- strategy.text c
- strategy.meta ')'
- end
- end
-
- end
-
-
- class ReturnPathHeader < AddressHeader
-
- PARSE_TYPE = :RETPATH
-
- def addr
- addrs()[0]
- end
-
- def spec
- a = addr() or return nil
- a.spec
- end
-
- def routes
- a = addr() or return nil
- a.routes
- end
-
- private
-
- def do_accept( strategy )
- a = addr()
-
- strategy.meta '<'
- unless a.routes.empty?
- strategy.meta a.routes.map {|i| '@' + i }.join(',')
- strategy.meta ':'
- end
- spec = a.spec
- strategy.meta spec if spec
- strategy.meta '>'
- end
-
- end
-
-
- class SingleAddressHeader < AddressHeader
-
- def addr
- addrs()[0]
- end
-
- private
-
- def do_accept( strategy )
- a = addr()
- a.accept strategy
- @comments.each do |c|
- strategy.space
- strategy.meta '('
- strategy.text c
- strategy.meta ')'
- end
- end
-
- end
-
-
- class MessageIdHeader < StructuredHeader
-
- def id
- ensure_parsed
- @id
- end
-
- def id=( arg )
- ensure_parsed
- @id = arg
- end
-
- private
-
- def init
- @id = nil
- end
-
- def isempty?
- not @id
- end
-
- def do_parse
- @id = @body.slice(MESSAGE_ID) or
- raise SyntaxError, "wrong Message-ID format: #{@body}"
- end
-
- def do_accept( strategy )
- strategy.meta @id
- end
-
- end
-
-
- class ReferencesHeader < StructuredHeader
-
- def refs
- ensure_parsed
- @refs
- end
-
- def each_id
- self.refs.each do |i|
- yield i if MESSAGE_ID === i
- end
- end
-
- def ids
- ensure_parsed
- @ids
- end
-
- def each_phrase
- self.refs.each do |i|
- yield i unless MESSAGE_ID === i
- end
- end
-
- def phrases
- ret = []
- each_phrase {|i| ret.push i }
- ret
- end
-
- private
-
- def init
- @refs = []
- @ids = []
- end
-
- def isempty?
- @ids.empty?
- end
-
- def do_parse
- str = @body
- while m = MESSAGE_ID.match(str)
- pre = m.pre_match.strip
- @refs.push pre unless pre.empty?
- @refs.push s = m[0]
- @ids.push s
- str = m.post_match
- end
- str = str.strip
- @refs.push str unless str.empty?
- end
-
- def do_accept( strategy )
- first = true
- @ids.each do |i|
- if first
- first = false
- else
- strategy.space
- end
- strategy.meta i
- end
- end
-
- end
-
-
- class ReceivedHeader < StructuredHeader
-
- PARSE_TYPE = :RECEIVED
-
- def from
- ensure_parsed
- @from
- end
-
- def from=( arg )
- ensure_parsed
- @from = arg
- end
-
- def by
- ensure_parsed
- @by
- end
-
- def by=( arg )
- ensure_parsed
- @by = arg
- end
-
- def via
- ensure_parsed
- @via
- end
-
- def via=( arg )
- ensure_parsed
- @via = arg
- end
-
- def with
- ensure_parsed
- @with
- end
-
- def id
- ensure_parsed
- @id
- end
-
- def id=( arg )
- ensure_parsed
- @id = arg
- end
-
- def _for
- ensure_parsed
- @_for
- end
-
- def _for=( arg )
- ensure_parsed
- @_for = arg
- end
-
- def date
- ensure_parsed
- @date
- end
-
- def date=( arg )
- ensure_parsed
- @date = arg
- end
-
- private
-
- def init
- @from = @by = @via = @with = @id = @_for = nil
- @with = []
- @date = nil
- end
-
- def set( args )
- @from, @by, @via, @with, @id, @_for, @date = *args
- end
-
- def isempty?
- @with.empty? and not (@from or @by or @via or @id or @_for or @date)
- end
-
- def do_accept( strategy )
- list = []
- list.push 'from ' + @from if @from
- list.push 'by ' + @by if @by
- list.push 'via ' + @via if @via
- @with.each do |i|
- list.push 'with ' + i
- end
- list.push 'id ' + @id if @id
- list.push 'for <' + @_for + '>' if @_for
-
- first = true
- list.each do |i|
- strategy.space unless first
- strategy.meta i
- first = false
- end
- if @date
- strategy.meta ';'
- strategy.space
- strategy.meta time2str(@date)
- end
- end
-
- end
-
-
- class KeywordsHeader < StructuredHeader
-
- PARSE_TYPE = :KEYWORDS
-
- def keys
- ensure_parsed
- @keys
- end
-
- private
-
- def init
- @keys = []
- end
-
- def set( a )
- @keys = a
- end
-
- def isempty?
- @keys.empty?
- end
-
- def do_accept( strategy )
- first = true
- @keys.each do |i|
- if first
- first = false
- else
- strategy.meta ','
- end
- strategy.meta i
- end
- end
-
- end
-
-
- class EncryptedHeader < StructuredHeader
-
- PARSE_TYPE = :ENCRYPTED
-
- def encrypter
- ensure_parsed
- @encrypter
- end
-
- def encrypter=( arg )
- ensure_parsed
- @encrypter = arg
- end
-
- def keyword
- ensure_parsed
- @keyword
- end
-
- def keyword=( arg )
- ensure_parsed
- @keyword = arg
- end
-
- private
-
- def init
- @encrypter = nil
- @keyword = nil
- end
-
- def set( args )
- @encrypter, @keyword = args
- end
-
- def isempty?
- not (@encrypter or @keyword)
- end
-
- def do_accept( strategy )
- if @key
- strategy.meta @encrypter + ','
- strategy.space
- strategy.meta @keyword
- else
- strategy.meta @encrypter
- end
- end
-
- end
-
-
- class MimeVersionHeader < StructuredHeader
-
- PARSE_TYPE = :MIMEVERSION
-
- def major
- ensure_parsed
- @major
- end
-
- def major=( arg )
- ensure_parsed
- @major = arg
- end
-
- def minor
- ensure_parsed
- @minor
- end
-
- def minor=( arg )
- ensure_parsed
- @minor = arg
- end
-
- def version
- sprintf('%d.%d', major, minor)
- end
-
- private
-
- def init
- @major = nil
- @minor = nil
- end
-
- def set( args )
- @major, @minor = *args
- end
-
- def isempty?
- not (@major or @minor)
- end
-
- def do_accept( strategy )
- strategy.meta sprintf('%d.%d', @major, @minor)
- end
-
- end
-
-
- class ContentTypeHeader < StructuredHeader
-
- PARSE_TYPE = :CTYPE
-
- def main_type
- ensure_parsed
- @main
- end
-
- def main_type=( arg )
- ensure_parsed
- @main = arg.downcase
- end
-
- def sub_type
- ensure_parsed
- @sub
- end
-
- def sub_type=( arg )
- ensure_parsed
- @sub = arg.downcase
- end
-
- def content_type
- ensure_parsed
- @sub ? sprintf('%s/%s', @main, @sub) : @main
- end
-
- def params
- ensure_parsed
- @params
- end
-
- def []( key )
- ensure_parsed
- @params and @params[key]
- end
-
- def []=( key, val )
- ensure_parsed
- (@params ||= {})[key] = val
- end
-
- private
-
- def init
- @main = @sub = @params = nil
- end
-
- def set( args )
- @main, @sub, @params = *args
- end
-
- def isempty?
- not (@main or @sub)
- end
-
- def do_accept( strategy )
- if @sub
- strategy.meta sprintf('%s/%s', @main, @sub)
- else
- strategy.meta @main
- end
- @params.each do |k,v|
- if v
- strategy.meta ';'
- strategy.space
- strategy.kv_pair k, v
- end
- end
- end
-
- end
-
-
- class ContentTransferEncodingHeader < StructuredHeader
-
- PARSE_TYPE = :CENCODING
-
- def encoding
- ensure_parsed
- @encoding
- end
-
- def encoding=( arg )
- ensure_parsed
- @encoding = arg
- end
-
- private
-
- def init
- @encoding = nil
- end
-
- def set( s )
- @encoding = s
- end
-
- def isempty?
- not @encoding
- end
-
- def do_accept( strategy )
- strategy.meta @encoding.capitalize
- end
-
- end
-
-
- class ContentDispositionHeader < StructuredHeader
-
- PARSE_TYPE = :CDISPOSITION
-
- def disposition
- ensure_parsed
- @disposition
- end
-
- def disposition=( str )
- ensure_parsed
- @disposition = str.downcase
- end
-
- def params
- ensure_parsed
- @params
- end
-
- def []( key )
- ensure_parsed
- @params and @params[key]
- end
-
- def []=( key, val )
- ensure_parsed
- (@params ||= {})[key] = val
- end
-
- private
-
- def init
- @disposition = @params = nil
- end
-
- def set( args )
- @disposition, @params = *args
- end
-
- def isempty?
- not @disposition and (not @params or @params.empty?)
- end
-
- def do_accept( strategy )
- strategy.meta @disposition
- @params.each do |k,v|
- strategy.meta ';'
- strategy.space
- strategy.kv_pair k, v
- end
- end
-
- end
-
-
- class HeaderField # redefine
-
- FNAME_TO_CLASS = {
- 'date' => DateTimeHeader,
- 'resent-date' => DateTimeHeader,
- 'to' => AddressHeader,
- 'cc' => AddressHeader,
- 'bcc' => AddressHeader,
- 'from' => AddressHeader,
- 'reply-to' => AddressHeader,
- 'resent-to' => AddressHeader,
- 'resent-cc' => AddressHeader,
- 'resent-bcc' => AddressHeader,
- 'resent-from' => AddressHeader,
- 'resent-reply-to' => AddressHeader,
- 'sender' => SingleAddressHeader,
- 'resent-sender' => SingleAddressHeader,
- 'return-path' => ReturnPathHeader,
- 'message-id' => MessageIdHeader,
- 'resent-message-id' => MessageIdHeader,
- 'in-reply-to' => ReferencesHeader,
- 'received' => ReceivedHeader,
- 'references' => ReferencesHeader,
- 'keywords' => KeywordsHeader,
- 'encrypted' => EncryptedHeader,
- 'mime-version' => MimeVersionHeader,
- 'content-type' => ContentTypeHeader,
- 'content-transfer-encoding' => ContentTransferEncodingHeader,
- 'content-disposition' => ContentDispositionHeader,
- 'content-id' => MessageIdHeader,
- 'subject' => UnstructuredHeader,
- 'comments' => UnstructuredHeader,
- 'content-description' => UnstructuredHeader
- }
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/info.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/info.rb
deleted file mode 100755
index 5c115d58..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/info.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# info.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-module TMail
-
- Version = '0.10.7'
- Copyright = 'Copyright (c) 1998-2002 Minero Aoki'
-
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/loader.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/loader.rb
deleted file mode 100755
index 79073154..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/loader.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'tmail/mailbox'
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
deleted file mode 100755
index e11fa0f0..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
+++ /dev/null
@@ -1,447 +0,0 @@
-#
-# mail.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/facade'
-require 'tmail/encode'
-require 'tmail/header'
-require 'tmail/port'
-require 'tmail/config'
-require 'tmail/utils'
-require 'tmail/attachments'
-require 'tmail/quoting'
-require 'socket'
-
-
-module TMail
-
- class Mail
-
- class << self
- def load( fname )
- new(FilePort.new(fname))
- end
-
- alias load_from load
- alias loadfrom load
-
- def parse( str )
- new(StringPort.new(str))
- end
- end
-
- def initialize( port = nil, conf = DEFAULT_CONFIG )
- @port = port || StringPort.new
- @config = Config.to_config(conf)
-
- @header = {}
- @body_port = nil
- @body_parsed = false
- @epilogue = ''
- @parts = []
-
- @port.ropen {|f|
- parse_header f
- parse_body f unless @port.reproducible?
- }
- end
-
- attr_reader :port
-
- def inspect
- "\#<#{self.class} port=#{@port.inspect} bodyport=#{@body_port.inspect}>"
- end
-
- #
- # to_s interfaces
- #
-
- public
-
- include StrategyInterface
-
- def write_back( eol = "\n", charset = 'e' )
- parse_body
- @port.wopen {|stream| encoded eol, charset, stream }
- end
-
- def accept( strategy )
- with_multipart_encoding(strategy) {
- ordered_each do |name, field|
- next if field.empty?
- strategy.header_name canonical(name)
- field.accept strategy
- strategy.puts
- end
- strategy.puts
- body_port().ropen {|r|
- strategy.write r.read
- }
- }
- end
-
- private
-
- def canonical( name )
- name.split(/-/).map {|s| s.capitalize }.join('-')
- end
-
- def with_multipart_encoding( strategy )
- if parts().empty? # DO NOT USE @parts
- yield
-
- else
- bound = ::TMail.new_boundary
- if @header.key? 'content-type'
- @header['content-type'].params['boundary'] = bound
- else
- store 'Content-Type', %
- end
-
- yield
-
- parts().each do |tm|
- strategy.puts
- strategy.puts '--' + bound
- tm.accept strategy
- end
- strategy.puts
- strategy.puts '--' + bound + '--'
- strategy.write epilogue()
- end
- end
-
- ###
- ### header
- ###
-
- public
-
- ALLOW_MULTIPLE = {
- 'received' => true,
- 'resent-date' => true,
- 'resent-from' => true,
- 'resent-sender' => true,
- 'resent-to' => true,
- 'resent-cc' => true,
- 'resent-bcc' => true,
- 'resent-message-id' => true,
- 'comments' => true,
- 'keywords' => true
- }
- USE_ARRAY = ALLOW_MULTIPLE
-
- def header
- @header.dup
- end
-
- def []( key )
- @header[key.downcase]
- end
-
- def sub_header(key, param)
- (hdr = self[key]) ? hdr[param] : nil
- end
-
- alias fetch []
-
- def []=( key, val )
- dkey = key.downcase
-
- if val.nil?
- @header.delete dkey
- return nil
- end
-
- case val
- when String
- header = new_hf(key, val)
- when HeaderField
- ;
- when Array
- ALLOW_MULTIPLE.include? dkey or
- raise ArgumentError, "#{key}: Header must not be multiple"
- @header[dkey] = val
- return val
- else
- header = new_hf(key, val.to_s)
- end
- if ALLOW_MULTIPLE.include? dkey
- (@header[dkey] ||= []).push header
- else
- @header[dkey] = header
- end
-
- val
- end
-
- alias store []=
-
- def each_header
- @header.each do |key, val|
- [val].flatten.each {|v| yield key, v }
- end
- end
-
- alias each_pair each_header
-
- def each_header_name( &block )
- @header.each_key(&block)
- end
-
- alias each_key each_header_name
-
- def each_field( &block )
- @header.values.flatten.each(&block)
- end
-
- alias each_value each_field
-
- FIELD_ORDER = %w(
- return-path received
- resent-date resent-from resent-sender resent-to
- resent-cc resent-bcc resent-message-id
- date from sender reply-to to cc bcc
- message-id in-reply-to references
- subject comments keywords
- mime-version content-type content-transfer-encoding
- content-disposition content-description
- )
-
- def ordered_each
- list = @header.keys
- FIELD_ORDER.each do |name|
- if list.delete(name)
- [@header[name]].flatten.each {|v| yield name, v }
- end
- end
- list.each do |name|
- [@header[name]].flatten.each {|v| yield name, v }
- end
- end
-
- def clear
- @header.clear
- end
-
- def delete( key )
- @header.delete key.downcase
- end
-
- def delete_if
- @header.delete_if do |key,val|
- if Array === val
- val.delete_if {|v| yield key, v }
- val.empty?
- else
- yield key, val
- end
- end
- end
-
- def keys
- @header.keys
- end
-
- def key?( key )
- @header.key? key.downcase
- end
-
- def values_at( *args )
- args.map {|k| @header[k.downcase] }.flatten
- end
-
- alias indexes values_at
- alias indices values_at
-
- private
-
- def parse_header( f )
- name = field = nil
- unixfrom = nil
-
- while line = f.gets
- case line
- when /\A[ \t]/ # continue from prev line
- raise SyntaxError, 'mail is began by space' unless field
- field << ' ' << line.strip
-
- when /\A([^\: \t]+):\s*/ # new header line
- add_hf name, field if field
- name = $1
- field = $' #.strip
-
- when /\A\-*\s*\z/ # end of header
- add_hf name, field if field
- name = field = nil
- break
-
- when /\AFrom (\S+)/
- unixfrom = $1
-
- when /^charset=.*/
-
- else
- raise SyntaxError, "wrong mail header: '#{line.inspect}'"
- end
- end
- add_hf name, field if name
-
- if unixfrom
- add_hf 'Return-Path', "<#{unixfrom}>" unless @header['return-path']
- end
- end
-
- def add_hf( name, field )
- key = name.downcase
- field = new_hf(name, field)
-
- if ALLOW_MULTIPLE.include? key
- (@header[key] ||= []).push field
- else
- @header[key] = field
- end
- end
-
- def new_hf( name, field )
- HeaderField.new(name, field, @config)
- end
-
- ###
- ### body
- ###
-
- public
-
- def body_port
- parse_body
- @body_port
- end
-
- def each( &block )
- body_port().ropen {|f| f.each(&block) }
- end
-
- def quoted_body
- parse_body
- @body_port.ropen {|f|
- return f.read
- }
- end
-
- def body=( str )
- parse_body
- @body_port.wopen {|f| f.write str }
- str
- end
-
- alias preamble body
- alias preamble= body=
-
- def epilogue
- parse_body
- @epilogue.dup
- end
-
- def epilogue=( str )
- parse_body
- @epilogue = str
- str
- end
-
- def parts
- parse_body
- @parts
- end
-
- def each_part( &block )
- parts().each(&block)
- end
-
- private
-
- def parse_body( f = nil )
- return if @body_parsed
- if f
- parse_body_0 f
- else
- @port.ropen {|f|
- skip_header f
- parse_body_0 f
- }
- end
- @body_parsed = true
- end
-
- def skip_header( f )
- while line = f.gets
- return if /\A[\r\n]*\z/ === line
- end
- end
-
- def parse_body_0( f )
- if multipart?
- read_multipart f
- else
- @body_port = @config.new_body_port(self)
- @body_port.wopen {|w|
- w.write f.read
- }
- end
- end
-
- def read_multipart( src )
- bound = @header['content-type'].params['boundary']
- is_sep = /\A--#{Regexp.quote bound}(?:--)?[ \t]*(?:\n|\r\n|\r)/
- lastbound = "--#{bound}--"
-
- ports = [ @config.new_preamble_port(self) ]
- begin
- f = ports.last.wopen
- while line = src.gets
- if is_sep === line
- f.close
- break if line.strip == lastbound
- ports.push @config.new_part_port(self)
- f = ports.last.wopen
- else
- f << line
- end
- end
- @epilogue = (src.read || '')
- ensure
- f.close if f and not f.closed?
- end
-
- @body_port = ports.shift
- @parts = ports.map {|p| self.class.new(p, @config) }
- end
-
- end # class Mail
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb
deleted file mode 100755
index d85915ed..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb
+++ /dev/null
@@ -1,433 +0,0 @@
-#
-# mailbox.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/port'
-require 'socket'
-require 'mutex_m'
-
-
-unless [].respond_to?(:sort_by)
-module Enumerable#:nodoc:
- def sort_by
- map {|i| [yield(i), i] }.sort {|a,b| a.first <=> b.first }.map {|i| i[1] }
- end
-end
-end
-
-
-module TMail
-
- class MhMailbox
-
- PORT_CLASS = MhPort
-
- def initialize( dir )
- edir = File.expand_path(dir)
- raise ArgumentError, "not directory: #{dir}"\
- unless FileTest.directory? edir
- @dirname = edir
- @last_file = nil
- @last_atime = nil
- end
-
- def directory
- @dirname
- end
-
- alias dirname directory
-
- attr_accessor :last_atime
-
- def inspect
- "#<#{self.class} #{@dirname}>"
- end
-
- def close
- end
-
- def new_port
- PORT_CLASS.new(next_file_name())
- end
-
- def each_port
- mail_files().each do |path|
- yield PORT_CLASS.new(path)
- end
- @last_atime = Time.now
- end
-
- alias each each_port
-
- def reverse_each_port
- mail_files().reverse_each do |path|
- yield PORT_CLASS.new(path)
- end
- @last_atime = Time.now
- end
-
- alias reverse_each reverse_each_port
-
- # old #each_mail returns Port
- #def each_mail
- # each_port do |port|
- # yield Mail.new(port)
- # end
- #end
-
- def each_new_port( mtime = nil, &block )
- mtime ||= @last_atime
- return each_port(&block) unless mtime
- return unless File.mtime(@dirname) >= mtime
-
- mail_files().each do |path|
- yield PORT_CLASS.new(path) if File.mtime(path) > mtime
- end
- @last_atime = Time.now
- end
-
- private
-
- def mail_files
- Dir.entries(@dirname)\
- .select {|s| /\A\d+\z/ === s }\
- .map {|s| s.to_i }\
- .sort\
- .map {|i| "#{@dirname}/#{i}" }\
- .select {|path| FileTest.file? path }
- end
-
- def next_file_name
- unless n = @last_file
- n = 0
- Dir.entries(@dirname)\
- .select {|s| /\A\d+\z/ === s }\
- .map {|s| s.to_i }.sort\
- .each do |i|
- next unless FileTest.file? "#{@dirname}/#{i}"
- n = i
- end
- end
- begin
- n += 1
- end while FileTest.exist? "#{@dirname}/#{n}"
- @last_file = n
-
- "#{@dirname}/#{n}"
- end
-
- end # MhMailbox
-
- MhLoader = MhMailbox
-
-
- class UNIXMbox
-
- def UNIXMbox.lock( fname )
- begin
- f = File.open(fname)
- f.flock File::LOCK_EX
- yield f
- ensure
- f.flock File::LOCK_UN
- f.close if f and not f.closed?
- end
- end
-
- class << self
- alias newobj new
- end
-
- def UNIXMbox.new( fname, tmpdir = nil, readonly = false )
- tmpdir = ENV['TEMP'] || ENV['TMP'] || '/tmp'
- newobj(fname, "#{tmpdir}/ruby_tmail_#{$$}_#{rand()}", readonly, false)
- end
-
- def UNIXMbox.static_new( fname, dir, readonly = false )
- newobj(fname, dir, readonly, true)
- end
-
- def initialize( fname, mhdir, readonly, static )
- @filename = fname
- @readonly = readonly
- @closed = false
-
- Dir.mkdir mhdir
- @real = MhMailbox.new(mhdir)
- @finalizer = UNIXMbox.mkfinal(@real, @filename, !@readonly, !static)
- ObjectSpace.define_finalizer self, @finalizer
- end
-
- def UNIXMbox.mkfinal( mh, mboxfile, writeback_p, cleanup_p )
- lambda {
- if writeback_p
- lock(mboxfile) {|f|
- mh.each_port do |port|
- f.puts create_from_line(port)
- port.ropen {|r|
- f.puts r.read
- }
- end
- }
- end
- if cleanup_p
- Dir.foreach(mh.dirname) do |fname|
- next if /\A\.\.?\z/ === fname
- File.unlink "#{mh.dirname}/#{fname}"
- end
- Dir.rmdir mh.dirname
- end
- }
- end
-
- # make _From line
- def UNIXMbox.create_from_line( port )
- sprintf 'From %s %s',
- fromaddr(), TextUtils.time2str(File.mtime(port.filename))
- end
-
- def UNIXMbox.fromaddr
- h = HeaderField.new_from_port(port, 'Return-Path') ||
- HeaderField.new_from_port(port, 'From') or return 'nobody'
- a = h.addrs[0] or return 'nobody'
- a.spec
- end
- private_class_method :fromaddr
-
- def close
- return if @closed
-
- ObjectSpace.undefine_finalizer self
- @finalizer.call
- @finalizer = nil
- @real = nil
- @closed = true
- @updated = nil
- end
-
- def each_port( &block )
- close_check
- update
- @real.each_port(&block)
- end
-
- alias each each_port
-
- def reverse_each_port( &block )
- close_check
- update
- @real.reverse_each_port(&block)
- end
-
- alias reverse_each reverse_each_port
-
- # old #each_mail returns Port
- #def each_mail( &block )
- # each_port do |port|
- # yield Mail.new(port)
- # end
- #end
-
- def each_new_port( mtime = nil )
- close_check
- update
- @real.each_new_port(mtime) {|p| yield p }
- end
-
- def new_port
- close_check
- @real.new_port
- end
-
- private
-
- def close_check
- @closed and raise ArgumentError, 'accessing already closed mbox'
- end
-
- def update
- return if FileTest.zero?(@filename)
- return if @updated and File.mtime(@filename) < @updated
- w = nil
- port = nil
- time = nil
- UNIXMbox.lock(@filename) {|f|
- begin
- f.each do |line|
- if /\AFrom / === line
- w.close if w
- File.utime time, time, port.filename if time
-
- port = @real.new_port
- w = port.wopen
- time = fromline2time(line)
- else
- w.print line if w
- end
- end
- ensure
- if w and not w.closed?
- w.close
- File.utime time, time, port.filename if time
- end
- end
- f.truncate(0) unless @readonly
- @updated = Time.now
- }
- end
-
- def fromline2time( line )
- m = /\AFrom \S+ \w+ (\w+) (\d+) (\d+):(\d+):(\d+) (\d+)/.match(line) \
- or return nil
- Time.local(m[6].to_i, m[1], m[2].to_i, m[3].to_i, m[4].to_i, m[5].to_i)
- end
-
- end # UNIXMbox
-
- MboxLoader = UNIXMbox
-
-
- class Maildir
-
- extend Mutex_m
-
- PORT_CLASS = MaildirPort
-
- @seq = 0
- def Maildir.unique_number
- synchronize {
- @seq += 1
- return @seq
- }
- end
-
- def initialize( dir = nil )
- @dirname = dir || ENV['MAILDIR']
- raise ArgumentError, "not directory: #{@dirname}"\
- unless FileTest.directory? @dirname
- @new = "#{@dirname}/new"
- @tmp = "#{@dirname}/tmp"
- @cur = "#{@dirname}/cur"
- end
-
- def directory
- @dirname
- end
-
- def inspect
- "#<#{self.class} #{@dirname}>"
- end
-
- def close
- end
-
- def each_port
- mail_files(@cur).each do |path|
- yield PORT_CLASS.new(path)
- end
- end
-
- alias each each_port
-
- def reverse_each_port
- mail_files(@cur).reverse_each do |path|
- yield PORT_CLASS.new(path)
- end
- end
-
- alias reverse_each reverse_each_port
-
- def new_port
- fname = nil
- tmpfname = nil
- newfname = nil
-
- begin
- fname = "#{Time.now.to_i}.#{$$}_#{Maildir.unique_number}.#{Socket.gethostname}"
-
- tmpfname = "#{@tmp}/#{fname}"
- newfname = "#{@new}/#{fname}"
- end while FileTest.exist? tmpfname
-
- if block_given?
- File.open(tmpfname, 'w') {|f| yield f }
- File.rename tmpfname, newfname
- PORT_CLASS.new(newfname)
- else
- File.open(tmpfname, 'w') {|f| f.write "\n\n" }
- PORT_CLASS.new(tmpfname)
- end
- end
-
- def each_new_port
- mail_files(@new).each do |path|
- dest = @cur + '/' + File.basename(path)
- File.rename path, dest
- yield PORT_CLASS.new(dest)
- end
-
- check_tmp
- end
-
- TOO_OLD = 60 * 60 * 36 # 36 hour
-
- def check_tmp
- old = Time.now.to_i - TOO_OLD
-
- each_filename(@tmp) do |full, fname|
- if FileTest.file? full and
- File.stat(full).mtime.to_i < old
- File.unlink full
- end
- end
- end
-
- private
-
- def mail_files( dir )
- Dir.entries(dir)\
- .select {|s| s[0] != ?. }\
- .sort_by {|s| s.slice(/\A\d+/).to_i }\
- .map {|s| "#{dir}/#{s}" }\
- .select {|path| FileTest.file? path }
- end
-
- def each_filename( dir )
- Dir.foreach(dir) do |fname|
- path = "#{dir}/#{fname}"
- if fname[0] != ?. and FileTest.file? path
- yield path, fname
- end
- end
- end
-
- end # Maildir
-
- MaildirLoader = Maildir
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mbox.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mbox.rb
deleted file mode 100755
index 79073154..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mbox.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'tmail/mailbox'
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb
deleted file mode 100755
index f96cf64c..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb
+++ /dev/null
@@ -1,280 +0,0 @@
-#
-# net.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'nkf'
-
-
-module TMail
-
- class Mail
-
- def send_to( smtp )
- do_send_to(smtp) do
- ready_to_send
- end
- end
-
- def send_text_to( smtp )
- do_send_to(smtp) do
- ready_to_send
- mime_encode
- end
- end
-
- def do_send_to( smtp )
- from = from_address or raise ArgumentError, 'no from address'
- (dests = destinations).empty? and raise ArgumentError, 'no receipient'
- yield
- send_to_0 smtp, from, dests
- end
- private :do_send_to
-
- def send_to_0( smtp, from, to )
- smtp.ready(from, to) do |f|
- encoded "\r\n", 'j', f, ''
- end
- end
-
- def ready_to_send
- delete_no_send_fields
- add_message_id
- add_date
- end
-
- NOSEND_FIELDS = %w(
- received
- bcc
- )
-
- def delete_no_send_fields
- NOSEND_FIELDS.each do |nm|
- delete nm
- end
- delete_if {|n,v| v.empty? }
- end
-
- def add_message_id( fqdn = nil )
- self.message_id = ::TMail::new_message_id(fqdn)
- end
-
- def add_date
- self.date = Time.now
- end
-
- def mime_encode
- if parts.empty?
- mime_encode_singlepart
- else
- mime_encode_multipart true
- end
- end
-
- def mime_encode_singlepart
- self.mime_version = '1.0'
- b = body
- if NKF.guess(b) != NKF::BINARY
- mime_encode_text b
- else
- mime_encode_binary b
- end
- end
-
- def mime_encode_text( body )
- self.body = NKF.nkf('-j -m0', body)
- self.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'}
- self.encoding = '7bit'
- end
-
- def mime_encode_binary( body )
- self.body = [body].pack('m')
- self.set_content_type 'application', 'octet-stream'
- self.encoding = 'Base64'
- end
-
- def mime_encode_multipart( top = true )
- self.mime_version = '1.0' if top
- self.set_content_type 'multipart', 'mixed'
- e = encoding(nil)
- if e and not /\A(?:7bit|8bit|binary)\z/i === e
- raise ArgumentError,
- 'using C.T.Encoding with multipart mail is not permitted'
- end
- end
-
- def create_empty_mail
- self.class.new(StringPort.new(''), @config)
- end
-
- def create_reply
- setup_reply create_empty_mail()
- end
-
- def setup_reply( m )
- if tmp = reply_addresses(nil)
- m.to_addrs = tmp
- end
-
- mid = message_id(nil)
- tmp = references(nil) || []
- tmp.push mid if mid
- m.in_reply_to = [mid] if mid
- m.references = tmp unless tmp.empty?
- m.subject = 'Re: ' + subject('').sub(/\A(?:\s*re:)+/i, '')
-
- m
- end
-
- def create_forward
- setup_forward create_empty_mail()
- end
-
- def setup_forward( mail )
- m = Mail.new(StringPort.new(''))
- m.body = decoded
- m.set_content_type 'message', 'rfc822'
- m.encoding = encoding('7bit')
- mail.parts.push m
- end
-
- end
-
-
- class DeleteFields
-
- NOSEND_FIELDS = %w(
- received
- bcc
- )
-
- def initialize( nosend = nil, delempty = true )
- @no_send_fields = nosend || NOSEND_FIELDS.dup
- @delete_empty_fields = delempty
- end
-
- attr :no_send_fields
- attr :delete_empty_fields, true
-
- def exec( mail )
- @no_send_fields.each do |nm|
- delete nm
- end
- delete_if {|n,v| v.empty? } if @delete_empty_fields
- end
-
- end
-
-
- class AddMessageId
-
- def initialize( fqdn = nil )
- @fqdn = fqdn
- end
-
- attr :fqdn, true
-
- def exec( mail )
- mail.message_id = ::TMail::new_msgid(@fqdn)
- end
-
- end
-
-
- class AddDate
-
- def exec( mail )
- mail.date = Time.now
- end
-
- end
-
-
- class MimeEncodeAuto
-
- def initialize( s = nil, m = nil )
- @singlepart_composer = s || MimeEncodeSingle.new
- @multipart_composer = m || MimeEncodeMulti.new
- end
-
- attr :singlepart_composer
- attr :multipart_composer
-
- def exec( mail )
- if mail._builtin_multipart?
- then @multipart_composer
- else @singlepart_composer end.exec mail
- end
-
- end
-
-
- class MimeEncodeSingle
-
- def exec( mail )
- mail.mime_version = '1.0'
- b = mail.body
- if NKF.guess(b) != NKF::BINARY
- on_text b
- else
- on_binary b
- end
- end
-
- def on_text( body )
- mail.body = NKF.nkf('-j -m0', body)
- mail.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'}
- mail.encoding = '7bit'
- end
-
- def on_binary( body )
- mail.body = [body].pack('m')
- mail.set_content_type 'application', 'octet-stream'
- mail.encoding = 'Base64'
- end
-
- end
-
-
- class MimeEncodeMulti
-
- def exec( mail, top = true )
- mail.mime_version = '1.0' if top
- mail.set_content_type 'multipart', 'mixed'
- e = encoding(nil)
- if e and not /\A(?:7bit|8bit|binary)\z/i === e
- raise ArgumentError,
- 'using C.T.Encoding with multipart mail is not permitted'
- end
- mail.parts.each do |m|
- exec m, false if m._builtin_multipart?
- end
- end
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb
deleted file mode 100755
index f98be747..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb
+++ /dev/null
@@ -1,135 +0,0 @@
-#
-# obsolete.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-module TMail
-
- # mail.rb
- class Mail
- alias include? key?
- alias has_key? key?
-
- def values
- ret = []
- each_field {|v| ret.push v }
- ret
- end
-
- def value?( val )
- HeaderField === val or return false
-
- [ @header[val.name.downcase] ].flatten.include? val
- end
-
- alias has_value? value?
- end
-
-
- # facade.rb
- class Mail
- def from_addr( default = nil )
- addr, = from_addrs(nil)
- addr || default
- end
-
- def from_address( default = nil )
- if a = from_addr(nil)
- a.spec
- else
- default
- end
- end
-
- alias from_address= from_addrs=
-
- def from_phrase( default = nil )
- if a = from_addr(nil)
- a.phrase
- else
- default
- end
- end
-
- alias msgid message_id
- alias msgid= message_id=
-
- alias each_dest each_destination
- end
-
-
- # address.rb
- class Address
- alias route routes
- alias addr spec
-
- def spec=( str )
- @local, @domain = str.split(/@/,2).map {|s| s.split(/\./) }
- end
-
- alias addr= spec=
- alias address= spec=
- end
-
-
- # mbox.rb
- class MhMailbox
- alias new_mail new_port
- alias each_mail each_port
- alias each_newmail each_new_port
- end
- class UNIXMbox
- alias new_mail new_port
- alias each_mail each_port
- alias each_newmail each_new_port
- end
- class Maildir
- alias new_mail new_port
- alias each_mail each_port
- alias each_newmail each_new_port
- end
-
-
- # utils.rb
- extend TextUtils
-
- class << self
- alias msgid? message_id?
- alias boundary new_boundary
- alias msgid new_message_id
- alias new_msgid new_message_id
- end
-
- def Mail.boundary
- ::TMail.new_boundary
- end
-
- def Mail.msgid
- ::TMail.new_message_id
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb
deleted file mode 100755
index 825eca92..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb
+++ /dev/null
@@ -1,1522 +0,0 @@
-#
-# DO NOT MODIFY!!!!
-# This file is automatically generated by racc 1.4.3
-# from racc grammer file "parser.y".
-#
-#
-# parser.rb: generated by racc (runtime embedded)
-#
-
-###### racc/parser.rb
-
-unless $".index 'racc/parser.rb'
-$".push 'racc/parser.rb'
-
-self.class.module_eval <<'..end /home/aamine/lib/ruby/racc/parser.rb modeval..idb76f2e220d', '/home/aamine/lib/ruby/racc/parser.rb', 1
-#
-# parser.rb
-#
-# Copyright (c) 1999-2003 Minero Aoki
-#
-# This program is free software.
-# You can distribute/modify this program under the same terms of ruby.
-#
-# As a special exception, when this code is copied by Racc
-# into a Racc output file, you may use that output file
-# without restriction.
-#
-# $Id: parser.rb,v 1.1.1.1 2004/10/14 11:59:58 webster132 Exp $
-#
-
-unless defined? NotImplementedError
- NotImplementedError = NotImplementError
-end
-
-
-module Racc
- class ParseError < StandardError; end
-end
-unless defined?(::ParseError)
- ParseError = Racc::ParseError
-end
-
-
-module Racc
-
- unless defined? Racc_No_Extentions
- Racc_No_Extentions = false
- end
-
- class Parser
-
- Racc_Runtime_Version = '1.4.3'
- Racc_Runtime_Revision = '$Revision: 1.1.1.1 $'.split(/\s+/)[1]
-
- Racc_Runtime_Core_Version_R = '1.4.3'
- Racc_Runtime_Core_Revision_R = '$Revision: 1.1.1.1 $'.split(/\s+/)[1]
- begin
- require 'racc/cparse'
- # Racc_Runtime_Core_Version_C = (defined in extention)
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split(/\s+/)[2]
- unless new.respond_to?(:_racc_do_parse_c, true)
- raise LoadError, 'old cparse.so'
- end
- if Racc_No_Extentions
- raise LoadError, 'selecting ruby version of racc runtime core'
- end
-
- Racc_Main_Parsing_Routine = :_racc_do_parse_c
- Racc_YY_Parse_Method = :_racc_yyparse_c
- Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C
- Racc_Runtime_Type = 'c'
- rescue LoadError
- Racc_Main_Parsing_Routine = :_racc_do_parse_rb
- Racc_YY_Parse_Method = :_racc_yyparse_rb
- Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
- Racc_Runtime_Type = 'ruby'
- end
-
- def self.racc_runtime_type
- Racc_Runtime_Type
- end
-
- private
-
- def _racc_setup
- @yydebug = false unless self.class::Racc_debug_parser
- @yydebug = false unless defined? @yydebug
- if @yydebug
- @racc_debug_out = $stderr unless defined? @racc_debug_out
- @racc_debug_out ||= $stderr
- end
- arg = self.class::Racc_arg
- arg[13] = true if arg.size < 14
- arg
- end
-
- def _racc_init_sysvars
- @racc_state = [0]
- @racc_tstack = []
- @racc_vstack = []
-
- @racc_t = nil
- @racc_val = nil
-
- @racc_read_next = true
-
- @racc_user_yyerror = false
- @racc_error_status = 0
- end
-
-
- ###
- ### do_parse
- ###
-
- def do_parse
- __send__ Racc_Main_Parsing_Routine, _racc_setup(), false
- end
-
- def next_token
- raise NotImplementedError, "#{self.class}\#next_token is not defined"
- end
-
- def _racc_do_parse_rb( arg, in_debug )
- action_table, action_check, action_default, action_pointer,
- goto_table, goto_check, goto_default, goto_pointer,
- nt_base, reduce_table, token_table, shift_n,
- reduce_n, use_result, * = arg
-
- _racc_init_sysvars
- tok = act = i = nil
- nerr = 0
-
- catch(:racc_end_parse) {
- while true
- if i = action_pointer[@racc_state[-1]]
- if @racc_read_next
- if @racc_t != 0 # not EOF
- tok, @racc_val = next_token()
- unless tok # EOF
- @racc_t = 0
- else
- @racc_t = (token_table[tok] or 1) # error token
- end
- racc_read_token(@racc_t, tok, @racc_val) if @yydebug
- @racc_read_next = false
- end
- end
- i += @racc_t
- if i >= 0 and
- act = action_table[i] and
- action_check[i] == @racc_state[-1]
- ;
- else
- act = action_default[@racc_state[-1]]
- end
- else
- act = action_default[@racc_state[-1]]
- end
- while act = _racc_evalact(act, arg)
- end
- end
- }
- end
-
-
- ###
- ### yyparse
- ###
-
- def yyparse( recv, mid )
- __send__ Racc_YY_Parse_Method, recv, mid, _racc_setup(), true
- end
-
- def _racc_yyparse_rb( recv, mid, arg, c_debug )
- action_table, action_check, action_default, action_pointer,
- goto_table, goto_check, goto_default, goto_pointer,
- nt_base, reduce_table, token_table, shift_n,
- reduce_n, use_result, * = arg
-
- _racc_init_sysvars
- tok = nil
- act = nil
- i = nil
- nerr = 0
-
-
- catch(:racc_end_parse) {
- until i = action_pointer[@racc_state[-1]]
- while act = _racc_evalact(action_default[@racc_state[-1]], arg)
- end
- end
-
- recv.__send__(mid) do |tok, val|
-# $stderr.puts "rd: tok=#{tok}, val=#{val}"
- unless tok
- @racc_t = 0
- else
- @racc_t = (token_table[tok] or 1) # error token
- end
- @racc_val = val
- @racc_read_next = false
-
- i += @racc_t
- if i >= 0 and
- act = action_table[i] and
- action_check[i] == @racc_state[-1]
- ;
-# $stderr.puts "01: act=#{act}"
- else
- act = action_default[@racc_state[-1]]
-# $stderr.puts "02: act=#{act}"
-# $stderr.puts "curstate=#{@racc_state[-1]}"
- end
-
- while act = _racc_evalact(act, arg)
- end
-
- while not (i = action_pointer[@racc_state[-1]]) or
- not @racc_read_next or
- @racc_t == 0 # $
- if i and i += @racc_t and
- i >= 0 and
- act = action_table[i] and
- action_check[i] == @racc_state[-1]
- ;
-# $stderr.puts "03: act=#{act}"
- else
-# $stderr.puts "04: act=#{act}"
- act = action_default[@racc_state[-1]]
- end
-
- while act = _racc_evalact(act, arg)
- end
- end
- end
- }
- end
-
-
- ###
- ### common
- ###
-
- def _racc_evalact( act, arg )
-# $stderr.puts "ea: act=#{act}"
- action_table, action_check, action_default, action_pointer,
- goto_table, goto_check, goto_default, goto_pointer,
- nt_base, reduce_table, token_table, shift_n,
- reduce_n, use_result, * = arg
-nerr = 0 # tmp
-
- if act > 0 and act < shift_n
- #
- # shift
- #
-
- if @racc_error_status > 0
- @racc_error_status -= 1 unless @racc_t == 1 # error token
- end
-
- @racc_vstack.push @racc_val
- @racc_state.push act
- @racc_read_next = true
-
- if @yydebug
- @racc_tstack.push @racc_t
- racc_shift @racc_t, @racc_tstack, @racc_vstack
- end
-
- elsif act < 0 and act > -reduce_n
- #
- # reduce
- #
-
- code = catch(:racc_jump) {
- @racc_state.push _racc_do_reduce(arg, act)
- false
- }
- if code
- case code
- when 1 # yyerror
- @racc_user_yyerror = true # user_yyerror
- return -reduce_n
- when 2 # yyaccept
- return shift_n
- else
- raise RuntimeError, '[Racc Bug] unknown jump code'
- end
- end
-
- elsif act == shift_n
- #
- # accept
- #
-
- racc_accept if @yydebug
- throw :racc_end_parse, @racc_vstack[0]
-
- elsif act == -reduce_n
- #
- # error
- #
-
- case @racc_error_status
- when 0
- unless arg[21] # user_yyerror
- nerr += 1
- on_error @racc_t, @racc_val, @racc_vstack
- end
- when 3
- if @racc_t == 0 # is $
- throw :racc_end_parse, nil
- end
- @racc_read_next = true
- end
- @racc_user_yyerror = false
- @racc_error_status = 3
-
- while true
- if i = action_pointer[@racc_state[-1]]
- i += 1 # error token
- if i >= 0 and
- (act = action_table[i]) and
- action_check[i] == @racc_state[-1]
- break
- end
- end
-
- throw :racc_end_parse, nil if @racc_state.size < 2
- @racc_state.pop
- @racc_vstack.pop
- if @yydebug
- @racc_tstack.pop
- racc_e_pop @racc_state, @racc_tstack, @racc_vstack
- end
- end
-
- return act
-
- else
- raise RuntimeError, "[Racc Bug] unknown action #{act.inspect}"
- end
-
- racc_next_state(@racc_state[-1], @racc_state) if @yydebug
-
- nil
- end
-
- def _racc_do_reduce( arg, act )
- action_table, action_check, action_default, action_pointer,
- goto_table, goto_check, goto_default, goto_pointer,
- nt_base, reduce_table, token_table, shift_n,
- reduce_n, use_result, * = arg
- state = @racc_state
- vstack = @racc_vstack
- tstack = @racc_tstack
-
- i = act * -3
- len = reduce_table[i]
- reduce_to = reduce_table[i+1]
- method_id = reduce_table[i+2]
- void_array = []
-
- tmp_t = tstack[-len, len] if @yydebug
- tmp_v = vstack[-len, len]
- tstack[-len, len] = void_array if @yydebug
- vstack[-len, len] = void_array
- state[-len, len] = void_array
-
- # tstack must be updated AFTER method call
- if use_result
- vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
- else
- vstack.push __send__(method_id, tmp_v, vstack)
- end
- tstack.push reduce_to
-
- racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
-
- k1 = reduce_to - nt_base
- if i = goto_pointer[k1]
- i += state[-1]
- if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
- return curstate
- end
- end
- goto_default[k1]
- end
-
- def on_error( t, val, vstack )
- raise ParseError, sprintf("\nparse error on value %s (%s)",
- val.inspect, token_to_str(t) || '?')
- end
-
- def yyerror
- throw :racc_jump, 1
- end
-
- def yyaccept
- throw :racc_jump, 2
- end
-
- def yyerrok
- @racc_error_status = 0
- end
-
-
- # for debugging output
-
- def racc_read_token( t, tok, val )
- @racc_debug_out.print 'read '
- @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
- @racc_debug_out.puts val.inspect
- @racc_debug_out.puts
- end
-
- def racc_shift( tok, tstack, vstack )
- @racc_debug_out.puts "shift #{racc_token2str tok}"
- racc_print_stacks tstack, vstack
- @racc_debug_out.puts
- end
-
- def racc_reduce( toks, sim, tstack, vstack )
- out = @racc_debug_out
- out.print 'reduce '
- if toks.empty?
- out.print ' '
- else
- toks.each {|t| out.print ' ', racc_token2str(t) }
- end
- out.puts " --> #{racc_token2str(sim)}"
-
- racc_print_stacks tstack, vstack
- @racc_debug_out.puts
- end
-
- def racc_accept
- @racc_debug_out.puts 'accept'
- @racc_debug_out.puts
- end
-
- def racc_e_pop( state, tstack, vstack )
- @racc_debug_out.puts 'error recovering mode: pop token'
- racc_print_states state
- racc_print_stacks tstack, vstack
- @racc_debug_out.puts
- end
-
- def racc_next_state( curstate, state )
- @racc_debug_out.puts "goto #{curstate}"
- racc_print_states state
- @racc_debug_out.puts
- end
-
- def racc_print_stacks( t, v )
- out = @racc_debug_out
- out.print ' ['
- t.each_index do |i|
- out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
- end
- out.puts ' ]'
- end
-
- def racc_print_states( s )
- out = @racc_debug_out
- out.print ' ['
- s.each {|st| out.print ' ', st }
- out.puts ' ]'
- end
-
- def racc_token2str( tok )
- self.class::Racc_token_to_s_table[tok] or
- raise RuntimeError, "[Racc Bug] can't convert token #{tok} to string"
- end
-
- def token_to_str( t )
- self.class::Racc_token_to_s_table[t]
- end
-
- end
-
-end
-..end /home/aamine/lib/ruby/racc/parser.rb modeval..idb76f2e220d
-end # end of racc/parser.rb
-
-
-#
-# parser.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/scanner'
-require 'tmail/utils'
-
-
-module TMail
-
- class Parser < Racc::Parser
-
-module_eval <<'..end parser.y modeval..id43721faf1c', 'parser.y', 331
-
- include TextUtils
-
- def self.parse( ident, str, cmt = nil )
- new.parse(ident, str, cmt)
- end
-
- MAILP_DEBUG = false
-
- def initialize
- self.debug = MAILP_DEBUG
- end
-
- def debug=( flag )
- @yydebug = flag && Racc_debug_parser
- @scanner_debug = flag
- end
-
- def debug
- @yydebug
- end
-
- def parse( ident, str, comments = nil )
- @scanner = Scanner.new(str, ident, comments)
- @scanner.debug = @scanner_debug
- @first = [ident, ident]
- result = yyparse(self, :parse_in)
- comments.map! {|c| to_kcode(c) } if comments
- result
- end
-
- private
-
- def parse_in( &block )
- yield @first
- @scanner.scan(&block)
- end
-
- def on_error( t, val, vstack )
- raise SyntaxError, "parse error on token #{racc_token2str t}"
- end
-
-..end parser.y modeval..id43721faf1c
-
-##### racc 1.4.3 generates ###
-
-racc_reduce_table = [
- 0, 0, :racc_error,
- 2, 35, :_reduce_1,
- 2, 35, :_reduce_2,
- 2, 35, :_reduce_3,
- 2, 35, :_reduce_4,
- 2, 35, :_reduce_5,
- 2, 35, :_reduce_6,
- 2, 35, :_reduce_7,
- 2, 35, :_reduce_8,
- 2, 35, :_reduce_9,
- 2, 35, :_reduce_10,
- 2, 35, :_reduce_11,
- 2, 35, :_reduce_12,
- 6, 36, :_reduce_13,
- 0, 48, :_reduce_none,
- 2, 48, :_reduce_none,
- 3, 49, :_reduce_16,
- 5, 49, :_reduce_17,
- 1, 50, :_reduce_18,
- 7, 37, :_reduce_19,
- 0, 51, :_reduce_none,
- 2, 51, :_reduce_21,
- 0, 52, :_reduce_none,
- 2, 52, :_reduce_23,
- 1, 58, :_reduce_24,
- 3, 58, :_reduce_25,
- 2, 58, :_reduce_26,
- 0, 53, :_reduce_none,
- 2, 53, :_reduce_28,
- 0, 54, :_reduce_29,
- 3, 54, :_reduce_30,
- 0, 55, :_reduce_none,
- 2, 55, :_reduce_32,
- 2, 55, :_reduce_33,
- 0, 56, :_reduce_none,
- 2, 56, :_reduce_35,
- 1, 61, :_reduce_36,
- 1, 61, :_reduce_37,
- 0, 57, :_reduce_none,
- 2, 57, :_reduce_39,
- 1, 38, :_reduce_none,
- 1, 38, :_reduce_none,
- 3, 38, :_reduce_none,
- 1, 46, :_reduce_none,
- 1, 46, :_reduce_none,
- 1, 46, :_reduce_none,
- 1, 39, :_reduce_none,
- 2, 39, :_reduce_47,
- 1, 64, :_reduce_48,
- 3, 64, :_reduce_49,
- 1, 68, :_reduce_none,
- 1, 68, :_reduce_none,
- 1, 69, :_reduce_52,
- 3, 69, :_reduce_53,
- 1, 47, :_reduce_none,
- 1, 47, :_reduce_none,
- 2, 47, :_reduce_56,
- 2, 67, :_reduce_none,
- 3, 65, :_reduce_58,
- 2, 65, :_reduce_59,
- 1, 70, :_reduce_60,
- 2, 70, :_reduce_61,
- 4, 62, :_reduce_62,
- 3, 62, :_reduce_63,
- 2, 72, :_reduce_none,
- 2, 73, :_reduce_65,
- 4, 73, :_reduce_66,
- 3, 63, :_reduce_67,
- 1, 63, :_reduce_68,
- 1, 74, :_reduce_none,
- 2, 74, :_reduce_70,
- 1, 71, :_reduce_71,
- 3, 71, :_reduce_72,
- 1, 59, :_reduce_73,
- 3, 59, :_reduce_74,
- 1, 76, :_reduce_75,
- 2, 76, :_reduce_76,
- 1, 75, :_reduce_none,
- 1, 75, :_reduce_none,
- 1, 75, :_reduce_none,
- 1, 77, :_reduce_none,
- 1, 77, :_reduce_none,
- 1, 77, :_reduce_none,
- 1, 66, :_reduce_none,
- 2, 66, :_reduce_none,
- 3, 60, :_reduce_85,
- 1, 40, :_reduce_86,
- 3, 40, :_reduce_87,
- 1, 79, :_reduce_none,
- 2, 79, :_reduce_89,
- 1, 41, :_reduce_90,
- 2, 41, :_reduce_91,
- 3, 42, :_reduce_92,
- 5, 43, :_reduce_93,
- 3, 43, :_reduce_94,
- 0, 80, :_reduce_95,
- 5, 80, :_reduce_96,
- 1, 82, :_reduce_none,
- 1, 82, :_reduce_none,
- 1, 44, :_reduce_99,
- 3, 45, :_reduce_100,
- 0, 81, :_reduce_none,
- 1, 81, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none,
- 1, 78, :_reduce_none ]
-
-racc_reduce_n = 110
-
-racc_shift_n = 168
-
-racc_action_table = [
- -70, -69, 23, 25, 146, 147, 29, 31, 105, 106,
- 16, 17, 20, 22, 136, 27, -70, -69, 32, 101,
- -70, -69, 154, 100, 113, 115, -70, -69, -70, 109,
- 75, 23, 25, 101, 155, 29, 31, 142, 143, 16,
- 17, 20, 22, 107, 27, 23, 25, 32, 98, 29,
- 31, 96, 94, 16, 17, 20, 22, 78, 27, 23,
- 25, 32, 112, 29, 31, 74, 91, 16, 17, 20,
- 22, 88, 117, 92, 81, 32, 23, 25, 80, 123,
- 29, 31, 100, 125, 16, 17, 20, 22, 126, 23,
- 25, 109, 32, 29, 31, 91, 128, 16, 17, 20,
- 22, 129, 27, 23, 25, 32, 101, 29, 31, 101,
- 130, 16, 17, 20, 22, 79, 52, 23, 25, 32,
- 78, 29, 31, 133, 78, 16, 17, 20, 22, 77,
- 23, 25, 75, 32, 29, 31, 65, 62, 16, 17,
- 20, 22, 139, 23, 25, 101, 32, 29, 31, 60,
- 100, 16, 17, 20, 22, 44, 27, 101, 148, 32,
- 23, 25, 120, 149, 29, 31, 152, 153, 16, 17,
- 20, 22, 42, 27, 157, 159, 32, 23, 25, 120,
- 40, 29, 31, 15, 164, 16, 17, 20, 22, 40,
- 27, 23, 25, 32, 68, 29, 31, 166, 167, 16,
- 17, 20, 22, nil, 27, 23, 25, 32, nil, 29,
- 31, 74, nil, 16, 17, 20, 22, nil, 23, 25,
- nil, 32, 29, 31, nil, nil, 16, 17, 20, 22,
- nil, 23, 25, nil, 32, 29, 31, nil, nil, 16,
- 17, 20, 22, nil, 23, 25, nil, 32, 29, 31,
- nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
- 32, 29, 31, nil, nil, 16, 17, 20, 22, nil,
- 27, 23, 25, 32, nil, 29, 31, nil, nil, 16,
- 17, 20, 22, nil, 23, 25, nil, 32, 29, 31,
- nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
- 32, 29, 31, nil, nil, 16, 17, 20, 22, nil,
- 84, 25, nil, 32, 29, 31, nil, 87, 16, 17,
- 20, 22, 4, 6, 7, 8, 9, 10, 11, 12,
- 13, 1, 2, 3, 84, 25, nil, nil, 29, 31,
- nil, 87, 16, 17, 20, 22, 84, 25, nil, nil,
- 29, 31, nil, 87, 16, 17, 20, 22, 84, 25,
- nil, nil, 29, 31, nil, 87, 16, 17, 20, 22,
- 84, 25, nil, nil, 29, 31, nil, 87, 16, 17,
- 20, 22, 84, 25, nil, nil, 29, 31, nil, 87,
- 16, 17, 20, 22, 84, 25, nil, nil, 29, 31,
- nil, 87, 16, 17, 20, 22 ]
-
-racc_action_check = [
- 75, 28, 68, 68, 136, 136, 68, 68, 72, 72,
- 68, 68, 68, 68, 126, 68, 75, 28, 68, 67,
- 75, 28, 143, 66, 86, 86, 75, 28, 75, 75,
- 28, 3, 3, 86, 143, 3, 3, 134, 134, 3,
- 3, 3, 3, 73, 3, 152, 152, 3, 62, 152,
- 152, 60, 56, 152, 152, 152, 152, 51, 152, 52,
- 52, 152, 80, 52, 52, 52, 50, 52, 52, 52,
- 52, 45, 89, 52, 42, 52, 71, 71, 41, 96,
- 71, 71, 97, 98, 71, 71, 71, 71, 100, 7,
- 7, 101, 71, 7, 7, 102, 104, 7, 7, 7,
- 7, 105, 7, 8, 8, 7, 108, 8, 8, 111,
- 112, 8, 8, 8, 8, 40, 8, 9, 9, 8,
- 36, 9, 9, 117, 121, 9, 9, 9, 9, 33,
- 10, 10, 70, 9, 10, 10, 13, 12, 10, 10,
- 10, 10, 130, 2, 2, 131, 10, 2, 2, 11,
- 135, 2, 2, 2, 2, 6, 2, 138, 139, 2,
- 90, 90, 90, 140, 90, 90, 141, 142, 90, 90,
- 90, 90, 5, 90, 148, 151, 90, 127, 127, 127,
- 4, 127, 127, 1, 157, 127, 127, 127, 127, 159,
- 127, 26, 26, 127, 26, 26, 26, 163, 164, 26,
- 26, 26, 26, nil, 26, 27, 27, 26, nil, 27,
- 27, 27, nil, 27, 27, 27, 27, nil, 155, 155,
- nil, 27, 155, 155, nil, nil, 155, 155, 155, 155,
- nil, 122, 122, nil, 155, 122, 122, nil, nil, 122,
- 122, 122, 122, nil, 76, 76, nil, 122, 76, 76,
- nil, nil, 76, 76, 76, 76, nil, 38, 38, nil,
- 76, 38, 38, nil, nil, 38, 38, 38, 38, nil,
- 38, 55, 55, 38, nil, 55, 55, nil, nil, 55,
- 55, 55, 55, nil, 94, 94, nil, 55, 94, 94,
- nil, nil, 94, 94, 94, 94, nil, 59, 59, nil,
- 94, 59, 59, nil, nil, 59, 59, 59, 59, nil,
- 114, 114, nil, 59, 114, 114, nil, 114, 114, 114,
- 114, 114, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 77, 77, nil, nil, 77, 77,
- nil, 77, 77, 77, 77, 77, 44, 44, nil, nil,
- 44, 44, nil, 44, 44, 44, 44, 44, 113, 113,
- nil, nil, 113, 113, nil, 113, 113, 113, 113, 113,
- 88, 88, nil, nil, 88, 88, nil, 88, 88, 88,
- 88, 88, 74, 74, nil, nil, 74, 74, nil, 74,
- 74, 74, 74, 74, 129, 129, nil, nil, 129, 129,
- nil, 129, 129, 129, 129, 129 ]
-
-racc_action_pointer = [
- 320, 152, 129, 17, 165, 172, 137, 75, 89, 103,
- 116, 135, 106, 105, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, 177, 191, 1, nil,
- nil, nil, nil, 109, nil, nil, 94, nil, 243, nil,
- 99, 64, 74, nil, 332, 52, nil, nil, nil, nil,
- 50, 31, 45, nil, nil, 257, 36, nil, nil, 283,
- 22, nil, 16, nil, nil, nil, -3, -10, -12, nil,
- 103, 62, -8, 15, 368, 0, 230, 320, nil, nil,
- 47, nil, nil, nil, nil, nil, 4, nil, 356, 50,
- 146, nil, nil, nil, 270, nil, 65, 56, 52, nil,
- 57, 62, 79, nil, 68, 81, nil, nil, 77, nil,
- nil, 80, 96, 344, 296, nil, nil, 108, nil, nil,
- nil, 98, 217, nil, nil, nil, -19, 163, nil, 380,
- 128, 116, nil, nil, 14, 124, -26, nil, 128, 141,
- 148, 141, 152, 7, nil, nil, nil, nil, 160, nil,
- nil, 149, 31, nil, nil, 204, nil, 167, nil, 174,
- nil, nil, nil, 169, 184, nil, nil, nil ]
-
-racc_action_default = [
- -110, -110, -110, -110, -14, -110, -20, -110, -110, -110,
- -110, -110, -110, -110, -10, -95, -106, -107, -77, -44,
- -108, -11, -109, -79, -43, -103, -110, -110, -60, -104,
- -55, -105, -78, -68, -54, -71, -45, -12, -110, -1,
- -110, -110, -110, -2, -110, -22, -51, -48, -50, -3,
- -40, -41, -110, -46, -4, -86, -5, -88, -6, -90,
- -110, -7, -95, -8, -9, -99, -101, -61, -59, -56,
- -69, -110, -110, -110, -110, -75, -110, -110, -57, -15,
- -110, 168, -73, -80, -82, -21, -24, -81, -110, -27,
- -110, -83, -47, -89, -110, -91, -110, -101, -110, -100,
- -102, -75, -58, -52, -110, -110, -64, -63, -65, -76,
- -72, -67, -110, -110, -110, -26, -23, -110, -29, -49,
- -84, -42, -87, -92, -94, -95, -110, -110, -62, -110,
- -110, -25, -74, -28, -31, -101, -110, -53, -66, -110,
- -110, -34, -110, -110, -93, -96, -98, -97, -110, -18,
- -13, -38, -110, -30, -33, -110, -32, -16, -19, -14,
- -35, -36, -37, -110, -110, -39, -85, -17 ]
-
-racc_goto_table = [
- 39, 67, 70, 73, 24, 37, 69, 66, 36, 38,
- 57, 59, 55, 67, 108, 83, 90, 111, 69, 99,
- 85, 49, 53, 76, 158, 134, 141, 70, 73, 151,
- 118, 89, 45, 156, 160, 150, 140, 21, 14, 19,
- 119, 102, 64, 63, 61, 83, 70, 104, 83, 58,
- 124, 132, 56, 131, 97, 54, 93, 43, 5, 83,
- 95, 145, 76, nil, 116, 76, nil, nil, 127, 138,
- 103, nil, nil, nil, 38, nil, nil, 110, nil, nil,
- nil, nil, nil, nil, 83, 83, nil, nil, 144, nil,
- nil, nil, nil, nil, nil, 57, 121, 122, nil, nil,
- 83, nil, nil, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, nil, 135, nil, nil,
- nil, nil, nil, 93, nil, nil, nil, 70, 162, 137,
- 70, 163, 161, 38, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, 165 ]
-
-racc_goto_check = [
- 2, 37, 37, 29, 13, 13, 28, 46, 31, 36,
- 41, 41, 45, 37, 25, 44, 32, 25, 28, 47,
- 24, 4, 4, 42, 23, 20, 21, 37, 29, 22,
- 19, 18, 17, 26, 27, 16, 15, 12, 11, 33,
- 34, 35, 10, 9, 8, 44, 37, 29, 44, 7,
- 47, 43, 6, 25, 46, 5, 41, 3, 1, 44,
- 41, 48, 42, nil, 24, 42, nil, nil, 32, 25,
- 13, nil, nil, nil, 36, nil, nil, 41, nil, nil,
- nil, nil, nil, nil, 44, 44, nil, nil, 47, nil,
- nil, nil, nil, nil, nil, 41, 31, 45, nil, nil,
- 44, nil, nil, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, nil, 46, nil, nil,
- nil, nil, nil, 41, nil, nil, nil, 37, 29, 13,
- 37, 29, 28, 36, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, 2 ]
-
-racc_goto_pointer = [
- nil, 58, -4, 51, 14, 47, 43, 39, 33, 31,
- 29, 37, 35, 2, nil, -94, -105, 26, -14, -59,
- -93, -108, -112, -127, -24, -60, -110, -118, -20, -24,
- nil, 6, -34, 37, -50, -27, 6, -25, nil, nil,
- nil, 1, -5, -63, -29, 3, -8, -47, -75 ]
-
-racc_goto_default = [
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, 48, 41, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, 86, nil, nil, 30, 34,
- 50, 51, nil, 46, 47, nil, 26, 28, 71, 72,
- 33, 35, 114, 82, 18, nil, nil, nil, nil ]
-
-racc_token_table = {
- false => 0,
- Object.new => 1,
- :DATETIME => 2,
- :RECEIVED => 3,
- :MADDRESS => 4,
- :RETPATH => 5,
- :KEYWORDS => 6,
- :ENCRYPTED => 7,
- :MIMEVERSION => 8,
- :CTYPE => 9,
- :CENCODING => 10,
- :CDISPOSITION => 11,
- :ADDRESS => 12,
- :MAILBOX => 13,
- :DIGIT => 14,
- :ATOM => 15,
- "," => 16,
- ":" => 17,
- :FROM => 18,
- :BY => 19,
- "@" => 20,
- :DOMLIT => 21,
- :VIA => 22,
- :WITH => 23,
- :ID => 24,
- :FOR => 25,
- ";" => 26,
- "<" => 27,
- ">" => 28,
- "." => 29,
- :QUOTED => 30,
- :TOKEN => 31,
- "/" => 32,
- "=" => 33 }
-
-racc_use_result_var = false
-
-racc_nt_base = 34
-
-Racc_arg = [
- racc_action_table,
- racc_action_check,
- racc_action_default,
- racc_action_pointer,
- racc_goto_table,
- racc_goto_check,
- racc_goto_default,
- racc_goto_pointer,
- racc_nt_base,
- racc_reduce_table,
- racc_token_table,
- racc_shift_n,
- racc_reduce_n,
- racc_use_result_var ]
-
-Racc_token_to_s_table = [
-'$end',
-'error',
-'DATETIME',
-'RECEIVED',
-'MADDRESS',
-'RETPATH',
-'KEYWORDS',
-'ENCRYPTED',
-'MIMEVERSION',
-'CTYPE',
-'CENCODING',
-'CDISPOSITION',
-'ADDRESS',
-'MAILBOX',
-'DIGIT',
-'ATOM',
-'","',
-'":"',
-'FROM',
-'BY',
-'"@"',
-'DOMLIT',
-'VIA',
-'WITH',
-'ID',
-'FOR',
-'";"',
-'"<"',
-'">"',
-'"."',
-'QUOTED',
-'TOKEN',
-'"/"',
-'"="',
-'$start',
-'content',
-'datetime',
-'received',
-'addrs_TOP',
-'retpath',
-'keys',
-'enc',
-'version',
-'ctype',
-'cencode',
-'cdisp',
-'addr_TOP',
-'mbox',
-'day',
-'hour',
-'zone',
-'from',
-'by',
-'via',
-'with',
-'id',
-'for',
-'received_datetime',
-'received_domain',
-'domain',
-'msgid',
-'received_addrspec',
-'routeaddr',
-'spec',
-'addrs',
-'group_bare',
-'commas',
-'group',
-'addr',
-'mboxes',
-'addr_phrase',
-'local_head',
-'routes',
-'at_domains',
-'local',
-'word',
-'dots',
-'domword',
-'atom',
-'phrase',
-'params',
-'opt_semicolon',
-'value']
-
-Racc_debug_parser = false
-
-##### racc system variables end #####
-
- # reduce 0 omitted
-
-module_eval <<'.,.,', 'parser.y', 16
- def _reduce_1( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 17
- def _reduce_2( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 18
- def _reduce_3( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 19
- def _reduce_4( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 20
- def _reduce_5( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 21
- def _reduce_6( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 22
- def _reduce_7( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 23
- def _reduce_8( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 24
- def _reduce_9( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 25
- def _reduce_10( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 26
- def _reduce_11( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 27
- def _reduce_12( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 33
- def _reduce_13( val, _values)
- t = Time.gm(val[3].to_i, val[2], val[1].to_i, 0, 0, 0)
- (t + val[4] - val[5]).localtime
- end
-.,.,
-
- # reduce 14 omitted
-
- # reduce 15 omitted
-
-module_eval <<'.,.,', 'parser.y', 42
- def _reduce_16( val, _values)
- (val[0].to_i * 60 * 60) +
- (val[2].to_i * 60)
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 47
- def _reduce_17( val, _values)
- (val[0].to_i * 60 * 60) +
- (val[2].to_i * 60) +
- (val[4].to_i)
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 54
- def _reduce_18( val, _values)
- timezone_string_to_unixtime(val[0])
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 59
- def _reduce_19( val, _values)
- val
- end
-.,.,
-
- # reduce 20 omitted
-
-module_eval <<'.,.,', 'parser.y', 65
- def _reduce_21( val, _values)
- val[1]
- end
-.,.,
-
- # reduce 22 omitted
-
-module_eval <<'.,.,', 'parser.y', 71
- def _reduce_23( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 77
- def _reduce_24( val, _values)
- join_domain(val[0])
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 81
- def _reduce_25( val, _values)
- join_domain(val[2])
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 85
- def _reduce_26( val, _values)
- join_domain(val[0])
- end
-.,.,
-
- # reduce 27 omitted
-
-module_eval <<'.,.,', 'parser.y', 91
- def _reduce_28( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 96
- def _reduce_29( val, _values)
- []
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 100
- def _reduce_30( val, _values)
- val[0].push val[2]
- val[0]
- end
-.,.,
-
- # reduce 31 omitted
-
-module_eval <<'.,.,', 'parser.y', 107
- def _reduce_32( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 111
- def _reduce_33( val, _values)
- val[1]
- end
-.,.,
-
- # reduce 34 omitted
-
-module_eval <<'.,.,', 'parser.y', 117
- def _reduce_35( val, _values)
- val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 123
- def _reduce_36( val, _values)
- val[0].spec
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 127
- def _reduce_37( val, _values)
- val[0].spec
- end
-.,.,
-
- # reduce 38 omitted
-
-module_eval <<'.,.,', 'parser.y', 134
- def _reduce_39( val, _values)
- val[1]
- end
-.,.,
-
- # reduce 40 omitted
-
- # reduce 41 omitted
-
- # reduce 42 omitted
-
- # reduce 43 omitted
-
- # reduce 44 omitted
-
- # reduce 45 omitted
-
- # reduce 46 omitted
-
-module_eval <<'.,.,', 'parser.y', 146
- def _reduce_47( val, _values)
- [ Address.new(nil, nil) ]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 148
- def _reduce_48( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 149
- def _reduce_49( val, _values)
- val[0].push val[2]; val[0]
- end
-.,.,
-
- # reduce 50 omitted
-
- # reduce 51 omitted
-
-module_eval <<'.,.,', 'parser.y', 156
- def _reduce_52( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 160
- def _reduce_53( val, _values)
- val[0].push val[2]
- val[0]
- end
-.,.,
-
- # reduce 54 omitted
-
- # reduce 55 omitted
-
-module_eval <<'.,.,', 'parser.y', 168
- def _reduce_56( val, _values)
- val[1].phrase = Decoder.decode(val[0])
- val[1]
- end
-.,.,
-
- # reduce 57 omitted
-
-module_eval <<'.,.,', 'parser.y', 176
- def _reduce_58( val, _values)
- AddressGroup.new(val[0], val[2])
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 178
- def _reduce_59( val, _values)
- AddressGroup.new(val[0], [])
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 181
- def _reduce_60( val, _values)
- val[0].join('.')
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 182
- def _reduce_61( val, _values)
- val[0] << ' ' << val[1].join('.')
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 186
- def _reduce_62( val, _values)
- val[2].routes.replace val[1]
- val[2]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 191
- def _reduce_63( val, _values)
- val[1]
- end
-.,.,
-
- # reduce 64 omitted
-
-module_eval <<'.,.,', 'parser.y', 196
- def _reduce_65( val, _values)
- [ val[1].join('.') ]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 197
- def _reduce_66( val, _values)
- val[0].push val[3].join('.'); val[0]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 199
- def _reduce_67( val, _values)
- Address.new( val[0], val[2] )
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 200
- def _reduce_68( val, _values)
- Address.new( val[0], nil )
- end
-.,.,
-
- # reduce 69 omitted
-
-module_eval <<'.,.,', 'parser.y', 203
- def _reduce_70( val, _values)
- val[0].push ''; val[0]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 206
- def _reduce_71( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 209
- def _reduce_72( val, _values)
- val[1].times do
- val[0].push ''
- end
- val[0].push val[2]
- val[0]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 217
- def _reduce_73( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 220
- def _reduce_74( val, _values)
- val[1].times do
- val[0].push ''
- end
- val[0].push val[2]
- val[0]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 227
- def _reduce_75( val, _values)
- 0
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 228
- def _reduce_76( val, _values)
- 1
- end
-.,.,
-
- # reduce 77 omitted
-
- # reduce 78 omitted
-
- # reduce 79 omitted
-
- # reduce 80 omitted
-
- # reduce 81 omitted
-
- # reduce 82 omitted
-
- # reduce 83 omitted
-
- # reduce 84 omitted
-
-module_eval <<'.,.,', 'parser.y', 243
- def _reduce_85( val, _values)
- val[1] = val[1].spec
- val.join('')
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 247
- def _reduce_86( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 248
- def _reduce_87( val, _values)
- val[0].push val[2]; val[0]
- end
-.,.,
-
- # reduce 88 omitted
-
-module_eval <<'.,.,', 'parser.y', 251
- def _reduce_89( val, _values)
- val[0] << ' ' << val[1]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 255
- def _reduce_90( val, _values)
- val.push nil
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 260
- def _reduce_91( val, _values)
- val
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 265
- def _reduce_92( val, _values)
- [ val[0].to_i, val[2].to_i ]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 270
- def _reduce_93( val, _values)
- [ val[0].downcase, val[2].downcase, decode_params(val[3]) ]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 274
- def _reduce_94( val, _values)
- [ val[0].downcase, nil, decode_params(val[1]) ]
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 279
- def _reduce_95( val, _values)
- {}
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 283
- def _reduce_96( val, _values)
- val[0][ val[2].downcase ] = val[4]
- val[0]
- end
-.,.,
-
- # reduce 97 omitted
-
- # reduce 98 omitted
-
-module_eval <<'.,.,', 'parser.y', 292
- def _reduce_99( val, _values)
- val[0].downcase
- end
-.,.,
-
-module_eval <<'.,.,', 'parser.y', 297
- def _reduce_100( val, _values)
- [ val[0].downcase, decode_params(val[1]) ]
- end
-.,.,
-
- # reduce 101 omitted
-
- # reduce 102 omitted
-
- # reduce 103 omitted
-
- # reduce 104 omitted
-
- # reduce 105 omitted
-
- # reduce 106 omitted
-
- # reduce 107 omitted
-
- # reduce 108 omitted
-
- # reduce 109 omitted
-
- def _reduce_none( val, _values)
- val[0]
- end
-
- end # class Parser
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb
deleted file mode 100755
index f973c05b..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb
+++ /dev/null
@@ -1,377 +0,0 @@
-#
-# port.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/stringio'
-
-
-module TMail
-
- class Port
- def reproducible?
- false
- end
- end
-
-
- ###
- ### FilePort
- ###
-
- class FilePort < Port
-
- def initialize( fname )
- @filename = File.expand_path(fname)
- super()
- end
-
- attr_reader :filename
-
- alias ident filename
-
- def ==( other )
- other.respond_to?(:filename) and @filename == other.filename
- end
-
- alias eql? ==
-
- def hash
- @filename.hash
- end
-
- def inspect
- "#<#{self.class}:#{@filename}>"
- end
-
- def reproducible?
- true
- end
-
- def size
- File.size @filename
- end
-
-
- def ropen( &block )
- File.open(@filename, &block)
- end
-
- def wopen( &block )
- File.open(@filename, 'w', &block)
- end
-
- def aopen( &block )
- File.open(@filename, 'a', &block)
- end
-
-
- def read_all
- ropen {|f|
- return f.read
- }
- end
-
-
- def remove
- File.unlink @filename
- end
-
- def move_to( port )
- begin
- File.link @filename, port.filename
- rescue Errno::EXDEV
- copy_to port
- end
- File.unlink @filename
- end
-
- alias mv move_to
-
- def copy_to( port )
- if FilePort === port
- copy_file @filename, port.filename
- else
- File.open(@filename) {|r|
- port.wopen {|w|
- while s = r.sysread(4096)
- w.write << s
- end
- } }
- end
- end
-
- alias cp copy_to
-
- private
-
- # from fileutils.rb
- def copy_file( src, dest )
- st = r = w = nil
-
- File.open(src, 'rb') {|r|
- File.open(dest, 'wb') {|w|
- st = r.stat
- begin
- while true
- w.write r.sysread(st.blksize)
- end
- rescue EOFError
- end
- } }
- end
-
- end
-
-
- module MailFlags
-
- def seen=( b )
- set_status 'S', b
- end
-
- def seen?
- get_status 'S'
- end
-
- def replied=( b )
- set_status 'R', b
- end
-
- def replied?
- get_status 'R'
- end
-
- def flagged=( b )
- set_status 'F', b
- end
-
- def flagged?
- get_status 'F'
- end
-
- private
-
- def procinfostr( str, tag, true_p )
- a = str.upcase.split(//)
- a.push true_p ? tag : nil
- a.delete tag unless true_p
- a.compact.sort.join('').squeeze
- end
-
- end
-
-
- class MhPort < FilePort
-
- include MailFlags
-
- private
-
- def set_status( tag, flag )
- begin
- tmpfile = @filename + '.tmailtmp.' + $$.to_s
- File.open(tmpfile, 'w') {|f|
- write_status f, tag, flag
- }
- File.unlink @filename
- File.link tmpfile, @filename
- ensure
- File.unlink tmpfile
- end
- end
-
- def write_status( f, tag, flag )
- stat = ''
- File.open(@filename) {|r|
- while line = r.gets
- if line.strip.empty?
- break
- elsif m = /\AX-TMail-Status:/i.match(line)
- stat = m.post_match.strip
- else
- f.print line
- end
- end
-
- s = procinfostr(stat, tag, flag)
- f.puts 'X-TMail-Status: ' + s unless s.empty?
- f.puts
-
- while s = r.read(2048)
- f.write s
- end
- }
- end
-
- def get_status( tag )
- File.foreach(@filename) {|line|
- return false if line.strip.empty?
- if m = /\AX-TMail-Status:/i.match(line)
- return m.post_match.strip.include?(tag[0])
- end
- }
- false
- end
-
- end
-
-
- class MaildirPort < FilePort
-
- def move_to_new
- new = replace_dir(@filename, 'new')
- File.rename @filename, new
- @filename = new
- end
-
- def move_to_cur
- new = replace_dir(@filename, 'cur')
- File.rename @filename, new
- @filename = new
- end
-
- def replace_dir( path, dir )
- "#{File.dirname File.dirname(path)}/#{dir}/#{File.basename path}"
- end
- private :replace_dir
-
-
- include MailFlags
-
- private
-
- MAIL_FILE = /\A(\d+\.[\d_]+\.[^:]+)(?:\:(\d),(\w+)?)?\z/
-
- def set_status( tag, flag )
- if m = MAIL_FILE.match(File.basename(@filename))
- s, uniq, type, info, = m.to_a
- return if type and type != '2' # do not change anything
- newname = File.dirname(@filename) + '/' +
- uniq + ':2,' + procinfostr(info.to_s, tag, flag)
- else
- newname = @filename + ':2,' + tag
- end
-
- File.link @filename, newname
- File.unlink @filename
- @filename = newname
- end
-
- def get_status( tag )
- m = MAIL_FILE.match(File.basename(@filename)) or return false
- m[2] == '2' and m[3].to_s.include?(tag[0])
- end
-
- end
-
-
- ###
- ### StringPort
- ###
-
- class StringPort < Port
-
- def initialize( str = '' )
- @buffer = str
- super()
- end
-
- def string
- @buffer
- end
-
- def to_s
- @buffer.dup
- end
-
- alias read_all to_s
-
- def size
- @buffer.size
- end
-
- def ==( other )
- StringPort === other and @buffer.equal? other.string
- end
-
- alias eql? ==
-
- def hash
- @buffer.object_id.hash
- end
-
- def inspect
- "#<#{self.class}:id=#{sprintf '0x%x', @buffer.object_id}>"
- end
-
- def reproducible?
- true
- end
-
- def ropen( &block )
- @buffer or raise Errno::ENOENT, "#{inspect} is already removed"
- StringInput.open(@buffer, &block)
- end
-
- def wopen( &block )
- @buffer = ''
- StringOutput.new(@buffer, &block)
- end
-
- def aopen( &block )
- @buffer ||= ''
- StringOutput.new(@buffer, &block)
- end
-
- def remove
- @buffer = nil
- end
-
- alias rm remove
-
- def copy_to( port )
- port.wopen {|f|
- f.write @buffer
- }
- end
-
- alias cp copy_to
-
- def move_to( port )
- if StringPort === port
- str = @buffer
- port.instance_eval { @buffer = str }
- else
- copy_to port
- end
- remove
- end
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
deleted file mode 100644
index 69424234..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
+++ /dev/null
@@ -1,131 +0,0 @@
-module TMail
- class Mail
- def subject(to_charset = 'utf-8')
- Unquoter.unquote_and_convert_to(quoted_subject, to_charset)
- end
-
- def unquoted_body(to_charset = 'utf-8')
- from_charset = sub_header("content-type", "charset")
- case (content_transfer_encoding || "7bit").downcase
- when "quoted-printable"
- Unquoter.unquote_quoted_printable_and_convert_to(quoted_body,
- to_charset, from_charset, true)
- when "base64"
- Unquoter.unquote_base64_and_convert_to(quoted_body, to_charset,
- from_charset)
- when "7bit", "8bit"
- Unquoter.convert_to(quoted_body, to_charset, from_charset)
- when "binary"
- quoted_body
- else
- quoted_body
- end
- end
-
- def body(to_charset = 'utf-8', &block)
- attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" }
-
- if multipart?
- parts.collect { |part|
- header = part["content-type"]
-
- if part.multipart?
- part.body(to_charset, &attachment_presenter)
- elsif header.nil?
- ""
- elsif !attachment?(part)
- part.unquoted_body(to_charset)
- else
- attachment_presenter.call(header["name"] || "(unnamed)")
- end
- }.join
- else
- unquoted_body(to_charset)
- end
- end
- end
-
- class Unquoter
- class << self
- def unquote_and_convert_to(text, to_charset, from_charset = "iso-8859-1", preserve_underscores=false)
- return "" if text.nil?
- text.gsub(/(.*?)(?:(?:=\?(.*?)\?(.)\?(.*?)\?=)|$)/) do
- before = $1
- from_charset = $2
- quoting_method = $3
- text = $4
-
- before = convert_to(before, to_charset, from_charset) if before.length > 0
- before + case quoting_method
- when "q", "Q" then
- unquote_quoted_printable_and_convert_to(text, to_charset, from_charset, preserve_underscores)
- when "b", "B" then
- unquote_base64_and_convert_to(text, to_charset, from_charset)
- when nil then
- # will be nil at the end of the string, due to the nature of
- # the regex used.
- ""
- else
- raise "unknown quoting method #{quoting_method.inspect}"
- end
- end
- end
-
- def unquote_quoted_printable_and_convert_to(text, to, from, preserve_underscores=false)
- text = text.gsub(/_/, " ") unless preserve_underscores
- text = text.gsub(/\r\n|\r/, "\n") # normalize newlines
- convert_to(text.unpack("M*").first, to, from)
- end
-
- def unquote_base64_and_convert_to(text, to, from)
- convert_to(Base64.decode(text).first, to, from)
- end
-
- begin
- require 'iconv'
- def convert_to(text, to, from)
- return text unless to && from
- text ? Iconv.iconv(to, from, text).first : ""
- rescue Iconv::IllegalSequence, Iconv::InvalidEncoding, Errno::EINVAL
- # the 'from' parameter specifies a charset other than what the text
- # actually is...not much we can do in this case but just return the
- # unconverted text.
- #
- # Ditto if either parameter represents an unknown charset, like
- # X-UNKNOWN.
- text
- end
- rescue LoadError
- # Not providing quoting support
- def convert_to(text, to, from)
- warn "Action Mailer: iconv not loaded; ignoring conversion from #{from} to #{to} (#{__FILE__}:#{__LINE__})"
- text
- end
- end
- end
- end
-end
-
-if __FILE__ == $0
- require 'test/unit'
-
- class TC_Unquoter < Test::Unit::TestCase
- def test_unquote_quoted_printable
- a ="=?ISO-8859-1?Q?[166417]_Bekr=E6ftelse_fra_Rejsefeber?="
- b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
- assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
- end
-
- def test_unquote_base64
- a ="=?ISO-8859-1?B?WzE2NjQxN10gQmVrcuZmdGVsc2UgZnJhIFJlanNlZmViZXI=?="
- b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
- assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
- end
-
- def test_unquote_without_charset
- a ="[166417]_Bekr=E6ftelse_fra_Rejsefeber"
- b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
- assert_equal "[166417]_Bekr=E6ftelse_fra_Rejsefeber", b
- end
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb
deleted file mode 100755
index 839dd793..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# scanner.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/utils'
-
-module TMail
- require 'tmail/scanner_r.rb'
- begin
- raise LoadError, 'Turn off Ruby extention by user choice' if ENV['NORUBYEXT']
- require 'tmail/scanner_c.so'
- Scanner = Scanner_C
- rescue LoadError
- Scanner = Scanner_R
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb
deleted file mode 100755
index ccf576c2..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb
+++ /dev/null
@@ -1,263 +0,0 @@
-#
-# scanner_r.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-require 'tmail/config'
-
-
-module TMail
-
- class Scanner_R
-
- Version = '0.10.7'
- Version.freeze
-
- MIME_HEADERS = {
- :CTYPE => true,
- :CENCODING => true,
- :CDISPOSITION => true
- }
-
- alnum = 'a-zA-Z0-9'
- atomsyms = %q[ _#!$%&`'*+-{|}~^@/=? ].strip
- tokensyms = %q[ _#!$%&`'*+-{|}~^@. ].strip
-
- atomchars = alnum + Regexp.quote(atomsyms)
- tokenchars = alnum + Regexp.quote(tokensyms)
- iso2022str = '\e(?!\(B)..(?:[^\e]+|\e(?!\(B)..)*\e\(B'
-
- eucstr = '(?:[\xa1-\xfe][\xa1-\xfe])+'
- sjisstr = '(?:[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc])+'
- utf8str = '(?:[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf])+'
-
- quoted_with_iso2022 = /\A(?:[^\\\e"]+|#{iso2022str})+/n
- domlit_with_iso2022 = /\A(?:[^\\\e\]]+|#{iso2022str})+/n
- comment_with_iso2022 = /\A(?:[^\\\e()]+|#{iso2022str})+/n
-
- quoted_without_iso2022 = /\A[^\\"]+/n
- domlit_without_iso2022 = /\A[^\\\]]+/n
- comment_without_iso2022 = /\A[^\\()]+/n
-
- PATTERN_TABLE = {}
- PATTERN_TABLE['EUC'] =
- [
- /\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n,
- /\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n,
- quoted_with_iso2022,
- domlit_with_iso2022,
- comment_with_iso2022
- ]
- PATTERN_TABLE['SJIS'] =
- [
- /\A(?:[#{atomchars}]+|#{iso2022str}|#{sjisstr})+/n,
- /\A(?:[#{tokenchars}]+|#{iso2022str}|#{sjisstr})+/n,
- quoted_with_iso2022,
- domlit_with_iso2022,
- comment_with_iso2022
- ]
- PATTERN_TABLE['UTF8'] =
- [
- /\A(?:[#{atomchars}]+|#{utf8str})+/n,
- /\A(?:[#{tokenchars}]+|#{utf8str})+/n,
- quoted_without_iso2022,
- domlit_without_iso2022,
- comment_without_iso2022
- ]
- PATTERN_TABLE['NONE'] =
- [
- /\A[#{atomchars}]+/n,
- /\A[#{tokenchars}]+/n,
- quoted_without_iso2022,
- domlit_without_iso2022,
- comment_without_iso2022
- ]
-
-
- def initialize( str, scantype, comments )
- init_scanner str
- @comments = comments || []
- @debug = false
-
- # fix scanner mode
- @received = (scantype == :RECEIVED)
- @is_mime_header = MIME_HEADERS[scantype]
-
- atom, token, @quoted_re, @domlit_re, @comment_re = PATTERN_TABLE[$KCODE]
- @word_re = (MIME_HEADERS[scantype] ? token : atom)
- end
-
- attr_accessor :debug
-
- def scan( &block )
- if @debug
- scan_main do |arr|
- s, v = arr
- printf "%7d %-10s %s\n",
- rest_size(),
- s.respond_to?(:id2name) ? s.id2name : s.inspect,
- v.inspect
- yield arr
- end
- else
- scan_main(&block)
- end
- end
-
- private
-
- RECV_TOKEN = {
- 'from' => :FROM,
- 'by' => :BY,
- 'via' => :VIA,
- 'with' => :WITH,
- 'id' => :ID,
- 'for' => :FOR
- }
-
- def scan_main
- until eof?
- if skip(/\A[\n\r\t ]+/n) # LWSP
- break if eof?
- end
-
- if s = readstr(@word_re)
- if @is_mime_header
- yield :TOKEN, s
- else
- # atom
- if /\A\d+\z/ === s
- yield :DIGIT, s
- elsif @received
- yield RECV_TOKEN[s.downcase] || :ATOM, s
- else
- yield :ATOM, s
- end
- end
-
- elsif skip(/\A"/)
- yield :QUOTED, scan_quoted_word()
-
- elsif skip(/\A\[/)
- yield :DOMLIT, scan_domain_literal()
-
- elsif skip(/\A\(/)
- @comments.push scan_comment()
-
- else
- c = readchar()
- yield c, c
- end
- end
-
- yield false, '$'
- end
-
- def scan_quoted_word
- scan_qstr(@quoted_re, /\A"/, 'quoted-word')
- end
-
- def scan_domain_literal
- '[' + scan_qstr(@domlit_re, /\A\]/, 'domain-literal') + ']'
- end
-
- def scan_qstr( pattern, terminal, type )
- result = ''
- until eof?
- if s = readstr(pattern) then result << s
- elsif skip(terminal) then return result
- elsif skip(/\A\\/) then result << readchar()
- else
- raise "TMail FATAL: not match in #{type}"
- end
- end
- scan_error! "found unterminated #{type}"
- end
-
- def scan_comment
- result = ''
- nest = 1
- content = @comment_re
-
- until eof?
- if s = readstr(content) then result << s
- elsif skip(/\A\)/) then nest -= 1
- return result if nest == 0
- result << ')'
- elsif skip(/\A\(/) then nest += 1
- result << '('
- elsif skip(/\A\\/) then result << readchar()
- else
- raise 'TMail FATAL: not match in comment'
- end
- end
- scan_error! 'found unterminated comment'
- end
-
- # string scanner
-
- def init_scanner( str )
- @src = str
- end
-
- def eof?
- @src.empty?
- end
-
- def rest_size
- @src.size
- end
-
- def readstr( re )
- if m = re.match(@src)
- @src = m.post_match
- m[0]
- else
- nil
- end
- end
-
- def readchar
- readstr(/\A./)
- end
-
- def skip( re )
- if m = re.match(@src)
- @src = m.post_match
- true
- else
- false
- end
- end
-
- def scan_error!( msg )
- raise SyntaxError, msg
- end
-
- end
-
-end # module TMail
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb
deleted file mode 100755
index 532be3db..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb
+++ /dev/null
@@ -1,277 +0,0 @@
-#
-# stringio.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-class StringInput#:nodoc:
-
- include Enumerable
-
- class << self
-
- def new( str )
- if block_given?
- begin
- f = super
- yield f
- ensure
- f.close if f
- end
- else
- super
- end
- end
-
- alias open new
-
- end
-
- def initialize( str )
- @src = str
- @pos = 0
- @closed = false
- @lineno = 0
- end
-
- attr_reader :lineno
-
- def string
- @src
- end
-
- def inspect
- "#<#{self.class}:#{@closed ? 'closed' : 'open'},src=#{@src[0,30].inspect}>"
- end
-
- def close
- stream_check!
- @pos = nil
- @closed = true
- end
-
- def closed?
- @closed
- end
-
- def pos
- stream_check!
- [@pos, @src.size].min
- end
-
- alias tell pos
-
- def seek( offset, whence = IO::SEEK_SET )
- stream_check!
- case whence
- when IO::SEEK_SET
- @pos = offset
- when IO::SEEK_CUR
- @pos += offset
- when IO::SEEK_END
- @pos = @src.size - offset
- else
- raise ArgumentError, "unknown seek flag: #{whence}"
- end
- @pos = 0 if @pos < 0
- @pos = [@pos, @src.size + 1].min
- offset
- end
-
- def rewind
- stream_check!
- @pos = 0
- end
-
- def eof?
- stream_check!
- @pos > @src.size
- end
-
- def each( &block )
- stream_check!
- begin
- @src.each(&block)
- ensure
- @pos = 0
- end
- end
-
- def gets
- stream_check!
- if idx = @src.index(?\n, @pos)
- idx += 1 # "\n".size
- line = @src[ @pos ... idx ]
- @pos = idx
- @pos += 1 if @pos == @src.size
- else
- line = @src[ @pos .. -1 ]
- @pos = @src.size + 1
- end
- @lineno += 1
-
- line
- end
-
- def getc
- stream_check!
- ch = @src[@pos]
- @pos += 1
- @pos += 1 if @pos == @src.size
- ch
- end
-
- def read( len = nil )
- stream_check!
- return read_all unless len
- str = @src[@pos, len]
- @pos += len
- @pos += 1 if @pos == @src.size
- str
- end
-
- alias sysread read
-
- def read_all
- stream_check!
- return nil if eof?
- rest = @src[@pos ... @src.size]
- @pos = @src.size + 1
- rest
- end
-
- def stream_check!
- @closed and raise IOError, 'closed stream'
- end
-
-end
-
-
-class StringOutput#:nodoc:
-
- class << self
-
- def new( str = '' )
- if block_given?
- begin
- f = super
- yield f
- ensure
- f.close if f
- end
- else
- super
- end
- end
-
- alias open new
-
- end
-
- def initialize( str = '' )
- @dest = str
- @closed = false
- end
-
- def close
- @closed = true
- end
-
- def closed?
- @closed
- end
-
- def string
- @dest
- end
-
- alias value string
- alias to_str string
-
- def size
- @dest.size
- end
-
- alias pos size
-
- def inspect
- "#<#{self.class}:#{@dest ? 'open' : 'closed'},#{id}>"
- end
-
- def print( *args )
- stream_check!
- raise ArgumentError, 'wrong # of argument (0 for >1)' if args.empty?
- args.each do |s|
- raise ArgumentError, 'nil not allowed' if s.nil?
- @dest << s.to_s
- end
- nil
- end
-
- def puts( *args )
- stream_check!
- args.each do |str|
- @dest << (s = str.to_s)
- @dest << "\n" unless s[-1] == ?\n
- end
- @dest << "\n" if args.empty?
- nil
- end
-
- def putc( ch )
- stream_check!
- @dest << ch.chr
- nil
- end
-
- def printf( *args )
- stream_check!
- @dest << sprintf(*args)
- nil
- end
-
- def write( str )
- stream_check!
- s = str.to_s
- @dest << s
- s.size
- end
-
- alias syswrite write
-
- def <<( str )
- stream_check!
- @dest << str.to_s
- self
- end
-
- private
-
- def stream_check!
- @closed and raise IOError, 'closed stream'
- end
-
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/tmail.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/tmail.rb
deleted file mode 100755
index 57ed3cc5..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/tmail.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'tmail'
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb
deleted file mode 100755
index 852acd75..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb
+++ /dev/null
@@ -1,238 +0,0 @@
-#
-# utils.rb
-#
-#--
-# Copyright (c) 1998-2003 Minero Aoki
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
-# with permission of Minero Aoki.
-#++
-
-module TMail
-
- class SyntaxError < StandardError; end
-
-
- def TMail.new_boundary
- 'mimepart_' + random_tag
- end
-
- def TMail.new_message_id( fqdn = nil )
- fqdn ||= ::Socket.gethostname
- "<#{random_tag()}@#{fqdn}.tmail>"
- end
-
- def TMail.random_tag
- @uniq += 1
- t = Time.now
- sprintf('%x%x_%x%x%d%x',
- t.to_i, t.tv_usec,
- $$, Thread.current.object_id, @uniq, rand(255))
- end
- private_class_method :random_tag
-
- @uniq = 0
-
-
- module TextUtils
-
- aspecial = '()<>[]:;.\\,"'
- tspecial = '()<>[];:\\,"/?='
- lwsp = " \t\r\n"
- control = '\x00-\x1f\x7f-\xff'
-
- ATOM_UNSAFE = /[#{Regexp.quote aspecial}#{control}#{lwsp}]/n
- PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n
- TOKEN_UNSAFE = /[#{Regexp.quote tspecial}#{control}#{lwsp}]/n
- CONTROL_CHAR = /[#{control}]/n
-
- def atom_safe?( str )
- not ATOM_UNSAFE === str
- end
-
- def quote_atom( str )
- (ATOM_UNSAFE === str) ? dquote(str) : str
- end
-
- def quote_phrase( str )
- (PHRASE_UNSAFE === str) ? dquote(str) : str
- end
-
- def token_safe?( str )
- not TOKEN_UNSAFE === str
- end
-
- def quote_token( str )
- (TOKEN_UNSAFE === str) ? dquote(str) : str
- end
-
- def dquote( str )
- '"' + str.gsub(/["\\]/n) {|s| '\\' + s } + '"'
- end
- private :dquote
-
-
- def join_domain( arr )
- arr.map {|i|
- if /\A\[.*\]\z/ === i
- i
- else
- quote_atom(i)
- end
- }.join('.')
- end
-
-
- ZONESTR_TABLE = {
- 'jst' => 9 * 60,
- 'eet' => 2 * 60,
- 'bst' => 1 * 60,
- 'met' => 1 * 60,
- 'gmt' => 0,
- 'utc' => 0,
- 'ut' => 0,
- 'nst' => -(3 * 60 + 30),
- 'ast' => -4 * 60,
- 'edt' => -4 * 60,
- 'est' => -5 * 60,
- 'cdt' => -5 * 60,
- 'cst' => -6 * 60,
- 'mdt' => -6 * 60,
- 'mst' => -7 * 60,
- 'pdt' => -7 * 60,
- 'pst' => -8 * 60,
- 'a' => -1 * 60,
- 'b' => -2 * 60,
- 'c' => -3 * 60,
- 'd' => -4 * 60,
- 'e' => -5 * 60,
- 'f' => -6 * 60,
- 'g' => -7 * 60,
- 'h' => -8 * 60,
- 'i' => -9 * 60,
- # j not use
- 'k' => -10 * 60,
- 'l' => -11 * 60,
- 'm' => -12 * 60,
- 'n' => 1 * 60,
- 'o' => 2 * 60,
- 'p' => 3 * 60,
- 'q' => 4 * 60,
- 'r' => 5 * 60,
- 's' => 6 * 60,
- 't' => 7 * 60,
- 'u' => 8 * 60,
- 'v' => 9 * 60,
- 'w' => 10 * 60,
- 'x' => 11 * 60,
- 'y' => 12 * 60,
- 'z' => 0 * 60
- }
-
- def timezone_string_to_unixtime( str )
- if m = /([\+\-])(\d\d?)(\d\d)/.match(str)
- sec = (m[2].to_i * 60 + m[3].to_i) * 60
- m[1] == '-' ? -sec : sec
- else
- min = ZONESTR_TABLE[str.downcase] or
- raise SyntaxError, "wrong timezone format '#{str}'"
- min * 60
- end
- end
-
-
- WDAY = %w( Sun Mon Tue Wed Thu Fri Sat TMailBUG )
- MONTH = %w( TMailBUG Jan Feb Mar Apr May Jun
- Jul Aug Sep Oct Nov Dec TMailBUG )
-
- def time2str( tm )
- # [ruby-list:7928]
- gmt = Time.at(tm.to_i)
- gmt.gmtime
- offset = tm.to_i - Time.local(*gmt.to_a[0,6].reverse).to_i
-
- # DO NOT USE strftime: setlocale() breaks it
- sprintf '%s, %s %s %d %02d:%02d:%02d %+.2d%.2d',
- WDAY[tm.wday], tm.mday, MONTH[tm.month],
- tm.year, tm.hour, tm.min, tm.sec,
- *(offset / 60).divmod(60)
- end
-
-
- MESSAGE_ID = /<[^\@>]+\@[^>\@]+>/
-
- def message_id?( str )
- MESSAGE_ID === str
- end
-
-
- MIME_ENCODED = /=\?[^\s?=]+\?[QB]\?[^\s?=]+\?=/i
-
- def mime_encoded?( str )
- MIME_ENCODED === str
- end
-
-
- def decode_params( hash )
- new = Hash.new
- encoded = nil
- hash.each do |key, value|
- if m = /\*(?:(\d+)\*)?\z/.match(key)
- ((encoded ||= {})[m.pre_match] ||= [])[(m[1] || 0).to_i] = value
- else
- new[key] = to_kcode(value)
- end
- end
- if encoded
- encoded.each do |key, strings|
- new[key] = decode_RFC2231(strings.join(''))
- end
- end
-
- new
- end
-
- NKF_FLAGS = {
- 'EUC' => '-e -m',
- 'SJIS' => '-s -m'
- }
-
- def to_kcode( str )
- flag = NKF_FLAGS[$KCODE] or return str
- NKF.nkf(flag, str)
- end
-
- RFC2231_ENCODED = /\A(?:iso-2022-jp|euc-jp|shift_jis|us-ascii)?'[a-z]*'/in
-
- def decode_RFC2231( str )
- m = RFC2231_ENCODED.match(str) or return str
- begin
- NKF.nkf(NKF_FLAGS[$KCODE],
- m.post_match.gsub(/%[\da-f]{2}/in) {|s| s[1,2].hex.chr })
- rescue
- m.post_match.gsub(/%[\da-f]{2}/in, "")
- end
- end
-
- end
-
-end
diff --git a/tracks/vendor/rails/actionmailer/lib/action_mailer/version.rb b/tracks/vendor/rails/actionmailer/lib/action_mailer/version.rb
deleted file mode 100644
index 21bc3f6a..00000000
--- a/tracks/vendor/rails/actionmailer/lib/action_mailer/version.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-module ActionMailer
- module VERSION #:nodoc:
- MAJOR = 1
- MINOR = 2
- TINY = 5
-
- STRING = [MAJOR, MINOR, TINY].join('.')
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/abstract_unit.rb b/tracks/vendor/rails/actionmailer/test/abstract_unit.rb
deleted file mode 100644
index 8a30e39a..00000000
--- a/tracks/vendor/rails/actionmailer/test/abstract_unit.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-require 'test/unit'
-
-$:.unshift "#{File.dirname(__FILE__)}/../lib"
-require 'action_mailer'
-
-# Show backtraces for deprecated behavior for quicker cleanup.
-ActiveSupport::Deprecation.debug = true
-
-$:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers"
-ActionMailer::Base.template_root = "#{File.dirname(__FILE__)}/fixtures"
-
-class MockSMTP
- def self.deliveries
- @@deliveries
- end
-
- def initialize
- @@deliveries = []
- end
-
- def sendmail(mail, from, to)
- @@deliveries << [mail, from, to]
- end
-end
-
-class Net::SMTP
- def self.start(*args)
- yield MockSMTP.new
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml
deleted file mode 100644
index da43638c..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-first mail
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml
deleted file mode 100644
index 378777f8..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-Hello, <%= person_name %>. Thanks for registering!
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml
deleted file mode 100644
index d5b8b285..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-This message brought to you by <%= name_of_the_mailer_class %>.
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml
deleted file mode 100644
index 96ec49d1..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-From "Romeo and Juliet":
-
-<%= block_format @text %>
-
-Good ol' Shakespeare.
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml
deleted file mode 100644
index 52ea9aa4..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-So, <%= test_format(@text) %>
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb b/tracks/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb
deleted file mode 100644
index f479820c..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module TestHelper
- def test_format(text)
- "#{text} "
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml
deleted file mode 100644
index 897a5065..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-Have a lovely picture, from me. Enjoy!
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml
deleted file mode 100644
index e69de29b..00000000
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email
deleted file mode 100644
index 43f7a59c..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email
+++ /dev/null
@@ -1,14 +0,0 @@
-From jamis_buck@byu.edu Mon May 2 16:07:05 2005
-Mime-Version: 1.0 (Apple Message framework v622)
-Content-Transfer-Encoding: base64
-Message-Id:
-Content-Type: text/plain;
- charset=EUC-KR;
- format=flowed
-To: willard15georgina@jamis.backpackit.com
-From: Jamis Buck
-Subject: =?EUC-KR?Q?NOTE:_=C7=D1=B1=B9=B8=BB=B7=CE_=C7=CF=B4=C2_=B0=CD?=
-Date: Mon, 2 May 2005 16:07:05 -0600
-
-tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin
-wLogSmFtaXPA1LTPtNku
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email10 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email10
deleted file mode 100644
index b1fc2b26..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email10
+++ /dev/null
@@ -1,20 +0,0 @@
-Return-Path:
-Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500
-Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500
-Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500
-Date: Tue, 10 May 2005 15:27:03 -0500
-From: xxx@xxxx.xxx
-Sender: xxx@xxxx.xxx
-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Message-Id:
-X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Delivered-To: xxx@xxxx.xxx
-Importance: normal
-Content-Type: text/plain; charset=X-UNKNOWN
-
-Test test. Hi. Waving. m
-
-----------------------------------------------------------------
-Sent via Bell Mobility's Text Messaging service.
-Envoyé par le service de messagerie texte de Bell Mobilité.
-----------------------------------------------------------------
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email11 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email11
deleted file mode 100644
index 8af74b87..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email11
+++ /dev/null
@@ -1,34 +0,0 @@
-From xxx@xxxx.com Wed Apr 27 14:15:31 2005
-Mime-Version: 1.0 (Apple Message framework v619.2)
-To: xxxxx@xxxxx
-Message-Id: <416eaebec6d333ec6939eaf8a7d80724@xxxxx>
-Content-Type: multipart/alternative;
- boundary=Apple-Mail-5-1037861608
-From: xxxxx@xxxxx
-Subject: worse when you use them.
-Date: Wed, 27 Apr 2005 14:15:31 -0700
-
-
-
-
---Apple-Mail-5-1037861608
-Content-Transfer-Encoding: 7bit
-Content-Type: text/plain;
- charset=US-ASCII;
- format=flowed
-
-
-XXXXX Xxxxx
-
---Apple-Mail-5-1037861608
-Content-Transfer-Encoding: 7bit
-Content-Type: text/enriched;
- charset=US-ASCII
-
-
-
-XXXXX Xxxxx
-
-
---Apple-Mail-5-1037861608--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email12 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email12
deleted file mode 100644
index 2cd31720..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email12
+++ /dev/null
@@ -1,32 +0,0 @@
-Mime-Version: 1.0 (Apple Message framework v730)
-Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151
-Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
-From: foo@example.com
-Subject: testing
-Date: Mon, 6 Jun 2005 22:21:22 +0200
-To: blah@example.com
-
-
---Apple-Mail-13-196941151
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/plain;
- charset=ISO-8859-1;
- delsp=yes;
- format=flowed
-
-This is the first part.
-
---Apple-Mail-13-196941151
-Content-Type: image/jpeg
-Content-Transfer-Encoding: base64
-Content-Location: Photo25.jpg
-Content-ID:
-Content-Disposition: inline
-
-jamisSqGSIb3DQEHAqCAMIjamisxCzAJBgUrDgMCGgUAMIAGCSqGSjamisEHAQAAoIIFSjCCBUYw
-ggQujamisQICBD++ukQwDQYJKojamisNAQEFBQAwMTELMAkGA1UEBhMCRjamisAKBgNVBAoTA1RE
-QzEUMBIGjamisxMLVERDIE9DRVMgQ0jamisNMDQwMjI5MTE1OTAxWhcNMDYwMjamisIyOTAxWjCB
-gDELMAkGA1UEjamisEsxKTAnBgNVBAoTIEjamisuIG9yZ2FuaXNhdG9yaXNrIHRpbjamisRuaW5=
-
---Apple-Mail-13-196941151--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email13 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email13
deleted file mode 100644
index 7d9314e3..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email13
+++ /dev/null
@@ -1,29 +0,0 @@
-Mime-Version: 1.0 (Apple Message framework v730)
-Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151
-Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
-From: foo@example.com
-Subject: testing
-Date: Mon, 6 Jun 2005 22:21:22 +0200
-To: blah@example.com
-
-
---Apple-Mail-13-196941151
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/plain;
- charset=ISO-8859-1;
- delsp=yes;
- format=flowed
-
-This is the first part.
-
---Apple-Mail-13-196941151
-Content-Type: text/x-ruby-script; name="hello.rb"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment;
- filename="api.rb"
-
-puts "Hello, world!"
-gets
-
---Apple-Mail-13-196941151--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email2 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email2
deleted file mode 100644
index 3999fcc8..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email2
+++ /dev/null
@@ -1,114 +0,0 @@
-From xxxxxxxxx.xxxxxxx@gmail.com Sun May 8 19:07:09 2005
-Return-Path:
-X-Original-To: xxxxx@xxxxx.xxxxxxxxx.com
-Delivered-To: xxxxx@xxxxx.xxxxxxxxx.com
-Received: from localhost (localhost [127.0.0.1])
- by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 06C9DA98D
- for ; Sun, 8 May 2005 19:09:13 +0000 (GMT)
-Received: from xxxxx.xxxxxxxxx.com ([127.0.0.1])
- by localhost (xxxxx.xxxxxxxxx.com [127.0.0.1]) (amavisd-new, port 10024)
- with LMTP id 88783-08 for ;
- Sun, 8 May 2005 19:09:12 +0000 (GMT)
-Received: from xxxxxxx.xxxxxxxxx.com (xxxxxxx.xxxxxxxxx.com [69.36.39.150])
- by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 10D8BA960
- for ; Sun, 8 May 2005 19:09:12 +0000 (GMT)
-Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199])
- by xxxxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 9EBC4148EAB
- for ; Sun, 8 May 2005 14:09:11 -0500 (CDT)
-Received: by zproxy.gmail.com with SMTP id 13so1233405nzp
- for ; Sun, 08 May 2005 12:09:11 -0700 (PDT)
-DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
- s=beta; d=gmail.com;
- h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references;
- b=cid1mzGEFa3gtRa06oSrrEYfKca2CTKu9sLMkWxjbvCsWMtp9RGEILjUz0L5RySdH5iO661LyNUoHRFQIa57bylAbXM3g2DTEIIKmuASDG3x3rIQ4sHAKpNxP7Pul+mgTaOKBv+spcH7af++QEJ36gHFXD2O/kx9RePs3JNf/K8=
-Received: by 10.36.10.16 with SMTP id 16mr1012493nzj;
- Sun, 08 May 2005 12:09:11 -0700 (PDT)
-Received: by 10.36.5.10 with HTTP; Sun, 8 May 2005 12:09:11 -0700 (PDT)
-Message-ID:
-Date: Sun, 8 May 2005 14:09:11 -0500
-From: xxxxxxxxx xxxxxxx
-Reply-To: xxxxxxxxx xxxxxxx
-To: xxxxx xxxx
-Subject: Fwd: Signed email causes file attachments
-In-Reply-To:
-Mime-Version: 1.0
-Content-Type: multipart/mixed;
- boundary="----=_Part_5028_7368284.1115579351471"
-References:
-
-------=_Part_5028_7368284.1115579351471
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: inline
-
-We should not include these files or vcards as attachments.
-
----------- Forwarded message ----------
-From: xxxxx xxxxxx
-Date: May 8, 2005 1:17 PM
-Subject: Signed email causes file attachments
-To: xxxxxxx@xxxxxxxxxx.com
-
-
-Hi,
-
-Just started to use my xxxxxxxx account (to set-up a GTD system,
-natch) and noticed that when I send content via email the signature/
-certificate from my email account gets added as a file (e.g.
-"smime.p7s").
-
-Obviously I can uncheck the signature option in the Mail compose
-window but how often will I remember to do that?
-
-Is there any way these kind of files could be ignored, e.g. via some
-sort of exclusions list?
-
-------=_Part_5028_7368284.1115579351471
-Content-Type: application/pkcs7-signature; name=smime.p7s
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="smime.p7s"
-
-MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGFDCCAs0w
-ggI2oAMCAQICAw5c+TANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
-d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
-YWlsIElzc3VpbmcgQ0EwHhcNMDUwMzI5MDkzOTEwWhcNMDYwMzI5MDkzOTEwWjBCMR8wHQYDVQQD
-ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBzbWhhdW5jaEBtYWMuY29t
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn90dPsYS3LjfMY211OSYrDQLzwNYPlAL
-7+/0XA+kdy8/rRnyEHFGwhNCDmg0B6pxC7z3xxJD/8GfCd+IYUUNUQV5m9MkxfP9pTVXZVIYLaBw
-o8xS3A0a1LXealcmlEbJibmKkEaoXci3MhryLgpaa+Kk/sH02SNatDO1vS28bPsibZpcc6deFrla
-hSYnL+PW54mDTGHIcCN2fbx/Y6qspzqmtKaXrv75NBtuy9cB6KzU4j2xXbTkAwz3pRSghJJaAwdp
-+yIivAD3vr0kJE3p+Ez34HMh33EXEpFoWcN+MCEQZD9WnmFViMrvfvMXLGVFQfAAcC060eGFSRJ1
-ZQ9UVQIDAQABoy0wKzAbBgNVHREEFDASgRBzbWhhdW5jaEBtYWMuY29tMAwGA1UdEwEB/wQCMAAw
-DQYJKoZIhvcNAQEEBQADgYEAQMrg1n2pXVWteP7BBj+Pk3UfYtbuHb42uHcLJjfjnRlH7AxnSwrd
-L3HED205w3Cq8T7tzVxIjRRLO/ljq0GedSCFBky7eYo1PrXhztGHCTSBhsiWdiyLWxKlOxGAwJc/
-lMMnwqLOdrQcoF/YgbjeaUFOQbUh94w9VDNpWZYCZwcwggM/MIICqKADAgECAgENMA0GCSqGSIb3
-DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlD
-YXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0
-aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwg
-Q0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3
-MDAwMDAwWhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENv
-bnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElz
-c3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUEcJ3f
-6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/EfkTYk
-KhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMBAAGj
-gZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3JsLnRo
-YXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYwKQYDVR0R
-BCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEBBQUAA4GBAEiM
-0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9reFhYsPZOhl+hLGZ
-GwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo05RAaWzVNd+NWIXiC3CEZ
-Nd4ksdMdRv9dX2VPMYIC5zCCAuMCAQEwaTBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3Rl
-IENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWls
-IElzc3VpbmcgQ0ECAw5c+TAJBgUrDgMCGgUAoIIBUzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcB
-MBwGCSqGSIb3DQEJBTEPFw0wNTA1MDgxODE3NDZaMCMGCSqGSIb3DQEJBDEWBBQSkG9j6+hB0pKp
-fV9tCi/iP59sNTB4BgkrBgEEAYI3EAQxazBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3
-dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h
-aWwgSXNzdWluZyBDQQIDDlz5MHoGCyqGSIb3DQEJEAILMWugaTBiMQswCQYDVQQGEwJaQTElMCMG
-A1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
-bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw5c+TANBgkqhkiG9w0BAQEFAASCAQAm1GeF7dWfMvrW
-8yMPjkhE+R8D1DsiCoWSCp+5gAQm7lcK7V3KrZh5howfpI3TmCZUbbaMxOH+7aKRKpFemxoBY5Q8
-rnCkbpg/++/+MI01T69hF/rgMmrGcrv2fIYy8EaARLG0xUVFSZHSP+NQSYz0TTmh4cAESHMzY3JA
-nHOoUkuPyl8RXrimY1zn0lceMXlweZRouiPGuPNl1hQKw8P+GhOC5oLlM71UtStnrlk3P9gqX5v7
-Tj7Hx057oVfY8FMevjxGwU3EK5TczHezHbWWgTyum9l2ZQbUQsDJxSniD3BM46C1VcbDLPaotAZ0
-fTYLZizQfm5hcWEbfYVzkSzLAAAAAAAA
-------=_Part_5028_7368284.1115579351471--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email3 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email3
deleted file mode 100644
index 771a9635..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email3
+++ /dev/null
@@ -1,70 +0,0 @@
-From xxxx@xxxx.com Tue May 10 11:28:07 2005
-Return-Path:
-X-Original-To: xxxx@xxxx.com
-Delivered-To: xxxx@xxxx.com
-Received: from localhost (localhost [127.0.0.1])
- by xxx.xxxxx.com (Postfix) with ESMTP id 50FD3A96F
- for ; Tue, 10 May 2005 17:26:50 +0000 (GMT)
-Received: from xxx.xxxxx.com ([127.0.0.1])
- by localhost (xxx.xxxxx.com [127.0.0.1]) (amavisd-new, port 10024)
- with LMTP id 70060-03 for ;
- Tue, 10 May 2005 17:26:49 +0000 (GMT)
-Received: from xxx.xxxxx.com (xxx.xxxxx.com [69.36.39.150])
- by xxx.xxxxx.com (Postfix) with ESMTP id 8B957A94B
- for ; Tue, 10 May 2005 17:26:48 +0000 (GMT)
-Received: from xxx.xxxxx.com (xxx.xxxxx.com [64.233.184.203])
- by xxx.xxxxx.com (Postfix) with ESMTP id 9972514824C
- for ; Tue, 10 May 2005 12:26:40 -0500 (CDT)
-Received: by xxx.xxxxx.com with SMTP id 68so1694448wri
- for ; Tue, 10 May 2005 10:26:40 -0700 (PDT)
-DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
- s=beta; d=xxxxx.com;
- h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type;
- b=g8ZO5ttS6GPEMAz9WxrRk9+9IXBUfQIYsZLL6T88+ECbsXqGIgfGtzJJFn6o9CE3/HMrrIGkN5AisxVFTGXWxWci5YA/7PTVWwPOhJff5BRYQDVNgRKqMl/SMttNrrRElsGJjnD1UyQ/5kQmcBxq2PuZI5Zc47u6CILcuoBcM+A=
-Received: by 10.54.96.19 with SMTP id t19mr621017wrb;
- Tue, 10 May 2005 10:26:39 -0700 (PDT)
-Received: by 10.54.110.5 with HTTP; Tue, 10 May 2005 10:26:39 -0700 (PDT)
-Message-ID:
-Date: Tue, 10 May 2005 11:26:39 -0600
-From: Test Tester
-Reply-To: Test Tester
-To: xxxx@xxxx.com, xxxx@xxxx.com
-Subject: Another PDF
-Mime-Version: 1.0
-Content-Type: multipart/mixed;
- boundary="----=_Part_2192_32400445.1115745999735"
-X-Virus-Scanned: amavisd-new at textdrive.com
-
-------=_Part_2192_32400445.1115745999735
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: inline
-
-Just attaching another PDF, here, to see what the message looks like,
-and to see if I can figure out what is going wrong here.
-
-------=_Part_2192_32400445.1115745999735
-Content-Type: application/pdf; name="broken.pdf"
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="broken.pdf"
-
-JVBERi0xLjQNCiXk9tzfDQoxIDAgb2JqDQo8PCAvTGVuZ3RoIDIgMCBSDQogICAvRmlsdGVyIC9G
-bGF0ZURlY29kZQ0KPj4NCnN0cmVhbQ0KeJy9Wt2KJbkNvm/od6jrhZxYln9hWEh2p+8HBvICySaE
-ycLuTV4/1ifJ9qnq09NpSBimu76yLUuy/qzqcPz7+em3Ixx/CDc6CsXxs3b5+fvfjr/8cPz6/BRu
-rbfAx/n3739/fuJylJ5u5fjX81OuDr4deK4Bz3z/aDP+8fz0yw8g0Ofq7ktr1Mn+u28rvhy/jVeD
-QSa+9YNKHP/pxjvDNfVAx/m3MFz54FhvTbaseaxiDoN2LeMVMw+yA7RbHSCDzxZuaYB2E1Yay7QU
-x89vz0+tyFDKMlAHK5yqLmnjF+c4RjEiQIUeKwblXMe+AsZjN1J5yGQL5DHpDHksurM81rF6PKab
-gK6zAarIDzIiUY23rJsN9iorAE816aIu6lsgAdQFsuhhkHOUFgVjp2GjMqSewITXNQ27jrMeamkg
-1rPI3iLWG2CIaSBB+V1245YVRICGbbpYKHc2USFDl6M09acQVQYhlwIrkBNLISvXhGlF1wi5FHCw
-wxZkoGNJlVeJCEsqKA+3YAV5AMb6KkeaqEJQmFKKQU8T1pRi2ihE1Y4CDrqoYFFXYjJJOatsyzuI
-8SIlykuxKTMibWK8H1PgEvqYgs4GmQSrEjJAalgGirIhik+p4ZQN9E3ETFPAHE1b8pp1l/0Rc1gl
-fQs0ABWvyoZZzU8VnPXwVVcO9BEsyjEJaO6eBoZRyKGlrKoYoOygA8BGIzgwN3RQ15ouigG5idZQ
-fx2U4Db2CqiLO0WHAZoylGiCAqhniNQjFjQPSkmjwfNTgQ6M1Ih+eWo36wFmjIxDJZiGUBiWsAyR
-xX3EekGOizkGI96Ol9zVZTAivikURhRsHh2E3JhWMpSTZCnnonrLhMCodgrNcgo4uyJUJc6qnVss
-nrGd1Ptr0YwisCOYyIbUwVjV4xBUNLbguSO2YHujonAMJkMdSI7bIw91Akq2AUlMUWGFTMAOamjU
-OvZQCxIkY2pCpMFo/IwLdVLHs6nddwTRrgoVbvLU9eB0G4EMndV0TNoxHbt3JBWwK6hhv3iHfDtF
-yokB302IpEBTnWICde4uYc/1khDbSIkQopO6lcqamGBu1OSE3N5IPSsZX00CkSHRiiyx6HQIShsS
-HSVNswdVsaOUSAWq9aYhDtGDaoG5a3lBGkYt/lFlBFt1UqrYnzVtUpUQnLiZeouKgf1KhRBViRRk
-ExepJCzTwEmFDalIRbLEGtw0gfpESOpIAF/NnpPzcVCG86s0g2DuSyd41uhNGbEgaSrWEXORErbw
-------=_Part_2192_32400445.1115745999735--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email4 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email4
deleted file mode 100644
index 639ad40e..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email4
+++ /dev/null
@@ -1,59 +0,0 @@
-Return-Path:
-Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id 6AAEE3B4D23 for ; Sun, 8 May 2005 12:30:23 -0500
-Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id j48HUC213279 for ; Sun, 8 May 2005 12:30:13 -0500
-Received: from conversion-xxx.xxxx.xxx.net by xxx.xxxx.xxx id <0IG600901LQ64I@xxx.xxxx.xxx> for ; Sun, 8 May 2005 12:30:12 -0500
-Received: from agw1 by xxx.xxxx.xxx with ESMTP id <0IG600JFYLYCAxxx@xxxx.xxx> for ; Sun, 8 May 2005 12:30:12 -0500
-Date: Sun, 8 May 2005 12:30:08 -0500
-From: xxx@xxxx.xxx
-To: xxx@xxxx.xxx
-Message-Id: <7864245.1115573412626.JavaMxxx@xxxx.xxx>
-Subject: Filth
-Mime-Version: 1.0
-Content-Type: multipart/mixed; boundary=mimepart_427e4cb4ca329_133ae40413c81ef
-X-Mms-Priority: 1
-X-Mms-Transaction-Id: 3198421808-0
-X-Mms-Message-Type: 0
-X-Mms-Sender-Visibility: 1
-X-Mms-Read-Reply: 1
-X-Original-To: xxx@xxxx.xxx
-X-Mms-Message-Class: 0
-X-Mms-Delivery-Report: 0
-X-Mms-Mms-Version: 16
-Delivered-To: xxx@xxxx.xxx
-X-Nokia-Ag-Version: 2.0
-
-This is a multi-part message in MIME format.
-
---mimepart_427e4cb4ca329_133ae40413c81ef
-Content-Type: multipart/mixed; boundary=mimepart_427e4cb4cbd97_133ae40413c8217
-
-
-
---mimepart_427e4cb4cbd97_133ae40413c8217
-Content-Type: text/plain; charset=utf-8
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline
-Content-Location: text.txt
-
-Some text
-
---mimepart_427e4cb4cbd97_133ae40413c8217--
-
---mimepart_427e4cb4ca329_133ae40413c81ef
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-
---
-This Orange Multi Media Message was sent wirefree from an Orange
-MMS phone. If you would like to reply, please text or phone the
-sender directly by using the phone number listed in the sender's
-address. To learn more about Orange's Multi Media Messaging
-Service, find us on the Web at xxx.xxxx.xxx.uk/mms
-
-
---mimepart_427e4cb4ca329_133ae40413c81ef
-
-
---mimepart_427e4cb4ca329_133ae40413c81ef-
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email5 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email5
deleted file mode 100644
index 151c6314..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email5
+++ /dev/null
@@ -1,19 +0,0 @@
-Return-Path:
-Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500
-Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500
-Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500
-Date: Tue, 10 May 2005 15:27:03 -0500
-From: xxx@xxxx.xxx
-Sender: xxx@xxxx.xxx
-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Message-Id:
-X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Delivered-To: xxx@xxxx.xxx
-Importance: normal
-
-Test test. Hi. Waving. m
-
-----------------------------------------------------------------
-Sent via Bell Mobility's Text Messaging service.
-Envoyé par le service de messagerie texte de Bell Mobilité.
-----------------------------------------------------------------
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email6 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email6
deleted file mode 100644
index 93289c4f..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email6
+++ /dev/null
@@ -1,20 +0,0 @@
-Return-Path:
-Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500
-Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500
-Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500
-Date: Tue, 10 May 2005 15:27:03 -0500
-From: xxx@xxxx.xxx
-Sender: xxx@xxxx.xxx
-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Message-Id:
-X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx
-Delivered-To: xxx@xxxx.xxx
-Importance: normal
-Content-Type: text/plain; charset=us-ascii
-
-Test test. Hi. Waving. m
-
-----------------------------------------------------------------
-Sent via Bell Mobility's Text Messaging service.
-Envoyé par le service de messagerie texte de Bell Mobilité.
-----------------------------------------------------------------
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email7 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email7
deleted file mode 100644
index da64ada8..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email7
+++ /dev/null
@@ -1,66 +0,0 @@
-Mime-Version: 1.0 (Apple Message framework v730)
-Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151
-Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
-From: foo@example.com
-Subject: testing
-Date: Mon, 6 Jun 2005 22:21:22 +0200
-To: blah@example.com
-
-
---Apple-Mail-13-196941151
-Content-Type: multipart/mixed;
- boundary=Apple-Mail-12-196940926
-
-
---Apple-Mail-12-196940926
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/plain;
- charset=ISO-8859-1;
- delsp=yes;
- format=flowed
-
-This is the first part.
-
---Apple-Mail-12-196940926
-Content-Transfer-Encoding: 7bit
-Content-Type: text/x-ruby-script;
- x-unix-mode=0666;
- name="test.rb"
-Content-Disposition: attachment;
- filename=test.rb
-
-puts "testing, testing"
-
---Apple-Mail-12-196940926
-Content-Transfer-Encoding: base64
-Content-Type: application/pdf;
- x-unix-mode=0666;
- name="test.pdf"
-Content-Disposition: inline;
- filename=test.pdf
-
-YmxhaCBibGFoIGJsYWg=
-
---Apple-Mail-12-196940926
-Content-Transfer-Encoding: 7bit
-Content-Type: text/plain;
- charset=US-ASCII;
- format=flowed
-
-
-
---Apple-Mail-12-196940926--
-
---Apple-Mail-13-196941151
-Content-Transfer-Encoding: base64
-Content-Type: application/pkcs7-signature;
- name=smime.p7s
-Content-Disposition: attachment;
- filename=smime.p7s
-
-jamisSqGSIb3DQEHAqCAMIjamisxCzAJBgUrDgMCGgUAMIAGCSqGSjamisEHAQAAoIIFSjCCBUYw
-ggQujamisQICBD++ukQwDQYJKojamisNAQEFBQAwMTELMAkGA1UEBhMCRjamisAKBgNVBAoTA1RE
-QzEUMBIGjamisxMLVERDIE9DRVMgQ0jamisNMDQwMjI5MTE1OTAxWhcNMDYwMjamisIyOTAxWjCB
-gDELMAkGA1UEjamisEsxKTAnBgNVBAoTIEjamisuIG9yZ2FuaXNhdG9yaXNrIHRpbjamisRuaW5=
-
---Apple-Mail-13-196941151--
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email8 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email8
deleted file mode 100644
index 2382dfdf..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email8
+++ /dev/null
@@ -1,47 +0,0 @@
-From xxxxxxxxx.xxxxxxx@gmail.com Sun May 8 19:07:09 2005
-Return-Path:
-Message-ID:
-Date: Sun, 8 May 2005 14:09:11 -0500
-From: xxxxxxxxx xxxxxxx
-Reply-To: xxxxxxxxx xxxxxxx
-To: xxxxx xxxx
-Subject: Fwd: Signed email causes file attachments
-In-Reply-To:
-Mime-Version: 1.0
-Content-Type: multipart/mixed;
- boundary="----=_Part_5028_7368284.1115579351471"
-References:
-
-------=_Part_5028_7368284.1115579351471
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: inline
-
-We should not include these files or vcards as attachments.
-
----------- Forwarded message ----------
-From: xxxxx xxxxxx
-Date: May 8, 2005 1:17 PM
-Subject: Signed email causes file attachments
-To: xxxxxxx@xxxxxxxxxx.com
-
-
-Hi,
-
-Test attachments oddly encoded with japanese charset.
-
-
-------=_Part_5028_7368284.1115579351471
-Content-Type: application/octet-stream; name*=iso-2022-jp'ja'01%20Quien%20Te%20Dij%8aat.%20Pitbull.mp3
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment
-
-MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGFDCCAs0w
-ggI2oAMCAQICAw5c+TANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
-d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
-YWlsIElzc3VpbmcgQ0EwHhcNMDUwMzI5MDkzOTEwWhcNMDYwMzI5MDkzOTEwWjBCMR8wHQYDVQQD
-ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBzbWhhdW5jaEBtYWMuY29t
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn90dPsYS3LjfMY211OSYrDQLzwNYPlAL
-7+/0XA+kdy8/rRnyEHFGwhNCDmg0B6pxC7z3xxJD/8GfCd+IYUUNUQV5m9MkxfP9pTVXZVIYLaBw
-------=_Part_5028_7368284.1115579351471--
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email9 b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email9
deleted file mode 100644
index 8b9b1eaa..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email9
+++ /dev/null
@@ -1,28 +0,0 @@
-Received: from xxx.xxx.xxx ([xxx.xxx.xxx.xxx] verified)
- by xxx.com (CommuniGate Pro SMTP 4.2.8)
- with SMTP id 2532598 for xxx@xxx.com; Wed, 23 Feb 2005 17:51:49 -0500
-Received-SPF: softfail
- receiver=xxx.com; client-ip=xxx.xxx.xxx.xxx; envelope-from=xxx@xxx.xxx
-quite Delivered-To: xxx@xxx.xxx
-Received: by xxx.xxx.xxx (Wostfix, from userid xxx)
- id 0F87F333; Wed, 23 Feb 2005 16:16:17 -0600
-Date: Wed, 23 Feb 2005 18:20:17 -0400
-From: "xxx xxx"
-Message-ID: <4D6AA7EB.6490534@xxx.xxx>
-To: xxx@xxx.com
-Subject: Stop adware/spyware once and for all.
-X-Scanned-By: MIMEDefang 2.11 (www dot roaringpenguin dot com slash mimedefang)
-
-You are infected with:
-Ad Ware and Spy Ware
-
-Get your free scan and removal download now,
-before it gets any worse.
-
-http://xxx.xxx.info?aid=3D13&?stat=3D4327kdzt
-
-
-
-
-no more? (you will still be infected)
-http://xxx.xxx.info/discon/?xxx@xxx.com
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a
deleted file mode 100644
index 8a2c25a5..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a
+++ /dev/null
@@ -1,14 +0,0 @@
-Mime-Version: 1.0 (Apple Message framework v730)
-Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
-From: foo@example.com
-Subject: testing
-Date: Mon, 6 Jun 2005 22:21:22 +0200
-To: blah@example.com
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/plain
-
-A fax has arrived from remote ID ''.=0D=0A-----------------------=
--------------------------------------=0D=0ATime: 3/9/2006 3:50:52=
- PM=0D=0AReceived from remote ID: =0D=0AInbound user ID XXXXXXXXXX, r=
-outing code XXXXXXXXX=0D=0AResult: (0/352;0/0) Successful Send=0D=0AP=
-age record: 1 - 1=0D=0AElapsed time: 00:58 on channel 11=0D=0A
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject b/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject
deleted file mode 100644
index e86108da..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject
+++ /dev/null
@@ -1,14 +0,0 @@
-From jamis@37signals.com Mon May 2 16:07:05 2005
-Mime-Version: 1.0 (Apple Message framework v622)
-Content-Transfer-Encoding: base64
-Message-Id:
-Content-Type: text/plain;
- charset=EUC-KR;
- format=flowed
-To: jamis@37signals.com
-From: Jamis Buck
-Subject: Re: Test: =?UTF-8?B?Iua8ouWtlyI=?= mid =?UTF-8?B?Iua8ouWtlyI=?= tail
-Date: Mon, 2 May 2005 16:07:05 -0600
-
-tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin
-wLogSmFtaXPA1LTPtNku
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml
deleted file mode 100644
index 9a540106..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-second mail
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml
deleted file mode 100644
index a85d5fa4..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Hello there,
-
-Mr. <%= @recipient %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml
deleted file mode 100644
index 6940419d..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-Ignored when searching for implicitly multipart parts.
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak
deleted file mode 100644
index 6940419d..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak
+++ /dev/null
@@ -1 +0,0 @@
-Ignored when searching for implicitly multipart parts.
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml
deleted file mode 100644
index 946d99ed..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- HTML formatted message to <%= @recipient %> .
-
-
-
-
- HTML formatted message to <%= @recipient %> .
-
-
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml
deleted file mode 100644
index a6c8d54c..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-Plain text to <%= @recipient %>.
-Plain text to <%= @recipient %>.
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml
deleted file mode 100644
index c14348c7..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-yaml to: <%= @recipient %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml
deleted file mode 100644
index a85d5fa4..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Hello there,
-
-Mr. <%= @recipient %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml b/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml
deleted file mode 100644
index e8fb65d4..00000000
--- a/tracks/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Hello there,
-
-Mr. <%= @recipient %>. Please see our greeting at <%= @welcome_url %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionmailer/test/mail_helper_test.rb b/tracks/vendor/rails/actionmailer/test/mail_helper_test.rb
deleted file mode 100644
index 19f3707d..00000000
--- a/tracks/vendor/rails/actionmailer/test/mail_helper_test.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-
-module MailerHelper
- def person_name
- "Mr. Joe Person"
- end
-end
-
-class HelperMailer < ActionMailer::Base
- helper MailerHelper
- helper :test
-
- def use_helper(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- end
-
- def use_test_helper(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- self.body = { :text => "emphasize me!" }
- end
-
- def use_mail_helper(recipient)
- recipients recipient
- subject "using mailing helpers"
- from "tester@example.com"
- self.body = { :text =>
- "But soft! What light through yonder window breaks? It is the east, " +
- "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " +
- "which is sick and pale with grief that thou, her maid, art far more " +
- "fair than she. Be not her maid, for she is envious! Her vestal " +
- "livery is but sick and green, and none but fools do wear it. Cast " +
- "it off!"
- }
- end
-
- def use_helper_method(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- self.body = { :text => "emphasize me!" }
- end
-
- private
-
- def name_of_the_mailer_class
- self.class.name
- end
- helper_method :name_of_the_mailer_class
-end
-
-class MailerHelperTest < Test::Unit::TestCase
- def new_mail( charset="utf-8" )
- mail = TMail::Mail.new
- mail.set_content_type "text", "plain", { "charset" => charset } if charset
- mail
- end
-
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @recipient = 'test@localhost'
- end
-
- def test_use_helper
- mail = HelperMailer.create_use_helper(@recipient)
- assert_match %r{Mr. Joe Person}, mail.encoded
- end
-
- def test_use_test_helper
- mail = HelperMailer.create_use_test_helper(@recipient)
- assert_match %r{emphasize me!}, mail.encoded
- end
-
- def test_use_helper_method
- mail = HelperMailer.create_use_helper_method(@recipient)
- assert_match %r{HelperMailer}, mail.encoded
- end
-
- def test_use_mail_helper
- mail = HelperMailer.create_use_mail_helper(@recipient)
- assert_match %r{ But soft!}, mail.encoded
- assert_match %r{east, and\n Juliet}, mail.encoded
- end
-end
-
diff --git a/tracks/vendor/rails/actionmailer/test/mail_render_test.rb b/tracks/vendor/rails/actionmailer/test/mail_render_test.rb
deleted file mode 100644
index 42454fef..00000000
--- a/tracks/vendor/rails/actionmailer/test/mail_render_test.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-
-class RenderMailer < ActionMailer::Base
- def inline_template(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- body render(:inline => "Hello, <%= @world %>", :body => { :world => "Earth" })
- end
-
- def file_template(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- body render(:file => "signed_up", :body => { :recipient => recipient })
- end
-
- def initialize_defaults(method_name)
- super
- mailer_name "test_mailer"
- end
-end
-
-class FirstMailer < ActionMailer::Base
- def share(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- end
-end
-
-class SecondMailer < ActionMailer::Base
- def share(recipient)
- recipients recipient
- subject "using helpers"
- from "tester@example.com"
- end
-end
-
-class RenderHelperTest < Test::Unit::TestCase
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @recipient = 'test@localhost'
- end
-
- def test_inline_template
- mail = RenderMailer.create_inline_template(@recipient)
- assert_equal "Hello, Earth", mail.body.strip
- end
-
- def test_file_template
- mail = RenderMailer.create_file_template(@recipient)
- assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip
- end
-end
-
-class FirstSecondHelperTest < Test::Unit::TestCase
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @recipient = 'test@localhost'
- end
-
- def test_ordering
- mail = FirstMailer.create_share(@recipient)
- assert_equal "first mail", mail.body.strip
- mail = SecondMailer.create_share(@recipient)
- assert_equal "second mail", mail.body.strip
- mail = FirstMailer.create_share(@recipient)
- assert_equal "first mail", mail.body.strip
- mail = SecondMailer.create_share(@recipient)
- assert_equal "second mail", mail.body.strip
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/mail_service_test.rb b/tracks/vendor/rails/actionmailer/test/mail_service_test.rb
deleted file mode 100755
index ccded61b..00000000
--- a/tracks/vendor/rails/actionmailer/test/mail_service_test.rb
+++ /dev/null
@@ -1,803 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-
-class FunkyPathMailer < ActionMailer::Base
- self.template_root = "#{File.dirname(__FILE__)}/fixtures/path.with.dots"
-
- def multipart_with_template_path_with_dots(recipient)
- recipients recipient
- subject "Have a lovely picture"
- from "Chad Fowler "
- attachment :content_type => "image/jpeg",
- :body => "not really a jpeg, we're only testing, after all"
- end
-end
-
-class TestMailer < ActionMailer::Base
- def signed_up(recipient)
- @recipients = recipient
- @subject = "[Signed up] Welcome #{recipient}"
- @from = "system@loudthinking.com"
- @sent_on = Time.local(2004, 12, 12)
- @body["recipient"] = recipient
- end
-
- def cancelled_account(recipient)
- self.recipients = recipient
- self.subject = "[Cancelled] Goodbye #{recipient}"
- self.from = "system@loudthinking.com"
- self.sent_on = Time.local(2004, 12, 12)
- self.body = "Goodbye, Mr. #{recipient}"
- end
-
- def cc_bcc(recipient)
- recipients recipient
- subject "testing bcc/cc"
- from "system@loudthinking.com"
- sent_on Time.local(2004, 12, 12)
- cc "nobody@loudthinking.com"
- bcc "root@loudthinking.com"
- body "Nothing to see here."
- end
-
- def iso_charset(recipient)
- @recipients = recipient
- @subject = "testing isø charsets"
- @from = "system@loudthinking.com"
- @sent_on = Time.local 2004, 12, 12
- @cc = "nobody@loudthinking.com"
- @bcc = "root@loudthinking.com"
- @body = "Nothing to see here."
- @charset = "iso-8859-1"
- end
-
- def unencoded_subject(recipient)
- @recipients = recipient
- @subject = "testing unencoded subject"
- @from = "system@loudthinking.com"
- @sent_on = Time.local 2004, 12, 12
- @cc = "nobody@loudthinking.com"
- @bcc = "root@loudthinking.com"
- @body = "Nothing to see here."
- end
-
- def extended_headers(recipient)
- @recipients = recipient
- @subject = "testing extended headers"
- @from = "Grytøyr "
- @sent_on = Time.local 2004, 12, 12
- @cc = "Grytøyr "
- @bcc = "Grytøyr "
- @body = "Nothing to see here."
- @charset = "iso-8859-1"
- end
-
- def utf8_body(recipient)
- @recipients = recipient
- @subject = "testing utf-8 body"
- @from = "Foo áëô îü "
- @sent_on = Time.local 2004, 12, 12
- @cc = "Foo áëô îü "
- @bcc = "Foo áëô îü "
- @body = "åœö blah"
- @charset = "utf-8"
- end
-
- def multipart_with_mime_version(recipient)
- recipients recipient
- subject "multipart with mime_version"
- from "test@example.com"
- sent_on Time.local(2004, 12, 12)
- mime_version "1.1"
- content_type "multipart/alternative"
-
- part "text/plain" do |p|
- p.body = "blah"
- end
-
- part "text/html" do |p|
- p.body = "blah "
- end
- end
-
- def multipart_with_utf8_subject(recipient)
- recipients recipient
- subject "Foo áëô îü"
- from "test@example.com"
- charset "utf-8"
-
- part "text/plain" do |p|
- p.body = "blah"
- end
-
- part "text/html" do |p|
- p.body = "blah "
- end
- end
-
- def explicitly_multipart_example(recipient, ct=nil)
- recipients recipient
- subject "multipart example"
- from "test@example.com"
- sent_on Time.local(2004, 12, 12)
- body "plain text default"
- content_type ct if ct
-
- part "text/html" do |p|
- p.charset = "iso-8859-1"
- p.body = "blah"
- end
-
- attachment :content_type => "image/jpeg", :filename => "foo.jpg",
- :body => "123456789"
- end
-
- def implicitly_multipart_example(recipient, cs = nil, order = nil)
- @recipients = recipient
- @subject = "multipart example"
- @from = "test@example.com"
- @sent_on = Time.local 2004, 12, 12
- @body = { "recipient" => recipient }
- @charset = cs if cs
- @implicit_parts_order = order if order
- end
-
- def implicitly_multipart_with_utf8
- recipients "no.one@nowhere.test"
- subject "Foo áëô îü"
- from "some.one@somewhere.test"
- template "implicitly_multipart_example"
- body ({ "recipient" => "no.one@nowhere.test" })
- end
-
- def html_mail(recipient)
- recipients recipient
- subject "html mail"
- from "test@example.com"
- body "Emphasize this "
- content_type "text/html"
- end
-
- def html_mail_with_underscores(recipient)
- subject "html mail with underscores"
- body %{_Google }
- end
-
- def custom_template(recipient)
- recipients recipient
- subject "[Signed up] Welcome #{recipient}"
- from "system@loudthinking.com"
- sent_on Time.local(2004, 12, 12)
- template "signed_up"
-
- body["recipient"] = recipient
- end
-
- def various_newlines(recipient)
- recipients recipient
- subject "various newlines"
- from "test@example.com"
- body "line #1\nline #2\rline #3\r\nline #4\r\r" +
- "line #5\n\nline#6\r\n\r\nline #7"
- end
-
- def various_newlines_multipart(recipient)
- recipients recipient
- subject "various newlines multipart"
- from "test@example.com"
- content_type "multipart/alternative"
- part :content_type => "text/plain", :body => "line #1\nline #2\rline #3\r\nline #4\r\r"
- part :content_type => "text/html", :body => "line #1
\nline #2
\rline #3
\r\nline #4
\r\r"
- end
-
- def nested_multipart(recipient)
- recipients recipient
- subject "nested multipart"
- from "test@example.com"
- content_type "multipart/mixed"
- part :content_type => "multipart/alternative", :content_disposition => "inline", :headers => { "foo" => "bar" } do |p|
- p.part :content_type => "text/plain", :body => "test text\nline #2"
- p.part :content_type => "text/html", :body => "test HTML \nline #2"
- end
- attachment :content_type => "application/octet-stream",:filename => "test.txt", :body => "test abcdefghijklmnopqstuvwxyz"
- end
-
- def attachment_with_custom_header(recipient)
- recipients recipient
- subject "custom header in attachment"
- from "test@example.com"
- content_type "multipart/related"
- part :content_type => "text/html", :body => 'yo'
- attachment :content_type => "image/jpeg",:filename => "test.jpeg", :body => "i am not a real picture", :headers => { 'Content-ID' => '' }
- end
-
- def unnamed_attachment(recipient)
- recipients recipient
- subject "nested multipart"
- from "test@example.com"
- content_type "multipart/mixed"
- part :content_type => "text/plain", :body => "hullo"
- attachment :content_type => "application/octet-stream", :body => "test abcdefghijklmnopqstuvwxyz"
- end
-
- def headers_with_nonalpha_chars(recipient)
- recipients recipient
- subject "nonalpha chars"
- from "One: Two "
- cc "Three: Four "
- bcc "Five: Six "
- body "testing"
- end
-
- def custom_content_type_attributes
- recipients "no.one@nowhere.test"
- subject "custom content types"
- from "some.one@somewhere.test"
- content_type "text/plain; format=flowed"
- body "testing"
- end
-
- class < charset }
- end
- mail
- end
-
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @recipient = 'test@localhost'
- end
-
- def test_nested_parts
- created = nil
- assert_nothing_raised { created = TestMailer.create_nested_multipart(@recipient)}
- assert_equal 2,created.parts.size
- assert_equal 2,created.parts.first.parts.size
-
- assert_equal "multipart/mixed", created.content_type
- assert_equal "multipart/alternative", created.parts.first.content_type
- assert_equal "bar", created.parts.first.header['foo'].to_s
- assert_equal "text/plain", created.parts.first.parts.first.content_type
- assert_equal "text/html", created.parts.first.parts[1].content_type
- assert_equal "application/octet-stream", created.parts[1].content_type
- end
-
- def test_attachment_with_custom_header
- created = nil
- assert_nothing_raised { created = TestMailer.create_attachment_with_custom_header(@recipient)}
- assert_equal "", created.parts[1].header['content-id'].to_s
- end
-
- def test_signed_up
- expected = new_mail
- expected.to = @recipient
- expected.subject = "[Signed up] Welcome #{@recipient}"
- expected.body = "Hello there, \n\nMr. #{@recipient}"
- expected.from = "system@loudthinking.com"
- expected.date = Time.local(2004, 12, 12)
-
- created = nil
- assert_nothing_raised { created = TestMailer.create_signed_up(@recipient) }
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised { TestMailer.deliver_signed_up(@recipient) }
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_custom_template
- expected = new_mail
- expected.to = @recipient
- expected.subject = "[Signed up] Welcome #{@recipient}"
- expected.body = "Hello there, \n\nMr. #{@recipient}"
- expected.from = "system@loudthinking.com"
- expected.date = Time.local(2004, 12, 12)
-
- created = nil
- assert_nothing_raised { created = TestMailer.create_custom_template(@recipient) }
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
- end
-
- def test_cancelled_account
- expected = new_mail
- expected.to = @recipient
- expected.subject = "[Cancelled] Goodbye #{@recipient}"
- expected.body = "Goodbye, Mr. #{@recipient}"
- expected.from = "system@loudthinking.com"
- expected.date = Time.local(2004, 12, 12)
-
- created = nil
- assert_nothing_raised { created = TestMailer.create_cancelled_account(@recipient) }
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised { TestMailer.deliver_cancelled_account(@recipient) }
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_cc_bcc
- expected = new_mail
- expected.to = @recipient
- expected.subject = "testing bcc/cc"
- expected.body = "Nothing to see here."
- expected.from = "system@loudthinking.com"
- expected.cc = "nobody@loudthinking.com"
- expected.bcc = "root@loudthinking.com"
- expected.date = Time.local 2004, 12, 12
-
- created = nil
- assert_nothing_raised do
- created = TestMailer.create_cc_bcc @recipient
- end
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised do
- TestMailer.deliver_cc_bcc @recipient
- end
-
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_iso_charset
- expected = new_mail( "iso-8859-1" )
- expected.to = @recipient
- expected.subject = encode "testing isø charsets", "iso-8859-1"
- expected.body = "Nothing to see here."
- expected.from = "system@loudthinking.com"
- expected.cc = "nobody@loudthinking.com"
- expected.bcc = "root@loudthinking.com"
- expected.date = Time.local 2004, 12, 12
-
- created = nil
- assert_nothing_raised do
- created = TestMailer.create_iso_charset @recipient
- end
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised do
- TestMailer.deliver_iso_charset @recipient
- end
-
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_unencoded_subject
- expected = new_mail
- expected.to = @recipient
- expected.subject = "testing unencoded subject"
- expected.body = "Nothing to see here."
- expected.from = "system@loudthinking.com"
- expected.cc = "nobody@loudthinking.com"
- expected.bcc = "root@loudthinking.com"
- expected.date = Time.local 2004, 12, 12
-
- created = nil
- assert_nothing_raised do
- created = TestMailer.create_unencoded_subject @recipient
- end
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised do
- TestMailer.deliver_unencoded_subject @recipient
- end
-
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_instances_are_nil
- assert_nil ActionMailer::Base.new
- assert_nil TestMailer.new
- end
-
- def test_deliveries_array
- assert_not_nil ActionMailer::Base.deliveries
- assert_equal 0, ActionMailer::Base.deliveries.size
- TestMailer.deliver_signed_up(@recipient)
- assert_equal 1, ActionMailer::Base.deliveries.size
- assert_not_nil ActionMailer::Base.deliveries.first
- end
-
- def test_perform_deliveries_flag
- ActionMailer::Base.perform_deliveries = false
- TestMailer.deliver_signed_up(@recipient)
- assert_equal 0, ActionMailer::Base.deliveries.size
- ActionMailer::Base.perform_deliveries = true
- TestMailer.deliver_signed_up(@recipient)
- assert_equal 1, ActionMailer::Base.deliveries.size
- end
-
- def test_unquote_quoted_printable_subject
- msg = <"
-
- expected = new_mail "iso-8859-1"
- expected.to = quote_address_if_necessary @recipient, "iso-8859-1"
- expected.subject = "testing extended headers"
- expected.body = "Nothing to see here."
- expected.from = quote_address_if_necessary "Grytøyr ", "iso-8859-1"
- expected.cc = quote_address_if_necessary "Grytøyr ", "iso-8859-1"
- expected.bcc = quote_address_if_necessary "Grytøyr ", "iso-8859-1"
- expected.date = Time.local 2004, 12, 12
-
- created = nil
- assert_nothing_raised do
- created = TestMailer.create_extended_headers @recipient
- end
-
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised do
- TestMailer.deliver_extended_headers @recipient
- end
-
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
- def test_utf8_body_is_not_quoted
- @recipient = "Foo áëô îü "
- expected = new_mail "utf-8"
- expected.to = quote_address_if_necessary @recipient, "utf-8"
- expected.subject = "testing utf-8 body"
- expected.body = "åœö blah"
- expected.from = quote_address_if_necessary @recipient, "utf-8"
- expected.cc = quote_address_if_necessary @recipient, "utf-8"
- expected.bcc = quote_address_if_necessary @recipient, "utf-8"
- expected.date = Time.local 2004, 12, 12
-
- created = TestMailer.create_utf8_body @recipient
- assert_match(/åœö blah/, created.encoded)
- end
-
- def test_multiple_utf8_recipients
- @recipient = ["\"Foo áëô îü\" ", "\"Example Recipient\" "]
- expected = new_mail "utf-8"
- expected.to = quote_address_if_necessary @recipient, "utf-8"
- expected.subject = "testing utf-8 body"
- expected.body = "åœö blah"
- expected.from = quote_address_if_necessary @recipient.first, "utf-8"
- expected.cc = quote_address_if_necessary @recipient, "utf-8"
- expected.bcc = quote_address_if_necessary @recipient, "utf-8"
- expected.date = Time.local 2004, 12, 12
-
- created = TestMailer.create_utf8_body @recipient
- assert_match(/\nFrom: =\?utf-8\?Q\?Foo_.*?\?= \r/, created.encoded)
- assert_match(/\nTo: =\?utf-8\?Q\?Foo_.*?\?= , Example Recipient _Google }, mail.body
- end
-
- def test_various_newlines
- mail = TestMailer.create_various_newlines(@recipient)
- assert_equal("line #1\nline #2\nline #3\nline #4\n\n" +
- "line #5\n\nline#6\n\nline #7", mail.body)
- end
-
- def test_various_newlines_multipart
- mail = TestMailer.create_various_newlines_multipart(@recipient)
- assert_equal "line #1\nline #2\nline #3\nline #4\n\n", mail.parts[0].body
- assert_equal "line #1
\nline #2
\nline #3
\nline #4
\n\n", mail.parts[1].body
- end
-
- def test_headers_removed_on_smtp_delivery
- ActionMailer::Base.delivery_method = :smtp
- TestMailer.deliver_cc_bcc(@recipient)
- assert MockSMTP.deliveries[0][2].include?("root@loudthinking.com")
- assert MockSMTP.deliveries[0][2].include?("nobody@loudthinking.com")
- assert MockSMTP.deliveries[0][2].include?(@recipient)
- assert_match %r{^Cc: nobody@loudthinking.com}, MockSMTP.deliveries[0][0]
- assert_match %r{^To: #{@recipient}}, MockSMTP.deliveries[0][0]
- assert_no_match %r{^Bcc: root@loudthinking.com}, MockSMTP.deliveries[0][0]
- end
-
- def test_recursive_multipart_processing
- fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email7")
- mail = TMail::Mail.parse(fixture)
- assert_equal "This is the first part.\n\nAttachment: test.rb\nAttachment: test.pdf\n\n\nAttachment: smime.p7s\n", mail.body
- end
-
- def test_decode_encoded_attachment_filename
- fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email8")
- mail = TMail::Mail.parse(fixture)
- attachment = mail.attachments.last
- assert_equal "01QuienTeDijat.Pitbull.mp3", attachment.original_filename
- end
-
- def test_wrong_mail_header
- fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email9")
- assert_raise(TMail::SyntaxError) { TMail::Mail.parse(fixture) }
- end
-
- def test_decode_message_with_unknown_charset
- fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email10")
- mail = TMail::Mail.parse(fixture)
- assert_nothing_raised { mail.body }
- end
-
- def test_decode_message_with_unquoted_atchar_in_header
- fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email11")
- mail = TMail::Mail.parse(fixture)
- assert_not_nil mail.from
- end
-
- def test_empty_header_values_omitted
- result = TestMailer.create_unnamed_attachment(@recipient).encoded
- assert_match %r{Content-Type: application/octet-stream[^;]}, result
- assert_match %r{Content-Disposition: attachment[^;]}, result
- end
-
- def test_headers_with_nonalpha_chars
- mail = TestMailer.create_headers_with_nonalpha_chars(@recipient)
- assert !mail.from_addrs.empty?
- assert !mail.cc_addrs.empty?
- assert !mail.bcc_addrs.empty?
- assert_match(/:/, mail.from_addrs.to_s)
- assert_match(/:/, mail.cc_addrs.to_s)
- assert_match(/:/, mail.bcc_addrs.to_s)
- end
-
- def test_deliver_with_mail_object
- mail = TestMailer.create_headers_with_nonalpha_chars(@recipient)
- assert_nothing_raised { TestMailer.deliver(mail) }
- assert_equal 1, TestMailer.deliveries.length
- end
-
- def test_multipart_with_template_path_with_dots
- mail = FunkyPathMailer.create_multipart_with_template_path_with_dots(@recipient)
- assert_equal 2, mail.parts.length
- end
-
- def test_custom_content_type_attributes
- mail = TestMailer.create_custom_content_type_attributes
- assert_match %r{format=flowed}, mail['content-type'].to_s
- assert_match %r{charset=utf-8}, mail['content-type'].to_s
- end
-end
-
-class InheritableTemplateRootTest < Test::Unit::TestCase
- def test_attr
- expected = "#{File.dirname(__FILE__)}/fixtures/path.with.dots"
- assert_equal expected, FunkyPathMailer.template_root
-
- sub = Class.new(FunkyPathMailer)
- sub.template_root = 'test/path'
-
- assert_equal 'test/path', sub.template_root
- assert_equal expected, FunkyPathMailer.template_root
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/quoting_test.rb b/tracks/vendor/rails/actionmailer/test/quoting_test.rb
deleted file mode 100644
index 77bd769b..00000000
--- a/tracks/vendor/rails/actionmailer/test/quoting_test.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-require 'tmail'
-require 'tempfile'
-
-class QuotingTest < Test::Unit::TestCase
- def test_quote_multibyte_chars
- original = "\303\246 \303\270 and \303\245"
-
- result = execute_in_sandbox(<<-CODE)
- $:.unshift(File.dirname(__FILE__) + "/../lib/")
- $KCODE = 'u'
- require 'jcode'
- require 'action_mailer/quoting'
- include ActionMailer::Quoting
- quoted_printable(#{original.inspect}, "UTF-8")
- CODE
-
- unquoted = TMail::Unquoter.unquote_and_convert_to(result, nil)
- assert_equal unquoted, original
- end
-
- # test an email that has been created using \r\n newlines, instead of
- # \n newlines.
- def test_email_quoted_with_0d0a
- mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_quoted_with_0d0a"))
- assert_match %r{Elapsed time}, mail.body
- end
-
- def test_email_with_partially_quoted_subject
- mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_partially_quoted_subject"))
- assert_equal "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail", mail.subject
- end
-
- private
-
- # This whole thing *could* be much simpler, but I don't think Tempfile,
- # popen and others exist on all platforms (like Windows).
- def execute_in_sandbox(code)
- test_name = "#{File.dirname(__FILE__)}/am-quoting-test.#{$$}.rb"
- res_name = "#{File.dirname(__FILE__)}/am-quoting-test.#{$$}.out"
-
- File.open(test_name, "w+") do |file|
- file.write(<<-CODE)
- block = Proc.new do
- #{code}
- end
- puts block.call
- CODE
- end
-
- system("ruby #{test_name} > #{res_name}") or raise "could not run test in sandbox"
- File.read(res_name).chomp
- ensure
- File.delete(test_name) rescue nil
- File.delete(res_name) rescue nil
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/tmail_test.rb b/tracks/vendor/rails/actionmailer/test/tmail_test.rb
deleted file mode 100644
index 7d83a68a..00000000
--- a/tracks/vendor/rails/actionmailer/test/tmail_test.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-
-class TMailMailTest < Test::Unit::TestCase
- def test_body
- m = TMail::Mail.new
- expected = 'something_with_underscores'
- m.encoding = 'quoted-printable'
- quoted_body = [expected].pack('*M')
- m.body = quoted_body
- assert_equal "something_with_underscores=\n", m.quoted_body
- assert_equal expected, m.body
- end
-end
diff --git a/tracks/vendor/rails/actionmailer/test/url_test.rb b/tracks/vendor/rails/actionmailer/test/url_test.rb
deleted file mode 100644
index ded343cf..00000000
--- a/tracks/vendor/rails/actionmailer/test/url_test.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-require "#{File.dirname(__FILE__)}/abstract_unit"
-
-class TestMailer < ActionMailer::Base
- def signed_up_with_url(recipient)
- @recipients = recipient
- @subject = "[Signed up] Welcome #{recipient}"
- @from = "system@loudthinking.com"
- @sent_on = Time.local(2004, 12, 12)
-
- @body["recipient"] = recipient
- @body["welcome_url"] = url_for :host => "example.com", :controller => "welcome", :action => "greeting"
- end
-
- class < charset }
- end
- mail
- end
-
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @recipient = 'test@localhost'
- end
-
- def test_signed_up_with_url
- ActionController::Routing::Routes.draw do |map|
- map.connect ':controller/:action/:id'
- end
-
- expected = new_mail
- expected.to = @recipient
- expected.subject = "[Signed up] Welcome #{@recipient}"
- expected.body = "Hello there, \n\nMr. #{@recipient}. Please see our greeting at http://example.com/welcome/greeting"
- expected.from = "system@loudthinking.com"
- expected.date = Time.local(2004, 12, 12)
-
- created = nil
- assert_nothing_raised { created = TestMailer.create_signed_up_with_url(@recipient) }
- assert_not_nil created
- assert_equal expected.encoded, created.encoded
-
- assert_nothing_raised { TestMailer.deliver_signed_up_with_url(@recipient) }
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/CHANGELOG b/tracks/vendor/rails/actionpack/CHANGELOG
deleted file mode 100644
index a417f94e..00000000
--- a/tracks/vendor/rails/actionpack/CHANGELOG
+++ /dev/null
@@ -1,3072 +0,0 @@
-*1.13.0 RC2* (r5847, January 4th, 2007)
-
-
-* Make sure html_document is reset between integration test requests. [ctm]
-
-* Set session to an empty hash if :new_session => false and no session cookie or param is present. CGI::Session was raising an unrescued ArgumentError. [Josh Susser]
-
-* Fix assert_redirected_to bug where redirecting from a nested to to a top-level controller incorrectly added the current controller's nesting. Closes #6128. [Rick Olson]
-
-* Ensure render :json => ... skips the layout. #6808 [Josh Peek]
-
-* Silence log_error deprecation warnings from inspecting deprecated instance variables. [Nate Wiger]
-
-* Only cache GET requests with a 200 OK response. #6514, #6743 [RSL, anamba]
-
-* Correctly report which filter halted the chain. #6699 [Martin Emde]
-
-* respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. #4185 [Scott Raymond, eventualbuddha]
- # application/json response with body 'Element.show({:name: "David"})'
- respond_to do |format|
- format.json { render :json => { :name => "David" }.to_json, :callback => 'Element.show' }
- end
-
-* Makes :discard_year work without breaking multi-attribute parsing in AR. #1260, #3800 [sean@ardismg.com, jmartin@desertflood.com, stephen@touset.org, Bob Silva]
-
-* Adds html id attribute to date helper elements. #1050, #1382 [mortonda@dgrmm.net, David North, Bob Silva]
-
-* Add :index and @auto_index capability to model driven date/time selects. #847, #2655 [moriq, Doug Fales, Bob Silva]
-
-* Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, patrick@lenz.sh, Bob Silva]
-
-* Added time_select to work with time values in models. Update scaffolding. #2489, #2833 [Justin Palmer, Andre Caum, Bob Silva]
-
-* Added :include_seconds to select_datetime, datetime_select and time_select. #2998 [csn, Bob Silva]
-
-* All date/datetime selects can now accept an array of month names with :use_month_names. Allows for localization. #363 [tomasj, Bob Silva]
-
-* Adds :time_separator to select_time and :date_separator to select_datetime. Preserves BC. #3811 [Bob Silva]
-
-* @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status. [Jeremy Kemper]
-
-* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH]
-
-* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH]
-
-
-*1.13.0 RC1* (r5619, November 22nd, 2006)
-
-* Update Routing to complain when :controller is not specified by a route. Closes #6669. [Nicholas Seckar]
-
-* Ensure render_to_string cleans up after itself when an exception is raised. #6658 [rsanheim]
-
-* Update to Prototype and script.aculo.us [5579]. [Sam Stephenson, Thomas Fuchs]
-
-* simple_format helper doesn't choke on nil. #6644 [jerry426]
-
-* Reuse named route helper module between Routing reloads. Use remove_method to delete named route methods after each load. Since the module is never collected, this fixes a significant memory leak. [Nicholas Seckar]
-
-* Deprecate standalone components. [Jeremy Kemper]
-
-* Always clear model associations from session. #4795 [sd@notso.net, andylien@gmail.com]
-
-* Remove JavaScriptLiteral in favor of ActiveSupport::JSON::Variable. [Sam Stephenson]
-
-* Sync ActionController::StatusCodes::STATUS_CODES with http://www.iana.org/assignments/http-status-codes. #6586 [dkubb]
-
-* Multipart form values may have a content type without being treated as uploaded files if they do not provide a filename. #6401 [Andreas Schwarz, Jeremy Kemper]
-
-* assert_response supports symbolic status codes. #6569 [Kevin Clark]
- assert_response :ok
- assert_response :not_found
- assert_response :forbidden
-
-* Cache parsed query parameters. #6559 [Stefan Kaes]
-
-* Deprecate JavaScriptHelper#update_element_function, which is superseeded by RJS [Thomas Fuchs]
-
-* Fix invalid test fixture exposed by stricter Ruby 1.8.5 multipart parsing. #6524 [Bob Silva]
-
-* Set ActionView::Base.default_form_builder once rather than passing the :builder option to every form or overriding the form helper methods. [Jeremy Kemper]
-
-* Deprecate expire_matched_fragments. Use expire_fragment instead. #6535 [Bob Silva]
-
-* Deprecate start_form_tag and end_form_tag. Use form_tag / '' from now on. [Rick]
-
-* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick]
-
-* Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick]
-
-* Added block-usage to TagHelper#content_tag [DHH]. Example:
-
- <% content_tag :div, :class => "strong" %>
- Hello world!
- <% end %>
-
- Will output:
- Hello world!
-
-* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [BobSilva]
-
-* Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [BobSilva]
-
-* Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [BobSilva/chrismear]
-
-* Force *_url named routes to show the host in ActionView [Rick]
-
- <%= url_for ... %> # no host
- <%= foo_path %> # no host
- <%= foo_url %> # host!
-
-* Add support for converting blocks into function arguments to JavaScriptGenerator#call and JavaScriptProxy#call. [Sam Stephenson]
-
-* Add JavaScriptGenerator#literal for wrapping a string in an object whose #to_json is the string itself. [Sam Stephenson]
-
-* Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick]
-
-* Fix double-escaped entities, such as &, {, etc. [Rick]
-
-* Fix routing to correctly determine when generation fails. Closes #6300. [psross].
-
-* Fix broken assert_generates when extra keys are being checked. [Jamis Buck]
-
-* Replace KCODE checks with String#chars for truncate. Closes #6385 [Manfred Stienstra]
-
-* Make page caching respect the format of the resource that is being requested even if the current route is the default route so that, e.g. posts.rss is not transformed by url_for to '/' and subsequently cached as '/index.html' when it should be cached as '/posts.rss'. [Marcel Molina Jr.]
-
-* Use String#chars in TextHelper::excerpt. Closes #6386 [Manfred Stienstra]
-
-* Fix relative URL root matching problems. [Mark Imbriaco]
-
-* Fix filter skipping in controller subclasses. #5949, #6297, #6299 [Martin Emde]
-
-* render_text may optionally append to the response body. render_javascript appends by default. This allows you to chain multiple render :update calls by setting @performed_render = false between them (awaiting a better public API). [Jeremy Kemper]
-
-* Rename test assertion to prevent shadowing. Closes #6306. [psross]
-
-* Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [phallstrom]
-
-* Fixed that FormHelper#radio_button didn't respect an :id being passed in #6266 [evansj]
-
-* Added an html_options hash parameter to javascript_tag() and update_page_tag() helpers #6311 [tzaharia]. Example:
-
- update_page_tag :defer => 'true' { |page| ... }
-
- Gives:
-
-
-
- Which is needed for dealing with the IE6 DOM when it's not yet fully loaded.
-
-* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [mnaberez]
-
-* Fixed escaping of backslashes in JavaScriptHelper#escape_javascript #6302 [sven@c3d2.de]
-
-* Fixed that some 500 rescues would cause 500's themselves because the response had not yet been generated #6329 [cmselmer]
-
-* respond_to :html doesn't assume .rhtml. #6281 [Hampton Catlin]
-
-* Fixed some deprecation warnings in ActionPack [Rick Olson]
-
-* assert_select_rjs decodes escaped unicode chars since the Javascript generators encode them. #6240 [japgolly]
-
-* Deprecation: @cookies, @headers, @request, @response will be removed after 1.2. Use the corresponding method instead. [Jeremy Kemper]
-
-* Make the :status parameter expand to the default message for that status code if it is an integer. Also support symbol statuses. [Jamis Buck]. Examples:
-
- head :status => 404 # expands to "404 Not Found"
- head :status => :not_found # expands to "404 Not Found"
- head :status => :created # expands to "201 Created"
-
-* Add head(options = {}) for responses that have no body. [Jamis Buck]. Examples:
-
- head :status => 404 # return an empty response with a 404 status
- head :location => person_path(@person), :status => 201
-
-* Fix bug that kept any before_filter except the first one from being able to halt the before_filter chain. [Rick Olson]
-
-* strip_links is case-insensitive. #6285 [tagoh, Bob Silva]
-
-* Clear the cache of possible controllers whenever Routes are reloaded. [Nicholas Seckar]
-
-* Filters overhaul including meantime filter support using around filters + blocks. #5949 [Martin Emde, Roman Le Negrate, Stefan Kaes, Jeremy Kemper]
-
-* Update CGI process to allow sessions to contain namespaced models. Closes #4638. [dfelstead@site5.com]
-
-* Fix routing to respect user provided requirements and defaults when assigning default routing options (such as :action => 'index'). Closes #5950. [Nicholas Seckar]
-
-* Rescue Errno::ECONNRESET to handle an unexpectedly closed socket connection. Improves SCGI reliability. #3368, #6226 [sdsykes, fhanshaw@vesaria.com]
-
-* Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]. Examples:
-
- respond_to do |format|
- format.html { render :text => "I'm being sent as text/html" }
- format.rss { render :text => "I'm being sent as application/rss+xml" }
- format.atom { render :text => "I'm being sent as application/xml", :content_type => Mime::XML }
- end
-
-* Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH]
-
-* Added proper getters and setters for content type and charset [DHH]. Example of what we used to do:
-
- response.headers["Content-Type"] = "application/atom+xml; charset=utf-8"
-
- ...now:
-
- response.content_type = Mime::ATOM
- response.charset = "utf-8"
-
-* Declare file extensions exempt from layouts. #6219 [brandon]
- Example: ActionController::Base.exempt_from_layout 'rpdf'
-
-* Add chained replace/update support for assert_select_rjs [Rick Olson]
-
- Given RJS like...
-
- page['test1'].replace "foo
"
- page['test2'].replace_html "foo
"
-
- Test it with...
-
- assert_select_rjs :chained_replace
- assert_select_rjs :chained_replace, "test1"
-
- assert_select_rjs :chained_replace_html
- assert_select_rjs :chained_replace_html, "test2"
-
-* Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. #6132, #6178 [choonkeat@gmail.com]
-
-* Skip params with empty names, such as the &=Save query string from . #2569 [manfred, raphinou@yahoo.com]
-
-* Fix assert_tag so that :content => "foo" does not match substrings, but only exact strings. Use :content => /foo/ to match substrings. #2799 [Eric Hodel]
-
-* Update JavaScriptGenerator#show/hide/toggle/remove to new Prototype syntax for multiple ids, #6068 [petermichaux@gmail.com]
-
-* Update UrlWriter to support :only_path. [Nicholas Seckar, Dave Thomas]
-
-* Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [DHH]. So what used to require a nil, like this:
-
- link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide }
-
- ...can be written like this:
-
- link_to("Hider", :class => "hider_link") { |p| p[:something].hide }
-
-* Added access to nested attributes in RJS #4548 [richcollins@gmail.com]. Examples:
-
- page['foo']['style'] # => $('foo').style;
- page['foo']['style']['color'] # => $('blank_slate').style.color;
- page['foo']['style']['color'] = 'red' # => $('blank_slate').style.color = 'red';
- page['foo']['style'].color = 'red' # => $('blank_slate').style.color = 'red';
-
-* Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch]
-
-* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [DHH]
-
-* Fixed FormOptionsHelper#select to respect :selected value #5813
-
-* Fixed TextHelper#simple_format to deal with multiple single returns within a single paragraph #5835 [moriq@moriq.com]
-
-* Fixed TextHelper#pluralize to handle 1 as a string #5909 [rails@bencurtis.com]
-
-* Improved resolution of DateHelper#distance_of_time_in_words for better precision #5994 [Bob Silva]
-
-* Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH]
-
-* Added deprecation language for pagination which will become a plugin by Rails 2.0 [DHH]
-
-* Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH]
-
-* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH]
-
-* Added assert_select* for CSS selector-based testing (deprecates assert_tag) #5936 [assaf.arkin@gmail.com]
-
-* radio_button_tag generates unique id attributes. #3353 [Bob Silva, somekool@gmail.com]
-
-* strip_tags passes through blank args such as nil or "". #2229, #6702 [duncan@whomwah.com, dharana]
-
-* Cleanup assert_tag :children counting. #2181 [jamie@bravenet.com]
-
-* button_to accepts :method so you can PUT and DELETE with it. #6005 [Dan Webb]
-
-* Update sanitize text helper to strip plaintext tags, and . [Rick Olson]
-
-* Add routing tests to assert that RoutingError is raised when conditions aren't met. Closes #6016 [Nathan Witmer]
-
-* Make auto_link parse a greater subset of valid url formats. [Jamis Buck]
-
-* Integration tests: headers beginning with X aren't excluded from the HTTP_ prefix, so X-Requested-With becomes HTTP_X_REQUESTED_WITH as expected. [Mike Clark]
-
-* Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, DHH]
-
-* respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Luetke]
-
-* Deprecation: test deprecated instance vars in partials. [Jeremy Kemper]
-
-* Add UrlWriter to allow writing urls from Mailers and scripts. [Nicholas Seckar]
-
-* Relax Routing's anchor pattern warning; it was preventing use of [^/] inside restrictions. [Nicholas Seckar]
-
-* Add controller_paths variable to Routing. [Nicholas Seckar]
-
-* Fix assert_redirected_to issue with named routes for module controllers. [Rick Olson]
-
-* Tweak RoutingError message to show option diffs, not just missing named route significant keys. [Rick Olson]
-
-* Invoke method_missing directly on hidden actions. Closes #3030. [Nicholas Seckar]
-
-* Add RoutingError exception when RouteSet fails to generate a path from a Named Route. [Rick Olson]
-
-* Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
-
-* Deprecation: check whether instance variables have been monkeyed with before assigning them to deprecation proxies. Raises a RuntimeError if so. [Jeremy Kemper]
-
-* Add support for the param_name parameter to the auto_complete_field helper. #5026 [david.a.williams@gmail.com]
-
-* Deprecation! @params, @session, @flash will be removed after 1.2. Use the corresponding instance methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. [Jeremy Kemper]
-
-* Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [francois.beausoleil@gmail.com]
-
-* Added months and years to the resolution of DateHelper#distance_of_time_in_words, such that "60 days ago" becomes "2 months ago" #5611 [pjhyett@gmail.com]
-
-* Make controller_path available as an instance method. #5724 [jmckible@gmail.com]
-
-* Update query parser to support adjacent hashes. [Nicholas Seckar]
-
-* Make action caching aware of different formats for the same action so that, e.g. foo.xml is cached separately from foo.html. Implicitly set content type when reading in cached content with mime revealing extensions so the entire onous isn't on the webserver. [Marcel Molina Jr.]
-
-* Restrict Request Method hacking with ?_method to POST requests. [Rick Olson]
-
-* Fixed the new_#{resource}_url route and added named route tests for Simply Restful. [Rick Olson]
-
-* Added map.resources from the Simply Restful plugin [DHH]. Examples (the API has changed to use plurals!):
-
- map.resources :messages
- map.resources :messages, :comments
- map.resources :messages, :new => { :preview => :post }
-
-* Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick]
-
-* TestRequest#reset_session should restore a TestSession, not a hash [Koz]
-
-* Don't search a load-path of '.' for controller files [Jamis Buck]
-
-* Update integration.rb to require test_process explicitly instead of via Dependencies. [Nicholas Seckar]
-
-* Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow@yahoo.com]
-
-* Allow form_for and fields_for to work with indexed form inputs. [Jeremy Kemper, Matt Lyon]
-
- <% form_for 'post[]', @post do |f| -%>
- <% end -%>
-
-* Remove leak in development mode by replacing define_method with module_eval. [Nicholas Seckar]
-
-* Provide support for decimal columns to form helpers. Closes #5672. [dave@pragprog.com]
-
-* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info]
-
-* Reset @html_document between requests so assert_tag works. #4810 [jarkko@jlaine.net, easleydp@gmail.com]
-
-* Integration tests behave well with render_component. #4632 [edward.frederick@revolution.com, dev.rubyonrails@maxdunn.com]
-
-* Added exception handling of missing layouts #5373 [chris@ozmm.org]
-
-* Fixed that real files and symlinks should be treated the same when compiling templates #5438 [zachary@panandscan.com]
-
-* Fixed that the flash should be reset when reset_session is called #5584 [shugo@ruby-lang.org]
-
-* Added special case for "1 Byte" in NumberHelper#number_to_human_size #5593 [murpyh@rubychan.de]
-
-* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH]
-
-* Add route_name_path method to generate only the path for a named routes. For example, map.person will add person_path. [Nicholas Seckar]
-
-* Avoid naming collision among compiled view methods. [Jeremy Kemper]
-
-* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr]
-
-* Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de]
-
-* Fix that routes with *path segments in the recall can generate URLs. [Rick]
-
-* Fix strip_links so that it doesn't hang on multiline tags [Jamis Buck]
-
-* Remove problematic control chars in rescue template. #5316 [Stefan Kaes]
-
-* Make sure passed routing options are not mutated by routing code. #5314 [Blair Zajac]
-
-* Make sure changing the controller from foo/bar to bing/bang does not change relative to foo. [Jamis Buck]
-
-* Escape the path before routing recognition. #3671
-
-* Make sure :id and friends are unescaped properly. #5275 [me@julik.nl]
-
-* Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). #210 [mklame@atxeu.com, matthew@walker.wattle.id.au]
-
-* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH]
-
-* Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [DHH]. Example: Mime::Type.register("image/gif", :gif)
-
-* Added support for Mime objects in render :content_type option [DHH]. Example: render :text => some_atom, :content_type => Mime::ATOM
-
-* Add :status option to send_data and send_file. Defaults to '200 OK'. #5243 [Manfred Stienstra ]
-
-* Routing rewrite. Simpler, faster, easier to understand. The published API for config/routes.rb is unchanged, but nearly everything else is different, so expect breakage in plugins and libs that try to fiddle with routes. [Nicholas Seckar, Jamis Buck]
-
- map.connect '/foo/:id', :controller => '...', :action => '...'
- map.connect '/foo/:id.:format', :controller => '...', :action => '...'
- map.connect '/foo/:id', ..., :conditions => { :method => :get }
-
-* Cope with missing content type and length headers. Parse parameters from multipart and urlencoded request bodies only. [Jeremy Kemper]
-
-* Accept multipart PUT parameters. #5235 [guy.naor@famundo.com]
-
-* Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH]. Example:
-
- class WeblogController < ActionController::Base
- def index
- @posts = Post.find :all
-
- respond_to do |format|
- format.html
- format.xml { render :xml => @posts.to_xml }
- format.rss { render :action => "feed.rxml" }
- end
- end
- end
-
- # returns HTML when requested by a browser, since the browser
- # has the HTML mimetype at the top of its priority list
- Accept: text/html
- GET /weblog
-
- # returns the XML
- Accept: application/xml
- GET /weblog
-
- # returns the HTML
- Accept: application/xml
- GET /weblog.html
-
- # returns the XML
- Accept: text/html
- GET /weblog.xml
-
- All this relies on the fact that you have a route that includes .:format.
-
-* Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH]
-
-* Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH]
-
-* follow_redirect doesn't complain about being redirected to the same controller. #5153 [dymo@mk.ukrtelecom.ua]
-
-* Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark kevin.clark@gmail.com]
-
-* Fix NoMethodError when parsing params like &&. [Adam Greenfield]
-
-* form.text_area handles the :size option just like the original text_area (:size => '60x10' becomes cols="60" rows="10"). [Jeremy Kemper]
-
-* Excise ingrown code from FormOptionsHelper#options_for_select. #5008 [anonymous]
-
-* Small fix in routing to allow dynamic routes (broken after [4242]) [Rick]
-
- map.connect '*path', :controller => 'files', :action => 'show'
-
-* Use #flush between switching from #write to #syswrite. Closes #4907. [Blair Zajac ]
-
-* Allow error_messages_for to report errors for multiple objects, as well as support for customizing the name of the object in the error summary header. Closes #4186. [andrew@redlinesoftware.com, Marcel Molina Jr.]
-
- error_messages_for :account, :user, :subscription, :object_name => :account
-
-* Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick]
-
- redirect_to :action => 'new'
- assert_redirected_to :controller => 'monkeys', :action => 'new'
-
-* Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick]
-
- assert_recognizes({:controller => 'users', :action => 'index'}, 'users')
- assert_recognizes({:controller => 'users', :action => 'create'}, {:path => 'users', :method => :post})
-
-* Diff compared options with #assert_redirected_to [Rick]
-
-* Add support in routes for semicolon delimited "subpaths", like /books/:id;:action [Jamis Buck]
-
-* Change link_to_function and button_to_function to (optionally) take an update_page block instead of a JavaScript string. Closes #4804. [zraii@comcast.net, Sam Stephenson]
-
-* Modify routing so that you can say :require => { :method => :post } for a route, and the route will never be selected unless the request method is POST. Only works for route recognition, not for route generation. [Jamis Buck]
-
-* Added :add_headers option to verify which merges a hash of name/value pairs into the response's headers hash if the prerequisites cannot be satisfied. [Sam Stephenson]
- ex. verify :only => :speak, :method => :post,
- :render => { :status => 405, :text => "Must be post" },
- :add_headers => { "Allow" => "POST" }
-
-
-*1.12.5* (August 10th, 2006)
-
-* Updated security fix
-
-
-*1.12.4* (August 8th, 2006)
-
-* Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick]
-
-* Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [DHH]
-
-* Added ActionController.filter_parameter_logging that makes it easy to remove passwords, credit card numbers, and other sensitive information from being logged when a request is handled. #1897 [jeremye@bsa.ca.gov]
-
-* Fixed that real files and symlinks should be treated the same when compiling templates. #5438 [zachary@panandscan.com]
-
-* Add :status option to send_data and send_file. Defaults to '200 OK'. #5243 [Manfred Stienstra ]
-
-* Update documentation for erb trim syntax. #5651 [matt@mattmargolis.net]
-
-* Short documentation to mention use of Mime::Type.register. #5710 [choonkeat@gmail.com]
-
-
-*1.12.3* (June 28th, 2006)
-
-* Fix broken traverse_to_controller. We now:
- Look for a _controller.rb file under RAILS_ROOT to load.
- If we find it, we require_dependency it and return the controller it defined. (If none was defined we stop looking.)
- If we don't find it, we look for a .rb file under RAILS_ROOT to load. If we find it, and it loads a constant we keep looking.
- Otherwise we check to see if a directory of the same name exists, and if it does we create a module for it.
-
-
-*1.12.2* (June 27th, 2006)
-
-* Refinement to avoid exceptions in traverse_to_controller.
-
-* (Hackish) Fix loading of arbitrary files in Ruby's load path by traverse_to_controller. [Nicholas Seckar]
-
-
-*1.12.1* (April 6th, 2006)
-
-* Fixed that template extensions would be cached development mode #4624 [Stefan Kaes]
-
-* Update to Prototype 1.5.0_rc0 [Sam Stephenson]
-
-* Honor skipping filters conditionally for only certain actions even when the parent class sets that filter to conditionally be executed only for the same actions. #4522 [Marcel Molina Jr.]
-
-* Delegate xml_http_request in integration tests to the session instance. [Jamis Buck]
-
-* Update the diagnostics template skip the useless '' text. [Nicholas Seckar]
-
-* CHANGED DEFAULT: Don't parse YAML input by default, but keep it available as an easy option [DHH]
-
-* Add additional autocompleter options [aballai, Thomas Fuchs]
-
-* Fixed fragment caching of binary data on Windows #4493 [bellis@deepthought.org]
-
-* Applied Prototype $() performance patches (#4465, #4477) and updated script.aculo.us [Sam Stephenson, Thomas Fuchs]
-
-* Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [DHH]. Example:
-
- image_tag("rails.png") # => ' '
-
- ...to avoid frequent stats (not a problem for most people), you can set RAILS_ASSET_ID in the ENV to avoid stats:
-
- ENV["RAILS_ASSET_ID"] = "2345"
- image_tag("rails.png") # => ' '
-
- This can be used by deployment managers to set the asset id by application revision
-
-
-*1.12.0* (March 27th, 2006)
-
-* Add documentation for respond_to. [Jamis Buck]
-
-* Fixed require of bluecloth and redcloth when gems haven't been loaded #4446 [murphy@cYcnus.de]
-
-* Update to Prototype 1.5.0_pre1 [Sam Stephenson]
-
-* Change #form_for and #fields_for so that the second argument is not required [Dave Thomas]
-
- <% form_for :post, @post, :url => { :action => 'create' } do |f| -%>
-
- becomes...
-
- <% form_for :post, :url => { :action => 'create' } do |f| -%>
-
-* Update to script.aculo.us 1.6 [Thomas Fuchs]
-
-* Enable application/x-yaml processing by default [Jamis Buck]
-
-* Fix double url escaping of remote_function. Add :escape => false option to ActionView's url_for. [Nicholas Seckar]
-
-* Add :script option to in_place_editor to support evalScripts (closes #4194) [codyfauser@gmail.com]
-
-* Fix mixed case enumerable methods in the JavaScript Collection Proxy (closes #4314) [codyfauser@gmail.com]
-
-* Undo accidental escaping for mail_to; add regression test. [Nicholas Seckar]
-
-* Added nicer message for assert_redirected_to (closes #4294) [court3nay]
-
- assert_redirected_to :action => 'other_host', :only_path => false
-
- when it was expecting...
-
- redirected_to :action => 'other_host', :only_path => true, :host => 'other.test.host'
-
- gives the error message...
-
- response is not a redirection to all of the options supplied (redirection is <{:only_path=>false, :host=>"other.test.host", :action=>"other_host"}>), difference: <{:only_path=>"true", :host=>"other.test.host"}>
-
-* Change url_for to escape the resulting URLs when called from a view. [Nicholas Seckar, coffee2code]
-
-* Added easy support for testing file uploads with fixture_file_upload #4105 [turnip@turnipspatch.com]. Example:
-
- # Looks in Test::Unit::TestCase.fixture_path + '/files/spongebob.png'
- post :change_avatar, :avatar => fixture_file_upload('/files/spongebob.png', 'image/png')
-
-* Fixed UrlHelper#current_page? to behave even when url-escaped entities are present #3929 [jeremy@planetargon.com]
-
-* Add ability for relative_url_root to be specified via an environment variable RAILS_RELATIVE_URL_ROOT. [isaac@reuben.com, Nicholas Seckar]
-
-* Fixed link_to "somewhere", :post => true to produce valid XHTML by using the parentnode instead of document.body for the instant form #3007 [Bob Silva]
-
-* Added :function option to PrototypeHelper#observe_field/observe_form that allows you to call a function instead of submitting an ajax call as the trigger #4268 [jonathan@daikini.com]
-
-* Make Mime::Type.parse consider q values (if any) [Jamis Buck]
-
-* XML-formatted requests are typecast according to "type" attributes for :xml_simple [Jamis Buck]
-
-* Added protection against proxy setups treating requests as local even when they're not #3898 [stephen_purcell@yahoo.com]
-
-* Added TestRequest#raw_post that simulate raw_post from CgiRequest #3042 [francois.beausoleil@gmail.com]
-
-* Underscore dasherized keys in formatted requests [Jamis Buck]
-
-* Add MimeResponds::Responder#any for managing multiple types with identical responses [Jamis Buck]
-
-* Make the xml_http_request testing method set the HTTP_ACCEPT header [Jamis Buck]
-
-* Add Verification to scaffolds. Prevent destructive actions using GET [Michael Koziarski]
-
-* Avoid hitting the filesystem when using layouts by using a File.directory? cache. [Stefan Kaes, Nicholas Seckar]
-
-* Simplify ActionController::Base#controller_path [Nicholas Seckar]
-
-* Added simple alert() notifications for RJS exceptions when config.action_view.debug_rjs = true. [Sam Stephenson]
-
-* Added :content_type option to render, so you can change the content type on the fly [DHH]. Example: render :action => "atom.rxml", :content_type => "application/atom+xml"
-
-* CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason [DHH]
-
-* Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]. Example:
-
- class WeblogController < ActionController::Base
- def index
- @posts = Post.find :all
-
- respond_to do |type|
- type.html # using defaults, which will render weblog/index.rhtml
- type.xml { render :action => "index.rxml" }
- type.js { render :action => "index.rjs" }
- end
- end
- end
-
-* Added better support for using the same actions to output for different sources depending on the Accept header [DHH]. Example:
-
- class WeblogController < ActionController::Base
- def create
- @post = Post.create(params[:post])
-
- respond_to do |type|
- type.js { render } # renders create.rjs
- type.html { redirect_to :action => "index" }
- type.xml do
- headers["Location"] = url_for(:action => "show", :id => @post)
- render(:nothing, :status => "201 Created")
- end
- end
- end
- end
-
-* Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
-
-* Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new [Tobias Luetke]
-
-* Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. Examples:
-
- page.select('#items li').collect('items') do |element|
- element.hide
- end
- # => var items = $$('#items li').collect(function(value, index) { return value.hide(); });
-
-* Added plugin support for parameter parsers, which allows for better support for REST web services. By default, posts submitted with the application/xml content type is handled by creating a XmlSimple hash with the same name as the root element of the submitted xml. More handlers can easily be registered like this:
-
- # Assign a new param parser to a new content type
- ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data|
- node = REXML::Document.new(post)
- { node.root.name => node.root }
- end
-
- # Assign the default XmlSimple to a new content type
- ActionController::Base.param_parsers['application/backpack+xml'] = :xml_simple
-
-Default YAML web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functionality back. As part of this new plugin support, request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Luetke]
-
-* Fixed Effect.Appear in effects.js to work with floats in Safari #3524, #3813, #3044 [Thomas Fuchs]
-
-* Fixed that default image extension was not appended when using a full URL with AssetTagHelper#image_tag #4032, #3728 [rubyonrails@beautifulpixel.com]
-
-* Added that page caching will only happen if the response code is less than 400 #4033 [g.bucher@teti.ch]
-
-* Add ActionController::IntegrationTest to allow high-level testing of the way the controllers and routes all work together [Jamis Buck]
-
-* Added support to AssetTagHelper#javascript_include_tag for having :defaults appear anywhere in the list, so you can now make one call ala javascript_include_tag(:defaults, "my_scripts") or javascript_include_tag("my_scripts", :defaults) depending on how you want the load order #3506 [Bob Silva]
-
-* Added support for visual effects scoped queues to the visual_effect helper #3530 [Abdur-Rahman Advany]
-
-* Added .rxml (and any non-rhtml template, really) supportfor CaptureHelper#content_for and CaptureHelper#capture #3287 [Brian Takita]
-
-* Added script.aculo.us drag and drop helpers to RJS [Thomas Fuchs]. Examples:
-
- page.draggable 'product-1'
- page.drop_receiving 'wastebasket', :url => { :action => 'delete' }
- page.sortable 'todolist', :url => { action => 'change_order' }
-
-* Fixed that form elements would strip the trailing [] from the first parameter #3545 [ruby@bobsilva.com]
-
-* During controller resolution, update the NameError suppression to check for the expected constant. [Nicholas Seckar]
-
-* Update script.aculo.us to V1.5.3 [Thomas Fuchs]
-
-* Added various InPlaceEditor options, #3746, #3891, #3896, #3906 [Bill Burcham, ruairi, sl33p3r]
-
-* Added :count option to pagination that'll make it possible for the ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [skaes]
-
-* Update script.aculo.us to V1.5.2 [Thomas Fuchs]
-
-* Added element and collection proxies to RJS [DHH]. Examples:
-
- page['blank_slate'] # => $('blank_slate');
- page['blank_slate'].show # => $('blank_slate').show();
- page['blank_slate'].show('first').up # => $('blank_slate').show('first').up();
-
- page.select('p') # => $$('p');
- page.select('p.welcome b').first # => $$('p.welcome b').first();
- page.select('p.welcome b').first.hide # => $$('p.welcome b').first().hide();
-
-* Add JavaScriptGenerator#replace for replacing an element's "outer HTML". #3246 [tom@craz8.com, Sam Stephenson]
-
-* Remove over-engineered form_for code for a leaner implementation. [Nicholas Seckar]
-
-* Document form_for's :html option. [Nicholas Seckar]
-
-* Major components cleanup and speedup. #3527 [Stefan Kaes]
-
-* Fix problems with pagination and :include. [Kevin Clark]
-
-* Add ActiveRecordTestCase for testing AR integration. [Kevin Clark]
-
-* Add Unit Tests for pagination [Kevin Clark]
-
-* Add :html option for specifying form tag options in form_for. [Sam Stephenson]
-
-* Replace dubious controller parent class in filter docs. #3655, #3722 [info@rhalff.com, eigentone@gmail.com]
-
-* Don't interpret the :value option on text_area as an html attribute. Set the text_area's value. #3752 [gabriel@gironda.org]
-
-* Fix remote_form_for creates a non-ajax form. [Rick Olson]
-
-* Don't let arbitrary classes match as controllers -- a potentially dangerous bug. [Nicholas Seckar]
-
-* Fix Routing tests. Fix routing where failing to match a controller would prevent the rest of routes from being attempted. [Nicholas Seckar]
-
-* Add :builder => option to form_for and friends. [Nicholas Seckar, Rick Olson]
-
-* Fix controller resolution to avoid accidentally inheriting a controller from a parent module. [Nicholas Seckar]
-
-* Set sweeper's @controller to nil after a request so that the controller may be collected between requests. [Nicholas Seckar]
-
-* Subclasses of ActionController::Caching::Sweeper should be Reloadable. [Rick Olson]
-
-* Document the :xhr option for verifications. #3666 [leeo]
-
-* Added :only and :except controls to skip_before/after_filter just like for when you add filters [DHH]
-
-* Ensure that the instance variables are copied to the template when performing render :update. [Nicholas Seckar]
-
-* Add the ability to call JavaScriptGenerator methods from helpers called in update blocks. [Sam Stephenson] Example:
- module ApplicationHelper
- def update_time
- page.replace_html 'time', Time.now.to_s(:db)
- page.visual_effect :highlight, 'time'
- end
- end
-
- class UserController < ApplicationController
- def poll
- render :update { |page| page.update_time }
- end
- end
-
-* Add render(:update) to ActionView::Base. [Sam Stephenson]
-
-* Fix render(:update) to not render layouts. [Sam Stephenson]
-
-* Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [stephen_purcell@yahoo.com]
-
-* Added the possibility to specify atomatic expiration for the memcachd session container #3571 [Stefan Kaes]
-
-* Change layout discovery to take into account the change in semantics with File.join and nil arguments. [Marcel Molina Jr.]
-
-* Raise a RedirectBackError if redirect_to :back is called when there's no HTTP_REFERER defined #3049 [kevin.clark@gmail.com]
-
-* Treat timestamps like datetimes for scaffolding purposes #3388 [Maik Schmidt]
-
-* Fix IE bug with link_to "something", :post => true #3443 [Justin Palmer]
-
-* Extract Test::Unit::TestCase test process behavior into an ActionController::TestProcess module. [Sam Stephenson]
-
-* Pass along blocks from render_to_string to render. [Sam Stephenson]
-
-* Add render :update for inline RJS. [Sam Stephenson] Example:
- class UserController < ApplicationController
- def refresh
- render :update do |page|
- page.replace_html 'user_list', :partial => 'user', :collection => @users
- page.visual_effect :highlight, 'user_list'
- end
- end
- end
-
-* allow nil objects for error_messages_for [Michael Koziarski]
-
-* Refactor human_size to exclude decimal place if it is zero. [Marcel Molina Jr.]
-
-* Update to Prototype 1.5.0_pre0 [Sam Stephenson]
-
-* Automatically discover layouts when a controller is namespaced. #2199, #3424 [me@jonnii.com rails@jeffcole.net Marcel Molina Jr.]
-
-* Add support for multiple proxy servers to CgiRequest#host [gaetanot@comcast.net]
-
-* Documentation typo fix. #2367 [Blair Zajac]
-
-* Remove Upload Progress. #2871 [Sean Treadway]
-
-* Fix typo in function name mapping in auto_complete_field. #2929 #3446 [doppler@gmail.com phil.ross@gmail.com]
-
-* Allow auto-discovery of third party template library layouts. [Marcel Molina Jr.]
-
-* Have the form builder output radio button, not check box, when calling the radio button helper. #3331 [LouisStAmour@gmail.com]
-
-* Added assignment of the Autocompleter object created by JavaScriptMacroHelper#auto_complete_field to a local javascript variables [DHH]
-
-* Added :on option for PrototypeHelper#observe_field that allows you to specify a different callback hook to have the observer trigger on [DHH]
-
-* Added JavaScriptHelper#button_to_function that works just like JavaScriptHelper#link_to_function but uses a button instead of a href [DHH]
-
-* Added that JavaScriptHelper#link_to_function will honor existing :onclick definitions when adding the function call [DHH]
-
-* Added :disable_with option to FormTagHelper#submit_tag to allow for easily disabled submit buttons with different text [DHH]
-
-* Make auto_link handle nil by returning quickly if blank? [Scott Barron]
-
-* Make auto_link match urls with a port number specified. [Marcel Molina Jr.]
-
-* Added support for toggling visual effects to ScriptaculousHelper::visual_effect, #3323. [Thomas Fuchs]
-
-* Update to script.aculo.us to 1.5.0 rev. 3343 [Thomas Fuchs]
-
-* Added :select option for JavaScriptMacroHelper#auto_complete_field that makes it easier to only use part of the auto-complete suggestion as the value for insertion [Thomas Fuchs]
-
-* Added delayed execution of Javascript from within RJS #3264 [devslashnull@gmail.com]. Example:
-
- page.delay(20) do
- page.visual_effect :fade, 'notice'
- end
-
-* Add session ID to default logging, but remove the verbose description of every step [DHH]
-
-* Add the following RJS methods: [Sam Stephenson]
-
- * alert - Displays an alert() dialog
- * redirect_to - Changes window.location.href to simulate a browser redirect
- * call - Calls a JavaScript function
- * assign - Assigns to a JavaScript variable
- * << - Inserts an arbitrary JavaScript string
-
-* Fix incorrect documentation for form_for [Nicholas Seckar]
-
-* Don't include a layout when rendering an rjs template using render's :template option. [Marcel Molina Jr.]
-
-*1.1.2* (December 13th, 2005)
-
-* Become part of Rails 1.0
-
-* Update to script.aculo.us 1.5.0 final (equals 1.5.0_rc6) [Thomas Fuchs]
-
-* Update to Prototype 1.4.0 final [Sam Stephenson]
-
-* Added form_remote_for (form_for meets form_remote_tag) [DHH]
-
-* Update to script.aculo.us 1.5.0_rc6
-
-* More robust relative url root discovery for SCGI compatibility. This solves the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint. #3070 [Dave Ringoen]
-
-* Fix docs for text_area_tag. #3083. [Christopher Cotton]
-
-* Change form_for and fields_for method signatures to take object name and object as separate arguments rather than as a Hash. [DHH]
-
-* Introduce :selected option to the select helper. Allows you to specify a selection other than the current value of object.method. Specify :selected => nil to leave all options unselected. #2991 [Jonathan Viney ]
-
-* Initialize @optional in routing code to avoid warnings about uninitialized access to an instance variable. [Nicholas Seckar]
-
-* Make ActionController's render honor the :locals option when rendering a :file. #1665. [Emanuel Borsboom, Marcel Molina Jr.]
-
-* Allow assert_tag(:conditions) to match the empty string when a tag has no children. Closes #2959. [Jamis Buck]
-
-* Update html-scanner to handle CDATA sections better. Closes #2970. [Jamis Buck]
-
-* Don't put flash in session if sessions are disabled. [Jeremy Kemper]
-
-* Strip out trailing &_= for raw post bodies. Closes #2868. [Sam Stephenson]
-
-* Pass multiple arguments to Element.show and Element.hide in JavaScriptGenerator instead of using iterators. [Sam Stephenson]
-
-* Improve expire_fragment documentation. #2966 [court3nay@gmail.com]
-
-* Correct docs for automatic layout assignment. #2610. [Charles M. Gerungan]
-
-* Always create new AR sessions rather than trying too hard to avoid database traffic. #2731 [Jeremy Kemper]
-
-* Update to Prototype 1.4.0_rc4. Closes #2943 (old Array.prototype.reverse behavior can be obtained by passing false as an argument). [Sam Stephenson]
-
-* Use Element.update('id', 'html') instead of $('id').innerHTML = 'html' in JavaScriptGenerator#replace_html so that script tags are evaluated. [Sam Stephenson]
-
-* Make rjs templates always implicitly skip out on layouts. [Marcel Molina Jr.]
-
-* Correct length for the truncate text helper. #2913 [Stefan Kaes]
-
-* Update to Prototype 1.4.0_rc3. Closes #1893, #2505, #2550, #2748, #2783. [Sam Stephenson]
-
-* Add support for new rjs templates which wrap an update_page block. [Marcel Molina Jr.]
-
-* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
-
-* Correct time_zone_options_for_select docs. #2892 [pudeyo@rpi.com]
-
-* Remove the unused, slow response_dump and session_dump variables from error pages. #1222 [lmarlow@yahoo.com]
-
-* Performance tweaks: use Set instead of Array to speed up prototype helper include? calls. Avoid logging code if logger is nil. Inline commonly-called template presence checks. #2880, #2881, #2882, #2883 [Stefan Kaes]
-
-* MemCache store may be given multiple addresses. #2869 [Ryan Carver ]
-
-* Handle cookie parsing irregularity for certain Nokia phones. #2530 [zaitzow@gmail.com]
-
-* Added PrototypeHelper::JavaScriptGenerator and PrototypeHelper#update_page for easily modifying multiple elements in an Ajax response. [Sam Stephenson] Example:
-
- update_page do |page|
- page.insert_html :bottom, 'list', 'Last item '
- page.visual_effect :highlight, 'list'
- page.hide 'status-indicator', 'cancel-link'
- end
-
- generates the following JavaScript:
-
- new Insertion.Bottom("list", "Last item ");
- new Effect.Highlight("list");
- ["status-indicator", "cancel-link"].each(Element.hide);
-
-* Refactored JavaScriptHelper into PrototypeHelper and ScriptaculousHelper [Sam Stephenson]
-
-* Update to latest script.aculo.us version (as of [3031])
-
-* Updated docs for in_place_editor, fixes a couple bugs and offers extended support for external controls [Justin Palmer]
-
-* Update documentation for render :file. #2858 [Tom Werner]
-
-* Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. #2855 [court3nay@gmail.com]
-
-* Added FormHelper#form_for and FormHelper#fields_for that makes it easier to work with forms for single objects also if they don't reside in instance variables [DHH]. Examples:
-
- <% form_for :person, @person, :url => { :action => "update" } do |f| %>
- First name: <%= f.text_field :first_name %>
- Last name : <%= f.text_field :last_name %>
- Biography : <%= f.text_area :biography %>
- Admin? : <%= f.check_box :admin %>
- <% end %>
-
- <% form_for :person, person, :url => { :action => "update" } do |person_form| %>
- First name: <%= person_form.text_field :first_name %>
- Last name : <%= person_form.text_field :last_name %>
-
- <% fields_for :permission => person.permission do |permission_fields| %>
- Admin? : <%= permission_fields.check_box :admin %>
- <% end %>
- <% end %>
-
-* options_for_select allows any objects which respond_to? :first and :last rather than restricting to Array and Range. #2824 [Jacob Robbins , Jeremy Kemper]
-
-* The auto_link text helper accepts an optional block to format the link text for each url and email address. Example: auto_link(post.body) { |text| truncate(text, 10) } [Jeremy Kemper]
-
-* assert_tag uses exact matches for string conditions, instead of partial matches. Use regex to do partial matches. #2799 [Jamis Buck]
-
-* CGI::Session::ActiveRecordStore.data_column_name = 'foobar' to use a different session data column than the 'data' default. [nbpwie102@sneakemail.com]
-
-* Do not raise an exception when default helper is missing; log a debug message instead. It's nice to delete empty helpers. [Jeremy Kemper]
-
-* Controllers with acronyms in their names (e.g. PDFController) require the correct default helper (PDFHelper in file pdf_helper.rb). #2262 [jeff@opendbms.com]
-
-
-*1.11.0* (November 7th, 2005)
-
-* Added request as instance method to views, so you can do <%= request.env["HTTP_REFERER"] %>, just like you can already access response, session, and the likes [DHH]
-
-* Fix conflict with assert_tag and Glue gem #2255 [david.felstead@gmail.com]
-
-* Add documentation to assert_tag indicating that it only works with well-formed XHTML #1937, #2570 [Jamis Buck]
-
-* Added action_pack.rb stub so that ActionPack::Version loads properly [Sam Stephenson]
-
-* Added short-hand to assert_tag so assert_tag :tag => "span" can be written as assert_tag "span" [DHH]
-
-* Added skip_before_filter/skip_after_filter for easier control of the filter chain in inheritance hierachies [DHH]. Example:
-
- class ApplicationController < ActionController::Base
- before_filter :authenticate
- end
-
- class WeblogController < ApplicationController
- # will run the :authenticate filter
- end
-
- class SignupController < ActionController::Base
- # will not run the :authenticate filter
- skip_before_filter :authenticate
- end
-
-* Added redirect_to :back as a short-hand for redirect_to(request.env["HTTP_REFERER"]) [DHH]
-
-* Change javascript_include_tag :defaults to not use script.aculo.us loader, which facilitates the use of plugins for future script.aculo.us and third party javascript extensions, and provide register_javascript_include_default for plugins to specify additional JavaScript files to load. Removed slider.js and builder.js from actionpack. [Thomas Fuchs]
-
-* Fix problem where redirecting components can cause an infinite loop [Rick Olson]
-
-* Added support for the queue option on visual_effect [Thomas Fuchs]
-
-* Update script.aculo.us to V1.5_rc4 [Thomas Fuchs]
-
-* Fix that render :text didn't interpolate instance variables #2629, #2626 [skaes]
-
-* Fix line number detection and escape RAILS_ROOT in backtrace Regexp [Nicholas Seckar]
-
-* Fixed document.getElementsByClassName from Prototype to be speedy again [Sam Stephenson]
-
-* Recognize ./#{RAILS_ROOT} as RAILS_ROOT in error traces [Nicholas Seckar]
-
-* Remove ARStore session fingerprinting [Nicholas Seckar]
-
-* Fix obscure bug in ARStore [Nicholas Seckar]
-
-* Added TextHelper#strip_tags for removing HTML tags from a string (using HTMLTokenizer) #2229 [marcin@junkheap.net]
-
-* Added a reader for flash.now, so it's possible to do stuff like flash.now[:alert] ||= 'New if not set' #2422 [Caio Chassot]
-
-
-*1.10.2* (October 26th, 2005)
-
-* Reset template variables after using render_to_string [skaes@web.de]
-
-* Expose the session model backing CGI::Session
-
-* Abbreviate RAILS_ROOT in traces
-
-
-*1.10.1* (October 19th, 2005)
-
-* Update error trace templates [Nicholas Seckar]
-
-* Stop showing generated routing code in application traces [Nicholas Seckar]
-
-
-*1.10.0* (October 16th, 2005)
-
-* Make string-keys locals assigns optional. Add documentation describing depreciated state [skaes@web.de]
-
-* Improve line number detection for template errors [Nicholas Seckar]
-
-* Update/clean up documentation (rdoc)
-
-* Upgrade to Prototype 1.4.0_rc0 [Sam Stephenson]
-
-* Added assert_vaild. Reports the proper AR error messages as fail message when the passed record is invalid [Tobias Luetke]
-
-* Add temporary support for passing locals to render using string keys [Nicholas Seckar]
-
-* Clean up error pages by providing better backtraces [Nicholas Seckar]
-
-* Raise an exception if an attempt is made to insert more session data into the ActiveRecordStore data column than the column can hold. #2234. [justin@textdrive.com]
-
-* Removed references to assertions.rb from actionpack assert's backtraces. Makes error reports in functional unit tests much less noisy. [Tobias Luetke]
-
-* Updated and clarified documentation for JavaScriptHelper to be more concise about the various options for including the JavaScript libs. [Thomas Fuchs]
-
-* Hide "Retry with Breakpoint" button on error pages until feature is functional. [DHH]
-
-* Fix Request#host_with_port to use the standard port when Rails is behind a proxy. [Nicholas Seckar]
-
-* Escape query strings in the href attribute of URLs created by url_helper. #2333 [Michael Schuerig ]
-
-* Improved line number reporting for template errors [Nicholas Seckar]
-
-* Added :locals support for render :inline #2463 [mdabney@cavoksolutions.com]
-
-* Unset the X-Requested-With header when using the xhr wrapper in functional tests so that future requests aren't accidentally xhr'ed #2352 [me@julik.nl, Sam Stephenson]
-
-* Unescape paths before writing cache to file system. #1877. [Damien Pollet]
-
-* Wrap javascript_tag contents in a CDATA section and add a cdata_section method to TagHelper #1691 [Michael Schuerig, Sam Stephenson]
-
-* Misc doc fixes (typos/grammar/etc). #2445. [coffee2code]
-
-* Speed improvement for session_options. #2287. [skaes@web.de]
-
-* Make cacheing binary files friendly with Windows. #1975. [Rich Olson]
-
-* Convert boolean form options form the tag_helper. #809. [Michael Schuerig ]
-
-* Fixed that an instance variable with the same name as a partial should be implicitly passed as the partial :object #2269 [court3nay]
-
-* Update Prototype to V1.4.0_pre11, script.aculo.us to [2502] [Thomas Fuchs]
-
-* Make assert_tag :children count appropriately. Closes #2181. [jamie@bravenet.com]
-
-* Forced newer versions of RedCloth to use hard breaks [DHH]
-
-* Added new scriptaculous options for auto_complete_field #2343 [m.stienstra@fngtps.com]
-
-* Don't prepend the asset host if the string is already a fully-qualified URL
-
-* Updated to script.aculo.us V1.5.0_rc2 and Prototype to V1.4.0_pre7 [Thomas Fuchs]
-
-* Undo condition change made in [2345] to prevent normal parameters arriving as StringIO.
-
-* Tolerate consecutive delimiters in query parameters. #2295 [darashi@gmail.com]
-
-* Streamline render process, code cleaning. Closes #2294. [skae]
-
-* Keep flash after components are rendered. #2291 [Rick Olson, Scott]
-
-* Shorten IE file upload path to filename only to match other browsers. #1507 [court3nay@gmail.com]
-
-* Fix open/save dialog in IE not opening files send with send_file/send_data, #2279 [Thomas Fuchs]
-
-* Fixed that auto_discovery_link_tag couldn't take a string as the URL [DHH]
-
-* Fixed problem with send_file and WEBrick using stdout #1812 [DHH]
-
-* Optimized tag_options to not sort keys, which is no longer necessary when assert_dom_equal and friend is available #1995 [skae]
-
-* Added assert_dom_equal and assert_dom_not_equal to compare tags generated by the helpers in an order-indifferent manner #1995 [skae]
-
-* Fixed that Request#domain caused an exception if the domain header wasn't set in the original http request #1795 [Michael Koziarski]
-
-* Make the truncate() helper multi-byte safe (assuming $KCODE has been set to something other than "NONE") #2103
-
-* Add routing tests from #1945 [ben@groovie.org]
-
-* Add a routing test case covering #2101 [Nicholas Seckar]
-
-* Cache relative_url_root for all webservers, not just Apache #2193 [skae]
-
-* Speed up cookie use by decreasing string copying #2194 [skae]
-
-* Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina]
-
-* Added easy assignment of fragment cache store through use of symbols for included stores (old way still works too)
-
- Before:
- ActionController::Base.fragment_cache_store =
- ActionController::Base::Caching::Fragments::FileStore.new("/path/to/cache/directory")
-
- After:
- ActionController::Base.fragment_cache_store = :file_store, "/path/to/cache/directory"
-
-* Added ActionController::Base.session_store=, session_store, and session_options to make it easier to tweak the session options (instead of going straight to ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS)
-
-* Added TextHelper#cycle to cycle over an array of values on each hit (useful for alternating row colors etc) #2154 [dave-ml@dribin.org]
-
-* Ensure that request.path never returns nil. Closes #1675 [Nicholas Seckar]
-
-* Add ability to specify Route Regexps for controllers. Closes #1917. [Sebastian Kanthak]
-
-* Provide Named Route's hash methods as helper methods. Closes #1744. [Nicholas Seckar, Steve Purcell]
-
-* Added :multipart option to ActiveRecordHelper#form to make it possible to add file input fields #2034 [jstirk@oobleyboo.com]
-
-* Moved auto-completion and in-place editing into the Macros module and their helper counterparts into JavaScriptMacrosHelper
-
-* Added in-place editing support in the spirit of auto complete with ActionController::Base.in_place_edit_for, JavascriptHelper#in_place_editor_field, and Javascript support from script.aculo.us #2038 [Jon Tirsen]
-
-* Added :disabled option to all data selects that'll make the elements inaccessible for change #2167, #253 [eigentone]
-
-* Fixed that TextHelper#auto_link_urls would include punctuation in the links #2166, #1671 [eigentone]
-
-* Fixed that number_to_currency(1000, {:precision => 0})) should return "$1,000", instead of "$1,000." #2122 [sd@notso.net]
-
-* Allow link_to_remote to use any DOM-element as the parent of the form elements to be submitted #2137 [erik@ruby-lang.nl]. Example:
-
-
-
-
- <%= link_to_remote 'Save', :update => "row023",
- :submit => "row023", :url => {:action => 'save_row'} %>
-
-
-* Fixed that render :partial would fail when :object was a Hash (due to backwards compatibility issues) #2148 [Sam Stephenson]
-
-* Fixed JavascriptHelper#auto_complete_for to only include unique items #2153 [Thomas Fuchs]
-
-* Fixed all AssetHelper methods to work with relative paths, such that javascript_include_tag('stdlib/standard') will look in /javascripts/stdlib/standard instead of '/stdlib/standard/' #1963
-
-* Avoid extending view instance with helper modules each request. Closes #1979
-
-* Performance improvements to CGI methods. Closes #1980 [Skaes]
-
-* Added :post option to UrlHelper#link_to that makes it possible to do POST requests through normal ahref links using Javascript
-
-* Fixed overwrite_params
-
-* Added ActionController::Base.benchmark and ActionController::Base.silence to allow for easy benchmarking and turning off the log
-
-* Updated vendor copy of html-scanner to support better xml parsing
-
-* Added :popup option to UrlHelper#link_to #1996 [gabriel.gironda@gmail.com]. Examples:
-
- link_to "Help", { :action => "help" }, :popup => true
- link_to "Busy loop", { :action => "busy" }, :popup => ['new_window', 'height=300,width=600']
-
-* Drop trailing \000 if present on RAW_POST_DATA (works around bug in Safari Ajax implementation) #918
-
-* Fix observe_field to fall back to event-based observation if frequency <= 0 #1916 [michael@schubert.cx]
-
-* Allow use of the :with option for submit_to_remote #1936 [jon@instance-design.co.uk]
-
-* AbstractRequest#domain returns nil when host is an ip address #2012 [kevin.clark@gmail.com]
-
-* ActionController documentation update #2051 [fbeausoleil@ftml.net]
-
-* Yield @content_for_ variables to templates #2058 [Sam Stephenson]
-
-* Make rendering an empty partial collection behave like :nothing => true #2080 [Sam Stephenson]
-
-* Add option to specify the singular name used by pagination.
-
-* Use string key to obtain action value. Allows indifferent hashes to be disabled.
-
-* Added ActionView::Base.cache_template_loading back.
-
-* Rewrote compiled templates to decrease code complexity. Removed template load caching in favour of compiled caching. Fixed template error messages. [Nicholas Seckar]
-
-* Fix Routing to handle :some_param => nil better. [Nicholas Seckar, Luminas]
-
-* Add support for :include with pagination (subject to existing constraints for :include with :limit and :offset) #1478 [michael@schubert.cx]
-
-* Prevent the benchmark module from blowing up if a non-HTTP/1.1 request is processed
-
-* Added :use_short_month option to select_month helper to show month names as abbreviations
-
-* Make link_to escape the javascript in the confirm option #1964 [nicolas.pouillard@gmail.com]
-
-* Make assert_redirected_to properly check URL's passed as strings #1910 [Scott Barron]
-
-* Make sure :layout => false is always used when rendering inside a layout
-
-* Use raise instead of assert_not_nil in Test::Unit::TestCase#process to ensure that the test variables (controller, request, response) have been set
-
-* Make sure assigns are built for every request when testing #1866
-
-* Allow remote_addr to be queried on TestRequest #1668
-
-* Fixed bug when a partial render was passing a local with the same name as the partial
-
-* Improved performance of test app req/sec with ~10% refactoring the render method #1823 [Stefan Kaes]
-
-* Improved performance of test app req/sec with 5-30% through a series of Action Pack optimizations #1811 [Stefan Kaes]
-
-* Changed caching/expiration/hit to report using the DEBUG log level and errors to use the ERROR log level instead of both using INFO
-
-* Added support for per-action session management #1763
-
-* Improved rendering speed on complicated templates by up to 100% (the more complex the templates, the higher the speedup) #1234 [Stephan Kaes]. This did necessasitate a change to the internals of ActionView#render_template that now has four parameters. Developers of custom view handlers (like Amrita) need to update for that.
-
-* Added options hash as third argument to FormHelper#input, so you can do input('person', 'zip', :size=>10) #1719 [jeremye@bsa.ca.gov]
-
-* Added Base#expires_in(seconds)/Base#expires_now to control HTTP content cache headers #1755 [Thomas Fuchs]
-
-* Fixed line number reporting for Builder template errors #1753 [piotr]
-
-* Fixed assert_routing so that testing controllers in modules works as expected [Nicholas Seckar, Rick Olson]
-
-* Fixed bug with :success/:failure callbacks for the JavaScriptHelper methods #1730 [court3nay/Thomas Fuchs]
-
-* Added named_route method to RouteSet instances so that RouteSet instance methods do not prevent certain names from being used. [Nicholas Seckar]
-
-* Fixed routes so that routes which do not specify :action in the path or in the requirements have a default of :action => 'index', In addition, fixed url generation so that :action => 'index' does not need to be provided for such urls. [Nicholas Seckar, Markjuh]
-
-* Worked around a Safari bug where it wouldn't pass headers through if the response was zero length by having render :nothing return ' ' instead of ''
-
-* Fixed Request#subdomains to handle "foo.foo.com" correctly
-
-
-*1.9.1* (11 July, 2005)
-
-* Fixed that auto_complete_for didn't force the input string to lower case even as the db comparison was
-
-* Fixed that Action View should always use the included Builder, never attempt to require the gem, to ensure compatibility
-
-* Added that nil options are not included in tags, so tag("p", :ignore => nil) now returns
not
but that tag("p", :ignore => "") still includes it #1465 [michael@schuerig.de]
-
-* Fixed that UrlHelper#link_to_unless/link_to_if used html_escape on the name if no link was to be applied. This is unnecessary and breaks its use with images #1649 [joergd@pobox.com]
-
-* Improved error message for DoubleRenderError
-
-* Fixed routing to allow for testing of *path components #1650 [Nicholas Seckar]
-
-* Added :handle as an option to sortable_element to restrict the drag handle to a given class #1642 [thejohnny]
-
-* Added a bunch of script.aculo.us features #1644, #1677, #1695 [Thomas Fuchs]
- * Effect.ScrollTo, to smoothly scroll the page to an element
- * Better Firefox flickering handling on SlideUp/SlideDown
- * Removed a possible memory leak in IE with draggables
- * Added support for cancelling dragging my hitting ESC
- * Added capability to remove draggables/droppables and redeclare sortables in dragdrop.js (this makes it possible to call sortable_element on the same element more than once, e.g. in AJAX returns that modify the sortable element. all current sortable 'stuff' on the element will be discarded and the sortable will be rebuilt)
- * Always reset background color on Effect.Highlight; this make change backwards-compatibility, to be sure include style="background-color:(target-color)" on your elements or else elements will fall back to their CSS rules (which is a good thing in most circumstances)
- * Removed circular references from element to prevent memory leaks (still not completely gone in IE)
- * Changes to class extension in effects.js
- * Make Effect.Highlight restore any previously set background color when finishing (makes effect work with CSS classes that set a background color)
- * Fixed myriads of memory leaks in IE and Gecko-based browsers [David Zülke]
- * Added incremental and local autocompleting and loads of documentation to controls.js [Ivan Krstic]
- * Extended the auto_complete_field helper to accept tokens option
- * Changed object extension mechanism to favor Object.extend to make script.aculo.us easily adaptable to support 3rd party libs like IE7.js [David Zülke]
-
-* Fixed that named routes didn't use the default values for action and possible other parameters #1534 [Nicholas Seckar]
-
-* Fixed JavascriptHelper#visual_effect to use camelize such that :blind_up will work #1639 [pelletierm@eastmedia.net]
-
-* Fixed that a SessionRestoreError was thrown if a model object was placed in the session that wasn't available to all controllers. This means that it's no longer necessary to use the 'model :post' work-around in ApplicationController to have a Post model in your session.
-
-
-*1.9.0* (6 July, 2005)
-
-* Added logging of the request URI in the benchmark statement (makes it easy to grep for slow actions)
-
-* Added javascript_include_tag :defaults shortcut that'll include all the default javascripts included with Action Pack (prototype, effects, controls, dragdrop)
-
-* Cache several controller variables that are expensive to calculate #1229 [skaes@web.de]
-
-* The session class backing CGI::Session::ActiveRecordStore may be replaced with any class that duck-types with a subset of Active Record. See docs for details #1238 [skaes@web.de]
-
-* Fixed that hashes was not working properly when passed by GET to lighttpd #849 [Nicholas Seckar]
-
-* Fixed assert_template nil will be true when no template was rendered #1565 [maceywj@telus.net]
-
-* Added :prompt option to FormOptions#select (and the users of it, like FormOptions#select_country etc) to create "Please select" style descriptors #1181 [Michael Schuerig]
-
-* Added JavascriptHelper#update_element_function, which returns a Javascript function (or expression) that'll update a DOM element according to the options passed #933 [mortonda@dgrmm.net]. Examples:
-
- <%= update_element_function("products", :action => :insert, :position => :bottom, :content => "New product!
") %>
-
- <% update_element_function("products", :action => :replace, :binding => binding) do %>
- Product 1
- Product 2
- <% end %>
-
-* Added :field_name option to DateHelper#select_(year|month|day) to deviate from the year/month/day defaults #1266 [Marcel Molina]
-
-* Added JavascriptHelper#draggable_element and JavascriptHelper#drop_receiving_element to facilitate easy dragging and dropping through the script.aculo.us libraries #1578 [Thomas Fuchs]
-
-* Added that UrlHelper#mail_to will now also encode the default link title #749 [f.svehla@gmail.com]
-
-* Removed the default option of wrap=virtual on FormHelper#text_area to ensure XHTML compatibility #1300 [thomas@columbus.rr.com]
-
-* Adds the ability to include XML CDATA tags using Builder #1563 [Josh Knowles]. Example:
-
- xml.cdata! "some text" # =>
-
-* Added evaluation of
- #
- # javascript_include_tag "common.javascript", "/elsewhere/cools" # =>
- #
- #
- #
- # javascript_include_tag :defaults # =>
- #
- #
- # ...
- # *see below
- #
- # If there's an application.js file in your public/javascripts directory,
- # javascript_include_tag :defaults will automatically include it. This file
- # facilitates the inclusion of small snippets of JavaScript code, along the lines of
- # controllers/application.rb and helpers/application_helper.rb .
- def javascript_include_tag(*sources)
- options = sources.last.is_a?(Hash) ? sources.pop.stringify_keys : { }
-
- if sources.include?(:defaults)
- sources = sources[0..(sources.index(:defaults))] +
- @@javascript_default_sources.dup +
- sources[(sources.index(:defaults) + 1)..sources.length]
-
- sources.delete(:defaults)
- sources << "application" if defined?(RAILS_ROOT) && File.exists?("#{RAILS_ROOT}/public/javascripts/application.js")
- end
-
- sources.collect { |source|
- source = javascript_path(source)
- content_tag("script", "", { "type" => "text/javascript", "src" => source }.merge(options))
- }.join("\n")
- end
-
- # Register one or more additional JavaScript files to be included when
- #
- # javascript_include_tag :defaults
- #
- # is called. This method is intended to be called only from plugin initialization
- # to register extra .js files the plugin installed in public/javascripts .
- def self.register_javascript_include_default(*sources)
- @@javascript_default_sources.concat(sources)
- end
-
- def self.reset_javascript_include_default #:nodoc:
- @@javascript_default_sources = JAVASCRIPT_DEFAULT_SOURCES.dup
- end
-
- # Returns path to a stylesheet asset. Example:
- #
- # stylesheet_path "style" # => /stylesheets/style.css
- def stylesheet_path(source)
- compute_public_path(source, 'stylesheets', 'css')
- end
-
- # Returns a css link tag per source given as argument. Examples:
- #
- # stylesheet_link_tag "style" # =>
- #
- #
- # stylesheet_link_tag "style", :media => "all" # =>
- #
- #
- # stylesheet_link_tag "random.styles", "/css/stylish" # =>
- #
- #
- def stylesheet_link_tag(*sources)
- options = sources.last.is_a?(Hash) ? sources.pop.stringify_keys : { }
- sources.collect { |source|
- source = stylesheet_path(source)
- tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => source }.merge(options))
- }.join("\n")
- end
-
- # Returns path to an image asset. Example:
- #
- # The +src+ can be supplied as a...
- # * full path, like "/my_images/image.gif"
- # * file name, like "rss.gif", that gets expanded to "/images/rss.gif"
- # * file name without extension, like "logo", that gets expanded to "/images/logo.png"
- def image_path(source)
- unless (source.split("/").last || source).include?(".") || source.blank?
- ActiveSupport::Deprecation.warn(
- "You've called image_path with a source that doesn't include an extension. " +
- "In Rails 2.0, that will not result in .png automatically being appended. " +
- "So you should call image_path('#{source}.png') instead", caller
- )
- end
-
- compute_public_path(source, 'images', 'png')
- end
-
- # Returns an image tag converting the +options+ into html options on the tag, but with these special cases:
- #
- # * :alt - If no alt text is given, the file name part of the +src+ is used (capitalized and without the extension)
- # * :size - Supplied as "XxY", so "30x45" becomes width="30" and height="45"
- #
- # The +src+ can be supplied as a...
- # * full path, like "/my_images/image.gif"
- # * file name, like "rss.gif", that gets expanded to "/images/rss.gif"
- # * file name without extension, like "logo", that gets expanded to "/images/logo.png"
- def image_tag(source, options = {})
- options.symbolize_keys!
-
- options[:src] = image_path(source)
- options[:alt] ||= File.basename(options[:src], '.*').split('.').first.capitalize
-
- if options[:size]
- options[:width], options[:height] = options[:size].split("x")
- options.delete :size
- end
-
- tag("img", options)
- end
-
- private
- def compute_public_path(source, dir, ext)
- source = source.dup
- source << ".#{ext}" if File.extname(source).blank?
- unless source =~ %r{^[-a-z]+://}
- source = "/#{dir}/#{source}" unless source[0] == ?/
- asset_id = rails_asset_id(source)
- source << '?' + asset_id if defined?(RAILS_ROOT) and not asset_id.blank?
- source = "#{ActionController::Base.asset_host}#{@controller.request.relative_url_root}#{source}"
- end
- source
- end
-
- def rails_asset_id(source)
- ENV["RAILS_ASSET_ID"] ||
- File.mtime("#{RAILS_ROOT}/public/#{source}").to_i.to_s rescue ""
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb
deleted file mode 100644
index 1d53be51..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-require 'benchmark'
-
-module ActionView
- module Helpers
- module BenchmarkHelper
- # Measures the execution time of a block in a template and reports the result to the log. Example:
- #
- # <% benchmark "Notes section" do %>
- # <%= expensive_notes_operation %>
- # <% end %>
- #
- # Will add something like "Notes section (0.34523)" to the log.
- #
- # You may give an optional logger level as the second argument
- # (:debug, :info, :warn, :error). The default is :info.
- def benchmark(message = "Benchmarking", level = :info)
- if @logger
- real = Benchmark.realtime { yield }
- @logger.send level, "#{message} (#{'%.5f' % real})"
- end
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb
deleted file mode 100644
index de2707ac..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module ActionView
- module Helpers
- # See ActionController::Caching::Fragments for usage instructions.
- module CacheHelper
- def cache(name = {}, &block)
- @controller.cache_erb_fragment(block, name)
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb
deleted file mode 100644
index 497ce093..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-module ActionView
- module Helpers
- # Capture lets you extract parts of code which
- # can be used in other points of the template or even layout file.
- #
- # == Capturing a block into an instance variable
- #
- # <% @script = capture do %>
- # [some html...]
- # <% end %>
- #
- # == Add javascript to header using content_for
- #
- # content_for("name") is a wrapper for capture which will
- # make the fragment available by name to a yielding layout or template.
- #
- # layout.rhtml:
- #
- #
- #
- # layout with js
- #
- #
- #
- # <%= yield %>
- #
- #
- #
- # view.rhtml
- #
- # This page shows an alert box!
- #
- # <% content_for("script") do %>
- # alert('hello world')
- # <% end %>
- #
- # Normal view text
- module CaptureHelper
- # Capture allows you to extract a part of the template into an
- # instance variable. You can use this instance variable anywhere
- # in your templates and even in your layout.
- #
- # Example of capture being used in a .rhtml page:
- #
- # <% @greeting = capture do %>
- # Welcome To my shiny new web page!
- # <% end %>
- #
- # Example of capture being used in a .rxml page:
- #
- # @greeting = capture do
- # 'Welcome To my shiny new web page!'
- # end
- def capture(*args, &block)
- # execute the block
- begin
- buffer = eval("_erbout", block.binding)
- rescue
- buffer = nil
- end
-
- if buffer.nil?
- capture_block(*args, &block)
- else
- capture_erb_with_buffer(buffer, *args, &block)
- end
- end
-
- # Calling content_for stores the block of markup for later use.
- # Subsequently, you can make calls to it by name with yield
- # in another template or in the layout.
- #
- # Example:
- #
- # <% content_for("header") do %>
- # alert('hello world')
- # <% end %>
- #
- # You can use yield :header anywhere in your templates.
- #
- # <%= yield :header %>
- #
- # NOTE: Beware that content_for is ignored in caches. So you shouldn't use it
- # for elements that are going to be fragment cached.
- #
- # The deprecated way of accessing a content_for block was to use a instance variable
- # named @@content_for_#{name_of_the_content_block}@. So <%= content_for('footer') %>
- # would be avaiable as <%= @content_for_footer %> . The preferred notation now is
- # <%= yield :footer %> .
- def content_for(name, content = nil, &block)
- eval "@content_for_#{name} = (@content_for_#{name} || '') + capture(&block)"
- end
-
- private
- def capture_block(*args, &block)
- block.call(*args)
- end
-
- def capture_erb(*args, &block)
- buffer = eval("_erbout", block.binding)
- capture_erb_with_buffer(buffer, *args, &block)
- end
-
- def capture_erb_with_buffer(buffer, *args, &block)
- pos = buffer.length
- block.call(*args)
-
- # extract the block
- data = buffer[pos..-1]
-
- # replace it in the original with empty string
- buffer[pos..-1] = ''
-
- data
- end
-
- def erb_content_for(name, &block)
- eval "@content_for_#{name} = (@content_for_#{name} || '') + capture_erb(&block)"
- end
-
- def block_content_for(name, &block)
- eval "@content_for_#{name} = (@content_for_#{name} || '') + capture_block(&block)"
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb
deleted file mode 100755
index 19dc90ca..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb
+++ /dev/null
@@ -1,429 +0,0 @@
-require "date"
-
-module ActionView
- module Helpers
- # The Date Helper primarily creates select/option tags for different kinds of dates and date elements. All of the select-type methods
- # share a number of common options that are as follows:
- #
- # * :prefix - overwrites the default prefix of "date" used for the select names. So specifying "birthday" would give
- # birthday[month] instead of date[month] if passed to the select_month method.
- # * :include_blank - set to true if it should be possible to set an empty date.
- # * :discard_type - set to true if you want to discard the type part of the select name. If set to true, the select_month
- # method would use simply "date" (which can be overwritten using :prefix ) instead of "date[month]".
- module DateHelper
- DEFAULT_PREFIX = 'date' unless const_defined?('DEFAULT_PREFIX')
-
- # Reports the approximate distance in time between two Time or Date objects or integers as seconds.
- # Set include_seconds to true if you want more detailed approximations when distance < 1 min, 29 secs
- # Distances are reported base on the following table:
- #
- # 0 <-> 29 secs # => less than a minute
- # 30 secs <-> 1 min, 29 secs # => 1 minute
- # 1 min, 30 secs <-> 44 mins, 29 secs # => [2..44] minutes
- # 44 mins, 30 secs <-> 89 mins, 29 secs # => about 1 hour
- # 89 mins, 29 secs <-> 23 hrs, 59 mins, 29 secs # => about [2..24] hours
- # 23 hrs, 59 mins, 29 secs <-> 47 hrs, 59 mins, 29 secs # => 1 day
- # 47 hrs, 59 mins, 29 secs <-> 29 days, 23 hrs, 59 mins, 29 secs # => [2..29] days
- # 29 days, 23 hrs, 59 mins, 30 secs <-> 59 days, 23 hrs, 59 mins, 29 secs # => about 1 month
- # 59 days, 23 hrs, 59 mins, 30 secs <-> 1 yr minus 31 secs # => [2..12] months
- # 1 yr minus 30 secs <-> 2 yrs minus 31 secs # => about 1 year
- # 2 yrs minus 30 secs <-> max time or date # => over [2..X] years
- #
- # With include_seconds = true and the difference < 1 minute 29 seconds
- # 0-4 secs # => less than 5 seconds
- # 5-9 secs # => less than 10 seconds
- # 10-19 secs # => less than 20 seconds
- # 20-39 secs # => half a minute
- # 40-59 secs # => less than a minute
- # 60-89 secs # => 1 minute
- #
- # Examples:
- #
- # from_time = Time.now
- # distance_of_time_in_words(from_time, from_time + 50.minutes) # => about 1 hour
- # distance_of_time_in_words(from_time, from_time + 15.seconds) # => less than a minute
- # distance_of_time_in_words(from_time, from_time + 15.seconds, true) # => less than 20 seconds
- #
- # Note: Rails calculates one year as 365.25 days.
- def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false)
- from_time = from_time.to_time if from_time.respond_to?(:to_time)
- to_time = to_time.to_time if to_time.respond_to?(:to_time)
- distance_in_minutes = (((to_time - from_time).abs)/60).round
- distance_in_seconds = ((to_time - from_time).abs).round
-
- case distance_in_minutes
- when 0..1
- return (distance_in_minutes == 0) ? 'less than a minute' : '1 minute' unless include_seconds
- case distance_in_seconds
- when 0..4 then 'less than 5 seconds'
- when 5..9 then 'less than 10 seconds'
- when 10..19 then 'less than 20 seconds'
- when 20..39 then 'half a minute'
- when 40..59 then 'less than a minute'
- else '1 minute'
- end
-
- when 2..44 then "#{distance_in_minutes} minutes"
- when 45..89 then 'about 1 hour'
- when 90..1439 then "about #{(distance_in_minutes.to_f / 60.0).round} hours"
- when 1440..2879 then '1 day'
- when 2880..43199 then "#{(distance_in_minutes / 1440).round} days"
- when 43200..86399 then 'about 1 month'
- when 86400..525959 then "#{(distance_in_minutes / 43200).round} months"
- when 525960..1051919 then 'about 1 year'
- else "over #{(distance_in_minutes / 525960).round} years"
- end
- end
-
- # Like distance_of_time_in_words, but where to_time is fixed to Time.now .
- def time_ago_in_words(from_time, include_seconds = false)
- distance_of_time_in_words(from_time, Time.now, include_seconds)
- end
-
- alias_method :distance_of_time_in_words_to_now, :time_ago_in_words
-
- # Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based attribute (identified by
- # +method+) on an object assigned to the template (identified by +object+). It's possible to tailor the selects through the +options+ hash,
- # which accepts all the keys that each of the individual select builders do (like :use_month_numbers for select_month) as well as a range of
- # discard options. The discard options are :discard_year , :discard_month and :discard_day . Set to true, they'll
- # drop the respective select. Discarding the month select will also automatically discard the day select. It's also possible to explicitly
- # set the order of the tags using the :order option with an array of symbols :year , :month and :day in
- # the desired order. Symbols may be omitted and the respective select is not included.
- #
- # Passing :disabled => true as part of the +options+ will make elements inaccessible for change.
- #
- # NOTE: Discarded selects will default to 1. So if no month select is available, January will be assumed.
- #
- # Examples:
- #
- # date_select("post", "written_on")
- # date_select("post", "written_on", :start_year => 1995)
- # date_select("post", "written_on", :start_year => 1995, :use_month_numbers => true,
- # :discard_day => true, :include_blank => true)
- # date_select("post", "written_on", :order => [:day, :month, :year])
- # date_select("user", "birthday", :order => [:month, :day])
- #
- # The selects are prepared for multi-parameter assignment to an Active Record object.
- def date_select(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_date_select_tag(options)
- end
-
- # Returns a set of select tags (one for hour, minute and optionally second) pre-selected for accessing a specified
- # time-based attribute (identified by +method+) on an object assigned to the template (identified by +object+).
- # You can include the seconds with :include_seconds .
- # Examples:
- #
- # time_select("post", "sunrise")
- # time_select("post", "start_time", :include_seconds => true)
- #
- # The selects are prepared for multi-parameter assignment to an Active Record object.
- def time_select(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_time_select_tag(options)
- end
-
- # Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a specified datetime-based
- # attribute (identified by +method+) on an object assigned to the template (identified by +object+). Examples:
- #
- # datetime_select("post", "written_on")
- # datetime_select("post", "written_on", :start_year => 1995)
- #
- # The selects are prepared for multi-parameter assignment to an Active Record object.
- def datetime_select(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_datetime_select_tag(options)
- end
-
- # Returns a set of html select-tags (one for year, month, day, hour, and minute) pre-selected with the +datetime+.
- # It's also possible to explicitly set the order of the tags using the :order option with an array of
- # symbols :year , :month and :day in the desired order. If you do not supply a Symbol, it
- # will be appened onto the :order passed in. You can also add :date_separator and :time_separator
- # keys to the +options+ to control visual display of the elements.
- def select_datetime(datetime = Time.now, options = {})
- separator = options[:datetime_separator] || ''
- select_date(datetime, options) + separator + select_time(datetime, options)
- end
-
- # Returns a set of html select-tags (one for year, month, and day) pre-selected with the +date+.
- # It's possible to explicitly set the order of the tags using the :order option with an array of
- # symbols :year , :month and :day in the desired order. If you do not supply a Symbol, it
- # will be appened onto the :order passed in.
- def select_date(date = Date.today, options = {})
- options[:order] ||= []
- [:year, :month, :day].each { |o| options[:order].push(o) unless options[:order].include?(o) }
-
- select_date = ''
- options[:order].each do |o|
- select_date << self.send("select_#{o}", date, options)
- end
- select_date
- end
-
- # Returns a set of html select-tags (one for hour and minute)
- # You can set :add_separator key to format the output.
- def select_time(datetime = Time.now, options = {})
- separator = options[:time_separator] || ''
- select_hour(datetime, options) + separator + select_minute(datetime, options) + (options[:include_seconds] ? separator + select_second(datetime, options) : '')
- end
-
- # Returns a select tag with options for each of the seconds 0 through 59 with the current second selected.
- # The second can also be substituted for a second number.
- # Override the field name using the :field_name option, 'second' by default.
- def select_second(datetime, options = {})
- val = datetime ? (datetime.kind_of?(Fixnum) ? datetime : datetime.sec) : ''
- if options[:use_hidden]
- options[:include_seconds] ? hidden_html(options[:field_name] || 'second', val, options) : ''
- else
- second_options = []
- 0.upto(59) do |second|
- second_options << ((val == second) ?
- %(#{leading_zero_on_single_digits(second)} \n) :
- %(#{leading_zero_on_single_digits(second)} \n)
- )
- end
- select_html(options[:field_name] || 'second', second_options, options)
- end
- end
-
- # Returns a select tag with options for each of the minutes 0 through 59 with the current minute selected.
- # Also can return a select tag with options by minute_step from 0 through 59 with the 00 minute selected
- # The minute can also be substituted for a minute number.
- # Override the field name using the :field_name option, 'minute' by default.
- def select_minute(datetime, options = {})
- val = datetime ? (datetime.kind_of?(Fixnum) ? datetime : datetime.min) : ''
- if options[:use_hidden]
- hidden_html(options[:field_name] || 'minute', val, options)
- else
- minute_options = []
- 0.step(59, options[:minute_step] || 1) do |minute|
- minute_options << ((val == minute) ?
- %(#{leading_zero_on_single_digits(minute)} \n) :
- %(#{leading_zero_on_single_digits(minute)} \n)
- )
- end
- select_html(options[:field_name] || 'minute', minute_options, options)
- end
- end
-
- # Returns a select tag with options for each of the hours 0 through 23 with the current hour selected.
- # The hour can also be substituted for a hour number.
- # Override the field name using the :field_name option, 'hour' by default.
- def select_hour(datetime, options = {})
- val = datetime ? (datetime.kind_of?(Fixnum) ? datetime : datetime.hour) : ''
- if options[:use_hidden]
- hidden_html(options[:field_name] || 'hour', val, options)
- else
- hour_options = []
- 0.upto(23) do |hour|
- hour_options << ((val == hour) ?
- %(#{leading_zero_on_single_digits(hour)} \n) :
- %(#{leading_zero_on_single_digits(hour)} \n)
- )
- end
- select_html(options[:field_name] || 'hour', hour_options, options)
- end
- end
-
- # Returns a select tag with options for each of the days 1 through 31 with the current day selected.
- # The date can also be substituted for a hour number.
- # Override the field name using the :field_name option, 'day' by default.
- def select_day(date, options = {})
- val = date ? (date.kind_of?(Fixnum) ? date : date.day) : ''
- if options[:use_hidden]
- hidden_html(options[:field_name] || 'day', val, options)
- else
- day_options = []
- 1.upto(31) do |day|
- day_options << ((val == day) ?
- %(#{day} \n) :
- %(#{day} \n)
- )
- end
- select_html(options[:field_name] || 'day', day_options, options)
- end
- end
-
- # Returns a select tag with options for each of the months January through December with the current month selected.
- # The month names are presented as keys (what's shown to the user) and the month numbers (1-12) are used as values
- # (what's submitted to the server). It's also possible to use month numbers for the presentation instead of names --
- # set the :use_month_numbers key in +options+ to true for this to happen. If you want both numbers and names,
- # set the :add_month_numbers key in +options+ to true. If you would prefer to show month names as abbreviations,
- # set the :use_short_month key in +options+ to true. If you want to use your own month names, set the
- # :use_month_names key in +options+ to an array of 12 month names.
- #
- # Examples:
- #
- # select_month(Date.today) # Will use keys like "January", "March"
- # select_month(Date.today, :use_month_numbers => true) # Will use keys like "1", "3"
- # select_month(Date.today, :add_month_numbers => true) # Will use keys like "1 - January", "3 - March"
- # select_month(Date.today, :use_short_month => true) # Will use keys like "Jan", "Mar"
- # select_month(Date.today, :use_month_names => %w(Januar Februar Marts ...)) # Will use keys like "Januar", "Marts"
- #
- # Override the field name using the :field_name option, 'month' by default.
- def select_month(date, options = {})
- val = date ? (date.kind_of?(Fixnum) ? date : date.month) : ''
- if options[:use_hidden]
- hidden_html(options[:field_name] || 'month', val, options)
- else
- month_options = []
- month_names = options[:use_month_names] || (options[:use_short_month] ? Date::ABBR_MONTHNAMES : Date::MONTHNAMES)
- month_names.unshift(nil) if month_names.size < 13
- 1.upto(12) do |month_number|
- month_name = if options[:use_month_numbers]
- month_number
- elsif options[:add_month_numbers]
- month_number.to_s + ' - ' + month_names[month_number]
- else
- month_names[month_number]
- end
-
- month_options << ((val == month_number) ?
- %(#{month_name} \n) :
- %(#{month_name} \n)
- )
- end
- select_html(options[:field_name] || 'month', month_options, options)
- end
- end
-
- # Returns a select tag with options for each of the five years on each side of the current, which is selected. The five year radius
- # can be changed using the :start_year and :end_year keys in the +options+. Both ascending and descending year
- # lists are supported by making :start_year less than or greater than :end_year . The date can also be
- # substituted for a year given as a number. Example:
- #
- # select_year(Date.today, :start_year => 1992, :end_year => 2007) # ascending year values
- # select_year(Date.today, :start_year => 2005, :end_year => 1900) # descending year values
- # select_year(2006, :start_year => 2000, :end_year => 2010)
- #
- # Override the field name using the :field_name option, 'year' by default.
- def select_year(date, options = {})
- val = date ? (date.kind_of?(Fixnum) ? date : date.year) : ''
- if options[:use_hidden]
- hidden_html(options[:field_name] || 'year', val, options)
- else
- year_options = []
- y = date ? (date.kind_of?(Fixnum) ? (y = (date == 0) ? Date.today.year : date) : date.year) : Date.today.year
-
- start_year, end_year = (options[:start_year] || y-5), (options[:end_year] || y+5)
- step_val = start_year < end_year ? 1 : -1
- start_year.step(end_year, step_val) do |year|
- year_options << ((val == year) ?
- %(#{year} \n) :
- %(#{year} \n)
- )
- end
- select_html(options[:field_name] || 'year', year_options, options)
- end
- end
-
- private
-
- def select_html(type, html_options, options)
- name_and_id_from_options(options, type)
- select_html = %(\n)
- select_html << %( \n) if options[:include_blank]
- select_html << html_options.to_s
- select_html << " \n"
- end
-
- def hidden_html(type, value, options)
- name_and_id_from_options(options, type)
- hidden_html = %( \n)
- end
-
- def name_and_id_from_options(options, type)
- options[:name] = (options[:prefix] || DEFAULT_PREFIX) + (options[:discard_type] ? '' : "[#{type}]")
- options[:id] = options[:name].gsub(/([\[\(])|(\]\[)/, '_').gsub(/[\]\)]/, '')
- end
-
- def leading_zero_on_single_digits(number)
- number > 9 ? number : "0#{number}"
- end
- end
-
- class InstanceTag #:nodoc:
- include DateHelper
-
- def to_date_select_tag(options = {})
- date_or_time_select options.merge(:discard_hour => true)
- end
-
- def to_time_select_tag(options = {})
- date_or_time_select options.merge(:discard_year => true, :discard_month => true)
- end
-
- def to_datetime_select_tag(options = {})
- date_or_time_select options
- end
-
- private
- def date_or_time_select(options)
- defaults = { :discard_type => true }
- options = defaults.merge(options)
- datetime = value(object)
- datetime ||= Time.now unless options[:include_blank]
-
- position = { :year => 1, :month => 2, :day => 3, :hour => 4, :minute => 5, :second => 6 }
-
- order = (options[:order] ||= [:year, :month, :day])
-
- # Discard explicit and implicit by not being included in the :order
- discard = {}
- discard[:year] = true if options[:discard_year] or !order.include?(:year)
- discard[:month] = true if options[:discard_month] or !order.include?(:month)
- discard[:day] = true if options[:discard_day] or discard[:month] or !order.include?(:day)
- discard[:hour] = true if options[:discard_hour]
- discard[:minute] = true if options[:discard_minute] or discard[:hour]
- discard[:second] = true unless options[:include_seconds] && !discard[:minute]
-
- # Maintain valid dates by including hidden fields for discarded elements
- [:day, :month, :year].each { |o| order.unshift(o) unless order.include?(o) }
- # Ensure proper ordering of :hour, :minute and :second
- [:hour, :minute, :second].each { |o| order.delete(o); order.push(o) }
-
- date_or_time_select = ''
- order.reverse.each do |param|
- # Send hidden fields for discarded elements once output has started
- # This ensures AR can reconstruct valid dates using ParseDate
- next if discard[param] && date_or_time_select.empty?
-
- date_or_time_select.insert(0, self.send("select_#{param}", datetime, options_with_prefix(position[param], options.merge(:use_hidden => discard[param]))))
- date_or_time_select.insert(0,
- case param
- when :hour then (discard[:year] && discard[:day] ? "" : " — ")
- when :minute then " : "
- when :second then options[:include_seconds] ? " : " : ""
- else ""
- end)
-
- end
-
- date_or_time_select
- end
-
- def options_with_prefix(position, options)
- prefix = "#{@object_name}"
- if options[:index]
- prefix << "[#{options[:index]}]"
- elsif @auto_index
- prefix << "[#{@auto_index}]"
- end
- options.merge(:prefix => "#{prefix}[#{@method_name}(#{position}i)]")
- end
- end
-
- class FormBuilder
- def date_select(method, options = {})
- @template.date_select(@object_name, method, options.merge(:object => @object))
- end
-
- def time_select(method, options = {})
- @template.time_select(@object_name, method, options.merge(:object => @object))
- end
-
- def datetime_select(method, options = {})
- @template.datetime_select(@object_name, method, options.merge(:object => @object))
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
deleted file mode 100644
index 9e92813a..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-module ActionView
- module Helpers
- # Provides a set of methods for making it easier to locate problems.
- module DebugHelper
- # Returns a -tag set with the +object+ dumped by YAML. Very readable way to inspect an object.
- def debug(object)
- begin
- Marshal::dump(object)
- "#{h(object.to_yaml).gsub(" ", " ")} "
- rescue Exception => e # errors from Marshal or YAML
- # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
- "#{h(object.inspect)}"
- end
- end
- end
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb
deleted file mode 100644
index 04392f5b..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-module ActionView
- module Helpers
- module PrototypeHelper
-
- def update_element_function(element_id, options = {}, &block)
- content = escape_javascript(options[:content] || '')
- content = escape_javascript(capture(&block)) if block
-
- javascript_function = case (options[:action] || :update)
- when :update
- if options[:position]
- "new Insertion.#{options[:position].to_s.camelize}('#{element_id}','#{content}')"
- else
- "$('#{element_id}').innerHTML = '#{content}'"
- end
-
- when :empty
- "$('#{element_id}').innerHTML = ''"
-
- when :remove
- "Element.remove('#{element_id}')"
-
- else
- raise ArgumentError, "Invalid action, choose one of :update, :remove, :empty"
- end
-
- javascript_function << ";\n"
- options[:binding] ? concat(javascript_function, options[:binding]) : javascript_function
- end
- deprecate :update_element_function => "use RJS instead"
-
- end
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
deleted file mode 100644
index 8aa0b42f..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
+++ /dev/null
@@ -1,446 +0,0 @@
-require 'cgi'
-require File.dirname(__FILE__) + '/date_helper'
-require File.dirname(__FILE__) + '/tag_helper'
-
-module ActionView
- module Helpers
- # Provides a set of methods for working with forms and especially forms related to objects assigned to the template.
- # The following is an example of a complete form for a person object that works for both creates and updates built
- # with all the form helpers. The @person object was assigned by an action on the controller:
- #
- #
- # ...is compiled to:
- #
- #
- #
- # If the object name contains square brackets the id for the object will be inserted. Example:
- #
- # <%= text_field "person[]", "name" %>
- #
- # ...becomes:
- #
- #
- #
- # If the helper is being used to generate a repetitive sequence of similar form elements, for example in a partial
- # used by render_collection_of_partials, the "index" option may come in handy. Example:
- #
- # <%= text_field "person", "name", "index" => 1 %>
- #
- # becomes
- #
- #
- #
- # There's also methods for helping to build form tags in link:classes/ActionView/Helpers/FormOptionsHelper.html,
- # link:classes/ActionView/Helpers/DateHelper.html, and link:classes/ActionView/Helpers/ActiveRecordHelper.html
- module FormHelper
- # Creates a form and a scope around a specific model object, which is then used as a base for questioning about
- # values for the fields. Examples:
- #
- # <% form_for :person, @person, :url => { :action => "update" } do |f| %>
- # First name: <%= f.text_field :first_name %>
- # Last name : <%= f.text_field :last_name %>
- # Biography : <%= f.text_area :biography %>
- # Admin? : <%= f.check_box :admin %>
- # <% end %>
- #
- # Worth noting is that the form_for tag is called in a ERb evaluation block, not a ERb output block. So that's <% %> ,
- # not <%= %> . Also worth noting is that the form_for yields a form_builder object, in this example as f, which emulates
- # the API for the stand-alone FormHelper methods, but without the object name. So instead of text_field :person, :name ,
- # you get away with f.text_field :name .
- #
- # That in itself is a modest increase in comfort. The big news is that form_for allows us to more easily escape the instance
- # variable convention, so while the stand-alone approach would require text_field :person, :name, :object => person
- # to work with local variables instead of instance ones, the form_for calls remain the same. You simply declare once with
- # :person, person and all subsequent field calls save :person and :object => person .
- #
- # Also note that form_for doesn't create an exclusive scope. It's still possible to use both the stand-alone FormHelper methods
- # and methods from FormTagHelper. Example:
- #
- # <% form_for :person, @person, :url => { :action => "update" } do |f| %>
- # First name: <%= f.text_field :first_name %>
- # Last name : <%= f.text_field :last_name %>
- # Biography : <%= text_area :person, :biography %>
- # Admin? : <%= check_box_tag "person[admin]", @person.company.admin? %>
- # <% end %>
- #
- # Note: This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an object as base.
- # Like collection_select and datetime_select.
- #
- # Html attributes for the form tag can be given as :html => {...}. Example:
- #
- # <% form_for :person, @person, :html => {:id => 'person_form'} do |f| %>
- # ...
- # <% end %>
- #
- # You can also build forms using a customized FormBuilder class. Subclass FormBuilder and override or define some more helpers,
- # then use your custom builder like so:
- #
- # <% form_for :person, @person, :url => { :action => "update" }, :builder => LabellingFormBuilder do |f| %>
- # <%= f.text_field :first_name %>
- # <%= f.text_field :last_name %>
- # <%= text_area :person, :biography %>
- # <%= check_box_tag "person[admin]", @person.company.admin? %>
- # <% end %>
- #
- # In many cases you will want to wrap the above in another helper, such as:
- #
- # def labelled_form_for(name, object, options, &proc)
- # form_for(name, object, options.merge(:builder => LabellingFormBuiler), &proc)
- # end
- #
- def form_for(object_name, *args, &proc)
- raise ArgumentError, "Missing block" unless block_given?
- options = args.last.is_a?(Hash) ? args.pop : {}
- concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {}), proc.binding)
- fields_for(object_name, *(args << options), &proc)
- concat('', proc.binding)
- end
-
- # Creates a scope around a specific model object like form_for, but doesn't create the form tags themselves. This makes
- # fields_for suitable for specifying additional model objects in the same form. Example:
- #
- # <% form_for :person, @person, :url => { :action => "update" } do |person_form| %>
- # First name: <%= person_form.text_field :first_name %>
- # Last name : <%= person_form.text_field :last_name %>
- #
- # <% fields_for :permission, @person.permission do |permission_fields| %>
- # Admin? : <%= permission_fields.check_box :admin %>
- # <% end %>
- # <% end %>
- #
- # Note: This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an object as base.
- # Like collection_select and datetime_select.
- def fields_for(object_name, *args, &block)
- raise ArgumentError, "Missing block" unless block_given?
- options = args.last.is_a?(Hash) ? args.pop : {}
- object = args.first
-
- builder = options[:builder] || ActionView::Base.default_form_builder
- yield builder.new(object_name, object, self, options, block)
- end
-
- # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object
- # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a
- # hash with +options+.
- #
- # Examples (call, result):
- # text_field("post", "title", "size" => 20)
- #
- def text_field(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_input_field_tag("text", options)
- end
-
- # Works just like text_field, but returns an input tag of the "password" type instead.
- def password_field(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_input_field_tag("password", options)
- end
-
- # Works just like text_field, but returns an input tag of the "hidden" type instead.
- def hidden_field(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_input_field_tag("hidden", options)
- end
-
- # Works just like text_field, but returns an input tag of the "file" type instead, which won't have a default value.
- def file_field(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_input_field_tag("file", options)
- end
-
- # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+)
- # on an object assigned to the template (identified by +object+). Additional options on the input tag can be passed as a
- # hash with +options+.
- #
- # Example (call, result):
- # text_area("post", "body", "cols" => 20, "rows" => 40)
- #
- # #{@post.body}
- #
- def text_area(object_name, method, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_text_area_tag(options)
- end
-
- # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object
- # assigned to the template (identified by +object+). It's intended that +method+ returns an integer and if that
- # integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a
- # hash with +options+. The +checked_value+ defaults to 1 while the default +unchecked_value+
- # is set to 0 which is convenient for boolean values. Usually unchecked checkboxes don't post anything.
- # We work around this problem by adding a hidden value with the same name as the checkbox.
- #
- # Example (call, result). Imagine that @post.validated? returns 1:
- # check_box("post", "validated")
- #
- #
- #
- # Example (call, result). Imagine that @puppy.gooddog returns no:
- # check_box("puppy", "gooddog", {}, "yes", "no")
- #
- #
- def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_check_box_tag(options, checked_value, unchecked_value)
- end
-
- # Returns a radio button tag for accessing a specified attribute (identified by +method+) on an object
- # assigned to the template (identified by +object+). If the current value of +method+ is +tag_value+ the
- # radio button will be checked. Additional options on the input tag can be passed as a
- # hash with +options+.
- # Example (call, result). Imagine that @post.category returns "rails":
- # radio_button("post", "category", "rails")
- # radio_button("post", "category", "java")
- #
- #
- #
- def radio_button(object_name, method, tag_value, options = {})
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_radio_button_tag(tag_value, options)
- end
- end
-
- class InstanceTag #:nodoc:
- include Helpers::TagHelper
-
- attr_reader :method_name, :object_name
-
- DEFAULT_FIELD_OPTIONS = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS)
- DEFAULT_RADIO_OPTIONS = { }.freeze unless const_defined?(:DEFAULT_RADIO_OPTIONS)
- DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }.freeze unless const_defined?(:DEFAULT_TEXT_AREA_OPTIONS)
- DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS)
-
- def initialize(object_name, method_name, template_object, local_binding = nil, object = nil)
- @object_name, @method_name = object_name.to_s.dup, method_name.to_s.dup
- @template_object, @local_binding = template_object, local_binding
- @object = object
- if @object_name.sub!(/\[\]$/,"")
- if object ||= @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}") and object.respond_to?(:id_before_type_cast)
- @auto_index = object.id_before_type_cast
- else
- raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to id_before_type_cast: #{object.inspect}"
- end
- end
- end
-
- def to_input_field_tag(field_type, options = {})
- options = options.stringify_keys
- options["size"] ||= options["maxlength"] || DEFAULT_FIELD_OPTIONS["size"]
- options = DEFAULT_FIELD_OPTIONS.merge(options)
- if field_type == "hidden"
- options.delete("size")
- end
- options["type"] = field_type
- options["value"] ||= value_before_type_cast(object) unless field_type == "file"
- add_default_name_and_id(options)
- tag("input", options)
- end
-
- def to_radio_button_tag(tag_value, options = {})
- options = DEFAULT_RADIO_OPTIONS.merge(options.stringify_keys)
- options["type"] = "radio"
- options["value"] = tag_value
- if options.has_key?("checked")
- cv = options.delete "checked"
- checked = cv == true || cv == "checked"
- else
- checked = self.class.radio_button_checked?(value(object), tag_value)
- end
- options["checked"] = "checked" if checked
- pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/\W/, "").downcase
- options["id"] ||= defined?(@auto_index) ?
- "#{@object_name}_#{@auto_index}_#{@method_name}_#{pretty_tag_value}" :
- "#{@object_name}_#{@method_name}_#{pretty_tag_value}"
- add_default_name_and_id(options)
- tag("input", options)
- end
-
- def to_text_area_tag(options = {})
- options = DEFAULT_TEXT_AREA_OPTIONS.merge(options.stringify_keys)
- add_default_name_and_id(options)
-
- if size = options.delete("size")
- options["cols"], options["rows"] = size.split("x")
- end
-
- content_tag("textarea", html_escape(options.delete('value') || value_before_type_cast(object)), options)
- end
-
- def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")
- options = options.stringify_keys
- options["type"] = "checkbox"
- options["value"] = checked_value
- if options.has_key?("checked")
- cv = options.delete "checked"
- checked = cv == true || cv == "checked"
- else
- checked = self.class.check_box_checked?(value(object), checked_value)
- end
- options["checked"] = "checked" if checked
- add_default_name_and_id(options)
- tag("input", options) << tag("input", "name" => options["name"], "type" => "hidden", "value" => unchecked_value)
- end
-
- def to_date_tag()
- defaults = DEFAULT_DATE_OPTIONS.dup
- date = value(object) || Date.today
- options = Proc.new { |position| defaults.merge(:prefix => "#{@object_name}[#{@method_name}(#{position}i)]") }
- html_day_select(date, options.call(3)) +
- html_month_select(date, options.call(2)) +
- html_year_select(date, options.call(1))
- end
-
- def to_boolean_select_tag(options = {})
- options = options.stringify_keys
- add_default_name_and_id(options)
- value = value(object)
- tag_text = "False True "
- end
-
- def to_content_tag(tag_name, options = {})
- content_tag(tag_name, value(object), options)
- end
-
- def object
- @object || @template_object.instance_variable_get("@#{@object_name}")
- end
-
- def value(object)
- self.class.value(object, @method_name)
- end
-
- def value_before_type_cast(object)
- self.class.value_before_type_cast(object, @method_name)
- end
-
- class << self
- def value(object, method_name)
- object.send method_name unless object.nil?
- end
-
- def value_before_type_cast(object, method_name)
- unless object.nil?
- object.respond_to?(method_name + "_before_type_cast") ?
- object.send(method_name + "_before_type_cast") :
- object.send(method_name)
- end
- end
-
- def check_box_checked?(value, checked_value)
- case value
- when TrueClass, FalseClass
- value
- when NilClass
- false
- when Integer
- value != 0
- when String
- value == checked_value
- else
- value.to_i != 0
- end
- end
-
- def radio_button_checked?(value, checked_value)
- value.to_s == checked_value.to_s
- end
- end
-
- private
- def add_default_name_and_id(options)
- if options.has_key?("index")
- options["name"] ||= tag_name_with_index(options["index"])
- options["id"] ||= tag_id_with_index(options["index"])
- options.delete("index")
- elsif defined?(@auto_index)
- options["name"] ||= tag_name_with_index(@auto_index)
- options["id"] ||= tag_id_with_index(@auto_index)
- else
- options["name"] ||= tag_name
- options["id"] ||= tag_id
- end
- end
-
- def tag_name
- "#{@object_name}[#{@method_name}]"
- end
-
- def tag_name_with_index(index)
- "#{@object_name}[#{index}][#{@method_name}]"
- end
-
- def tag_id
- "#{@object_name}_#{@method_name}"
- end
-
- def tag_id_with_index(index)
- "#{@object_name}_#{index}_#{@method_name}"
- end
- end
-
- class FormBuilder #:nodoc:
- # The methods which wrap a form helper call.
- class_inheritable_accessor :field_helpers
- self.field_helpers = (FormHelper.instance_methods - ['form_for'])
-
- attr_accessor :object_name, :object, :options
-
- def initialize(object_name, object, template, options, proc)
- @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc
- end
-
- (field_helpers - %w(check_box radio_button)).each do |selector|
- src = <<-end_src
- def #{selector}(method, options = {})
- @template.send(#{selector.inspect}, @object_name, method, options.merge(:object => @object))
- end
- end_src
- class_eval src, __FILE__, __LINE__
- end
-
- def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
- @template.check_box(@object_name, method, options.merge(:object => @object), checked_value, unchecked_value)
- end
-
- def radio_button(method, tag_value, options = {})
- @template.radio_button(@object_name, method, tag_value, options.merge(:object => @object))
- end
- end
- end
-
- class Base
- cattr_accessor :default_form_builder
- self.default_form_builder = ::ActionView::Helpers::FormBuilder
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
deleted file mode 100644
index 6b3da64f..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ /dev/null
@@ -1,363 +0,0 @@
-require 'cgi'
-require 'erb'
-require File.dirname(__FILE__) + '/form_helper'
-
-module ActionView
- module Helpers
- # Provides a number of methods for turning different kinds of containers into a set of option tags.
- # == Options
- # The collection_select , country_select , select ,
- # and time_zone_select methods take an options parameter,
- # a hash.
- #
- # * :include_blank - set to true if the first option element of the select element is a blank. Useful if there is not a default value required for the select element. For example,
- #
- # select("post", "category", Post::CATEGORIES, {:include_blank => true})
- #
- # could become:
- #
- #
- #
- # joke
- # poem
- #
- #
- # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string.
- #
- # Another common case is a select tag for an belongs_to -associated object. For example,
- #
- # select("post", "person_id", Person.find(:all).collect {|p| [ p.name, p.id ] })
- #
- # could become:
- #
- #
- # David
- # Sam
- # Tobias
- #
- module FormOptionsHelper
- include ERB::Util
-
- # Create a select tag and a series of contained option tags for the provided object and method.
- # The option currently held by the object will be selected, provided that the object is available.
- # See options_for_select for the required format of the choices parameter.
- #
- # Example with @post.person_id => 1:
- # select("post", "person_id", Person.find(:all).collect {|p| [ p.name, p.id ] }, { :include_blank => true })
- #
- # could become:
- #
- #
- #
- # David
- # Sam
- # Tobias
- #
- #
- # This can be used to provide a default set of options in the standard way: before rendering the create form, a
- # new model instance is assigned the default options and bound to @model_name. Usually this model is not saved
- # to the database. Instead, a second model object is created when the create request is received.
- # This allows the user to submit a form page more than once with the expected results of creating multiple records.
- # In addition, this allows a single partial to be used to generate form inputs for both edit and create forms.
- #
- # By default, post.person_id is the selected option. Specify :selected => value to use a different selection
- # or :selected => nil to leave all options unselected.
- def select(object, method, choices, options = {}, html_options = {})
- InstanceTag.new(object, method, self, nil, options.delete(:object)).to_select_tag(choices, options, html_options)
- end
-
- # Return select and option tags for the given object and method using options_from_collection_for_select to generate the list of option tags.
- def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {})
- InstanceTag.new(object, method, self, nil, options.delete(:object)).to_collection_select_tag(collection, value_method, text_method, options, html_options)
- end
-
- # Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
- def country_select(object, method, priority_countries = nil, options = {}, html_options = {})
- InstanceTag.new(object, method, self, nil, options.delete(:object)).to_country_select_tag(priority_countries, options, html_options)
- end
-
- # Return select and option tags for the given object and method, using
- # #time_zone_options_for_select to generate the list of option tags.
- #
- # In addition to the :include_blank option documented above,
- # this method also supports a :model option, which defaults
- # to TimeZone. This may be used by users to specify a different time
- # zone model object. (See #time_zone_options_for_select for more
- # information.)
- def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
- InstanceTag.new(object, method, self, nil, options.delete(:object)).to_time_zone_select_tag(priority_zones, options, html_options)
- end
-
- # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container
- # where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and
- # the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values
- # become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag. +Selected+
- # may also be an array of values to be selected when using a multiple select.
- #
- # Examples (call, result):
- # options_for_select([["Dollar", "$"], ["Kroner", "DKK"]])
- # Dollar \nKroner
- #
- # options_for_select([ "VISA", "MasterCard" ], "MasterCard")
- # VISA \nMasterCard
- #
- # options_for_select({ "Basic" => "$20", "Plus" => "$40" }, "$40")
- # Basic \nPlus
- #
- # options_for_select([ "VISA", "MasterCard", "Discover" ], ["VISA", "Discover"])
- # VISA \nMasterCard \nDiscover
- #
- # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
- def options_for_select(container, selected = nil)
- container = container.to_a if Hash === container
-
- options_for_select = container.inject([]) do |options, element|
- if !element.is_a?(String) and element.respond_to?(:first) and element.respond_to?(:last)
- is_selected = ( (selected.respond_to?(:include?) && !selected.is_a?(String) ? selected.include?(element.last) : element.last == selected) )
- if is_selected
- options << "#{html_escape(element.first.to_s)} "
- else
- options << "#{html_escape(element.first.to_s)} "
- end
- else
- is_selected = ( (selected.respond_to?(:include?) && !selected.is_a?(String) ? selected.include?(element) : element == selected) )
- options << ((is_selected) ? "#{html_escape(element.to_s)} " : "#{html_escape(element.to_s)} ")
- end
- end
-
- options_for_select.join("\n")
- end
-
- # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning the
- # the result of a call to the +value_method+ as the option value and the +text_method+ as the option text.
- # If +selected_value+ is specified, the element returning a match on +value_method+ will get the selected option tag.
- #
- # Example (call, result). Imagine a loop iterating over each +person+ in @project.people to generate an input tag:
- # options_from_collection_for_select(@project.people, "id", "name")
- # #{person.name}
- #
- # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
- def options_from_collection_for_select(collection, value_method, text_method, selected_value = nil)
- options_for_select(
- collection.inject([]) { |options, object| options << [ object.send(text_method), object.send(value_method) ] },
- selected_value
- )
- end
-
- # Returns a string of option tags, like options_from_collection_for_select, but surrounds them with tags.
- #
- # An array of group objects are passed. Each group should return an array of options when calling group_method
- # Each group should return its name when calling group_label_method.
- #
- # html_option_groups_from_collection(@continents, "countries", "continent_name", "country_id", "country_name", @selected_country.id)
- #
- # Could become:
- #
- # Egypt
- # Rwanda
- # ...
- #
- #
- # China
- # India
- # Japan
- # ...
- #
- #
- # with objects of the following classes:
- # class Continent
- # def initialize(p_name, p_countries) @continent_name = p_name; @countries = p_countries; end
- # def continent_name() @continent_name; end
- # def countries() @countries; end
- # end
- # class Country
- # def initialize(id, name) @id = id; @name = name end
- # def country_id() @id; end
- # def country_name() @name; end
- # end
- #
- # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
- def option_groups_from_collection_for_select(collection, group_method, group_label_method,
- option_key_method, option_value_method, selected_key = nil)
- collection.inject("") do |options_for_select, group|
- group_label_string = eval("group.#{group_label_method}")
- options_for_select += ""
- options_for_select += options_from_collection_for_select(eval("group.#{group_method}"), option_key_method, option_value_method, selected_key)
- options_for_select += ' '
- end
- end
-
- # Returns a string of option tags for pretty much any country in the world. Supply a country name as +selected+ to
- # have it marked as the selected option tag. You can also supply an array of countries as +priority_countries+, so
- # that they will be listed above the rest of the (long) list.
- #
- # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
- def country_options_for_select(selected = nil, priority_countries = nil)
- country_options = ""
-
- if priority_countries
- country_options += options_for_select(priority_countries, selected)
- country_options += "------------- \n"
- end
-
- if priority_countries && priority_countries.include?(selected)
- country_options += options_for_select(COUNTRIES - priority_countries, selected)
- else
- country_options += options_for_select(COUNTRIES, selected)
- end
-
- return country_options
- end
-
- # Returns a string of option tags for pretty much any time zone in the
- # world. Supply a TimeZone name as +selected+ to have it marked as the
- # selected option tag. You can also supply an array of TimeZone objects
- # as +priority_zones+, so that they will be listed above the rest of the
- # (long) list. (You can use TimeZone.us_zones as a convenience for
- # obtaining a list of the US time zones.)
- #
- # The +selected+ parameter must be either +nil+, or a string that names
- # a TimeZone.
- #
- # By default, +model+ is the TimeZone constant (which can be obtained
- # in ActiveRecord as a value object). The only requirement is that the
- # +model+ parameter be an object that responds to #all, and returns
- # an array of objects that represent time zones.
- #
- # NOTE: Only the option tags are returned, you have to wrap this call in
- # a regular HTML select tag.
- def time_zone_options_for_select(selected = nil, priority_zones = nil, model = TimeZone)
- zone_options = ""
-
- zones = model.all
- convert_zones = lambda { |list| list.map { |z| [ z.to_s, z.name ] } }
-
- if priority_zones
- zone_options += options_for_select(convert_zones[priority_zones], selected)
- zone_options += "------------- \n"
-
- zones = zones.reject { |z| priority_zones.include?( z ) }
- end
-
- zone_options += options_for_select(convert_zones[zones], selected)
- zone_options
- end
-
- private
- # All the countries included in the country_options output.
- COUNTRIES = [ "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla",
- "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia",
- "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus",
- "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina",
- "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory",
- "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cambodia",
- "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic",
- "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia",
- "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands",
- "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark",
- "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt",
- "El Salvador", "England", "Equatorial Guinea", "Eritrea", "Espana", "Estonia",
- "Ethiopia", "Falkland Islands", "Faroe Islands", "Fiji", "Finland", "France",
- "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia",
- "Georgia", "Germany", "Ghana", "Gibraltar", "Great Britain", "Greece", "Greenland",
- "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana",
- "Haiti", "Heard and Mc Donald Islands", "Honduras", "Hong Kong", "Hungary", "Iceland",
- "India", "Indonesia", "Ireland", "Israel", "Italy", "Iran", "Iraq", "Jamaica", "Japan", "Jordan",
- "Kazakhstan", "Kenya", "Kiribati", "Korea, Republic of", "Korea (South)", "Kuwait",
- "Kyrgyzstan", "Lao People's Democratic Republic", "Latvia", "Lebanon", "Lesotho",
- "Liberia", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia",
- "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands",
- "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico",
- "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia",
- "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal",
- "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua",
- "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Ireland",
- "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama",
- "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland",
- "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russia", "Rwanda",
- "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines",
- "Samoa (Independent)", "San Marino", "Sao Tome and Principe", "Saudi Arabia",
- "Scotland", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore",
- "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa",
- "South Georgia and the South Sandwich Islands", "South Korea", "Spain", "Sri Lanka",
- "St. Helena", "St. Pierre and Miquelon", "Suriname", "Svalbard and Jan Mayen Islands",
- "Swaziland", "Sweden", "Switzerland", "Taiwan", "Tajikistan", "Tanzania", "Thailand",
- "Togo", "Tokelau", "Tonga", "Trinidad", "Trinidad and Tobago", "Tunisia", "Turkey",
- "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine",
- "United Arab Emirates", "United Kingdom", "United States",
- "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu",
- "Vatican City State (Holy See)", "Venezuela", "Viet Nam", "Virgin Islands (British)",
- "Virgin Islands (U.S.)", "Wales", "Wallis and Futuna Islands", "Western Sahara",
- "Yemen", "Zambia", "Zimbabwe" ] unless const_defined?("COUNTRIES")
- end
-
- class InstanceTag #:nodoc:
- include FormOptionsHelper
-
- def to_select_tag(choices, options, html_options)
- html_options = html_options.stringify_keys
- add_default_name_and_id(html_options)
- value = value(object)
- selected_value = options.has_key?(:selected) ? options[:selected] : value
- content_tag("select", add_options(options_for_select(choices, selected_value), options, selected_value), html_options)
- end
-
- def to_collection_select_tag(collection, value_method, text_method, options, html_options)
- html_options = html_options.stringify_keys
- add_default_name_and_id(html_options)
- value = value(object)
- content_tag(
- "select", add_options(options_from_collection_for_select(collection, value_method, text_method, value), options, value), html_options
- )
- end
-
- def to_country_select_tag(priority_countries, options, html_options)
- html_options = html_options.stringify_keys
- add_default_name_and_id(html_options)
- value = value(object)
- content_tag("select", add_options(country_options_for_select(value, priority_countries), options, value), html_options)
- end
-
- def to_time_zone_select_tag(priority_zones, options, html_options)
- html_options = html_options.stringify_keys
- add_default_name_and_id(html_options)
- value = value(object)
- content_tag("select",
- add_options(
- time_zone_options_for_select(value, priority_zones, options[:model] || TimeZone),
- options, value
- ), html_options
- )
- end
-
- private
- def add_options(option_tags, options, value = nil)
- option_tags = " \n" + option_tags if options[:include_blank]
-
- if value.blank? && options[:prompt]
- ("#{options[:prompt].kind_of?(String) ? options[:prompt] : 'Please select'} \n") + option_tags
- else
- option_tags
- end
- end
- end
-
- class FormBuilder
- def select(method, choices, options = {}, html_options = {})
- @template.select(@object_name, method, choices, options.merge(:object => @object), html_options)
- end
-
- def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
- @template.collection_select(@object_name, method, collection, value_method, text_method, options.merge(:object => @object), html_options)
- end
-
- def country_select(method, priority_countries = nil, options = {}, html_options = {})
- @template.country_select(@object_name, method, priority_countries, options.merge(:object => @object), html_options)
- end
-
- def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
- @template.time_zone_select(@object_name, method, priority_zones, options.merge(:object => @object), html_options)
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb
deleted file mode 100644
index e2e796e7..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-require 'cgi'
-require File.dirname(__FILE__) + '/tag_helper'
-
-module ActionView
- module Helpers
- # Provides a number of methods for creating form tags that doesn't rely on conventions with an object assigned to the template like
- # FormHelper does. With the FormTagHelper, you provide the names and values yourself.
- #
- # NOTE: The html options disabled, readonly, and multiple can all be treated as booleans. So specifying :disabled => true
- # will give disabled="disabled" .
- module FormTagHelper
- # Starts a form tag that points the action to an url configured with url_for_options just like
- # ActionController::Base#url_for. The method for the form defaults to POST.
- #
- # Examples:
- # * form_tag('/posts') =>
- # * form_tag('/posts/1', :method => :put) =>
- # * form_tag('/upload', :multipart => true) =>
- #
- # ERb example:
- # <% form_tag '/posts' do -%>
- # <%= submit_tag 'Save' %>
- # <% end -%>
- #
- # Will output:
- #
- #
- # Options:
- # * :multipart - If set to true, the enctype is set to "multipart/form-data".
- # * :method - The method to use when submitting the form, usually either "get" or "post".
- # If "put", "delete", or another verb is used, a hidden input with name _method
- # is added to simulate the verb over post.
- def form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block)
- html_options = options.stringify_keys
- html_options["enctype"] = "multipart/form-data" if html_options.delete("multipart")
- html_options["action"] = url_for(url_for_options, *parameters_for_url)
-
- method_tag = ""
-
- case method = html_options.delete("method").to_s
- when /^get$/i # must be case-insentive, but can't use downcase as might be nil
- html_options["method"] = "get"
- when /^post$/i, "", nil
- html_options["method"] = "post"
- else
- html_options["method"] = "post"
- method_tag = content_tag(:div, tag(:input, :type => "hidden", :name => "_method", :value => method), :style => 'margin:0;padding:0')
- end
-
- if block_given?
- content = capture(&block)
- concat(tag(:form, html_options, true) + method_tag, block.binding)
- concat(content, block.binding)
- concat("", block.binding)
- else
- tag(:form, html_options, true) + method_tag
- end
- end
-
- alias_method :start_form_tag, :form_tag
-
- # Outputs ""
- def end_form_tag
- ""
- end
-
- deprecate :end_form_tag, :start_form_tag => :form_tag
-
- # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple
- # choice selection box.
- #
- # Helpers::FormOptions can be used to create common select boxes such as countries, time zones, or
- # associated records.
- #
- # option_tags is a string containing the option tags for the select box:
- # # Outputs David
- # select_tag "people", "David "
- #
- # Options:
- # * :multiple - If set to true the selection will allow multiple choices.
- def select_tag(name, option_tags = nil, options = {})
- content_tag :select, option_tags, { "name" => name, "id" => name }.update(options.stringify_keys)
- end
-
- # Creates a standard text field.
- #
- # Options:
- # * :disabled - If set to true, the user will not be able to use this input.
- # * :size - The number of visible characters that will fit in the input.
- # * :maxlength - The maximum number of characters that the browser will allow the user to enter.
- #
- # A hash of standard HTML options for the tag.
- def text_field_tag(name, value = nil, options = {})
- tag :input, { "type" => "text", "name" => name, "id" => name, "value" => value }.update(options.stringify_keys)
- end
-
- # Creates a hidden field.
- #
- # Takes the same options as text_field_tag
- def hidden_field_tag(name, value = nil, options = {})
- text_field_tag(name, value, options.stringify_keys.update("type" => "hidden"))
- end
-
- # Creates a file upload field.
- #
- # If you are using file uploads then you will also need to set the multipart option for the form:
- # <%= form_tag { :action => "post" }, { :multipart => true } %>
- # File to Upload <%= file_field_tag "file" %>
- # <%= submit_tag %>
- # <%= end_form_tag %>
- #
- # The specified URL will then be passed a File object containing the selected file, or if the field
- # was left blank, a StringIO object.
- def file_field_tag(name, options = {})
- text_field_tag(name, nil, options.update("type" => "file"))
- end
-
- # Creates a password field.
- #
- # Takes the same options as text_field_tag
- def password_field_tag(name = "password", value = nil, options = {})
- text_field_tag(name, value, options.update("type" => "password"))
- end
-
- # Creates a text input area.
- #
- # Options:
- # * :size - A string specifying the dimensions of the textarea.
- # # Outputs
- # <%= text_area_tag "body", nil, :size => "25x10" %>
- def text_area_tag(name, content = nil, options = {})
- options.stringify_keys!
-
- if size = options.delete("size")
- options["cols"], options["rows"] = size.split("x")
- end
-
- content_tag :textarea, content, { "name" => name, "id" => name }.update(options.stringify_keys)
- end
-
- # Creates a check box.
- def check_box_tag(name, value = "1", checked = false, options = {})
- html_options = { "type" => "checkbox", "name" => name, "id" => name, "value" => value }.update(options.stringify_keys)
- html_options["checked"] = "checked" if checked
- tag :input, html_options
- end
-
- # Creates a radio button.
- def radio_button_tag(name, value, checked = false, options = {})
- pretty_tag_value = value.to_s.gsub(/\s/, "_").gsub(/(?!-)\W/, "").downcase
- html_options = { "type" => "radio", "name" => name, "id" => "#{name}_#{pretty_tag_value}", "value" => value }.update(options.stringify_keys)
- html_options["checked"] = "checked" if checked
- tag :input, html_options
- end
-
- # Creates a submit button with the text value as the caption. If options contains a pair with the key of "disable_with",
- # then the value will be used to rename a disabled version of the submit button.
- def submit_tag(value = "Save changes", options = {})
- options.stringify_keys!
-
- if disable_with = options.delete("disable_with")
- options["onclick"] = "this.disabled=true;this.value='#{disable_with}';this.form.submit();#{options["onclick"]}"
- end
-
- tag :input, { "type" => "submit", "name" => "commit", "value" => value }.update(options.stringify_keys)
- end
-
- # Displays an image which when clicked will submit the form.
- #
- # source is passed to AssetTagHelper#image_path
- def image_submit_tag(source, options = {})
- tag :input, { "type" => "image", "src" => image_path(source) }.update(options.stringify_keys)
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
deleted file mode 100644
index d4a14565..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
+++ /dev/null
@@ -1,233 +0,0 @@
-require File.dirname(__FILE__) + '/tag_helper'
-
-module ActionView
- module Helpers
- # Provides a set of helpers for creating JavaScript macros that rely on and often bundle methods from JavaScriptHelper into
- # larger units. These macros also rely on counterparts in the controller that provide them with their backing. The in-place
- # editing relies on ActionController::Base.in_place_edit_for and the autocompletion relies on
- # ActionController::Base.auto_complete_for.
- module JavaScriptMacrosHelper
- # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
- #
- # Makes an HTML element specified by the DOM ID +field_id+ become an in-place
- # editor of a property.
- #
- # A form is automatically created and displayed when the user clicks the element,
- # something like this:
- #
- #
- #
- # cancel
- #
- #
- # The form is serialized and sent to the server using an AJAX call, the action on
- # the server should process the value and return the updated value in the body of
- # the reponse. The element will automatically be updated with the changed value
- # (as returned from the server).
- #
- # Required +options+ are:
- # :url :: Specifies the url where the updated value should
- # be sent after the user presses "ok".
- #
- # Addtional +options+ are:
- # :rows :: Number of rows (more than 1 will use a TEXTAREA)
- # :cols :: Number of characters the text input should span (works for both INPUT and TEXTAREA)
- # :size :: Synonym for :cols when using a single line text input.
- # :cancel_text :: The text on the cancel link. (default: "cancel")
- # :save_text :: The text on the save link. (default: "ok")
- # :loading_text :: The text to display while the data is being loaded from the server (default: "Loading...")
- # :saving_text :: The text to display when submitting to the server (default: "Saving...")
- # :external_control :: The id of an external control used to enter edit mode.
- # :load_text_url :: URL where initial value of editor (content) is retrieved.
- # :options :: Pass through options to the AJAX call (see prototype's Ajax.Updater)
- # :with :: JavaScript snippet that should return what is to be sent
- # in the AJAX call, +form+ is an implicit parameter
- # :script :: Instructs the in-place editor to evaluate the remote JavaScript response (default: false)
- # :click_to_edit_text ::The text shown during mouseover the editable text (default: "Click to edit")
- def in_place_editor(field_id, options = {})
- function = "new Ajax.InPlaceEditor("
- function << "'#{field_id}', "
- function << "'#{url_for(options[:url])}'"
-
- js_options = {}
- js_options['cancelText'] = %('#{options[:cancel_text]}') if options[:cancel_text]
- js_options['okText'] = %('#{options[:save_text]}') if options[:save_text]
- js_options['loadingText'] = %('#{options[:loading_text]}') if options[:loading_text]
- js_options['savingText'] = %('#{options[:saving_text]}') if options[:saving_text]
- js_options['rows'] = options[:rows] if options[:rows]
- js_options['cols'] = options[:cols] if options[:cols]
- js_options['size'] = options[:size] if options[:size]
- js_options['externalControl'] = "'#{options[:external_control]}'" if options[:external_control]
- js_options['loadTextURL'] = "'#{url_for(options[:load_text_url])}'" if options[:load_text_url]
- js_options['ajaxOptions'] = options[:options] if options[:options]
- js_options['evalScripts'] = options[:script] if options[:script]
- js_options['callback'] = "function(form) { return #{options[:with]} }" if options[:with]
- js_options['clickToEditText'] = %('#{options[:click_to_edit_text]}') if options[:click_to_edit_text]
- function << (', ' + options_for_javascript(js_options)) unless js_options.empty?
-
- function << ')'
-
- javascript_tag(function)
- end
-
- # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
- #
- # Renders the value of the specified object and method with in-place editing capabilities.
- #
- # See the RDoc on ActionController::InPlaceEditing to learn more about this.
- def in_place_editor_field(object, method, tag_options = {}, in_place_editor_options = {})
- tag = ::ActionView::Helpers::InstanceTag.new(object, method, self)
- tag_options = {:tag => "span", :id => "#{object}_#{method}_#{tag.object.id}_in_place_editor", :class => "in_place_editor_field"}.merge!(tag_options)
- in_place_editor_options[:url] = in_place_editor_options[:url] || url_for({ :action => "set_#{object}_#{method}", :id => tag.object.id })
- tag.to_content_tag(tag_options.delete(:tag), tag_options) +
- in_place_editor(tag_options[:id], in_place_editor_options)
- end
-
- # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
- #
- # Adds AJAX autocomplete functionality to the text input field with the
- # DOM ID specified by +field_id+.
- #
- # This function expects that the called action returns an HTML list,
- # or nothing if no entries should be displayed for autocompletion.
- #
- # You'll probably want to turn the browser's built-in autocompletion off,
- # so be sure to include an autocomplete="off" attribute with your text
- # input field.
- #
- # The autocompleter object is assigned to a Javascript variable named field_id _auto_completer.
- # This object is useful if you for example want to trigger the auto-complete suggestions through
- # other means than user input (for that specific case, call the activate method on that object).
- #
- # Required +options+ are:
- # :url :: URL to call for autocompletion results
- # in url_for format.
- #
- # Addtional +options+ are:
- # :update :: Specifies the DOM ID of the element whose
- # innerHTML should be updated with the autocomplete
- # entries returned by the AJAX request.
- # Defaults to field_id + '_auto_complete'
- # :with :: A JavaScript expression specifying the
- # parameters for the XMLHttpRequest. This defaults
- # to 'fieldname=value'.
- # :frequency :: Determines the time to wait after the last keystroke
- # for the AJAX request to be initiated.
- # :indicator :: Specifies the DOM ID of an element which will be
- # displayed while autocomplete is running.
- # :tokens :: A string or an array of strings containing
- # separator tokens for tokenized incremental
- # autocompletion. Example: :tokens => ',' would
- # allow multiple autocompletion entries, separated
- # by commas.
- # :min_chars :: The minimum number of characters that should be
- # in the input field before an Ajax call is made
- # to the server.
- # :on_hide :: A Javascript expression that is called when the
- # autocompletion div is hidden. The expression
- # should take two variables: element and update.
- # Element is a DOM element for the field, update
- # is a DOM element for the div from which the
- # innerHTML is replaced.
- # :on_show :: Like on_hide, only now the expression is called
- # then the div is shown.
- # :after_update_element :: A Javascript expression that is called when the
- # user has selected one of the proposed values.
- # The expression should take two variables: element and value.
- # Element is a DOM element for the field, value
- # is the value selected by the user.
- # :select :: Pick the class of the element from which the value for
- # insertion should be extracted. If this is not specified,
- # the entire element is used.
- def auto_complete_field(field_id, options = {})
- function = "var #{field_id}_auto_completer = new Ajax.Autocompleter("
- function << "'#{field_id}', "
- function << "'" + (options[:update] || "#{field_id}_auto_complete") + "', "
- function << "'#{url_for(options[:url])}'"
-
- js_options = {}
- js_options[:tokens] = array_or_string_for_javascript(options[:tokens]) if options[:tokens]
- js_options[:callback] = "function(element, value) { return #{options[:with]} }" if options[:with]
- js_options[:indicator] = "'#{options[:indicator]}'" if options[:indicator]
- js_options[:select] = "'#{options[:select]}'" if options[:select]
- js_options[:paramName] = "'#{options[:param_name]}'" if options[:param_name]
- js_options[:frequency] = "#{options[:frequency]}" if options[:frequency]
-
- { :after_update_element => :afterUpdateElement,
- :on_show => :onShow, :on_hide => :onHide, :min_chars => :minChars }.each do |k,v|
- js_options[v] = options[k] if options[k]
- end
-
- function << (', ' + options_for_javascript(js_options) + ')')
-
- javascript_tag(function)
- end
-
- # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
- #
- # Use this method in your view to generate a return for the AJAX autocomplete requests.
- #
- # Example action:
- #
- # def auto_complete_for_item_title
- # @items = Item.find(:all,
- # :conditions => [ 'LOWER(description) LIKE ?',
- # '%' + request.raw_post.downcase + '%' ])
- # render :inline => "<%= auto_complete_result(@items, 'description') %>"
- # end
- #
- # The auto_complete_result can of course also be called from a view belonging to the
- # auto_complete action if you need to decorate it further.
- def auto_complete_result(entries, field, phrase = nil)
- return unless entries
- items = entries.map { |entry| content_tag("li", phrase ? highlight(entry[field], phrase) : h(entry[field])) }
- content_tag("ul", items.uniq)
- end
-
- # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
- #
- # Wrapper for text_field with added AJAX autocompletion functionality.
- #
- # In your controller, you'll need to define an action called
- # auto_complete_for_object_method to respond the AJAX calls,
- #
- # See the RDoc on ActionController::AutoComplete to learn more about this.
- def text_field_with_auto_complete(object, method, tag_options = {}, completion_options = {})
- (completion_options[:skip_style] ? "" : auto_complete_stylesheet) +
- text_field(object, method, tag_options) +
- content_tag("div", "", :id => "#{object}_#{method}_auto_complete", :class => "auto_complete") +
- auto_complete_field("#{object}_#{method}", { :url => { :action => "auto_complete_for_#{object}_#{method}" } }.update(completion_options))
- end
-
- private
- def auto_complete_stylesheet
- content_tag('style', <<-EOT, :type => 'text/css')
- div.auto_complete {
- width: 350px;
- background: #fff;
- }
- div.auto_complete ul {
- border:1px solid #888;
- margin:0;
- padding:0;
- width:100%;
- list-style-type:none;
- }
- div.auto_complete ul li {
- margin:0;
- padding:3px;
- }
- div.auto_complete ul li.selected {
- background-color: #ffb;
- }
- div.auto_complete ul strong.highlight {
- color: #800;
- margin:0;
- padding:0;
- }
- EOT
- end
-
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
deleted file mode 100644
index 7bce6b91..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ /dev/null
@@ -1,193 +0,0 @@
-require File.dirname(__FILE__) + '/tag_helper'
-require File.dirname(__FILE__) + '/prototype_helper'
-
-module ActionView
- module Helpers
- # Provides functionality for working with JavaScript in your views.
- #
- # == Ajax, controls and visual effects
- #
- # * For information on using Ajax, see
- # ActionView::Helpers::PrototypeHelper.
- # * For information on using controls and visual effects, see
- # ActionView::Helpers::ScriptaculousHelper.
- #
- # == Including the JavaScript libraries into your pages
- #
- # Rails includes the Prototype JavaScript framework and the Scriptaculous
- # JavaScript controls and visual effects library. If you wish to use
- # these libraries and their helpers (ActionView::Helpers::PrototypeHelper
- # and ActionView::Helpers::ScriptaculousHelper), you must do one of the
- # following:
- #
- # * Use <%= javascript_include_tag :defaults %> in the HEAD
- # section of your page (recommended): This function will return
- # references to the JavaScript files created by the +rails+ command in
- # your public/javascripts directory. Using it is recommended as
- # the browser can then cache the libraries instead of fetching all the
- # functions anew on every request.
- # * Use <%= javascript_include_tag 'prototype' %> : As above, but
- # will only include the Prototype core library, which means you are able
- # to use all basic AJAX functionality. For the Scriptaculous-based
- # JavaScript helpers, like visual effects, autocompletion, drag and drop
- # and so on, you should use the method described above.
- # * Use <%= define_javascript_functions %> : this will copy all the
- # JavaScript support functions within a single script block. Not
- # recommended.
- #
- # For documentation on +javascript_include_tag+ see
- # ActionView::Helpers::AssetTagHelper.
- module JavaScriptHelper
- unless const_defined? :JAVASCRIPT_PATH
- JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts')
- end
-
- include PrototypeHelper
-
- # Returns a link that will trigger a JavaScript +function+ using the
- # onclick handler and return false after the fact.
- #
- # The +function+ argument can be omitted in favor of an +update_page+
- # block, which evaluates to a string when the template is rendered
- # (instead of making an Ajax request first).
- #
- # Examples:
- # link_to_function "Greeting", "alert('Hello world!')"
- # Produces:
- # Greeting
- #
- # link_to_function(image_tag("delete"), "if (confirm('Really?')) do_delete()")
- # Produces:
- #
- #
- #
- #
- # link_to_function("Show me more", nil, :id => "more_link") do |page|
- # page[:details].visual_effect :toggle_blind
- # page[:more_link].replace_html "Show me less"
- # end
- # Produces:
- # Show me more
- #
- def link_to_function(name, *args, &block)
- html_options = args.last.is_a?(Hash) ? args.pop : {}
- function = args[0] || ''
-
- html_options.symbolize_keys!
- function = update_page(&block) if block_given?
- content_tag(
- "a", name,
- html_options.merge({
- :href => html_options[:href] || "#",
- :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function}; return false;"
- })
- )
- end
-
- # Returns a button that'll trigger a JavaScript +function+ using the
- # onclick handler.
- #
- # The +function+ argument can be omitted in favor of an +update_page+
- # block, which evaluates to a string when the template is rendered
- # (instead of making an Ajax request first).
- #
- # Examples:
- # button_to_function "Greeting", "alert('Hello world!')"
- # button_to_function "Delete", "if (confirm('Really?')) do_delete()"
- # button_to_function "Details" do |page|
- # page[:details].visual_effect :toggle_slide
- # end
- # button_to_function "Details", :class => "details_button" do |page|
- # page[:details].visual_effect :toggle_slide
- # end
- def button_to_function(name, *args, &block)
- html_options = args.last.is_a?(Hash) ? args.pop : {}
- function = args[0] || ''
-
- html_options.symbolize_keys!
- function = update_page(&block) if block_given?
- tag(:input, html_options.merge({
- :type => "button", :value => name,
- :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};"
- }))
- end
-
- # Includes the Action Pack JavaScript libraries inside a single '
- end
-
- # Escape carrier returns and single and double quotes for JavaScript segments.
- def escape_javascript(javascript)
- (javascript || '').gsub('\\','\0\0').gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }
- end
-
- # Returns a JavaScript tag with the +content+ inside. Example:
- # javascript_tag "alert('All is good')"
- #
- # Returns:
- #
- #
- #
- # +html_options+ may be a hash of attributes for the
- def javascript_tag(content, html_options = {})
- content_tag("script", javascript_cdata_section(content), html_options.merge(:type => "text/javascript"))
- end
-
- def javascript_cdata_section(content) #:nodoc:
- "\n//#{cdata_section("\n#{content}\n//")}\n"
- end
-
- protected
- def options_for_javascript(options)
- '{' + options.map {|k, v| "#{k}:#{v}"}.sort.join(', ') + '}'
- end
-
- def array_or_string_for_javascript(option)
- js_option = if option.kind_of?(Array)
- "['#{option.join('\',\'')}']"
- elsif !option.nil?
- "'#{option}'"
- end
- js_option
- end
- end
-
- JavascriptHelper = JavaScriptHelper unless const_defined? :JavascriptHelper
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js b/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js
deleted file mode 100644
index 8c273f87..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js
+++ /dev/null
@@ -1,833 +0,0 @@
-// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
-// (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com)
-// Contributors:
-// Richard Livsey
-// Rahul Bhargava
-// Rob Wills
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-// Autocompleter.Base handles all the autocompletion functionality
-// that's independent of the data source for autocompletion. This
-// includes drawing the autocompletion menu, observing keyboard
-// and mouse events, and similar.
-//
-// Specific autocompleters need to provide, at the very least,
-// a getUpdatedChoices function that will be invoked every time
-// the text inside the monitored textbox changes. This method
-// should get the text for which to provide autocompletion by
-// invoking this.getToken(), NOT by directly accessing
-// this.element.value. This is to allow incremental tokenized
-// autocompletion. Specific auto-completion logic (AJAX, etc)
-// belongs in getUpdatedChoices.
-//
-// Tokenized incremental autocompletion is enabled automatically
-// when an autocompleter is instantiated with the 'tokens' option
-// in the options parameter, e.g.:
-// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
-// will incrementally autocomplete with a comma as the token.
-// Additionally, ',' in the above example can be replaced with
-// a token array, e.g. { tokens: [',', '\n'] } which
-// enables autocompletion on multiple tokens. This is most
-// useful when one of the tokens is \n (a newline), as it
-// allows smart autocompletion after linebreaks.
-
-if(typeof Effect == 'undefined')
- throw("controls.js requires including script.aculo.us' effects.js library");
-
-var Autocompleter = {}
-Autocompleter.Base = function() {};
-Autocompleter.Base.prototype = {
- baseInitialize: function(element, update, options) {
- this.element = $(element);
- this.update = $(update);
- this.hasFocus = false;
- this.changed = false;
- this.active = false;
- this.index = 0;
- this.entryCount = 0;
-
- if(this.setOptions)
- this.setOptions(options);
- else
- this.options = options || {};
-
- this.options.paramName = this.options.paramName || this.element.name;
- this.options.tokens = this.options.tokens || [];
- this.options.frequency = this.options.frequency || 0.4;
- this.options.minChars = this.options.minChars || 1;
- this.options.onShow = this.options.onShow ||
- function(element, update){
- if(!update.style.position || update.style.position=='absolute') {
- update.style.position = 'absolute';
- Position.clone(element, update, {
- setHeight: false,
- offsetTop: element.offsetHeight
- });
- }
- Effect.Appear(update,{duration:0.15});
- };
- this.options.onHide = this.options.onHide ||
- function(element, update){ new Effect.Fade(update,{duration:0.15}) };
-
- if(typeof(this.options.tokens) == 'string')
- this.options.tokens = new Array(this.options.tokens);
-
- this.observer = null;
-
- this.element.setAttribute('autocomplete','off');
-
- Element.hide(this.update);
-
- Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
- Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
- },
-
- show: function() {
- if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
- if(!this.iefix &&
- (navigator.appVersion.indexOf('MSIE')>0) &&
- (navigator.userAgent.indexOf('Opera')<0) &&
- (Element.getStyle(this.update, 'position')=='absolute')) {
- new Insertion.After(this.update,
- '');
- this.iefix = $(this.update.id+'_iefix');
- }
- if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
- },
-
- fixIEOverlapping: function() {
- Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
- this.iefix.style.zIndex = 1;
- this.update.style.zIndex = 2;
- Element.show(this.iefix);
- },
-
- hide: function() {
- this.stopIndicator();
- if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
- if(this.iefix) Element.hide(this.iefix);
- },
-
- startIndicator: function() {
- if(this.options.indicator) Element.show(this.options.indicator);
- },
-
- stopIndicator: function() {
- if(this.options.indicator) Element.hide(this.options.indicator);
- },
-
- onKeyPress: function(event) {
- if(this.active)
- switch(event.keyCode) {
- case Event.KEY_TAB:
- case Event.KEY_RETURN:
- this.selectEntry();
- Event.stop(event);
- case Event.KEY_ESC:
- this.hide();
- this.active = false;
- Event.stop(event);
- return;
- case Event.KEY_LEFT:
- case Event.KEY_RIGHT:
- return;
- case Event.KEY_UP:
- this.markPrevious();
- this.render();
- if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
- return;
- case Event.KEY_DOWN:
- this.markNext();
- this.render();
- if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
- return;
- }
- else
- if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
- (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return;
-
- this.changed = true;
- this.hasFocus = true;
-
- if(this.observer) clearTimeout(this.observer);
- this.observer =
- setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
- },
-
- activate: function() {
- this.changed = false;
- this.hasFocus = true;
- this.getUpdatedChoices();
- },
-
- onHover: function(event) {
- var element = Event.findElement(event, 'LI');
- if(this.index != element.autocompleteIndex)
- {
- this.index = element.autocompleteIndex;
- this.render();
- }
- Event.stop(event);
- },
-
- onClick: function(event) {
- var element = Event.findElement(event, 'LI');
- this.index = element.autocompleteIndex;
- this.selectEntry();
- this.hide();
- },
-
- onBlur: function(event) {
- // needed to make click events working
- setTimeout(this.hide.bind(this), 250);
- this.hasFocus = false;
- this.active = false;
- },
-
- render: function() {
- if(this.entryCount > 0) {
- for (var i = 0; i < this.entryCount; i++)
- this.index==i ?
- Element.addClassName(this.getEntry(i),"selected") :
- Element.removeClassName(this.getEntry(i),"selected");
-
- if(this.hasFocus) {
- this.show();
- this.active = true;
- }
- } else {
- this.active = false;
- this.hide();
- }
- },
-
- markPrevious: function() {
- if(this.index > 0) this.index--
- else this.index = this.entryCount-1;
- this.getEntry(this.index).scrollIntoView(true);
- },
-
- markNext: function() {
- if(this.index < this.entryCount-1) this.index++
- else this.index = 0;
- this.getEntry(this.index).scrollIntoView(false);
- },
-
- getEntry: function(index) {
- return this.update.firstChild.childNodes[index];
- },
-
- getCurrentEntry: function() {
- return this.getEntry(this.index);
- },
-
- selectEntry: function() {
- this.active = false;
- this.updateElement(this.getCurrentEntry());
- },
-
- updateElement: function(selectedElement) {
- if (this.options.updateElement) {
- this.options.updateElement(selectedElement);
- return;
- }
- var value = '';
- if (this.options.select) {
- var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
- if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
- } else
- value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
-
- var lastTokenPos = this.findLastToken();
- if (lastTokenPos != -1) {
- var newValue = this.element.value.substr(0, lastTokenPos + 1);
- var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/);
- if (whitespace)
- newValue += whitespace[0];
- this.element.value = newValue + value;
- } else {
- this.element.value = value;
- }
- this.element.focus();
-
- if (this.options.afterUpdateElement)
- this.options.afterUpdateElement(this.element, selectedElement);
- },
-
- updateChoices: function(choices) {
- if(!this.changed && this.hasFocus) {
- this.update.innerHTML = choices;
- Element.cleanWhitespace(this.update);
- Element.cleanWhitespace(this.update.down());
-
- if(this.update.firstChild && this.update.down().childNodes) {
- this.entryCount =
- this.update.down().childNodes.length;
- for (var i = 0; i < this.entryCount; i++) {
- var entry = this.getEntry(i);
- entry.autocompleteIndex = i;
- this.addObservers(entry);
- }
- } else {
- this.entryCount = 0;
- }
-
- this.stopIndicator();
- this.index = 0;
-
- if(this.entryCount==1 && this.options.autoSelect) {
- this.selectEntry();
- this.hide();
- } else {
- this.render();
- }
- }
- },
-
- addObservers: function(element) {
- Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
- Event.observe(element, "click", this.onClick.bindAsEventListener(this));
- },
-
- onObserverEvent: function() {
- this.changed = false;
- if(this.getToken().length>=this.options.minChars) {
- this.startIndicator();
- this.getUpdatedChoices();
- } else {
- this.active = false;
- this.hide();
- }
- },
-
- getToken: function() {
- var tokenPos = this.findLastToken();
- if (tokenPos != -1)
- var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,'');
- else
- var ret = this.element.value;
-
- return /\n/.test(ret) ? '' : ret;
- },
-
- findLastToken: function() {
- var lastTokenPos = -1;
-
- for (var i=0; i lastTokenPos)
- lastTokenPos = thisTokenPos;
- }
- return lastTokenPos;
- }
-}
-
-Ajax.Autocompleter = Class.create();
-Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {
- initialize: function(element, update, url, options) {
- this.baseInitialize(element, update, options);
- this.options.asynchronous = true;
- this.options.onComplete = this.onComplete.bind(this);
- this.options.defaultParams = this.options.parameters || null;
- this.url = url;
- },
-
- getUpdatedChoices: function() {
- entry = encodeURIComponent(this.options.paramName) + '=' +
- encodeURIComponent(this.getToken());
-
- this.options.parameters = this.options.callback ?
- this.options.callback(this.element, entry) : entry;
-
- if(this.options.defaultParams)
- this.options.parameters += '&' + this.options.defaultParams;
-
- new Ajax.Request(this.url, this.options);
- },
-
- onComplete: function(request) {
- this.updateChoices(request.responseText);
- }
-
-});
-
-// The local array autocompleter. Used when you'd prefer to
-// inject an array of autocompletion options into the page, rather
-// than sending out Ajax queries, which can be quite slow sometimes.
-//
-// The constructor takes four parameters. The first two are, as usual,
-// the id of the monitored textbox, and id of the autocompletion menu.
-// The third is the array you want to autocomplete from, and the fourth
-// is the options block.
-//
-// Extra local autocompletion options:
-// - choices - How many autocompletion choices to offer
-//
-// - partialSearch - If false, the autocompleter will match entered
-// text only at the beginning of strings in the
-// autocomplete array. Defaults to true, which will
-// match text at the beginning of any *word* in the
-// strings in the autocomplete array. If you want to
-// search anywhere in the string, additionally set
-// the option fullSearch to true (default: off).
-//
-// - fullSsearch - Search anywhere in autocomplete array strings.
-//
-// - partialChars - How many characters to enter before triggering
-// a partial match (unlike minChars, which defines
-// how many characters are required to do any match
-// at all). Defaults to 2.
-//
-// - ignoreCase - Whether to ignore case when autocompleting.
-// Defaults to true.
-//
-// It's possible to pass in a custom function as the 'selector'
-// option, if you prefer to write your own autocompletion logic.
-// In that case, the other options above will not apply unless
-// you support them.
-
-Autocompleter.Local = Class.create();
-Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {
- initialize: function(element, update, array, options) {
- this.baseInitialize(element, update, options);
- this.options.array = array;
- },
-
- getUpdatedChoices: function() {
- this.updateChoices(this.options.selector(this));
- },
-
- setOptions: function(options) {
- this.options = Object.extend({
- choices: 10,
- partialSearch: true,
- partialChars: 2,
- ignoreCase: true,
- fullSearch: false,
- selector: function(instance) {
- var ret = []; // Beginning matches
- var partial = []; // Inside matches
- var entry = instance.getToken();
- var count = 0;
-
- for (var i = 0; i < instance.options.array.length &&
- ret.length < instance.options.choices ; i++) {
-
- var elem = instance.options.array[i];
- var foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase()) :
- elem.indexOf(entry);
-
- while (foundPos != -1) {
- if (foundPos == 0 && elem.length != entry.length) {
- ret.push("" + elem.substr(0, entry.length) + " " +
- elem.substr(entry.length) + " ");
- break;
- } else if (entry.length >= instance.options.partialChars &&
- instance.options.partialSearch && foundPos != -1) {
- if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
- partial.push("" + elem.substr(0, foundPos) + "" +
- elem.substr(foundPos, entry.length) + " " + elem.substr(
- foundPos + entry.length) + " ");
- break;
- }
- }
-
- foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
- elem.indexOf(entry, foundPos + 1);
-
- }
- }
- if (partial.length)
- ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
- return "";
- }
- }, options || {});
- }
-});
-
-// AJAX in-place editor
-//
-// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
-
-// Use this if you notice weird scrolling problems on some browsers,
-// the DOM might be a bit confused when this gets called so do this
-// waits 1 ms (with setTimeout) until it does the activation
-Field.scrollFreeActivate = function(field) {
- setTimeout(function() {
- Field.activate(field);
- }, 1);
-}
-
-Ajax.InPlaceEditor = Class.create();
-Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";
-Ajax.InPlaceEditor.prototype = {
- initialize: function(element, url, options) {
- this.url = url;
- this.element = $(element);
-
- this.options = Object.extend({
- paramName: "value",
- okButton: true,
- okText: "ok",
- cancelLink: true,
- cancelText: "cancel",
- savingText: "Saving...",
- clickToEditText: "Click to edit",
- okText: "ok",
- rows: 1,
- onComplete: function(transport, element) {
- new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
- },
- onFailure: function(transport) {
- alert("Error communicating with the server: " + transport.responseText.stripTags());
- },
- callback: function(form) {
- return Form.serialize(form);
- },
- handleLineBreaks: true,
- loadingText: 'Loading...',
- savingClassName: 'inplaceeditor-saving',
- loadingClassName: 'inplaceeditor-loading',
- formClassName: 'inplaceeditor-form',
- highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
- highlightendcolor: "#FFFFFF",
- externalControl: null,
- submitOnBlur: false,
- ajaxOptions: {},
- evalScripts: false
- }, options || {});
-
- if(!this.options.formId && this.element.id) {
- this.options.formId = this.element.id + "-inplaceeditor";
- if ($(this.options.formId)) {
- // there's already a form with that name, don't specify an id
- this.options.formId = null;
- }
- }
-
- if (this.options.externalControl) {
- this.options.externalControl = $(this.options.externalControl);
- }
-
- this.originalBackground = Element.getStyle(this.element, 'background-color');
- if (!this.originalBackground) {
- this.originalBackground = "transparent";
- }
-
- this.element.title = this.options.clickToEditText;
-
- this.onclickListener = this.enterEditMode.bindAsEventListener(this);
- this.mouseoverListener = this.enterHover.bindAsEventListener(this);
- this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
- Event.observe(this.element, 'click', this.onclickListener);
- Event.observe(this.element, 'mouseover', this.mouseoverListener);
- Event.observe(this.element, 'mouseout', this.mouseoutListener);
- if (this.options.externalControl) {
- Event.observe(this.options.externalControl, 'click', this.onclickListener);
- Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
- Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
- }
- },
- enterEditMode: function(evt) {
- if (this.saving) return;
- if (this.editing) return;
- this.editing = true;
- this.onEnterEditMode();
- if (this.options.externalControl) {
- Element.hide(this.options.externalControl);
- }
- Element.hide(this.element);
- this.createForm();
- this.element.parentNode.insertBefore(this.form, this.element);
- if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
- // stop the event to avoid a page refresh in Safari
- if (evt) {
- Event.stop(evt);
- }
- return false;
- },
- createForm: function() {
- this.form = document.createElement("form");
- this.form.id = this.options.formId;
- Element.addClassName(this.form, this.options.formClassName)
- this.form.onsubmit = this.onSubmit.bind(this);
-
- this.createEditField();
-
- if (this.options.textarea) {
- var br = document.createElement("br");
- this.form.appendChild(br);
- }
-
- if (this.options.okButton) {
- okButton = document.createElement("input");
- okButton.type = "submit";
- okButton.value = this.options.okText;
- okButton.className = 'editor_ok_button';
- this.form.appendChild(okButton);
- }
-
- if (this.options.cancelLink) {
- cancelLink = document.createElement("a");
- cancelLink.href = "#";
- cancelLink.appendChild(document.createTextNode(this.options.cancelText));
- cancelLink.onclick = this.onclickCancel.bind(this);
- cancelLink.className = 'editor_cancel';
- this.form.appendChild(cancelLink);
- }
- },
- hasHTMLLineBreaks: function(string) {
- if (!this.options.handleLineBreaks) return false;
- return string.match(/ /i);
- },
- convertHTMLLineBreaks: function(string) {
- return string.replace(/ /gi, "\n").replace(/ /gi, "\n").replace(/<\/p>/gi, "\n").replace(//gi, "");
- },
- createEditField: function() {
- var text;
- if(this.options.loadTextURL) {
- text = this.options.loadingText;
- } else {
- text = this.getText();
- }
-
- var obj = this;
-
- if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
- this.options.textarea = false;
- var textField = document.createElement("input");
- textField.obj = this;
- textField.type = "text";
- textField.name = this.options.paramName;
- textField.value = text;
- textField.style.backgroundColor = this.options.highlightcolor;
- textField.className = 'editor_field';
- var size = this.options.size || this.options.cols || 0;
- if (size != 0) textField.size = size;
- if (this.options.submitOnBlur)
- textField.onblur = this.onSubmit.bind(this);
- this.editField = textField;
- } else {
- this.options.textarea = true;
- var textArea = document.createElement("textarea");
- textArea.obj = this;
- textArea.name = this.options.paramName;
- textArea.value = this.convertHTMLLineBreaks(text);
- textArea.rows = this.options.rows;
- textArea.cols = this.options.cols || 40;
- textArea.className = 'editor_field';
- if (this.options.submitOnBlur)
- textArea.onblur = this.onSubmit.bind(this);
- this.editField = textArea;
- }
-
- if(this.options.loadTextURL) {
- this.loadExternalText();
- }
- this.form.appendChild(this.editField);
- },
- getText: function() {
- return this.element.innerHTML;
- },
- loadExternalText: function() {
- Element.addClassName(this.form, this.options.loadingClassName);
- this.editField.disabled = true;
- new Ajax.Request(
- this.options.loadTextURL,
- Object.extend({
- asynchronous: true,
- onComplete: this.onLoadedExternalText.bind(this)
- }, this.options.ajaxOptions)
- );
- },
- onLoadedExternalText: function(transport) {
- Element.removeClassName(this.form, this.options.loadingClassName);
- this.editField.disabled = false;
- this.editField.value = transport.responseText.stripTags();
- Field.scrollFreeActivate(this.editField);
- },
- onclickCancel: function() {
- this.onComplete();
- this.leaveEditMode();
- return false;
- },
- onFailure: function(transport) {
- this.options.onFailure(transport);
- if (this.oldInnerHTML) {
- this.element.innerHTML = this.oldInnerHTML;
- this.oldInnerHTML = null;
- }
- return false;
- },
- onSubmit: function() {
- // onLoading resets these so we need to save them away for the Ajax call
- var form = this.form;
- var value = this.editField.value;
-
- // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...
- // which means this will actually switch on Saving... *after* we've left edit mode causing Saving...
- // to be displayed indefinitely
- this.onLoading();
-
- if (this.options.evalScripts) {
- new Ajax.Request(
- this.url, Object.extend({
- parameters: this.options.callback(form, value),
- onComplete: this.onComplete.bind(this),
- onFailure: this.onFailure.bind(this),
- asynchronous:true,
- evalScripts:true
- }, this.options.ajaxOptions));
- } else {
- new Ajax.Updater(
- { success: this.element,
- // don't update on failure (this could be an option)
- failure: null },
- this.url, Object.extend({
- parameters: this.options.callback(form, value),
- onComplete: this.onComplete.bind(this),
- onFailure: this.onFailure.bind(this)
- }, this.options.ajaxOptions));
- }
- // stop the event to avoid a page refresh in Safari
- if (arguments.length > 1) {
- Event.stop(arguments[0]);
- }
- return false;
- },
- onLoading: function() {
- this.saving = true;
- this.removeForm();
- this.leaveHover();
- this.showSaving();
- },
- showSaving: function() {
- this.oldInnerHTML = this.element.innerHTML;
- this.element.innerHTML = this.options.savingText;
- Element.addClassName(this.element, this.options.savingClassName);
- this.element.style.backgroundColor = this.originalBackground;
- Element.show(this.element);
- },
- removeForm: function() {
- if(this.form) {
- if (this.form.parentNode) Element.remove(this.form);
- this.form = null;
- }
- },
- enterHover: function() {
- if (this.saving) return;
- this.element.style.backgroundColor = this.options.highlightcolor;
- if (this.effect) {
- this.effect.cancel();
- }
- Element.addClassName(this.element, this.options.hoverClassName)
- },
- leaveHover: function() {
- if (this.options.backgroundColor) {
- this.element.style.backgroundColor = this.oldBackground;
- }
- Element.removeClassName(this.element, this.options.hoverClassName)
- if (this.saving) return;
- this.effect = new Effect.Highlight(this.element, {
- startcolor: this.options.highlightcolor,
- endcolor: this.options.highlightendcolor,
- restorecolor: this.originalBackground
- });
- },
- leaveEditMode: function() {
- Element.removeClassName(this.element, this.options.savingClassName);
- this.removeForm();
- this.leaveHover();
- this.element.style.backgroundColor = this.originalBackground;
- Element.show(this.element);
- if (this.options.externalControl) {
- Element.show(this.options.externalControl);
- }
- this.editing = false;
- this.saving = false;
- this.oldInnerHTML = null;
- this.onLeaveEditMode();
- },
- onComplete: function(transport) {
- this.leaveEditMode();
- this.options.onComplete.bind(this)(transport, this.element);
- },
- onEnterEditMode: function() {},
- onLeaveEditMode: function() {},
- dispose: function() {
- if (this.oldInnerHTML) {
- this.element.innerHTML = this.oldInnerHTML;
- }
- this.leaveEditMode();
- Event.stopObserving(this.element, 'click', this.onclickListener);
- Event.stopObserving(this.element, 'mouseover', this.mouseoverListener);
- Event.stopObserving(this.element, 'mouseout', this.mouseoutListener);
- if (this.options.externalControl) {
- Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
- Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
- Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
- }
- }
-};
-
-Ajax.InPlaceCollectionEditor = Class.create();
-Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);
-Object.extend(Ajax.InPlaceCollectionEditor.prototype, {
- createEditField: function() {
- if (!this.cached_selectTag) {
- var selectTag = document.createElement("select");
- var collection = this.options.collection || [];
- var optionTag;
- collection.each(function(e,i) {
- optionTag = document.createElement("option");
- optionTag.value = (e instanceof Array) ? e[0] : e;
- if((typeof this.options.value == 'undefined') &&
- ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;
- if(this.options.value==optionTag.value) optionTag.selected = true;
- optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));
- selectTag.appendChild(optionTag);
- }.bind(this));
- this.cached_selectTag = selectTag;
- }
-
- this.editField = this.cached_selectTag;
- if(this.options.loadTextURL) this.loadExternalText();
- this.form.appendChild(this.editField);
- this.options.callback = function(form, value) {
- return "value=" + encodeURIComponent(value);
- }
- }
-});
-
-// Delayed observer, like Form.Element.Observer,
-// but waits for delay after last key input
-// Ideal for live-search fields
-
-Form.Element.DelayedObserver = Class.create();
-Form.Element.DelayedObserver.prototype = {
- initialize: function(element, delay, callback) {
- this.delay = delay || 0.5;
- this.element = $(element);
- this.callback = callback;
- this.timer = null;
- this.lastValue = $F(this.element);
- Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
- },
- delayedListener: function(event) {
- if(this.lastValue == $F(this.element)) return;
- if(this.timer) clearTimeout(this.timer);
- this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
- this.lastValue = $F(this.element);
- },
- onTimerEvent: function() {
- this.timer = null;
- this.callback(this.element, $F(this.element));
- }
-};
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js b/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js
deleted file mode 100644
index c71ddb82..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js
+++ /dev/null
@@ -1,942 +0,0 @@
-// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005, 2006 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-if(typeof Effect == 'undefined')
- throw("dragdrop.js requires including script.aculo.us' effects.js library");
-
-var Droppables = {
- drops: [],
-
- remove: function(element) {
- this.drops = this.drops.reject(function(d) { return d.element==$(element) });
- },
-
- add: function(element) {
- element = $(element);
- var options = Object.extend({
- greedy: true,
- hoverclass: null,
- tree: false
- }, arguments[1] || {});
-
- // cache containers
- if(options.containment) {
- options._containers = [];
- var containment = options.containment;
- if((typeof containment == 'object') &&
- (containment.constructor == Array)) {
- containment.each( function(c) { options._containers.push($(c)) });
- } else {
- options._containers.push($(containment));
- }
- }
-
- if(options.accept) options.accept = [options.accept].flatten();
-
- Element.makePositioned(element); // fix IE
- options.element = element;
-
- this.drops.push(options);
- },
-
- findDeepestChild: function(drops) {
- deepest = drops[0];
-
- for (i = 1; i < drops.length; ++i)
- if (Element.isParent(drops[i].element, deepest.element))
- deepest = drops[i];
-
- return deepest;
- },
-
- isContained: function(element, drop) {
- var containmentNode;
- if(drop.tree) {
- containmentNode = element.treeNode;
- } else {
- containmentNode = element.parentNode;
- }
- return drop._containers.detect(function(c) { return containmentNode == c });
- },
-
- isAffected: function(point, element, drop) {
- return (
- (drop.element!=element) &&
- ((!drop._containers) ||
- this.isContained(element, drop)) &&
- ((!drop.accept) ||
- (Element.classNames(element).detect(
- function(v) { return drop.accept.include(v) } ) )) &&
- Position.within(drop.element, point[0], point[1]) );
- },
-
- deactivate: function(drop) {
- if(drop.hoverclass)
- Element.removeClassName(drop.element, drop.hoverclass);
- this.last_active = null;
- },
-
- activate: function(drop) {
- if(drop.hoverclass)
- Element.addClassName(drop.element, drop.hoverclass);
- this.last_active = drop;
- },
-
- show: function(point, element) {
- if(!this.drops.length) return;
- var affected = [];
-
- if(this.last_active) this.deactivate(this.last_active);
- this.drops.each( function(drop) {
- if(Droppables.isAffected(point, element, drop))
- affected.push(drop);
- });
-
- if(affected.length>0) {
- drop = Droppables.findDeepestChild(affected);
- Position.within(drop.element, point[0], point[1]);
- if(drop.onHover)
- drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
-
- Droppables.activate(drop);
- }
- },
-
- fire: function(event, element) {
- if(!this.last_active) return;
- Position.prepare();
-
- if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
- if (this.last_active.onDrop)
- this.last_active.onDrop(element, this.last_active.element, event);
- },
-
- reset: function() {
- if(this.last_active)
- this.deactivate(this.last_active);
- }
-}
-
-var Draggables = {
- drags: [],
- observers: [],
-
- register: function(draggable) {
- if(this.drags.length == 0) {
- this.eventMouseUp = this.endDrag.bindAsEventListener(this);
- this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
- this.eventKeypress = this.keyPress.bindAsEventListener(this);
-
- Event.observe(document, "mouseup", this.eventMouseUp);
- Event.observe(document, "mousemove", this.eventMouseMove);
- Event.observe(document, "keypress", this.eventKeypress);
- }
- this.drags.push(draggable);
- },
-
- unregister: function(draggable) {
- this.drags = this.drags.reject(function(d) { return d==draggable });
- if(this.drags.length == 0) {
- Event.stopObserving(document, "mouseup", this.eventMouseUp);
- Event.stopObserving(document, "mousemove", this.eventMouseMove);
- Event.stopObserving(document, "keypress", this.eventKeypress);
- }
- },
-
- activate: function(draggable) {
- if(draggable.options.delay) {
- this._timeout = setTimeout(function() {
- Draggables._timeout = null;
- window.focus();
- Draggables.activeDraggable = draggable;
- }.bind(this), draggable.options.delay);
- } else {
- window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
- this.activeDraggable = draggable;
- }
- },
-
- deactivate: function() {
- this.activeDraggable = null;
- },
-
- updateDrag: function(event) {
- if(!this.activeDraggable) return;
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
- // Mozilla-based browsers fire successive mousemove events with
- // the same coordinates, prevent needless redrawing (moz bug?)
- if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
- this._lastPointer = pointer;
-
- this.activeDraggable.updateDrag(event, pointer);
- },
-
- endDrag: function(event) {
- if(this._timeout) {
- clearTimeout(this._timeout);
- this._timeout = null;
- }
- if(!this.activeDraggable) return;
- this._lastPointer = null;
- this.activeDraggable.endDrag(event);
- this.activeDraggable = null;
- },
-
- keyPress: function(event) {
- if(this.activeDraggable)
- this.activeDraggable.keyPress(event);
- },
-
- addObserver: function(observer) {
- this.observers.push(observer);
- this._cacheObserverCallbacks();
- },
-
- removeObserver: function(element) { // element instead of observer fixes mem leaks
- this.observers = this.observers.reject( function(o) { return o.element==element });
- this._cacheObserverCallbacks();
- },
-
- notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
- if(this[eventName+'Count'] > 0)
- this.observers.each( function(o) {
- if(o[eventName]) o[eventName](eventName, draggable, event);
- });
- if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
- },
-
- _cacheObserverCallbacks: function() {
- ['onStart','onEnd','onDrag'].each( function(eventName) {
- Draggables[eventName+'Count'] = Draggables.observers.select(
- function(o) { return o[eventName]; }
- ).length;
- });
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var Draggable = Class.create();
-Draggable._dragging = {};
-
-Draggable.prototype = {
- initialize: function(element) {
- var defaults = {
- handle: false,
- reverteffect: function(element, top_offset, left_offset) {
- var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
- new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
- queue: {scope:'_draggable', position:'end'}
- });
- },
- endeffect: function(element) {
- var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0;
- new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
- queue: {scope:'_draggable', position:'end'},
- afterFinish: function(){
- Draggable._dragging[element] = false
- }
- });
- },
- zindex: 1000,
- revert: false,
- scroll: false,
- scrollSensitivity: 20,
- scrollSpeed: 15,
- snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
- delay: 0
- };
-
- if(!arguments[1] || typeof arguments[1].endeffect == 'undefined')
- Object.extend(defaults, {
- starteffect: function(element) {
- element._opacity = Element.getOpacity(element);
- Draggable._dragging[element] = true;
- new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
- }
- });
-
- var options = Object.extend(defaults, arguments[1] || {});
-
- this.element = $(element);
-
- if(options.handle && (typeof options.handle == 'string'))
- this.handle = this.element.down('.'+options.handle, 0);
-
- if(!this.handle) this.handle = $(options.handle);
- if(!this.handle) this.handle = this.element;
-
- if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
- options.scroll = $(options.scroll);
- this._isScrollChild = Element.childOf(this.element, options.scroll);
- }
-
- Element.makePositioned(this.element); // fix IE
-
- this.delta = this.currentDelta();
- this.options = options;
- this.dragging = false;
-
- this.eventMouseDown = this.initDrag.bindAsEventListener(this);
- Event.observe(this.handle, "mousedown", this.eventMouseDown);
-
- Draggables.register(this);
- },
-
- destroy: function() {
- Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
- Draggables.unregister(this);
- },
-
- currentDelta: function() {
- return([
- parseInt(Element.getStyle(this.element,'left') || '0'),
- parseInt(Element.getStyle(this.element,'top') || '0')]);
- },
-
- initDrag: function(event) {
- if(typeof Draggable._dragging[this.element] != 'undefined' &&
- Draggable._dragging[this.element]) return;
- if(Event.isLeftClick(event)) {
- // abort on form elements, fixes a Firefox issue
- var src = Event.element(event);
- if(src.tagName && (
- src.tagName=='INPUT' ||
- src.tagName=='SELECT' ||
- src.tagName=='OPTION' ||
- src.tagName=='BUTTON' ||
- src.tagName=='TEXTAREA')) return;
-
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
- var pos = Position.cumulativeOffset(this.element);
- this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
-
- Draggables.activate(this);
- Event.stop(event);
- }
- },
-
- startDrag: function(event) {
- this.dragging = true;
-
- if(this.options.zindex) {
- this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
- this.element.style.zIndex = this.options.zindex;
- }
-
- if(this.options.ghosting) {
- this._clone = this.element.cloneNode(true);
- Position.absolutize(this.element);
- this.element.parentNode.insertBefore(this._clone, this.element);
- }
-
- if(this.options.scroll) {
- if (this.options.scroll == window) {
- var where = this._getWindowScroll(this.options.scroll);
- this.originalScrollLeft = where.left;
- this.originalScrollTop = where.top;
- } else {
- this.originalScrollLeft = this.options.scroll.scrollLeft;
- this.originalScrollTop = this.options.scroll.scrollTop;
- }
- }
-
- Draggables.notify('onStart', this, event);
-
- if(this.options.starteffect) this.options.starteffect(this.element);
- },
-
- updateDrag: function(event, pointer) {
- if(!this.dragging) this.startDrag(event);
- Position.prepare();
- Droppables.show(pointer, this.element);
- Draggables.notify('onDrag', this, event);
-
- this.draw(pointer);
- if(this.options.change) this.options.change(this);
-
- if(this.options.scroll) {
- this.stopScrolling();
-
- var p;
- if (this.options.scroll == window) {
- with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
- } else {
- p = Position.page(this.options.scroll);
- p[0] += this.options.scroll.scrollLeft + Position.deltaX;
- p[1] += this.options.scroll.scrollTop + Position.deltaY;
- p.push(p[0]+this.options.scroll.offsetWidth);
- p.push(p[1]+this.options.scroll.offsetHeight);
- }
- var speed = [0,0];
- if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
- if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
- if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
- if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
- this.startScrolling(speed);
- }
-
- // fix AppleWebKit rendering
- if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
-
- Event.stop(event);
- },
-
- finishDrag: function(event, success) {
- this.dragging = false;
-
- if(this.options.ghosting) {
- Position.relativize(this.element);
- Element.remove(this._clone);
- this._clone = null;
- }
-
- if(success) Droppables.fire(event, this.element);
- Draggables.notify('onEnd', this, event);
-
- var revert = this.options.revert;
- if(revert && typeof revert == 'function') revert = revert(this.element);
-
- var d = this.currentDelta();
- if(revert && this.options.reverteffect) {
- this.options.reverteffect(this.element,
- d[1]-this.delta[1], d[0]-this.delta[0]);
- } else {
- this.delta = d;
- }
-
- if(this.options.zindex)
- this.element.style.zIndex = this.originalZ;
-
- if(this.options.endeffect)
- this.options.endeffect(this.element);
-
- Draggables.deactivate(this);
- Droppables.reset();
- },
-
- keyPress: function(event) {
- if(event.keyCode!=Event.KEY_ESC) return;
- this.finishDrag(event, false);
- Event.stop(event);
- },
-
- endDrag: function(event) {
- if(!this.dragging) return;
- this.stopScrolling();
- this.finishDrag(event, true);
- Event.stop(event);
- },
-
- draw: function(point) {
- var pos = Position.cumulativeOffset(this.element);
- if(this.options.ghosting) {
- var r = Position.realOffset(this.element);
- pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
- }
-
- var d = this.currentDelta();
- pos[0] -= d[0]; pos[1] -= d[1];
-
- if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
- pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
- pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
- }
-
- var p = [0,1].map(function(i){
- return (point[i]-pos[i]-this.offset[i])
- }.bind(this));
-
- if(this.options.snap) {
- if(typeof this.options.snap == 'function') {
- p = this.options.snap(p[0],p[1],this);
- } else {
- if(this.options.snap instanceof Array) {
- p = p.map( function(v, i) {
- return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
- } else {
- p = p.map( function(v) {
- return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
- }
- }}
-
- var style = this.element.style;
- if((!this.options.constraint) || (this.options.constraint=='horizontal'))
- style.left = p[0] + "px";
- if((!this.options.constraint) || (this.options.constraint=='vertical'))
- style.top = p[1] + "px";
-
- if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
- },
-
- stopScrolling: function() {
- if(this.scrollInterval) {
- clearInterval(this.scrollInterval);
- this.scrollInterval = null;
- Draggables._lastScrollPointer = null;
- }
- },
-
- startScrolling: function(speed) {
- if(!(speed[0] || speed[1])) return;
- this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
- this.lastScrolled = new Date();
- this.scrollInterval = setInterval(this.scroll.bind(this), 10);
- },
-
- scroll: function() {
- var current = new Date();
- var delta = current - this.lastScrolled;
- this.lastScrolled = current;
- if(this.options.scroll == window) {
- with (this._getWindowScroll(this.options.scroll)) {
- if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
- var d = delta / 1000;
- this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
- }
- }
- } else {
- this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
- this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
- }
-
- Position.prepare();
- Droppables.show(Draggables._lastPointer, this.element);
- Draggables.notify('onDrag', this);
- if (this._isScrollChild) {
- Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
- Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
- Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
- if (Draggables._lastScrollPointer[0] < 0)
- Draggables._lastScrollPointer[0] = 0;
- if (Draggables._lastScrollPointer[1] < 0)
- Draggables._lastScrollPointer[1] = 0;
- this.draw(Draggables._lastScrollPointer);
- }
-
- if(this.options.change) this.options.change(this);
- },
-
- _getWindowScroll: function(w) {
- var T, L, W, H;
- with (w.document) {
- if (w.document.documentElement && documentElement.scrollTop) {
- T = documentElement.scrollTop;
- L = documentElement.scrollLeft;
- } else if (w.document.body) {
- T = body.scrollTop;
- L = body.scrollLeft;
- }
- if (w.innerWidth) {
- W = w.innerWidth;
- H = w.innerHeight;
- } else if (w.document.documentElement && documentElement.clientWidth) {
- W = documentElement.clientWidth;
- H = documentElement.clientHeight;
- } else {
- W = body.offsetWidth;
- H = body.offsetHeight
- }
- }
- return { top: T, left: L, width: W, height: H };
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var SortableObserver = Class.create();
-SortableObserver.prototype = {
- initialize: function(element, observer) {
- this.element = $(element);
- this.observer = observer;
- this.lastValue = Sortable.serialize(this.element);
- },
-
- onStart: function() {
- this.lastValue = Sortable.serialize(this.element);
- },
-
- onEnd: function() {
- Sortable.unmark();
- if(this.lastValue != Sortable.serialize(this.element))
- this.observer(this.element)
- }
-}
-
-var Sortable = {
- SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
-
- sortables: {},
-
- _findRootElement: function(element) {
- while (element.tagName != "BODY") {
- if(element.id && Sortable.sortables[element.id]) return element;
- element = element.parentNode;
- }
- },
-
- options: function(element) {
- element = Sortable._findRootElement($(element));
- if(!element) return;
- return Sortable.sortables[element.id];
- },
-
- destroy: function(element){
- var s = Sortable.options(element);
-
- if(s) {
- Draggables.removeObserver(s.element);
- s.droppables.each(function(d){ Droppables.remove(d) });
- s.draggables.invoke('destroy');
-
- delete Sortable.sortables[s.element.id];
- }
- },
-
- create: function(element) {
- element = $(element);
- var options = Object.extend({
- element: element,
- tag: 'li', // assumes li children, override with tag: 'tagname'
- dropOnEmpty: false,
- tree: false,
- treeTag: 'ul',
- overlap: 'vertical', // one of 'vertical', 'horizontal'
- constraint: 'vertical', // one of 'vertical', 'horizontal', false
- containment: element, // also takes array of elements (or id's); or false
- handle: false, // or a CSS class
- only: false,
- delay: 0,
- hoverclass: null,
- ghosting: false,
- scroll: false,
- scrollSensitivity: 20,
- scrollSpeed: 15,
- format: this.SERIALIZE_RULE,
- onChange: Prototype.emptyFunction,
- onUpdate: Prototype.emptyFunction
- }, arguments[1] || {});
-
- // clear any old sortable with same element
- this.destroy(element);
-
- // build options for the draggables
- var options_for_draggable = {
- revert: true,
- scroll: options.scroll,
- scrollSpeed: options.scrollSpeed,
- scrollSensitivity: options.scrollSensitivity,
- delay: options.delay,
- ghosting: options.ghosting,
- constraint: options.constraint,
- handle: options.handle };
-
- if(options.starteffect)
- options_for_draggable.starteffect = options.starteffect;
-
- if(options.reverteffect)
- options_for_draggable.reverteffect = options.reverteffect;
- else
- if(options.ghosting) options_for_draggable.reverteffect = function(element) {
- element.style.top = 0;
- element.style.left = 0;
- };
-
- if(options.endeffect)
- options_for_draggable.endeffect = options.endeffect;
-
- if(options.zindex)
- options_for_draggable.zindex = options.zindex;
-
- // build options for the droppables
- var options_for_droppable = {
- overlap: options.overlap,
- containment: options.containment,
- tree: options.tree,
- hoverclass: options.hoverclass,
- onHover: Sortable.onHover
- }
-
- var options_for_tree = {
- onHover: Sortable.onEmptyHover,
- overlap: options.overlap,
- containment: options.containment,
- hoverclass: options.hoverclass
- }
-
- // fix for gecko engine
- Element.cleanWhitespace(element);
-
- options.draggables = [];
- options.droppables = [];
-
- // drop on empty handling
- if(options.dropOnEmpty || options.tree) {
- Droppables.add(element, options_for_tree);
- options.droppables.push(element);
- }
-
- (this.findElements(element, options) || []).each( function(e) {
- // handles are per-draggable
- var handle = options.handle ?
- $(e).down('.'+options.handle,0) : e;
- options.draggables.push(
- new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
- Droppables.add(e, options_for_droppable);
- if(options.tree) e.treeNode = element;
- options.droppables.push(e);
- });
-
- if(options.tree) {
- (Sortable.findTreeElements(element, options) || []).each( function(e) {
- Droppables.add(e, options_for_tree);
- e.treeNode = element;
- options.droppables.push(e);
- });
- }
-
- // keep reference
- this.sortables[element.id] = options;
-
- // for onupdate
- Draggables.addObserver(new SortableObserver(element, options.onUpdate));
-
- },
-
- // return all suitable-for-sortable elements in a guaranteed order
- findElements: function(element, options) {
- return Element.findChildren(
- element, options.only, options.tree ? true : false, options.tag);
- },
-
- findTreeElements: function(element, options) {
- return Element.findChildren(
- element, options.only, options.tree ? true : false, options.treeTag);
- },
-
- onHover: function(element, dropon, overlap) {
- if(Element.isParent(dropon, element)) return;
-
- if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
- return;
- } else if(overlap>0.5) {
- Sortable.mark(dropon, 'before');
- if(dropon.previousSibling != element) {
- var oldParentNode = element.parentNode;
- element.style.visibility = "hidden"; // fix gecko rendering
- dropon.parentNode.insertBefore(element, dropon);
- if(dropon.parentNode!=oldParentNode)
- Sortable.options(oldParentNode).onChange(element);
- Sortable.options(dropon.parentNode).onChange(element);
- }
- } else {
- Sortable.mark(dropon, 'after');
- var nextElement = dropon.nextSibling || null;
- if(nextElement != element) {
- var oldParentNode = element.parentNode;
- element.style.visibility = "hidden"; // fix gecko rendering
- dropon.parentNode.insertBefore(element, nextElement);
- if(dropon.parentNode!=oldParentNode)
- Sortable.options(oldParentNode).onChange(element);
- Sortable.options(dropon.parentNode).onChange(element);
- }
- }
- },
-
- onEmptyHover: function(element, dropon, overlap) {
- var oldParentNode = element.parentNode;
- var droponOptions = Sortable.options(dropon);
-
- if(!Element.isParent(dropon, element)) {
- var index;
-
- var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
- var child = null;
-
- if(children) {
- var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
-
- for (index = 0; index < children.length; index += 1) {
- if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
- offset -= Element.offsetSize (children[index], droponOptions.overlap);
- } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
- child = index + 1 < children.length ? children[index + 1] : null;
- break;
- } else {
- child = children[index];
- break;
- }
- }
- }
-
- dropon.insertBefore(element, child);
-
- Sortable.options(oldParentNode).onChange(element);
- droponOptions.onChange(element);
- }
- },
-
- unmark: function() {
- if(Sortable._marker) Sortable._marker.hide();
- },
-
- mark: function(dropon, position) {
- // mark on ghosting only
- var sortable = Sortable.options(dropon.parentNode);
- if(sortable && !sortable.ghosting) return;
-
- if(!Sortable._marker) {
- Sortable._marker =
- ($('dropmarker') || Element.extend(document.createElement('DIV'))).
- hide().addClassName('dropmarker').setStyle({position:'absolute'});
- document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
- }
- var offsets = Position.cumulativeOffset(dropon);
- Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
-
- if(position=='after')
- if(sortable.overlap == 'horizontal')
- Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
- else
- Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
-
- Sortable._marker.show();
- },
-
- _tree: function(element, options, parent) {
- var children = Sortable.findElements(element, options) || [];
-
- for (var i = 0; i < children.length; ++i) {
- var match = children[i].id.match(options.format);
-
- if (!match) continue;
-
- var child = {
- id: encodeURIComponent(match ? match[1] : null),
- element: element,
- parent: parent,
- children: [],
- position: parent.children.length,
- container: $(children[i]).down(options.treeTag)
- }
-
- /* Get the element containing the children and recurse over it */
- if (child.container)
- this._tree(child.container, options, child)
-
- parent.children.push (child);
- }
-
- return parent;
- },
-
- tree: function(element) {
- element = $(element);
- var sortableOptions = this.options(element);
- var options = Object.extend({
- tag: sortableOptions.tag,
- treeTag: sortableOptions.treeTag,
- only: sortableOptions.only,
- name: element.id,
- format: sortableOptions.format
- }, arguments[1] || {});
-
- var root = {
- id: null,
- parent: null,
- children: [],
- container: element,
- position: 0
- }
-
- return Sortable._tree(element, options, root);
- },
-
- /* Construct a [i] index for a particular node */
- _constructIndex: function(node) {
- var index = '';
- do {
- if (node.id) index = '[' + node.position + ']' + index;
- } while ((node = node.parent) != null);
- return index;
- },
-
- sequence: function(element) {
- element = $(element);
- var options = Object.extend(this.options(element), arguments[1] || {});
-
- return $(this.findElements(element, options) || []).map( function(item) {
- return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
- });
- },
-
- setSequence: function(element, new_sequence) {
- element = $(element);
- var options = Object.extend(this.options(element), arguments[2] || {});
-
- var nodeMap = {};
- this.findElements(element, options).each( function(n) {
- if (n.id.match(options.format))
- nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
- n.parentNode.removeChild(n);
- });
-
- new_sequence.each(function(ident) {
- var n = nodeMap[ident];
- if (n) {
- n[1].appendChild(n[0]);
- delete nodeMap[ident];
- }
- });
- },
-
- serialize: function(element) {
- element = $(element);
- var options = Object.extend(Sortable.options(element), arguments[1] || {});
- var name = encodeURIComponent(
- (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
-
- if (options.tree) {
- return Sortable.tree(element, arguments[1]).children.map( function (item) {
- return [name + Sortable._constructIndex(item) + "[id]=" +
- encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
- }).flatten().join('&');
- } else {
- return Sortable.sequence(element, arguments[1]).map( function(item) {
- return name + "[]=" + encodeURIComponent(item);
- }).join('&');
- }
- }
-}
-
-// Returns true if child is contained within element
-Element.isParent = function(child, element) {
- if (!child.parentNode || child == element) return false;
- if (child.parentNode == element) return true;
- return Element.isParent(child.parentNode, element);
-}
-
-Element.findChildren = function(element, only, recursive, tagName) {
- if(!element.hasChildNodes()) return null;
- tagName = tagName.toUpperCase();
- if(only) only = [only].flatten();
- var elements = [];
- $A(element.childNodes).each( function(e) {
- if(e.tagName && e.tagName.toUpperCase()==tagName &&
- (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
- elements.push(e);
- if(recursive) {
- var grandchildren = Element.findChildren(e, only, recursive, tagName);
- if(grandchildren) elements.push(grandchildren);
- }
- });
-
- return (elements.length>0 ? elements.flatten() : []);
-}
-
-Element.offsetSize = function (element, type) {
- return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
-}
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js b/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js
deleted file mode 100644
index 3b02eda2..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js
+++ /dev/null
@@ -1,1088 +0,0 @@
-// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// Contributors:
-// Justin Palmer (http://encytemedia.com/)
-// Mark Pilgrim (http://diveintomark.org/)
-// Martin Bialasinki
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-// converts rgb() and #xxx to #xxxxxx format,
-// returns self (or first argument) if not convertable
-String.prototype.parseColor = function() {
- var color = '#';
- if(this.slice(0,4) == 'rgb(') {
- var cols = this.slice(4,this.length-1).split(',');
- var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
- } else {
- if(this.slice(0,1) == '#') {
- if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
- if(this.length==7) color = this.toLowerCase();
- }
- }
- return(color.length==7 ? color : (arguments[0] || this));
-}
-
-/*--------------------------------------------------------------------------*/
-
-Element.collectTextNodes = function(element) {
- return $A($(element).childNodes).collect( function(node) {
- return (node.nodeType==3 ? node.nodeValue :
- (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
- }).flatten().join('');
-}
-
-Element.collectTextNodesIgnoreClass = function(element, className) {
- return $A($(element).childNodes).collect( function(node) {
- return (node.nodeType==3 ? node.nodeValue :
- ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
- Element.collectTextNodesIgnoreClass(node, className) : ''));
- }).flatten().join('');
-}
-
-Element.setContentZoom = function(element, percent) {
- element = $(element);
- element.setStyle({fontSize: (percent/100) + 'em'});
- if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
- return element;
-}
-
-Element.getOpacity = function(element){
- element = $(element);
- var opacity;
- if (opacity = element.getStyle('opacity'))
- return parseFloat(opacity);
- if (opacity = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
- if(opacity[1]) return parseFloat(opacity[1]) / 100;
- return 1.0;
-}
-
-Element.setOpacity = function(element, value){
- element= $(element);
- if (value == 1){
- element.setStyle({ opacity:
- (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
- 0.999999 : 1.0 });
- if(/MSIE/.test(navigator.userAgent) && !window.opera)
- element.setStyle({filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});
- } else {
- if(value < 0.00001) value = 0;
- element.setStyle({opacity: value});
- if(/MSIE/.test(navigator.userAgent) && !window.opera)
- element.setStyle(
- { filter: element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
- 'alpha(opacity='+value*100+')' });
- }
- return element;
-}
-
-Element.getInlineOpacity = function(element){
- return $(element).style.opacity || '';
-}
-
-Element.forceRerendering = function(element) {
- try {
- element = $(element);
- var n = document.createTextNode(' ');
- element.appendChild(n);
- element.removeChild(n);
- } catch(e) { }
-};
-
-/*--------------------------------------------------------------------------*/
-
-Array.prototype.call = function() {
- var args = arguments;
- this.each(function(f){ f.apply(this, args) });
-}
-
-/*--------------------------------------------------------------------------*/
-
-var Effect = {
- _elementDoesNotExistError: {
- name: 'ElementDoesNotExistError',
- message: 'The specified DOM element does not exist, but is required for this effect to operate'
- },
- tagifyText: function(element) {
- if(typeof Builder == 'undefined')
- throw("Effect.tagifyText requires including script.aculo.us' builder.js library");
-
- var tagifyStyle = 'position:relative';
- if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1';
-
- element = $(element);
- $A(element.childNodes).each( function(child) {
- if(child.nodeType==3) {
- child.nodeValue.toArray().each( function(character) {
- element.insertBefore(
- Builder.node('span',{style: tagifyStyle},
- character == ' ' ? String.fromCharCode(160) : character),
- child);
- });
- Element.remove(child);
- }
- });
- },
- multiple: function(element, effect) {
- var elements;
- if(((typeof element == 'object') ||
- (typeof element == 'function')) &&
- (element.length))
- elements = element;
- else
- elements = $(element).childNodes;
-
- var options = Object.extend({
- speed: 0.1,
- delay: 0.0
- }, arguments[2] || {});
- var masterDelay = options.delay;
-
- $A(elements).each( function(element, index) {
- new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
- });
- },
- PAIRS: {
- 'slide': ['SlideDown','SlideUp'],
- 'blind': ['BlindDown','BlindUp'],
- 'appear': ['Appear','Fade']
- },
- toggle: function(element, effect) {
- element = $(element);
- effect = (effect || 'appear').toLowerCase();
- var options = Object.extend({
- queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
- }, arguments[2] || {});
- Effect[element.visible() ?
- Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
- }
-};
-
-var Effect2 = Effect; // deprecated
-
-/* ------------- transitions ------------- */
-
-Effect.Transitions = {
- linear: Prototype.K,
- sinoidal: function(pos) {
- return (-Math.cos(pos*Math.PI)/2) + 0.5;
- },
- reverse: function(pos) {
- return 1-pos;
- },
- flicker: function(pos) {
- return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
- },
- wobble: function(pos) {
- return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
- },
- pulse: function(pos, pulses) {
- pulses = pulses || 5;
- return (
- Math.round((pos % (1/pulses)) * pulses) == 0 ?
- ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) :
- 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2))
- );
- },
- none: function(pos) {
- return 0;
- },
- full: function(pos) {
- return 1;
- }
-};
-
-/* ------------- core effects ------------- */
-
-Effect.ScopedQueue = Class.create();
-Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
- initialize: function() {
- this.effects = [];
- this.interval = null;
- },
- _each: function(iterator) {
- this.effects._each(iterator);
- },
- add: function(effect) {
- var timestamp = new Date().getTime();
-
- var position = (typeof effect.options.queue == 'string') ?
- effect.options.queue : effect.options.queue.position;
-
- switch(position) {
- case 'front':
- // move unstarted effects after this effect
- this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
- e.startOn += effect.finishOn;
- e.finishOn += effect.finishOn;
- });
- break;
- case 'with-last':
- timestamp = this.effects.pluck('startOn').max() || timestamp;
- break;
- case 'end':
- // start effect after last queued effect has finished
- timestamp = this.effects.pluck('finishOn').max() || timestamp;
- break;
- }
-
- effect.startOn += timestamp;
- effect.finishOn += timestamp;
-
- if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
- this.effects.push(effect);
-
- if(!this.interval)
- this.interval = setInterval(this.loop.bind(this), 40);
- },
- remove: function(effect) {
- this.effects = this.effects.reject(function(e) { return e==effect });
- if(this.effects.length == 0) {
- clearInterval(this.interval);
- this.interval = null;
- }
- },
- loop: function() {
- var timePos = new Date().getTime();
- this.effects.invoke('loop', timePos);
- }
-});
-
-Effect.Queues = {
- instances: $H(),
- get: function(queueName) {
- if(typeof queueName != 'string') return queueName;
-
- if(!this.instances[queueName])
- this.instances[queueName] = new Effect.ScopedQueue();
-
- return this.instances[queueName];
- }
-}
-Effect.Queue = Effect.Queues.get('global');
-
-Effect.DefaultOptions = {
- transition: Effect.Transitions.sinoidal,
- duration: 1.0, // seconds
- fps: 25.0, // max. 25fps due to Effect.Queue implementation
- sync: false, // true for combining
- from: 0.0,
- to: 1.0,
- delay: 0.0,
- queue: 'parallel'
-}
-
-Effect.Base = function() {};
-Effect.Base.prototype = {
- position: null,
- start: function(options) {
- this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
- this.currentFrame = 0;
- this.state = 'idle';
- this.startOn = this.options.delay*1000;
- this.finishOn = this.startOn + (this.options.duration*1000);
- this.event('beforeStart');
- if(!this.options.sync)
- Effect.Queues.get(typeof this.options.queue == 'string' ?
- 'global' : this.options.queue.scope).add(this);
- },
- loop: function(timePos) {
- if(timePos >= this.startOn) {
- if(timePos >= this.finishOn) {
- this.render(1.0);
- this.cancel();
- this.event('beforeFinish');
- if(this.finish) this.finish();
- this.event('afterFinish');
- return;
- }
- var pos = (timePos - this.startOn) / (this.finishOn - this.startOn);
- var frame = Math.round(pos * this.options.fps * this.options.duration);
- if(frame > this.currentFrame) {
- this.render(pos);
- this.currentFrame = frame;
- }
- }
- },
- render: function(pos) {
- if(this.state == 'idle') {
- this.state = 'running';
- this.event('beforeSetup');
- if(this.setup) this.setup();
- this.event('afterSetup');
- }
- if(this.state == 'running') {
- if(this.options.transition) pos = this.options.transition(pos);
- pos *= (this.options.to-this.options.from);
- pos += this.options.from;
- this.position = pos;
- this.event('beforeUpdate');
- if(this.update) this.update(pos);
- this.event('afterUpdate');
- }
- },
- cancel: function() {
- if(!this.options.sync)
- Effect.Queues.get(typeof this.options.queue == 'string' ?
- 'global' : this.options.queue.scope).remove(this);
- this.state = 'finished';
- },
- event: function(eventName) {
- if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
- if(this.options[eventName]) this.options[eventName](this);
- },
- inspect: function() {
- return '#';
- }
-}
-
-Effect.Parallel = Class.create();
-Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
- initialize: function(effects) {
- this.effects = effects || [];
- this.start(arguments[1]);
- },
- update: function(position) {
- this.effects.invoke('render', position);
- },
- finish: function(position) {
- this.effects.each( function(effect) {
- effect.render(1.0);
- effect.cancel();
- effect.event('beforeFinish');
- if(effect.finish) effect.finish(position);
- effect.event('afterFinish');
- });
- }
-});
-
-Effect.Event = Class.create();
-Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), {
- initialize: function() {
- var options = Object.extend({
- duration: 0
- }, arguments[0] || {});
- this.start(options);
- },
- update: Prototype.emptyFunction
-});
-
-Effect.Opacity = Class.create();
-Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
- initialize: function(element) {
- this.element = $(element);
- if(!this.element) throw(Effect._elementDoesNotExistError);
- // make this work on IE on elements without 'layout'
- if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout))
- this.element.setStyle({zoom: 1});
- var options = Object.extend({
- from: this.element.getOpacity() || 0.0,
- to: 1.0
- }, arguments[1] || {});
- this.start(options);
- },
- update: function(position) {
- this.element.setOpacity(position);
- }
-});
-
-Effect.Move = Class.create();
-Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
- initialize: function(element) {
- this.element = $(element);
- if(!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- x: 0,
- y: 0,
- mode: 'relative'
- }, arguments[1] || {});
- this.start(options);
- },
- setup: function() {
- // Bug in Opera: Opera returns the "real" position of a static element or
- // relative element that does not have top/left explicitly set.
- // ==> Always set top and left for position relative elements in your stylesheets
- // (to 0 if you do not need them)
- this.element.makePositioned();
- this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
- this.originalTop = parseFloat(this.element.getStyle('top') || '0');
- if(this.options.mode == 'absolute') {
- // absolute movement, so we need to calc deltaX and deltaY
- this.options.x = this.options.x - this.originalLeft;
- this.options.y = this.options.y - this.originalTop;
- }
- },
- update: function(position) {
- this.element.setStyle({
- left: Math.round(this.options.x * position + this.originalLeft) + 'px',
- top: Math.round(this.options.y * position + this.originalTop) + 'px'
- });
- }
-});
-
-// for backwards compatibility
-Effect.MoveBy = function(element, toTop, toLeft) {
- return new Effect.Move(element,
- Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
-};
-
-Effect.Scale = Class.create();
-Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
- initialize: function(element, percent) {
- this.element = $(element);
- if(!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- scaleX: true,
- scaleY: true,
- scaleContent: true,
- scaleFromCenter: false,
- scaleMode: 'box', // 'box' or 'contents' or {} with provided values
- scaleFrom: 100.0,
- scaleTo: percent
- }, arguments[2] || {});
- this.start(options);
- },
- setup: function() {
- this.restoreAfterFinish = this.options.restoreAfterFinish || false;
- this.elementPositioning = this.element.getStyle('position');
-
- this.originalStyle = {};
- ['top','left','width','height','fontSize'].each( function(k) {
- this.originalStyle[k] = this.element.style[k];
- }.bind(this));
-
- this.originalTop = this.element.offsetTop;
- this.originalLeft = this.element.offsetLeft;
-
- var fontSize = this.element.getStyle('font-size') || '100%';
- ['em','px','%','pt'].each( function(fontSizeType) {
- if(fontSize.indexOf(fontSizeType)>0) {
- this.fontSize = parseFloat(fontSize);
- this.fontSizeType = fontSizeType;
- }
- }.bind(this));
-
- this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
-
- this.dims = null;
- if(this.options.scaleMode=='box')
- this.dims = [this.element.offsetHeight, this.element.offsetWidth];
- if(/^content/.test(this.options.scaleMode))
- this.dims = [this.element.scrollHeight, this.element.scrollWidth];
- if(!this.dims)
- this.dims = [this.options.scaleMode.originalHeight,
- this.options.scaleMode.originalWidth];
- },
- update: function(position) {
- var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
- if(this.options.scaleContent && this.fontSize)
- this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
- this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
- },
- finish: function(position) {
- if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
- },
- setDimensions: function(height, width) {
- var d = {};
- if(this.options.scaleX) d.width = Math.round(width) + 'px';
- if(this.options.scaleY) d.height = Math.round(height) + 'px';
- if(this.options.scaleFromCenter) {
- var topd = (height - this.dims[0])/2;
- var leftd = (width - this.dims[1])/2;
- if(this.elementPositioning == 'absolute') {
- if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
- if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
- } else {
- if(this.options.scaleY) d.top = -topd + 'px';
- if(this.options.scaleX) d.left = -leftd + 'px';
- }
- }
- this.element.setStyle(d);
- }
-});
-
-Effect.Highlight = Class.create();
-Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
- initialize: function(element) {
- this.element = $(element);
- if(!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
- this.start(options);
- },
- setup: function() {
- // Prevent executing on elements not in the layout flow
- if(this.element.getStyle('display')=='none') { this.cancel(); return; }
- // Disable background image during the effect
- this.oldStyle = {
- backgroundImage: this.element.getStyle('background-image') };
- this.element.setStyle({backgroundImage: 'none'});
- if(!this.options.endcolor)
- this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
- if(!this.options.restorecolor)
- this.options.restorecolor = this.element.getStyle('background-color');
- // init color calculations
- this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
- this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
- },
- update: function(position) {
- this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
- return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
- },
- finish: function() {
- this.element.setStyle(Object.extend(this.oldStyle, {
- backgroundColor: this.options.restorecolor
- }));
- }
-});
-
-Effect.ScrollTo = Class.create();
-Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
- initialize: function(element) {
- this.element = $(element);
- this.start(arguments[1] || {});
- },
- setup: function() {
- Position.prepare();
- var offsets = Position.cumulativeOffset(this.element);
- if(this.options.offset) offsets[1] += this.options.offset;
- var max = window.innerHeight ?
- window.height - window.innerHeight :
- document.body.scrollHeight -
- (document.documentElement.clientHeight ?
- document.documentElement.clientHeight : document.body.clientHeight);
- this.scrollStart = Position.deltaY;
- this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
- },
- update: function(position) {
- Position.prepare();
- window.scrollTo(Position.deltaX,
- this.scrollStart + (position*this.delta));
- }
-});
-
-/* ------------- combination effects ------------- */
-
-Effect.Fade = function(element) {
- element = $(element);
- var oldOpacity = element.getInlineOpacity();
- var options = Object.extend({
- from: element.getOpacity() || 1.0,
- to: 0.0,
- afterFinishInternal: function(effect) {
- if(effect.options.to!=0) return;
- effect.element.hide().setStyle({opacity: oldOpacity});
- }}, arguments[1] || {});
- return new Effect.Opacity(element,options);
-}
-
-Effect.Appear = function(element) {
- element = $(element);
- var options = Object.extend({
- from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
- to: 1.0,
- // force Safari to render floated elements properly
- afterFinishInternal: function(effect) {
- effect.element.forceRerendering();
- },
- beforeSetup: function(effect) {
- effect.element.setOpacity(effect.options.from).show();
- }}, arguments[1] || {});
- return new Effect.Opacity(element,options);
-}
-
-Effect.Puff = function(element) {
- element = $(element);
- var oldStyle = {
- opacity: element.getInlineOpacity(),
- position: element.getStyle('position'),
- top: element.style.top,
- left: element.style.left,
- width: element.style.width,
- height: element.style.height
- };
- return new Effect.Parallel(
- [ new Effect.Scale(element, 200,
- { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
- new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
- Object.extend({ duration: 1.0,
- beforeSetupInternal: function(effect) {
- Position.absolutize(effect.effects[0].element)
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().setStyle(oldStyle); }
- }, arguments[1] || {})
- );
-}
-
-Effect.BlindUp = function(element) {
- element = $(element);
- element.makeClipping();
- return new Effect.Scale(element, 0,
- Object.extend({ scaleContent: false,
- scaleX: false,
- restoreAfterFinish: true,
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping();
- }
- }, arguments[1] || {})
- );
-}
-
-Effect.BlindDown = function(element) {
- element = $(element);
- var elementDimensions = element.getDimensions();
- return new Effect.Scale(element, 100, Object.extend({
- scaleContent: false,
- scaleX: false,
- scaleFrom: 0,
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
- restoreAfterFinish: true,
- afterSetup: function(effect) {
- effect.element.makeClipping().setStyle({height: '0px'}).show();
- },
- afterFinishInternal: function(effect) {
- effect.element.undoClipping();
- }
- }, arguments[1] || {}));
-}
-
-Effect.SwitchOff = function(element) {
- element = $(element);
- var oldOpacity = element.getInlineOpacity();
- return new Effect.Appear(element, Object.extend({
- duration: 0.4,
- from: 0,
- transition: Effect.Transitions.flicker,
- afterFinishInternal: function(effect) {
- new Effect.Scale(effect.element, 1, {
- duration: 0.3, scaleFromCenter: true,
- scaleX: false, scaleContent: false, restoreAfterFinish: true,
- beforeSetup: function(effect) {
- effect.element.makePositioned().makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
- }
- })
- }
- }, arguments[1] || {}));
-}
-
-Effect.DropOut = function(element) {
- element = $(element);
- var oldStyle = {
- top: element.getStyle('top'),
- left: element.getStyle('left'),
- opacity: element.getInlineOpacity() };
- return new Effect.Parallel(
- [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
- new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
- Object.extend(
- { duration: 0.5,
- beforeSetup: function(effect) {
- effect.effects[0].element.makePositioned();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
- }
- }, arguments[1] || {}));
-}
-
-Effect.Shake = function(element) {
- element = $(element);
- var oldStyle = {
- top: element.getStyle('top'),
- left: element.getStyle('left') };
- return new Effect.Move(element,
- { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
- effect.element.undoPositioned().setStyle(oldStyle);
- }}) }}) }}) }}) }}) }});
-}
-
-Effect.SlideDown = function(element) {
- element = $(element).cleanWhitespace();
- // SlideDown need to have the content of the element wrapped in a container element with fixed height!
- var oldInnerBottom = element.down().getStyle('bottom');
- var elementDimensions = element.getDimensions();
- return new Effect.Scale(element, 100, Object.extend({
- scaleContent: false,
- scaleX: false,
- scaleFrom: window.opera ? 0 : 1,
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
- restoreAfterFinish: true,
- afterSetup: function(effect) {
- effect.element.makePositioned();
- effect.element.down().makePositioned();
- if(window.opera) effect.element.setStyle({top: ''});
- effect.element.makeClipping().setStyle({height: '0px'}).show();
- },
- afterUpdateInternal: function(effect) {
- effect.element.down().setStyle({bottom:
- (effect.dims[0] - effect.element.clientHeight) + 'px' });
- },
- afterFinishInternal: function(effect) {
- effect.element.undoClipping().undoPositioned();
- effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
- }, arguments[1] || {})
- );
-}
-
-Effect.SlideUp = function(element) {
- element = $(element).cleanWhitespace();
- var oldInnerBottom = element.down().getStyle('bottom');
- return new Effect.Scale(element, window.opera ? 0 : 1,
- Object.extend({ scaleContent: false,
- scaleX: false,
- scaleMode: 'box',
- scaleFrom: 100,
- restoreAfterFinish: true,
- beforeStartInternal: function(effect) {
- effect.element.makePositioned();
- effect.element.down().makePositioned();
- if(window.opera) effect.element.setStyle({top: ''});
- effect.element.makeClipping().show();
- },
- afterUpdateInternal: function(effect) {
- effect.element.down().setStyle({bottom:
- (effect.dims[0] - effect.element.clientHeight) + 'px' });
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
- effect.element.down().undoPositioned();
- }
- }, arguments[1] || {})
- );
-}
-
-// Bug in opera makes the TD containing this element expand for a instance after finish
-Effect.Squish = function(element) {
- return new Effect.Scale(element, window.opera ? 1 : 0, {
- restoreAfterFinish: true,
- beforeSetup: function(effect) {
- effect.element.makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping();
- }
- });
-}
-
-Effect.Grow = function(element) {
- element = $(element);
- var options = Object.extend({
- direction: 'center',
- moveTransition: Effect.Transitions.sinoidal,
- scaleTransition: Effect.Transitions.sinoidal,
- opacityTransition: Effect.Transitions.full
- }, arguments[1] || {});
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- height: element.style.height,
- width: element.style.width,
- opacity: element.getInlineOpacity() };
-
- var dims = element.getDimensions();
- var initialMoveX, initialMoveY;
- var moveX, moveY;
-
- switch (options.direction) {
- case 'top-left':
- initialMoveX = initialMoveY = moveX = moveY = 0;
- break;
- case 'top-right':
- initialMoveX = dims.width;
- initialMoveY = moveY = 0;
- moveX = -dims.width;
- break;
- case 'bottom-left':
- initialMoveX = moveX = 0;
- initialMoveY = dims.height;
- moveY = -dims.height;
- break;
- case 'bottom-right':
- initialMoveX = dims.width;
- initialMoveY = dims.height;
- moveX = -dims.width;
- moveY = -dims.height;
- break;
- case 'center':
- initialMoveX = dims.width / 2;
- initialMoveY = dims.height / 2;
- moveX = -dims.width / 2;
- moveY = -dims.height / 2;
- break;
- }
-
- return new Effect.Move(element, {
- x: initialMoveX,
- y: initialMoveY,
- duration: 0.01,
- beforeSetup: function(effect) {
- effect.element.hide().makeClipping().makePositioned();
- },
- afterFinishInternal: function(effect) {
- new Effect.Parallel(
- [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
- new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
- new Effect.Scale(effect.element, 100, {
- scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
- sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
- ], Object.extend({
- beforeSetup: function(effect) {
- effect.effects[0].element.setStyle({height: '0px'}).show();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
- }
- }, options)
- )
- }
- });
-}
-
-Effect.Shrink = function(element) {
- element = $(element);
- var options = Object.extend({
- direction: 'center',
- moveTransition: Effect.Transitions.sinoidal,
- scaleTransition: Effect.Transitions.sinoidal,
- opacityTransition: Effect.Transitions.none
- }, arguments[1] || {});
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- height: element.style.height,
- width: element.style.width,
- opacity: element.getInlineOpacity() };
-
- var dims = element.getDimensions();
- var moveX, moveY;
-
- switch (options.direction) {
- case 'top-left':
- moveX = moveY = 0;
- break;
- case 'top-right':
- moveX = dims.width;
- moveY = 0;
- break;
- case 'bottom-left':
- moveX = 0;
- moveY = dims.height;
- break;
- case 'bottom-right':
- moveX = dims.width;
- moveY = dims.height;
- break;
- case 'center':
- moveX = dims.width / 2;
- moveY = dims.height / 2;
- break;
- }
-
- return new Effect.Parallel(
- [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
- new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
- new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
- ], Object.extend({
- beforeStartInternal: function(effect) {
- effect.effects[0].element.makePositioned().makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
- }, options)
- );
-}
-
-Effect.Pulsate = function(element) {
- element = $(element);
- var options = arguments[1] || {};
- var oldOpacity = element.getInlineOpacity();
- var transition = options.transition || Effect.Transitions.sinoidal;
- var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
- reverser.bind(transition);
- return new Effect.Opacity(element,
- Object.extend(Object.extend({ duration: 2.0, from: 0,
- afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
- }, options), {transition: reverser}));
-}
-
-Effect.Fold = function(element) {
- element = $(element);
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- width: element.style.width,
- height: element.style.height };
- element.makeClipping();
- return new Effect.Scale(element, 5, Object.extend({
- scaleContent: false,
- scaleX: false,
- afterFinishInternal: function(effect) {
- new Effect.Scale(element, 1, {
- scaleContent: false,
- scaleY: false,
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().setStyle(oldStyle);
- } });
- }}, arguments[1] || {}));
-};
-
-Effect.Morph = Class.create();
-Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), {
- initialize: function(element) {
- this.element = $(element);
- if(!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- style: ''
- }, arguments[1] || {});
- this.start(options);
- },
- setup: function(){
- function parseColor(color){
- if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
- color = color.parseColor();
- return $R(0,2).map(function(i){
- return parseInt( color.slice(i*2+1,i*2+3), 16 )
- });
- }
- this.transforms = this.options.style.parseStyle().map(function(property){
- var originalValue = this.element.getStyle(property[0]);
- return $H({
- style: property[0],
- originalValue: property[1].unit=='color' ?
- parseColor(originalValue) : parseFloat(originalValue || 0),
- targetValue: property[1].unit=='color' ?
- parseColor(property[1].value) : property[1].value,
- unit: property[1].unit
- });
- }.bind(this)).reject(function(transform){
- return (
- (transform.originalValue == transform.targetValue) ||
- (
- transform.unit != 'color' &&
- (isNaN(transform.originalValue) || isNaN(transform.targetValue))
- )
- )
- });
- },
- update: function(position) {
- var style = $H(), value = null;
- this.transforms.each(function(transform){
- value = transform.unit=='color' ?
- $R(0,2).inject('#',function(m,v,i){
- return m+(Math.round(transform.originalValue[i]+
- (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) :
- transform.originalValue + Math.round(
- ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit;
- style[transform.style] = value;
- });
- this.element.setStyle(style);
- }
-});
-
-Effect.Transform = Class.create();
-Object.extend(Effect.Transform.prototype, {
- initialize: function(tracks){
- this.tracks = [];
- this.options = arguments[1] || {};
- this.addTracks(tracks);
- },
- addTracks: function(tracks){
- tracks.each(function(track){
- var data = $H(track).values().first();
- this.tracks.push($H({
- ids: $H(track).keys().first(),
- effect: Effect.Morph,
- options: { style: data }
- }));
- }.bind(this));
- return this;
- },
- play: function(){
- return new Effect.Parallel(
- this.tracks.map(function(track){
- var elements = [$(track.ids) || $$(track.ids)].flatten();
- return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) });
- }).flatten(),
- this.options
- );
- }
-});
-
-Element.CSS_PROPERTIES = ['azimuth', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
- 'backgroundPosition', 'backgroundRepeat', 'borderBottomColor', 'borderBottomStyle',
- 'borderBottomWidth', 'borderCollapse', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth',
- 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderSpacing', 'borderTopColor',
- 'borderTopStyle', 'borderTopWidth', 'bottom', 'captionSide', 'clear', 'clip', 'color', 'content',
- 'counterIncrement', 'counterReset', 'cssFloat', 'cueAfter', 'cueBefore', 'cursor', 'direction',
- 'display', 'elevation', 'emptyCells', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
- 'fontStyle', 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight',
- 'listStyleImage', 'listStylePosition', 'listStyleType', 'marginBottom', 'marginLeft', 'marginRight',
- 'marginTop', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'opacity',
- 'orphans', 'outlineColor', 'outlineOffset', 'outlineStyle', 'outlineWidth', 'overflowX', 'overflowY',
- 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'page', 'pageBreakAfter', 'pageBreakBefore',
- 'pageBreakInside', 'pauseAfter', 'pauseBefore', 'pitch', 'pitchRange', 'position', 'quotes',
- 'richness', 'right', 'size', 'speakHeader', 'speakNumeral', 'speakPunctuation', 'speechRate', 'stress',
- 'tableLayout', 'textAlign', 'textDecoration', 'textIndent', 'textShadow', 'textTransform', 'top',
- 'unicodeBidi', 'verticalAlign', 'visibility', 'voiceFamily', 'volume', 'whiteSpace', 'widows',
- 'width', 'wordSpacing', 'zIndex'];
-
-Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
-
-String.prototype.parseStyle = function(){
- var element = Element.extend(document.createElement('div'));
- element.innerHTML = '
';
- var style = element.down().style, styleRules = $H();
-
- Element.CSS_PROPERTIES.each(function(property){
- if(style[property]) styleRules[property] = style[property];
- });
-
- var result = $H();
-
- styleRules.each(function(pair){
- var property = pair[0], value = pair[1], unit = null;
-
- if(value.parseColor('#zzzzzz') != '#zzzzzz') {
- value = value.parseColor();
- unit = 'color';
- } else if(Element.CSS_LENGTH.test(value))
- var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/),
- value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null;
-
- result[property.underscore().dasherize()] = $H({ value:value, unit:unit });
- }.bind(this));
-
- return result;
-};
-
-Element.morph = function(element, style) {
- new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));
- return element;
-};
-
-['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom',
- 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each(
- function(f) { Element.Methods[f] = Element[f]; }
-);
-
-Element.Methods.visualEffect = function(element, effect, options) {
- s = effect.gsub(/_/, '-').camelize();
- effect_class = s.charAt(0).toUpperCase() + s.substring(1);
- new Effect[effect_class](element, options);
- return $(element);
-};
-
-Element.addMethods();
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js b/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js
deleted file mode 100644
index 030ea1c5..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js
+++ /dev/null
@@ -1,2426 +0,0 @@
-/* Prototype JavaScript framework, version 1.5.0_rc2
- * (c) 2005-2007 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://prototype.conio.net/
- *
-/*--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.5.0_rc2',
- BrowserFeatures: {
- XPath: !!document.evaluate
- },
-
- ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)',
- emptyFunction: function() {},
- K: function(x) { return x }
-}
-
-var Class = {
- create: function() {
- return function() {
- this.initialize.apply(this, arguments);
- }
- }
-}
-
-var Abstract = new Object();
-
-Object.extend = function(destination, source) {
- for (var property in source) {
- destination[property] = source[property];
- }
- return destination;
-}
-
-Object.extend(Object, {
- inspect: function(object) {
- try {
- if (object === undefined) return 'undefined';
- if (object === null) return 'null';
- return object.inspect ? object.inspect() : object.toString();
- } catch (e) {
- if (e instanceof RangeError) return '...';
- throw e;
- }
- },
-
- keys: function(object) {
- var keys = [];
- for (var property in object)
- keys.push(property);
- return keys;
- },
-
- values: function(object) {
- var values = [];
- for (var property in object)
- values.push(object[property]);
- return values;
- },
-
- clone: function(object) {
- return Object.extend({}, object);
- }
-});
-
-Function.prototype.bind = function() {
- var __method = this, args = $A(arguments), object = args.shift();
- return function() {
- return __method.apply(object, args.concat($A(arguments)));
- }
-}
-
-Function.prototype.bindAsEventListener = function(object) {
- var __method = this, args = $A(arguments), object = args.shift();
- return function(event) {
- return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
- }
-}
-
-Object.extend(Number.prototype, {
- toColorPart: function() {
- var digits = this.toString(16);
- if (this < 16) return '0' + digits;
- return digits;
- },
-
- succ: function() {
- return this + 1;
- },
-
- times: function(iterator) {
- $R(0, this, true).each(iterator);
- return this;
- }
-});
-
-var Try = {
- these: function() {
- var returnValue;
-
- for (var i = 0, length = arguments.length; i < length; i++) {
- var lambda = arguments[i];
- try {
- returnValue = lambda();
- break;
- } catch (e) {}
- }
-
- return returnValue;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create();
-PeriodicalExecuter.prototype = {
- initialize: function(callback, frequency) {
- this.callback = callback;
- this.frequency = frequency;
- this.currentlyExecuting = false;
-
- this.registerCallback();
- },
-
- registerCallback: function() {
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- stop: function() {
- if (!this.timer) return;
- clearInterval(this.timer);
- this.timer = null;
- },
-
- onTimerEvent: function() {
- if (!this.currentlyExecuting) {
- try {
- this.currentlyExecuting = true;
- this.callback(this);
- } finally {
- this.currentlyExecuting = false;
- }
- }
- }
-}
-String.interpret = function(value){
- return value == null ? '' : String(value);
-}
-
-Object.extend(String.prototype, {
- gsub: function(pattern, replacement) {
- var result = '', source = this, match;
- replacement = arguments.callee.prepareReplacement(replacement);
-
- while (source.length > 0) {
- if (match = source.match(pattern)) {
- result += source.slice(0, match.index);
- result += String.interpret(replacement(match));
- source = source.slice(match.index + match[0].length);
- } else {
- result += source, source = '';
- }
- }
- return result;
- },
-
- sub: function(pattern, replacement, count) {
- replacement = this.gsub.prepareReplacement(replacement);
- count = count === undefined ? 1 : count;
-
- return this.gsub(pattern, function(match) {
- if (--count < 0) return match[0];
- return replacement(match);
- });
- },
-
- scan: function(pattern, iterator) {
- this.gsub(pattern, iterator);
- return this;
- },
-
- truncate: function(length, truncation) {
- length = length || 30;
- truncation = truncation === undefined ? '...' : truncation;
- return this.length > length ?
- this.slice(0, length - truncation.length) + truncation : this;
- },
-
- strip: function() {
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
- },
-
- stripTags: function() {
- return this.replace(/<\/?[^>]+>/gi, '');
- },
-
- stripScripts: function() {
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
- },
-
- extractScripts: function() {
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
- return (this.match(matchAll) || []).map(function(scriptTag) {
- return (scriptTag.match(matchOne) || ['', ''])[1];
- });
- },
-
- evalScripts: function() {
- return this.extractScripts().map(function(script) { return eval(script) });
- },
-
- escapeHTML: function() {
- var div = document.createElement('div');
- var text = document.createTextNode(this);
- div.appendChild(text);
- return div.innerHTML;
- },
-
- unescapeHTML: function() {
- var div = document.createElement('div');
- div.innerHTML = this.stripTags();
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
- $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
- div.childNodes[0].nodeValue) : '';
- },
-
- toQueryParams: function(separator) {
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
- if (!match) return {};
-
- return match[1].split(separator || '&').inject({}, function(hash, pair) {
- if ((pair = pair.split('='))[0]) {
- var name = decodeURIComponent(pair[0]);
- var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
-
- if (hash[name] !== undefined) {
- if (hash[name].constructor != Array)
- hash[name] = [hash[name]];
- if (value) hash[name].push(value);
- }
- else hash[name] = value;
- }
- return hash;
- });
- },
-
- toArray: function() {
- return this.split('');
- },
-
- succ: function() {
- return this.slice(0, this.length - 1) +
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
- },
-
- camelize: function() {
- var parts = this.split('-'), len = parts.length;
- if (len == 1) return parts[0];
-
- var camelized = this.charAt(0) == '-'
- ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
- : parts[0];
-
- for (var i = 1; i < len; i++)
- camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
- return camelized;
- },
-
- capitalize: function(){
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
- },
-
- underscore: function() {
- return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
- },
-
- dasherize: function() {
- return this.gsub(/_/,'-');
- },
-
- inspect: function(useDoubleQuotes) {
- var escapedString = this.replace(/\\/g, '\\\\');
- if (useDoubleQuotes)
- return '"' + escapedString.replace(/"/g, '\\"') + '"';
- else
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
- }
-});
-
-String.prototype.gsub.prepareReplacement = function(replacement) {
- if (typeof replacement == 'function') return replacement;
- var template = new Template(replacement);
- return function(match) { return template.evaluate(match) };
-}
-
-String.prototype.parseQuery = String.prototype.toQueryParams;
-
-var Template = Class.create();
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-Template.prototype = {
- initialize: function(template, pattern) {
- this.template = template.toString();
- this.pattern = pattern || Template.Pattern;
- },
-
- evaluate: function(object) {
- return this.template.gsub(this.pattern, function(match) {
- var before = match[1];
- if (before == '\\') return match[2];
- return before + String.interpret(object[match[3]]);
- });
- }
-}
-
-var $break = new Object();
-var $continue = new Object();
-
-var Enumerable = {
- each: function(iterator) {
- var index = 0;
- try {
- this._each(function(value) {
- try {
- iterator(value, index++);
- } catch (e) {
- if (e != $continue) throw e;
- }
- });
- } catch (e) {
- if (e != $break) throw e;
- }
- return this;
- },
-
- eachSlice: function(number, iterator) {
- var index = -number, slices = [], array = this.toArray();
- while ((index += number) < array.length)
- slices.push(array.slice(index, index+number));
- return slices.map(iterator);
- },
-
- all: function(iterator) {
- var result = true;
- this.each(function(value, index) {
- result = result && !!(iterator || Prototype.K)(value, index);
- if (!result) throw $break;
- });
- return result;
- },
-
- any: function(iterator) {
- var result = false;
- this.each(function(value, index) {
- if (result = !!(iterator || Prototype.K)(value, index))
- throw $break;
- });
- return result;
- },
-
- collect: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- results.push((iterator || Prototype.K)(value, index));
- });
- return results;
- },
-
- detect: function(iterator) {
- var result;
- this.each(function(value, index) {
- if (iterator(value, index)) {
- result = value;
- throw $break;
- }
- });
- return result;
- },
-
- findAll: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- if (iterator(value, index))
- results.push(value);
- });
- return results;
- },
-
- grep: function(pattern, iterator) {
- var results = [];
- this.each(function(value, index) {
- var stringValue = value.toString();
- if (stringValue.match(pattern))
- results.push((iterator || Prototype.K)(value, index));
- })
- return results;
- },
-
- include: function(object) {
- var found = false;
- this.each(function(value) {
- if (value == object) {
- found = true;
- throw $break;
- }
- });
- return found;
- },
-
- inGroupsOf: function(number, fillWith) {
- fillWith = fillWith === undefined ? null : fillWith;
- return this.eachSlice(number, function(slice) {
- while(slice.length < number) slice.push(fillWith);
- return slice;
- });
- },
-
- inject: function(memo, iterator) {
- this.each(function(value, index) {
- memo = iterator(memo, value, index);
- });
- return memo;
- },
-
- invoke: function(method) {
- var args = $A(arguments).slice(1);
- return this.map(function(value) {
- return value[method].apply(value, args);
- });
- },
-
- max: function(iterator) {
- var result;
- this.each(function(value, index) {
- value = (iterator || Prototype.K)(value, index);
- if (result == undefined || value >= result)
- result = value;
- });
- return result;
- },
-
- min: function(iterator) {
- var result;
- this.each(function(value, index) {
- value = (iterator || Prototype.K)(value, index);
- if (result == undefined || value < result)
- result = value;
- });
- return result;
- },
-
- partition: function(iterator) {
- var trues = [], falses = [];
- this.each(function(value, index) {
- ((iterator || Prototype.K)(value, index) ?
- trues : falses).push(value);
- });
- return [trues, falses];
- },
-
- pluck: function(property) {
- var results = [];
- this.each(function(value, index) {
- results.push(value[property]);
- });
- return results;
- },
-
- reject: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- if (!iterator(value, index))
- results.push(value);
- });
- return results;
- },
-
- sortBy: function(iterator) {
- return this.map(function(value, index) {
- return {value: value, criteria: iterator(value, index)};
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }).pluck('value');
- },
-
- toArray: function() {
- return this.map();
- },
-
- zip: function() {
- var iterator = Prototype.K, args = $A(arguments);
- if (typeof args.last() == 'function')
- iterator = args.pop();
-
- var collections = [this].concat(args).map($A);
- return this.map(function(value, index) {
- return iterator(collections.pluck(index));
- });
- },
-
- size: function() {
- return this.toArray().length;
- },
-
- inspect: function() {
- return '#';
- }
-}
-
-Object.extend(Enumerable, {
- map: Enumerable.collect,
- find: Enumerable.detect,
- select: Enumerable.findAll,
- member: Enumerable.include,
- entries: Enumerable.toArray
-});
-var $A = Array.from = function(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) {
- return iterable.toArray();
- } else {
- var results = [];
- for (var i = 0, length = iterable.length; i < length; i++)
- results.push(iterable[i]);
- return results;
- }
-}
-
-Object.extend(Array.prototype, Enumerable);
-
-if (!Array.prototype._reverse)
- Array.prototype._reverse = Array.prototype.reverse;
-
-Object.extend(Array.prototype, {
- _each: function(iterator) {
- for (var i = 0, length = this.length; i < length; i++)
- iterator(this[i]);
- },
-
- clear: function() {
- this.length = 0;
- return this;
- },
-
- first: function() {
- return this[0];
- },
-
- last: function() {
- return this[this.length - 1];
- },
-
- compact: function() {
- return this.select(function(value) {
- return value != null;
- });
- },
-
- flatten: function() {
- return this.inject([], function(array, value) {
- return array.concat(value && value.constructor == Array ?
- value.flatten() : [value]);
- });
- },
-
- without: function() {
- var values = $A(arguments);
- return this.select(function(value) {
- return !values.include(value);
- });
- },
-
- indexOf: function(object) {
- for (var i = 0, length = this.length; i < length; i++)
- if (this[i] == object) return i;
- return -1;
- },
-
- reverse: function(inline) {
- return (inline !== false ? this : this.toArray())._reverse();
- },
-
- reduce: function() {
- return this.length > 1 ? this : this[0];
- },
-
- uniq: function() {
- return this.inject([], function(array, value) {
- return array.include(value) ? array : array.concat([value]);
- });
- },
-
- clone: function() {
- return [].concat(this);
- },
-
- size: function() {
- return this.length;
- },
-
- inspect: function() {
- return '[' + this.map(Object.inspect).join(', ') + ']';
- }
-});
-
-Array.prototype.toArray = Array.prototype.clone;
-
-function $w(string){
- string = string.strip();
- return string ? string.split(/\s+/) : [];
-}
-
-if(window.opera){
- Array.prototype.concat = function(){
- var array = [];
- for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
- for(var i = 0, length = arguments.length; i < length; i++) {
- if(arguments[i].constructor == Array) {
- for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
- array.push(arguments[i][j]);
- } else {
- array.push(arguments[i]);
- }
- }
- return array;
- }
-}
-var Hash = {
- _each: function(iterator) {
- for (var key in this) {
- var value = this[key];
- if (typeof value == 'function') continue;
-
- var pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- },
-
- keys: function() {
- return this.pluck('key');
- },
-
- values: function() {
- return this.pluck('value');
- },
-
- merge: function(hash) {
- return $H(hash).inject(this, function(mergedHash, pair) {
- mergedHash[pair.key] = pair.value;
- return mergedHash;
- });
- },
-
- toQueryString: function() {
- return this.map(function(pair) {
- if (!pair.key) return null;
-
- if (pair.value && pair.value.constructor == Array) {
- pair.value = pair.value.compact();
-
- if (pair.value.length < 2) {
- pair.value = pair.value.reduce();
- } else {
- var key = encodeURIComponent(pair.key);
- return pair.value.map(function(value) {
- return key + '=' + encodeURIComponent(value);
- }).join('&');
- }
- }
-
- if (pair.value == undefined) pair[1] = '';
- return pair.map(encodeURIComponent).join('=');
- }).join('&');
- },
-
- inspect: function() {
- return '#';
- }
-}
-
-function $H(object) {
- var hash = Object.extend({}, object || {});
- Object.extend(hash, Enumerable);
- Object.extend(hash, Hash);
- return hash;
-}
-ObjectRange = Class.create();
-Object.extend(ObjectRange.prototype, Enumerable);
-Object.extend(ObjectRange.prototype, {
- initialize: function(start, end, exclusive) {
- this.start = start;
- this.end = end;
- this.exclusive = exclusive;
- },
-
- _each: function(iterator) {
- var value = this.start;
- while (this.include(value)) {
- iterator(value);
- value = value.succ();
- }
- },
-
- include: function(value) {
- if (value < this.start)
- return false;
- if (this.exclusive)
- return value < this.end;
- return value <= this.end;
- }
-});
-
-var $R = function(start, end, exclusive) {
- return new ObjectRange(start, end, exclusive);
-}
-
-var Ajax = {
- getTransport: function() {
- return Try.these(
- function() {return new XMLHttpRequest()},
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
- ) || false;
- },
-
- activeRequestCount: 0
-}
-
-Ajax.Responders = {
- responders: [],
-
- _each: function(iterator) {
- this.responders._each(iterator);
- },
-
- register: function(responder) {
- if (!this.include(responder))
- this.responders.push(responder);
- },
-
- unregister: function(responder) {
- this.responders = this.responders.without(responder);
- },
-
- dispatch: function(callback, request, transport, json) {
- this.each(function(responder) {
- if (typeof responder[callback] == 'function') {
- try {
- responder[callback].apply(responder, [request, transport, json]);
- } catch (e) {}
- }
- });
- }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
- onCreate: function() {
- Ajax.activeRequestCount++;
- },
- onComplete: function() {
- Ajax.activeRequestCount--;
- }
-});
-
-Ajax.Base = function() {};
-Ajax.Base.prototype = {
- setOptions: function(options) {
- this.options = {
- method: 'post',
- asynchronous: true,
- contentType: 'application/x-www-form-urlencoded',
- encoding: 'UTF-8',
- parameters: ''
- }
- Object.extend(this.options, options || {});
-
- this.options.method = this.options.method.toLowerCase();
- this.options.parameters = $H(typeof this.options.parameters == 'string' ?
- this.options.parameters.toQueryParams() : this.options.parameters);
- }
-}
-
-Ajax.Request = Class.create();
-Ajax.Request.Events =
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
- _complete: false,
-
- initialize: function(url, options) {
- this.transport = Ajax.getTransport();
- this.setOptions(options);
- this.request(url);
- },
-
- request: function(url) {
- var params = this.options.parameters;
- if (params.any()) params['_'] = '';
-
- if (!['get', 'post'].include(this.options.method)) {
- // simulate other verbs over post
- params['_method'] = this.options.method;
- this.options.method = 'post';
- }
-
- this.url = url;
-
- // when GET, append parameters to URL
- if (this.options.method == 'get' && params.any())
- this.url += (this.url.indexOf('?') >= 0 ? '&' : '?') +
- params.toQueryString();
-
- try {
- Ajax.Responders.dispatch('onCreate', this, this.transport);
-
- this.transport.open(this.options.method.toUpperCase(), this.url,
- this.options.asynchronous);
-
- if (this.options.asynchronous)
- setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
-
- this.transport.onreadystatechange = this.onStateChange.bind(this);
- this.setRequestHeaders();
-
- var body = this.options.method == 'post' ?
- (this.options.postBody || params.toQueryString()) : null;
-
- this.transport.send(body);
-
- /* Force Firefox to handle ready state 4 for synchronous requests */
- if (!this.options.asynchronous && this.transport.overrideMimeType)
- this.onStateChange();
-
- }
- catch (e) {
- this.dispatchException(e);
- }
- },
-
- onStateChange: function() {
- var readyState = this.transport.readyState;
- if (readyState > 1 && !((readyState == 4) && this._complete))
- this.respondToReadyState(this.transport.readyState);
- },
-
- setRequestHeaders: function() {
- var headers = {
- 'X-Requested-With': 'XMLHttpRequest',
- 'X-Prototype-Version': Prototype.Version,
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- };
-
- if (this.options.method == 'post') {
- headers['Content-type'] = this.options.contentType +
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
- /* Force "Connection: close" for older Mozilla browsers to work
- * around a bug where XMLHttpRequest sends an incorrect
- * Content-length header. See Mozilla Bugzilla #246651.
- */
- if (this.transport.overrideMimeType &&
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
- headers['Connection'] = 'close';
- }
-
- // user-defined headers
- if (typeof this.options.requestHeaders == 'object') {
- var extras = this.options.requestHeaders;
-
- if (typeof extras.push == 'function')
- for (var i = 0, length = extras.length; i < length; i += 2)
- headers[extras[i]] = extras[i+1];
- else
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
- }
-
- for (var name in headers)
- this.transport.setRequestHeader(name, headers[name]);
- },
-
- success: function() {
- return !this.transport.status
- || (this.transport.status >= 200 && this.transport.status < 300);
- },
-
- respondToReadyState: function(readyState) {
- var state = Ajax.Request.Events[readyState];
- var transport = this.transport, json = this.evalJSON();
-
- if (state == 'Complete') {
- try {
- this._complete = true;
- (this.options['on' + this.transport.status]
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
- || Prototype.emptyFunction)(transport, json);
- } catch (e) {
- this.dispatchException(e);
- }
-
- if ((this.getHeader('Content-type') || 'text/javascript').strip().
- match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
- this.evalResponse();
- }
-
- try {
- (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
- Ajax.Responders.dispatch('on' + state, this, transport, json);
- } catch (e) {
- this.dispatchException(e);
- }
-
- if (state == 'Complete') {
- // avoid memory leak in MSIE: clean up
- this.transport.onreadystatechange = Prototype.emptyFunction;
- }
- },
-
- getHeader: function(name) {
- try {
- return this.transport.getResponseHeader(name);
- } catch (e) { return null }
- },
-
- evalJSON: function() {
- try {
- var json = this.getHeader('X-JSON');
- return json ? eval('(' + json + ')') : null;
- } catch (e) { return null }
- },
-
- evalResponse: function() {
- try {
- return eval(this.transport.responseText);
- } catch (e) {
- this.dispatchException(e);
- }
- },
-
- dispatchException: function(exception) {
- (this.options.onException || Prototype.emptyFunction)(this, exception);
- Ajax.Responders.dispatch('onException', this, exception);
- }
-});
-
-Ajax.Updater = Class.create();
-
-Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
- initialize: function(container, url, options) {
- this.container = {
- success: (container.success || container),
- failure: (container.failure || (container.success ? null : container))
- }
-
- this.transport = Ajax.getTransport();
- this.setOptions(options);
-
- var onComplete = this.options.onComplete || Prototype.emptyFunction;
- this.options.onComplete = (function(transport, param) {
- this.updateContent();
- onComplete(transport, param);
- }).bind(this);
-
- this.request(url);
- },
-
- updateContent: function() {
- var receiver = this.container[this.success() ? 'success' : 'failure'];
- var response = this.transport.responseText;
-
- if (!this.options.evalScripts) response = response.stripScripts();
-
- if (receiver = $(receiver)) {
- if (this.options.insertion)
- new this.options.insertion(receiver, response);
- else
- receiver.update(response);
- }
-
- if (this.success()) {
- if (this.onComplete)
- setTimeout(this.onComplete.bind(this), 10);
- }
- }
-});
-
-Ajax.PeriodicalUpdater = Class.create();
-Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
- initialize: function(container, url, options) {
- this.setOptions(options);
- this.onComplete = this.options.onComplete;
-
- this.frequency = (this.options.frequency || 2);
- this.decay = (this.options.decay || 1);
-
- this.updater = {};
- this.container = container;
- this.url = url;
-
- this.start();
- },
-
- start: function() {
- this.options.onComplete = this.updateComplete.bind(this);
- this.onTimerEvent();
- },
-
- stop: function() {
- this.updater.options.onComplete = undefined;
- clearTimeout(this.timer);
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
- },
-
- updateComplete: function(request) {
- if (this.options.decay) {
- this.decay = (request.responseText == this.lastText ?
- this.decay * this.options.decay : 1);
-
- this.lastText = request.responseText;
- }
- this.timer = setTimeout(this.onTimerEvent.bind(this),
- this.decay * this.frequency * 1000);
- },
-
- onTimerEvent: function() {
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
- }
-});
-function $(element) {
- if (arguments.length > 1) {
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
- elements.push($(arguments[i]));
- return elements;
- }
- if (typeof element == 'string')
- element = document.getElementById(element);
- return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
- document._getElementsByXPath = function(expression, parentElement) {
- var results = [];
- var query = document.evaluate(expression, $(parentElement) || document,
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var i = 0, length = query.snapshotLength; i < length; i++)
- results.push(query.snapshotItem(i));
- return results;
- }
-}
-
-document.getElementsByClassName = function(className, parentElement) {
- if (Prototype.BrowserFeatures.XPath) {
- var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
- return document._getElementsByXPath(q, parentElement);
- } else {
- var children = ($(parentElement) || document.body).getElementsByTagName('*');
- var elements = [], child;
- for (var i = 0, length = children.length; i < length; i++) {
- child = children[i];
- if (Element.hasClassName(child, className))
- elements.push(Element.extend(child));
- }
- return elements;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Element)
- var Element = new Object();
-
-Element.extend = function(element) {
- if (!element || _nativeExtensions || element.nodeType == 3) return element;
-
- if (!element._extended && element.tagName && element != window) {
- var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
-
- if (element.tagName == 'FORM')
- Object.extend(methods, Form.Methods);
- if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
- Object.extend(methods, Form.Element.Methods);
-
- Object.extend(methods, Element.Methods.Simulated);
-
- for (var property in methods) {
- var value = methods[property];
- if (typeof value == 'function' && !(property in element))
- element[property] = cache.findOrStore(value);
- }
- }
-
- element._extended = true;
- return element;
-}
-
-Element.extend.cache = {
- findOrStore: function(value) {
- return this[value] = this[value] || function() {
- return value.apply(null, [this].concat($A(arguments)));
- }
- }
-}
-
-Element.Methods = {
- visible: function(element) {
- return $(element).style.display != 'none';
- },
-
- toggle: function(element) {
- element = $(element);
- Element[Element.visible(element) ? 'hide' : 'show'](element);
- return element;
- },
-
- hide: function(element) {
- $(element).style.display = 'none';
- return element;
- },
-
- show: function(element) {
- $(element).style.display = '';
- return element;
- },
-
- remove: function(element) {
- element = $(element);
- element.parentNode.removeChild(element);
- return element;
- },
-
- update: function(element, html) {
- html = typeof html == 'undefined' ? '' : html.toString();
- $(element).innerHTML = html.stripScripts();
- setTimeout(function() {html.evalScripts()}, 10);
- return element;
- },
-
- replace: function(element, html) {
- element = $(element);
- if (element.outerHTML) {
- element.outerHTML = html.stripScripts();
- } else {
- var range = element.ownerDocument.createRange();
- range.selectNodeContents(element);
- element.parentNode.replaceChild(
- range.createContextualFragment(html.stripScripts()), element);
- }
- setTimeout(function() {html.evalScripts()}, 10);
- return element;
- },
-
- inspect: function(element) {
- element = $(element);
- var result = '<' + element.tagName.toLowerCase();
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
- var property = pair.first(), attribute = pair.last();
- var value = (element[property] || '').toString();
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
- });
- return result + '>';
- },
-
- recursivelyCollect: function(element, property) {
- element = $(element);
- var elements = [];
- while (element = element[property])
- if (element.nodeType == 1)
- elements.push(Element.extend(element));
- return elements;
- },
-
- ancestors: function(element) {
- return $(element).recursivelyCollect('parentNode');
- },
-
- descendants: function(element) {
- return $A($(element).getElementsByTagName('*'));
- },
-
- immediateDescendants: function(element) {
- if (!(element = $(element).firstChild)) return [];
- while (element && element.nodeType != 1) element = element.nextSibling;
- if (element) return [element].concat($(element).nextSiblings());
- return [];
- },
-
- previousSiblings: function(element) {
- return $(element).recursivelyCollect('previousSibling');
- },
-
- nextSiblings: function(element) {
- return $(element).recursivelyCollect('nextSibling');
- },
-
- siblings: function(element) {
- element = $(element);
- return element.previousSiblings().reverse().concat(element.nextSiblings());
- },
-
- match: function(element, selector) {
- if (typeof selector == 'string')
- selector = new Selector(selector);
- return selector.match($(element));
- },
-
- up: function(element, expression, index) {
- return Selector.findElement($(element).ancestors(), expression, index);
- },
-
- down: function(element, expression, index) {
- return Selector.findElement($(element).descendants(), expression, index);
- },
-
- previous: function(element, expression, index) {
- return Selector.findElement($(element).previousSiblings(), expression, index);
- },
-
- next: function(element, expression, index) {
- return Selector.findElement($(element).nextSiblings(), expression, index);
- },
-
- getElementsBySelector: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element, args);
- },
-
- getElementsByClassName: function(element, className) {
- return document.getElementsByClassName(className, element);
- },
-
- readAttribute: function(element, name) {
- return $(element).getAttribute(name);
- },
-
- getHeight: function(element) {
- return $(element).offsetHeight;
- },
-
- classNames: function(element) {
- return new Element.ClassNames(element);
- },
-
- hasClassName: function(element, className) {
- if (!(element = $(element))) return;
- var elementClassName = element.className;
- if (elementClassName.length == 0) return false;
- if (elementClassName == className ||
- elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
- return true;
- return false;
- },
-
- addClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element).add(className);
- return element;
- },
-
- removeClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element).remove(className);
- return element;
- },
-
- toggleClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
- return element;
- },
-
- observe: function() {
- Event.observe.apply(Event, arguments);
- return $A(arguments).first();
- },
-
- stopObserving: function() {
- Event.stopObserving.apply(Event, arguments);
- return $A(arguments).first();
- },
-
- // removes whitespace-only text node children
- cleanWhitespace: function(element) {
- element = $(element);
- var node = element.firstChild;
- while (node) {
- var nextNode = node.nextSibling;
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
- element.removeChild(node);
- node = nextNode;
- }
- return element;
- },
-
- empty: function(element) {
- return $(element).innerHTML.match(/^\s*$/);
- },
-
- childOf: function(element, ancestor) {
- element = $(element), ancestor = $(ancestor);
- while (element = element.parentNode)
- if (element == ancestor) return true;
- return false;
- },
-
- scrollTo: function(element) {
- element = $(element);
- var pos = Position.cumulativeOffset(element);
- window.scrollTo(pos[0], pos[1]);
- return element;
- },
-
- getStyle: function(element, style) {
- element = $(element);
- var camelizedStyle = (style == 'float' ?
- (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat') : style).camelize();
- var value = element.style[camelizedStyle];
- if (!value) {
- if (document.defaultView && document.defaultView.getComputedStyle) {
- var css = document.defaultView.getComputedStyle(element, null);
- value = css ? css[camelizedStyle] : null;
- } else if (element.currentStyle) {
- value = element.currentStyle[camelizedStyle];
- }
- }
-
- if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
- value = element['offset'+style.capitalize()] + 'px';
-
- if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
- if (Element.getStyle(element, 'position') == 'static') value = 'auto';
- if(style == 'opacity') {
- if(value) return parseFloat(value);
- if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
- if(value[1]) return parseFloat(value[1]) / 100;
- return 1.0;
- }
- return value == 'auto' ? null : value;
- },
-
- setStyle: function(element, style) {
- element = $(element);
- for (var name in style) {
- var value = style[name];
- if(name == 'opacity') {
- if (value == 1) {
- value = (/Gecko/.test(navigator.userAgent) &&
- !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
- if(/MSIE/.test(navigator.userAgent) && !window.opera)
- element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
- } else {
- if(value < 0.00001) value = 0;
- if(/MSIE/.test(navigator.userAgent) && !window.opera)
- element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
- 'alpha(opacity='+value*100+')';
- }
- } else if(name == 'float') name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
- element.style[name.camelize()] = value;
- }
- return element;
- },
-
- getDimensions: function(element) {
- element = $(element);
- if (Element.getStyle(element, 'display') != 'none')
- return {width: element.offsetWidth, height: element.offsetHeight};
-
- // All *Width and *Height properties give 0 on elements with display none,
- // so enable the element temporarily
- var els = element.style;
- var originalVisibility = els.visibility;
- var originalPosition = els.position;
- els.visibility = 'hidden';
- els.position = 'absolute';
- els.display = '';
- var originalWidth = element.clientWidth;
- var originalHeight = element.clientHeight;
- els.display = 'none';
- els.position = originalPosition;
- els.visibility = originalVisibility;
- return {width: originalWidth, height: originalHeight};
- },
-
- makePositioned: function(element) {
- element = $(element);
- var pos = Element.getStyle(element, 'position');
- if (pos == 'static' || !pos) {
- element._madePositioned = true;
- element.style.position = 'relative';
- // Opera returns the offset relative to the positioning context, when an
- // element is position relative but top and left have not been defined
- if (window.opera) {
- element.style.top = 0;
- element.style.left = 0;
- }
- }
- return element;
- },
-
- undoPositioned: function(element) {
- element = $(element);
- if (element._madePositioned) {
- element._madePositioned = undefined;
- element.style.position =
- element.style.top =
- element.style.left =
- element.style.bottom =
- element.style.right = '';
- }
- return element;
- },
-
- makeClipping: function(element) {
- element = $(element);
- if (element._overflow) return element;
- element._overflow = element.style.overflow || 'auto';
- if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
- element.style.overflow = 'hidden';
- return element;
- },
-
- undoClipping: function(element) {
- element = $(element);
- if (!element._overflow) return element;
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
- element._overflow = null;
- return element;
- }
-}
-
-Element.Methods.Simulated = {
- hasAttribute: function(element, attribute) {
- return $(element).getAttributeNode(attribute).specified;
- }
-}
-
-// IE is missing .innerHTML support for TABLE-related elements
-if(document.all){
- Element.Methods.update = function(element, html) {
- element = $(element);
- html = typeof html == 'undefined' ? '' : html.toString();
- var tagName = element.tagName.toUpperCase();
- if (['THEAD','TBODY','TR','TD'].include(tagName)) {
- var div = document.createElement('div');
- switch (tagName) {
- case 'THEAD':
- case 'TBODY':
- div.innerHTML = '' + html.stripScripts() + '
';
- depth = 2;
- break;
- case 'TR':
- div.innerHTML = '' + html.stripScripts() + '
';
- depth = 3;
- break;
- case 'TD':
- div.innerHTML = '' + html.stripScripts() + '
';
- depth = 4;
- }
- $A(element.childNodes).each(function(node){
- element.removeChild(node)
- });
- depth.times(function(){ div = div.firstChild });
-
- $A(div.childNodes).each(
- function(node){ element.appendChild(node) });
- } else {
- element.innerHTML = html.stripScripts();
- }
- setTimeout(function() {html.evalScripts()}, 10);
- return element;
- }
-}
-
-Object.extend(Element, Element.Methods);
-
-var _nativeExtensions = false;
-
-if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
- ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
- var className = 'HTML' + tag + 'Element';
- if(window[className]) return;
- var klass = window[className] = {};
- klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
- });
-
-Element.addMethods = function(methods) {
- Object.extend(Element.Methods, methods || {});
-
- function copy(methods, destination, onlyIfAbsent) {
- onlyIfAbsent = onlyIfAbsent || false;
- var cache = Element.extend.cache;
- for (var property in methods) {
- var value = methods[property];
- if (!onlyIfAbsent || !(property in destination))
- destination[property] = cache.findOrStore(value);
- }
- }
-
- if (typeof HTMLElement != 'undefined') {
- copy(Element.Methods, HTMLElement.prototype);
- copy(Element.Methods.Simulated, HTMLElement.prototype, true);
- copy(Form.Methods, HTMLFormElement.prototype);
- [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
- copy(Form.Element.Methods, klass.prototype);
- });
- _nativeExtensions = true;
- }
-}
-
-var Toggle = new Object();
-Toggle.display = Element.toggle;
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.Insertion = function(adjacency) {
- this.adjacency = adjacency;
-}
-
-Abstract.Insertion.prototype = {
- initialize: function(element, content) {
- this.element = $(element);
- this.content = content.stripScripts();
-
- if (this.adjacency && this.element.insertAdjacentHTML) {
- try {
- this.element.insertAdjacentHTML(this.adjacency, this.content);
- } catch (e) {
- var tagName = this.element.tagName.toUpperCase();
- if (['TBODY', 'TR'].include(tagName)) {
- this.insertContent(this.contentFromAnonymousTable());
- } else {
- throw e;
- }
- }
- } else {
- this.range = this.element.ownerDocument.createRange();
- if (this.initializeRange) this.initializeRange();
- this.insertContent([this.range.createContextualFragment(this.content)]);
- }
-
- setTimeout(function() {content.evalScripts()}, 10);
- },
-
- contentFromAnonymousTable: function() {
- var div = document.createElement('div');
- div.innerHTML = '';
- return $A(div.childNodes[0].childNodes[0].childNodes);
- }
-}
-
-var Insertion = new Object();
-
-Insertion.Before = Class.create();
-Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
- initializeRange: function() {
- this.range.setStartBefore(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.parentNode.insertBefore(fragment, this.element);
- }).bind(this));
- }
-});
-
-Insertion.Top = Class.create();
-Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
- initializeRange: function() {
- this.range.selectNodeContents(this.element);
- this.range.collapse(true);
- },
-
- insertContent: function(fragments) {
- fragments.reverse(false).each((function(fragment) {
- this.element.insertBefore(fragment, this.element.firstChild);
- }).bind(this));
- }
-});
-
-Insertion.Bottom = Class.create();
-Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
- initializeRange: function() {
- this.range.selectNodeContents(this.element);
- this.range.collapse(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.appendChild(fragment);
- }).bind(this));
- }
-});
-
-Insertion.After = Class.create();
-Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
- initializeRange: function() {
- this.range.setStartAfter(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.parentNode.insertBefore(fragment,
- this.element.nextSibling);
- }).bind(this));
- }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
- initialize: function(element) {
- this.element = $(element);
- },
-
- _each: function(iterator) {
- this.element.className.split(/\s+/).select(function(name) {
- return name.length > 0;
- })._each(iterator);
- },
-
- set: function(className) {
- this.element.className = className;
- },
-
- add: function(classNameToAdd) {
- if (this.include(classNameToAdd)) return;
- this.set($A(this).concat(classNameToAdd).join(' '));
- },
-
- remove: function(classNameToRemove) {
- if (!this.include(classNameToRemove)) return;
- this.set($A(this).without(classNameToRemove).join(' '));
- },
-
- toString: function() {
- return $A(this).join(' ');
- }
-}
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-var Selector = Class.create();
-Selector.prototype = {
- initialize: function(expression) {
- this.params = {classNames: []};
- this.expression = expression.toString().strip();
- this.parseExpression();
- this.compileMatcher();
- },
-
- parseExpression: function() {
- function abort(message) { throw 'Parse error in selector: ' + message; }
-
- if (this.expression == '') abort('empty expression');
-
- var params = this.params, expr = this.expression, match, modifier, clause, rest;
- while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
- params.attributes = params.attributes || [];
- params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
- expr = match[1];
- }
-
- if (expr == '*') return this.params.wildcard = true;
-
- while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
- modifier = match[1], clause = match[2], rest = match[3];
- switch (modifier) {
- case '#': params.id = clause; break;
- case '.': params.classNames.push(clause); break;
- case '':
- case undefined: params.tagName = clause.toUpperCase(); break;
- default: abort(expr.inspect());
- }
- expr = rest;
- }
-
- if (expr.length > 0) abort(expr.inspect());
- },
-
- buildMatchExpression: function() {
- var params = this.params, conditions = [], clause;
-
- if (params.wildcard)
- conditions.push('true');
- if (clause = params.id)
- conditions.push('element.getAttribute("id") == ' + clause.inspect());
- if (clause = params.tagName)
- conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
- if ((clause = params.classNames).length > 0)
- for (var i = 0, length = clause.length; i < length; i++)
- conditions.push('Element.hasClassName(element, ' + clause[i].inspect() + ')');
- if (clause = params.attributes) {
- clause.each(function(attribute) {
- var value = 'element.getAttribute(' + attribute.name.inspect() + ')';
- var splitValueBy = function(delimiter) {
- return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
- }
-
- switch (attribute.operator) {
- case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break;
- case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
- case '|=': conditions.push(
- splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
- ); break;
- case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break;
- case '':
- case undefined: conditions.push(value + ' != null'); break;
- default: throw 'Unknown operator ' + attribute.operator + ' in selector';
- }
- });
- }
-
- return conditions.join(' && ');
- },
-
- compileMatcher: function() {
- this.match = new Function('element', 'if (!element.tagName) return false; \
- return ' + this.buildMatchExpression());
- },
-
- findElements: function(scope) {
- var element;
-
- if (element = $(this.params.id))
- if (this.match(element))
- if (!scope || Element.childOf(element, scope))
- return [element];
-
- scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
-
- var results = [];
- for (var i = 0, length = scope.length; i < length; i++)
- if (this.match(element = scope[i]))
- results.push(Element.extend(element));
-
- return results;
- },
-
- toString: function() {
- return this.expression;
- }
-}
-
-Object.extend(Selector, {
- matchElements: function(elements, expression) {
- var selector = new Selector(expression);
- return elements.select(selector.match.bind(selector)).map(Element.extend);
- },
-
- findElement: function(elements, expression, index) {
- if (typeof expression == 'number') index = expression, expression = false;
- return Selector.matchElements(elements, expression || '*')[index || 0];
- },
-
- findChildElements: function(element, expressions) {
- return expressions.map(function(expression) {
- return expression.strip().split(/\s+/).inject([null], function(results, expr) {
- var selector = new Selector(expr);
- return results.inject([], function(elements, result) {
- return elements.concat(selector.findElements(result || element));
- });
- });
- }).flatten();
- }
-});
-
-function $$() {
- return Selector.findChildElements(document, $A(arguments));
-}
-var Form = {
- reset: function(form) {
- $(form).reset();
- return form;
- },
-
- serializeElements: function(elements) {
- return elements.inject([], function(queryComponents, element) {
- var queryComponent = Form.Element.serialize(element);
- if (queryComponent) queryComponents.push(queryComponent);
- return queryComponents;
- }).join('&');
- }
-};
-
-Form.Methods = {
- serialize: function(form) {
- return Form.serializeElements(Form.getElements(form));
- },
-
- getElements: function(form) {
- return $A($(form).getElementsByTagName('*')).inject([],
- function(elements, child) {
- if (Form.Element.Serializers[child.tagName.toLowerCase()])
- elements.push(Element.extend(child));
- return elements;
- }
- );
- },
-
- getInputs: function(form, typeName, name) {
- form = $(form);
- var inputs = form.getElementsByTagName('input'), matchingInputs = [];
-
- if (!typeName && !name)
- return $A(inputs).map(Element.extend);
-
- for (var i = 0, length = inputs.length; i < length; i++) {
- var input = inputs[i];
- if ((typeName && input.type != typeName) ||
- (name && input.name != name))
- continue;
- matchingInputs.push(Element.extend(input));
- }
-
- return matchingInputs;
- },
-
- disable: function(form) {
- form = $(form);
- form.getElements().each(function(element) {
- element.blur();
- element.disabled = 'true';
- });
- return form;
- },
-
- enable: function(form) {
- form = $(form);
- form.getElements().each(function(element) {
- element.disabled = '';
- });
- return form;
- },
-
- findFirstElement: function(form) {
- return $(form).getElements().find(function(element) {
- return element.type != 'hidden' && !element.disabled &&
- ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
- });
- },
-
- focusFirstElement: function(form) {
- form = $(form);
- form.findFirstElement().activate();
- return form;
- }
-}
-
-Object.extend(Form, Form.Methods);
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element = {
- focus: function(element) {
- $(element).focus();
- return element;
- },
-
- select: function(element) {
- $(element).select();
- return element;
- }
-}
-
-Form.Element.Methods = {
- serialize: function(element) {
- element = $(element);
- if (element.disabled) return '';
- var method = element.tagName.toLowerCase();
- var parameter = Form.Element.Serializers[method](element);
-
- if (parameter) {
- var key = encodeURIComponent(parameter[0]);
- if (key.length == 0) return;
-
- if (parameter[1].constructor != Array)
- parameter[1] = [parameter[1]];
-
- return parameter[1].map(function(value) {
- return key + '=' + encodeURIComponent(value);
- }).join('&');
- }
- },
-
- getValue: function(element) {
- element = $(element);
- var method = element.tagName.toLowerCase();
- var parameter = Form.Element.Serializers[method](element);
-
- if (parameter)
- return parameter[1];
- },
-
- clear: function(element) {
- $(element).value = '';
- return element;
- },
-
- present: function(element) {
- return $(element).value != '';
- },
-
- activate: function(element) {
- element = $(element);
- element.focus();
- if (element.select && ( element.tagName.toLowerCase() != 'input' ||
- !['button', 'reset', 'submit'].include(element.type) ) )
- element.select();
- return element;
- },
-
- disable: function(element) {
- element = $(element);
- element.disabled = true;
- return element;
- },
-
- enable: function(element) {
- element = $(element);
- element.blur();
- element.disabled = false;
- return element;
- }
-}
-
-Object.extend(Form.Element, Form.Element.Methods);
-var Field = Form.Element;
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element.Serializers = {
- input: function(element) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- return Form.Element.Serializers.inputSelector(element);
- default:
- return Form.Element.Serializers.textarea(element);
- }
- return false;
- },
-
- inputSelector: function(element) {
- if (element.checked)
- return [element.name, element.value];
- },
-
- textarea: function(element) {
- return [element.name, element.value];
- },
-
- select: function(element) {
- return Form.Element.Serializers[element.type == 'select-one' ?
- 'selectOne' : 'selectMany'](element);
- },
-
- selectOne: function(element) {
- var value = '', opt, index = element.selectedIndex;
- if (index >= 0) {
- opt = Element.extend(element.options[index]);
- // Uses the new potential extension if hasAttribute isn't native.
- value = opt.hasAttribute('value') ? opt.value : opt.text;
- }
- return [element.name, value];
- },
-
- selectMany: function(element) {
- var value = [];
- for (var i = 0, length = element.length; i < length; i++) {
- var opt = Element.extend(element.options[i]);
- if (opt.selected)
- // Uses the new potential extension if hasAttribute isn't native.
- value.push(opt.hasAttribute('value') ? opt.value : opt.text);
- }
- return [element.name, value];
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var $F = Form.Element.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.TimedObserver = function() {}
-Abstract.TimedObserver.prototype = {
- initialize: function(element, frequency, callback) {
- this.frequency = frequency;
- this.element = $(element);
- this.callback = callback;
-
- this.lastValue = this.getValue();
- this.registerCallback();
- },
-
- registerCallback: function() {
- setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- onTimerEvent: function() {
- var value = this.getValue();
- var changed = ('string' == typeof this.lastValue && 'string' == typeof value
- ? this.lastValue != value : String(this.lastValue) != String(value));
- if (changed) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- }
-}
-
-Form.Element.Observer = Class.create();
-Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.Observer = Class.create();
-Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = function() {}
-Abstract.EventObserver.prototype = {
- initialize: function(element, callback) {
- this.element = $(element);
- this.callback = callback;
-
- this.lastValue = this.getValue();
- if (this.element.tagName.toLowerCase() == 'form')
- this.registerFormCallbacks();
- else
- this.registerCallback(this.element);
- },
-
- onElementEvent: function() {
- var value = this.getValue();
- if (this.lastValue != value) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- },
-
- registerFormCallbacks: function() {
- Form.getElements(this.element).each(this.registerCallback.bind(this));
- },
-
- registerCallback: function(element) {
- if (element.type) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- Event.observe(element, 'click', this.onElementEvent.bind(this));
- break;
- default:
- Event.observe(element, 'change', this.onElementEvent.bind(this));
- break;
- }
- }
- }
-}
-
-Form.Element.EventObserver = Class.create();
-Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.EventObserver = Class.create();
-Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-if (!window.Event) {
- var Event = new Object();
-}
-
-Object.extend(Event, {
- KEY_BACKSPACE: 8,
- KEY_TAB: 9,
- KEY_RETURN: 13,
- KEY_ESC: 27,
- KEY_LEFT: 37,
- KEY_UP: 38,
- KEY_RIGHT: 39,
- KEY_DOWN: 40,
- KEY_DELETE: 46,
- KEY_HOME: 36,
- KEY_END: 35,
- KEY_PAGEUP: 33,
- KEY_PAGEDOWN: 34,
-
- element: function(event) {
- return event.target || event.srcElement;
- },
-
- isLeftClick: function(event) {
- return (((event.which) && (event.which == 1)) ||
- ((event.button) && (event.button == 1)));
- },
-
- pointerX: function(event) {
- return event.pageX || (event.clientX +
- (document.documentElement.scrollLeft || document.body.scrollLeft));
- },
-
- pointerY: function(event) {
- return event.pageY || (event.clientY +
- (document.documentElement.scrollTop || document.body.scrollTop));
- },
-
- stop: function(event) {
- if (event.preventDefault) {
- event.preventDefault();
- event.stopPropagation();
- } else {
- event.returnValue = false;
- event.cancelBubble = true;
- }
- },
-
- // find the first node with the given tagName, starting from the
- // node the event was triggered on; traverses the DOM upwards
- findElement: function(event, tagName) {
- var element = Event.element(event);
- while (element.parentNode && (!element.tagName ||
- (element.tagName.toUpperCase() != tagName.toUpperCase())))
- element = element.parentNode;
- return element;
- },
-
- observers: false,
-
- _observeAndCache: function(element, name, observer, useCapture) {
- if (!this.observers) this.observers = [];
- if (element.addEventListener) {
- this.observers.push([element, name, observer, useCapture]);
- element.addEventListener(name, observer, useCapture);
- } else if (element.attachEvent) {
- this.observers.push([element, name, observer, useCapture]);
- element.attachEvent('on' + name, observer);
- }
- },
-
- unloadCache: function() {
- if (!Event.observers) return;
- for (var i = 0, length = Event.observers.length; i < length; i++) {
- Event.stopObserving.apply(this, Event.observers[i]);
- Event.observers[i][0] = null;
- }
- Event.observers = false;
- },
-
- observe: function(element, name, observer, useCapture) {
- element = $(element);
- useCapture = useCapture || false;
-
- if (name == 'keypress' &&
- (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
- || element.attachEvent))
- name = 'keydown';
-
- Event._observeAndCache(element, name, observer, useCapture);
- },
-
- stopObserving: function(element, name, observer, useCapture) {
- element = $(element);
- useCapture = useCapture || false;
-
- if (name == 'keypress' &&
- (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
- || element.detachEvent))
- name = 'keydown';
-
- if (element.removeEventListener) {
- element.removeEventListener(name, observer, useCapture);
- } else if (element.detachEvent) {
- try {
- element.detachEvent('on' + name, observer);
- } catch (e) {}
- }
- }
-});
-
-/* prevent memory leaks in IE */
-if (navigator.appVersion.match(/\bMSIE\b/))
- Event.observe(window, 'unload', Event.unloadCache, false);
-var Position = {
- // set to true if needed, warning: firefox performance problems
- // NOT neeeded for page scrolling, only if draggable contained in
- // scrollable elements
- includeScrollOffsets: false,
-
- // must be called before calling withinIncludingScrolloffset, every time the
- // page is scrolled
- prepare: function() {
- this.deltaX = window.pageXOffset
- || document.documentElement.scrollLeft
- || document.body.scrollLeft
- || 0;
- this.deltaY = window.pageYOffset
- || document.documentElement.scrollTop
- || document.body.scrollTop
- || 0;
- },
-
- realOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.scrollTop || 0;
- valueL += element.scrollLeft || 0;
- element = element.parentNode;
- } while (element);
- return [valueL, valueT];
- },
-
- cumulativeOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- } while (element);
- return [valueL, valueT];
- },
-
- positionedOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- if (element) {
- if(element.tagName=='BODY') break;
- var p = Element.getStyle(element, 'position');
- if (p == 'relative' || p == 'absolute') break;
- }
- } while (element);
- return [valueL, valueT];
- },
-
- offsetParent: function(element) {
- if (element.offsetParent) return element.offsetParent;
- if (element == document.body) return element;
-
- while ((element = element.parentNode) && element != document.body)
- if (Element.getStyle(element, 'position') != 'static')
- return element;
-
- return document.body;
- },
-
- // caches x/y coordinate pair to use with overlap
- within: function(element, x, y) {
- if (this.includeScrollOffsets)
- return this.withinIncludingScrolloffsets(element, x, y);
- this.xcomp = x;
- this.ycomp = y;
- this.offset = this.cumulativeOffset(element);
-
- return (y >= this.offset[1] &&
- y < this.offset[1] + element.offsetHeight &&
- x >= this.offset[0] &&
- x < this.offset[0] + element.offsetWidth);
- },
-
- withinIncludingScrolloffsets: function(element, x, y) {
- var offsetcache = this.realOffset(element);
-
- this.xcomp = x + offsetcache[0] - this.deltaX;
- this.ycomp = y + offsetcache[1] - this.deltaY;
- this.offset = this.cumulativeOffset(element);
-
- return (this.ycomp >= this.offset[1] &&
- this.ycomp < this.offset[1] + element.offsetHeight &&
- this.xcomp >= this.offset[0] &&
- this.xcomp < this.offset[0] + element.offsetWidth);
- },
-
- // within must be called directly before
- overlap: function(mode, element) {
- if (!mode) return 0;
- if (mode == 'vertical')
- return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
- element.offsetHeight;
- if (mode == 'horizontal')
- return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
- element.offsetWidth;
- },
-
- page: function(forElement) {
- var valueT = 0, valueL = 0;
-
- var element = forElement;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
-
- // Safari fix
- if (element.offsetParent==document.body)
- if (Element.getStyle(element,'position')=='absolute') break;
-
- } while (element = element.offsetParent);
-
- element = forElement;
- do {
- if (!window.opera || element.tagName=='BODY') {
- valueT -= element.scrollTop || 0;
- valueL -= element.scrollLeft || 0;
- }
- } while (element = element.parentNode);
-
- return [valueL, valueT];
- },
-
- clone: function(source, target) {
- var options = Object.extend({
- setLeft: true,
- setTop: true,
- setWidth: true,
- setHeight: true,
- offsetTop: 0,
- offsetLeft: 0
- }, arguments[2] || {})
-
- // find page position of source
- source = $(source);
- var p = Position.page(source);
-
- // find coordinate system to use
- target = $(target);
- var delta = [0, 0];
- var parent = null;
- // delta [0,0] will do fine with position: fixed elements,
- // position:absolute needs offsetParent deltas
- if (Element.getStyle(target,'position') == 'absolute') {
- parent = Position.offsetParent(target);
- delta = Position.page(parent);
- }
-
- // correct by body offsets (fixes Safari)
- if (parent == document.body) {
- delta[0] -= document.body.offsetLeft;
- delta[1] -= document.body.offsetTop;
- }
-
- // set position
- if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
- if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
- if(options.setWidth) target.style.width = source.offsetWidth + 'px';
- if(options.setHeight) target.style.height = source.offsetHeight + 'px';
- },
-
- absolutize: function(element) {
- element = $(element);
- if (element.style.position == 'absolute') return;
- Position.prepare();
-
- var offsets = Position.positionedOffset(element);
- var top = offsets[1];
- var left = offsets[0];
- var width = element.clientWidth;
- var height = element.clientHeight;
-
- element._originalLeft = left - parseFloat(element.style.left || 0);
- element._originalTop = top - parseFloat(element.style.top || 0);
- element._originalWidth = element.style.width;
- element._originalHeight = element.style.height;
-
- element.style.position = 'absolute';
- element.style.top = top + 'px';;
- element.style.left = left + 'px';;
- element.style.width = width + 'px';;
- element.style.height = height + 'px';;
- },
-
- relativize: function(element) {
- element = $(element);
- if (element.style.position == 'relative') return;
- Position.prepare();
-
- element.style.position = 'relative';
- var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
- var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
- element.style.top = top + 'px';
- element.style.left = left + 'px';
- element.style.height = element._originalHeight;
- element.style.width = element._originalWidth;
- }
-}
-
-// Safari returns margins on body which is incorrect if the child is absolutely
-// positioned. For performance reasons, redefine Position.cumulativeOffset for
-// KHTML/WebKit only.
-if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
- Position.cumulativeOffset = function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- if (element.offsetParent == document.body)
- if (Element.getStyle(element, 'position') == 'absolute') break;
-
- element = element.offsetParent;
- } while (element);
-
- return [valueL, valueT];
- }
-}
-
-Element.addMethods();
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb
deleted file mode 100644
index 979ba03f..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-module ActionView
- module Helpers #:nodoc:
- # Provides methods for converting a numbers into formatted strings.
- # Methods are provided for phone numbers, currency, percentage,
- # precision, positional notation, and file size.
- module NumberHelper
- # Formats a +number+ into a US phone number. You can customize the format
- # in the +options+ hash.
- # * :area_code - Adds parentheses around the area code.
- # * :delimiter - Specifies the delimiter to use, defaults to "-".
- # * :extension - Specifies an extension to add to the end of the
- # generated number
- # * :country_code - Sets the country code for the phone number.
- #
- # number_to_phone(1235551234) => 123-555-1234
- # number_to_phone(1235551234, :area_code => true) => (123) 555-1234
- # number_to_phone(1235551234, :delimiter => " ") => 123 555 1234
- # number_to_phone(1235551234, :area_code => true, :extension => 555) => (123) 555-1234 x 555
- # number_to_phone(1235551234, :country_code => 1)
- def number_to_phone(number, options = {})
- number = number.to_s.strip unless number.nil?
- options = options.stringify_keys
- area_code = options["area_code"] || nil
- delimiter = options["delimiter"] || "-"
- extension = options["extension"].to_s.strip || nil
- country_code = options["country_code"] || nil
-
- begin
- str = ""
- str << "+#{country_code}#{delimiter}" unless country_code.blank?
- str << if area_code
- number.gsub!(/([0-9]{1,3})([0-9]{3})([0-9]{4}$)/,"(\\1) \\2#{delimiter}\\3")
- else
- number.gsub!(/([0-9]{1,3})([0-9]{3})([0-9]{4})$/,"\\1#{delimiter}\\2#{delimiter}\\3")
- end
- str << " x #{extension}" unless extension.blank?
- str
- rescue
- number
- end
- end
-
- # Formats a +number+ into a currency string. You can customize the format
- # in the +options+ hash.
- # * :precision - Sets the level of precision, defaults to 2
- # * :unit - Sets the denomination of the currency, defaults to "$"
- # * :separator - Sets the separator between the units, defaults to "."
- # * :delimiter - Sets the thousands delimiter, defaults to ","
- #
- # number_to_currency(1234567890.50) => $1,234,567,890.50
- # number_to_currency(1234567890.506) => $1,234,567,890.51
- # number_to_currency(1234567890.506, :precision => 3) => $1,234,567,890.506
- # number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "")
- # => £1234567890,50
- def number_to_currency(number, options = {})
- options = options.stringify_keys
- precision = options["precision"] || 2
- unit = options["unit"] || "$"
- separator = precision > 0 ? options["separator"] || "." : ""
- delimiter = options["delimiter"] || ","
-
- begin
- parts = number_with_precision(number, precision).split('.')
- unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].to_s
- rescue
- number
- end
- end
-
- # Formats a +number+ as a percentage string. You can customize the
- # format in the +options+ hash.
- # * :precision - Sets the level of precision, defaults to 3
- # * :separator - Sets the separator between the units, defaults to "."
- #
- # number_to_percentage(100) => 100.000%
- # number_to_percentage(100, {:precision => 0}) => 100%
- # number_to_percentage(302.0574, {:precision => 2}) => 302.06%
- def number_to_percentage(number, options = {})
- options = options.stringify_keys
- precision = options["precision"] || 3
- separator = options["separator"] || "."
-
- begin
- number = number_with_precision(number, precision)
- parts = number.split('.')
- if parts.at(1).nil?
- parts[0] + "%"
- else
- parts[0] + separator + parts[1].to_s + "%"
- end
- rescue
- number
- end
- end
-
- # Formats a +number+ with grouped thousands using +delimiter+. You
- # can customize the format in the +options+ hash.
- # * :delimiter - Sets the thousands delimiter, defaults to ","
- # * :separator - Sets the separator between the units, defaults to "."
- #
- # number_with_delimiter(12345678) => 12,345,678
- # number_with_delimiter(12345678.05) => 12,345,678.05
- # number_with_delimiter(12345678, :delimiter => ".") => 12.345.678
- def number_with_delimiter(number, delimiter=",", separator=".")
- begin
- parts = number.to_s.split(separator)
- parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}")
- parts.join separator
- rescue
- number
- end
- end
-
- # Formats a +number+ with the specified level of +precision+. The default
- # level of precision is 3.
- #
- # number_with_precision(111.2345) => 111.235
- # number_with_precision(111.2345, 2) => 111.24
- def number_with_precision(number, precision=3)
- "%01.#{precision}f" % number
- rescue
- number
- end
-
- # Formats the bytes in +size+ into a more understandable representation.
- # Useful for reporting file sizes to users. This method returns nil if
- # +size+ cannot be converted into a number. You can change the default
- # precision of 1 in +precision+.
- #
- # number_to_human_size(123) => 123 Bytes
- # number_to_human_size(1234) => 1.2 KB
- # number_to_human_size(12345) => 12.1 KB
- # number_to_human_size(1234567) => 1.2 MB
- # number_to_human_size(1234567890) => 1.1 GB
- # number_to_human_size(1234567890123) => 1.1 TB
- # number_to_human_size(1234567, 2) => 1.18 MB
- def number_to_human_size(size, precision=1)
- size = Kernel.Float(size)
- case
- when size == 1 : "1 Byte"
- when size < 1.kilobyte: "%d Bytes" % size
- when size < 1.megabyte: "%.#{precision}f KB" % (size / 1.0.kilobyte)
- when size < 1.gigabyte: "%.#{precision}f MB" % (size / 1.0.megabyte)
- when size < 1.terabyte: "%.#{precision}f GB" % (size / 1.0.gigabyte)
- else "%.#{precision}f TB" % (size / 1.0.terabyte)
- end.sub('.0', '')
- rescue
- nil
- end
-
- alias_method :human_size, :number_to_human_size # deprecated alias
- deprecate :human_size => :number_to_human_size
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb
deleted file mode 100644
index 6123b738..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-module ActionView
- module Helpers
- # Provides methods for linking to ActionController::Pagination objects.
- #
- # You can also build your links manually, like in this example:
- #
- # <%= link_to "Previous page", { :page => paginator.current.previous } if paginator.current.previous %>
- #
- # <%= link_to "Next page", { :page => paginator.current.next } if paginator.current.next %>
- module PaginationHelper
- unless const_defined?(:DEFAULT_OPTIONS)
- DEFAULT_OPTIONS = {
- :name => :page,
- :window_size => 2,
- :always_show_anchors => true,
- :link_to_current_page => false,
- :params => {}
- }
- end
-
- # Creates a basic HTML link bar for the given +paginator+.
- # +html_options+ are passed to +link_to+.
- #
- # +options+ are:
- # :name :: the routing name for this paginator
- # (defaults to +page+)
- # :window_size :: the number of pages to show around
- # the current page (defaults to +2+)
- # :always_show_anchors :: whether or not the first and last
- # pages should always be shown
- # (defaults to +true+)
- # :link_to_current_page :: whether or not the current page
- # should be linked to (defaults to
- # +false+)
- # :params :: any additional routing parameters
- # for page URLs
- def pagination_links(paginator, options={}, html_options={})
- name = options[:name] || DEFAULT_OPTIONS[:name]
- params = (options[:params] || DEFAULT_OPTIONS[:params]).clone
-
- pagination_links_each(paginator, options) do |n|
- params[name] = n
- link_to(n.to_s, params, html_options)
- end
- end
-
- # Iterate through the pages of a given +paginator+, invoking a
- # block for each page number that needs to be rendered as a link.
- def pagination_links_each(paginator, options)
- options = DEFAULT_OPTIONS.merge(options)
- link_to_current_page = options[:link_to_current_page]
- always_show_anchors = options[:always_show_anchors]
-
- current_page = paginator.current_page
- window_pages = current_page.window(options[:window_size]).pages
- return if window_pages.length <= 1 unless link_to_current_page
-
- first, last = paginator.first, paginator.last
-
- html = ''
- if always_show_anchors and not (wp_first = window_pages[0]).first?
- html << yield(first.number)
- html << ' ... ' if wp_first.number - first.number > 1
- html << ' '
- end
-
- window_pages.each do |page|
- if current_page == page && !link_to_current_page
- html << page.number.to_s
- else
- html << yield(page.number)
- end
- html << ' '
- end
-
- if always_show_anchors and not (wp_last = window_pages[-1]).last?
- html << ' ... ' if last.number - wp_last.number > 1
- html << yield(last.number)
- end
-
- html
- end
-
- end # PaginationHelper
- end # Helpers
-end # ActionView
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
deleted file mode 100644
index dab10a6b..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ /dev/null
@@ -1,876 +0,0 @@
-require 'set'
-
-module ActionView
- module Helpers
- # Provides a set of helpers for calling Prototype JavaScript functions,
- # including functionality to call remote methods using
- # Ajax[http://www.adaptivepath.com/publications/essays/archives/000385.php].
- # This means that you can call actions in your controllers without
- # reloading the page, but still update certain parts of it using
- # injections into the DOM. The common use case is having a form that adds
- # a new element to a list without reloading the page.
- #
- # To be able to use these helpers, you must include the Prototype
- # JavaScript framework in your pages. See the documentation for
- # ActionView::Helpers::JavaScriptHelper for more information on including
- # the necessary JavaScript.
- #
- # See link_to_remote for documentation of options common to all Ajax
- # helpers.
- #
- # See also ActionView::Helpers::ScriptaculousHelper for helpers which work
- # with the Scriptaculous controls and visual effects library.
- #
- # See JavaScriptGenerator for information on updating multiple elements
- # on the page in an Ajax response.
- module PrototypeHelper
- unless const_defined? :CALLBACKS
- CALLBACKS = Set.new([ :uninitialized, :loading, :loaded,
- :interactive, :complete, :failure, :success ] +
- (100..599).to_a)
- AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url,
- :asynchronous, :method, :insertion, :position,
- :form, :with, :update, :script ]).merge(CALLBACKS)
- end
-
- # Returns a link to a remote action defined by options[:url]
- # (using the url_for format) that's called in the background using
- # XMLHttpRequest. The result of that request can then be inserted into a
- # DOM object whose id can be specified with options[:update] .
- # Usually, the result would be a partial prepared by the controller with
- # render :partial.
- #
- # Examples:
- # link_to_remote "Delete this post", :update => "posts",
- # :url => { :action => "destroy", :id => post.id }
- # link_to_remote(image_tag("refresh"), :update => "emails",
- # :url => { :action => "list_emails" })
- #
- # You can also specify a hash for options[:update] to allow for
- # easy redirection of output to an other DOM element if a server-side
- # error occurs:
- #
- # Example:
- # link_to_remote "Delete this post",
- # :url => { :action => "destroy", :id => post.id },
- # :update => { :success => "posts", :failure => "error" }
- #
- # Optionally, you can use the options[:position] parameter to
- # influence how the target DOM element is updated. It must be one of
- # :before , :top , :bottom , or :after .
- #
- # The method used is by default POST. You can also specify GET or you
- # can simulate PUT or DELETE over POST. All specified with options[:method]
- #
- # Example:
- # link_to_remote "Destroy", person_url(:id => person), :method => :delete
- #
- # By default, these remote requests are processed asynchronous during
- # which various JavaScript callbacks can be triggered (for progress
- # indicators and the likes). All callbacks get access to the
- # request object, which holds the underlying XMLHttpRequest.
- #
- # To access the server response, use request.responseText , to
- # find out the HTTP status, use request.status .
- #
- # Example:
- # link_to_remote word,
- # :url => { :action => "undo", :n => word_counter },
- # :complete => "undoRequestCompleted(request)"
- #
- # The callbacks that may be specified are (in order):
- #
- # :loading :: Called when the remote document is being
- # loaded with data by the browser.
- # :loaded :: Called when the browser has finished loading
- # the remote document.
- # :interactive :: Called when the user can interact with the
- # remote document, even though it has not
- # finished loading.
- # :success :: Called when the XMLHttpRequest is completed,
- # and the HTTP status code is in the 2XX range.
- # :failure :: Called when the XMLHttpRequest is completed,
- # and the HTTP status code is not in the 2XX
- # range.
- # :complete :: Called when the XMLHttpRequest is complete
- # (fires after success/failure if they are
- # present).
- #
- # You can further refine :success and :failure by
- # adding additional callbacks for specific status codes.
- #
- # Example:
- # link_to_remote word,
- # :url => { :action => "action" },
- # 404 => "alert('Not found...? Wrong URL...?')",
- # :failure => "alert('HTTP Error ' + request.status + '!')"
- #
- # A status code callback overrides the success/failure handlers if
- # present.
- #
- # If you for some reason or another need synchronous processing (that'll
- # block the browser while the request is happening), you can specify
- # options[:type] = :synchronous .
- #
- # You can customize further browser side call logic by passing in
- # JavaScript code snippets via some optional parameters. In their order
- # of use these are:
- #
- # :confirm :: Adds confirmation dialog.
- # :condition :: Perform remote request conditionally
- # by this expression. Use this to
- # describe browser-side conditions when
- # request should not be initiated.
- # :before :: Called before request is initiated.
- # :after :: Called immediately after request was
- # initiated and before :loading .
- # :submit :: Specifies the DOM element ID that's used
- # as the parent of the form elements. By
- # default this is the current form, but
- # it could just as well be the ID of a
- # table row or any other DOM element.
- def link_to_remote(name, options = {}, html_options = {})
- link_to_function(name, remote_function(options), html_options)
- end
-
- # Periodically calls the specified url (options[:url] ) every
- # options[:frequency] seconds (default is 10). Usually used to
- # update a specified div (options[:update] ) with the results
- # of the remote call. The options for specifying the target with :url
- # and defining callbacks is the same as link_to_remote.
- def periodically_call_remote(options = {})
- frequency = options[:frequency] || 10 # every ten seconds by default
- code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})"
- javascript_tag(code)
- end
-
- # Returns a form tag that will submit using XMLHttpRequest in the
- # background instead of the regular reloading POST arrangement. Even
- # though it's using JavaScript to serialize the form elements, the form
- # submission will work just like a regular submission as viewed by the
- # receiving side (all elements available in params ). The options for
- # specifying the target with :url and defining callbacks is the same as
- # link_to_remote.
- #
- # A "fall-through" target for browsers that doesn't do JavaScript can be
- # specified with the :action/:method options on :html.
- #
- # Example:
- # form_remote_tag :html => { :action =>
- # url_for(:controller => "some", :action => "place") }
- #
- # The Hash passed to the :html key is equivalent to the options (2nd)
- # argument in the FormTagHelper.form_tag method.
- #
- # By default the fall-through action is the same as the one specified in
- # the :url (and the default method is :post).
- #
- # form_remote_tag also takes a block, like form_tag:
- # <% form_remote_tag :url => '/posts' do -%>
- # <%= submit_tag 'Save' %>
- # <% end -%>
- def form_remote_tag(options = {}, &block)
- options[:form] = true
-
- options[:html] ||= {}
- options[:html][:onsubmit] =
- (options[:html][:onsubmit] ? options[:html][:onsubmit] + "; " : "") +
- "#{remote_function(options)}; return false;"
-
- form_tag(options[:html].delete(:action) || url_for(options[:url]), options[:html], &block)
- end
-
- # Works like form_remote_tag, but uses form_for semantics.
- def remote_form_for(object_name, *args, &proc)
- options = args.last.is_a?(Hash) ? args.pop : {}
- concat(form_remote_tag(options), proc.binding)
- fields_for(object_name, *(args << options), &proc)
- concat('', proc.binding)
- end
- alias_method :form_remote_for, :remote_form_for
-
- # Returns a button input tag that will submit form using XMLHttpRequest
- # in the background instead of regular reloading POST arrangement.
- # options argument is the same as in form_remote_tag .
- def submit_to_remote(name, value, options = {})
- options[:with] ||= 'Form.serialize(this.form)'
-
- options[:html] ||= {}
- options[:html][:type] = 'button'
- options[:html][:onclick] = "#{remote_function(options)}; return false;"
- options[:html][:name] = name
- options[:html][:value] = value
-
- tag("input", options[:html], false)
- end
-
- # Returns 'eval(request.responseText)' which is the JavaScript function
- # that form_remote_tag can call in :complete to evaluate a multiple
- # update return document using update_element_function calls.
- def evaluate_remote_response
- "eval(request.responseText)"
- end
-
- # Returns the JavaScript needed for a remote function.
- # Takes the same arguments as link_to_remote.
- #
- # Example:
- # { :action => :update_options }) %>">
- # Hello
- # World
- #
- def remote_function(options)
- javascript_options = options_for_ajax(options)
-
- update = ''
- if options[:update] && options[:update].is_a?(Hash)
- update = []
- update << "success:'#{options[:update][:success]}'" if options[:update][:success]
- update << "failure:'#{options[:update][:failure]}'" if options[:update][:failure]
- update = '{' + update.join(',') + '}'
- elsif options[:update]
- update << "'#{options[:update]}'"
- end
-
- function = update.empty? ?
- "new Ajax.Request(" :
- "new Ajax.Updater(#{update}, "
-
- url_options = options[:url]
- url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash)
- function << "'#{url_for(url_options)}'"
- function << ", #{javascript_options})"
-
- function = "#{options[:before]}; #{function}" if options[:before]
- function = "#{function}; #{options[:after]}" if options[:after]
- function = "if (#{options[:condition]}) { #{function}; }" if options[:condition]
- function = "if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }" if options[:confirm]
-
- return function
- end
-
- # Observes the field with the DOM ID specified by +field_id+ and makes
- # an Ajax call when its contents have changed.
- #
- # Required +options+ are either of:
- # :url :: +url_for+-style options for the action to call
- # when the field has changed.
- # :function :: Instead of making a remote call to a URL, you
- # can specify a function to be called instead.
- #
- # Additional options are:
- # :frequency :: The frequency (in seconds) at which changes to
- # this field will be detected. Not setting this
- # option at all or to a value equal to or less than
- # zero will use event based observation instead of
- # time based observation.
- # :update :: Specifies the DOM ID of the element whose
- # innerHTML should be updated with the
- # XMLHttpRequest response text.
- # :with :: A JavaScript expression specifying the
- # parameters for the XMLHttpRequest. This defaults
- # to 'value', which in the evaluated context
- # refers to the new field value. If you specify a
- # string without a "=", it'll be extended to mean
- # the form key that the value should be assigned to.
- # So :with => "term" gives "'term'=value". If a "=" is
- # present, no extension will happen.
- # :on :: Specifies which event handler to observe. By default,
- # it's set to "changed" for text fields and areas and
- # "click" for radio buttons and checkboxes. With this,
- # you can specify it instead to be "blur" or "focus" or
- # any other event.
- #
- # Additionally, you may specify any of the options documented in
- # link_to_remote.
- def observe_field(field_id, options = {})
- if options[:frequency] && options[:frequency] > 0
- build_observer('Form.Element.Observer', field_id, options)
- else
- build_observer('Form.Element.EventObserver', field_id, options)
- end
- end
-
- # Like +observe_field+, but operates on an entire form identified by the
- # DOM ID +form_id+. +options+ are the same as +observe_field+, except
- # the default value of the :with option evaluates to the
- # serialized (request string) value of the form.
- def observe_form(form_id, options = {})
- if options[:frequency]
- build_observer('Form.Observer', form_id, options)
- else
- build_observer('Form.EventObserver', form_id, options)
- end
- end
-
- # All the methods were moved to GeneratorMethods so that
- # #include_helpers_from_context has nothing to overwrite.
- class JavaScriptGenerator #:nodoc:
- def initialize(context, &block) #:nodoc:
- @context, @lines = context, []
- include_helpers_from_context
- @context.instance_exec(self, &block)
- end
-
- private
- def include_helpers_from_context
- @context.extended_by.each do |mod|
- extend mod unless mod.name =~ /^ActionView::Helpers/
- end
- extend GeneratorMethods
- end
-
- # JavaScriptGenerator generates blocks of JavaScript code that allow you
- # to change the content and presentation of multiple DOM elements. Use
- # this in your Ajax response bodies, either in a ')
- # => <script> do_nasty_stuff() </script>
- # sanitize('Click here for $100 ')
- # => Click here for $100
- def sanitize(html)
- # only do this if absolutely necessary
- if html.index("<")
- tokenizer = HTML::Tokenizer.new(html)
- new_text = ""
-
- while token = tokenizer.next
- node = HTML::Node.parse(nil, 0, 0, token, false)
- new_text << case node
- when HTML::Tag
- if VERBOTEN_TAGS.include?(node.name)
- node.to_s.gsub(/, "<")
- else
- if node.closing != :close
- node.attributes.delete_if { |attr,v| attr =~ VERBOTEN_ATTRS }
- %w(href src).each do |attr|
- node.attributes.delete attr if node.attributes[attr] =~ /^javascript:/i
- end
- end
- node.to_s
- end
- else
- node.to_s.gsub(/, "<")
- end
- end
-
- html = new_text
- end
-
- html
- end
-
- # Strips all HTML tags from the +html+, including comments. This uses the
- # html-scanner tokenizer and so its HTML parsing ability is limited by
- # that of html-scanner.
- def strip_tags(html)
- return html if html.blank?
- if html.index("<")
- text = ""
- tokenizer = HTML::Tokenizer.new(html)
-
- while token = tokenizer.next
- node = HTML::Node.parse(nil, 0, 0, token, false)
- # result is only the content of any Text nodes
- text << node.to_s if node.class == HTML::Text
- end
- # strip any comments, and if they have a newline at the end (ie. line with
- # only a comment) strip that too
- text.gsub(/[\n]?/m, "")
- else
- html # already plain text
- end
- end
-
- # Creates a Cycle object whose _to_s_ method cycles through elements of an
- # array every time it is called. This can be used for example, to alternate
- # classes for table rows:
- #
- # <% @items.each do |item| %>
- # ">
- # item
- #
- # <% end %>
- #
- # You can use named cycles to allow nesting in loops. Passing a Hash as
- # the last parameter with a :name key will create a named cycle.
- # You can manually reset a cycle by calling reset_cycle and passing the
- # name of the cycle.
- #
- # <% @items.each do |item| %>
- # "row_class")
- #
- # <% item.values.each do |value| %>
- # "colors") -%>">
- # value
- #
- # <% end %>
- # <% reset_cycle("colors") %>
- #
- #
- # <% end %>
- def cycle(first_value, *values)
- if (values.last.instance_of? Hash)
- params = values.pop
- name = params[:name]
- else
- name = "default"
- end
- values.unshift(first_value)
-
- cycle = get_cycle(name)
- if (cycle.nil? || cycle.values != values)
- cycle = set_cycle(name, Cycle.new(*values))
- end
- return cycle.to_s
- end
-
- # Resets a cycle so that it starts from the first element the next time
- # it is called. Pass in +name+ to reset a named cycle.
- def reset_cycle(name = "default")
- cycle = get_cycle(name)
- cycle.reset unless cycle.nil?
- end
-
- class Cycle #:nodoc:
- attr_reader :values
-
- def initialize(first_value, *values)
- @values = values.unshift(first_value)
- reset
- end
-
- def reset
- @index = 0
- end
-
- def to_s
- value = @values[@index].to_s
- @index = (@index + 1) % @values.size
- return value
- end
- end
-
- private
- # The cycle helpers need to store the cycles in a place that is
- # guaranteed to be reset every time a page is rendered, so it
- # uses an instance variable of ActionView::Base.
- def get_cycle(name)
- @_cycles = Hash.new unless defined?(@_cycles)
- return @_cycles[name]
- end
-
- def set_cycle(name, cycle_object)
- @_cycles = Hash.new unless defined?(@_cycles)
- @_cycles[name] = cycle_object
- end
-
- AUTO_LINK_RE = %r{
- ( # leading text
- <\w+.*?>| # leading HTML tag, or
- [^=!:'"/]| # leading punctuation, or
- ^ # beginning of line
- )
- (
- (?:https?://)| # protocol spec, or
- (?:www\.) # www.*
- )
- (
- [-\w]+ # subdomain or domain
- (?:\.[-\w]+)* # remaining subdomains or domain
- (?::\d+)? # port
- (?:/(?:[~\w%.;-]+)?)* # path
- (?:\?[\w%&=.;-]+)? # query string
- (?:\#\w*)? # trailing anchor
- )
- ([[:punct:]]|\s|<|$) # trailing text
- }x unless const_defined?(:AUTO_LINK_RE)
-
- # Turns all urls into clickable links. If a block is given, each url
- # is yielded and the result is used as the link text.
- def auto_link_urls(text, href_options = {})
- extra_options = tag_options(href_options.stringify_keys) || ""
- text.gsub(AUTO_LINK_RE) do
- all, a, b, c, d = $&, $1, $2, $3, $4
- if a =~ /#{text} #{d})
- end
- end
- end
-
- # Turns all email addresses into clickable links. If a block is given,
- # each email is yielded and the result is used as the link text.
- def auto_link_email_addresses(text)
- text.gsub(/([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/) do
- text = $1
- text = yield(text) if block_given?
- %{#{text} }
- end
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb b/tracks/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb
deleted file mode 100644
index 21b5e907..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb
+++ /dev/null
@@ -1,400 +0,0 @@
-require File.dirname(__FILE__) + '/javascript_helper'
-
-module ActionView
- module Helpers #:nodoc:
- # Provides a set of methods for making easy links and getting urls that
- # depend on the controller and action. This means that you can use the
- # same format for links in the views that you do in the controller.
- module UrlHelper
- include JavaScriptHelper
-
- # Returns the URL for the set of +options+ provided. This takes the
- # same options as url_for in action controller. For a list, see the
- # documentation for ActionController::Base#url_for. Note that it'll
- # set :only_path => true so you'll get the relative /controller/action
- # instead of the fully qualified http://example.com/controller/action.
- #
- # When called from a view, url_for returns an HTML escaped url. If you
- # need an unescaped url, pass :escape => false in the +options+.
- def url_for(options = {}, *parameters_for_method_reference)
- if options.kind_of? Hash
- options = { :only_path => true }.update(options.symbolize_keys)
- escape = options.key?(:escape) ? options.delete(:escape) : true
- else
- escape = true
- end
-
- url = @controller.send(:url_for, options, *parameters_for_method_reference)
- escape ? html_escape(url) : url
- end
-
- # Creates a link tag of the given +name+ using a URL created by the set
- # of +options+. See the valid options in the documentation for
- # ActionController::Base#url_for. It's also possible to pass a string instead
- # of an options hash to get a link tag that uses the value of the string as the
- # href for the link. If nil is passed as a name, the link itself will become
- # the name.
- #
- # The +html_options+ will accept a hash of html attributes for the link tag.
- # It also accepts 3 modifiers that specialize the link behavior.
- #
- # * :confirm => 'question?' : This will add a JavaScript confirm
- # prompt with the question specified. If the user accepts, the link is
- # processed normally, otherwise no action is taken.
- # * :popup => true || array of window options : This will force the
- # link to open in a popup window. By passing true, a default browser window
- # will be opened with the URL. You can also specify an array of options
- # that are passed-thru to JavaScripts window.open method.
- # * :method => symbol of HTTP verb : This modifier will dynamically
- # create an HTML form and immediately submit the form for processing using
- # the HTTP verb specified. Useful for having links perform a POST operation
- # in dangerous actions like deleting a record (which search bots can follow
- # while spidering your site). Supported verbs are :post, :delete and :put.
- # Note that if the user has JavaScript disabled, the request will fall back
- # to using GET. If you are relying on the POST behavior, your should check
- # for it in your controllers action by using the request objects methods
- # for post?, delete? or put?.
- #
- # You can mix and match the +html_options+ with the exception of
- # :popup and :method which will raise an ActionView::ActionViewError
- # exception.
- #
- # link_to "Visit Other Site", "http://www.rubyonrails.org/", :confirm => "Are you sure?"
- # link_to "Help", { :action => "help" }, :popup => true
- # link_to "View Image", { :action => "view" }, :popup => ['new_window_name', 'height=300,width=600']
- # link_to "Delete Image", { :action => "delete", :id => @image.id }, :confirm => "Are you sure?", :method => :delete
- def link_to(name, options = {}, html_options = nil, *parameters_for_method_reference)
- if html_options
- html_options = html_options.stringify_keys
- convert_options_to_javascript!(html_options)
- tag_options = tag_options(html_options)
- else
- tag_options = nil
- end
-
- url = options.is_a?(String) ? options : self.url_for(options, *parameters_for_method_reference)
- "#{name || url} "
- end
-
- # Generates a form containing a single button that submits to the URL created
- # by the set of +options+. This is the safest method to ensure links that
- # cause changes to your data are not triggered by search bots or accelerators.
- # If the HTML button does not work with your layout, you can also consider
- # using the link_to method with the :method modifier as described in
- # the link_to documentation.
- #
- # The generated FORM element has a class name of button-to
- # to allow styling of the form itself and its children. You can control
- # the form submission and input element behavior using +html_options+.
- # This method accepts the :method and :confirm modifiers
- # described in the link_to documentation. If no :method modifier
- # is given, it will default to performing a POST operation. You can also
- # disable the button by passing :disabled => true in +html_options+.
- #
- # button_to "New", :action => "new"
- #
- # Generates the following HTML:
- #
- #
- #
- #
- #
- # If you are using RESTful routes, you can pass the :method
- # to change the HTTP verb used to submit the form.
- #
- # button_to "Delete Image", { :action => "delete", :id => @image.id },
- # :confirm => "Are you sure?", :method => :delete
- #
- # Which generates the following HTML:
- #
- #
- #
- #
- #
- #
- #
- def button_to(name, options = {}, html_options = {})
- html_options = html_options.stringify_keys
- convert_boolean_attributes!(html_options, %w( disabled ))
-
- method_tag = ''
- if (method = html_options.delete('method')) && %w{put delete}.include?(method.to_s)
- method_tag = tag('input', :type => 'hidden', :name => '_method', :value => method.to_s)
- end
-
- form_method = method.to_s == 'get' ? 'get' : 'post'
-
- if confirm = html_options.delete("confirm")
- html_options["onclick"] = "return #{confirm_javascript_function(confirm)};"
- end
-
- url = options.is_a?(String) ? options : self.url_for(options)
- name ||= url
-
- html_options.merge!("type" => "submit", "value" => name)
-
- "" +
- method_tag + tag("input", html_options) + "
"
- end
-
-
- # DEPRECATED. It is reccommended to use the AssetTagHelper::image_tag within
- # a link_to method to generate a linked image.
- #
- # link_to(image_tag("rss", :size => "30x45", :border => 0), "http://www.example.com")
- def link_image_to(src, options = {}, html_options = {}, *parameters_for_method_reference)
- image_options = { "src" => src.include?("/") ? src : "/images/#{src}" }
- image_options["src"] += ".png" unless image_options["src"].include?(".")
-
- html_options = html_options.stringify_keys
- if html_options["alt"]
- image_options["alt"] = html_options["alt"]
- html_options.delete "alt"
- else
- image_options["alt"] = src.split("/").last.split(".").first.capitalize
- end
-
- if html_options["size"]
- image_options["width"], image_options["height"] = html_options["size"].split("x")
- html_options.delete "size"
- end
-
- if html_options["border"]
- image_options["border"] = html_options["border"]
- html_options.delete "border"
- end
-
- if html_options["align"]
- image_options["align"] = html_options["align"]
- html_options.delete "align"
- end
-
- link_to(tag("img", image_options), options, html_options, *parameters_for_method_reference)
- end
-
- alias_method :link_to_image, :link_image_to
- deprecate :link_to_image => "use link_to(image_tag(...), url)",
- :link_image_to => "use link_to(image_tag(...), url)"
-
- # Creates a link tag of the given +name+ using a URL created by the set of
- # +options+ unless the current request uri is the same as the links, in
- # which case only the name is returned (or the given block is yielded, if
- # one exists). Refer to the documentation for link_to_unless for block usage.
- #
- #
- # <%= link_to_unless_current("Home", { :action => "index" }) %>
- # <%= link_to_unless_current("About Us", { :action => "about" }) %>
- #
- #
- # This will render the following HTML when on the about us page:
- #
- #
- # Home
- # About Us
- #
- def link_to_unless_current(name, options = {}, html_options = {}, *parameters_for_method_reference, &block)
- link_to_unless current_page?(options), name, options, html_options, *parameters_for_method_reference, &block
- end
-
- # Creates a link tag of the given +name+ using a URL created by the set of
- # +options+ unless +condition+ is true, in which case only the name is
- # returned. To specialize the default behavior, you can pass a block that
- # accepts the name or the full argument list for link_to_unless (see the example).
- #
- # <%= link_to_unless(@current_user.nil?, "Reply", { :action => "reply" }) %>
- #
- # This example uses a block to modify the link if the condition isn't met.
- #
- # <%= link_to_unless(@current_user.nil?, "Reply", { :action => "reply" }) do |name|
- # link_to(name, { :controller => "accounts", :action => "signup" })
- # end %>
- def link_to_unless(condition, name, options = {}, html_options = {}, *parameters_for_method_reference, &block)
- if condition
- if block_given?
- block.arity <= 1 ? yield(name) : yield(name, options, html_options, *parameters_for_method_reference)
- else
- name
- end
- else
- link_to(name, options, html_options, *parameters_for_method_reference)
- end
- end
-
- # Creates a link tag of the given +name+ using a URL created by the set of
- # +options+ if +condition+ is true, in which case only the name is
- # returned. To specialize the default behavior, you can pass a block that
- # accepts the name or the full argument list for link_to_unless (see the examples
- # in link_to_unless).
- def link_to_if(condition, name, options = {}, html_options = {}, *parameters_for_method_reference, &block)
- link_to_unless !condition, name, options, html_options, *parameters_for_method_reference, &block
- end
-
- # Creates a mailto link tag to the specified +email_address+, which is
- # also used as the name of the link unless +name+ is specified. Additional
- # html attributes for the link can be passed in +html_options+.
- #
- # mail_to has several methods for hindering email harvestors and customizing
- # the email itself by passing special keys to +html_options+.
- #
- # Special HTML Options:
- #
- # * :encode - This key will accept the strings "javascript" or "hex".
- # Passing "javascript" will dynamically create and encode the mailto: link then
- # eval it into the DOM of the page. This method will not show the link on
- # the page if the user has JavaScript disabled. Passing "hex" will hex
- # encode the +email_address+ before outputting the mailto: link.
- # * :replace_at - When the link +name+ isn't provided, the
- # +email_address+ is used for the link label. You can use this option to
- # obfuscate the +email_address+ by substituting the @ sign with the string
- # given as the value.
- # * :replace_dot - When the link +name+ isn't provided, the
- # +email_address+ is used for the link label. You can use this option to
- # obfuscate the +email_address+ by substituting the . in the email with the
- # string given as the value.
- # * :subject - Preset the subject line of the email.
- # * :body - Preset the body of the email.
- # * :cc - Carbon Copy addition recipients on the email.
- # * :bcc - Blind Carbon Copy additional recipients on the email.
- #
- # Examples:
- # mail_to "me@domain.com" # => me@domain.com
- # mail_to "me@domain.com", "My email", :encode => "javascript" # =>
- #
- #
- # mail_to "me@domain.com", "My email", :encode => "hex" # =>
- # My email
- #
- # mail_to "me@domain.com", nil, :replace_at => "_at_", :replace_dot => "_dot_", :class => "email" # =>
- # me_at_domain_dot_com
- #
- # mail_to "me@domain.com", "My email", :cc => "ccaddress@domain.com",
- # :subject => "This is an example email" # =>
- # My email
- def mail_to(email_address, name = nil, html_options = {})
- html_options = html_options.stringify_keys
- encode = html_options.delete("encode")
- cc, bcc, subject, body = html_options.delete("cc"), html_options.delete("bcc"), html_options.delete("subject"), html_options.delete("body")
-
- string = ''
- extras = ''
- extras << "cc=#{CGI.escape(cc).gsub("+", "%20")}&" unless cc.nil?
- extras << "bcc=#{CGI.escape(bcc).gsub("+", "%20")}&" unless bcc.nil?
- extras << "body=#{CGI.escape(body).gsub("+", "%20")}&" unless body.nil?
- extras << "subject=#{CGI.escape(subject).gsub("+", "%20")}&" unless subject.nil?
- extras = "?" << extras.gsub!(/&?$/,"") unless extras.empty?
-
- email_address = email_address.to_s
-
- email_address_obfuscated = email_address.dup
- email_address_obfuscated.gsub!(/@/, html_options.delete("replace_at")) if html_options.has_key?("replace_at")
- email_address_obfuscated.gsub!(/\./, html_options.delete("replace_dot")) if html_options.has_key?("replace_dot")
-
- if encode == "javascript"
- tmp = "document.write('#{content_tag("a", name || email_address, html_options.merge({ "href" => "mailto:"+email_address+extras }))}');"
- for i in 0...tmp.length
- string << sprintf("%%%x",tmp[i])
- end
- ""
- elsif encode == "hex"
- for i in 0...email_address.length
- if email_address[i,1] =~ /\w/
- string << sprintf("%%%x",email_address[i])
- else
- string << email_address[i,1]
- end
- end
- content_tag "a", name || email_address_obfuscated, html_options.merge({ "href" => "mailto:#{string}#{extras}" })
- else
- content_tag "a", name || email_address_obfuscated, html_options.merge({ "href" => "mailto:#{email_address}#{extras}" })
- end
- end
-
- # Returns true if the current page uri is generated by the +options+ passed.
- def current_page?(options)
- CGI.escapeHTML(self.url_for(options)) == @controller.request.request_uri
- end
-
- private
- def convert_options_to_javascript!(html_options)
- confirm, popup = html_options.delete("confirm"), html_options.delete("popup")
-
- # post is deprecated, but if its specified and method is not, assume that method = :post
- method, post = html_options.delete("method"), html_options.delete("post")
- if !method && post
- ActiveSupport::Deprecation.warn(
- "Passing :post as a link modifier is deprecated. " +
- "Use :method => \"post\" instead. :post will be removed in Rails 2.0."
- )
- method = :post
- end
-
- html_options["onclick"] = case
- when popup && method
- raise ActionView::ActionViewError, "You can't use :popup and :post in the same link"
- when confirm && popup
- "if (#{confirm_javascript_function(confirm)}) { #{popup_javascript_function(popup)} };return false;"
- when confirm && method
- "if (#{confirm_javascript_function(confirm)}) { #{method_javascript_function(method)} };return false;"
- when confirm
- "return #{confirm_javascript_function(confirm)};"
- when method
- "#{method_javascript_function(method)}return false;"
- when popup
- popup_javascript_function(popup) + 'return false;'
- else
- html_options["onclick"]
- end
- end
-
- def confirm_javascript_function(confirm)
- "confirm('#{escape_javascript(confirm)}')"
- end
-
- def popup_javascript_function(popup)
- popup.is_a?(Array) ? "window.open(this.href,'#{popup.first}','#{popup.last}');" : "window.open(this.href);"
- end
-
- def method_javascript_function(method)
- submit_function =
- "var f = document.createElement('form'); f.style.display = 'none'; " +
- "this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;"
-
- unless method == :post
- submit_function << "var m = document.createElement('input'); m.setAttribute('type', 'hidden'); "
- submit_function << "m.setAttribute('name', '_method'); m.setAttribute('value', '#{method}'); f.appendChild(m);"
- end
-
- submit_function << "f.submit();"
- end
-
- # Processes the _html_options_ hash, converting the boolean
- # attributes from true/false form into the form required by
- # HTML/XHTML. (An attribute is considered to be boolean if
- # its name is listed in the given _bool_attrs_ array.)
- #
- # More specifically, for each boolean attribute in _html_options_
- # given as:
- #
- # "attr" => bool_value
- #
- # if the associated _bool_value_ evaluates to true, it is
- # replaced with the attribute's name; otherwise the attribute is
- # removed from the _html_options_ hash. (See the XHTML 1.0 spec,
- # section 4.5 "Attribute Minimization" for more:
- # http://www.w3.org/TR/xhtml1/#h-4.5)
- #
- # Returns the updated _html_options_ hash, which is also modified
- # in place.
- #
- # Example:
- #
- # convert_boolean_attributes!( html_options,
- # %w( checked disabled readonly ) )
- def convert_boolean_attributes!(html_options, bool_attrs)
- bool_attrs.each { |x| html_options[x] = x if html_options.delete(x) }
- html_options
- end
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/partials.rb b/tracks/vendor/rails/actionpack/lib/action_view/partials.rb
deleted file mode 100644
index 063ff568..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/partials.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-module ActionView
- # There's also a convenience method for rendering sub templates within the current controller that depends on a single object
- # (we call this kind of sub templates for partials). It relies on the fact that partials should follow the naming convention of being
- # prefixed with an underscore -- as to separate them from regular templates that could be rendered on their own.
- #
- # In a template for Advertiser#account:
- #
- # <%= render :partial => "account" %>
- #
- # This would render "advertiser/_account.rhtml" and pass the instance variable @account in as a local variable +account+ to
- # the template for display.
- #
- # In another template for Advertiser#buy, we could have:
- #
- # <%= render :partial => "account", :locals => { :account => @buyer } %>
- #
- # <% for ad in @advertisements %>
- # <%= render :partial => "ad", :locals => { :ad => ad } %>
- # <% end %>
- #
- # This would first render "advertiser/_account.rhtml" with @buyer passed in as the local variable +account+, then render
- # "advertiser/_ad.rhtml" and pass the local variable +ad+ to the template for display.
- #
- # == Rendering a collection of partials
- #
- # The example of partial use describes a familiar pattern where a template needs to iterate over an array and render a sub
- # template for each of the elements. This pattern has been implemented as a single method that accepts an array and renders
- # a partial by the same name as the elements contained within. So the three-lined example in "Using partials" can be rewritten
- # with a single line:
- #
- # <%= render :partial => "ad", :collection => @advertisements %>
- #
- # This will render "advertiser/_ad.rhtml" and pass the local variable +ad+ to the template for display. An iteration counter
- # will automatically be made available to the template with a name of the form +partial_name_counter+. In the case of the
- # example above, the template would be fed +ad_counter+.
- #
- # NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects,
- # like Active Records, in there.
- #
- # == Rendering shared partials
- #
- # Two controllers can share a set of partials and render them like this:
- #
- # <%= render :partial => "advertisement/ad", :locals => { :ad => @advertisement } %>
- #
- # This will render the partial "advertisement/_ad.rhtml" regardless of which controller this is being called from.
- module Partials
- # Deprecated, use render :partial
- def render_partial(partial_path, local_assigns = nil, deprecated_local_assigns = nil) #:nodoc:
- path, partial_name = partial_pieces(partial_path)
- object = extracting_object(partial_name, local_assigns, deprecated_local_assigns)
- local_assigns = extract_local_assigns(local_assigns, deprecated_local_assigns)
- local_assigns = local_assigns ? local_assigns.clone : {}
- add_counter_to_local_assigns!(partial_name, local_assigns)
- add_object_to_local_assigns!(partial_name, local_assigns, object)
-
- if logger
- ActionController::Base.benchmark("Rendered #{path}/_#{partial_name}", Logger::DEBUG, false) do
- render("#{path}/_#{partial_name}", local_assigns)
- end
- else
- render("#{path}/_#{partial_name}", local_assigns)
- end
- end
-
- # Deprecated, use render :partial, :collection
- def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = nil) #:nodoc:
- collection_of_partials = Array.new
- counter_name = partial_counter_name(partial_name)
- local_assigns = local_assigns ? local_assigns.clone : {}
- collection.each_with_index do |element, counter|
- local_assigns[counter_name] = counter
- collection_of_partials.push(render_partial(partial_name, element, local_assigns))
- end
-
- return " " if collection_of_partials.empty?
-
- if partial_spacer_template
- spacer_path, spacer_name = partial_pieces(partial_spacer_template)
- collection_of_partials.join(render("#{spacer_path}/_#{spacer_name}"))
- else
- collection_of_partials.join
- end
- end
-
- alias_method :render_collection_of_partials, :render_partial_collection
-
- private
- def partial_pieces(partial_path)
- if partial_path.include?('/')
- return File.dirname(partial_path), File.basename(partial_path)
- else
- return controller.class.controller_path, partial_path
- end
- end
-
- def partial_counter_name(partial_name)
- "#{partial_name.split('/').last}_counter".intern
- end
-
- def extracting_object(partial_name, local_assigns, deprecated_local_assigns)
- if local_assigns.is_a?(Hash) || local_assigns.nil?
- controller.instance_variable_get("@#{partial_name}")
- else
- # deprecated form where object could be passed in as second parameter
- local_assigns
- end
- end
-
- def extract_local_assigns(local_assigns, deprecated_local_assigns)
- local_assigns.is_a?(Hash) ? local_assigns : deprecated_local_assigns
- end
-
- def add_counter_to_local_assigns!(partial_name, local_assigns)
- counter_name = partial_counter_name(partial_name)
- local_assigns[counter_name] = 1 unless local_assigns.has_key?(counter_name)
- end
-
- def add_object_to_local_assigns!(partial_name, local_assigns, object)
- local_assigns[partial_name.intern] ||=
- if object.is_a?(ActionView::Base::ObjectWrapper)
- object.value
- else
- object
- end || controller.instance_variable_get("@#{partial_name}")
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/lib/action_view/template_error.rb b/tracks/vendor/rails/actionpack/lib/action_view/template_error.rb
deleted file mode 100644
index 546db41f..00000000
--- a/tracks/vendor/rails/actionpack/lib/action_view/template_error.rb
+++ /dev/null
@@ -1,110 +0,0 @@
-module ActionView
- # The TemplateError exception is raised when the compilation of the template fails. This exception then gathers a
- # bunch of intimate details and uses it to report a very precise exception message.
- class TemplateError < ActionViewError #:nodoc:
- SOURCE_CODE_RADIUS = 3
-
- attr_reader :original_exception
-
- def initialize(base_path, file_path, assigns, source, original_exception)
- @base_path, @assigns, @source, @original_exception =
- base_path, assigns.dup, source, original_exception
- @file_path = file_path
-
- remove_deprecated_assigns!
- end
-
- def message
- ActiveSupport::Deprecation.silence { original_exception.message }
- end
-
- def clean_backtrace
- original_exception.clean_backtrace
- end
-
- def sub_template_message
- if @sub_templates
- "Trace of template inclusion: " +
- @sub_templates.collect { |template| strip_base_path(template) }.join(", ")
- else
- ""
- end
- end
-
- def source_extract(indentation = 0)
- return unless num = line_number
- num = num.to_i
-
- source_code = IO.readlines(@file_path)
-
- start_on_line = [ num - SOURCE_CODE_RADIUS - 1, 0 ].max
- end_on_line = [ num + SOURCE_CODE_RADIUS - 1, source_code.length].min
-
- indent = ' ' * indentation
- line_counter = start_on_line
-
- source_code[start_on_line..end_on_line].sum do |line|
- line_counter += 1
- "#{indent}#{line_counter}: #{line}"
- end
- end
-
- def sub_template_of(template_path)
- @sub_templates ||= []
- @sub_templates << template_path
- end
-
- def line_number
- @line_number ||=
- if file_name
- regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)/
-
- $1 if message =~ regexp or clean_backtrace.find { |line| line =~ regexp }
- end
- end
-
- def file_name
- stripped = strip_base_path(@file_path)
- stripped.slice!(0,1) if stripped[0] == ?/
- stripped
- end
-
- def to_s
- "\n\n#{self.class} (#{message}) #{source_location}:\n" +
- "#{source_extract}\n #{clean_backtrace.join("\n ")}\n\n"
- end
-
- def backtrace
- [
- "#{source_location.capitalize}\n\n#{source_extract(4)}\n " +
- clean_backtrace.join("\n ")
- ]
- end
-
- private
- def remove_deprecated_assigns!
- ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |ivar|
- @assigns.delete(ivar)
- end
- end
-
- def strip_base_path(path)
- File.expand_path(path).
- gsub(/^#{Regexp.escape File.expand_path(RAILS_ROOT)}/, '').
- gsub(@base_path, "")
- end
-
- def source_location
- if line_number
- "on line ##{line_number} of "
- else
- 'in '
- end + file_name
- end
- end
-end
-
-if defined?(Exception::TraceSubstitutions)
- Exception::TraceSubstitutions << [/:in\s+`_run_(html|xml).*'\s*$/, '']
- Exception::TraceSubstitutions << [%r{^\s*#{Regexp.escape RAILS_ROOT}}, '#{RAILS_ROOT}'] if defined?(RAILS_ROOT)
-end
diff --git a/tracks/vendor/rails/actionpack/test/abstract_unit.rb b/tracks/vendor/rails/actionpack/test/abstract_unit.rb
deleted file mode 100644
index de4ca439..00000000
--- a/tracks/vendor/rails/actionpack/test/abstract_unit.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../lib')
-$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib/active_support')
-$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
-
-require 'yaml'
-require 'test/unit'
-require 'action_controller'
-require 'breakpoint'
-require 'action_controller/test_process'
-
-# Show backtraces for deprecated behavior for quicker cleanup.
-ActiveSupport::Deprecation.debug = true
-
-ActionController::Base.logger = nil
-ActionController::Base.ignore_missing_templates = false
-ActionController::Routing::Routes.reload rescue nil
diff --git a/tracks/vendor/rails/actionpack/test/active_record_unit.rb b/tracks/vendor/rails/actionpack/test/active_record_unit.rb
deleted file mode 100644
index 02cf3f70..00000000
--- a/tracks/vendor/rails/actionpack/test/active_record_unit.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-require File.dirname(__FILE__) + '/abstract_unit'
-
-# Define the essentials
-class ActiveRecordTestConnector
- cattr_accessor :able_to_connect
- cattr_accessor :connected
-
- # Set our defaults
- self.connected = false
- self.able_to_connect = true
-end
-
-# Try to grab AR
-if defined?(ActiveRecord) && defined?(Fixtures)
- $stderr.puts 'Active Record is already loaded, running tests'
-else
- $stderr.print 'Attempting to load Active Record... '
- begin
- PATH_TO_AR = "#{File.dirname(__FILE__)}/../../activerecord/lib"
- raise LoadError, "#{PATH_TO_AR} doesn't exist" unless File.directory?(PATH_TO_AR)
- $LOAD_PATH.unshift PATH_TO_AR
- require 'active_record'
- require 'active_record/fixtures'
- $stderr.puts 'success'
- rescue LoadError => e
- $stderr.print "failed. Skipping Active Record assertion tests: #{e}"
- ActiveRecordTestConnector.able_to_connect = false
- end
-end
-$stderr.flush
-
-
-
-# Define the rest of the connector
-class ActiveRecordTestConnector
- class << self
- def setup
- unless self.connected || !self.able_to_connect
- setup_connection
- load_schema
- require_fixture_models
- self.connected = true
- end
- rescue Exception => e # errors from ActiveRecord setup
- $stderr.puts "\nSkipping ActiveRecord assertion tests: #{e}"
- #$stderr.puts " #{e.backtrace.join("\n ")}\n"
- self.able_to_connect = false
- end
-
- private
-
- def setup_connection
- if Object.const_defined?(:ActiveRecord)
- begin
- connection_options = {:adapter => 'sqlite3', :dbfile => ':memory:'}
- ActiveRecord::Base.establish_connection(connection_options)
- ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => connection_options }
- ActiveRecord::Base.connection
- rescue Exception # errors from establishing a connection
- $stderr.puts 'SQLite 3 unavailable; falling to SQLite 2.'
- connection_options = {:adapter => 'sqlite', :dbfile => ':memory:'}
- ActiveRecord::Base.establish_connection(connection_options)
- ActiveRecord::Base.configurations = { 'sqlite2_ar_integration' => connection_options }
- ActiveRecord::Base.connection
- end
-
- Object.send(:const_set, :QUOTED_TYPE, ActiveRecord::Base.connection.quote_column_name('type')) unless Object.const_defined?(:QUOTED_TYPE)
- else
- raise "Couldn't locate ActiveRecord."
- end
- end
-
- # Load actionpack sqlite tables
- def load_schema
- File.read(File.dirname(__FILE__) + "/fixtures/db_definitions/sqlite.sql").split(';').each do |sql|
- ActiveRecord::Base.connection.execute(sql) unless sql.blank?
- end
- end
-
- def require_fixture_models
- Dir.glob(File.dirname(__FILE__) + "/fixtures/*.rb").each {|f| require f}
- end
- end
-end
-
-# Test case for inheiritance
-class ActiveRecordTestCase < Test::Unit::TestCase
- # Set our fixture path
- if ActiveRecordTestConnector.able_to_connect
- self.fixture_path = "#{File.dirname(__FILE__)}/fixtures/"
- self.use_transactional_fixtures = false
- end
-
- def self.fixtures(*args)
- super if ActiveRecordTestConnector.connected
- end
-
- def setup
- abort_tests unless ActiveRecordTestConnector.connected
- end
-
- # Default so Test::Unit::TestCase doesn't complain
- def test_truth
- end
-
- private
- # If things go wrong, we don't want to run our test cases. We'll just define them to test nothing.
- def abort_tests
- $stderr.puts 'No Active Record connection, aborting tests.'
- self.class.public_instance_methods.grep(/^test./).each do |method|
- self.class.class_eval { define_method(method.to_sym){} }
- end
- end
-end
-
-ActiveRecordTestConnector.setup
diff --git a/tracks/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb b/tracks/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb
deleted file mode 100644
index 9a3c1127..00000000
--- a/tracks/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-require "#{File.dirname(__FILE__)}/../active_record_unit"
-
-class ActiveRecordAssertionsController < ActionController::Base
- self.template_root = "#{File.dirname(__FILE__)}/../fixtures/"
-
- # fail with 1 bad column
- def nasty_columns_1
- @company = Company.new
- @company.name = "B"
- @company.rating = 2
- render :inline => "snicker...."
- end
-
- # fail with 2 bad columns
- def nasty_columns_2
- @company = Company.new
- @company.name = ""
- @company.rating = 2
- render :inline => "double snicker...."
- end
-
- # this will pass validation
- def good_company
- @company = Company.new
- @company.name = "A"
- @company.rating = 69
- render :inline => "Goodness Gracious!"
- end
-
- # this will fail validation
- def bad_company
- @company = Company.new
- render :inline => "Who's Bad?"
- end
-
- # the safety dance......
- def rescue_action(e) raise; end
-end
-
-class ActiveRecordAssertionsControllerTest < ActiveRecordTestCase
- fixtures :companies
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = ActiveRecordAssertionsController.new
- super
- end
-
- # test for 1 bad apple column
- def test_some_invalid_columns
- process :nasty_columns_1
- assert_response :success
-
- assert_deprecated_assertion { assert_invalid_record 'company' }
- assert_deprecated_assertion { assert_invalid_column_on_record 'company', 'rating' }
- assert_deprecated_assertion { assert_valid_column_on_record 'company', 'name' }
- assert_deprecated_assertion { assert_valid_column_on_record 'company', %w(name id) }
- end
-
- # test for 2 bad apples columns
- def test_all_invalid_columns
- process :nasty_columns_2
- assert_response :success
-
- assert_deprecated_assertion { assert_invalid_record 'company' }
- assert_deprecated_assertion { assert_invalid_column_on_record 'company', 'rating' }
- assert_deprecated_assertion { assert_invalid_column_on_record 'company', 'name' }
- assert_deprecated_assertion { assert_invalid_column_on_record 'company', %w(name rating) }
- end
-
- # ensure we have no problems with an ActiveRecord
- def test_valid_record
- process :good_company
- assert_response :success
-
- assert_deprecated_assertion { assert_valid_record 'company' }
- end
-
- # ensure we have problems with an ActiveRecord
- def test_invalid_record
- process :bad_company
- assert_response :success
-
- assert_deprecated_assertion { assert_invalid_record 'company' }
- end
-
- protected
- def assert_deprecated_assertion(message = nil, &block)
- assert_deprecated(/assert_.*from test_/, &block)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb b/tracks/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb
deleted file mode 100644
index 9d92593a..00000000
--- a/tracks/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-# These tests exercise CGI::Session::ActiveRecordStore, so you're going to
-# need AR in a sibling directory to AP and have SQLite installed.
-require File.dirname(__FILE__) + '/../active_record_unit'
-require 'action_controller/session/active_record_store'
-
-
-module CommonActiveRecordStoreTests
- def test_basics
- s = session_class.new(:session_id => '1234', :data => { 'foo' => 'bar' })
- assert_equal 'bar', s.data['foo']
- assert s.save
- assert_equal 'bar', s.data['foo']
-
- assert_not_nil t = session_class.find_by_session_id('1234')
- assert_not_nil t.data
- assert_equal 'bar', t.data['foo']
- end
-
- def test_reload_same_session
- @new_session.update
- reloaded = CGI::Session.new(CGI.new, 'session_id' => @new_session.session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
- assert_equal 'bar', reloaded['foo']
- end
-
- def test_tolerates_close_close
- assert_nothing_raised do
- @new_session.close
- @new_session.close
- end
- end
-end
-
-class ActiveRecordStoreTest < ActiveRecordTestCase
- include CommonActiveRecordStoreTests
-
- def session_class
- CGI::Session::ActiveRecordStore::Session
- end
-
- def session_id_column
- "session_id"
- end
-
- def setup
- session_class.create_table!
-
- ENV['REQUEST_METHOD'] = 'GET'
- ENV['REQUEST_URI'] = '/'
- CGI::Session::ActiveRecordStore.session_class = session_class
-
- @cgi = CGI.new
- @new_session = CGI::Session.new(@cgi, 'database_manager' => CGI::Session::ActiveRecordStore, 'new_session' => true)
- @new_session['foo'] = 'bar'
- end
-
-# this test only applies for eager sesssion saving
-# def test_another_instance
-# @another = CGI::Session.new(@cgi, 'session_id' => @new_session.session_id, 'database_manager' => CGI::Session::ActiveRecordStore)
-# assert_equal @new_session.session_id, @another.session_id
-# end
-
- def test_model_attribute
- assert_kind_of CGI::Session::ActiveRecordStore::Session, @new_session.model
- assert_equal({ 'foo' => 'bar' }, @new_session.model.data)
- end
-
- def test_save_unloaded_session
- c = session_class.connection
- bogus_class = c.quote(Base64.encode64("\004\010o:\vBlammo\000"))
- c.insert("INSERT INTO #{session_class.table_name} ('#{session_id_column}', 'data') VALUES ('abcdefghijklmnop', #{bogus_class})")
-
- sess = session_class.find_by_session_id('abcdefghijklmnop')
- assert_not_nil sess
- assert !sess.loaded?
-
- # because the session is not loaded, the save should be a no-op. If it
- # isn't, this'll try and unmarshall the bogus class, and should get an error.
- assert_nothing_raised { sess.save }
- end
-
- def teardown
- session_class.drop_table!
- end
-end
-
-class ColumnLimitTest < ActiveRecordTestCase
- def setup
- @session_class = CGI::Session::ActiveRecordStore::Session
- @session_class.create_table!
- end
-
- def teardown
- @session_class.drop_table!
- end
-
- def test_protection_from_data_larger_than_column
- # Can't test this unless there is a limit
- return unless limit = @session_class.data_column_size_limit
- too_big = ':(' * limit
- s = @session_class.new(:session_id => '666', :data => {'foo' => too_big})
- s.data
- assert_raise(ActionController::SessionOverflowError) { s.save }
- end
-end
-
-class DeprecatedActiveRecordStoreTest < ActiveRecordStoreTest
- def session_id_column
- "sessid"
- end
-
- def setup
- session_class.connection.execute 'create table old_sessions (id integer primary key, sessid text unique, data text)'
- session_class.table_name = 'old_sessions'
- session_class.send :setup_sessid_compatibility!
-
- ENV['REQUEST_METHOD'] = 'GET'
- CGI::Session::ActiveRecordStore.session_class = session_class
-
- @new_session = CGI::Session.new(CGI.new, 'database_manager' => CGI::Session::ActiveRecordStore, 'new_session' => true)
- @new_session['foo'] = 'bar'
- end
-
- def teardown
- session_class.connection.execute 'drop table old_sessions'
- session_class.table_name = 'sessions'
- end
-end
-
-class SqlBypassActiveRecordStoreTest < ActiveRecordStoreTest
- def session_class
- unless @session_class
- @session_class = CGI::Session::ActiveRecordStore::SqlBypass
- @session_class.connection = CGI::Session::ActiveRecordStore::Session.connection
- end
- @session_class
- end
-
- def test_model_attribute
- assert_kind_of CGI::Session::ActiveRecordStore::SqlBypass, @new_session.model
- assert_equal({ 'foo' => 'bar' }, @new_session.model.data)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/activerecord/pagination_test.rb b/tracks/vendor/rails/actionpack/test/activerecord/pagination_test.rb
deleted file mode 100644
index ddd2cec8..00000000
--- a/tracks/vendor/rails/actionpack/test/activerecord/pagination_test.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-require File.dirname(__FILE__) + '/../active_record_unit'
-
-class PaginationTest < ActiveRecordTestCase
- fixtures :topics, :replies, :developers, :projects, :developers_projects
-
- class PaginationController < ActionController::Base
- self.template_root = "#{File.dirname(__FILE__)}/../fixtures/"
-
- def simple_paginate
- @topic_pages, @topics = paginate(:topics)
- render :nothing => true
- end
-
- def paginate_with_per_page
- @topic_pages, @topics = paginate(:topics, :per_page => 1)
- render :nothing => true
- end
-
- def paginate_with_order
- @topic_pages, @topics = paginate(:topics, :order => 'created_at asc')
- render :nothing => true
- end
-
- def paginate_with_order_by
- @topic_pages, @topics = paginate(:topics, :order_by => 'created_at asc')
- render :nothing => true
- end
-
- def paginate_with_include_and_order
- @topic_pages, @topics = paginate(:topics, :include => :replies, :order => 'replies.created_at asc, topics.created_at asc')
- render :nothing => true
- end
-
- def paginate_with_conditions
- @topic_pages, @topics = paginate(:topics, :conditions => ["created_at > ?", 30.minutes.ago])
- render :nothing => true
- end
-
- def paginate_with_class_name
- @developer_pages, @developers = paginate(:developers, :class_name => "DeVeLoPeR")
- render :nothing => true
- end
-
- def paginate_with_singular_name
- @developer_pages, @developers = paginate()
- render :nothing => true
- end
-
- def paginate_with_joins
- @developer_pages, @developers = paginate(:developers,
- :joins => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id',
- :conditions => 'project_id=1')
- render :nothing => true
- end
-
- def paginate_with_join
- @developer_pages, @developers = paginate(:developers,
- :join => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id',
- :conditions => 'project_id=1')
- render :nothing => true
- end
-
- def paginate_with_join_and_count
- @developer_pages, @developers = paginate(:developers,
- :join => 'd LEFT JOIN developers_projects ON d.id = developers_projects.developer_id',
- :conditions => 'project_id=1',
- :count => "d.id")
- render :nothing => true
- end
-
- def rescue_errors(e) raise e end
-
- def rescue_action(e) raise end
-
- end
-
- def setup
- @controller = PaginationController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- super
- end
-
- # Single Action Pagination Tests
-
- def test_simple_paginate
- get :simple_paginate
- assert_equal 1, assigns(:topic_pages).page_count
- assert_equal 3, assigns(:topics).size
- end
-
- def test_paginate_with_per_page
- get :paginate_with_per_page
- assert_equal 1, assigns(:topics).size
- assert_equal 3, assigns(:topic_pages).page_count
- end
-
- def test_paginate_with_order
- get :paginate_with_order
- expected = [topics(:futurama),
- topics(:harvey_birdman),
- topics(:rails)]
- assert_equal expected, assigns(:topics)
- assert_equal 1, assigns(:topic_pages).page_count
- end
-
- def test_paginate_with_order_by
- get :paginate_with_order
- expected = assigns(:topics)
- get :paginate_with_order_by
- assert_equal expected, assigns(:topics)
- assert_equal 1, assigns(:topic_pages).page_count
- end
-
- def test_paginate_with_conditions
- get :paginate_with_conditions
- expected = [topics(:rails)]
- assert_equal expected, assigns(:topics)
- assert_equal 1, assigns(:topic_pages).page_count
- end
-
- def test_paginate_with_class_name
- get :paginate_with_class_name
-
- assert assigns(:developers).size > 0
- assert_equal DeVeLoPeR, assigns(:developers).first.class
- end
-
- def test_paginate_with_joins
- get :paginate_with_joins
- assert_equal 2, assigns(:developers).size
- developer_names = assigns(:developers).map { |d| d.name }
- assert developer_names.include?('David')
- assert developer_names.include?('Jamis')
- end
-
- def test_paginate_with_join_and_conditions
- get :paginate_with_joins
- expected = assigns(:developers)
- get :paginate_with_join
- assert_equal expected, assigns(:developers)
- end
-
- def test_paginate_with_join_and_count
- get :paginate_with_joins
- expected = assigns(:developers)
- get :paginate_with_join_and_count
- assert_equal expected, assigns(:developers)
- end
-
- def test_paginate_with_include_and_order
- get :paginate_with_include_and_order
- expected = Topic.find(:all, :include => 'replies', :order => 'replies.created_at asc, topics.created_at asc', :limit => 10)
- assert_equal expected, assigns(:topics)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb b/tracks/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb
deleted file mode 100644
index 5489f522..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb
+++ /dev/null
@@ -1,610 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-# a controller class to facilitate the tests
-class ActionPackAssertionsController < ActionController::Base
-
- # this does absolutely nothing
- def nothing() head :ok end
-
- # a standard template
- def hello_world() render "test/hello_world"; end
-
- # a standard template
- def hello_xml_world() render "test/hello_xml_world"; end
-
- # a redirect to an internal location
- def redirect_internal() redirect_to "/nothing"; end
-
- def redirect_to_action() redirect_to :action => "flash_me", :id => 1, :params => { "panda" => "fun" }; end
-
- def redirect_to_controller() redirect_to :controller => "elsewhere", :action => "flash_me"; end
-
- def redirect_to_path() redirect_to '/some/path' end
-
- def redirect_to_named_route() redirect_to route_one_url end
-
- # a redirect to an external location
- def redirect_external() redirect_to_url "http://www.rubyonrails.org"; end
-
- # a 404
- def response404() head '404 AWOL' end
-
- # a 500
- def response500() head '500 Sorry' end
-
- # a fictional 599
- def response599() head '599 Whoah!' end
-
- # putting stuff in the flash
- def flash_me
- flash['hello'] = 'my name is inigo montoya...'
- render_text "Inconceivable!"
- end
-
- # we have a flash, but nothing is in it
- def flash_me_naked
- flash.clear
- render_text "wow!"
- end
-
- # assign some template instance variables
- def assign_this
- @howdy = "ho"
- render :inline => "Mr. Henke"
- end
-
- def render_based_on_parameters
- render_text "Mr. #{params[:name]}"
- end
-
- def render_url
- render_text "#{url_for(:action => 'flash_me', :only_path => true)}
"
- end
-
- def render_text_with_custom_content_type
- render :text => "Hello!", :content_type => Mime::RSS
- end
-
- # puts something in the session
- def session_stuffing
- session['xmas'] = 'turkey'
- render_text "ho ho ho"
- end
-
- # raises exception on get requests
- def raise_on_get
- raise "get" if request.get?
- render_text "request method: #{request.env['REQUEST_METHOD']}"
- end
-
- # raises exception on post requests
- def raise_on_post
- raise "post" if request.post?
- render_text "request method: #{request.env['REQUEST_METHOD']}"
- end
-
- def get_valid_record
- @record = Class.new do
- def valid?
- true
- end
-
- def errors
- Class.new do
- def full_messages; []; end
- end.new
- end
-
- end.new
-
- render :nothing => true
- end
-
-
- def get_invalid_record
- @record = Class.new do
-
- def valid?
- false
- end
-
- def errors
- Class.new do
- def full_messages; ['...stuff...']; end
- end.new
- end
- end.new
-
- render :nothing => true
- end
-
- # 911
- def rescue_action(e) raise; end
-end
-
-module Admin
- class InnerModuleController < ActionController::Base
- def index
- render :nothing => true
- end
-
- def redirect_to_index
- redirect_to admin_inner_module_path
- end
-
- def redirect_to_absolute_controller
- redirect_to :controller => '/content'
- end
-
- def redirect_to_fellow_controller
- redirect_to :controller => 'user'
- end
-
- def redirect_to_top_level_named_route
- redirect_to top_level_url(:id => "foo")
- end
- end
-end
-
-# ---------------------------------------------------------------------------
-
-
-# tell the controller where to find its templates but start from parent
-# directory of test_request_response to simulate the behaviour of a
-# production environment
-ActionPackAssertionsController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-
-# a test case to exercise the new capabilities TestRequest & TestResponse
-class ActionPackAssertionsControllerTest < Test::Unit::TestCase
- # let's get this party started
- def setup
- ActionController::Routing::Routes.reload
- ActionController::Routing.use_controllers!(%w(action_pack_assertions admin/inner_module content admin/user))
- @controller = ActionPackAssertionsController.new
- @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
- end
-
- def teardown
- ActionController::Routing::Routes.reload
- end
-
- # -- assertion-based testing ------------------------------------------------
-
- def test_assert_tag_and_url_for
- get :render_url
- assert_tag :content => "/action_pack_assertions/flash_me"
- end
-
- # test the session assertion to make sure something is there.
- def test_assert_session_has
- process :session_stuffing
- assert_deprecated_assertion { assert_session_has 'xmas' }
- assert_deprecated_assertion { assert_session_has_no 'halloween' }
- end
-
- # test the get method, make sure the request really was a get
- def test_get
- assert_raise(RuntimeError) { get :raise_on_get }
- get :raise_on_post
- assert_equal @response.body, 'request method: GET'
- end
-
- # test the get method, make sure the request really was a get
- def test_post
- assert_raise(RuntimeError) { post :raise_on_post }
- post :raise_on_get
- assert_equal @response.body, 'request method: POST'
- end
-
-# the following test fails because the request_method is now cached on the request instance
-# test the get/post switch within one test action
-# def test_get_post_switch
-# post :raise_on_get
-# assert_equal @response.body, 'request method: POST'
-# get :raise_on_post
-# assert_equal @response.body, 'request method: GET'
-# post :raise_on_get
-# assert_equal @response.body, 'request method: POST'
-# get :raise_on_post
-# assert_equal @response.body, 'request method: GET'
-# end
-
- # test the assertion of goodies in the template
- def test_assert_template_has
- process :assign_this
- assert_deprecated_assertion { assert_template_has 'howdy' }
- end
-
- # test the assertion for goodies that shouldn't exist in the template
- def test_assert_template_has_no
- process :nothing
- assert_deprecated_assertion { assert_template_has_no 'maple syrup' }
- assert_deprecated_assertion { assert_template_has_no 'howdy' }
- end
-
- # test the redirection assertions
- def test_assert_redirect
- process :redirect_internal
- assert_deprecated_assertion { assert_redirect }
- end
-
- # test the redirect url string
- def test_assert_redirect_url
- process :redirect_external
- assert_deprecated_assertion do
- assert_redirect_url 'http://www.rubyonrails.org'
- end
- end
-
- # test the redirection pattern matching on a string
- def test_assert_redirect_url_match_string
- process :redirect_external
- assert_deprecated_assertion do
- assert_redirect_url_match 'rails.org'
- end
- end
-
- # test the redirection pattern matching on a pattern
- def test_assert_redirect_url_match_pattern
- process :redirect_external
- assert_deprecated_assertion do
- assert_redirect_url_match /ruby/
- end
- end
-
- # test the redirection to a named route
- def test_assert_redirect_to_named_route
- with_routing do |set|
- set.draw do |map|
- map.route_one 'route_one', :controller => 'action_pack_assertions', :action => 'nothing'
- map.connect ':controller/:action/:id'
- end
- set.named_routes.install
-
- process :redirect_to_named_route
- assert_redirected_to 'http://test.host/route_one'
- assert_redirected_to route_one_url
- assert_redirected_to :route_one_url
- end
- end
-
- def test_assert_redirect_to_named_route_failure
- with_routing do |set|
- set.draw do |map|
- map.route_one 'route_one', :controller => 'action_pack_assertions', :action => 'nothing', :id => 'one'
- map.route_two 'route_two', :controller => 'action_pack_assertions', :action => 'nothing', :id => 'two'
- map.connect ':controller/:action/:id'
- end
- process :redirect_to_named_route
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to 'http://test.host/route_two'
- end
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to :controller => 'action_pack_assertions', :action => 'nothing', :id => 'two'
- end
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to route_two_url
- end
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to :route_two_url
- end
- end
- end
-
- def test_assert_redirect_to_nested_named_route
- with_routing do |set|
- set.draw do |map|
- map.admin_inner_module 'admin/inner_module', :controller => 'admin/inner_module', :action => 'index'
- map.connect ':controller/:action/:id'
- end
- @controller = Admin::InnerModuleController.new
- process :redirect_to_index
- # redirection is <{"action"=>"index", "controller"=>"admin/admin/inner_module"}>
- assert_redirected_to admin_inner_module_path
- end
- end
-
- def test_assert_redirected_to_top_level_named_route_from_nested_controller
- with_routing do |set|
- set.draw do |map|
- map.top_level '/action_pack_assertions/:id', :controller => 'action_pack_assertions', :action => 'index'
- map.connect ':controller/:action/:id'
- end
- @controller = Admin::InnerModuleController.new
- process :redirect_to_top_level_named_route
- # passes -> assert_redirected_to "http://test.host/action_pack_assertions/foo"
- assert_redirected_to "/action_pack_assertions/foo"
- end
- end
-
- # test the flash-based assertions with something is in the flash
- def test_flash_assertions_full
- process :flash_me
- assert @response.has_flash_with_contents?
- assert_deprecated_assertion { assert_flash_exists }
- assert_deprecated_assertion { assert_flash_not_empty }
- assert_deprecated_assertion { assert_flash_has 'hello' }
- assert_deprecated_assertion { assert_flash_has_no 'stds' }
- end
-
- # test the flash-based assertions with no flash at all
- def test_flash_assertions_negative
- process :nothing
- assert_deprecated_assertion { assert_flash_empty }
- assert_deprecated_assertion { assert_flash_has_no 'hello' }
- assert_deprecated_assertion { assert_flash_has_no 'qwerty' }
- end
-
- # test the assert_rendered_file
- def test_assert_rendered_file
- assert_deprecated(/render/) { process :hello_world }
- assert_deprecated_assertion { assert_rendered_file 'test/hello_world' }
- assert_deprecated_assertion { assert_rendered_file 'hello_world' }
- end
-
- # test the assert_success assertion
- def test_assert_success
- process :nothing
- assert_deprecated_assertion { assert_success }
- end
-
- # -- standard request/response object testing --------------------------------
-
- # ensure our session is working properly
- def test_session_objects
- process :session_stuffing
- assert @response.has_session_object?('xmas')
- assert_deprecated_assertion { assert_session_equal 'turkey', 'xmas' }
- assert !@response.has_session_object?('easter')
- end
-
- # make sure that the template objects exist
- def test_template_objects_alive
- process :assign_this
- assert !@response.has_template_object?('hi')
- assert @response.has_template_object?('howdy')
- end
-
- # make sure we don't have template objects when we shouldn't
- def test_template_object_missing
- process :nothing
- assert_nil @response.template_objects['howdy']
- end
-
- def test_assigned_equal
- process :assign_this
- assert_deprecated_assertion { assert_assigned_equal "ho", :howdy }
- end
-
- # check the empty flashing
- def test_flash_me_naked
- process :flash_me_naked
- assert !@response.has_flash?
- assert !@response.has_flash_with_contents?
- end
-
- # check if we have flash objects
- def test_flash_haves
- process :flash_me
- assert @response.has_flash?
- assert @response.has_flash_with_contents?
- assert @response.has_flash_object?('hello')
- end
-
- # ensure we don't have flash objects
- def test_flash_have_nots
- process :nothing
- assert !@response.has_flash?
- assert !@response.has_flash_with_contents?
- assert_nil @response.flash['hello']
- end
-
- # examine that the flash objects are what we expect
- def test_flash_equals
- process :flash_me
- assert_deprecated_assertion do
- assert_flash_equal 'my name is inigo montoya...', 'hello'
- end
- end
-
- # check if we were rendered by a file-based template?
- def test_rendered_action
- process :nothing
- assert !@response.rendered_with_file?
-
- assert_deprecated(/render/) { process :hello_world }
- assert @response.rendered_with_file?
- assert 'hello_world', @response.rendered_file
- end
-
- # check the redirection location
- def test_redirection_location
- process :redirect_internal
- assert_equal 'http://test.host/nothing', @response.redirect_url
-
- process :redirect_external
- assert_equal 'http://www.rubyonrails.org', @response.redirect_url
- end
-
- def test_no_redirect_url
- process :nothing
- assert_nil @response.redirect_url
- end
-
-
- # check server errors
- def test_server_error_response_code
- process :response500
- assert @response.server_error?
-
- process :response599
- assert @response.server_error?
-
- process :response404
- assert !@response.server_error?
- end
-
- # check a 404 response code
- def test_missing_response_code
- process :response404
- assert @response.missing?
- end
-
- # check to see if our redirection matches a pattern
- def test_redirect_url_match
- process :redirect_external
- assert @response.redirect?
- assert @response.redirect_url_match?("rubyonrails")
- assert @response.redirect_url_match?(/rubyonrails/)
- assert !@response.redirect_url_match?("phpoffrails")
- assert !@response.redirect_url_match?(/perloffrails/)
- end
-
- # check for a redirection
- def test_redirection
- process :redirect_internal
- assert @response.redirect?
-
- process :redirect_external
- assert @response.redirect?
-
- process :nothing
- assert !@response.redirect?
- end
-
- # check a successful response code
- def test_successful_response_code
- process :nothing
- assert @response.success?
- end
-
- # a basic check to make sure we have a TestResponse object
- def test_has_response
- process :nothing
- assert_kind_of ActionController::TestResponse, @response
- end
-
- def test_render_based_on_parameters
- process :render_based_on_parameters, "name" => "David"
- assert_equal "Mr. David", @response.body
- end
-
- def test_assert_template_xpath_match_no_matches
- assert_deprecated(/render/) { process :hello_xml_world }
- assert_raises Test::Unit::AssertionFailedError do
- assert_deprecated_assertion do
- assert_template_xpath_match('/no/such/node/in/document')
- end
- end
- end
-
- def test_simple_one_element_xpath_match
- assert_deprecated(/render/) { process :hello_xml_world }
- assert_deprecated_assertion do
- assert_template_xpath_match('//title', "Hello World")
- end
- end
-
- def test_array_of_elements_in_xpath_match
- assert_deprecated(/render/) { process :hello_xml_world }
- assert_deprecated_assertion do
- assert_template_xpath_match('//p', %w( abes monks wiseguys ))
- end
- end
-
- def test_follow_redirect
- process :redirect_to_action
- assert_redirected_to :action => "flash_me"
-
- follow_redirect
- assert_equal 1, @request.parameters["id"].to_i
-
- assert "Inconceivable!", @response.body
- end
-
- def test_follow_redirect_outside_current_action
- process :redirect_to_controller
- assert_redirected_to :controller => "elsewhere", :action => "flash_me"
-
- assert_raises(RuntimeError, "Can't follow redirects outside of current controller (elsewhere)") { follow_redirect }
- end
-
- def test_assert_redirection_fails_with_incorrect_controller
- process :redirect_to_controller
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to :controller => "action_pack_assertions", :action => "flash_me"
- end
- end
-
- def test_assert_redirection_with_extra_controller_option
- get :redirect_to_action
- assert_redirected_to :controller => 'action_pack_assertions', :action => "flash_me", :id => 1, :params => { :panda => 'fun' }
- end
-
- def test_redirected_to_url_leadling_slash
- process :redirect_to_path
- assert_redirected_to '/some/path'
- end
- def test_redirected_to_url_no_leadling_slash
- process :redirect_to_path
- assert_redirected_to 'some/path'
- end
- def test_redirected_to_url_full_url
- process :redirect_to_path
- assert_redirected_to 'http://test.host/some/path'
- end
-
- def test_redirected_to_with_nested_controller
- @controller = Admin::InnerModuleController.new
- get :redirect_to_absolute_controller
- assert_redirected_to :controller => 'content'
-
- get :redirect_to_fellow_controller
- assert_redirected_to :controller => 'admin/user'
- end
-
- def test_assert_valid
- get :get_valid_record
- assert_valid assigns('record')
- end
-
- def test_assert_valid_failing
- get :get_invalid_record
-
- begin
- assert_valid assigns('record')
- assert false
- rescue Test::Unit::AssertionFailedError => e
- end
- end
-
- protected
- def assert_deprecated_assertion(&block)
- assert_deprecated(/assert/, &block)
- end
-end
-
-class ActionPackHeaderTest < Test::Unit::TestCase
- def setup
- @controller = ActionPackAssertionsController.new
- @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
- end
-
- def test_rendering_xml_sets_content_type
- assert_deprecated(/render/) { process :hello_xml_world }
- assert_equal('application/xml; charset=utf-8', @controller.headers['Content-Type'])
- end
-
- def test_rendering_xml_respects_content_type
- @response.headers['Content-Type'] = 'application/pdf'
- assert_deprecated(/render/) { process :hello_xml_world }
- assert_equal('application/pdf; charset=utf-8', @controller.headers['Content-Type'])
- end
-
-
- def test_render_text_with_custom_content_type
- get :render_text_with_custom_content_type
- assert_equal 'application/rss+xml; charset=utf-8', @response.headers['Content-Type']
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/addresses_render_test.rb b/tracks/vendor/rails/actionpack/test/controller/addresses_render_test.rb
deleted file mode 100644
index 4de1c805..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/addresses_render_test.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class Address
-
- def Address.count(conditions = nil, join = nil)
- nil
- end
-
- def Address.find_all(arg1, arg2, arg3, arg4)
- []
- end
-
- def self.find(*args)
- []
- end
-end
-
-class AddressesTestController < ActionController::Base
- scaffold :address
-
- def self.controller_name; "addresses"; end
- def self.controller_path; "addresses"; end
-end
-
-AddressesTestController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class AddressesTest < Test::Unit::TestCase
- def setup
- @controller = AddressesTestController.new
-
- # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
- # a more accurate simulation of what happens in "real life".
- @controller.logger = Logger.new(nil)
-
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_list
- get :list
- assert_equal "We only need to get this far!", @response.body.chomp
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/assert_select_test.rb b/tracks/vendor/rails/actionpack/test/controller/assert_select_test.rb
deleted file mode 100644
index 2c180dbc..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/assert_select_test.rb
+++ /dev/null
@@ -1,576 +0,0 @@
-#--
-# Copyright (c) 2006 Assaf Arkin (http://labnotes.org)
-# Under MIT and/or CC By license.
-#++
-
-require File.dirname(__FILE__) + '/../abstract_unit'
-require File.dirname(__FILE__) + '/fake_controllers'
-
-
-unless defined?(ActionMailer)
- begin
- $:.unshift(File.dirname(__FILE__) + "/../../../actionmailer/lib")
- require 'action_mailer'
- rescue LoadError
- require 'rubygems'
- require_gem 'actionmailer'
- end
-end
-
-class AssertSelectTest < Test::Unit::TestCase
- class AssertSelectController < ActionController::Base
- def response_with=(content)
- @content = content
- end
-
- def response_with(&block)
- @update = block
- end
-
- def html()
- render :text=>@content, :layout=>false, :content_type=>Mime::HTML
- @content = nil
- end
-
- def rjs()
- render :update do |page|
- @update.call page
- end
- @update = nil
- end
-
- def xml()
- render :text=>@content, :layout=>false, :content_type=>Mime::XML
- @content = nil
- end
-
- def rescue_action(e)
- raise e
- end
- end
-
- class AssertSelectMailer < ActionMailer::Base
- def test(html)
- recipients "test "
- from "test@test.host"
- subject "Test e-mail"
- part :content_type=>"text/html", :body=>html
- end
- end
-
- AssertionFailedError = Test::Unit::AssertionFailedError
-
- def setup
- @controller = AssertSelectController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
- end
-
-
- def teardown
- ActionMailer::Base.deliveries.clear
- end
-
-
- #
- # Test assert select.
- #
-
- def test_assert_select
- render_html %Q{
}
- assert_select "div", 2
- assert_raises(AssertionFailedError) { assert_select "div", 3 }
- assert_raises(AssertionFailedError){ assert_select "p" }
- end
-
-
- def test_equality_true_false
- render_html %Q{
}
- assert_nothing_raised { assert_select "div" }
- assert_raises(AssertionFailedError) { assert_select "p" }
- assert_nothing_raised { assert_select "div", true }
- assert_raises(AssertionFailedError) { assert_select "p", true }
- assert_raises(AssertionFailedError) { assert_select "div", false }
- assert_nothing_raised { assert_select "p", false }
- end
-
-
- def test_equality_string_and_regexp
- render_html %Q{foo
foo
}
- assert_nothing_raised { assert_select "div", "foo" }
- assert_raises(AssertionFailedError) { assert_select "div", "bar" }
- assert_nothing_raised { assert_select "div", :text=>"foo" }
- assert_raises(AssertionFailedError) { assert_select "div", :text=>"bar" }
- assert_nothing_raised { assert_select "div", /(foo|bar)/ }
- assert_raises(AssertionFailedError) { assert_select "div", /foobar/ }
- assert_nothing_raised { assert_select "div", :text=>/(foo|bar)/ }
- assert_raises(AssertionFailedError) { assert_select "div", :text=>/foobar/ }
- assert_raises(AssertionFailedError) { assert_select "p", :text=>/foobar/ }
- end
-
-
- def test_equality_of_html
- render_html %Q{\n"This is not a big problem," he said.\n
}
- text = "\"This is not a big problem,\" he said."
- html = "\"This is not a big problem,\" he said."
- assert_nothing_raised { assert_select "p", text }
- assert_raises(AssertionFailedError) { assert_select "p", html }
- assert_nothing_raised { assert_select "p", :html=>html }
- assert_raises(AssertionFailedError) { assert_select "p", :html=>text }
- # No stripping for pre.
- render_html %Q{\n"This is not a big problem," he said.\n }
- text = "\n\"This is not a big problem,\" he said.\n"
- html = "\n\"This is not a big problem,\" he said.\n"
- assert_nothing_raised { assert_select "pre", text }
- assert_raises(AssertionFailedError) { assert_select "pre", html }
- assert_nothing_raised { assert_select "pre", :html=>html }
- assert_raises(AssertionFailedError) { assert_select "pre", :html=>text }
- end
-
-
- def test_equality_of_instances
- render_html %Q{foo
foo
}
- assert_nothing_raised { assert_select "div", 2 }
- assert_raises(AssertionFailedError) { assert_select "div", 3 }
- assert_nothing_raised { assert_select "div", 1..2 }
- assert_raises(AssertionFailedError) { assert_select "div", 3..4 }
- assert_nothing_raised { assert_select "div", :count=>2 }
- assert_raises(AssertionFailedError) { assert_select "div", :count=>3 }
- assert_nothing_raised { assert_select "div", :minimum=>1 }
- assert_nothing_raised { assert_select "div", :minimum=>2 }
- assert_raises(AssertionFailedError) { assert_select "div", :minimum=>3 }
- assert_nothing_raised { assert_select "div", :maximum=>2 }
- assert_nothing_raised { assert_select "div", :maximum=>3 }
- assert_raises(AssertionFailedError) { assert_select "div", :maximum=>1 }
- assert_nothing_raised { assert_select "div", :minimum=>1, :maximum=>2 }
- assert_raises(AssertionFailedError) { assert_select "div", :minimum=>3, :maximum=>4 }
- end
-
-
- def test_substitution_values
- render_html %Q{foo
foo
}
- assert_select "div#?", /\d+/ do |elements|
- assert_equal 2, elements.size
- end
- assert_select "div" do
- assert_select "div#?", /\d+/ do |elements|
- assert_equal 2, elements.size
- assert_select "#1"
- assert_select "#2"
- end
- end
- end
-
-
- def test_nested_assert_select
- render_html %Q{foo
foo
}
- assert_select "div" do |elements|
- assert_equal 2, elements.size
- assert_select elements[0], "#1"
- assert_select elements[1], "#2"
- end
- assert_select "div" do
- assert_select "div" do |elements|
- assert_equal 2, elements.size
- # Testing in a group is one thing
- assert_select "#1,#2"
- # Testing individually is another.
- assert_select "#1"
- assert_select "#2"
- assert_select "#3", false
- end
- end
- end
-
-
- def test_assert_select_text_match
- render_html %Q{foo
bar
}
- assert_select "div" do
- assert_nothing_raised { assert_select "div", "foo" }
- assert_nothing_raised { assert_select "div", "bar" }
- assert_nothing_raised { assert_select "div", /\w*/ }
- assert_nothing_raised { assert_select "div", /\w*/, :count=>2 }
- assert_raises(AssertionFailedError) { assert_select "div", :text=>"foo", :count=>2 }
- assert_nothing_raised { assert_select "div", :html=>"bar " }
- assert_nothing_raised { assert_select "div", :html=>"bar " }
- assert_nothing_raised { assert_select "div", :html=>/\w*/ }
- assert_nothing_raised { assert_select "div", :html=>/\w*/, :count=>2 }
- assert_raises(AssertionFailedError) { assert_select "div", :html=>"foo ", :count=>2 }
- end
- end
-
-
- # With single result.
- def test_assert_select_from_rjs_with_single_result
- render_rjs do |page|
- page.replace_html "test", "foo
\nfoo
"
- end
- assert_select "div" do |elements|
- assert elements.size == 2
- assert_select "#1"
- assert_select "#2"
- end
- assert_select "div#?", /\d+/ do |elements|
- assert_select "#1"
- assert_select "#2"
- end
- end
-
- # With multiple results.
- def test_assert_select_from_rjs_with_multiple_results
- render_rjs do |page|
- page.replace_html "test", "foo
"
- page.replace_html "test2", "foo
"
- end
- assert_select "div" do |elements|
- assert elements.size == 2
- assert_select "#1"
- assert_select "#2"
- end
- end
-
-
- #
- # Test css_select.
- #
-
-
- def test_css_select
- render_html %Q{
}
- assert 2, css_select("div").size
- assert 0, css_select("p").size
- end
-
-
- def test_nested_css_select
- render_html %Q{foo
foo
}
- assert_select "div#?", /\d+/ do |elements|
- assert_equal 1, css_select(elements[0], "div").size
- assert_equal 1, css_select(elements[1], "div").size
- end
- assert_select "div" do
- assert_equal 2, css_select("div").size
- css_select("div").each do |element|
- # Testing as a group is one thing
- assert !css_select("#1,#2").empty?
- # Testing individually is another
- assert !css_select("#1").empty?
- assert !css_select("#2").empty?
- end
- end
- end
-
-
- # With one result.
- def test_css_select_from_rjs_with_single_result
- render_rjs do |page|
- page.replace_html "test", "foo
\nfoo
"
- end
- assert_equal 2, css_select("div").size
- assert_equal 1, css_select("#1").size
- assert_equal 1, css_select("#2").size
- end
-
- # With multiple results.
- def test_css_select_from_rjs_with_multiple_results
- render_rjs do |page|
- page.replace_html "test", "foo
"
- page.replace_html "test2", "foo
"
- end
-
- assert_equal 2, css_select("div").size
- assert_equal 1, css_select("#1").size
- assert_equal 1, css_select("#2").size
- end
-
-
- #
- # Test assert_select_rjs.
- #
-
-
- # Test that we can pick up all statements in the result.
- def test_assert_select_rjs_picks_up_all_statements
- render_rjs do |page|
- page.replace "test", "foo
"
- page.replace_html "test2", "foo
"
- page.insert_html :top, "test3", "foo
"
- end
-
- found = false
- assert_select_rjs do
- assert_select "#1"
- assert_select "#2"
- assert_select "#3"
- found = true
- end
- assert found
- end
-
- # Test that we fail if there is nothing to pick.
- def test_assert_select_rjs_fails_if_nothing_to_pick
- render_rjs { }
- assert_raises(AssertionFailedError) { assert_select_rjs }
- end
-
- def test_assert_select_rjs_with_unicode
- # Test that non-ascii characters (which are converted into \uXXXX in RJS) are decoded correctly.
- render_rjs do |page|
- page.replace "test", "\343\203\201\343\202\261\343\203\203\343\203\210
"
- end
- assert_select_rjs do
- assert_select "#1", :text => "\343\203\201\343\202\261\343\203\203\343\203\210"
- assert_select "#1", "\343\203\201\343\202\261\343\203\203\343\203\210"
- assert_select "#1", Regexp.new("\343\203\201..\343\203\210",0,'U')
- assert_raises(AssertionFailedError) { assert_select "#1", Regexp.new("\343\203\201.\343\203\210",0,'U') }
- end
- end
-
- def test_assert_select_rjs_with_id
- # Test that we can pick up all statements in the result.
- render_rjs do |page|
- page.replace "test1", "foo
"
- page.replace_html "test2", "foo
"
- page.insert_html :top, "test3", "foo
"
- end
- assert_select_rjs "test1" do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_select_rjs "test2" do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_select_rjs "test3" do
- assert_select "div", 1
- assert_select "#3"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs "test4" }
- end
-
-
- def test_assert_select_rjs_for_replace
- render_rjs do |page|
- page.replace "test1", "foo
"
- page.replace_html "test2", "foo
"
- page.insert_html :top, "test3", "foo
"
- end
- # Replace.
- assert_select_rjs :replace do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_select_rjs :replace, "test1" do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs :replace, "test2" }
- # Replace HTML.
- assert_select_rjs :replace_html do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_select_rjs :replace_html, "test2" do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs :replace_html, "test1" }
- end
-
- def test_assert_select_rjs_for_chained_replace
- render_rjs do |page|
- page['test1'].replace "foo
"
- page['test2'].replace_html "foo
"
- page.insert_html :top, "test3", "foo
"
- end
- # Replace.
- assert_select_rjs :chained_replace do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_select_rjs :chained_replace, "test1" do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs :chained_replace, "test2" }
- # Replace HTML.
- assert_select_rjs :chained_replace_html do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_select_rjs :chained_replace_html, "test2" do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs :replace_html, "test1" }
- end
-
- # Non-positioned insert.
- def test_assert_select_rjs_for_nonpositioned_insert
- render_rjs do |page|
- page.replace "test1", "foo
"
- page.replace_html "test2", "foo
"
- page.insert_html :top, "test3", "foo
"
- end
- assert_select_rjs :insert_html do
- assert_select "div", 1
- assert_select "#3"
- end
- assert_select_rjs :insert_html, "test3" do
- assert_select "div", 1
- assert_select "#3"
- end
- assert_raises(AssertionFailedError) { assert_select_rjs :insert_html, "test1" }
- end
-
- # Positioned insert.
- def test_assert_select_rjs_for_positioned_insert
- render_rjs do |page|
- page.insert_html :top, "test1", "foo
"
- page.insert_html :bottom, "test2", "foo
"
- page.insert_html :before, "test3", "foo
"
- page.insert_html :after, "test4", "foo
"
- end
- assert_select_rjs :insert, :top do
- assert_select "div", 1
- assert_select "#1"
- end
- assert_select_rjs :insert, :bottom do
- assert_select "div", 1
- assert_select "#2"
- end
- assert_select_rjs :insert, :before do
- assert_select "div", 1
- assert_select "#3"
- end
- assert_select_rjs :insert, :after do
- assert_select "div", 1
- assert_select "#4"
- end
- assert_select_rjs :insert_html do
- assert_select "div", 4
- end
- end
-
-
- # Simple selection from a single result.
- def test_nested_assert_select_rjs_with_single_result
- render_rjs do |page|
- page.replace_html "test", "foo
\nfoo
"
- end
-
- assert_select_rjs "test" do |elements|
- assert_equal 2, elements.size
- assert_select "#1"
- assert_select "#2"
- end
- end
-
- # Deal with two results.
- def test_nested_assert_select_rjs_with_two_results
- render_rjs do |page|
- page.replace_html "test", "foo
"
- page.replace_html "test2", "foo
"
- end
-
- assert_select_rjs "test" do |elements|
- assert_equal 1, elements.size
- assert_select "#1"
- end
-
- assert_select_rjs "test2" do |elements|
- assert_equal 1, elements.size
- assert_select "#2"
- end
- end
-
-
- def test_feed_item_encoded
- render_xml <<-EOF
-
-
- -
-
- Test 1
- ]]>
-
-
- -
-
- Test 2
- ]]>
-
-
-
-
-EOF
- assert_select "channel item description" do
- # Test element regardless of wrapper.
- assert_select_encoded do
- assert_select "p", :count=>2, :text=>/Test/
- end
- # Test through encoded wrapper.
- assert_select_encoded do
- assert_select "encoded p", :count=>2, :text=>/Test/
- end
- # Use :root instead (recommended)
- assert_select_encoded do
- assert_select ":root p", :count=>2, :text=>/Test/
- end
- # Test individually.
- assert_select "description" do |elements|
- assert_select_encoded elements[0] do
- assert_select "p", "Test 1"
- end
- assert_select_encoded elements[1] do
- assert_select "p", "Test 2"
- end
- end
- end
-
- # Test that we only un-encode element itself.
- assert_select "channel item" do
- assert_select_encoded do
- assert_select "p", 0
- end
- end
- end
-
-
- #
- # Test assert_select_email
- #
-
- def test_assert_select_email
- assert_raises(AssertionFailedError) { assert_select_email {} }
- AssertSelectMailer.deliver_test ""
- assert_select_email do
- assert_select "div:root" do
- assert_select "p:first-child", "foo"
- assert_select "p:last-child", "bar"
- end
- end
- end
-
-
- protected
- def render_html(html)
- @controller.response_with = html
- get :html
- end
-
- def render_rjs(&block)
- @controller.response_with &block
- get :rjs
- end
-
- def render_xml(xml)
- @controller.response_with = xml
- get :xml
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/base_test.rb b/tracks/vendor/rails/actionpack/test/controller/base_test.rb
deleted file mode 100644
index bcc47326..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/base_test.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
-require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
-
-# Provide some controller to run the tests on.
-module Submodule
- class ContainedEmptyController < ActionController::Base
- end
- class ContainedNonEmptyController < ActionController::Base
- def public_action
- end
-
- hide_action :hidden_action
- def hidden_action
- raise "Noooo!"
- end
-
- def another_hidden_action
- end
- hide_action :another_hidden_action
- end
- class SubclassedController < ContainedNonEmptyController
- hide_action :public_action # Hiding it here should not affect the superclass.
- end
-end
-class EmptyController < ActionController::Base
-end
-class NonEmptyController < ActionController::Base
- def public_action
- end
-
- hide_action :hidden_action
- def hidden_action
- end
-end
-
-class MethodMissingController < ActionController::Base
-
- hide_action :shouldnt_be_called
- def shouldnt_be_called
- raise "NO WAY!"
- end
-
-protected
-
- def method_missing(selector)
- render :text => selector.to_s
- end
-
-end
-
-class ControllerClassTests < Test::Unit::TestCase
- def test_controller_path
- assert_equal 'empty', EmptyController.controller_path
- assert_equal EmptyController.controller_path, EmptyController.new.controller_path
- assert_equal 'submodule/contained_empty', Submodule::ContainedEmptyController.controller_path
- assert_equal Submodule::ContainedEmptyController.controller_path, Submodule::ContainedEmptyController.new.controller_path
- end
- def test_controller_name
- assert_equal 'empty', EmptyController.controller_name
- assert_equal 'contained_empty', Submodule::ContainedEmptyController.controller_name
- end
-end
-
-class ControllerInstanceTests < Test::Unit::TestCase
- def setup
- @empty = EmptyController.new
- @contained = Submodule::ContainedEmptyController.new
- @empty_controllers = [@empty, @contained, Submodule::SubclassedController.new]
-
- @non_empty_controllers = [NonEmptyController.new,
- Submodule::ContainedNonEmptyController.new]
- end
-
- def test_action_methods
- @empty_controllers.each do |c|
- hide_mocha_methods_from_controller(c)
- assert_equal Set.new, c.send(:action_methods), "#{c.controller_path} should be empty!"
- end
- @non_empty_controllers.each do |c|
- hide_mocha_methods_from_controller(c)
- assert_equal Set.new('public_action'), c.send(:action_methods), "#{c.controller_path} should not be empty!"
- end
- end
-
- protected
-
- # Mocha adds methods to Object which are then included in the public_instance_methods
- # This method hides those from the controller so the above tests won't know the difference
- def hide_mocha_methods_from_controller(controller)
- mocha_methods = [:expects, :metaclass, :mocha, :mocha_inspect, :reset_mocha, :stubba_object, :stubba_method, :stubs, :verify]
- controller.class.send(:hide_action, *mocha_methods)
- end
-
-end
-
-
-class PerformActionTest < Test::Unit::TestCase
- def use_controller(controller_class)
- @controller = controller_class.new
-
- # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
- # a more accurate simulation of what happens in "real life".
- @controller.logger = Logger.new(nil)
-
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_get_on_priv_should_show_selector
- use_controller MethodMissingController
- get :shouldnt_be_called
- assert_response :success
- assert_equal 'shouldnt_be_called', @response.body
- end
-
- def test_method_missing_is_not_an_action_name
- use_controller MethodMissingController
- assert ! @controller.send(:action_methods).include?('method_missing')
-
- get :method_missing
- assert_response :success
- assert_equal 'method_missing', @response.body
- end
-
- def test_get_on_hidden_should_fail
- use_controller NonEmptyController
- get :hidden_action
- assert_response 404
-
- get :another_hidden_action
- assert_response 404
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/controller/benchmark_test.rb b/tracks/vendor/rails/actionpack/test/controller/benchmark_test.rb
deleted file mode 100644
index f346e575..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/benchmark_test.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
-
-# Provide some static controllers.
-class BenchmarkedController < ActionController::Base
- def public_action
- render :nothing => true
- end
-
- def rescue_action(e)
- raise e
- end
-end
-
-class BenchmarkTest < Test::Unit::TestCase
- class MockLogger
- def method_missing(*args)
- end
- end
-
- def setup
- @controller = BenchmarkedController.new
- # benchmark doesn't do anything unless a logger is set
- @controller.logger = MockLogger.new
- @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
- @request.host = "test.actioncontroller.i"
- end
-
- def test_with_http_1_0_request
- @request.host = nil
- assert_nothing_raised { get :public_action }
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/caching_test.rb b/tracks/vendor/rails/actionpack/test/controller/caching_test.rb
deleted file mode 100644
index 07e16896..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/caching_test.rb
+++ /dev/null
@@ -1,228 +0,0 @@
-require 'fileutils'
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-CACHE_DIR = 'test_cache'
-# Don't change '/../temp/' cavalierly or you might hoze something you don't want hozed
-FILE_STORE_PATH = File.join(File.dirname(__FILE__), '/../temp/', CACHE_DIR)
-ActionController::Base.perform_caching = true
-ActionController::Base.page_cache_directory = FILE_STORE_PATH
-ActionController::Base.fragment_cache_store = :file_store, FILE_STORE_PATH
-
-class PageCachingTestController < ActionController::Base
- caches_page :ok, :no_content, :found, :not_found
-
- def ok
- head :ok
- end
-
- def no_content
- head :no_content
- end
-
- def found
- redirect_to :action => 'ok'
- end
-
- def not_found
- head :not_found
- end
-end
-
-class PageCachingTest < Test::Unit::TestCase
- def setup
- ActionController::Routing::Routes.draw do |map|
- map.main '', :controller => 'posts'
- map.resources :posts
- map.connect ':controller/:action/:id'
- end
-
- @request = ActionController::TestRequest.new
- @request.host = 'hostname.com'
-
- @response = ActionController::TestResponse.new
- @controller = PageCachingTestController.new
-
- @params = {:controller => 'posts', :action => 'index', :only_path => true, :skip_relative_url_root => true}
- @rewriter = ActionController::UrlRewriter.new(@request, @params)
-
- FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
- FileUtils.mkdir_p(FILE_STORE_PATH)
- end
-
- def teardown
- FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
- end
-
- def test_page_caching_resources_saves_to_correct_path_with_extension_even_if_default_route
- @params[:format] = 'rss'
- assert_equal '/posts.rss', @rewriter.rewrite(@params)
- @params[:format] = nil
- assert_equal '/', @rewriter.rewrite(@params)
- end
-
- def test_should_cache_get_with_ok_status
- get :ok
- assert_response :ok
- assert_page_cached :ok, "get with ok status should have been cached"
- end
-
- [:ok, :no_content, :found, :not_found].each do |status|
- [:get, :post, :put, :delete].each do |method|
- unless method == :get and status == :ok
- define_method "test_shouldnt_cache_#{method}_with_#{status}_status" do
- @request.env['REQUEST_METHOD'] = method.to_s.upcase
- process status
- assert_response status
- assert_page_not_cached status, "#{method} with #{status} status shouldn't have been cached"
- end
- end
- end
- end
-
- private
- def assert_page_cached(action, message = "#{action} should have been cached")
- assert page_cached?(action), message
- end
-
- def assert_page_not_cached(action, message = "#{action} shouldn't have been cached")
- assert !page_cached?(action), message
- end
-
- def page_cached?(action)
- File.exist? "#{FILE_STORE_PATH}/page_caching_test/#{action}.html"
- end
-end
-
-class ActionCachingTestController < ActionController::Base
- caches_action :index
-
- def index
- @cache_this = Time.now.to_f.to_s
- render :text => @cache_this
- end
-
- def expire
- expire_action :controller => 'action_caching_test', :action => 'index'
- render :nothing => true
- end
-
-end
-
-class ActionCachingMockController
- attr_accessor :mock_url_for
- attr_accessor :mock_path
-
- def initialize
- yield self if block_given?
- end
-
- def url_for(*args)
- @mock_url_for
- end
-
- def request
- mocked_path = @mock_path
- Object.new.instance_eval(<<-EVAL)
- def path; '#{@mock_path}' end
- self
- EVAL
- end
-end
-
-class ActionCacheTest < Test::Unit::TestCase
- def setup
- reset!
- FileUtils.mkdir_p(FILE_STORE_PATH)
- @path_class = ActionController::Caching::Actions::ActionCachePath
- @mock_controller = ActionCachingMockController.new
- end
-
- def teardown
- FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
- end
-
- def test_simple_action_cache
- get :index
- cached_time = content_to_cache
- assert_equal cached_time, @response.body
- reset!
-
- get :index
- assert_equal cached_time, @response.body
- end
-
- def test_cache_expiration
- get :index
- cached_time = content_to_cache
- reset!
-
- get :index
- assert_equal cached_time, @response.body
- reset!
-
- get :expire
- reset!
-
- get :index
- new_cached_time = content_to_cache
- assert_not_equal cached_time, @response.body
- reset!
-
- get :index
- assert_response :success
- assert_equal new_cached_time, @response.body
- end
-
- def test_cache_is_scoped_by_subdomain
- @request.host = 'jamis.hostname.com'
- get :index
- jamis_cache = content_to_cache
-
- @request.host = 'david.hostname.com'
- get :index
- david_cache = content_to_cache
- assert_not_equal jamis_cache, @response.body
-
- @request.host = 'jamis.hostname.com'
- get :index
- assert_equal jamis_cache, @response.body
-
- @request.host = 'david.hostname.com'
- get :index
- assert_equal david_cache, @response.body
- end
-
- def test_xml_version_of_resource_is_treated_as_different_cache
- @mock_controller.mock_url_for = 'http://example.org/posts/'
- @mock_controller.mock_path = '/posts/index.xml'
- path_object = @path_class.new(@mock_controller)
- assert_equal 'xml', path_object.extension
- assert_equal 'example.org/posts/index.xml', path_object.path
- end
-
- def test_empty_path_is_normalized
- @mock_controller.mock_url_for = 'http://example.org/'
- @mock_controller.mock_path = '/'
-
- assert_equal 'example.org/index', @path_class.path_for(@mock_controller)
- end
-
- def test_file_extensions
- get :index, :id => 'kitten.jpg'
- get :index, :id => 'kitten.jpg'
-
- assert_response :success
- end
-
- private
- def content_to_cache
- assigns(:cache_this)
- end
-
- def reset!
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = ActionCachingTestController.new
- @request.host = 'hostname.com'
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/capture_test.rb b/tracks/vendor/rails/actionpack/test/controller/capture_test.rb
deleted file mode 100644
index 43bf346e..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/capture_test.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class CaptureController < ActionController::Base
- def self.controller_name; "test"; end
- def self.controller_path; "test"; end
-
- def content_for
- render :layout => "talk_from_action"
- end
-
- def erb_content_for
- render :layout => "talk_from_action"
- end
-
- def block_content_for
- render :layout => "talk_from_action"
- end
-
- def non_erb_block_content_for
- render :layout => "talk_from_action"
- end
-
- def rescue_action(e) raise end
-end
-
-CaptureController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class CaptureTest < Test::Unit::TestCase
- def setup
- @controller = CaptureController.new
-
- # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
- # a more accurate simulation of what happens in "real life".
- @controller.logger = Logger.new(nil)
-
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_simple_capture
- get :capturing
- assert_equal "Dreamy days", @response.body.strip
- end
-
- def test_content_for
- get :content_for
- assert_equal expected_content_for_output, @response.body
- end
-
- def test_erb_content_for
- get :content_for
- assert_equal expected_content_for_output, @response.body
- end
-
- def test_block_content_for
- get :block_content_for
- assert_equal expected_content_for_output, @response.body
- end
-
- def test_non_erb_block_content_for
- get :non_erb_block_content_for
- assert_equal expected_content_for_output, @response.body
- end
-
- def test_update_element_with_capture
- assert_deprecated 'update_element_function' do
- get :update_element_with_capture
- end
- assert_equal(
- "" +
- "\n\n$('status').innerHTML = '\\n You bought something! \\n';",
- @response.body.strip
- )
- end
-
- private
- def expected_content_for_output
- "Putting stuff in the title! \n\nGreat stuff!"
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/cgi_test.rb b/tracks/vendor/rails/actionpack/test/controller/cgi_test.rb
deleted file mode 100755
index 1d2888ad..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/cgi_test.rb
+++ /dev/null
@@ -1,428 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'action_controller/cgi_process'
-require 'action_controller/cgi_ext/cgi_ext'
-
-
-require 'stringio'
-
-class CGITest < Test::Unit::TestCase
- def setup
- @query_string = "action=create_customer&full_name=David%20Heinemeier%20Hansson&customerId=1"
- @query_string_with_nil = "action=create_customer&full_name="
- @query_string_with_array = "action=create_customer&selected[]=1&selected[]=2&selected[]=3"
- @query_string_with_amps = "action=create_customer&name=Don%27t+%26+Does"
- @query_string_with_multiple_of_same_name =
- "action=update_order&full_name=Lau%20Taarnskov&products=4&products=2&products=3"
- @query_string_with_many_equal = "action=create_customer&full_name=abc=def=ghi"
- @query_string_without_equal = "action"
- @query_string_with_many_ampersands =
- "&action=create_customer&&&full_name=David%20Heinemeier%20Hansson"
- @query_string_with_empty_key = "action=create_customer&full_name=David%20Heinemeier%20Hansson&=Save"
- end
-
- def test_query_string
- assert_equal(
- { "action" => "create_customer", "full_name" => "David Heinemeier Hansson", "customerId" => "1"},
- CGIMethods.parse_query_parameters(@query_string)
- )
- end
-
- def test_deep_query_string
- expected = {'x' => {'y' => {'z' => '10'}}}
- assert_equal(expected, CGIMethods.parse_query_parameters('x[y][z]=10'))
- end
-
- def test_deep_query_string_with_array
- assert_equal({'x' => {'y' => {'z' => ['10']}}}, CGIMethods.parse_query_parameters('x[y][z][]=10'))
- assert_equal({'x' => {'y' => {'z' => ['10', '5']}}}, CGIMethods.parse_query_parameters('x[y][z][]=10&x[y][z][]=5'))
- end
-
- def test_deep_query_string_with_array_of_hash
- assert_equal({'x' => {'y' => [{'z' => '10'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10'))
- assert_equal({'x' => {'y' => [{'z' => '10', 'w' => '10'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][w]=10'))
- end
-
- def test_deep_query_string_with_array_of_hashes_with_one_pair
- assert_equal({'x' => {'y' => [{'z' => '10'}, {'z' => '20'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20'))
- assert_equal("10", CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20')["x"]["y"].first["z"])
- assert_equal("10", CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20').with_indifferent_access[:x][:y].first[:z])
- end
-
- def test_request_hash_parsing
- query = {
- "note[viewers][viewer][][type]" => ["User", "Group"],
- "note[viewers][viewer][][id]" => ["1", "2"]
- }
-
- expected = { "note" => { "viewers"=>{"viewer"=>[{ "id"=>"1", "type"=>"User"}, {"type"=>"Group", "id"=>"2"} ]} } }
-
- assert_equal(expected, CGIMethods.parse_request_parameters(query))
- end
-
- def test_deep_query_string_with_array_of_hashes_with_multiple_pairs
- assert_equal(
- {'x' => {'y' => [{'z' => '10', 'w' => 'a'}, {'z' => '20', 'w' => 'b'}]}},
- CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][w]=a&x[y][][z]=20&x[y][][w]=b')
- )
- end
-
- def test_query_string_with_nil
- assert_equal(
- { "action" => "create_customer", "full_name" => nil},
- CGIMethods.parse_query_parameters(@query_string_with_nil)
- )
- end
-
- def test_query_string_with_array
- assert_equal(
- { "action" => "create_customer", "selected" => ["1", "2", "3"]},
- CGIMethods.parse_query_parameters(@query_string_with_array)
- )
- end
-
- def test_query_string_with_amps
- assert_equal(
- { "action" => "create_customer", "name" => "Don't & Does"},
- CGIMethods.parse_query_parameters(@query_string_with_amps)
- )
- end
-
- def test_query_string_with_many_equal
- assert_equal(
- { "action" => "create_customer", "full_name" => "abc=def=ghi"},
- CGIMethods.parse_query_parameters(@query_string_with_many_equal)
- )
- end
-
- def test_query_string_without_equal
- assert_equal(
- { "action" => nil },
- CGIMethods.parse_query_parameters(@query_string_without_equal)
- )
- end
-
- def test_query_string_with_empty_key
- assert_equal(
- { "action" => "create_customer", "full_name" => "David Heinemeier Hansson" },
- CGIMethods.parse_query_parameters(@query_string_with_empty_key)
- )
- end
-
- def test_query_string_with_many_ampersands
- assert_equal(
- { "action" => "create_customer", "full_name" => "David Heinemeier Hansson"},
- CGIMethods.parse_query_parameters(@query_string_with_many_ampersands)
- )
- end
-
- def test_parse_params
- input = {
- "customers[boston][first][name]" => [ "David" ],
- "customers[boston][first][url]" => [ "http://David" ],
- "customers[boston][second][name]" => [ "Allan" ],
- "customers[boston][second][url]" => [ "http://Allan" ],
- "something_else" => [ "blah" ],
- "something_nil" => [ nil ],
- "something_empty" => [ "" ],
- "products[first]" => [ "Apple Computer" ],
- "products[second]" => [ "Pc" ],
- "" => [ 'Save' ]
- }
-
- expected_output = {
- "customers" => {
- "boston" => {
- "first" => {
- "name" => "David",
- "url" => "http://David"
- },
- "second" => {
- "name" => "Allan",
- "url" => "http://Allan"
- }
- }
- },
- "something_else" => "blah",
- "something_empty" => "",
- "something_nil" => "",
- "products" => {
- "first" => "Apple Computer",
- "second" => "Pc"
- }
- }
-
- assert_equal expected_output, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_from_multipart_upload
- mockup = Struct.new(:content_type, :original_filename, :read, :rewind)
- file = mockup.new('img/jpeg', 'foo.jpg')
- ie_file = mockup.new('img/jpeg', 'c:\\Documents and Settings\\foo\\Desktop\\bar.jpg')
- non_file_text_part = mockup.new('text/plain', '', 'abc')
-
- input = {
- "something" => [ StringIO.new("") ],
- "array_of_stringios" => [[ StringIO.new("One"), StringIO.new("Two") ]],
- "mixed_types_array" => [[ StringIO.new("Three"), "NotStringIO" ]],
- "mixed_types_as_checkboxes[strings][nested]" => [[ file, "String", StringIO.new("StringIO")]],
- "ie_mixed_types_as_checkboxes[strings][nested]" => [[ ie_file, "String", StringIO.new("StringIO")]],
- "products[string]" => [ StringIO.new("Apple Computer") ],
- "products[file]" => [ file ],
- "ie_products[string]" => [ StringIO.new("Microsoft") ],
- "ie_products[file]" => [ ie_file ],
- "text_part" => [non_file_text_part]
- }
-
- expected_output = {
- "something" => "",
- "array_of_stringios" => ["One", "Two"],
- "mixed_types_array" => [ "Three", "NotStringIO" ],
- "mixed_types_as_checkboxes" => {
- "strings" => {
- "nested" => [ file, "String", "StringIO" ]
- },
- },
- "ie_mixed_types_as_checkboxes" => {
- "strings" => {
- "nested" => [ ie_file, "String", "StringIO" ]
- },
- },
- "products" => {
- "string" => "Apple Computer",
- "file" => file
- },
- "ie_products" => {
- "string" => "Microsoft",
- "file" => ie_file
- },
- "text_part" => "abc"
- }
-
- params = CGIMethods.parse_request_parameters(input)
- assert_equal expected_output, params
-
- # Lone filenames are preserved.
- assert_equal 'foo.jpg', params['mixed_types_as_checkboxes']['strings']['nested'].first.original_filename
- assert_equal 'foo.jpg', params['products']['file'].original_filename
-
- # But full Windows paths are reduced to their basename.
- assert_equal 'bar.jpg', params['ie_mixed_types_as_checkboxes']['strings']['nested'].first.original_filename
- assert_equal 'bar.jpg', params['ie_products']['file'].original_filename
- end
-
- def test_parse_params_with_file
- input = {
- "customers[boston][first][name]" => [ "David" ],
- "something_else" => [ "blah" ],
- "logo" => [ File.new(File.dirname(__FILE__) + "/cgi_test.rb").path ]
- }
-
- expected_output = {
- "customers" => {
- "boston" => {
- "first" => {
- "name" => "David"
- }
- }
- },
- "something_else" => "blah",
- "logo" => File.new(File.dirname(__FILE__) + "/cgi_test.rb").path,
- }
-
- assert_equal expected_output, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_array
- input = { "selected[]" => [ "1", "2", "3" ] }
-
- expected_output = { "selected" => [ "1", "2", "3" ] }
-
- assert_equal expected_output, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_non_alphanumeric_name
- input = { "a/b[c]" => %w(d) }
- expected = { "a/b" => { "c" => "d" }}
- assert_equal expected, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_single_brackets_in_middle
- input = { "a/b[c]d" => %w(e) }
- expected = { "a/b" => {} }
- assert_equal expected, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_separated_brackets
- input = { "a/b@[c]d[e]" => %w(f) }
- expected = { "a/b@" => { }}
- assert_equal expected, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_separated_brackets_and_array
- input = { "a/b@[c]d[e][]" => %w(f) }
- expected = { "a/b@" => { }}
- assert_equal expected , CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_unmatched_brackets_and_array
- input = { "a/b@[c][d[e][]" => %w(f) }
- expected = { "a/b@" => { "c" => { }}}
- assert_equal expected, CGIMethods.parse_request_parameters(input)
- end
-
- def test_parse_params_with_nil_key
- input = { nil => nil, "test2" => %w(value1) }
- expected = { "test2" => "value1" }
- assert_equal expected, CGIMethods.parse_request_parameters(input)
- end
-end
-
-
-class MultipartCGITest < Test::Unit::TestCase
- FIXTURE_PATH = File.dirname(__FILE__) + '/../fixtures/multipart'
-
- def setup
- ENV['REQUEST_METHOD'] = 'POST'
- ENV['CONTENT_LENGTH'] = '0'
- ENV['CONTENT_TYPE'] = 'multipart/form-data, boundary=AaB03x'
- end
-
- def test_single_parameter
- params = process('single_parameter')
- assert_equal({ 'foo' => 'bar' }, params)
- end
-
- def test_text_file
- params = process('text_file')
- assert_equal %w(file foo), params.keys.sort
- assert_equal 'bar', params['foo']
-
- file = params['file']
- assert_kind_of StringIO, file
- assert_equal 'file.txt', file.original_filename
- assert_equal "text/plain\r", file.content_type
- assert_equal 'contents', file.read
- end
-
- def test_large_text_file
- params = process('large_text_file')
- assert_equal %w(file foo), params.keys.sort
- assert_equal 'bar', params['foo']
-
- file = params['file']
- assert_kind_of Tempfile, file
- assert_equal 'file.txt', file.original_filename
- assert_equal "text/plain\r", file.content_type
- assert ('a' * 20480) == file.read
- end
-
- def test_binary_file
- params = process('binary_file')
- assert_equal %w(file flowers foo), params.keys.sort
- assert_equal 'bar', params['foo']
-
- file = params['file']
- assert_kind_of StringIO, file
- assert_equal 'file.txt', file.original_filename
- assert_equal "text/plain\r", file.content_type
- assert_equal 'contents', file.read
-
- file = params['flowers']
- assert_kind_of StringIO, file
- assert_equal 'flowers.jpg', file.original_filename
- assert_equal "image/jpeg\r", file.content_type
- assert_equal 19512, file.size
- #assert_equal File.read(File.dirname(__FILE__) + '/../../../activerecord/test/fixtures/flowers.jpg'), file.read
- end
-
- def test_mixed_files
- params = process('mixed_files')
- assert_equal %w(files foo), params.keys.sort
- assert_equal 'bar', params['foo']
-
- # Ruby CGI doesn't handle multipart/mixed for us.
- assert_kind_of String, params['files']
- assert_equal 19756, params['files'].size
- end
-
- # Rewind readable cgi params so others may reread them (such as CGI::Session
- # when passing the session id in a multipart form).
- def test_multipart_param_rewound
- params = process('text_file')
- assert_equal 'bar', @cgi.params['foo'][0].read
- end
-
- private
- def process(name)
- old_stdin = $stdin
- File.open(File.join(FIXTURE_PATH, name), 'rb') do |file|
- ENV['CONTENT_LENGTH'] = file.stat.size.to_s
- $stdin = file
- @cgi = CGI.new
- CGIMethods.parse_request_parameters @cgi.params
- end
- ensure
- $stdin = old_stdin
- end
-end
-
-# Ensures that PUT works with multipart as well as POST.
-class PutMultipartCGITest < MultipartCGITest
- def setup
- super
- ENV['REQUEST_METHOD'] = 'PUT'
- end
-end
-
-
-class CGIRequestTest < Test::Unit::TestCase
- def setup
- @request_hash = {"HTTP_MAX_FORWARDS"=>"10", "SERVER_NAME"=>"glu.ttono.us:8007", "FCGI_ROLE"=>"RESPONDER", "HTTP_X_FORWARDED_HOST"=>"glu.ttono.us", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate", "HTTP_USER_AGENT"=>"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.5.1 (KHTML, like Gecko) Safari/312.3.1", "PATH_INFO"=>"", "HTTP_ACCEPT_LANGUAGE"=>"en", "HTTP_HOST"=>"glu.ttono.us:8007", "SERVER_PROTOCOL"=>"HTTP/1.1", "REDIRECT_URI"=>"/dispatch.fcgi", "SCRIPT_NAME"=>"/dispatch.fcgi", "SERVER_ADDR"=>"207.7.108.53", "REMOTE_ADDR"=>"207.7.108.53", "SERVER_SOFTWARE"=>"lighttpd/1.4.5", "HTTP_COOKIE"=>"_session_id=c84ace84796670c052c6ceb2451fb0f2; is_admin=yes", "HTTP_X_FORWARDED_SERVER"=>"glu.ttono.us", "REQUEST_URI"=>"/admin", "DOCUMENT_ROOT"=>"/home/kevinc/sites/typo/public", "SERVER_PORT"=>"8007", "QUERY_STRING"=>"", "REMOTE_PORT"=>"63137", "GATEWAY_INTERFACE"=>"CGI/1.1", "HTTP_X_FORWARDED_FOR"=>"65.88.180.234", "HTTP_ACCEPT"=>"*/*", "SCRIPT_FILENAME"=>"/home/kevinc/sites/typo/public/dispatch.fcgi", "REDIRECT_STATUS"=>"200", "REQUEST_METHOD"=>"GET"}
- # cookie as returned by some Nokia phone browsers (no space after semicolon separator)
- @alt_cookie_fmt_request_hash = {"HTTP_COOKIE"=>"_session_id=c84ace84796670c052c6ceb2451fb0f2;is_admin=yes"}
- @fake_cgi = Struct.new(:env_table).new(@request_hash)
- @request = ActionController::CgiRequest.new(@fake_cgi)
- end
-
- def test_proxy_request
- assert_equal 'glu.ttono.us', @request.host_with_port
- end
-
- def test_http_host
- @request_hash.delete "HTTP_X_FORWARDED_HOST"
- @request_hash['HTTP_HOST'] = "rubyonrails.org:8080"
- assert_equal "rubyonrails.org:8080", @request.host_with_port
-
- @request_hash['HTTP_X_FORWARDED_HOST'] = "www.firsthost.org, www.secondhost.org"
- assert_equal "www.secondhost.org", @request.host
- end
-
- def test_http_host_with_default_port_overrides_server_port
- @request_hash.delete "HTTP_X_FORWARDED_HOST"
- @request_hash['HTTP_HOST'] = "rubyonrails.org"
- assert_equal "rubyonrails.org", @request.host_with_port
- end
-
- def test_host_with_port_defaults_to_server_name_if_no_host_headers
- @request_hash.delete "HTTP_X_FORWARDED_HOST"
- @request_hash.delete "HTTP_HOST"
- assert_equal "glu.ttono.us:8007", @request.host_with_port
- end
-
- def test_host_with_port_falls_back_to_server_addr_if_necessary
- @request_hash.delete "HTTP_X_FORWARDED_HOST"
- @request_hash.delete "HTTP_HOST"
- @request_hash.delete "SERVER_NAME"
- assert_equal "207.7.108.53:8007", @request.host_with_port
- end
-
- def test_cookie_syntax_resilience
- cookies = CGI::Cookie::parse(@request_hash["HTTP_COOKIE"]);
- assert_equal ["c84ace84796670c052c6ceb2451fb0f2"], cookies["_session_id"]
- assert_equal ["yes"], cookies["is_admin"]
-
- alt_cookies = CGI::Cookie::parse(@alt_cookie_fmt_request_hash["HTTP_COOKIE"]);
- assert_equal ["c84ace84796670c052c6ceb2451fb0f2"], alt_cookies["_session_id"]
- assert_equal ["yes"], alt_cookies["is_admin"]
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/components_test.rb b/tracks/vendor/rails/actionpack/test/controller/components_test.rb
deleted file mode 100644
index fbe46375..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/components_test.rb
+++ /dev/null
@@ -1,151 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class CallerController < ActionController::Base
- def calling_from_controller
- render_component(:controller => "callee", :action => "being_called")
- end
-
- def calling_from_controller_with_params
- render_component(:controller => "callee", :action => "being_called", :params => { "name" => "David" })
- end
-
- def calling_from_controller_with_different_status_code
- render_component(:controller => "callee", :action => "blowing_up")
- end
-
- def calling_from_template
- render_template "Ring, ring: <%= render_component(:controller => 'callee', :action => 'being_called') %>"
- end
-
- def internal_caller
- render_template "Are you there? <%= render_component(:action => 'internal_callee') %>"
- end
-
- def internal_callee
- render_text "Yes, ma'am"
- end
-
- def set_flash
- render_component(:controller => "callee", :action => "set_flash")
- end
-
- def use_flash
- render_component(:controller => "callee", :action => "use_flash")
- end
-
- def calling_redirected
- render_component(:controller => "callee", :action => "redirected")
- end
-
- def calling_redirected_as_string
- render_template "<%= render_component(:controller => 'callee', :action => 'redirected') %>"
- end
-
- def rescue_action(e) raise end
-end
-
-class CalleeController < ActionController::Base
- def being_called
- render_text "#{params[:name] || "Lady"} of the House, speaking"
- end
-
- def blowing_up
- render_text "It's game over, man, just game over, man!", "500 Internal Server Error"
- end
-
- def set_flash
- flash[:notice] = 'My stoney baby'
- render :text => 'flash is set'
- end
-
- def use_flash
- render :text => flash[:notice] || 'no flash'
- end
-
- def redirected
- redirect_to :controller => "callee", :action => "being_called"
- end
-
- def rescue_action(e) raise end
-end
-
-class ComponentsTest < Test::Unit::TestCase
- def setup
- @controller = CallerController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_calling_from_controller
- get :calling_from_controller
- assert_equal "Lady of the House, speaking", @response.body
- end
-
- def test_calling_from_controller_with_params
- get :calling_from_controller_with_params
- assert_equal "David of the House, speaking", @response.body
- end
-
- def test_calling_from_controller_with_different_status_code
- get :calling_from_controller_with_different_status_code
- assert_equal 500, @response.response_code
- end
-
- def test_calling_from_template
- get :calling_from_template
- assert_equal "Ring, ring: Lady of the House, speaking", @response.body
- end
-
- def test_internal_calling
- get :internal_caller
- assert_equal "Are you there? Yes, ma'am", @response.body
- end
-
- def test_flash
- get :set_flash
- assert_equal 'My stoney baby', flash[:notice]
- get :use_flash
- assert_equal 'My stoney baby', @response.body
- get :use_flash
- assert_equal 'no flash', @response.body
- end
-
- def test_component_redirect_redirects
- get :calling_redirected
-
- assert_redirected_to :action => "being_called"
- end
-
- def test_component_multiple_redirect_redirects
- test_component_redirect_redirects
- test_internal_calling
- end
-
- def test_component_as_string_redirect_renders_redirecte_action
- get :calling_redirected_as_string
-
- assert_equal "Lady of the House, speaking", @response.body
- end
-end
-
-module A
- module B
- module C
- class NestedController < ActionController::Base
- # Stub for uses_component_template_root
- def self.caller
- [ '/path/to/active_support/deprecation.rb:93:in `uses_component_template_root',
- './test/fixtures/a/b/c/nested_controller.rb' ]
- end
- end
- end
- end
-end
-
-class UsesComponentTemplateRootTest < Test::Unit::TestCase
- def test_uses_component_template_root
- assert_deprecated 'uses_component_template_root' do
- assert_equal './test/fixtures/', A::B::C::NestedController.uses_component_template_root
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/content_type_test.rb b/tracks/vendor/rails/actionpack/test/controller/content_type_test.rb
deleted file mode 100644
index 6f0618da..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/content_type_test.rb
+++ /dev/null
@@ -1,139 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class ContentTypeController < ActionController::Base
- def render_content_type_from_body
- response.content_type = Mime::RSS
- render :text => "hello world!"
- end
-
- def render_defaults
- render :text => "hello world!"
- end
-
- def render_content_type_from_render
- render :text => "hello world!", :content_type => Mime::RSS
- end
-
- def render_charset_from_body
- response.charset = "utf-16"
- render :text => "hello world!"
- end
-
- def render_default_for_rhtml
- end
-
- def render_default_for_rxml
- end
-
- def render_default_for_rjs
- end
-
- def render_change_for_rxml
- response.content_type = Mime::HTML
- render :action => "render_default_for_rxml"
- end
-
- def render_default_content_types_for_respond_to
- respond_to do |format|
- format.html { render :text => "hello world!" }
- format.xml { render :action => "render_default_content_types_for_respond_to.rhtml" }
- format.js { render :text => "hello world!" }
- format.rss { render :text => "hello world!", :content_type => Mime::XML }
- end
- end
-
- def rescue_action(e) raise end
-end
-
-ContentTypeController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class ContentTypeTest < Test::Unit::TestCase
- def setup
- @controller = ContentTypeController.new
-
- # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
- # a more accurate simulation of what happens in "real life".
- @controller.logger = Logger.new(nil)
-
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_render_defaults
- get :render_defaults
- assert_equal "utf-8", @response.charset
- assert_equal Mime::HTML, @response.content_type
- end
-
- def test_render_changed_charset_default
- ContentTypeController.default_charset = "utf-16"
- get :render_defaults
- assert_equal "utf-16", @response.charset
- assert_equal Mime::HTML, @response.content_type
- ContentTypeController.default_charset = "utf-8"
- end
-
- def test_content_type_from_body
- get :render_content_type_from_body
- assert_equal "application/rss+xml", @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_content_type_from_render
- get :render_content_type_from_render
- assert_equal "application/rss+xml", @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_charset_from_body
- get :render_charset_from_body
- assert_equal "utf-16", @response.charset
- assert_equal Mime::HTML, @response.content_type
- end
-
- def test_default_for_rhtml
- get :render_default_for_rhtml
- assert_equal Mime::HTML, @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_default_for_rxml
- get :render_default_for_rxml
- assert_equal Mime::XML, @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_default_for_rjs
- xhr :post, :render_default_for_rjs
- assert_equal Mime::JS, @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_change_for_rxml
- get :render_change_for_rxml
- assert_equal Mime::HTML, @response.content_type
- assert_equal "utf-8", @response.charset
- end
-
- def test_render_default_content_types_for_respond_to
- @request.env["HTTP_ACCEPT"] = Mime::HTML.to_s
- get :render_default_content_types_for_respond_to
- assert_equal Mime::HTML, @response.content_type
-
- @request.env["HTTP_ACCEPT"] = Mime::JS.to_s
- get :render_default_content_types_for_respond_to
- assert_equal Mime::JS, @response.content_type
- end
-
- def test_render_default_content_types_for_respond_to_with_template
- @request.env["HTTP_ACCEPT"] = Mime::XML.to_s
- get :render_default_content_types_for_respond_to
- assert_equal Mime::XML, @response.content_type
- end
-
- def test_render_default_content_types_for_respond_to_with_overwrite
- @request.env["HTTP_ACCEPT"] = Mime::RSS.to_s
- get :render_default_content_types_for_respond_to
- assert_equal Mime::XML, @response.content_type
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb b/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb
deleted file mode 100644
index e69de29b..00000000
diff --git a/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb b/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb
deleted file mode 100644
index e69de29b..00000000
diff --git a/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb b/tracks/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb
deleted file mode 100644
index e69de29b..00000000
diff --git a/tracks/vendor/rails/actionpack/test/controller/cookie_test.rb b/tracks/vendor/rails/actionpack/test/controller/cookie_test.rb
deleted file mode 100644
index 2e1c7f0e..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/cookie_test.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class CookieTest < Test::Unit::TestCase
- class TestController < ActionController::Base
- def authenticate_with_deprecated_writer
- cookie "name" => "user_name", "value" => "david"
- render_text "hello world"
- end
-
- def authenticate
- cookies["user_name"] = "david"
- render_text "hello world"
- end
-
- def authenticate_for_fourten_days
- cookies["user_name"] = { "value" => "david", "expires" => Time.local(2005, 10, 10) }
- render_text "hello world"
- end
-
- def authenticate_for_fourten_days_with_symbols
- cookies[:user_name] = { :value => "david", :expires => Time.local(2005, 10, 10) }
- render_text "hello world"
- end
-
- def set_multiple_cookies
- cookies["user_name"] = { "value" => "david", "expires" => Time.local(2005, 10, 10) }
- cookies["login"] = "XJ-122"
- render_text "hello world"
- end
-
- def access_frozen_cookies
- cookies["will"] = "work"
- render_text "hello world"
- end
-
- def rescue_action(e) raise end
- end
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_setting_cookie_with_deprecated_writer
- @request.action = "authenticate_with_deprecated_writer"
- assert_equal [ CGI::Cookie::new("name" => "user_name", "value" => "david") ], process_request.headers["cookie"]
- end
-
- def test_setting_cookie
- @request.action = "authenticate"
- assert_equal [ CGI::Cookie::new("name" => "user_name", "value" => "david") ], process_request.headers["cookie"]
- end
-
- def test_setting_cookie_for_fourteen_days
- @request.action = "authenticate_for_fourten_days"
- assert_equal [ CGI::Cookie::new("name" => "user_name", "value" => "david", "expires" => Time.local(2005, 10, 10)) ], process_request.headers["cookie"]
- end
-
- def test_setting_cookie_for_fourteen_days_with_symbols
- @request.action = "authenticate_for_fourten_days"
- assert_equal [ CGI::Cookie::new("name" => "user_name", "value" => "david", "expires" => Time.local(2005, 10, 10)) ], process_request.headers["cookie"]
- end
-
- def test_multiple_cookies
- @request.action = "set_multiple_cookies"
- assert_equal 2, process_request.headers["cookie"].size
- end
-
- def test_setting_test_cookie
- @request.action = "access_frozen_cookies"
- assert_nothing_raised { process_request }
- end
-
- private
- def process_request
- TestController.process(@request, @response)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/custom_handler_test.rb b/tracks/vendor/rails/actionpack/test/controller/custom_handler_test.rb
deleted file mode 100644
index 2747a0f3..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/custom_handler_test.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class CustomHandler
- def initialize( view )
- @view = view
- end
-
- def render( template, local_assigns )
- [ template,
- local_assigns,
- @view ]
- end
-end
-
-class CustomHandlerTest < Test::Unit::TestCase
- def setup
- ActionView::Base.register_template_handler "foo", CustomHandler
- ActionView::Base.register_template_handler :foo2, CustomHandler
- @view = ActionView::Base.new
- end
-
- def test_custom_render
- result = @view.render_template( "foo", "hello <%= one %>", nil, :one => "two" )
- assert_equal(
- [ "hello <%= one %>", { :one => "two" }, @view ],
- result )
- end
-
- def test_custom_render2
- result = @view.render_template( "foo2", "hello <%= one %>", nil, :one => "two" )
- assert_equal(
- [ "hello <%= one %>", { :one => "two" }, @view ],
- result )
- end
-
- def test_unhandled_extension
- # uses the ERb handler by default if the extension isn't recognized
- result = @view.render_template( "bar", "hello <%= one %>", nil, :one => "two" )
- assert_equal "hello two", result
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb b/tracks/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb
deleted file mode 100644
index 7865a69e..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class DeprecatedControllerInstanceVariablesTest < Test::Unit::TestCase
- class Target < ActionController::Base
- def initialize(run = nil)
- instance_eval(run) if run
- super()
- end
-
- def noop
- render :nothing => true
- end
-
- ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |var|
- class_eval "def old_#{var}; render :text => @#{var}.to_s end"
- class_eval "def new_#{var}; render :text => #{var}.to_s end"
- class_eval "def internal_#{var}; render :text => @_#{var}.to_s end"
- end
-
- def rescue_action(e) raise e end
- end
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = Target.new
- end
-
- ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |var|
- class_eval <<-end_eval, __FILE__, __LINE__
- def test_old_#{var}_is_deprecated
- assert_deprecated('@#{var}') { get :old_#{var} }
- end
- def test_new_#{var}_isnt_deprecated
- assert_not_deprecated { get :new_#{var} }
- end
- def test_internal_#{var}_isnt_deprecated
- assert_not_deprecated { get :internal_#{var} }
- end
- def test_#{var}_raises_if_already_set
- assert_raise(RuntimeError) do
- @controller = Target.new '@#{var} = Object.new'
- get :noop
- end
- end
- end_eval
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb b/tracks/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
deleted file mode 100644
index d8da676f..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-
-class DeprecatedBaseMethodsTest < Test::Unit::TestCase
- class Target < ActionController::Base
- def deprecated_symbol_parameter_to_url_for
- redirect_to(url_for(:home_url, "superstars"))
- end
-
- def deprecated_render_parameters
- render "fun/games/hello_world"
- end
-
- def home_url(greeting)
- "http://example.com/#{greeting}"
- end
-
- def raises_name_error
- this_method_doesnt_exist
- end
-
- def rescue_action(e) raise e end
- end
-
- Target.template_root = File.dirname(__FILE__) + "/../../fixtures"
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = Target.new
- end
-
- def test_deprecated_symbol_parameter_to_url_for
- assert_deprecated("url_for(:home_url)") do
- get :deprecated_symbol_parameter_to_url_for
- end
-
- assert_redirected_to "http://example.com/superstars"
- end
-
- def test_deprecated_render_parameters
- assert_deprecated("render('fun/games/hello_world')") do
- get :deprecated_render_parameters
- end
-
- assert_equal "Living in a nested world", @response.body
- end
-
- def test_log_error_silences_deprecation_warnings
- get :raises_name_error
- rescue => e
- assert_not_deprecated { @controller.send :log_error, e }
- end
-
- def test_assertion_failed_error_silences_deprecation_warnings
- get :raises_name_error
- rescue => e
- error = Test::Unit::Error.new('testing ur doodz', e)
- assert_not_deprecated { error.message }
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/fake_controllers.rb b/tracks/vendor/rails/actionpack/test/controller/fake_controllers.rb
deleted file mode 100644
index 5f958b28..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/fake_controllers.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-class << Object; alias_method :const_available?, :const_defined?; end
-
-class ContentController < Class.new(ActionController::Base)
-end
-class NotAController
-end
-module Admin
- class << self; alias_method :const_available?, :const_defined?; end
- class UserController < Class.new(ActionController::Base); end
- class NewsFeedController < Class.new(ActionController::Base); end
-end
-
-ActionController::Routing::Routes.draw do |map|
- map.route_one 'route_one', :controller => 'elsewhere', :action => 'flash_me'
- map.connect ':controller/:action/:id'
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/filter_params_test.rb b/tracks/vendor/rails/actionpack/test/controller/filter_params_test.rb
deleted file mode 100644
index 5ad0d7f8..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/filter_params_test.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class FilterParamController < ActionController::Base
-end
-
-class FilterParamTest < Test::Unit::TestCase
- def setup
- @controller = FilterParamController.new
- end
-
- def test_filter_parameters
- assert FilterParamController.respond_to?(:filter_parameter_logging)
- assert !@controller.respond_to?(:filter_parameters)
-
- FilterParamController.filter_parameter_logging
- assert @controller.respond_to?(:filter_parameters)
-
- test_hashes = [[{},{},[]],
- [{'foo'=>'bar'},{'foo'=>'bar'},[]],
- [{'foo'=>'bar'},{'foo'=>'bar'},%w'food'],
- [{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'],
- [{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'],
- [{'foo'=>'bar', 'baz'=>'foo'},{'foo'=>'[FILTERED]', 'baz'=>'[FILTERED]'},%w'foo baz'],
- [{'bar'=>{'foo'=>'bar','bar'=>'foo'}},{'bar'=>{'foo'=>'[FILTERED]','bar'=>'foo'}},%w'fo'],
- [{'foo'=>{'foo'=>'bar','bar'=>'foo'}},{'foo'=>'[FILTERED]'},%w'f banana']]
-
- test_hashes.each do |before_filter, after_filter, filter_words|
- FilterParamController.filter_parameter_logging(*filter_words)
- assert_equal after_filter, @controller.filter_parameters(before_filter)
-
- filter_words.push('blah')
- FilterParamController.filter_parameter_logging(*filter_words) do |key, value|
- value.reverse! if key =~ /bargain/
- end
-
- before_filter['barg'] = {'bargain'=>'gain', 'blah'=>'bar', 'bar'=>{'bargain'=>{'blah'=>'foo'}}}
- after_filter['barg'] = {'bargain'=>'niag', 'blah'=>'[FILTERED]', 'bar'=>{'bargain'=>{'blah'=>'[FILTERED]'}}}
-
- assert_equal after_filter, @controller.filter_parameters(before_filter)
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/filters_test.rb b/tracks/vendor/rails/actionpack/test/controller/filters_test.rb
deleted file mode 100644
index 3a74eba0..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/filters_test.rb
+++ /dev/null
@@ -1,695 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class FilterTest < Test::Unit::TestCase
- class TestController < ActionController::Base
- before_filter :ensure_login
- after_filter :clean_up
-
- def show
- render :inline => "ran action"
- end
-
- private
- def ensure_login
- @ran_filter ||= []
- @ran_filter << "ensure_login"
- end
-
- def clean_up
- @ran_after_filter ||= []
- @ran_after_filter << "clean_up"
- end
- end
-
- class ChangingTheRequirementsController < TestController
- before_filter :ensure_login, :except => [:go_wild]
-
- def go_wild
- render :text => "gobble"
- end
- end
-
- class TestMultipleFiltersController < ActionController::Base
- before_filter :try_1
- before_filter :try_2
- before_filter :try_3
-
- (1..3).each do |i|
- define_method "fail_#{i}" do
- render :text => i.to_s
- end
- end
-
- protected
- (1..3).each do |i|
- define_method "try_#{i}" do
- instance_variable_set :@try, i
- action_name != "fail_#{i}"
- end
- end
- end
-
- class RenderingController < ActionController::Base
- before_filter :render_something_else
-
- def show
- @ran_action = true
- render :inline => "ran action"
- end
-
- private
- def render_something_else
- render :inline => "something else"
- end
- end
-
- class ConditionalFilterController < ActionController::Base
- def show
- render :inline => "ran action"
- end
-
- def another_action
- render :inline => "ran action"
- end
-
- def show_without_filter
- render :inline => "ran action without filter"
- end
-
- private
- def ensure_login
- @ran_filter ||= []
- @ran_filter << "ensure_login"
- end
-
- def clean_up_tmp
- @ran_filter ||= []
- @ran_filter << "clean_up_tmp"
- end
-
- def rescue_action(e) raise(e) end
- end
-
- class ConditionalCollectionFilterController < ConditionalFilterController
- before_filter :ensure_login, :except => [ :show_without_filter, :another_action ]
- end
-
- class OnlyConditionSymController < ConditionalFilterController
- before_filter :ensure_login, :only => :show
- end
-
- class ExceptConditionSymController < ConditionalFilterController
- before_filter :ensure_login, :except => :show_without_filter
- end
-
- class BeforeAndAfterConditionController < ConditionalFilterController
- before_filter :ensure_login, :only => :show
- after_filter :clean_up_tmp, :only => :show
- end
-
- class OnlyConditionProcController < ConditionalFilterController
- before_filter(:only => :show) {|c| c.assigns["ran_proc_filter"] = true }
- end
-
- class ExceptConditionProcController < ConditionalFilterController
- before_filter(:except => :show_without_filter) {|c| c.assigns["ran_proc_filter"] = true }
- end
-
- class ConditionalClassFilter
- def self.filter(controller) controller.assigns["ran_class_filter"] = true end
- end
-
- class OnlyConditionClassController < ConditionalFilterController
- before_filter ConditionalClassFilter, :only => :show
- end
-
- class ExceptConditionClassController < ConditionalFilterController
- before_filter ConditionalClassFilter, :except => :show_without_filter
- end
-
- class AnomolousYetValidConditionController < ConditionalFilterController
- before_filter(ConditionalClassFilter, :ensure_login, Proc.new {|c| c.assigns["ran_proc_filter1"] = true }, :except => :show_without_filter) { |c| c.assigns["ran_proc_filter2"] = true}
- end
-
- class PrependingController < TestController
- prepend_before_filter :wonderful_life
- # skip_before_filter :fire_flash
-
- private
- def wonderful_life
- @ran_filter ||= []
- @ran_filter << "wonderful_life"
- end
- end
-
- class ConditionalSkippingController < TestController
- skip_before_filter :ensure_login, :only => [ :login ]
- skip_after_filter :clean_up, :only => [ :login ]
-
- before_filter :find_user, :only => [ :change_password ]
-
- def login
- render :inline => "ran action"
- end
-
- def change_password
- render :inline => "ran action"
- end
-
- protected
- def find_user
- @ran_filter ||= []
- @ran_filter << "find_user"
- end
- end
-
- class ConditionalParentOfConditionalSkippingController < ConditionalFilterController
- before_filter :conditional_in_parent, :only => [:show, :another_action]
- after_filter :conditional_in_parent, :only => [:show, :another_action]
-
- private
-
- def conditional_in_parent
- @ran_filter ||= []
- @ran_filter << 'conditional_in_parent'
- end
- end
-
- class ChildOfConditionalParentController < ConditionalParentOfConditionalSkippingController
- skip_before_filter :conditional_in_parent, :only => :another_action
- skip_after_filter :conditional_in_parent, :only => :another_action
- end
-
- class AnotherChildOfConditionalParentController < ConditionalParentOfConditionalSkippingController
- skip_before_filter :conditional_in_parent, :only => :show
- end
-
- class ProcController < PrependingController
- before_filter(proc { |c| c.assigns["ran_proc_filter"] = true })
- end
-
- class ImplicitProcController < PrependingController
- before_filter { |c| c.assigns["ran_proc_filter"] = true }
- end
-
- class AuditFilter
- def self.filter(controller)
- controller.assigns["was_audited"] = true
- end
- end
-
- class AroundFilter
- def before(controller)
- @execution_log = "before"
- controller.class.execution_log << " before aroundfilter " if controller.respond_to? :execution_log
- controller.assigns["before_ran"] = true
- end
-
- def after(controller)
- controller.assigns["execution_log"] = @execution_log + " and after"
- controller.assigns["after_ran"] = true
- controller.class.execution_log << " after aroundfilter " if controller.respond_to? :execution_log
- end
- end
-
- class AppendedAroundFilter
- def before(controller)
- controller.class.execution_log << " before appended aroundfilter "
- end
-
- def after(controller)
- controller.class.execution_log << " after appended aroundfilter "
- end
- end
-
- class AuditController < ActionController::Base
- before_filter(AuditFilter)
-
- def show
- render_text "hello"
- end
- end
-
- class AroundFilterController < PrependingController
- around_filter AroundFilter.new
- end
-
- class MixedFilterController < PrependingController
- cattr_accessor :execution_log
-
- def initialize
- @@execution_log = ""
- end
-
- before_filter { |c| c.class.execution_log << " before procfilter " }
- prepend_around_filter AroundFilter.new
-
- after_filter { |c| c.class.execution_log << " after procfilter " }
- append_around_filter AppendedAroundFilter.new
- end
-
- class MixedSpecializationController < ActionController::Base
- class OutOfOrder < StandardError; end
-
- before_filter :first
- before_filter :second, :only => :foo
-
- def foo
- render_text 'foo'
- end
-
- def bar
- render_text 'bar'
- end
-
- protected
- def first
- @first = true
- end
-
- def second
- raise OutOfOrder unless @first
- end
- end
-
- class DynamicDispatchController < ActionController::Base
- before_filter :choose
-
- %w(foo bar baz).each do |action|
- define_method(action) { render :text => action }
- end
-
- private
- def choose
- self.action_name = params[:choose]
- end
- end
-
- def test_added_filter_to_inheritance_graph
- assert_equal [ :ensure_login ], TestController.before_filters
- end
-
- def test_base_class_in_isolation
- assert_equal [ ], ActionController::Base.before_filters
- end
-
- def test_prepending_filter
- assert_equal [ :wonderful_life, :ensure_login ], PrependingController.before_filters
- end
-
- def test_running_filters
- assert_equal %w( wonderful_life ensure_login ), test_process(PrependingController).template.assigns["ran_filter"]
- end
-
- def test_running_filters_with_proc
- assert test_process(ProcController).template.assigns["ran_proc_filter"]
- end
-
- def test_running_filters_with_implicit_proc
- assert test_process(ImplicitProcController).template.assigns["ran_proc_filter"]
- end
-
- def test_running_filters_with_class
- assert test_process(AuditController).template.assigns["was_audited"]
- end
-
- def test_running_anomolous_yet_valid_condition_filters
- response = test_process(AnomolousYetValidConditionController)
- assert_equal %w( ensure_login ), response.template.assigns["ran_filter"]
- assert response.template.assigns["ran_class_filter"]
- assert response.template.assigns["ran_proc_filter1"]
- assert response.template.assigns["ran_proc_filter2"]
-
- response = test_process(AnomolousYetValidConditionController, "show_without_filter")
- assert_equal nil, response.template.assigns["ran_filter"]
- assert !response.template.assigns["ran_class_filter"]
- assert !response.template.assigns["ran_proc_filter1"]
- assert !response.template.assigns["ran_proc_filter2"]
- end
-
- def test_running_collection_condition_filters
- assert_equal %w( ensure_login ), test_process(ConditionalCollectionFilterController).template.assigns["ran_filter"]
- assert_equal nil, test_process(ConditionalCollectionFilterController, "show_without_filter").template.assigns["ran_filter"]
- assert_equal nil, test_process(ConditionalCollectionFilterController, "another_action").template.assigns["ran_filter"]
- end
-
- def test_running_only_condition_filters
- assert_equal %w( ensure_login ), test_process(OnlyConditionSymController).template.assigns["ran_filter"]
- assert_equal nil, test_process(OnlyConditionSymController, "show_without_filter").template.assigns["ran_filter"]
-
- assert test_process(OnlyConditionProcController).template.assigns["ran_proc_filter"]
- assert !test_process(OnlyConditionProcController, "show_without_filter").template.assigns["ran_proc_filter"]
-
- assert test_process(OnlyConditionClassController).template.assigns["ran_class_filter"]
- assert !test_process(OnlyConditionClassController, "show_without_filter").template.assigns["ran_class_filter"]
- end
-
- def test_running_except_condition_filters
- assert_equal %w( ensure_login ), test_process(ExceptConditionSymController).template.assigns["ran_filter"]
- assert_equal nil, test_process(ExceptConditionSymController, "show_without_filter").template.assigns["ran_filter"]
-
- assert test_process(ExceptConditionProcController).template.assigns["ran_proc_filter"]
- assert !test_process(ExceptConditionProcController, "show_without_filter").template.assigns["ran_proc_filter"]
-
- assert test_process(ExceptConditionClassController).template.assigns["ran_class_filter"]
- assert !test_process(ExceptConditionClassController, "show_without_filter").template.assigns["ran_class_filter"]
- end
-
- def test_running_before_and_after_condition_filters
- assert_equal %w( ensure_login clean_up_tmp), test_process(BeforeAndAfterConditionController).template.assigns["ran_filter"]
- assert_equal nil, test_process(BeforeAndAfterConditionController, "show_without_filter").template.assigns["ran_filter"]
- end
-
- def test_bad_filter
- bad_filter_controller = Class.new(ActionController::Base)
- assert_raises(ActionController::ActionControllerError) do
- bad_filter_controller.before_filter 2
- end
- end
-
- def test_around_filter
- controller = test_process(AroundFilterController)
- assert controller.template.assigns["before_ran"]
- assert controller.template.assigns["after_ran"]
- end
-
- def test_having_properties_in_around_filter
- controller = test_process(AroundFilterController)
- assert_equal "before and after", controller.template.assigns["execution_log"]
- end
-
- def test_prepending_and_appending_around_filter
- controller = test_process(MixedFilterController)
- assert_equal " before aroundfilter before procfilter before appended aroundfilter " +
- " after appended aroundfilter after aroundfilter after procfilter ",
- MixedFilterController.execution_log
- end
-
- def test_rendering_breaks_filtering_chain
- response = test_process(RenderingController)
- assert_equal "something else", response.body
- assert !response.template.assigns["ran_action"]
- end
-
- def test_filters_with_mixed_specialization_run_in_order
- assert_nothing_raised do
- response = test_process(MixedSpecializationController, 'bar')
- assert_equal 'bar', response.body
- end
-
- assert_nothing_raised do
- response = test_process(MixedSpecializationController, 'foo')
- assert_equal 'foo', response.body
- end
- end
-
- def test_dynamic_dispatch
- %w(foo bar baz).each do |action|
- request = ActionController::TestRequest.new
- request.query_parameters[:choose] = action
- response = DynamicDispatchController.process(request, ActionController::TestResponse.new)
- assert_equal action, response.body
- end
- end
-
- def test_conditional_skipping_of_filters
- assert_nil test_process(ConditionalSkippingController, "login").template.assigns["ran_filter"]
- assert_equal %w( ensure_login find_user ), test_process(ConditionalSkippingController, "change_password").template.assigns["ran_filter"]
-
- assert_nil test_process(ConditionalSkippingController, "login").template.controller.instance_variable_get("@ran_after_filter")
- assert_equal %w( clean_up ), test_process(ConditionalSkippingController, "change_password").template.controller.instance_variable_get("@ran_after_filter")
- end
-
- def test_conditional_skipping_of_filters_when_parent_filter_is_also_conditional
- assert_equal %w( conditional_in_parent conditional_in_parent ), test_process(ChildOfConditionalParentController).template.assigns['ran_filter']
- assert_nil test_process(ChildOfConditionalParentController, 'another_action').template.assigns['ran_filter']
- end
-
- def test_condition_skipping_of_filters_when_siblings_also_have_conditions
- assert_equal %w( conditional_in_parent conditional_in_parent ), test_process(ChildOfConditionalParentController).template.assigns['ran_filter'], "1"
- assert_equal nil, test_process(AnotherChildOfConditionalParentController).template.assigns['ran_filter']
- assert_equal %w( conditional_in_parent conditional_in_parent ), test_process(ChildOfConditionalParentController).template.assigns['ran_filter']
- end
-
- def test_changing_the_requirements
- assert_equal nil, test_process(ChangingTheRequirementsController, "go_wild").template.assigns['ran_filter']
- end
-
- private
- def test_process(controller, action = "show")
- request = ActionController::TestRequest.new
- request.action = action
- controller.process(request, ActionController::TestResponse.new)
- end
-end
-
-
-
-class PostsController < ActionController::Base
- def rescue_action(e); raise e; end
-
- module AroundExceptions
- class Error < StandardError ; end
- class Before < Error ; end
- class After < Error ; end
- end
- include AroundExceptions
-
- class DefaultFilter
- include AroundExceptions
- end
-
- module_eval %w(raises_before raises_after raises_both no_raise no_filter).map { |action| "def #{action}; default_action end" }.join("\n")
-
- private
- def default_action
- render :inline => "#{action_name} called"
- end
-end
-
-class ControllerWithSymbolAsFilter < PostsController
- around_filter :raise_before, :only => :raises_before
- around_filter :raise_after, :only => :raises_after
- around_filter :without_exception, :only => :no_raise
-
- private
- def raise_before
- raise Before
- yield
- end
-
- def raise_after
- yield
- raise After
- end
-
- def without_exception
- # Do stuff...
- 1 + 1
-
- yield
-
- # Do stuff...
- 1 + 1
- end
-end
-
-class ControllerWithFilterClass < PostsController
- class YieldingFilter < DefaultFilter
- def self.filter(controller)
- yield
- raise After
- end
- end
-
- around_filter YieldingFilter, :only => :raises_after
-end
-
-class ControllerWithFilterInstance < PostsController
- class YieldingFilter < DefaultFilter
- def filter(controller)
- yield
- raise After
- end
- end
-
- around_filter YieldingFilter.new, :only => :raises_after
-end
-
-class ControllerWithFilterMethod < PostsController
- class YieldingFilter < DefaultFilter
- def filter(controller)
- yield
- raise After
- end
- end
-
- around_filter YieldingFilter.new.method(:filter), :only => :raises_after
-end
-
-class ControllerWithProcFilter < PostsController
- around_filter(:only => :no_raise) do |c,b|
- c.assigns['before'] = true
- b.call
- c.assigns['after'] = true
- end
-end
-
-class ControllerWithWrongFilterType < PostsController
- around_filter lambda { yield }, :only => :no_raise
-end
-
-class ControllerWithNestedFilters < ControllerWithSymbolAsFilter
- around_filter :raise_before, :raise_after, :without_exception, :only => :raises_both
-end
-
-class ControllerWithAllTypesOfFilters < PostsController
- before_filter :before
- around_filter :around
- after_filter :after
- around_filter :around_again
-
- private
- def before
- @ran_filter ||= []
- @ran_filter << 'before'
- end
-
- def around
- @ran_filter << 'around (before yield)'
- yield
- @ran_filter << 'around (after yield)'
- end
-
- def after
- @ran_filter << 'after'
- end
-
- def around_again
- @ran_filter << 'around_again (before yield)'
- yield
- @ran_filter << 'around_again (after yield)'
- end
-end
-
-class ControllerWithTwoLessFilters < ControllerWithAllTypesOfFilters
- skip_filter :around_again
- skip_filter :after
-end
-
-class YieldingAroundFiltersTest < Test::Unit::TestCase
- include PostsController::AroundExceptions
-
- def test_filters_registering
- assert_equal 1, ControllerWithFilterMethod.filter_chain.size
- assert_equal 1, ControllerWithFilterClass.filter_chain.size
- assert_equal 1, ControllerWithFilterInstance.filter_chain.size
- assert_equal 3, ControllerWithSymbolAsFilter.filter_chain.size
- assert_equal 1, ControllerWithWrongFilterType.filter_chain.size
- assert_equal 6, ControllerWithNestedFilters.filter_chain.size
- assert_equal 4, ControllerWithAllTypesOfFilters.filter_chain.size
- end
-
- def test_wrong_filter_type
- assert_raise(ActionController::ActionControllerError) do
- test_process(ControllerWithWrongFilterType,'no_raise')
- end
- end
-
- def test_base
- controller = PostsController
- assert_nothing_raised { test_process(controller,'no_raise') }
- assert_nothing_raised { test_process(controller,'raises_before') }
- assert_nothing_raised { test_process(controller,'raises_after') }
- assert_nothing_raised { test_process(controller,'no_filter') }
- end
-
- def test_with_symbol
- controller = ControllerWithSymbolAsFilter
- assert_nothing_raised { test_process(controller,'no_raise') }
- assert_raise(Before) { test_process(controller,'raises_before') }
- assert_raise(After) { test_process(controller,'raises_after') }
- assert_nothing_raised { test_process(controller,'no_raise') }
- end
-
- def test_with_class
- controller = ControllerWithFilterClass
- assert_nothing_raised { test_process(controller,'no_raise') }
- assert_raise(After) { test_process(controller,'raises_after') }
- end
-
- def test_with_instance
- controller = ControllerWithFilterInstance
- assert_nothing_raised { test_process(controller,'no_raise') }
- assert_raise(After) { test_process(controller,'raises_after') }
- end
-
- def test_with_method
- controller = ControllerWithFilterMethod
- assert_nothing_raised { test_process(controller,'no_raise') }
- assert_raise(After) { test_process(controller,'raises_after') }
- end
-
- def test_with_proc
- controller = test_process(ControllerWithProcFilter,'no_raise')
- assert controller.template.assigns['before']
- assert controller.template.assigns['after']
- end
-
- def test_nested_filters
- controller = ControllerWithNestedFilters
- assert_nothing_raised do
- begin
- test_process(controller,'raises_both')
- rescue Before, After
- end
- end
- assert_raise Before do
- begin
- test_process(controller,'raises_both')
- rescue After
- end
- end
- end
-
- def test_filter_order_with_all_filter_types
- controller = test_process(ControllerWithAllTypesOfFilters,'no_raise')
- assert_equal 'before around (before yield) around_again (before yield) around_again (after yield) around (after yield) after',controller.template.assigns['ran_filter'].join(' ')
- end
-
- def test_filter_order_with_skip_filter_method
- controller = test_process(ControllerWithTwoLessFilters,'no_raise')
- assert_equal 'before around (before yield) around (after yield)',controller.template.assigns['ran_filter'].join(' ')
- end
-
- def test_first_filter_in_multiple_before_filter_chain_halts
- controller = ::FilterTest::TestMultipleFiltersController.new
- response = test_process(controller, 'fail_1')
- assert_equal '', response.body
- assert_equal 1, controller.instance_variable_get(:@try)
- assert controller.instance_variable_get(:@before_filter_chain_aborted)
- end
-
- def test_second_filter_in_multiple_before_filter_chain_halts
- controller = ::FilterTest::TestMultipleFiltersController.new
- response = test_process(controller, 'fail_2')
- assert_equal '', response.body
- assert_equal 2, controller.instance_variable_get(:@try)
- assert controller.instance_variable_get(:@before_filter_chain_aborted)
- end
-
- def test_last_filter_in_multiple_before_filter_chain_halts
- controller = ::FilterTest::TestMultipleFiltersController.new
- response = test_process(controller, 'fail_3')
- assert_equal '', response.body
- assert_equal 3, controller.instance_variable_get(:@try)
- assert controller.instance_variable_get(:@before_filter_chain_aborted)
- end
-
- protected
- def test_process(controller, action = "show")
- request = ActionController::TestRequest.new
- request.action = action
- controller.process(request, ActionController::TestResponse.new)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/flash_test.rb b/tracks/vendor/rails/actionpack/test/controller/flash_test.rb
deleted file mode 100644
index d12ced85..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/flash_test.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class FlashTest < Test::Unit::TestCase
- class TestController < ActionController::Base
- def set_flash
- flash["that"] = "hello"
- render :inline => "hello"
- end
-
- def set_flash_now
- flash.now["that"] = "hello"
- flash.now["foo"] ||= "bar"
- flash.now["foo"] ||= "err"
- @flashy = flash.now["that"]
- @flash_copy = {}.update flash
- render :inline => "hello"
- end
-
- def attempt_to_use_flash_now
- @flash_copy = {}.update flash
- @flashy = flash["that"]
- render :inline => "hello"
- end
-
- def use_flash
- @flash_copy = {}.update flash
- @flashy = flash["that"]
- render :inline => "hello"
- end
-
- def use_flash_and_keep_it
- @flash_copy = {}.update flash
- @flashy = flash["that"]
- silence_warnings { keep_flash }
- render :inline => "hello"
- end
-
- def use_flash_after_reset_session
- flash["that"] = "hello"
- @flashy_that = flash["that"]
- reset_session
- @flashy_that_reset = flash["that"]
- flash["this"] = "good-bye"
- @flashy_this = flash["this"]
- render :inline => "hello"
- end
-
- def rescue_action(e)
- raise unless ActionController::MissingTemplate === e
- end
- end
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = TestController.new
- end
-
- def test_flash
- get :set_flash
-
- get :use_flash
- assert_equal "hello", @response.template.assigns["flash_copy"]["that"]
- assert_equal "hello", @response.template.assigns["flashy"]
-
- get :use_flash
- assert_nil @response.template.assigns["flash_copy"]["that"], "On second flash"
- end
-
- def test_keep_flash
- get :set_flash
-
- assert_deprecated(/keep_flash/) { get :use_flash_and_keep_it }
- assert_equal "hello", @response.template.assigns["flash_copy"]["that"]
- assert_equal "hello", @response.template.assigns["flashy"]
-
- get :use_flash
- assert_equal "hello", @response.template.assigns["flash_copy"]["that"], "On second flash"
-
- get :use_flash
- assert_nil @response.template.assigns["flash_copy"]["that"], "On third flash"
- end
-
- def test_flash_now
- get :set_flash_now
- assert_equal "hello", @response.template.assigns["flash_copy"]["that"]
- assert_equal "bar" , @response.template.assigns["flash_copy"]["foo"]
- assert_equal "hello", @response.template.assigns["flashy"]
-
- get :attempt_to_use_flash_now
- assert_nil @response.template.assigns["flash_copy"]["that"]
- assert_nil @response.template.assigns["flash_copy"]["foo"]
- assert_nil @response.template.assigns["flashy"]
- end
-
- def test_flash_after_reset_session
- get :use_flash_after_reset_session
- assert_equal "hello", @response.template.assigns["flashy_that"]
- assert_equal "good-bye", @response.template.assigns["flashy_this"]
- assert_nil @response.template.assigns["flashy_that_reset"]
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb b/tracks/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb
deleted file mode 100644
index cb872f65..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-MemCache = Struct.new(:MemCache, :address) unless Object.const_defined?(:MemCache)
-
-class FragmentCacheStoreSettingTest < Test::Unit::TestCase
- def teardown
- ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemoryStore.new
- end
-
- def test_file_fragment_cache_store
- ActionController::Base.fragment_cache_store = :file_store, "/path/to/cache/directory"
- assert_kind_of(
- ActionController::Caching::Fragments::FileStore,
- ActionController::Base.fragment_cache_store
- )
- assert_equal "/path/to/cache/directory", ActionController::Base.fragment_cache_store.cache_path
- end
-
- def test_drb_fragment_cache_store
- ActionController::Base.fragment_cache_store = :drb_store, "druby://localhost:9192"
- assert_kind_of(
- ActionController::Caching::Fragments::DRbStore,
- ActionController::Base.fragment_cache_store
- )
- assert_equal "druby://localhost:9192", ActionController::Base.fragment_cache_store.address
- end
-
- def test_mem_cache_fragment_cache_store
- ActionController::Base.fragment_cache_store = :mem_cache_store, "localhost"
- assert_kind_of(
- ActionController::Caching::Fragments::MemCacheStore,
- ActionController::Base.fragment_cache_store
- )
- assert_equal %w(localhost), ActionController::Base.fragment_cache_store.addresses
- end
-
- def test_object_assigned_fragment_cache_store
- ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::FileStore.new("/path/to/cache/directory")
- assert_kind_of(
- ActionController::Caching::Fragments::FileStore,
- ActionController::Base.fragment_cache_store
- )
- assert_equal "/path/to/cache/directory", ActionController::Base.fragment_cache_store.cache_path
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/helper_test.rb b/tracks/vendor/rails/actionpack/test/controller/helper_test.rb
deleted file mode 100644
index 98c8f7e7..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/helper_test.rb
+++ /dev/null
@@ -1,187 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class TestController < ActionController::Base
- attr_accessor :delegate_attr
- def delegate_method() end
- def rescue_action(e) raise end
-end
-
-module Fun
- class GamesController < ActionController::Base
- def render_hello_world
- render :inline => "hello: <%= stratego %>"
- end
-
- def rescue_action(e) raise end
- end
-
- class PDFController < ActionController::Base
- def test
- render :inline => "test: <%= foobar %>"
- end
-
- def rescue_action(e) raise end
- end
-end
-
-module LocalAbcHelper
- def a() end
- def b() end
- def c() end
-end
-
-class HelperTest < Test::Unit::TestCase
- def setup
- # Increment symbol counter.
- @symbol = (@@counter ||= 'A0').succ!.dup
-
- # Generate new controller class.
- controller_class_name = "Helper#{@symbol}Controller"
- eval("class #{controller_class_name} < TestController; end")
- @controller_class = self.class.const_get(controller_class_name)
-
- # Generate new template class and assign to controller.
- template_class_name = "Test#{@symbol}View"
- eval("class #{template_class_name} < ActionView::Base; end")
- @template_class = self.class.const_get(template_class_name)
- @controller_class.template_class = @template_class
-
- # Set default test helper.
- self.test_helper = LocalAbcHelper
- end
-
- def teardown
- # Reset template class.
- #ActionController::Base.template_class = ActionView::Base
- end
-
-
- def test_deprecated_helper
- assert_equal expected_helper_methods, missing_methods
- assert_nothing_raised { @controller_class.helper TestHelper }
- assert_equal [], missing_methods
- end
-
- def test_declare_helper
- require 'abc_helper'
- self.test_helper = AbcHelper
- assert_equal expected_helper_methods, missing_methods
- assert_nothing_raised { @controller_class.helper :abc }
- assert_equal [], missing_methods
- end
-
- def test_declare_missing_helper
- assert_equal expected_helper_methods, missing_methods
- assert_raise(MissingSourceFile) { @controller_class.helper :missing }
- end
-
- def test_declare_missing_file_from_helper
- require 'broken_helper'
- rescue LoadError => e
- assert_nil(/\bbroken_helper\b/.match(e.to_s)[1])
- end
-
- def test_helper_block
- assert_nothing_raised {
- @controller_class.helper { def block_helper_method; end }
- }
- assert master_helper_methods.include?('block_helper_method')
- end
-
- def test_helper_block_include
- assert_equal expected_helper_methods, missing_methods
- assert_nothing_raised {
- @controller_class.helper { include TestHelper }
- }
- assert [], missing_methods
- end
-
- def test_helper_method
- assert_nothing_raised { @controller_class.helper_method :delegate_method }
- assert master_helper_methods.include?('delegate_method')
- end
-
- def test_helper_attr
- assert_nothing_raised { @controller_class.helper_attr :delegate_attr }
- assert master_helper_methods.include?('delegate_attr')
- assert master_helper_methods.include?('delegate_attr=')
- end
-
- def test_helper_for_nested_controller
- request = ActionController::TestRequest.new
- response = ActionController::TestResponse.new
- request.action = 'render_hello_world'
-
- assert_equal 'hello: Iz guuut!', Fun::GamesController.process(request, response).body
- end
-
- def test_helper_for_acronym_controller
- request = ActionController::TestRequest.new
- response = ActionController::TestResponse.new
- request.action = 'test'
-
- assert_equal 'test: baz', Fun::PDFController.process(request, response).body
- end
-
- private
- def expected_helper_methods
- TestHelper.instance_methods
- end
-
- def master_helper_methods
- @controller_class.master_helper_module.instance_methods
- end
-
- def missing_methods
- expected_helper_methods - master_helper_methods
- end
-
- def test_helper=(helper_module)
- silence_warnings { self.class.const_set('TestHelper', helper_module) }
- end
-end
-
-
-class IsolatedHelpersTest < Test::Unit::TestCase
- class A < ActionController::Base
- def index
- render :inline => '<%= shout %>'
- end
-
- def rescue_action(e) raise end
- end
-
- class B < A
- helper { def shout; 'B' end }
-
- def index
- render :inline => '<%= shout %>'
- end
- end
-
- class C < A
- helper { def shout; 'C' end }
-
- def index
- render :inline => '<%= shout %>'
- end
- end
-
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @request.action = 'index'
- end
-
- def test_helper_in_a
- assert_raise(NameError) { A.process(@request, @response) }
- end
-
- def test_helper_in_b
- assert_equal 'B', B.process(@request, @response).body
- end
-
- def test_helper_in_c
- assert_equal 'C', C.process(@request, @response).body
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/integration_test.rb b/tracks/vendor/rails/actionpack/test/controller/integration_test.rb
deleted file mode 100644
index 665c5901..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/integration_test.rb
+++ /dev/null
@@ -1,154 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-$:.unshift File.dirname(__FILE__) + '/../../../railties/lib'
-require 'action_controller/integration'
-
-begin # rescue LoadError
-require 'mocha'
-require 'stubba'
-
-# Stub process for testing.
-module ActionController
- module Integration
- class Session
- def process
- end
-
- def generic_url_rewriter
- end
- end
- end
-end
-
-class SessionTest < Test::Unit::TestCase
- def setup
- @session = ActionController::Integration::Session.new
- end
- def test_https_bang_works_and_sets_truth_by_default
- assert !@session.https?
- @session.https!
- assert @session.https?
- @session.https! false
- assert !@session.https?
- end
-
- def test_host!
- assert_not_equal "glu.ttono.us", @session.host
- @session.host! "rubyonrails.com"
- assert_equal "rubyonrails.com", @session.host
- end
-
- def test_follow_redirect_raises_when_no_redirect
- @session.stubs(:redirect?).returns(false)
- assert_raise(RuntimeError) { @session.follow_redirect! }
- end
-
- def test_follow_redirect_calls_get_and_returns_status
- @session.stubs(:redirect?).returns(true)
- @session.stubs(:headers).returns({"location" => ["www.google.com"]})
- @session.stubs(:status).returns(200)
- @session.expects(:get)
- assert_equal 200, @session.follow_redirect!
- end
-
- def test_get_via_redirect
- path = "/somepath"; args = {:id => '1'}
-
- @session.expects(:get).with(path,args)
-
- redirects = [true, true, false]
- @session.stubs(:redirect?).returns(lambda { redirects.shift })
- @session.expects(:follow_redirect!).times(2)
-
- @session.stubs(:status).returns(200)
- assert_equal 200, @session.get_via_redirect(path, args)
- end
-
- def test_post_via_redirect
- path = "/somepath"; args = {:id => '1'}
-
- @session.expects(:post).with(path,args)
-
- redirects = [true, true, false]
- @session.stubs(:redirect?).returns(lambda { redirects.shift })
- @session.expects(:follow_redirect!).times(2)
-
- @session.stubs(:status).returns(200)
- assert_equal 200, @session.post_via_redirect(path, args)
- end
-
- def test_url_for_with_controller
- options = {:action => 'show'}
- mock_controller = mock()
- mock_controller.expects(:url_for).with(options).returns('/show')
- @session.stubs(:controller).returns(mock_controller)
- assert_equal '/show', @session.url_for(options)
- end
-
- def test_url_for_without_controller
- options = {:action => 'show'}
- mock_rewriter = mock()
- mock_rewriter.expects(:rewrite).with(options).returns('/show')
- @session.stubs(:generic_url_rewriter).returns(mock_rewriter)
- @session.stubs(:controller).returns(nil)
- assert_equal '/show', @session.url_for(options)
- end
-
- def test_redirect_bool_with_status_in_300s
- @session.stubs(:status).returns 301
- assert @session.redirect?
- end
-
- def test_redirect_bool_with_status_in_200s
- @session.stubs(:status).returns 200
- assert !@session.redirect?
- end
-
- def test_get
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- @session.expects(:process).with(:get,path,params,headers)
- @session.get(path,params,headers)
- end
-
- def test_post
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- @session.expects(:process).with(:post,path,params,headers)
- @session.post(path,params,headers)
- end
-
- def test_put
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- @session.expects(:process).with(:put,path,params,headers)
- @session.put(path,params,headers)
- end
-
- def test_delete
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- @session.expects(:process).with(:delete,path,params,headers)
- @session.delete(path,params,headers)
- end
-
- def test_head
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- @session.expects(:process).with(:head,path,params,headers)
- @session.head(path,params,headers)
- end
-
- def test_xml_http_request
- path = "/index"; params = "blah"; headers = {:location => 'blah'}
- headers_after_xhr = headers.merge(
- "X-Requested-With" => "XMLHttpRequest",
- "Accept" => "text/javascript, text/html, application/xml, text/xml, */*"
- )
- @session.expects(:post).with(path,params,headers_after_xhr)
- @session.xml_http_request(path,params,headers)
- end
-end
-
-# TODO
-# class MockCGITest < Test::Unit::TestCase
-# end
-
-rescue LoadError
- $stderr.puts "Skipping integration tests. `gem install mocha` and try again."
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/layout_test.rb b/tracks/vendor/rails/actionpack/test/controller/layout_test.rb
deleted file mode 100644
index 3e1d3d96..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/layout_test.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-# The template_root must be set on Base and not LayoutTest so that LayoutTest's inherited method has access to
-# the template_root when looking for a layout
-ActionController::Base.template_root = File.dirname(__FILE__) + '/../fixtures/layout_tests/'
-
-class LayoutTest < ActionController::Base
- def self.controller_path; 'views' end
-end
-
-# Restore template root to be unset
-ActionController::Base.template_root = nil
-
-class ProductController < LayoutTest
-end
-
-class ItemController < LayoutTest
-end
-
-class ThirdPartyTemplateLibraryController < LayoutTest
-end
-
-module ControllerNameSpace
-end
-
-class ControllerNameSpace::NestedController < LayoutTest
-end
-
-class MabView
- def initialize(view)
- end
-
- def render(text, locals = {})
- text
- end
-end
-
-ActionView::Base::register_template_handler :mab, MabView
-
-class LayoutAutoDiscoveryTest < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_application_layout_is_default_when_no_controller_match
- @controller = ProductController.new
- get :hello
- assert_equal 'layout_test.rhtml hello.rhtml', @response.body
- end
-
- def test_controller_name_layout_name_match
- @controller = ItemController.new
- get :hello
- assert_equal 'item.rhtml hello.rhtml', @response.body
- end
-
- def test_third_party_template_library_auto_discovers_layout
- @controller = ThirdPartyTemplateLibraryController.new
- get :hello
- assert_equal 'layouts/third_party_template_library', @controller.active_layout
- assert_equal 'Mab', @response.body
- end
-
- def test_namespaced_controllers_auto_detect_layouts
- @controller = ControllerNameSpace::NestedController.new
- get :hello
- assert_equal 'layouts/controller_name_space/nested', @controller.active_layout
- assert_equal 'controller_name_space/nested.rhtml hello.rhtml', @response.body
- end
-end
-
-class ExemptFromLayoutTest < Test::Unit::TestCase
- def setup
- @controller = LayoutTest.new
- end
-
- def test_rjs_exempt_from_layout
- assert @controller.send(:template_exempt_from_layout?, 'test.rjs')
- end
-
- def test_rhtml_and_rxml_not_exempt_from_layout
- assert !@controller.send(:template_exempt_from_layout?, 'test.rhtml')
- assert !@controller.send(:template_exempt_from_layout?, 'test.rxml')
- end
-
- def test_other_extension_not_exempt_from_layout
- assert !@controller.send(:template_exempt_from_layout?, 'test.random')
- end
-
- def test_add_extension_to_exempt_from_layout
- ['rpdf', :rpdf].each do |ext|
- assert_nothing_raised do
- ActionController::Base.exempt_from_layout ext
- end
- assert @controller.send(:template_exempt_from_layout?, "test.#{ext}")
- end
- end
-
- def test_add_regexp_to_exempt_from_layout
- ActionController::Base.exempt_from_layout /\.rdoc/
- assert @controller.send(:template_exempt_from_layout?, 'test.rdoc')
- end
-end
-
-
-class DefaultLayoutController < LayoutTest
-end
-
-class HasOwnLayoutController < LayoutTest
- layout 'item'
-end
-
-class SetsLayoutInRenderController < LayoutTest
- def hello
- render :layout => 'third_party_template_library'
- end
-end
-
-class RendersNoLayoutController < LayoutTest
- def hello
- render :layout => false
- end
-end
-
-class LayoutSetInResponseTest < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_layout_set_when_using_default_layout
- @controller = DefaultLayoutController.new
- get :hello
- assert_equal 'layouts/layout_test', @response.layout
- end
-
- def test_layout_set_when_set_in_controller
- @controller = HasOwnLayoutController.new
- get :hello
- assert_equal 'layouts/item', @response.layout
- end
-
- def test_layout_set_when_using_render
- @controller = SetsLayoutInRenderController.new
- get :hello
- assert_equal 'layouts/third_party_template_library', @response.layout
- end
-
- def test_layout_is_not_set_when_none_rendered
- @controller = RendersNoLayoutController.new
- get :hello
- assert_nil @response.layout
- end
-end
-
-
-class SetsNonExistentLayoutFile < LayoutTest
- layout "nofile.rhtml"
-end
-
-class LayoutExceptionRaised < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_exception_raised_when_layout_file_not_found
- @controller = SetsNonExistentLayoutFile.new
- get :hello
- @response.template.class.module_eval { attr_accessor :exception }
- assert_equal ActionController::MissingTemplate, @response.template.exception.class
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/mime_responds_test.rb b/tracks/vendor/rails/actionpack/test/controller/mime_responds_test.rb
deleted file mode 100644
index c08062ca..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/mime_responds_test.rb
+++ /dev/null
@@ -1,351 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class RespondToController < ActionController::Base
- layout :set_layout
-
- def html_xml_or_rss
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.xml { render :text => "XML" }
- type.rss { render :text => "RSS" }
- type.all { render :text => "Nothing" }
- end
- end
-
- def js_or_html
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.js { render :text => "JS" }
- type.all { render :text => "Nothing" }
- end
- end
-
- def json_or_yaml
- respond_to do |type|
- type.json { render :text => "JSON" }
- type.yaml { render :text => "YAML" }
- end
- end
-
- def html_or_xml
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.xml { render :text => "XML" }
- type.all { render :text => "Nothing" }
- end
- end
-
- def just_xml
- respond_to do |type|
- type.xml { render :text => "XML" }
- end
- end
-
- def using_defaults
- respond_to do |type|
- type.html
- type.js
- type.xml
- end
- end
-
- def using_defaults_with_type_list
- respond_to(:html, :js, :xml)
- end
-
- def made_for_content_type
- respond_to do |type|
- type.rss { render :text => "RSS" }
- type.atom { render :text => "ATOM" }
- type.all { render :text => "Nothing" }
- end
- end
-
- def custom_type_handling
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.custom("application/crazy-xml") { render :text => "Crazy XML" }
- type.all { render :text => "Nothing" }
- end
- end
-
- def custom_constant_handling
- Mime::Type.register("text/x-mobile", :mobile)
-
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.mobile { render :text => "Mobile" }
- end
-
- Mime.send :remove_const, :MOBILE
- end
-
- def custom_constant_handling_without_block
- Mime::Type.register("text/x-mobile", :mobile)
-
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.mobile
- end
-
- Mime.send :remove_const, :MOBILE
- end
-
-
- def handle_any
- respond_to do |type|
- type.html { render :text => "HTML" }
- type.any(:js, :xml) { render :text => "Either JS or XML" }
- end
- end
-
- def all_types_with_layout
- respond_to do |type|
- type.html
- type.js
- end
- end
-
- def rescue_action(e)
- raise
- end
-
- protected
- def set_layout
- if action_name == "all_types_with_layout"
- "standard"
- end
- end
-end
-
-RespondToController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class MimeControllerTest < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @controller = RespondToController.new
- @request.host = "www.example.com"
- end
-
- def test_html
- @request.env["HTTP_ACCEPT"] = "text/html"
- get :js_or_html
- assert_equal 'HTML', @response.body
-
- get :html_or_xml
- assert_equal 'HTML', @response.body
-
- get :just_xml
- assert_response 406
- end
-
- def test_all
- @request.env["HTTP_ACCEPT"] = "*/*"
- get :js_or_html
- assert_equal 'HTML', @response.body # js is not part of all
-
- get :html_or_xml
- assert_equal 'HTML', @response.body
-
- get :just_xml
- assert_equal 'XML', @response.body
- end
-
- def test_xml
- @request.env["HTTP_ACCEPT"] = "application/xml"
- get :html_xml_or_rss
- assert_equal 'XML', @response.body
- end
-
- def test_js_or_html
- @request.env["HTTP_ACCEPT"] = "text/javascript, text/html"
- get :js_or_html
- assert_equal 'JS', @response.body
-
- get :html_or_xml
- assert_equal 'HTML', @response.body
-
- get :just_xml
- assert_response 406
- end
-
- def test_json_or_yaml
- get :json_or_yaml
- assert_equal 'JSON', @response.body
-
- get :json_or_yaml, :format => 'json'
- assert_equal 'JSON', @response.body
-
- get :json_or_yaml, :format => 'yaml'
- assert_equal 'YAML', @response.body
-
- { 'YAML' => %w(text/yaml),
- 'JSON' => %w(application/json text/x-json)
- }.each do |body, content_types|
- content_types.each do |content_type|
- @request.env['HTTP_ACCEPT'] = content_type
- get :json_or_yaml
- assert_equal body, @response.body
- end
- end
- end
-
- def test_js_or_anything
- @request.env["HTTP_ACCEPT"] = "text/javascript, */*"
- get :js_or_html
- assert_equal 'JS', @response.body
-
- get :html_or_xml
- assert_equal 'HTML', @response.body
-
- get :just_xml
- assert_equal 'XML', @response.body
- end
-
- def test_using_defaults
- @request.env["HTTP_ACCEPT"] = "*/*"
- get :using_defaults
- assert_equal 'Hello world!', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/javascript"
- get :using_defaults
- assert_equal '$("body").visualEffect("highlight");', @response.body
-
- @request.env["HTTP_ACCEPT"] = "application/xml"
- get :using_defaults
- assert_equal "Hello world!
\n", @response.body
- end
-
- def test_using_defaults_with_type_list
- @request.env["HTTP_ACCEPT"] = "*/*"
- get :using_defaults_with_type_list
- assert_equal 'Hello world!', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/javascript"
- get :using_defaults_with_type_list
- assert_equal '$("body").visualEffect("highlight");', @response.body
-
- @request.env["HTTP_ACCEPT"] = "application/xml"
- get :using_defaults_with_type_list
- assert_equal "Hello world!
\n", @response.body
- end
-
- def test_with_content_type
- @request.env["CONTENT_TYPE"] = "application/atom+xml"
- get :made_for_content_type
- assert_equal "ATOM", @response.body
-
- @request.env["CONTENT_TYPE"] = "application/rss+xml"
- get :made_for_content_type
- assert_equal "RSS", @response.body
- end
-
- def test_synonyms
- @request.env["HTTP_ACCEPT"] = "application/javascript"
- get :js_or_html
- assert_equal 'JS', @response.body
-
- @request.env["HTTP_ACCEPT"] = "application/x-xml"
- get :html_xml_or_rss
- assert_equal "XML", @response.body
- end
-
- def test_custom_types
- @request.env["HTTP_ACCEPT"] = "application/crazy-xml"
- get :custom_type_handling
- assert_equal 'Crazy XML', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/html"
- get :custom_type_handling
- assert_equal 'HTML', @response.body
- end
-
- def test_xhtml_alias
- @request.env["HTTP_ACCEPT"] = "application/xhtml+xml,application/xml"
- get :html_or_xml
- assert_equal 'HTML', @response.body
- end
-
- def test_firefox_simulation
- @request.env["HTTP_ACCEPT"] = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
- get :html_or_xml
- assert_equal 'HTML', @response.body
- end
-
- def test_handle_any
- @request.env["HTTP_ACCEPT"] = "*/*"
- get :handle_any
- assert_equal 'HTML', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/javascript"
- get :handle_any
- assert_equal 'Either JS or XML', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/xml"
- get :handle_any
- assert_equal 'Either JS or XML', @response.body
- end
-
- def test_all_types_with_layout
- @request.env["HTTP_ACCEPT"] = "text/javascript"
- get :all_types_with_layout
- assert_equal 'RJS for all_types_with_layout', @response.body
-
- @request.env["HTTP_ACCEPT"] = "text/html"
- get :all_types_with_layout
- assert_equal 'HTML for all_types_with_layout', @response.body
- end
-
- def test_xhr
- xhr :get, :js_or_html
- assert_equal 'JS', @response.body
-
- xhr :get, :using_defaults
- assert_equal '$("body").visualEffect("highlight");', @response.body
- end
-
- def test_custom_constant
- get :custom_constant_handling, :format => "mobile"
- assert_equal "Mobile", @response.body
- end
-
- def custom_constant_handling_without_block
-
- assert_raised(ActionController::RenderError) do
- get :custom_constant_handling, :format => "mobile"
- end
- end
-
- def test_forced_format
- get :html_xml_or_rss
- assert_equal "HTML", @response.body
-
- get :html_xml_or_rss, :format => "html"
- assert_equal "HTML", @response.body
-
- get :html_xml_or_rss, :format => "xml"
- assert_equal "XML", @response.body
-
- get :html_xml_or_rss, :format => "rss"
- assert_equal "RSS", @response.body
- end
-
- def test_render_action_for_html
- @controller.instance_eval do
- def render(*args)
- unless args.empty?
- @action = args.first[:action]
- end
- response.body = @action
- end
- end
-
- get :using_defaults
- assert_equal "using_defaults", @response.body
-
- get :using_defaults, :format => "xml"
- assert_equal "using_defaults.rxml", @response.body
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/mime_type_test.rb b/tracks/vendor/rails/actionpack/test/controller/mime_type_test.rb
deleted file mode 100644
index 65acbbf3..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/mime_type_test.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class MimeTypeTest < Test::Unit::TestCase
- Mime::PNG = Mime::Type.new("image/png")
- Mime::PLAIN = Mime::Type.new("text/plain")
-
- def test_parse_single
- Mime::LOOKUP.keys.each do |mime_type|
- assert_equal [Mime::Type.lookup(mime_type)], Mime::Type.parse(mime_type)
- end
- end
-
- def test_parse_without_q
- accept = "text/xml,application/xhtml+xml,text/yaml,application/xml,text/html,image/png,text/plain,*/*"
- expect = [Mime::HTML, Mime::XML, Mime::YAML, Mime::PNG, Mime::PLAIN, Mime::ALL]
- assert_equal expect, Mime::Type.parse(accept)
- end
-
- def test_parse_with_q
- accept = "text/xml,application/xhtml+xml,text/yaml; q=0.3,application/xml,text/html; q=0.8,image/png,text/plain; q=0.5,*/*; q=0.2"
- expect = [Mime::HTML, Mime::XML, Mime::PNG, Mime::PLAIN, Mime::YAML, Mime::ALL]
- assert_equal expect, Mime::Type.parse(accept)
- end
-
- def test_custom_type
- Mime::Type.register("image/gif", :gif)
- assert_nothing_raised do
- Mime::GIF
- assert_equal Mime::GIF, Mime::SET.last
- end
- Mime.send :remove_const, :GIF
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/controller/new_render_test.rb b/tracks/vendor/rails/actionpack/test/controller/new_render_test.rb
deleted file mode 100644
index 6e1ec341..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/new_render_test.rb
+++ /dev/null
@@ -1,738 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-silence_warnings { Customer = Struct.new("Customer", :name) }
-
-module Fun
- class GamesController < ActionController::Base
- def hello_world
- end
- end
-end
-
-module NewRenderTestHelper
- def rjs_helper_method_from_module
- page.visual_effect :highlight
- end
-end
-
-class NewRenderTestController < ActionController::Base
- layout :determine_layout
-
- def self.controller_name; "test"; end
- def self.controller_path; "test"; end
-
- def hello_world
- end
-
- def render_hello_world
- render :template => "test/hello_world"
- end
-
- def render_hello_world_from_variable
- @person = "david"
- render :text => "hello #{@person}"
- end
-
- def render_action_hello_world
- render :action => "hello_world"
- end
-
- def render_action_hello_world_as_symbol
- render :action => :hello_world
- end
-
- def render_text_hello_world
- render :text => "hello world"
- end
-
- def render_text_hello_world_with_layout
- @variable_for_layout = ", I'm here!"
- render :text => "hello world", :layout => true
- end
-
- def hello_world_with_layout_false
- render :layout => false
- end
-
- def render_custom_code
- render :text => "hello world", :status => "404 Moved"
- end
-
- def render_file_with_instance_variables
- @secret = 'in the sauce'
- path = File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_ivar.rhtml')
- render :file => path
- end
-
- def render_file_with_locals
- path = File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_locals.rhtml')
- render :file => path, :locals => {:secret => 'in the sauce'}
- end
-
- def render_file_not_using_full_path
- @secret = 'in the sauce'
- render :file => 'test/render_file_with_ivar', :use_full_path => true
- end
-
- def render_file_not_using_full_path_with_relative_path
- @secret = 'in the sauce'
- render :file => 'test/../test/render_file_with_ivar', :use_full_path => true
- end
-
- def render_file_not_using_full_path_with_dot_in_path
- @secret = 'in the sauce'
- render :file => 'test/dot.directory/render_file_with_ivar', :use_full_path => true
- end
-
- def render_xml_hello
- @name = "David"
- render :template => "test/hello"
- end
-
- def greeting
- # let's just rely on the template
- end
-
- def layout_test
- render :action => "hello_world"
- end
-
- def layout_test_with_different_layout
- render :action => "hello_world", :layout => "standard"
- end
-
- def rendering_without_layout
- render :action => "hello_world", :layout => false
- end
-
- def layout_overriding_layout
- render :action => "hello_world", :layout => "standard"
- end
-
- def rendering_nothing_on_layout
- render :nothing => true
- end
-
- def builder_layout_test
- render :action => "hello"
- end
-
- def partials_list
- @test_unchanged = 'hello'
- @customers = [ Customer.new("david"), Customer.new("mary") ]
- render :action => "list"
- end
-
- def partial_only
- render :partial => true
- end
-
- def partial_only_with_layout
- render :partial => "partial_only", :layout => true
- end
-
- def partial_with_locals
- render :partial => "customer", :locals => { :customer => Customer.new("david") }
- end
-
- def partial_collection
- render :partial => "customer", :collection => [ Customer.new("david"), Customer.new("mary") ]
- end
-
- def partial_collection_with_locals
- render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" }
- end
-
- def empty_partial_collection
- render :partial => "customer", :collection => []
- end
-
- def partial_with_hash_object
- render :partial => "hash_object", :object => {:first_name => "Sam"}
- end
-
- def partial_with_implicit_local_assignment
- @customer = Customer.new("Marcel")
- render :partial => "customer"
- end
-
- def hello_in_a_string
- @customers = [ Customer.new("david"), Customer.new("mary") ]
- render :text => "How's there? #{render_to_string("test/list")}"
- end
-
- def render_to_string_with_assigns
- @before = "i'm before the render"
- render_to_string :text => "foo"
- @after = "i'm after the render"
- render :action => "test/hello_world"
- end
-
- def render_to_string_with_exception
- render_to_string :file => "exception that will not be caught - this will certainly not work", :use_full_path => true
- end
-
- def render_to_string_with_caught_exception
- @before = "i'm before the render"
- begin
- render_to_string :file => "exception that will be caught- hope my future instance vars still work!", :use_full_path => true
- rescue
- end
- @after = "i'm after the render"
- render :action => "test/hello_world"
- end
-
- def accessing_params_in_template
- render :inline => "Hello: <%= params[:name] %>"
- end
-
- def accessing_params_in_template_with_layout
- render :layout => nil, :inline => "Hello: <%= params[:name] %>"
- end
-
- def render_with_explicit_template
- render "test/hello_world"
- end
-
- def double_render
- render :text => "hello"
- render :text => "world"
- end
-
- def double_redirect
- redirect_to :action => "double_render"
- redirect_to :action => "double_render"
- end
-
- def render_and_redirect
- render :text => "hello"
- redirect_to :action => "double_render"
- end
-
- def render_to_string_and_render
- @stuff = render_to_string :text => "here is some cached stuff"
- render :text => "Hi web users! #{@stuff}"
- end
-
- def rendering_with_conflicting_local_vars
- @name = "David"
- def @template.name() nil end
- render :action => "potential_conflicts"
- end
-
- def hello_world_from_rxml_using_action
- render :action => "hello_world.rxml"
- end
-
- def hello_world_from_rxml_using_template
- render :template => "test/hello_world.rxml"
- end
-
- def head_with_location_header
- head :location => "/foo"
- end
-
- def head_with_symbolic_status
- head :status => params[:status].intern
- end
-
- def head_with_integer_status
- head :status => params[:status].to_i
- end
-
- def head_with_string_status
- head :status => params[:status]
- end
-
- def head_with_custom_header
- head :x_custom_header => "something"
- end
-
- def head_with_status_code_first
- head :forbidden, :x_custom_header => "something"
- end
-
- helper NewRenderTestHelper
- helper do
- def rjs_helper_method(value)
- page.visual_effect :highlight, value
- end
- end
-
- def enum_rjs_test
- render :update do |page|
- page.select('.product').each do |value|
- page.rjs_helper_method_from_module
- page.rjs_helper_method(value)
- page.sortable(value, :url => { :action => "order" })
- page.draggable(value)
- end
- end
- end
-
- def delete_with_js
- @project_id = 4
- end
-
- def render_js_with_explicit_template
- @project_id = 4
- render :template => 'test/delete_with_js'
- end
-
- def render_js_with_explicit_action_template
- @project_id = 4
- render :action => 'delete_with_js'
- end
-
- def update_page
- render :update do |page|
- page.replace_html 'balance', '$37,000,000.00'
- page.visual_effect :highlight, 'balance'
- end
- end
-
- def update_page_with_instance_variables
- @money = '$37,000,000.00'
- @div_id = 'balance'
- render :update do |page|
- page.replace_html @div_id, @money
- page.visual_effect :highlight, @div_id
- end
- end
-
- def action_talk_to_layout
- # Action template sets variable that's picked up by layout
- end
-
- def render_text_with_assigns
- @hello = "world"
- render :text => "foo"
- end
-
- def yield_content_for
- render :action => "content_for", :layout => "yield"
- end
-
- def render_content_type_from_body
- response.content_type = Mime::RSS
- render :text => "hello world!"
- end
-
- def rescue_action(e) raise end
-
- private
- def determine_layout
- case action_name
- when "hello_world", "layout_test", "rendering_without_layout",
- "rendering_nothing_on_layout", "render_text_hello_world",
- "render_text_hello_world_with_layout",
- "hello_world_with_layout_false",
- "partial_only", "partial_only_with_layout",
- "accessing_params_in_template",
- "accessing_params_in_template_with_layout",
- "render_with_explicit_template",
- "render_js_with_explicit_template",
- "render_js_with_explicit_action_template",
- "delete_with_js", "update_page", "update_page_with_instance_variables"
-
- "layouts/standard"
- when "builder_layout_test"
- "layouts/builder"
- when "action_talk_to_layout", "layout_overriding_layout"
- "layouts/talk_from_action"
- end
- end
-end
-
-NewRenderTestController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-Fun::GamesController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class NewRenderTest < Test::Unit::TestCase
- def setup
- @controller = NewRenderTestController.new
-
- # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
- # a more accurate simulation of what happens in "real life".
- @controller.logger = Logger.new(nil)
-
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_simple_show
- get :hello_world
- assert_response :success
- assert_template "test/hello_world"
- assert_equal "Hello world!", @response.body
- end
-
- def test_do_with_render
- get :render_hello_world
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_from_variable
- get :render_hello_world_from_variable
- assert_equal "hello david", @response.body
- end
-
- def test_do_with_render_action
- get :render_action_hello_world
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_action_as_symbol
- get :render_action_hello_world_as_symbol
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_text
- get :render_text_hello_world
- assert_equal "hello world", @response.body
- end
-
- def test_do_with_render_text_and_layout
- get :render_text_hello_world_with_layout
- assert_equal "hello world, I'm here!", @response.body
- end
-
- def test_do_with_render_action_and_layout_false
- get :hello_world_with_layout_false
- assert_equal 'Hello world!', @response.body
- end
-
- def test_do_with_render_custom_code
- get :render_custom_code
- assert_response :missing
- end
-
- def test_render_file_with_instance_variables
- get :render_file_with_instance_variables
- assert_equal "The secret is in the sauce\n", @response.body
- end
-
- def test_render_file_not_using_full_path
- get :render_file_not_using_full_path
- assert_equal "The secret is in the sauce\n", @response.body
- end
-
- def test_render_file_not_using_full_path_with_relative_path
- get :render_file_not_using_full_path_with_relative_path
- assert_equal "The secret is in the sauce\n", @response.body
- end
-
- def test_render_file_not_using_full_path_with_dot_in_path
- get :render_file_not_using_full_path_with_dot_in_path
- assert_equal "The secret is in the sauce\n", @response.body
- end
-
- def test_render_file_with_locals
- get :render_file_with_locals
- assert_equal "The secret is in the sauce\n", @response.body
- end
-
- def test_attempt_to_access_object_method
- assert_raises(ActionController::UnknownAction, "No action responded to [clone]") { get :clone }
- end
-
- def test_private_methods
- assert_raises(ActionController::UnknownAction, "No action responded to [determine_layout]") { get :determine_layout }
- end
-
- def test_access_to_request_in_view
- view_internals_old_value = ActionController::Base.view_controller_internals
-
- ActionController::Base.view_controller_internals = false
- ActionController::Base.protected_variables_cache = nil
-
- get :hello_world
- assert !assigns.include?('request'), 'request should not be in assigns'
-
- ActionController::Base.view_controller_internals = true
- ActionController::Base.protected_variables_cache = nil
-
- get :hello_world
- assert assigns.include?('request'), 'request should be in assigns'
- assert_deprecated 'request' do
- assert_kind_of ActionController::AbstractRequest, assigns['request']
- end
- assert_not_deprecated do
- assert_kind_of ActionController::AbstractRequest, @response.template.request
- assert_kind_of ActionController::AbstractRequest, assigns['_request']
- end
-
- ensure
- ActionController::Base.view_controller_internals = view_internals_old_value
- ActionController::Base.protected_variables_cache = nil
- end
-
- def test_render_xml
- get :render_xml_hello
- assert_equal "\n Hello David
\nThis is grand!
\n\n", @response.body
- end
-
- def test_enum_rjs_test
- get :enum_rjs_test
- assert_equal <<-EOS.strip, @response.body
-$$(".product").each(function(value, index) {
-new Effect.Highlight(element,{});
-new Effect.Highlight(value,{});
-Sortable.create(value, {onUpdate:function(){new Ajax.Request('/test/order', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize(value)})}});
-new Draggable(value, {});
-});
-EOS
- end
-
- def test_render_xml_with_default
- get :greeting
- assert_equal "This is grand!
\n", @response.body
- end
-
- def test_render_rjs_with_default
- get :delete_with_js
- assert_equal %!Element.remove("person");\nnew Effect.Highlight(\"project-4\",{});!, @response.body
- end
-
- def test_render_rjs_template_explicitly
- get :render_js_with_explicit_template
- assert_equal %!Element.remove("person");\nnew Effect.Highlight(\"project-4\",{});!, @response.body
- end
-
- def test_rendering_rjs_action_explicitly
- get :render_js_with_explicit_action_template
- assert_equal %!Element.remove("person");\nnew Effect.Highlight(\"project-4\",{});!, @response.body
- end
-
- def test_layout_rendering
- get :layout_test
- assert_equal "Hello world!", @response.body
- end
-
- def test_layout_test_with_different_layout
- get :layout_test_with_different_layout
- assert_equal "Hello world!", @response.body
- end
-
- def test_rendering_without_layout
- get :rendering_without_layout
- assert_equal "Hello world!", @response.body
- end
-
- def test_layout_overriding_layout
- get :layout_overriding_layout
- assert_no_match %r{}, @response.body
- end
-
- def test_rendering_nothing_on_layout
- get :rendering_nothing_on_layout
- assert_equal " ", @response.body
- end
-
- def test_render_xml_with_layouts
- get :builder_layout_test
- assert_equal "\n\n Hello
\nThis is grand!
\n\n \n", @response.body
- end
-
- def test_partial_only
- get :partial_only
- assert_equal "only partial", @response.body
- end
-
- def test_partial_only_with_layout
- get :partial_only_with_layout
- assert_equal "only partial", @response.body
- end
-
- def test_render_to_string
- assert_not_deprecated { get :hello_in_a_string }
- assert_equal "How's there? goodbyeHello: davidHello: marygoodbye\n", @response.body
- end
-
- def test_render_to_string_doesnt_break_assigns
- get :render_to_string_with_assigns
- assert_equal "i'm before the render", assigns(:before)
- assert_equal "i'm after the render", assigns(:after)
- end
-
- def test_bad_render_to_string_still_throws_exception
- assert_raises(ActionController::MissingTemplate) { get :render_to_string_with_exception }
- end
-
- def test_render_to_string_that_throws_caught_exception_doesnt_break_assigns
- assert_nothing_raised { get :render_to_string_with_caught_exception }
- assert_equal "i'm before the render", assigns(:before)
- assert_equal "i'm after the render", assigns(:after)
- end
-
- def test_nested_rendering
- get :hello_world
- assert_equal "Living in a nested world", Fun::GamesController.process(@request, @response).body
- end
-
- def test_accessing_params_in_template
- get :accessing_params_in_template, :name => "David"
- assert_equal "Hello: David", @response.body
- end
-
- def test_accessing_params_in_template_with_layout
- get :accessing_params_in_template_with_layout, :name => "David"
- assert_equal "Hello: David", @response.body
- end
-
- def test_render_with_explicit_template
- assert_deprecated(/render/) { get :render_with_explicit_template }
- assert_response :success
- end
-
- def test_double_render
- assert_raises(ActionController::DoubleRenderError) { get :double_render }
- end
-
- def test_double_redirect
- assert_raises(ActionController::DoubleRenderError) { get :double_redirect }
- end
-
- def test_render_and_redirect
- assert_raises(ActionController::DoubleRenderError) { get :render_and_redirect }
- end
-
- # specify the one exception to double render rule - render_to_string followed by render
- def test_render_to_string_and_render
- get :render_to_string_and_render
- assert_equal("Hi web users! here is some cached stuff", @response.body)
- end
-
- def test_rendering_with_conflicting_local_vars
- get :rendering_with_conflicting_local_vars
- assert_equal("First: David\nSecond: Stephan\nThird: David\nFourth: David\nFifth: ", @response.body)
- end
-
- def test_action_talk_to_layout
- get :action_talk_to_layout
- assert_equal "Talking to the layout \nAction was here!", @response.body
- end
-
- def test_partials_list
- get :partials_list
- assert_equal "goodbyeHello: davidHello: marygoodbye\n", @response.body
- end
-
- def test_partial_with_locals
- get :partial_with_locals
- assert_equal "Hello: david", @response.body
- end
-
- def test_partial_collection
- get :partial_collection
- assert_equal "Hello: davidHello: mary", @response.body
- end
-
- def test_partial_collection_with_locals
- get :partial_collection_with_locals
- assert_equal "Bonjour: davidBonjour: mary", @response.body
- end
-
- def test_empty_partial_collection
- get :empty_partial_collection
- assert_equal " ", @response.body
- end
-
- def test_partial_with_hash_object
- get :partial_with_hash_object
- assert_equal "Sam", @response.body
- end
-
- def test_partial_with_implicit_local_assignment
- get :partial_with_implicit_local_assignment
- assert_equal "Hello: Marcel", @response.body
- end
-
- def test_render_text_with_assigns
- get :render_text_with_assigns
- assert_equal "world", assigns["hello"]
- end
-
- def test_update_page
- get :update_page
- assert_template nil
- assert_equal 'text/javascript; charset=utf-8', @response.headers['Content-Type']
- assert_equal 2, @response.body.split($/).length
- end
-
- def test_update_page_with_instance_variables
- get :update_page_with_instance_variables
- assert_template nil
- assert_equal 'text/javascript; charset=utf-8', @response.headers['Content-Type']
- assert_match /balance/, @response.body
- assert_match /\$37/, @response.body
- end
-
- def test_yield_content_for
- assert_not_deprecated { get :yield_content_for }
- assert_equal "Putting stuff in the title! \n\nGreat stuff!\n", @response.body
- end
-
-
- def test_overwritting_rendering_relative_file_with_extension
- get :hello_world_from_rxml_using_template
- assert_equal "\n Hello
\n\n", @response.body
-
- get :hello_world_from_rxml_using_action
- assert_equal "\n Hello
\n\n", @response.body
- end
-
-
- def test_head_with_location_header
- get :head_with_location_header
- assert @response.body.blank?
- assert_equal "/foo", @response.headers["Location"]
- assert_response :ok
- end
-
- def test_head_with_custom_header
- get :head_with_custom_header
- assert @response.body.blank?
- assert_equal "something", @response.headers["X-Custom-Header"]
- assert_response :ok
- end
-
- def test_head_with_symbolic_status
- get :head_with_symbolic_status, :status => "ok"
- assert_equal "200 OK", @response.headers["Status"]
- assert_response :ok
-
- get :head_with_symbolic_status, :status => "not_found"
- assert_equal "404 Not Found", @response.headers["Status"]
- assert_response :not_found
-
- ActionController::StatusCodes::SYMBOL_TO_STATUS_CODE.each do |status, code|
- get :head_with_symbolic_status, :status => status.to_s
- assert_equal code, @response.response_code
- assert_response status
- end
- end
-
- def test_head_with_integer_status
- ActionController::StatusCodes::STATUS_CODES.each do |code, message|
- get :head_with_integer_status, :status => code.to_s
- assert_equal message, @response.message
- end
- end
-
- def test_head_with_string_status
- get :head_with_string_status, :status => "404 Eat Dirt"
- assert_equal 404, @response.response_code
- assert_equal "Eat Dirt", @response.message
- assert_response :not_found
- end
-
- def test_head_with_status_code_first
- get :head_with_status_code_first
- assert_equal 403, @response.response_code
- assert_equal "Forbidden", @response.message
- assert_equal "something", @response.headers["X-Custom-Header"]
- assert_response :forbidden
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/raw_post_test.rb b/tracks/vendor/rails/actionpack/test/controller/raw_post_test.rb
deleted file mode 100644
index c9816484..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/raw_post_test.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-require 'test/unit'
-require 'cgi'
-require 'stringio'
-require File.dirname(__FILE__) + '/../../lib/action_controller/cgi_ext/raw_post_data_fix'
-
-class RawPostDataTest < Test::Unit::TestCase
- def setup
- ENV.delete('RAW_POST_DATA')
- @request_body = 'a=1'
- end
-
- def test_post_with_urlencoded_body
- ENV['REQUEST_METHOD'] = 'POST'
- ENV['CONTENT_TYPE'] = ' apPlication/x-Www-form-urlEncoded; charset=utf-8'
- assert_equal ['1'], cgi_params['a']
- assert_has_raw_post_data
- end
-
- def test_post_with_empty_content_type_treated_as_urlencoded
- ENV['REQUEST_METHOD'] = 'POST'
- ENV['CONTENT_TYPE'] = ''
- assert_equal ['1'], cgi_params['a']
- assert_has_raw_post_data
- end
-
- def test_post_with_unrecognized_content_type_reads_body_but_doesnt_parse_params
- ENV['REQUEST_METHOD'] = 'POST'
- ENV['CONTENT_TYPE'] = 'foo/bar'
- assert cgi_params.empty?
- assert_has_raw_post_data
- end
-
- def test_put_with_urlencoded_body
- ENV['REQUEST_METHOD'] = 'PUT'
- ENV['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'
- assert_equal ['1'], cgi_params['a']
- assert_has_raw_post_data
- end
-
- def test_put_with_empty_content_type_ignores_body
- ENV['REQUEST_METHOD'] = 'PUT'
- ENV['CONTENT_TYPE'] = ''
- assert cgi_params.empty?
- assert_has_raw_post_data
- end
-
- def test_put_with_unrecognized_content_type_ignores_body
- ENV['REQUEST_METHOD'] = 'PUT'
- ENV['CONTENT_TYPE'] = 'foo/bar'
- assert cgi_params.empty?
- assert_has_raw_post_data
- end
-
- private
- def cgi_params
- old_stdin, $stdin = $stdin, StringIO.new(@request_body.dup)
- ENV['CONTENT_LENGTH'] = $stdin.size.to_s
- CGI.new.params
- ensure
- $stdin = old_stdin
- end
-
- def assert_has_raw_post_data(expected_body = @request_body)
- assert_not_nil ENV['RAW_POST_DATA']
- assert ENV['RAW_POST_DATA'].frozen?
- assert_equal expected_body, ENV['RAW_POST_DATA']
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/redirect_test.rb b/tracks/vendor/rails/actionpack/test/controller/redirect_test.rb
deleted file mode 100755
index 575532c1..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/redirect_test.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class RedirectController < ActionController::Base
- def simple_redirect
- redirect_to :action => "hello_world"
- end
-
- def method_redirect
- redirect_to :dashbord_url, 1, "hello"
- end
-
- def host_redirect
- redirect_to :action => "other_host", :only_path => false, :host => 'other.test.host'
- end
-
- def module_redirect
- redirect_to :controller => 'module_test/module_redirect', :action => "hello_world"
- end
-
- def redirect_with_assigns
- @hello = "world"
- redirect_to :action => "hello_world"
- end
-
- def redirect_to_back
- redirect_to :back
- end
-
- def rescue_errors(e) raise e end
-
- def rescue_action(e) raise end
-
- protected
- def dashbord_url(id, message)
- url_for :action => "dashboard", :params => { "id" => id, "message" => message }
- end
-end
-
-class RedirectTest < Test::Unit::TestCase
- def setup
- @controller = RedirectController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_simple_redirect
- get :simple_redirect
- assert_response :redirect
- assert_equal "http://test.host/redirect/hello_world", redirect_to_url
- end
-
- def test_redirect_with_method_reference_and_parameters
- assert_deprecated(/redirect_to/) { get :method_redirect }
- assert_response :redirect
- assert_equal "http://test.host/redirect/dashboard/1?message=hello", redirect_to_url
- end
-
- def test_simple_redirect_using_options
- get :host_redirect
- assert_response :redirect
- assert_redirected_to :action => "other_host", :only_path => false, :host => 'other.test.host'
- end
-
- def test_redirect_error_with_pretty_diff
- get :host_redirect
- assert_response :redirect
- begin
- assert_redirected_to :action => "other_host", :only_path => true
- rescue Test::Unit::AssertionFailedError => err
- redirection_msg, diff_msg = err.message.scan(/<\{[^\}]+\}>/).collect { |s| s[2..-3] }
- assert_match %r("only_path"=>false), redirection_msg
- assert_match %r("host"=>"other.test.host"), redirection_msg
- assert_match %r("action"=>"other_host"), redirection_msg
- assert_match %r("only_path"=>true), diff_msg
- assert_match %r("host"=>"other.test.host"), diff_msg
- end
- end
-
- def test_module_redirect
- get :module_redirect
- assert_response :redirect
- assert_redirected_to "http://test.host/module_test/module_redirect/hello_world"
- end
-
- def test_module_redirect_using_options
- get :module_redirect
- assert_response :redirect
- assert_redirected_to :controller => 'module_test/module_redirect', :action => 'hello_world'
- end
-
- def test_redirect_with_assigns
- get :redirect_with_assigns
- assert_response :redirect
- assert_equal "world", assigns["hello"]
- end
-
- def test_redirect_to_back
- @request.env["HTTP_REFERER"] = "http://www.example.com/coming/from"
- get :redirect_to_back
- assert_response :redirect
- assert_equal "http://www.example.com/coming/from", redirect_to_url
- end
-
- def test_redirect_to_back_with_no_referer
- assert_raises(ActionController::RedirectBackError) {
- @request.env["HTTP_REFERER"] = nil
- get :redirect_to_back
- }
- end
-end
-
-module ModuleTest
- class ModuleRedirectController < ::RedirectController
- def module_redirect
- redirect_to :controller => '/redirect', :action => "hello_world"
- end
- end
-
- class ModuleRedirectTest < Test::Unit::TestCase
- def setup
- @controller = ModuleRedirectController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_simple_redirect
- get :simple_redirect
- assert_response :redirect
- assert_equal "http://test.host/module_test/module_redirect/hello_world", redirect_to_url
- end
-
- def test_redirect_with_method_reference_and_parameters
- assert_deprecated(/redirect_to/) { get :method_redirect }
- assert_response :redirect
- assert_equal "http://test.host/module_test/module_redirect/dashboard/1?message=hello", redirect_to_url
- end
-
- def test_simple_redirect_using_options
- get :host_redirect
- assert_response :redirect
- assert_redirected_to :action => "other_host", :only_path => false, :host => 'other.test.host'
- end
-
- def test_module_redirect
- get :module_redirect
- assert_response :redirect
- assert_equal "http://test.host/redirect/hello_world", redirect_to_url
- end
-
- def test_module_redirect_using_options
- get :module_redirect
- assert_response :redirect
- assert_redirected_to :controller => 'redirect', :action => "hello_world"
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/render_test.rb b/tracks/vendor/rails/actionpack/test/controller/render_test.rb
deleted file mode 100644
index d364dd6c..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/render_test.rb
+++ /dev/null
@@ -1,293 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-unless defined?(Customer)
- Customer = Struct.new("Customer", :name)
-end
-
-module Fun
- class GamesController < ActionController::Base
- def hello_world
- end
- end
-end
-
-
-class TestController < ActionController::Base
- layout :determine_layout
-
- def hello_world
- end
-
- def render_hello_world
- render "test/hello_world"
- end
-
- def render_hello_world_from_variable
- @person = "david"
- render_text "hello #{@person}"
- end
-
- def render_action_hello_world
- render_action "hello_world"
- end
-
- def render_action_hello_world_with_symbol
- render_action :hello_world
- end
-
- def render_text_hello_world
- render_text "hello world"
- end
-
- def render_json_hello_world
- render_json({:hello => 'world'}.to_json)
- end
-
- def render_json_hello_world_with_callback
- render_json({:hello => 'world'}.to_json, 'alert')
- end
-
- def render_symbol_json
- render :json => {:hello => 'world'}.to_json
- end
-
- def render_custom_code
- render_text "hello world", "404 Moved"
- end
-
- def render_text_appendix
- render_text "hello world"
- render_text ", goodbye!", "404 Not Found", true
- end
-
- def render_nothing_with_appendix
- render_text "appended", nil, true
- end
-
- def render_xml_hello
- @name = "David"
- render "test/hello"
- end
-
- def greeting
- # let's just rely on the template
- end
-
- def layout_test
- render_action "hello_world"
- end
-
- def builder_layout_test
- render_action "hello"
- end
-
- def builder_partial_test
- render_action "hello_world_container"
- end
-
- def partials_list
- @test_unchanged = 'hello'
- @customers = [ Customer.new("david"), Customer.new("mary") ]
- render_action "list"
- end
-
- def partial_only
- render_partial
- end
-
- def hello_in_a_string
- @customers = [ Customer.new("david"), Customer.new("mary") ]
- render_text "How's there? #{render_to_string("test/list")}"
- end
-
- def accessing_params_in_template
- render_template "Hello: <%= params[:name] %>"
- end
-
- def accessing_local_assigns_in_inline_template
- name = params[:local_name]
- render :inline => "<%= 'Goodbye, ' + local_name %>",
- :locals => { :local_name => name }
- end
-
- def accessing_local_assigns_in_inline_template_with_string_keys
- name = params[:local_name]
- ActionView::Base.local_assigns_support_string_keys = true
- render :inline => "<%= 'Goodbye, ' + local_name %>",
- :locals => { "local_name" => name }
- ActionView::Base.local_assigns_support_string_keys = false
- end
-
- def render_to_string_test
- @foo = render_to_string :inline => "this is a test"
- end
-
- def rescue_action(e) raise end
-
- private
- def determine_layout
- case action_name
- when "layout_test": "layouts/standard"
- when "builder_layout_test": "layouts/builder"
- when "render_symbol_json": "layouts/standard" # to make sure layouts don't interfere
- end
- end
-end
-
-TestController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-Fun::GamesController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class RenderTest < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @controller = TestController.new
-
- @request.host = "www.nextangle.com"
- end
-
- def test_simple_show
- get :hello_world
- assert_response 200
- assert_template "test/hello_world"
- end
-
- def test_do_with_render
- assert_deprecated_render { get :render_hello_world }
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_from_variable
- get :render_hello_world_from_variable
- assert_equal "hello david", @response.body
- end
-
- def test_do_with_render_action
- get :render_action_hello_world
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_action_with_symbol
- get :render_action_hello_world_with_symbol
- assert_template "test/hello_world"
- end
-
- def test_do_with_render_text
- get :render_text_hello_world
- assert_equal "hello world", @response.body
- end
-
- def test_do_with_render_json
- get :render_json_hello_world
- assert_equal '{hello: "world"}', @response.body
- assert_equal 'application/json', @response.content_type
- end
-
- def test_do_with_render_json_with_callback
- get :render_json_hello_world_with_callback
- assert_equal 'alert({hello: "world"})', @response.body
- assert_equal 'application/json', @response.content_type
- end
-
- def test_do_with_render_symbol_json
- get :render_symbol_json
- assert_equal '{hello: "world"}', @response.body
- assert_equal 'application/json', @response.content_type
- end
-
- def test_do_with_render_custom_code
- get :render_custom_code
- assert_response 404
- end
-
- def test_do_with_render_text_appendix
- get :render_text_appendix
- assert_response 404
- assert_equal 'hello world, goodbye!', @response.body
- end
-
- def test_do_with_render_nothing_with_appendix
- get :render_nothing_with_appendix
- assert_response 200
- assert_equal 'appended', @response.body
- end
-
- def test_attempt_to_access_object_method
- assert_raises(ActionController::UnknownAction, "No action responded to [clone]") { get :clone }
- end
-
- def test_private_methods
- assert_raises(ActionController::UnknownAction, "No action responded to [determine_layout]") { get :determine_layout }
- end
-
- def test_render_xml
- assert_deprecated_render { get :render_xml_hello }
- assert_equal "\n Hello David
\nThis is grand!
\n\n", @response.body
- end
-
- def test_render_xml_with_default
- get :greeting
- assert_equal "This is grand!
\n", @response.body
- end
-
- def test_render_xml_with_partial
- get :builder_partial_test
- assert_equal "\n \n \n", @response.body
- end
-
- def test_layout_rendering
- get :layout_test
- assert_equal "Hello world!", @response.body
- end
-
- def test_render_xml_with_layouts
- get :builder_layout_test
- assert_equal "\n\n Hello
\nThis is grand!
\n\n \n", @response.body
- end
-
- # def test_partials_list
- # get :partials_list
- # assert_equal "goodbyeHello: davidHello: marygoodbye\n", process_request.body
- # end
-
- def test_partial_only
- get :partial_only
- assert_equal "only partial", @response.body
- end
-
- def test_render_to_string
- get :hello_in_a_string
- assert_equal "How's there? goodbyeHello: davidHello: marygoodbye\n", @response.body
- end
-
- def test_render_to_string_resets_assigns
- get :render_to_string_test
- assert_equal "The value of foo is: ::this is a test::\n", @response.body
- end
-
- def test_nested_rendering
- @controller = Fun::GamesController.new
- get :hello_world
- assert_equal "Living in a nested world", @response.body
- end
-
- def test_accessing_params_in_template
- get :accessing_params_in_template, :name => "David"
- assert_equal "Hello: David", @response.body
- end
-
- def test_accessing_local_assigns_in_inline_template
- get :accessing_local_assigns_in_inline_template, :local_name => "Local David"
- assert_equal "Goodbye, Local David", @response.body
- end
-
- def test_accessing_local_assigns_in_inline_template_with_string_keys
- get :accessing_local_assigns_in_inline_template_with_string_keys, :local_name => "Local David"
- assert_equal "Goodbye, Local David", @response.body
- end
-
- protected
- def assert_deprecated_render(&block)
- assert_deprecated(/render/, &block)
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/request_test.rb b/tracks/vendor/rails/actionpack/test/controller/request_test.rb
deleted file mode 100644
index 65e88b74..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/request_test.rb
+++ /dev/null
@@ -1,311 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class RequestTest < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- end
-
- def test_remote_ip
- assert_equal '0.0.0.0', @request.remote_ip
-
- @request.remote_addr = '1.2.3.4'
- assert_equal '1.2.3.4', @request.remote_ip
-
- @request.env['HTTP_CLIENT_IP'] = '2.3.4.5'
- assert_equal '2.3.4.5', @request.remote_ip
- @request.env.delete 'HTTP_CLIENT_IP'
-
- @request.env['HTTP_X_FORWARDED_FOR'] = '3.4.5.6'
- assert_equal '3.4.5.6', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = 'unknown,3.4.5.6'
- assert_equal '3.4.5.6', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = '172.16.0.1,3.4.5.6'
- assert_equal '3.4.5.6', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = '192.168.0.1,3.4.5.6'
- assert_equal '3.4.5.6', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = '10.0.0.1,3.4.5.6'
- assert_equal '3.4.5.6', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = '127.0.0.1,3.4.5.6'
- assert_equal '127.0.0.1', @request.remote_ip
-
- @request.env['HTTP_X_FORWARDED_FOR'] = 'unknown,192.168.0.1'
- assert_equal '1.2.3.4', @request.remote_ip
- @request.env.delete 'HTTP_X_FORWARDED_FOR'
- end
-
- def test_domains
- @request.host = "www.rubyonrails.org"
- assert_equal "rubyonrails.org", @request.domain
-
- @request.host = "www.rubyonrails.co.uk"
- assert_equal "rubyonrails.co.uk", @request.domain(2)
-
- @request.host = "192.168.1.200"
- assert_nil @request.domain
-
- @request.host = nil
- assert_nil @request.domain
- end
-
- def test_subdomains
- @request.host = "www.rubyonrails.org"
- assert_equal %w( www ), @request.subdomains
-
- @request.host = "www.rubyonrails.co.uk"
- assert_equal %w( www ), @request.subdomains(2)
-
- @request.host = "dev.www.rubyonrails.co.uk"
- assert_equal %w( dev www ), @request.subdomains(2)
-
- @request.host = "foobar.foobar.com"
- assert_equal %w( foobar ), @request.subdomains
-
- @request.host = nil
- assert_equal [], @request.subdomains
- end
-
- def test_port_string
- @request.port = 80
- assert_equal "", @request.port_string
-
- @request.port = 8080
- assert_equal ":8080", @request.port_string
- end
-
- def test_relative_url_root
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- @request.env['SERVER_SOFTWARE'] = 'lighttpd/1.2.3'
- assert_equal '', @request.relative_url_root, "relative_url_root should be disabled on lighttpd"
-
- @request.env['SERVER_SOFTWARE'] = 'apache/1.2.3 some random text'
-
- @request.env['SCRIPT_NAME'] = nil
- assert_equal "", @request.relative_url_root
-
- @request.env['SCRIPT_NAME'] = "/dispatch.cgi"
- assert_equal "", @request.relative_url_root
-
- @request.env['SCRIPT_NAME'] = "/myapp.rb"
- assert_equal "", @request.relative_url_root
-
- @request.relative_url_root = nil
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- assert_equal "/hieraki", @request.relative_url_root
-
- @request.relative_url_root = nil
- @request.env['SCRIPT_NAME'] = "/collaboration/hieraki/dispatch.cgi"
- assert_equal "/collaboration/hieraki", @request.relative_url_root
-
- # apache/scgi case
- @request.relative_url_root = nil
- @request.env['SCRIPT_NAME'] = "/collaboration/hieraki"
- assert_equal "/collaboration/hieraki", @request.relative_url_root
-
- @request.relative_url_root = nil
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- @request.env['SERVER_SOFTWARE'] = 'lighttpd/1.2.3'
- @request.env['RAILS_RELATIVE_URL_ROOT'] = "/hieraki"
- assert_equal "/hieraki", @request.relative_url_root
-
- # @env overrides path guess
- @request.relative_url_root = nil
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- @request.env['SERVER_SOFTWARE'] = 'apache/1.2.3 some random text'
- @request.env['RAILS_RELATIVE_URL_ROOT'] = "/real_url"
- assert_equal "/real_url", @request.relative_url_root
- end
-
- def test_request_uri
- @request.env['SERVER_SOFTWARE'] = 'Apache 42.342.3432'
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "http://www.rubyonrails.org/path/of/some/uri?mapped=1"
- assert_equal "/path/of/some/uri?mapped=1", @request.request_uri
- assert_equal "/path/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "http://www.rubyonrails.org/path/of/some/uri"
- assert_equal "/path/of/some/uri", @request.request_uri
- assert_equal "/path/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/path/of/some/uri"
- assert_equal "/path/of/some/uri", @request.request_uri
- assert_equal "/path/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/"
- assert_equal "/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/?m=b"
- assert_equal "/?m=b", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/"
- @request.env['SCRIPT_NAME'] = "/dispatch.cgi"
- assert_equal "/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/hieraki/"
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- assert_equal "/hieraki/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.set_REQUEST_URI "/collaboration/hieraki/books/edit/2"
- @request.env['SCRIPT_NAME'] = "/collaboration/hieraki/dispatch.cgi"
- assert_equal "/collaboration/hieraki/books/edit/2", @request.request_uri
- assert_equal "/books/edit/2", @request.path
-
- # The following tests are for when REQUEST_URI is not supplied (as in IIS)
- @request.relative_url_root = nil
- @request.set_REQUEST_URI nil
- @request.env['PATH_INFO'] = "/path/of/some/uri?mapped=1"
- @request.env['SCRIPT_NAME'] = nil #"/path/dispatch.rb"
- assert_equal "/path/of/some/uri?mapped=1", @request.request_uri
- assert_equal "/path/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/path/of/some/uri?mapped=1"
- @request.env['SCRIPT_NAME'] = "/path/dispatch.rb"
- assert_equal "/path/of/some/uri?mapped=1", @request.request_uri
- assert_equal "/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/path/of/some/uri"
- @request.env['SCRIPT_NAME'] = nil
- assert_equal "/path/of/some/uri", @request.request_uri
- assert_equal "/path/of/some/uri", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/"
- assert_equal "/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/?m=b"
- assert_equal "/?m=b", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/"
- @request.env['SCRIPT_NAME'] = "/dispatch.cgi"
- assert_equal "/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.relative_url_root = nil
- @request.env['PATH_INFO'] = "/hieraki/"
- @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi"
- assert_equal "/hieraki/", @request.request_uri
- assert_equal "/", @request.path
-
- @request.set_REQUEST_URI '/hieraki/dispatch.cgi'
- @request.relative_url_root = '/hieraki'
- assert_equal "/dispatch.cgi", @request.path
- @request.relative_url_root = nil
-
- @request.set_REQUEST_URI '/hieraki/dispatch.cgi'
- @request.relative_url_root = '/foo'
- assert_equal "/hieraki/dispatch.cgi", @request.path
- @request.relative_url_root = nil
-
- # This test ensures that Rails uses REQUEST_URI over PATH_INFO
- @request.relative_url_root = nil
- @request.env['REQUEST_URI'] = "/some/path"
- @request.env['PATH_INFO'] = "/another/path"
- @request.env['SCRIPT_NAME'] = "/dispatch.cgi"
- assert_equal "/some/path", @request.request_uri
- assert_equal "/some/path", @request.path
- end
-
-
- def test_host_with_port
- @request.host = "rubyonrails.org"
- @request.port = 80
- assert_equal "rubyonrails.org", @request.host_with_port
-
- @request.host = "rubyonrails.org"
- @request.port = 81
- assert_equal "rubyonrails.org:81", @request.host_with_port
- end
-
- def test_server_software
- assert_equal nil, @request.server_software
-
- @request.env['SERVER_SOFTWARE'] = 'Apache3.422'
- assert_equal 'apache', @request.server_software
-
- @request.env['SERVER_SOFTWARE'] = 'lighttpd(1.1.4)'
- assert_equal 'lighttpd', @request.server_software
- end
-
- def test_xml_http_request
- assert !@request.xml_http_request?
- assert !@request.xhr?
-
- @request.env['HTTP_X_REQUESTED_WITH'] = "DefinitelyNotAjax1.0"
- assert !@request.xml_http_request?
- assert !@request.xhr?
-
- @request.env['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest"
- assert @request.xml_http_request?
- assert @request.xhr?
- end
-
- def test_reports_ssl
- assert !@request.ssl?
- @request.env['HTTPS'] = 'on'
- assert @request.ssl?
- end
-
- def test_reports_ssl_when_proxied_via_lighttpd
- assert !@request.ssl?
- @request.env['HTTP_X_FORWARDED_PROTO'] = 'https'
- assert @request.ssl?
- end
-
- def test_symbolized_request_methods
- [:get, :post, :put, :delete].each do |method|
- set_request_method_to method
- assert_equal method, @request.method
- end
- end
-
- def test_allow_method_hacking_on_post
- set_request_method_to :post
- [:get, :put, :delete].each do |method|
- @request.instance_eval { @parameters = { :_method => method } ; @request_method = nil }
- assert_equal method, @request.method
- end
- end
-
- def test_restrict_method_hacking
- @request.instance_eval { @parameters = { :_method => 'put' } }
- [:get, :put, :delete].each do |method|
- set_request_method_to method
- assert_equal method, @request.method
- end
- end
-
- def test_head_masquarading_as_get
- set_request_method_to :head
- assert_equal :get, @request.method
- assert @request.get?
- assert @request.head?
- end
-
- protected
- def set_request_method_to(method)
- @request.env['REQUEST_METHOD'] = method.to_s.upcase
- @request.instance_eval { @request_method = nil }
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/resources_test.rb b/tracks/vendor/rails/actionpack/test/controller/resources_test.rb
deleted file mode 100644
index 32b55460..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/resources_test.rb
+++ /dev/null
@@ -1,267 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class ResourcesController < ActionController::Base
- def index() render :nothing => true end
- def rescue_action(e) raise e end
-end
-
-class ThreadsController < ResourcesController; end
-class MessagesController < ResourcesController; end
-class CommentsController < ResourcesController; end
-
-
-class ResourcesTest < Test::Unit::TestCase
- def test_should_arrange_actions
- resource = ActionController::Resources::Resource.new(:messages,
- :collection => { :rss => :get, :reorder => :post, :csv => :post },
- :member => { :rss => :get, :atom => :get, :upload => :post, :fix => :post },
- :new => { :preview => :get, :draft => :get })
-
- assert_resource_methods [:rss], resource, :collection, :get
- assert_resource_methods [:csv, :reorder], resource, :collection, :post
- assert_resource_methods [:edit, :rss, :atom], resource, :member, :get
- assert_resource_methods [:upload, :fix], resource, :member, :post
- assert_resource_methods [:new, :preview, :draft], resource, :new, :get
- end
-
- def test_default_restful_routes
- with_restful_routing :messages do
- assert_simply_restful_for :messages
- end
- end
-
- def test_multiple_default_restful_routes
- with_restful_routing :messages, :comments do
- assert_simply_restful_for :messages
- assert_simply_restful_for :comments
- end
- end
-
- def test_with_path_prefix
- with_restful_routing :messages, :path_prefix => '/thread/:thread_id' do
- assert_simply_restful_for :messages, :path_prefix => 'thread/5/', :options => { :thread_id => '5' }
- end
- end
-
- def test_multile_with_path_prefix
- with_restful_routing :messages, :comments, :path_prefix => '/thread/:thread_id' do
- assert_simply_restful_for :messages, :path_prefix => 'thread/5/', :options => { :thread_id => '5' }
- assert_simply_restful_for :comments, :path_prefix => 'thread/5/', :options => { :thread_id => '5' }
- end
- end
-
- def test_with_collection_action
- rss_options = {:action => 'rss'}
- rss_path = "/messages;rss"
- actions = { 'a' => :put, 'b' => :post, 'c' => :delete }
-
- with_restful_routing :messages, :collection => { :rss => :get }.merge(actions) do
- assert_restful_routes_for :messages do |options|
- assert_routing rss_path, options.merge(rss_options)
-
- actions.each do |action, method|
- assert_recognizes(options.merge(:action => action), :path => "/messages;#{action}", :method => method)
- end
- end
-
- assert_restful_named_routes_for :messages do |options|
- assert_named_route rss_path, :rss_messages_path, rss_options
- actions.keys.each do |action|
- assert_named_route "/messages;#{action}", "#{action}_messages_path", :action => action
- end
- end
- end
- end
-
- def test_with_member_action
- [:put, :post].each do |method|
- with_restful_routing :messages, :member => { :mark => method } do
- mark_options = {:action => 'mark', :id => '1'}
- mark_path = "/messages/1;mark"
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(mark_options), :path => mark_path, :method => method)
- end
-
- assert_restful_named_routes_for :messages do |options|
- assert_named_route mark_path, :mark_message_path, mark_options
- end
- end
- end
- end
-
- def test_with_two_member_actions_with_same_method
- [:put, :post].each do |method|
- with_restful_routing :messages, :member => { :mark => method, :unmark => method } do
- %w(mark unmark).each do |action|
- action_options = {:action => action, :id => '1'}
- action_path = "/messages/1;#{action}"
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(action_options), :path => action_path, :method => method)
- end
-
- assert_restful_named_routes_for :messages do |options|
- assert_named_route action_path, "#{action}_message_path".to_sym, action_options
- end
- end
- end
- end
- end
-
-
- def test_with_new_action
- with_restful_routing :messages, :new => { :preview => :post } do
- preview_options = {:action => 'preview'}
- preview_path = "/messages/new;preview"
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(preview_options), :path => preview_path, :method => :post)
- end
-
- assert_restful_named_routes_for :messages do |options|
- assert_named_route preview_path, :preview_new_message_path, preview_options
- end
- end
- end
-
- def test_override_new_method
- with_restful_routing :messages do
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(:action => "new"), :path => "/messages/new", :method => :get)
- assert_raises(ActionController::RoutingError) do
- ActionController::Routing::Routes.recognize_path("/messages/new", :method => :post)
- end
- end
- end
-
- with_restful_routing :messages, :new => { :new => :any } do
- assert_restful_routes_for :messages do |options|
- assert_recognizes(options.merge(:action => "new"), :path => "/messages/new", :method => :post)
- assert_recognizes(options.merge(:action => "new"), :path => "/messages/new", :method => :get)
- end
- end
- end
-
- def test_nested_restful_routes
- with_routing do |set|
- set.draw do |map|
- map.resources :threads do |map|
- map.resources :messages do |map|
- map.resources :comments
- end
- end
- end
-
- assert_simply_restful_for :threads
- assert_simply_restful_for :messages,
- :path_prefix => 'threads/1/',
- :options => { :thread_id => '1' }
- assert_simply_restful_for :comments,
- :path_prefix => 'threads/1/messages/2/',
- :options => { :thread_id => '1', :message_id => '2' }
- end
- end
-
- def test_restful_routes_dont_generate_duplicates
- with_restful_routing :messages do
- routes = ActionController::Routing::Routes.routes
- routes.each do |route|
- routes.each do |r|
- next if route === r # skip the comparison instance
- assert distinct_routes?(route, r), "Duplicate Route: #{route}"
- end
- end
- end
- end
-
- protected
- def with_restful_routing(*args)
- with_routing do |set|
- set.draw { |map| map.resources(*args) }
- yield
- end
- end
-
- # runs assert_restful_routes_for and assert_restful_named_routes for on the controller_name and options, without passing a block.
- def assert_simply_restful_for(controller_name, options = {})
- assert_restful_routes_for controller_name, options
- assert_restful_named_routes_for controller_name, options
- end
-
- def assert_restful_routes_for(controller_name, options = {})
- (options[:options] ||= {})[:controller] = controller_name.to_s
-
- collection_path = "/#{options[:path_prefix]}#{controller_name}"
- member_path = "#{collection_path}/1"
- new_path = "#{collection_path}/new"
-
- with_options(options[:options]) do |controller|
- controller.assert_routing collection_path, :action => 'index'
- controller.assert_routing "#{collection_path}.xml" , :action => 'index', :format => 'xml'
- controller.assert_routing new_path, :action => 'new'
- controller.assert_routing member_path, :action => 'show', :id => '1'
- controller.assert_routing "#{member_path};edit", :action => 'edit', :id => '1'
- controller.assert_routing "#{member_path}.xml", :action => 'show', :id => '1', :format => 'xml'
- end
-
- assert_recognizes(
- options[:options].merge(:action => 'create'),
- :path => collection_path, :method => :post)
-
- assert_recognizes(
- options[:options].merge(:action => 'update', :id => '1'),
- :path => member_path, :method => :put)
-
- assert_recognizes(
- options[:options].merge(:action => 'destroy', :id => '1'),
- :path => member_path, :method => :delete)
-
- yield options[:options] if block_given?
- end
-
- # test named routes like foo_path and foos_path map to the correct options.
- def assert_restful_named_routes_for(controller_name, singular_name = nil, options = {})
- if singular_name.is_a?(Hash)
- options = singular_name
- singular_name = nil
- end
- singular_name ||= controller_name.to_s.singularize
- (options[:options] ||= {})[:controller] = controller_name.to_s
- @controller = "#{controller_name.to_s.camelize}Controller".constantize.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- get :index, options[:options]
- options[:options].delete :action
-
- full_prefix = "/#{options[:path_prefix]}#{controller_name}"
-
- assert_named_route "#{full_prefix}", "#{controller_name}_path", options[:options]
- assert_named_route "#{full_prefix}.xml", "formatted_#{controller_name}_path", options[:options].merge(:format => 'xml')
- assert_named_route "#{full_prefix}/new", "new_#{singular_name}_path", options[:options]
- assert_named_route "#{full_prefix}/1", "#{singular_name}_path", options[:options].merge(:id => '1')
- assert_named_route "#{full_prefix}/1;edit", "edit_#{singular_name}_path", options[:options].merge(:id => '1')
- assert_named_route "#{full_prefix}/1.xml", "formatted_#{singular_name}_path", options[:options].merge(:format => 'xml', :id => '1')
- yield options[:options] if block_given?
- end
-
- def assert_named_route(expected, route, options)
- actual = @controller.send(route, options) rescue $!.class.name
- assert_equal expected, actual, "Error on route: #{route}(#{options.inspect})"
- end
-
- def assert_resource_methods(expected, resource, action_method, method)
- assert_equal expected.length, resource.send("#{action_method}_methods")[method].size, "#{resource.send("#{action_method}_methods")[method].inspect}"
- expected.each do |action|
- assert resource.send("#{action_method}_methods")[method].include?(action),
- "#{method} not in #{action_method} methods: #{resource.send("#{action_method}_methods")[method].inspect}"
- end
- end
-
- def distinct_routes? (r1, r2)
- if r1.conditions == r2.conditions and r1.requirements == r2.requirements then
- if r1.segments.collect(&:to_s) == r2.segments.collect(&:to_s) then
- return false
- end
- end
- true
- end
-
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/routing_test.rb b/tracks/vendor/rails/actionpack/test/controller/routing_test.rb
deleted file mode 100644
index 9a41440e..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/routing_test.rb
+++ /dev/null
@@ -1,1758 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
-require File.dirname(__FILE__) + '/fake_controllers'
-require 'action_controller/routing'
-
-RunTimeTests = ARGV.include? 'time'
-ROUTING = ActionController::Routing
-
-class ROUTING::RouteBuilder
- attr_reader :warn_output
-
- def warn(msg)
- (@warn_output ||= []) << msg
- end
-end
-
-class LegacyRouteSetTests < Test::Unit::TestCase
- attr_reader :rs
- def setup
- @rs = ::ActionController::Routing::RouteSet.new
- @rs.draw {|m| m.connect ':controller/:action/:id' }
- ActionController::Routing.use_controllers! %w(content admin/user admin/news_feed)
- end
-
- def test_default_setup
- assert_equal({:controller => "content", :action => 'index'}, rs.recognize_path("/content"))
- assert_equal({:controller => "content", :action => 'list'}, rs.recognize_path("/content/list"))
- assert_equal({:controller => "content", :action => 'show', :id => '10'}, rs.recognize_path("/content/show/10"))
-
- assert_equal({:controller => "admin/user", :action => 'show', :id => '10'}, rs.recognize_path("/admin/user/show/10"))
-
- assert_equal '/admin/user/show/10', rs.generate(:controller => 'admin/user', :action => 'show', :id => 10)
-
- assert_equal '/admin/user/show', rs.generate({:action => 'show'}, {:controller => 'admin/user', :action => 'list', :id => '10'})
- assert_equal '/admin/user/list/10', rs.generate({}, {:controller => 'admin/user', :action => 'list', :id => '10'})
-
- assert_equal '/admin/stuff', rs.generate({:controller => 'stuff'}, {:controller => 'admin/user', :action => 'list', :id => '10'})
- assert_equal '/stuff', rs.generate({:controller => '/stuff'}, {:controller => 'admin/user', :action => 'list', :id => '10'})
- end
-
- def test_ignores_leading_slash
- @rs.draw {|m| m.connect '/:controller/:action/:id'}
- test_default_setup
- end
-
- def test_time_recognition
- n = 10000
- if RunTimeTests
- GC.start
- rectime = Benchmark.realtime do
- n.times do
- rs.recognize_path("content")
- rs.recognize_path("content/list")
- rs.recognize_path("content/show/10")
- rs.recognize_path("admin/user")
- rs.recognize_path("admin/user/list")
- rs.recognize_path("admin/user/show/10")
- end
- end
- puts "\n\nRecognition (RouteSet):"
- per_url = rectime / (n * 6)
- puts "#{per_url * 1000} ms/url"
- puts "#{1 / per_url} url/s\n\n"
- end
- end
- def test_time_generation
- n = 5000
- if RunTimeTests
- GC.start
- pairs = [
- [{:controller => 'content', :action => 'index'}, {:controller => 'content', :action => 'show'}],
- [{:controller => 'content'}, {:controller => 'content', :action => 'index'}],
- [{:controller => 'content', :action => 'list'}, {:controller => 'content', :action => 'index'}],
- [{:controller => 'content', :action => 'show', :id => '10'}, {:controller => 'content', :action => 'list'}],
- [{:controller => 'admin/user', :action => 'index'}, {:controller => 'admin/user', :action => 'show'}],
- [{:controller => 'admin/user'}, {:controller => 'admin/user', :action => 'index'}],
- [{:controller => 'admin/user', :action => 'list'}, {:controller => 'admin/user', :action => 'index'}],
- [{:controller => 'admin/user', :action => 'show', :id => '10'}, {:controller => 'admin/user', :action => 'list'}],
- ]
- p = nil
- gentime = Benchmark.realtime do
- n.times do
- pairs.each {|(a, b)| rs.generate(a, b)}
- end
- end
-
- puts "\n\nGeneration (RouteSet): (#{(n * 8)} urls)"
- per_url = gentime / (n * 8)
- puts "#{per_url * 1000} ms/url"
- puts "#{1 / per_url} url/s\n\n"
- end
- end
-
- def test_route_with_colon_first
- rs.draw do |map|
- map.connect '/:controller/:action/:id', :action => 'index', :id => nil
- map.connect ':url', :controller => 'tiny_url', :action => 'translate'
- end
- end
-
- def test_route_with_regexp_for_controller
- rs.draw do |map|
- map.connect ':controller/:admintoken/:action/:id', :controller => /admin\/.+/
- map.connect ':controller/:action/:id'
- end
- assert_equal({:controller => "admin/user", :admintoken => "foo", :action => "index"},
- rs.recognize_path("/admin/user/foo"))
- assert_equal({:controller => "content", :action => "foo"}, rs.recognize_path("/content/foo"))
- assert_equal '/admin/user/foo', rs.generate(:controller => "admin/user", :admintoken => "foo", :action => "index")
- assert_equal '/content/foo', rs.generate(:controller => "content", :action => "foo")
- end
-
- def test_route_with_regexp_and_dot
- rs.draw do |map|
- map.connect ':controller/:action/:file',
- :controller => /admin|user/,
- :action => /upload|download/,
- :defaults => {:file => nil},
- :requirements => {:file => %r{[^/]+(\.[^/]+)?}}
- end
- # Without a file extension
- assert_equal '/user/download/file',
- rs.generate(:controller => "user", :action => "download", :file => "file")
- assert_equal(
- {:controller => "user", :action => "download", :file => "file"},
- rs.recognize_path("/user/download/file"))
-
- # Now, let's try a file with an extension, really a dot (.)
- assert_equal '/user/download/file.jpg',
- rs.generate(
- :controller => "user", :action => "download", :file => "file.jpg")
- assert_equal(
- {:controller => "user", :action => "download", :file => "file.jpg"},
- rs.recognize_path("/user/download/file.jpg"))
- end
-
- def test_basic_named_route
- rs.add_named_route :home, '', :controller => 'content', :action => 'list'
- x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'list', :use_route => :home, :only_path => false},
- x.send(:home_url))
- end
-
- def test_named_route_with_option
- rs.add_named_route :page, 'page/:title', :controller => 'content', :action => 'show_page'
- x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'new stuff', :use_route => :page, :only_path => false},
- x.send(:page_url, :title => 'new stuff'))
- end
-
- def test_named_route_with_default
- rs.add_named_route :page, 'page/:title', :controller => 'content', :action => 'show_page', :title => 'AboutPage'
- x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutPage', :use_route => :page, :only_path => false},
- x.send(:page_url))
- assert_equal({:controller => 'content', :action => 'show_page', :title => 'AboutRails', :use_route => :page, :only_path => false},
- x.send(:page_url, :title => "AboutRails"))
-
- end
-
- def test_named_route_with_nested_controller
- rs.add_named_route :users, 'admin/user', :controller => '/admin/user', :action => 'index'
- x = setup_for_named_route.new
- assert_equal({:controller => '/admin/user', :action => 'index', :use_route => :users, :only_path => false},
- x.send(:users_url))
- end
-
- def setup_for_named_route
- x = Class.new
- x.send(:define_method, :url_for) {|x| x}
- rs.named_routes.install(x)
- x
- end
-
- def test_named_route_without_hash
- rs.draw do |map|
- map.normal ':controller/:action/:id'
- end
- end
-
- def test_named_route_with_regexps
- rs.draw do |map|
- map.article 'page/:year/:month/:day/:title', :controller => 'page', :action => 'show',
- :year => /\d+/, :month => /\d+/, :day => /\d+/
- map.connect ':controller/:action/:id'
- end
- x = setup_for_named_route.new
- assert_equal(
- {:controller => 'page', :action => 'show', :title => 'hi', :use_route => :article, :only_path => false},
- x.send(:article_url, :title => 'hi')
- )
- assert_equal(
- {:controller => 'page', :action => 'show', :title => 'hi', :day => 10, :year => 2005, :month => 6, :use_route => :article, :only_path => false},
- x.send(:article_url, :title => 'hi', :day => 10, :year => 2005, :month => 6)
- )
- end
-
- def test_changing_controller
- assert_equal '/admin/stuff/show/10', rs.generate(
- {:controller => 'stuff', :action => 'show', :id => 10},
- {:controller => 'admin/user', :action => 'index'}
- )
- end
-
- def test_paths_escaped
- rs.draw do |map|
- map.path 'file/*path', :controller => 'content', :action => 'show_file'
- map.connect ':controller/:action/:id'
- end
- results = rs.recognize_path "/file/hello+world/how+are+you%3F"
- assert results, "Recognition should have succeeded"
- assert_equal ['hello world', 'how are you?'], results[:path]
-
- results = rs.recognize_path "/file"
- assert results, "Recognition should have succeeded"
- assert_equal [], results[:path]
- end
-
- def test_non_controllers_cannot_be_matched
- rs.draw do |map|
- map.connect ':controller/:action/:id'
- end
- assert_raises(ActionController::RoutingError) { rs.recognize_path("/not_a/show/10") }
- end
-
- def test_paths_do_not_accept_defaults
- assert_raises(ActionController::RoutingError) do
- rs.draw do |map|
- map.path 'file/*path', :controller => 'content', :action => 'show_file', :path => %w(fake default)
- map.connect ':controller/:action/:id'
- end
- end
-
- rs.draw do |map|
- map.path 'file/*path', :controller => 'content', :action => 'show_file', :path => []
- map.connect ':controller/:action/:id'
- end
- end
-
- def test_dynamic_path_allowed
- rs.draw do |map|
- map.connect '*path', :controller => 'content', :action => 'show_file'
- end
-
- assert_equal '/pages/boo', rs.generate(:controller => 'content', :action => 'show_file', :path => %w(pages boo))
- end
-
- def test_dynamic_recall_paths_allowed
- rs.draw do |map|
- map.connect '*path', :controller => 'content', :action => 'show_file'
- end
-
- recall_path = ActionController::Routing::PathSegment::Result.new(%w(pages boo))
- assert_equal '/pages/boo', rs.generate({}, :controller => 'content', :action => 'show_file', :path => recall_path)
- end
-
- def test_backwards
- rs.draw do |map|
- map.connect 'page/:id/:action', :controller => 'pages', :action => 'show'
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/page/20', rs.generate({:id => 20}, {:controller => 'pages', :action => 'show'})
- assert_equal '/page/20', rs.generate(:controller => 'pages', :id => 20, :action => 'show')
- assert_equal '/pages/boo', rs.generate(:controller => 'pages', :action => 'boo')
- end
-
- def test_route_with_fixnum_default
- rs.draw do |map|
- map.connect 'page/:id', :controller => 'content', :action => 'show_page', :id => 1
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/page', rs.generate(:controller => 'content', :action => 'show_page')
- assert_equal '/page', rs.generate(:controller => 'content', :action => 'show_page', :id => 1)
- assert_equal '/page', rs.generate(:controller => 'content', :action => 'show_page', :id => '1')
- assert_equal '/page/10', rs.generate(:controller => 'content', :action => 'show_page', :id => 10)
-
- assert_equal({:controller => "content", :action => 'show_page', :id => '1'}, rs.recognize_path("/page"))
- assert_equal({:controller => "content", :action => 'show_page', :id => '1'}, rs.recognize_path("/page/1"))
- assert_equal({:controller => "content", :action => 'show_page', :id => '10'}, rs.recognize_path("/page/10"))
- end
-
- # For newer revision
- def test_route_with_text_default
- rs.draw do |map|
- map.connect 'page/:id', :controller => 'content', :action => 'show_page', :id => 1
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/page/foo', rs.generate(:controller => 'content', :action => 'show_page', :id => 'foo')
- assert_equal({:controller => "content", :action => 'show_page', :id => 'foo'}, rs.recognize_path("/page/foo"))
-
- token = "\321\202\320\265\320\272\321\201\321\202" # 'text' in russian
- escaped_token = CGI::escape(token)
-
- assert_equal '/page/' + escaped_token, rs.generate(:controller => 'content', :action => 'show_page', :id => token)
- assert_equal({:controller => "content", :action => 'show_page', :id => token}, rs.recognize_path("/page/#{escaped_token}"))
- end
-
- def test_action_expiry
- assert_equal '/content', rs.generate({:controller => 'content'}, {:controller => 'content', :action => 'show'})
- end
-
- def test_recognition_with_uppercase_controller_name
- assert_equal({:controller => "content", :action => 'index'}, rs.recognize_path("/Content"))
- assert_equal({:controller => "content", :action => 'list'}, rs.recognize_path("/ConTent/list"))
- assert_equal({:controller => "content", :action => 'show', :id => '10'}, rs.recognize_path("/CONTENT/show/10"))
-
- # these used to work, before the routes rewrite, but support for this was pulled in the new version...
- #assert_equal({'controller' => "admin/news_feed", 'action' => 'index'}, rs.recognize_path("Admin/NewsFeed"))
- #assert_equal({'controller' => "admin/news_feed", 'action' => 'index'}, rs.recognize_path("Admin/News_Feed"))
- end
-
- def test_requirement_should_prevent_optional_id
- rs.draw do |map|
- map.post 'post/:id', :controller=> 'post', :action=> 'show', :requirements => {:id => /\d+/}
- end
-
- assert_equal '/post/10', rs.generate(:controller => 'post', :action => 'show', :id => 10)
-
- assert_raises ActionController::RoutingError do
- rs.generate(:controller => 'post', :action => 'show')
- end
- end
-
- def test_both_requirement_and_optional
- rs.draw do |map|
- map.blog('test/:year', :controller => 'post', :action => 'show',
- :defaults => { :year => nil },
- :requirements => { :year => /\d{4}/ }
- )
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/test', rs.generate(:controller => 'post', :action => 'show')
- assert_equal '/test', rs.generate(:controller => 'post', :action => 'show', :year => nil)
-
- x = setup_for_named_route.new
- assert_equal({:controller => 'post', :action => 'show', :use_route => :blog, :only_path => false},
- x.send(:blog_url))
- end
-
- def test_set_to_nil_forgets
- rs.draw do |map|
- map.connect 'pages/:year/:month/:day', :controller => 'content', :action => 'list_pages', :month => nil, :day => nil
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/pages/2005',
- rs.generate(:controller => 'content', :action => 'list_pages', :year => 2005)
- assert_equal '/pages/2005/6',
- rs.generate(:controller => 'content', :action => 'list_pages', :year => 2005, :month => 6)
- assert_equal '/pages/2005/6/12',
- rs.generate(:controller => 'content', :action => 'list_pages', :year => 2005, :month => 6, :day => 12)
-
- assert_equal '/pages/2005/6/4',
- rs.generate({:day => 4}, {:controller => 'content', :action => 'list_pages', :year => '2005', :month => '6', :day => '12'})
-
- assert_equal '/pages/2005/6',
- rs.generate({:day => nil}, {:controller => 'content', :action => 'list_pages', :year => '2005', :month => '6', :day => '12'})
-
- assert_equal '/pages/2005',
- rs.generate({:day => nil, :month => nil}, {:controller => 'content', :action => 'list_pages', :year => '2005', :month => '6', :day => '12'})
- end
-
- def test_url_with_no_action_specified
- rs.draw do |map|
- map.connect '', :controller => 'content'
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/', rs.generate(:controller => 'content', :action => 'index')
- assert_equal '/', rs.generate(:controller => 'content')
- end
-
- def test_named_url_with_no_action_specified
- rs.draw do |map|
- map.home '', :controller => 'content'
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/', rs.generate(:controller => 'content', :action => 'index')
- assert_equal '/', rs.generate(:controller => 'content')
-
- x = setup_for_named_route.new
- assert_equal({:controller => 'content', :action => 'index', :use_route => :home, :only_path => false},
- x.send(:home_url))
- end
-
- def test_url_generated_when_forgetting_action
- [{:controller => 'content', :action => 'index'}, {:controller => 'content'}].each do |hash|
- rs.draw do |map|
- map.home '', hash
- map.connect ':controller/:action/:id'
- end
- assert_equal '/', rs.generate({:action => nil}, {:controller => 'content', :action => 'hello'})
- assert_equal '/', rs.generate({:controller => 'content'})
- assert_equal '/content/hi', rs.generate({:controller => 'content', :action => 'hi'})
- end
- end
-
- def test_named_route_method
- rs.draw do |map|
- map.categories 'categories', :controller => 'content', :action => 'categories'
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/categories', rs.generate(:controller => 'content', :action => 'categories')
- assert_equal '/content/hi', rs.generate({:controller => 'content', :action => 'hi'})
- end
-
- def test_named_routes_array
- test_named_route_method
- assert_equal [:categories], rs.named_routes.names
- end
-
- def test_nil_defaults
- rs.draw do |map|
- map.connect 'journal',
- :controller => 'content',
- :action => 'list_journal',
- :date => nil, :user_id => nil
- map.connect ':controller/:action/:id'
- end
-
- assert_equal '/journal', rs.generate(:controller => 'content', :action => 'list_journal', :date => nil, :user_id => nil)
- end
-
- def setup_request_method_routes_for(method)
- @request = ActionController::TestRequest.new
- @request.env["REQUEST_METHOD"] = method
- @request.request_uri = "/match"
-
- rs.draw do |r|
- r.connect '/match', :controller => 'books', :action => 'get', :conditions => { :method => :get }
- r.connect '/match', :controller => 'books', :action => 'post', :conditions => { :method => :post }
- r.connect '/match', :controller => 'books', :action => 'put', :conditions => { :method => :put }
- r.connect '/match', :controller => 'books', :action => 'delete', :conditions => { :method => :delete }
- end
- end
-
- %w(GET POST PUT DELETE).each do |request_method|
- define_method("test_request_method_recognized_with_#{request_method}") do
- begin
- Object.const_set(:BooksController, Class.new(ActionController::Base))
-
- setup_request_method_routes_for(request_method)
-
- assert_nothing_raised { rs.recognize(@request) }
- assert_equal request_method.downcase, @request.path_parameters[:action]
- ensure
- Object.send(:remove_const, :BooksController) rescue nil
- end
- end
- end
-
- def test_subpath_recognized
- Object.const_set(:SubpathBooksController, Class.new(ActionController::Base))
-
- rs.draw do |r|
- r.connect '/books/:id;edit', :controller => 'subpath_books', :action => 'edit'
- r.connect '/items/:id;:action', :controller => 'subpath_books'
- r.connect '/posts/new;:action', :controller => 'subpath_books'
- r.connect '/posts/:id', :controller => 'subpath_books', :action => "show"
- end
-
- hash = rs.recognize_path "/books/17;edit"
- assert_not_nil hash
- assert_equal %w(subpath_books 17 edit), [hash[:controller], hash[:id], hash[:action]]
-
- hash = rs.recognize_path "/items/3;complete"
- assert_not_nil hash
- assert_equal %w(subpath_books 3 complete), [hash[:controller], hash[:id], hash[:action]]
-
- hash = rs.recognize_path "/posts/new;preview"
- assert_not_nil hash
- assert_equal %w(subpath_books preview), [hash[:controller], hash[:action]]
-
- hash = rs.recognize_path "/posts/7"
- assert_not_nil hash
- assert_equal %w(subpath_books show 7), [hash[:controller], hash[:action], hash[:id]]
- ensure
- Object.send(:remove_const, :SubpathBooksController) rescue nil
- end
-
- def test_subpath_generated
- Object.const_set(:SubpathBooksController, Class.new(ActionController::Base))
-
- rs.draw do |r|
- r.connect '/books/:id;edit', :controller => 'subpath_books', :action => 'edit'
- r.connect '/items/:id;:action', :controller => 'subpath_books'
- r.connect '/posts/new;:action', :controller => 'subpath_books'
- end
-
- assert_equal "/books/7;edit", rs.generate(:controller => "subpath_books", :id => 7, :action => "edit")
- assert_equal "/items/15;complete", rs.generate(:controller => "subpath_books", :id => 15, :action => "complete")
- assert_equal "/posts/new;preview", rs.generate(:controller => "subpath_books", :action => "preview")
- ensure
- Object.send(:remove_const, :SubpathBooksController) rescue nil
- end
-end
-
-class SegmentTest < Test::Unit::TestCase
-
- def test_first_segment_should_interpolate_for_structure
- s = ROUTING::Segment.new
- def s.interpolation_statement(array) 'hello' end
- assert_equal 'hello', s.continue_string_structure([])
- end
-
- def test_interpolation_statement
- s = ROUTING::StaticSegment.new
- s.value = "Hello"
- assert_equal "Hello", eval(s.interpolation_statement([]))
- assert_equal "HelloHello", eval(s.interpolation_statement([s]))
-
- s2 = ROUTING::StaticSegment.new
- s2.value = "-"
- assert_equal "Hello-Hello", eval(s.interpolation_statement([s, s2]))
-
- s3 = ROUTING::StaticSegment.new
- s3.value = "World"
- assert_equal "Hello-World", eval(s3.interpolation_statement([s, s2]))
- end
-
-end
-
-class StaticSegmentTest < Test::Unit::TestCase
-
- def test_interpolation_chunk_should_respect_raw
- s = ROUTING::StaticSegment.new
- s.value = 'Hello/World'
- assert ! s.raw?
- assert_equal 'Hello/World', CGI.unescape(s.interpolation_chunk)
-
- s.raw = true
- assert s.raw?
- assert_equal 'Hello/World', s.interpolation_chunk
- end
-
- def test_regexp_chunk_should_escape_specials
- s = ROUTING::StaticSegment.new
-
- s.value = 'Hello*World'
- assert_equal 'Hello\*World', s.regexp_chunk
-
- s.value = 'HelloWorld'
- assert_equal 'HelloWorld', s.regexp_chunk
- end
-
- def test_regexp_chunk_should_add_question_mark_for_optionals
- s = ROUTING::StaticSegment.new
- s.value = "/"
- s.is_optional = true
- assert_equal "/?", s.regexp_chunk
-
- s.value = "hello"
- assert_equal "(?:hello)?", s.regexp_chunk
- end
-
-end
-
-class DynamicSegmentTest < Test::Unit::TestCase
-
- def segment
- unless @segment
- @segment = ROUTING::DynamicSegment.new
- @segment.key = :a
- end
- @segment
- end
-
- def test_extract_value
- s = ROUTING::DynamicSegment.new
- s.key = :a
-
- hash = {:a => '10', :b => '20'}
- assert_equal '10', eval(s.extract_value)
-
- hash = {:b => '20'}
- assert_equal nil, eval(s.extract_value)
-
- s.default = '20'
- assert_equal '20', eval(s.extract_value)
- end
-
- def test_default_local_name
- assert_equal 'a_value', segment.local_name,
- "Unexpected name -- all value_check tests will fail!"
- end
-
- def test_presence_value_check
- a_value = 10
- assert eval(segment.value_check)
- end
-
- def test_regexp_value_check_rejects_nil
- segment.regexp = /\d+/
- a_value = nil
- assert ! eval(segment.value_check)
- end
-
- def test_optional_regexp_value_check_should_accept_nil
- segment.regexp = /\d+/
- segment.is_optional = true
- a_value = nil
- assert eval(segment.value_check)
- end
-
- def test_regexp_value_check_rejects_no_match
- segment.regexp = /\d+/
-
- a_value = "Hello20World"
- assert ! eval(segment.value_check)
-
- a_value = "20Hi"
- assert ! eval(segment.value_check)
- end
-
- def test_regexp_value_check_accepts_match
- segment.regexp = /\d+/
-
- a_value = "30"
- assert eval(segment.value_check)
- end
-
- def test_value_check_fails_on_nil
- a_value = nil
- assert ! eval(segment.value_check)
- end
-
- def test_optional_value_needs_no_check
- segment.is_optional = true
- a_value = nil
- assert_equal nil, segment.value_check
- end
-
- def test_regexp_value_check_should_accept_match_with_default
- segment.regexp = /\d+/
- segment.default = '200'
-
- a_value = '100'
- assert eval(segment.value_check)
- end
-
- def test_expiry_should_not_trigger_once_expired
- expired = true
- hash = merged = {:a => 2, :b => 3}
- options = {:b => 3}
- expire_on = Hash.new { raise 'No!!!' }
-
- eval(segment.expiry_statement)
- rescue RuntimeError
- flunk "Expiry check should not have occured!"
- end
-
- def test_expiry_should_occur_according_to_expire_on
- expired = false
- hash = merged = {:a => 2, :b => 3}
- options = {:b => 3}
-
- expire_on = {:b => true, :a => false}
- eval(segment.expiry_statement)
- assert !expired
- assert_equal({:a => 2, :b => 3}, hash)
-
- expire_on = {:b => true, :a => true}
- eval(segment.expiry_statement)
- assert expired
- assert_equal({:b => 3}, hash)
- end
-
- def test_extraction_code_should_return_on_nil
- hash = merged = {:b => 3}
- options = {:b => 3}
- a_value = nil
-
- # Local jump because of return inside eval.
- assert_raises(LocalJumpError) { eval(segment.extraction_code) }
- end
-
- def test_extraction_code_should_return_on_mismatch
- segment.regexp = /\d+/
- hash = merged = {:a => 'Hi', :b => '3'}
- options = {:b => '3'}
- a_value = nil
-
- # Local jump because of return inside eval.
- assert_raises(LocalJumpError) { eval(segment.extraction_code) }
- end
-
- def test_extraction_code_should_accept_value_and_set_local
- hash = merged = {:a => 'Hi', :b => '3'}
- options = {:b => '3'}
- a_value = nil
- expired = true
-
- eval(segment.extraction_code)
- assert_equal 'Hi', a_value
- end
-
- def test_extraction_should_work_without_value_check
- segment.default = 'hi'
- hash = merged = {:b => '3'}
- options = {:b => '3'}
- a_value = nil
- expired = true
-
- eval(segment.extraction_code)
- assert_equal 'hi', a_value
- end
-
- def test_extraction_code_should_perform_expiry
- expired = false
- hash = merged = {:a => 'Hi', :b => '3'}
- options = {:b => '3'}
- expire_on = {:a => true}
- a_value = nil
-
- eval(segment.extraction_code)
- assert_equal 'Hi', a_value
- assert expired
- assert_equal options, hash
- end
-
- def test_interpolation_chunk_should_replace_value
- a_value = 'Hi'
- assert_equal a_value, eval(%("#{segment.interpolation_chunk}"))
- end
-
- def test_value_regexp_should_be_nil_without_regexp
- assert_equal nil, segment.value_regexp
- end
-
- def test_value_regexp_should_match_exacly
- segment.regexp = /\d+/
- assert_no_match segment.value_regexp, "Hello 10 World"
- assert_no_match segment.value_regexp, "Hello 10"
- assert_no_match segment.value_regexp, "10 World"
- assert_match segment.value_regexp, "10"
- end
-
- def test_regexp_chunk_should_return_string
- segment.regexp = /\d+/
- assert_kind_of String, segment.regexp_chunk
- end
-
-end
-
-class ControllerSegmentTest < Test::Unit::TestCase
-
- def test_regexp_should_only_match_possible_controllers
- ActionController::Routing.with_controllers %w(admin/accounts admin/users account pages) do
- cs = ROUTING::ControllerSegment.new :controller
- regexp = %r{\A#{cs.regexp_chunk}\Z}
-
- ActionController::Routing.possible_controllers.each do |name|
- assert_match regexp, name
- assert_no_match regexp, "#{name}_fake"
-
- match = regexp.match name
- assert_equal name, match[1]
- end
- end
- end
-
-end
-
-class RouteTest < Test::Unit::TestCase
-
- def setup
- @route = ROUTING::Route.new
- end
-
- def slash_segment(is_optional = false)
- returning ROUTING::DividerSegment.new('/') do |s|
- s.is_optional = is_optional
- end
- end
-
- def default_route
- unless @default_route
- @default_route = ROUTING::Route.new
-
- @default_route.segments << (s = ROUTING::StaticSegment.new)
- s.value = '/'
- s.raw = true
-
- @default_route.segments << (s = ROUTING::DynamicSegment.new)
- s.key = :controller
-
- @default_route.segments << slash_segment(:optional)
- @default_route.segments << (s = ROUTING::DynamicSegment.new)
- s.key = :action
- s.default = 'index'
- s.is_optional = true
-
- @default_route.segments << slash_segment(:optional)
- @default_route.segments << (s = ROUTING::DynamicSegment.new)
- s.key = :id
- s.is_optional = true
-
- @default_route.segments << slash_segment(:optional)
- end
- @default_route
- end
-
- def test_default_route_recognition
- expected = {:controller => 'accounts', :action => 'show', :id => '10'}
- assert_equal expected, default_route.recognize('/accounts/show/10')
- assert_equal expected, default_route.recognize('/accounts/show/10/')
-
- expected[:id] = 'jamis'
- assert_equal expected, default_route.recognize('/accounts/show/jamis/')
-
- expected.delete :id
- assert_equal expected, default_route.recognize('/accounts/show')
- assert_equal expected, default_route.recognize('/accounts/show/')
-
- expected[:action] = 'index'
- assert_equal expected, default_route.recognize('/accounts/')
- assert_equal expected, default_route.recognize('/accounts')
-
- assert_equal nil, default_route.recognize('/')
- assert_equal nil, default_route.recognize('/accounts/how/goood/it/is/to/be/free')
- end
-
- def test_default_route_should_omit_default_action
- o = {:controller => 'accounts', :action => 'index'}
- assert_equal '/accounts', default_route.generate(o, o, {})
- end
-
- def test_default_route_should_include_default_action_when_id_present
- o = {:controller => 'accounts', :action => 'index', :id => '20'}
- assert_equal '/accounts/index/20', default_route.generate(o, o, {})
- end
-
- def test_default_route_should_work_with_action_but_no_id
- o = {:controller => 'accounts', :action => 'list_all'}
- assert_equal '/accounts/list_all', default_route.generate(o, o, {})
- end
-
- def test_parameter_shell
- page_url = ROUTING::Route.new
- page_url.requirements = {:controller => 'pages', :action => 'show', :id => /\d+/}
- assert_equal({:controller => 'pages', :action => 'show'}, page_url.parameter_shell)
- end
-
- def test_defaults
- route = ROUTING::RouteBuilder.new.build '/users/:id.:format', :controller => "users", :action => "show", :format => "html"
- assert_equal(
- { :controller => "users", :action => "show", :format => "html" },
- route.defaults)
- end
-
- def test_builder_complains_without_controller
- assert_raises(ArgumentError) do
- ROUTING::RouteBuilder.new.build '/contact', :contoller => "contact", :action => "index"
- end
- end
-
- def test_significant_keys_for_default_route
- keys = default_route.significant_keys.sort_by {|k| k.to_s }
- assert_equal [:action, :controller, :id], keys
- end
-
- def test_significant_keys
- user_url = ROUTING::Route.new
- user_url.segments << (s = ROUTING::StaticSegment.new)
- s.value = '/'
- s.raw = true
-
- user_url.segments << (s = ROUTING::StaticSegment.new)
- s.value = 'user'
-
- user_url.segments << (s = ROUTING::StaticSegment.new)
- s.value = '/'
- s.raw = true
- s.is_optional = true
-
- user_url.segments << (s = ROUTING::DynamicSegment.new)
- s.key = :user
-
- user_url.segments << (s = ROUTING::StaticSegment.new)
- s.value = '/'
- s.raw = true
- s.is_optional = true
-
- user_url.requirements = {:controller => 'users', :action => 'show'}
-
- keys = user_url.significant_keys.sort_by { |k| k.to_s }
- assert_equal [:action, :controller, :user], keys
- end
-
- def test_build_empty_query_string
- assert_equal '', @route.build_query_string({})
- end
-
- def test_build_query_string_with_nil_value
- assert_equal '', @route.build_query_string({:x => nil})
- end
-
- def test_simple_build_query_string
- assert_equal '?x=1&y=2', order_query_string(@route.build_query_string(:x => '1', :y => '2'))
- end
-
- def test_convert_ints_build_query_string
- assert_equal '?x=1&y=2', order_query_string(@route.build_query_string(:x => 1, :y => 2))
- end
-
- def test_escape_spaces_build_query_string
- assert_equal '?x=hello+world&y=goodbye+world', order_query_string(@route.build_query_string(:x => 'hello world', :y => 'goodbye world'))
- end
-
- def test_expand_array_build_query_string
- assert_equal '?x[]=1&x[]=2', order_query_string(@route.build_query_string(:x => [1, 2]))
- end
-
- def test_escape_spaces_build_query_string_selected_keys
- assert_equal '?x=hello+world', order_query_string(@route.build_query_string({:x => 'hello world', :y => 'goodbye world'}, [:x]))
- end
-
- private
- def order_query_string(qs)
- '?' + qs[1..-1].split('&').sort.join('&')
- end
-end
-
-class RouteBuilderTest < Test::Unit::TestCase
-
- def builder
- @builder ||= ROUTING::RouteBuilder.new
- end
-
- def build(path, options)
- builder.build(path, options)
- end
-
- def test_options_should_not_be_modified
- requirements1 = { :id => /\w+/, :controller => /(?:[a-z](?:-?[a-z]+)*)/ }
- requirements2 = requirements1.dup
-
- assert_equal requirements1, requirements2
-
- with_options(:controller => 'folder',
- :requirements => requirements2) do |m|
- m.build 'folders/new', :action => 'new'
- end
-
- assert_equal requirements1, requirements2
- end
-
- def test_segment_for_static
- segment, rest = builder.segment_for 'ulysses'
- assert_equal '', rest
- assert_kind_of ROUTING::StaticSegment, segment
- assert_equal 'ulysses', segment.value
- end
-
- def test_segment_for_action
- segment, rest = builder.segment_for ':action'
- assert_equal '', rest
- assert_kind_of ROUTING::DynamicSegment, segment
- assert_equal :action, segment.key
- assert_equal 'index', segment.default
- end
-
- def test_segment_for_dynamic
- segment, rest = builder.segment_for ':login'
- assert_equal '', rest
- assert_kind_of ROUTING::DynamicSegment, segment
- assert_equal :login, segment.key
- assert_equal nil, segment.default
- assert ! segment.optional?
- end
-
- def test_segment_for_with_rest
- segment, rest = builder.segment_for ':login/:action'
- assert_equal :login, segment.key
- assert_equal '/:action', rest
- segment, rest = builder.segment_for rest
- assert_equal '/', segment.value
- assert_equal ':action', rest
- segment, rest = builder.segment_for rest
- assert_equal :action, segment.key
- assert_equal '', rest
- end
-
- def test_segments_for
- segments = builder.segments_for_route_path '/:controller/:action/:id'
-
- assert_kind_of ROUTING::DividerSegment, segments[0]
- assert_equal '/', segments[2].value
-
- assert_kind_of ROUTING::DynamicSegment, segments[1]
- assert_equal :controller, segments[1].key
-
- assert_kind_of ROUTING::DividerSegment, segments[2]
- assert_equal '/', segments[2].value
-
- assert_kind_of ROUTING::DynamicSegment, segments[3]
- assert_equal :action, segments[3].key
-
- assert_kind_of ROUTING::DividerSegment, segments[4]
- assert_equal '/', segments[4].value
-
- assert_kind_of ROUTING::DynamicSegment, segments[5]
- assert_equal :id, segments[5].key
- end
-
- def test_segment_for_action
- s, r = builder.segment_for(':action/something/else')
- assert_equal '/something/else', r
- assert_equal :action, s.key
- end
-
- def test_action_default_should_not_trigger_on_prefix
- s, r = builder.segment_for ':action_name/something/else'
- assert_equal '/something/else', r
- assert_equal :action_name, s.key
- assert_equal nil, s.default
- end
-
- def test_divide_route_options
- segments = builder.segments_for_route_path '/cars/:action/:person/:car/'
- defaults, requirements = builder.divide_route_options(segments,
- :action => 'buy', :person => /\w+/, :car => /\w+/,
- :defaults => {:person => nil, :car => nil}
- )
-
- assert_equal({:action => 'buy', :person => nil, :car => nil}, defaults)
- assert_equal({:person => /\w+/, :car => /\w+/}, requirements)
- end
-
- def test_assign_route_options
- segments = builder.segments_for_route_path '/cars/:action/:person/:car/'
- defaults = {:action => 'buy', :person => nil, :car => nil}
- requirements = {:person => /\w+/, :car => /\w+/}
-
- route_requirements = builder.assign_route_options(segments, defaults, requirements)
- assert_equal({}, route_requirements)
-
- assert_equal :action, segments[3].key
- assert_equal 'buy', segments[3].default
-
- assert_equal :person, segments[5].key
- assert_equal %r/\w+/, segments[5].regexp
- assert segments[5].optional?
-
- assert_equal :car, segments[7].key
- assert_equal %r/\w+/, segments[7].regexp
- assert segments[7].optional?
- end
-
- def test_assign_route_options_with_anchor_chars
- segments = builder.segments_for_route_path '/cars/:action/:person/:car/'
- defaults = {:action => 'buy', :person => nil, :car => nil}
- requirements = {:person => /\w+/, :car => /^\w+$/}
-
- assert_raises ArgumentError do
- route_requirements = builder.assign_route_options(segments, defaults, requirements)
- end
-
- requirements[:car] = /[^\/]+/
- route_requirements = builder.assign_route_options(segments, defaults, requirements)
- end
-
-
- def test_optional_segments_preceding_required_segments
- segments = builder.segments_for_route_path '/cars/:action/:person/:car/'
- defaults = {:action => 'buy', :person => nil, :car => "model-t"}
- assert builder.assign_route_options(segments, defaults, {}).empty?
-
- 0.upto(1) { |i| assert !segments[i].optional?, "segment #{i} is optional and it shouldn't be" }
- assert segments[2].optional?
-
- assert_equal nil, builder.warn_output # should only warn on the :person segment
- end
-
- def test_segmentation_of_semicolon_path
- segments = builder.segments_for_route_path '/books/:id;:action'
- defaults = { :action => 'show' }
- assert builder.assign_route_options(segments, defaults, {}).empty?
- segments.each do |segment|
- assert ! segment.optional? || segment.key == :action
- end
- end
-
- def test_segmentation_of_dot_path
- segments = builder.segments_for_route_path '/books/:action.rss'
- assert builder.assign_route_options(segments, {}, {}).empty?
- assert_equal 6, segments.length # "/", "books", "/", ":action", ".", "rss"
- assert !segments.any? { |seg| seg.optional? }
- end
-
- def test_segmentation_of_dynamic_dot_path
- segments = builder.segments_for_route_path '/books/:action.:format'
- assert builder.assign_route_options(segments, {}, {}).empty?
- assert_equal 6, segments.length # "/", "books", "/", ":action", ".", ":format"
- assert !segments.any? { |seg| seg.optional? }
- assert_kind_of ROUTING::DynamicSegment, segments.last
- end
-
- def test_assignment_of_default_options
- segments = builder.segments_for_route_path '/:controller/:action/:id/'
- action, id = segments[-4], segments[-2]
-
- assert_equal :action, action.key
- assert_equal :id, id.key
- assert ! action.optional?
- assert ! id.optional?
-
- builder.assign_default_route_options(segments)
-
- assert_equal 'index', action.default
- assert action.optional?
- assert id.optional?
- end
-
- def test_assignment_of_default_options_respects_existing_defaults
- segments = builder.segments_for_route_path '/:controller/:action/:id/'
- action, id = segments[-4], segments[-2]
-
- assert_equal :action, action.key
- assert_equal :id, id.key
- action.default = 'show'
- action.is_optional = true
-
- id.default = 'Welcome'
- id.is_optional = true
-
- builder.assign_default_route_options(segments)
-
- assert_equal 'show', action.default
- assert action.optional?
- assert_equal 'Welcome', id.default
- assert id.optional?
- end
-
- def test_assignment_of_default_options_respects_regexps
- segments = builder.segments_for_route_path '/:controller/:action/:id/'
- action = segments[-4]
-
- assert_equal :action, action.key
- action.regexp = /show|in/ # Use 'in' to check partial matches
-
- builder.assign_default_route_options(segments)
-
- assert_equal nil, action.default
- assert ! action.optional?
- end
-
- def test_assignment_of_is_optional_when_default
- segments = builder.segments_for_route_path '/books/:action.rss'
- assert_equal segments[3].key, :action
- segments[3].default = 'changes'
- builder.ensure_required_segments(segments)
- assert ! segments[3].optional?
- end
-
- def test_is_optional_is_assigned_to_default_segments
- segments = builder.segments_for_route_path '/books/:action'
- builder.assign_route_options(segments, {:action => 'index'}, {})
-
- assert_equal segments[3].key, :action
- assert segments[3].optional?
- assert_kind_of ROUTING::DividerSegment, segments[2]
- assert segments[2].optional?
- end
-
- # XXX is optional not being set right?
- # /blah/:defaulted_segment <-- is the second slash optional? it should be.
-
- def test_route_build
- ActionController::Routing.with_controllers %w(users pages) do
- r = builder.build '/:controller/:action/:id/', :action => nil
-
- [0, 2, 4].each do |i|
- assert_kind_of ROUTING::DividerSegment, r.segments[i]
- assert_equal '/', r.segments[i].value
- assert r.segments[i].optional? if i > 1
- end
-
- assert_kind_of ROUTING::DynamicSegment, r.segments[1]
- assert_equal :controller, r.segments[1].key
- assert_equal nil, r.segments[1].default
-
- assert_kind_of ROUTING::DynamicSegment, r.segments[3]
- assert_equal :action, r.segments[3].key
- assert_equal 'index', r.segments[3].default
-
- assert_kind_of ROUTING::DynamicSegment, r.segments[5]
- assert_equal :id, r.segments[5].key
- assert r.segments[5].optional?
- end
- end
-
- def test_slashes_are_implied
- routes = [
- builder.build('/:controller/:action/:id/', :action => nil),
- builder.build('/:controller/:action/:id', :action => nil),
- builder.build(':controller/:action/:id', :action => nil),
- builder.build('/:controller/:action/:id/', :action => nil)
- ]
- expected = routes.first.segments.length
- routes.each_with_index do |route, i|
- found = route.segments.length
- assert_equal expected, found, "Route #{i + 1} has #{found} segments, expected #{expected}"
- end
- end
-
-end
-
-class RouteSetTest < Test::Unit::TestCase
- class MockController
- attr_accessor :routes
-
- def initialize(routes)
- self.routes = routes
- end
-
- def url_for(options)
- only_path = options.delete(:only_path)
- path = routes.generate(options)
- only_path ? path : "http://named.route.test#{path}"
- end
- end
-
- class MockRequest
- attr_accessor :path, :path_parameters, :host, :subdomains, :domain, :method
-
- def initialize(values={})
- values.each { |key, value| send("#{key}=", value) }
- if values[:host]
- subdomain, self.domain = values[:host].split(/\./, 2)
- self.subdomains = [subdomain]
- end
- end
- end
-
- def set
- @set ||= ROUTING::RouteSet.new
- end
-
- def request
- @request ||= MockRequest.new(:host => "named.routes.test", :method => :get)
- end
-
- def test_generate_extras
- set.draw { |m| m.connect ':controller/:action/:id' }
- path, extras = set.generate_extras(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal "/foo/bar/15", path
- assert_equal %w(that this), extras.map(&:to_s).sort
- end
-
- def test_extra_keys
- set.draw { |m| m.connect ':controller/:action/:id' }
- extras = set.extra_keys(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal %w(that this), extras.map(&:to_s).sort
- end
-
- def test_generate_extras_not_first
- set.draw do |map|
- map.connect ':controller/:action/:id.:format'
- map.connect ':controller/:action/:id'
- end
- path, extras = set.generate_extras(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal "/foo/bar/15", path
- assert_equal %w(that this), extras.map(&:to_s).sort
- end
-
- def test_generate_not_first
- set.draw do |map|
- map.connect ':controller/:action/:id.:format'
- map.connect ':controller/:action/:id'
- end
- assert_equal "/foo/bar/15?this=hello", set.generate(:controller => "foo", :action => "bar", :id => 15, :this => "hello")
- end
-
- def test_extra_keys_not_first
- set.draw do |map|
- map.connect ':controller/:action/:id.:format'
- map.connect ':controller/:action/:id'
- end
- extras = set.extra_keys(:controller => "foo", :action => "bar", :id => 15, :this => "hello", :that => "world")
- assert_equal %w(that this), extras.map(&:to_s).sort
- end
-
- def test_draw
- assert_equal 0, set.routes.size
- set.draw do |map|
- map.connect '/hello/world', :controller => 'a', :action => 'b'
- end
- assert_equal 1, set.routes.size
- end
-
- def test_named_draw
- assert_equal 0, set.routes.size
- set.draw do |map|
- map.hello '/hello/world', :controller => 'a', :action => 'b'
- end
- assert_equal 1, set.routes.size
- assert_equal set.routes.first, set.named_routes[:hello]
- end
-
- def test_later_named_routes_take_precedence
- set.draw do |map|
- map.hello '/hello/world', :controller => 'a', :action => 'b'
- map.hello '/hello', :controller => 'a', :action => 'b'
- end
- assert_equal set.routes.last, set.named_routes[:hello]
- end
-
- def setup_named_route_test
- set.draw do |map|
- map.show '/people/:id', :controller => 'people', :action => 'show'
- map.index '/people', :controller => 'people', :action => 'index'
- map.multi '/people/go/:foo/:bar/joe/:id', :controller => 'people', :action => 'multi'
- map.users '/admin/users', :controller => 'admin/users', :action => 'index'
- end
-
- klass = Class.new(MockController)
- set.named_routes.install(klass)
- klass.new(set)
- end
-
- def test_named_route_hash_access_method
- controller = setup_named_route_test
-
- assert_equal(
- { :controller => 'people', :action => 'show', :id => 5, :use_route => :show, :only_path => false },
- controller.send(:hash_for_show_url, :id => 5))
-
- assert_equal(
- { :controller => 'people', :action => 'index', :use_route => :index, :only_path => false },
- controller.send(:hash_for_index_url))
-
- assert_equal(
- { :controller => 'people', :action => 'show', :id => 5, :use_route => :show, :only_path => true },
- controller.send(:hash_for_show_path, :id => 5)
- )
- end
-
- def test_named_route_url_method
- controller = setup_named_route_test
-
- assert_equal "http://named.route.test/people/5", controller.send(:show_url, :id => 5)
- assert_equal "/people/5", controller.send(:show_path, :id => 5)
-
- assert_equal "http://named.route.test/people", controller.send(:index_url)
- assert_equal "/people", controller.send(:index_path)
-
- assert_equal "http://named.route.test/admin/users", controller.send(:users_url)
- assert_equal '/admin/users', controller.send(:users_path)
- assert_equal '/admin/users', set.generate(controller.send(:hash_for_users_url), {:controller => 'users', :action => 'index'})
- end
-
- def test_namd_route_url_method_with_ordered_parameters
- controller = setup_named_route_test
- assert_equal "http://named.route.test/people/go/7/hello/joe/5",
- controller.send(:multi_url, 7, "hello", 5)
- end
-
- def test_draw_default_route
- ActionController::Routing.with_controllers(['users']) do
- set.draw do |map|
- map.connect '/:controller/:action/:id'
- end
-
- assert_equal 1, set.routes.size
- route = set.routes.first
-
- assert route.segments.last.optional?
-
- assert_equal '/users/show/10', set.generate(:controller => 'users', :action => 'show', :id => 10)
- assert_equal '/users/index/10', set.generate(:controller => 'users', :id => 10)
-
- assert_equal({:controller => 'users', :action => 'index', :id => '10'}, set.recognize_path('/users/index/10'))
- assert_equal({:controller => 'users', :action => 'index', :id => '10'}, set.recognize_path('/users/index/10/'))
- end
- end
-
- def test_draw_default_route_with_default_controller
- ActionController::Routing.with_controllers(['users']) do
- set.draw do |map|
- map.connect '/:controller/:action/:id', :controller => 'users'
- end
- assert_equal({:controller => 'users', :action => 'index'}, set.recognize_path('/'))
- end
- end
-
- def test_route_with_parameter_shell
- ActionController::Routing.with_controllers(['users', 'pages']) do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+/
- map.connect '/:controller/:action/:id'
- end
-
- assert_equal({:controller => 'pages', :action => 'index'}, set.recognize_path('/pages'))
- assert_equal({:controller => 'pages', :action => 'index'}, set.recognize_path('/pages/index'))
- assert_equal({:controller => 'pages', :action => 'list'}, set.recognize_path('/pages/list'))
-
- assert_equal({:controller => 'pages', :action => 'show', :id => '10'}, set.recognize_path('/pages/show/10'))
- assert_equal({:controller => 'pages', :action => 'show', :id => '10'}, set.recognize_path('/page/10'))
- end
- end
-
- def test_route_requirements_with_anchor_chars_are_invalid
- assert_raises ArgumentError do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /^\d+/
- end
- end
- assert_raises ArgumentError do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\A\d+/
- end
- end
- assert_raises ArgumentError do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+$/
- end
- end
- assert_raises ArgumentError do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+\Z/
- end
- end
- assert_raises ArgumentError do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+\z/
- end
- end
- assert_nothing_raised do
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+/, :name => /^(david|jamis)/
- end
- assert_raises ActionController::RoutingError do
- set.generate :controller => 'pages', :action => 'show', :id => 10
- end
- end
- end
-
- def test_non_path_route_requirements_match_all
- set.draw do |map|
- map.connect 'page/37s', :controller => 'pages', :action => 'show', :name => /(jamis|david)/
- end
- assert_equal '/page/37s', set.generate(:controller => 'pages', :action => 'show', :name => 'jamis')
- assert_raises ActionController::RoutingError do
- set.generate(:controller => 'pages', :action => 'show', :name => 'not_jamis')
- end
- assert_raises ActionController::RoutingError do
- set.generate(:controller => 'pages', :action => 'show', :name => 'nor_jamis_and_david')
- end
- end
-
- def test_recognize_with_encoded_id_and_regex
- set.draw do |map|
- map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /[a-zA-Z0-9 ]+/
- end
-
- assert_equal({:controller => 'pages', :action => 'show', :id => '10'}, set.recognize_path('/page/10'))
- assert_equal({:controller => 'pages', :action => 'show', :id => 'hello world'}, set.recognize_path('/page/hello+world'))
- end
-
- def test_recognize_with_conditions
- Object.const_set(:PeopleController, Class.new)
-
- set.draw do |map|
- map.with_options(:controller => "people") do |people|
- people.people "/people", :action => "index", :conditions => { :method => :get }
- people.connect "/people", :action => "create", :conditions => { :method => :post }
- people.person "/people/:id", :action => "show", :conditions => { :method => :get }
- people.connect "/people/:id", :action => "update", :conditions => { :method => :put }
- people.connect "/people/:id", :action => "destroy", :conditions => { :method => :delete }
- end
- end
-
- request.path = "/people"
- request.method = :get
- assert_nothing_raised { set.recognize(request) }
- assert_equal("index", request.path_parameters[:action])
-
- request.method = :post
- assert_nothing_raised { set.recognize(request) }
- assert_equal("create", request.path_parameters[:action])
-
- request.method = :put
- assert_nothing_raised { set.recognize(request) }
- assert_equal("update", request.path_parameters[:action])
-
- request.method = :update
- assert_raises(ActionController::RoutingError) { set.recognize(request) }
-
- request.path = "/people/5"
- request.method = :get
- assert_nothing_raised { set.recognize(request) }
- assert_equal("show", request.path_parameters[:action])
- assert_equal("5", request.path_parameters[:id])
-
- request.method = :put
- assert_nothing_raised { set.recognize(request) }
- assert_equal("update", request.path_parameters[:action])
- assert_equal("5", request.path_parameters[:id])
-
- request.method = :delete
- assert_nothing_raised { set.recognize(request) }
- assert_equal("destroy", request.path_parameters[:action])
- assert_equal("5", request.path_parameters[:id])
-
- request.method = :post
- assert_raises(ActionController::RoutingError) { set.recognize(request) }
-
- ensure
- Object.send(:remove_const, :PeopleController)
- end
-
- def test_typo_recognition
- Object.const_set(:ArticlesController, Class.new)
-
- set.draw do |map|
- map.connect 'articles/:year/:month/:day/:title',
- :controller => 'articles', :action => 'permalink',
- :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/
- end
-
- request.path = "/articles/2005/11/05/a-very-interesting-article"
- request.method = :get
- assert_nothing_raised { set.recognize(request) }
- assert_equal("permalink", request.path_parameters[:action])
- assert_equal("2005", request.path_parameters[:year])
- assert_equal("11", request.path_parameters[:month])
- assert_equal("05", request.path_parameters[:day])
- assert_equal("a-very-interesting-article", request.path_parameters[:title])
-
- ensure
- Object.send(:remove_const, :ArticlesController)
- end
-
- def test_routing_traversal_does_not_load_extra_classes
- assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded"
- set.draw do |map|
- map.connect '/profile', :controller => 'profile'
- end
-
- request.path = '/profile'
-
- set.recognize(request) rescue nil
-
- assert !Object.const_defined?("Profiler__"), "Profiler should not be loaded"
- end
-
- def test_recognize_with_conditions_and_format
- Object.const_set(:PeopleController, Class.new)
-
- set.draw do |map|
- map.with_options(:controller => "people") do |people|
- people.person "/people/:id", :action => "show", :conditions => { :method => :get }
- people.connect "/people/:id", :action => "update", :conditions => { :method => :put }
- people.connect "/people/:id.:_format", :action => "show", :conditions => { :method => :get }
- end
- end
-
- request.path = "/people/5"
- request.method = :get
- assert_nothing_raised { set.recognize(request) }
- assert_equal("show", request.path_parameters[:action])
- assert_equal("5", request.path_parameters[:id])
-
- request.method = :put
- assert_nothing_raised { set.recognize(request) }
- assert_equal("update", request.path_parameters[:action])
-
- request.path = "/people/5.png"
- request.method = :get
- assert_nothing_raised { set.recognize(request) }
- assert_equal("show", request.path_parameters[:action])
- assert_equal("5", request.path_parameters[:id])
- assert_equal("png", request.path_parameters[:_format])
- ensure
- Object.send(:remove_const, :PeopleController)
- end
-
- def test_deprecation_warning_for_root_route
- Object.const_set(:PeopleController, Class.new)
-
- set.draw do |map|
- assert_deprecated do
- map.root('', :controller => "people")
- end
- end
- ensure
- Object.send(:remove_const, :PeopleController)
- end
-
- def test_generate_with_default_action
- set.draw do |map|
- map.connect "/people", :controller => "people"
- map.connect "/people/list", :controller => "people", :action => "list"
- end
-
- url = set.generate(:controller => "people", :action => "list")
- assert_equal "/people/list", url
- end
-
- def test_generate_finds_best_fit
- set.draw do |map|
- map.connect "/people", :controller => "people", :action => "index"
- map.connect "/ws/people", :controller => "people", :action => "index", :ws => true
- end
-
- url = set.generate(:controller => "people", :action => "index", :ws => true)
- assert_equal "/ws/people", url
- end
-
- def test_generate_changes_controller_module
- set.draw { |map| map.connect ':controller/:action/:id' }
- current = { :controller => "bling/bloop", :action => "bap", :id => 9 }
- url = set.generate({:controller => "foo/bar", :action => "baz", :id => 7}, current)
- assert_equal "/foo/bar/baz/7", url
- end
-
- def test_id_is_not_impossibly_sticky
- set.draw do |map|
- map.connect 'foo/:number', :controller => "people", :action => "index"
- map.connect ':controller/:action/:id'
- end
-
- url = set.generate({:controller => "people", :action => "index", :number => 3},
- {:controller => "people", :action => "index", :id => "21"})
- assert_equal "/foo/3", url
- end
-
- def test_id_is_sticky_when_it_ought_to_be
- set.draw do |map|
- map.connect ':controller/:id/:action'
- end
-
- url = set.generate({:action => "destroy"}, {:controller => "people", :action => "show", :id => "7"})
- assert_equal "/people/7/destroy", url
- end
-
- def test_use_static_path_when_possible
- set.draw do |map|
- map.connect 'about', :controller => "welcome", :action => "about"
- map.connect ':controller/:action/:id'
- end
-
- url = set.generate({:controller => "welcome", :action => "about"},
- {:controller => "welcome", :action => "get", :id => "7"})
- assert_equal "/about", url
- end
-
- def test_generate
- set.draw { |map| map.connect ':controller/:action/:id' }
-
- args = { :controller => "foo", :action => "bar", :id => "7", :x => "y" }
- assert_equal "/foo/bar/7?x=y", set.generate(args)
- assert_equal ["/foo/bar/7", [:x]], set.generate_extras(args)
- assert_equal [:x], set.extra_keys(args)
- end
-
- def test_named_routes_are_never_relative_to_modules
- set.draw do |map|
- map.connect "/connection/manage/:action", :controller => 'connection/manage'
- map.connect "/connection/connection", :controller => "connection/connection"
- map.family_connection "/connection", :controller => "connection"
- end
-
- url = set.generate({:controller => "connection"}, {:controller => 'connection/manage'})
- assert_equal "/connection/connection", url
-
- url = set.generate({:use_route => :family_connection, :controller => "connection"}, {:controller => 'connection/manage'})
- assert_equal "/connection", url
- end
-
- def test_action_left_off_when_id_is_recalled
- set.draw do |map|
- map.connect ':controller/:action/:id'
- end
- assert_equal '/post', set.generate(
- {:controller => 'post', :action => 'index'},
- {:controller => 'post', :action => 'show', :id => '10'}
- )
- end
-
-end
-
-class RoutingTest < Test::Unit::TestCase
-
- def test_possible_controllers
- true_controller_paths = ActionController::Routing.controller_paths
-
- ActionController::Routing.use_controllers! nil
-
- silence_warnings do
- Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + '/controller_fixtures')
- end
-
- ActionController::Routing.controller_paths = [
- RAILS_ROOT, RAILS_ROOT + '/app/controllers', RAILS_ROOT + '/vendor/plugins/bad_plugin/lib'
- ]
-
- assert_equal ["admin/user", "plugin", "user"], ActionController::Routing.possible_controllers.sort
- ensure
- if true_controller_paths
- ActionController::Routing.controller_paths = true_controller_paths
- end
- ActionController::Routing.use_controllers! nil
- Object.send(:remove_const, :RAILS_ROOT) rescue nil
- end
-
- def test_possible_controllers_are_reset_on_each_load
- true_possible_controllers = ActionController::Routing.possible_controllers
- true_controller_paths = ActionController::Routing.controller_paths
-
- ActionController::Routing.use_controllers! nil
- root = File.dirname(__FILE__) + '/controller_fixtures'
-
- ActionController::Routing.controller_paths = []
- assert_equal [], ActionController::Routing.possible_controllers
-
- ActionController::Routing::Routes.load!
- ActionController::Routing.controller_paths = [
- root, root + '/app/controllers', root + '/vendor/plugins/bad_plugin/lib'
- ]
-
- assert_equal ["admin/user", "plugin", "user"], ActionController::Routing.possible_controllers.sort
- ensure
- ActionController::Routing.controller_paths = true_controller_paths
- ActionController::Routing.use_controllers! true_possible_controllers
- Object.send(:remove_const, :RAILS_ROOT) rescue nil
-
- ActionController::Routing::Routes.clear!
- ActionController::Routing::Routes.load_routes!
- end
-
- def test_with_controllers
- c = %w(admin/accounts admin/users account pages)
- ActionController::Routing.with_controllers c do
- assert_equal c, ActionController::Routing.possible_controllers
- end
- end
-
- def test_normalize_unix_paths
- load_paths = %w(. config/../app/controllers config/../app//helpers script/../config/../vendor/rails/actionpack/lib vendor/rails/railties/builtin/rails_info app/models lib script/../config/../foo/bar/../../app/models)
- paths = ActionController::Routing.normalize_paths(load_paths)
- assert_equal %w(vendor/rails/railties/builtin/rails_info vendor/rails/actionpack/lib app/controllers app/helpers app/models lib .), paths
- end
-
- def test_normalize_windows_paths
- load_paths = %w(. config\\..\\app\\controllers config\\..\\app\\\\helpers script\\..\\config\\..\\vendor\\rails\\actionpack\\lib vendor\\rails\\railties\\builtin\\rails_info app\\models lib script\\..\\config\\..\\foo\\bar\\..\\..\\app\\models)
- paths = ActionController::Routing.normalize_paths(load_paths)
- assert_equal %w(vendor\\rails\\railties\\builtin\\rails_info vendor\\rails\\actionpack\\lib app\\controllers app\\helpers app\\models lib .), paths
- end
-
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/selector_test.rb b/tracks/vendor/rails/actionpack/test/controller/selector_test.rb
deleted file mode 100644
index d0042900..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/selector_test.rb
+++ /dev/null
@@ -1,628 +0,0 @@
-#--
-# Copyright (c) 2006 Assaf Arkin (http://labnotes.org)
-# Under MIT and/or CC By license.
-#++
-
-require File.dirname(__FILE__) + '/../abstract_unit'
-require File.dirname(__FILE__) + '/fake_controllers'
-
-class SelectorTest < Test::Unit::TestCase
- #
- # Basic selector: element, id, class, attributes.
- #
-
- def test_element
- parse(%Q{
})
- # Match element by name.
- select("div")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- # Not case sensitive.
- select("DIV")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- # Universal match (all elements).
- select("*")
- assert_equal 3, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal nil, @matches[1].attributes["id"]
- assert_equal "2", @matches[2].attributes["id"]
- end
-
-
- def test_identifier
- parse(%Q{
})
- # Match element by ID.
- select("div#1")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- # Match element by ID, substitute value.
- select("div#?", 2)
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Element name does not match ID.
- select("p#?", 2)
- assert_equal 0, @matches.size
- # Use regular expression.
- select("#?", /\d/)
- assert_equal 2, @matches.size
- end
-
-
- def test_class_name
- parse(%Q{
})
- # Match element with specified class.
- select("div.foo")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- # Match any element with specified class.
- select("*.foo")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- # Match elements with other class.
- select("*.bar")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # Match only element with both class names.
- select("*.bar.foo")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- end
-
-
- def test_attribute
- parse(%Q{
})
- # Match element with attribute.
- select("div[title]")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- # Match any element with attribute.
- select("*[title]")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # Match alement with attribute value.
- select("*[title=foo]")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- # Match alement with attribute and attribute value.
- select("[bar=foo][title]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Not case sensitive.
- select("[BAR=foo][TiTle]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- end
-
-
- def test_attribute_quoted
- parse(%Q{
})
- # Match without quotes.
- select("[title = bar]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Match with single quotes.
- select("[title = 'bar' ]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Match with double quotes.
- select("[title = \"bar\" ]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Match with spaces.
- select("[title = \" bar \" ]")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- end
-
-
- def test_attribute_equality
- parse(%Q{
})
- # Match (fail) complete value.
- select("[title=bar]")
- assert_equal 0, @matches.size
- # Match space-separate word.
- select("[title~=foo]")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- select("[title~=bar]")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- # Match beginning of value.
- select("[title^=ba]")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Match end of value.
- select("[title$=ar]")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- # Match text in value.
- select("[title*=bar]")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- # Match first space separated word.
- select("[title|=foo]")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- select("[title|=bar]")
- assert_equal 0, @matches.size
- end
-
-
- #
- # Selector composition: groups, sibling, children
- #
-
-
- def test_selector_group
- parse(%Q{ })
- # Simple group selector.
- select("h1,h3")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- select("h1 , h3")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # Complex group selector.
- parse(%Q{ })
- select("h1 a, h3 a")
- assert_equal 2, @matches.size
- assert_equal "foo", @matches[0].attributes["href"]
- assert_equal "baz", @matches[1].attributes["href"]
- # And now for the three selector challange.
- parse(%Q{ })
- select("h1 a, h2 a, h3 a")
- assert_equal 3, @matches.size
- assert_equal "foo", @matches[0].attributes["href"]
- assert_equal "bar", @matches[1].attributes["href"]
- assert_equal "baz", @matches[2].attributes["href"]
- end
-
-
- def test_sibling_selector
- parse(%Q{ })
- # Test next sibling.
- select("h1+*")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- select("h1+h2")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- select("h1+h3")
- assert_equal 0, @matches.size
- select("*+h3")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- # Test any sibling.
- select("h1~*")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- select("h2~*")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- end
-
-
- def test_children_selector
- parse(%Q{})
- # Test child selector.
- select("div>p")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- select("div>span")
- assert_equal 0, @matches.size
- select("div>p#3")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- select("div>p>span")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- # Test descendant selector.
- select("div p")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- select("div span")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- select("div *#3")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- select("div *#4")
- assert_equal 1, @matches.size
- assert_equal "4", @matches[0].attributes["id"]
- # This is here because it failed before when whitespaces
- # were not properly stripped.
- select("div .foo")
- assert_equal 1, @matches.size
- assert_equal "4", @matches[0].attributes["id"]
- end
-
-
- #
- # Pseudo selectors: root, nth-child, empty, content, etc
- #
-
-
- def test_root_selector
- parse(%Q{})
- # Can only find element if it's root.
- select(":root")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- select("#1:root")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- select("#2:root")
- assert_equal 0, @matches.size
- # Opposite for nth-child.
- select("#1:nth-child(1)")
- assert_equal 0, @matches.size
- end
-
-
- def test_nth_child_odd_even
- parse(%Q{})
- # Test odd nth children.
- select("tr:nth-child(odd)")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # Test even nth children.
- select("tr:nth-child(even)")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- end
-
-
- def test_nth_child_a_is_zero
- parse(%Q{})
- # Test the third child.
- select("tr:nth-child(0n+3)")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- # Same but an can be omitted when zero.
- select("tr:nth-child(3)")
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- # Second element (but not every second element).
- select("tr:nth-child(0n+2)")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Before first and past last returns nothing.:
- assert_raises(ArgumentError) { select("tr:nth-child(-1)") }
- select("tr:nth-child(0)")
- assert_equal 0, @matches.size
- select("tr:nth-child(5)")
- assert_equal 0, @matches.size
- end
-
-
- def test_nth_child_a_is_one
- parse(%Q{})
- # a is group of one, pick every element in group.
- select("tr:nth-child(1n+0)")
- assert_equal 4, @matches.size
- # Same but a can be omitted when one.
- select("tr:nth-child(n+0)")
- assert_equal 4, @matches.size
- # Same but b can be omitted when zero.
- select("tr:nth-child(n)")
- assert_equal 4, @matches.size
- end
-
-
- def test_nth_child_b_is_zero
- parse(%Q{})
- # If b is zero, pick the n-th element (here each one).
- select("tr:nth-child(n+0)")
- assert_equal 4, @matches.size
- # If b is zero, pick the n-th element (here every second).
- select("tr:nth-child(2n+0)")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # If a and b are both zero, no element selected.
- select("tr:nth-child(0n+0)")
- assert_equal 0, @matches.size
- select("tr:nth-child(0)")
- assert_equal 0, @matches.size
- end
-
-
- def test_nth_child_a_is_negative
- parse(%Q{})
- # Since a is -1, picks the first three elements.
- select("tr:nth-child(-n+3)")
- assert_equal 3, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- assert_equal "3", @matches[2].attributes["id"]
- # Since a is -2, picks the first in every second of first four elements.
- select("tr:nth-child(-2n+3)")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- # Since a is -2, picks the first in every second of first three elements.
- select("tr:nth-child(-2n+2)")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- end
-
-
- def test_nth_child_b_is_negative
- parse(%Q{})
- # Select last of four.
- select("tr:nth-child(4n-1)")
- assert_equal 1, @matches.size
- assert_equal "4", @matches[0].attributes["id"]
- # Select first of four.
- select("tr:nth-child(4n-4)")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- # Select last of every second.
- select("tr:nth-child(2n-1)")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- # Select nothing since an+b always < 0
- select("tr:nth-child(-1n-1)")
- assert_equal 0, @matches.size
- end
-
-
- def test_nth_child_substitution_values
- parse(%Q{})
- # Test with ?n?.
- select("tr:nth-child(?n?)", 2, 1)
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "3", @matches[1].attributes["id"]
- select("tr:nth-child(?n?)", 2, 2)
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- select("tr:nth-child(?n?)", 4, 2)
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- # Test with ? (b only).
- select("tr:nth-child(?)", 3)
- assert_equal 1, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- select("tr:nth-child(?)", 5)
- assert_equal 0, @matches.size
- end
-
-
- def test_nth_last_child
- parse(%Q{})
- # Last two elements.
- select("tr:nth-last-child(-n+2)")
- assert_equal 2, @matches.size
- assert_equal "3", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- # All old elements counting from last one.
- select("tr:nth-last-child(odd)")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- end
-
-
- def test_nth_of_type
- parse(%Q{})
- # First two elements.
- select("tr:nth-of-type(-n+2)")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- # All old elements counting from last one.
- select("tr:nth-last-of-type(odd)")
- assert_equal 2, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- assert_equal "4", @matches[1].attributes["id"]
- end
-
-
- def test_first_and_last
- parse(%Q{})
- # First child.
- select("tr:first-child")
- assert_equal 0, @matches.size
- select(":first-child")
- assert_equal 1, @matches.size
- assert_equal "thead", @matches[0].name
- # First of type.
- select("tr:first-of-type")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- select("thead:first-of-type")
- assert_equal 1, @matches.size
- assert_equal "thead", @matches[0].name
- select("div:first-of-type")
- assert_equal 0, @matches.size
- # Last child.
- select("tr:last-child")
- assert_equal 1, @matches.size
- assert_equal "4", @matches[0].attributes["id"]
- # Last of type.
- select("tr:last-of-type")
- assert_equal 1, @matches.size
- assert_equal "4", @matches[0].attributes["id"]
- select("thead:last-of-type")
- assert_equal 1, @matches.size
- assert_equal "thead", @matches[0].name
- select("div:last-of-type")
- assert_equal 0, @matches.size
- end
-
-
- def test_first_and_last
- # Only child.
- parse(%Q{})
- select("table:only-child")
- assert_equal 0, @matches.size
- select("tr:only-child")
- assert_equal 1, @matches.size
- assert_equal "tr", @matches[0].name
- parse(%Q{})
- select("tr:only-child")
- assert_equal 0, @matches.size
- # Only of type.
- parse(%Q{})
- select("thead:only-of-type")
- assert_equal 1, @matches.size
- assert_equal "thead", @matches[0].name
- select("td:only-of-type")
- assert_equal 0, @matches.size
- end
-
-
- def test_empty
- parse(%Q{})
- select("table:empty")
- assert_equal 0, @matches.size
- select("tr:empty")
- assert_equal 1, @matches.size
- parse(%Q{
})
- select("div:empty")
- assert_equal 1, @matches.size
- end
-
-
- def test_content
- parse(%Q{
})
- select("div:content()")
- assert_equal 1, @matches.size
- parse(%Q{something
})
- select("div:content()")
- assert_equal 0, @matches.size
- select("div:content(something)")
- assert_equal 1, @matches.size
- select("div:content( 'something' )")
- assert_equal 1, @matches.size
- select("div:content( \"something\" )")
- assert_equal 1, @matches.size
- select("div:content(?)", "something")
- assert_equal 1, @matches.size
- select("div:content(?)", /something/)
- assert_equal 1, @matches.size
- end
-
-
- #
- # Test negation.
- #
-
-
- def test_element_negation
- parse(%Q{
})
- select("*")
- assert_equal 2, @matches.size
- select("*:not(p)")
- assert_equal 1, @matches.size
- assert_equal "div", @matches[0].name
- select("*:not(div)")
- assert_equal 1, @matches.size
- assert_equal "p", @matches[0].name
- select("*:not(span)")
- assert_equal 2, @matches.size
- end
-
-
- def test_id_negation
- parse(%Q{
})
- select("p")
- assert_equal 2, @matches.size
- select(":not(#1)")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- select(":not(#2)")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- end
-
-
- def test_class_name_negation
- parse(%Q{
})
- select("p")
- assert_equal 2, @matches.size
- select(":not(.foo)")
- assert_equal 1, @matches.size
- assert_equal "bar", @matches[0].attributes["class"]
- select(":not(.bar)")
- assert_equal 1, @matches.size
- assert_equal "foo", @matches[0].attributes["class"]
- end
-
-
- def test_attribute_negation
- parse(%Q{
})
- select("p")
- assert_equal 2, @matches.size
- select(":not([title=foo])")
- assert_equal 1, @matches.size
- assert_equal "bar", @matches[0].attributes["title"]
- select(":not([title=bar])")
- assert_equal 1, @matches.size
- assert_equal "foo", @matches[0].attributes["title"]
- end
-
-
- def test_pseudo_class_negation
- parse(%Q{})
- select("p")
- assert_equal 2, @matches.size
- select("p:not(:first-child)")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- select("p:not(:nth-child(2))")
- assert_equal 1, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- end
-
-
- def test_negation_details
- parse(%Q{
})
- assert_raises(ArgumentError) { select(":not(") }
- assert_raises(ArgumentError) { select(":not(:not())") }
- select("p:not(#1):not(#3)")
- assert_equal 1, @matches.size
- assert_equal "2", @matches[0].attributes["id"]
- end
-
-
- def test_select_from_element
- parse(%Q{})
- select("div")
- @matches = @matches[0].select("p")
- assert_equal 2, @matches.size
- assert_equal "1", @matches[0].attributes["id"]
- assert_equal "2", @matches[1].attributes["id"]
- end
-
-
-protected
-
- def parse(html)
- @html = HTML::Document.new(html).root
- end
-
- def select(*selector)
- @matches = HTML.selector(*selector).select(@html)
- end
-
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/send_file_test.rb b/tracks/vendor/rails/actionpack/test/controller/send_file_test.rb
deleted file mode 100644
index 83590fd7..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/send_file_test.rb
+++ /dev/null
@@ -1,117 +0,0 @@
-require File.join(File.dirname(__FILE__), '..', 'abstract_unit')
-
-
-module TestFileUtils
- def file_name() File.basename(__FILE__) end
- def file_path() File.expand_path(__FILE__) end
- def file_data() File.open(file_path, 'rb') { |f| f.read } end
-end
-
-
-class SendFileController < ActionController::Base
- include TestFileUtils
- layout "layouts/standard" # to make sure layouts don't interfere
-
- attr_writer :options
- def options() @options ||= {} end
-
- def file() send_file(file_path, options) end
- def data() send_data(file_data, options) end
-
- def rescue_action(e) raise end
-end
-
-SendFileController.template_root = File.dirname(__FILE__) + "/../fixtures/"
-
-class SendFileTest < Test::Unit::TestCase
- include TestFileUtils
-
- def setup
- @controller = SendFileController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_file_nostream
- @controller.options = { :stream => false }
- response = nil
- assert_nothing_raised { response = process('file') }
- assert_not_nil response
- assert_kind_of String, response.body
- assert_equal file_data, response.body
- end
-
- def test_file_stream
- response = nil
- assert_nothing_raised { response = process('file') }
- assert_not_nil response
- assert_kind_of Proc, response.body
-
- require 'stringio'
- output = StringIO.new
- output.binmode
- assert_nothing_raised { response.body.call(response, output) }
- assert_equal file_data, output.string
- end
-
- def test_data
- response = nil
- assert_nothing_raised { response = process('data') }
- assert_not_nil response
-
- assert_kind_of String, response.body
- assert_equal file_data, response.body
- end
-
- def test_headers_after_send_shouldnt_include_charset
- response = process('data')
- assert_equal "application/octet-stream", response.headers["Content-Type"]
-
- response = process('file')
- assert_equal "application/octet-stream", response.headers["Content-Type"]
- end
-
- # Test that send_file_headers! is setting the correct HTTP headers.
- def test_send_file_headers!
- options = {
- :length => 1,
- :type => 'type',
- :disposition => 'disposition',
- :filename => 'filename'
- }
-
- # Do it a few times: the resulting headers should be identical
- # no matter how many times you send with the same options.
- # Test resolving Ticket #458.
- @controller.headers = {}
- @controller.send(:send_file_headers!, options)
- @controller.send(:send_file_headers!, options)
- @controller.send(:send_file_headers!, options)
-
- h = @controller.headers
- assert_equal 1, h['Content-Length']
- assert_equal 'type', h['Content-Type']
- assert_equal 'disposition; filename="filename"', h['Content-Disposition']
- assert_equal 'binary', h['Content-Transfer-Encoding']
-
- # test overriding Cache-Control: no-cache header to fix IE open/save dialog
- @controller.headers = { 'Cache-Control' => 'no-cache' }
- @controller.send(:send_file_headers!, options)
- h = @controller.headers
- assert_equal 'private', h['Cache-Control']
- end
-
- %w(file data).each do |method|
- define_method "test_send_#{method}_status" do
- @controller.options = { :stream => false, :status => 500 }
- assert_nothing_raised { assert_not_nil process(method) }
- assert_equal '500 Internal Server Error', @controller.headers['Status']
- end
-
- define_method "test_default_send_#{method}_status" do
- @controller.options = { :stream => false }
- assert_nothing_raised { assert_not_nil process(method) }
- assert_equal ActionController::Base::DEFAULT_RENDER_STATUS_CODE, @controller.headers['Status']
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/session_management_test.rb b/tracks/vendor/rails/actionpack/test/controller/session_management_test.rb
deleted file mode 100644
index 6e100c0c..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/session_management_test.rb
+++ /dev/null
@@ -1,145 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class SessionManagementTest < Test::Unit::TestCase
- class SessionOffController < ActionController::Base
- session :off
-
- def show
- render_text "done"
- end
-
- def tell
- render_text "done"
- end
- end
-
- class TestController < ActionController::Base
- session :off, :only => :show
- session :session_secure => true, :except => :show
- session :off, :only => :conditional,
- :if => Proc.new { |r| r.parameters[:ws] }
-
- def show
- render_text "done"
- end
-
- def tell
- render_text "done"
- end
-
- def conditional
- render_text ">>>#{params[:ws]}<<<"
- end
- end
-
- class SpecializedController < SessionOffController
- session :disabled => false, :only => :something
-
- def something
- render_text "done"
- end
-
- def another
- render_text "done"
- end
- end
-
- class AssociationCachingTestController < ActionController::Base
- class ObjectWithAssociationCache
- def initialize
- @cached_associations = false
- end
-
- def fetch_associations
- @cached_associations = true
- end
-
- def clear_association_cache
- @cached_associations = false
- end
-
- def has_cached_associations?
- @cached_associations
- end
- end
-
- def show
- session[:object] = ObjectWithAssociationCache.new
- session[:object].fetch_associations
- if session[:object].has_cached_associations?
- render :text => "has cached associations"
- else
- render :text => "does not have cached associations"
- end
- end
-
- def tell
- if session[:object]
- if session[:object].has_cached_associations?
- render :text => "has cached associations"
- else
- render :text => "does not have cached associations"
- end
- else
- render :text => "there is no object"
- end
- end
- end
-
-
- def setup
- @request, @response = ActionController::TestRequest.new,
- ActionController::TestResponse.new
- end
-
- def test_session_off_globally
- @controller = SessionOffController.new
- get :show
- assert_equal false, @request.session_options
- get :tell
- assert_equal false, @request.session_options
- end
-
- def test_session_off_conditionally
- @controller = TestController.new
- get :show
- assert_equal false, @request.session_options
- get :tell
- assert_instance_of Hash, @request.session_options
- assert @request.session_options[:session_secure]
- end
-
- def test_controller_specialization_overrides_settings
- @controller = SpecializedController.new
- get :something
- assert_instance_of Hash, @request.session_options
- get :another
- assert_equal false, @request.session_options
- end
-
- def test_session_off_with_if
- @controller = TestController.new
- get :conditional
- assert_instance_of Hash, @request.session_options
- get :conditional, :ws => "ws"
- assert_equal false, @request.session_options
- end
-
- def test_session_store_setting
- ActionController::Base.session_store = :drb_store
- assert_equal CGI::Session::DRbStore, ActionController::Base.session_store
-
- if Object.const_defined?(:ActiveRecord)
- ActionController::Base.session_store = :active_record_store
- assert_equal CGI::Session::ActiveRecordStore, ActionController::Base.session_store
- end
- end
-
- def test_process_cleanup_with_session_management_support
- @controller = AssociationCachingTestController.new
- get :show
- assert_equal "has cached associations", @response.body
- get :tell
- assert_equal "does not have cached associations", @response.body
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/test_test.rb b/tracks/vendor/rails/actionpack/test/controller/test_test.rb
deleted file mode 100644
index 2b0086c5..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/test_test.rb
+++ /dev/null
@@ -1,495 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require File.dirname(__FILE__) + '/fake_controllers'
-
-class TestTest < Test::Unit::TestCase
- class TestController < ActionController::Base
- def set_flash
- flash["test"] = ">#{flash["test"]}<"
- render :text => 'ignore me'
- end
-
- def render_raw_post
- raise Test::Unit::AssertionFailedError, "#raw_post is blank" if request.raw_post.blank?
- render :text => request.raw_post
- end
-
- def test_params
- render :text => params.inspect
- end
-
- def test_uri
- render :text => request.request_uri
- end
-
- def test_html_output
- render :text => <
-
-
-
-
-
- Name:
-
-
-
-
-HTML
- end
-
- def test_only_one_param
- render :text => (params[:left] && params[:right]) ? "EEP, Both here!" : "OK"
- end
-
- def test_remote_addr
- render :text => (request.remote_addr || "not specified")
- end
-
- def test_file_upload
- render :text => params[:file].size
- end
-
- def redirect_to_symbol
- redirect_to :generate_url, :id => 5
- end
-
- def redirect_to_same_controller
- redirect_to :controller => 'test', :action => 'test_uri', :id => 5
- end
-
- def redirect_to_different_controller
- redirect_to :controller => 'fail', :id => 5
- end
-
- def create
- headers['Location'] = 'created resource'
- head :created
- end
-
- private
- def rescue_action(e)
- raise e
- end
-
- def generate_url(opts)
- url_for(opts.merge(:action => "test_uri"))
- end
- end
-
- def setup
- @controller = TestController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- ActionController::Routing::Routes.reload
- ActionController::Routing.use_controllers! %w(content admin/user test_test/test)
- end
-
- def teardown
- ActionController::Routing::Routes.reload
- end
-
- def test_raw_post_handling
- params = {:page => {:name => 'page name'}, 'some key' => 123}
- get :render_raw_post, params.dup
-
- raw_post = params.map {|k,v| [CGI::escape(k.to_s), CGI::escape(v.to_s)].join('=')}.sort.join('&')
- assert_equal raw_post, @response.body
- end
-
- def test_process_without_flash
- process :set_flash
- assert_equal '><', flash['test']
- end
-
- def test_process_with_flash
- process :set_flash, nil, nil, { "test" => "value" }
- assert_equal '>value<', flash['test']
- end
-
- def test_process_with_request_uri_with_no_params
- process :test_uri
- assert_equal "/test_test/test/test_uri", @response.body
- end
-
- def test_process_with_request_uri_with_params
- process :test_uri, :id => 7
- assert_equal "/test_test/test/test_uri/7", @response.body
- end
-
- def test_process_with_request_uri_with_params_with_explicit_uri
- @request.set_REQUEST_URI "/explicit/uri"
- process :test_uri, :id => 7
- assert_equal "/explicit/uri", @response.body
- end
-
- def test_multiple_calls
- process :test_only_one_param, :left => true
- assert_equal "OK", @response.body
- process :test_only_one_param, :right => true
- assert_equal "OK", @response.body
- end
-
- def test_assert_tag_tag
- process :test_html_output
-
- # there is a 'form' tag
- assert_tag :tag => 'form'
- # there is not an 'hr' tag
- assert_no_tag :tag => 'hr'
- end
-
- def test_assert_tag_attributes
- process :test_html_output
-
- # there is a tag with an 'id' of 'bar'
- assert_tag :attributes => { :id => "bar" }
- # there is no tag with a 'name' of 'baz'
- assert_no_tag :attributes => { :name => "baz" }
- end
-
- def test_assert_tag_parent
- process :test_html_output
-
- # there is a tag with a parent 'form' tag
- assert_tag :parent => { :tag => "form" }
- # there is no tag with a parent of 'input'
- assert_no_tag :parent => { :tag => "input" }
- end
-
- def test_assert_tag_child
- process :test_html_output
-
- # there is a tag with a child 'input' tag
- assert_tag :child => { :tag => "input" }
- # there is no tag with a child 'strong' tag
- assert_no_tag :child => { :tag => "strong" }
- end
-
- def test_assert_tag_ancestor
- process :test_html_output
-
- # there is a 'li' tag with an ancestor having an id of 'foo'
- assert_tag :ancestor => { :attributes => { :id => "foo" } }, :tag => "li"
- # there is no tag of any kind with an ancestor having an href matching 'foo'
- assert_no_tag :ancestor => { :attributes => { :href => /foo/ } }
- end
-
- def test_assert_tag_descendant
- process :test_html_output
-
- # there is a tag with a decendant 'li' tag
- assert_tag :descendant => { :tag => "li" }
- # there is no tag with a descendant 'html' tag
- assert_no_tag :descendant => { :tag => "html" }
- end
-
- def test_assert_tag_sibling
- process :test_html_output
-
- # there is a tag with a sibling of class 'item'
- assert_tag :sibling => { :attributes => { :class => "item" } }
- # there is no tag with a sibling 'ul' tag
- assert_no_tag :sibling => { :tag => "ul" }
- end
-
- def test_assert_tag_after
- process :test_html_output
-
- # there is a tag following a sibling 'div' tag
- assert_tag :after => { :tag => "div" }
- # there is no tag following a sibling tag with id 'bar'
- assert_no_tag :after => { :attributes => { :id => "bar" } }
- end
-
- def test_assert_tag_before
- process :test_html_output
-
- # there is a tag preceeding a tag with id 'bar'
- assert_tag :before => { :attributes => { :id => "bar" } }
- # there is no tag preceeding a 'form' tag
- assert_no_tag :before => { :tag => "form" }
- end
-
- def test_assert_tag_children_count
- process :test_html_output
-
- # there is a tag with 2 children
- assert_tag :children => { :count => 2 }
- # in particular, there is a tag with two children (a nameless pair of s)
- assert_tag :tag => 'ul', :children => { :count => 2 }
- # there is no tag with 4 children
- assert_no_tag :children => { :count => 4 }
- end
-
- def test_assert_tag_children_less_than
- process :test_html_output
-
- # there is a tag with less than 5 children
- assert_tag :children => { :less_than => 5 }
- # there is no 'ul' tag with less than 2 children
- assert_no_tag :children => { :less_than => 2 }, :tag => "ul"
- end
-
- def test_assert_tag_children_greater_than
- process :test_html_output
-
- # there is a 'body' tag with more than 1 children
- assert_tag :children => { :greater_than => 1 }, :tag => "body"
- # there is no tag with more than 10 children
- assert_no_tag :children => { :greater_than => 10 }
- end
-
- def test_assert_tag_children_only
- process :test_html_output
-
- # there is a tag containing only one child with an id of 'foo'
- assert_tag :children => { :count => 1,
- :only => { :attributes => { :id => "foo" } } }
- # there is no tag containing only one 'li' child
- assert_no_tag :children => { :count => 1, :only => { :tag => "li" } }
- end
-
- def test_assert_tag_content
- process :test_html_output
-
- # the output contains the string "Name"
- assert_tag :content => /Name/
- # the output does not contain the string "test"
- assert_no_tag :content => /test/
- end
-
- def test_assert_tag_multiple
- process :test_html_output
-
- # there is a 'div', id='bar', with an immediate child whose 'action'
- # attribute matches the regexp /somewhere/.
- assert_tag :tag => "div", :attributes => { :id => "bar" },
- :child => { :attributes => { :action => /somewhere/ } }
-
- # there is no 'div', id='foo', with a 'ul' child with more than
- # 2 "li" children.
- assert_no_tag :tag => "div", :attributes => { :id => "foo" },
- :child => {
- :tag => "ul",
- :children => { :greater_than => 2,
- :only => { :tag => "li" } } }
- end
-
- def test_assert_tag_children_without_content
- process :test_html_output
-
- # there is a form tag with an 'input' child which is a self closing tag
- assert_tag :tag => "form",
- :children => { :count => 1,
- :only => { :tag => "input" } }
-
- # the body tag has an 'a' child which in turn has an 'img' child
- assert_tag :tag => "body",
- :children => { :count => 1,
- :only => { :tag => "a",
- :children => { :count => 1,
- :only => { :tag => "img" } } } }
- end
-
- def test_assert_tag_attribute_matching
- @response.body = ' '
- assert_tag :tag => 'input',
- :attributes => { :name => /my/, :type => 'text' }
- assert_no_tag :tag => 'input',
- :attributes => { :name => 'my', :type => 'text' }
- assert_no_tag :tag => 'input',
- :attributes => { :name => /^my$/, :type => 'text' }
- end
-
- def test_assert_tag_content_matching
- @response.body = "hello world
"
- assert_tag :tag => "p", :content => "hello world"
- assert_tag :tag => "p", :content => /hello/
- assert_no_tag :tag => "p", :content => "hello"
- end
-
- def test_assert_generates
- assert_generates 'controller/action/5', :controller => 'controller', :action => 'action', :id => '5'
- assert_generates 'controller/action/7', {:id => "7"}, {:controller => "controller", :action => "action"}
- assert_generates 'controller/action/5', {:controller => "controller", :action => "action", :id => "5", :name => "bob"}, {}, {:name => "bob"}
- assert_generates 'controller/action/7', {:id => "7", :name => "bob"}, {:controller => "controller", :action => "action"}, {:name => "bob"}
- assert_generates 'controller/action/7', {:id => "7"}, {:controller => "controller", :action => "action", :name => "bob"}, {}
- end
-
- def test_assert_routing
- assert_routing 'content', :controller => 'content', :action => 'index'
- end
-
- def test_assert_routing_in_module
- assert_routing 'admin/user', :controller => 'admin/user', :action => 'index'
- end
-
- def test_params_passing
- get :test_params, :page => {:name => "Page name", :month => '4', :year => '2004', :day => '6'}
- parsed_params = eval(@response.body)
- assert_equal(
- {'controller' => 'test_test/test', 'action' => 'test_params',
- 'page' => {'name' => "Page name", 'month' => '4', 'year' => '2004', 'day' => '6'}},
- parsed_params
- )
- end
-
- def test_id_converted_to_string
- get :test_params, :id => 20, :foo => Object.new
- assert_kind_of String, @request.path_parameters['id']
- end
-
- def test_array_path_parameter_handled_properly
- with_routing do |set|
- set.draw do |map|
- map.connect 'file/*path', :controller => 'test_test/test', :action => 'test_params'
- map.connect ':controller/:action/:id'
- end
-
- get :test_params, :path => ['hello', 'world']
- assert_equal ['hello', 'world'], @request.path_parameters['path']
- assert_equal 'hello/world', @request.path_parameters['path'].to_s
- end
- end
-
- def test_assert_realistic_path_parameters
- get :test_params, :id => 20, :foo => Object.new
-
- # All elements of path_parameters should use string keys
- @request.path_parameters.keys.each do |key|
- assert_kind_of String, key
- end
- end
-
- def test_with_routing_places_routes_back
- assert ActionController::Routing::Routes
- routes_id = ActionController::Routing::Routes.object_id
-
- begin
- with_routing { raise 'fail' }
- fail 'Should not be here.'
- rescue RuntimeError
- end
-
- assert ActionController::Routing::Routes
- assert_equal routes_id, ActionController::Routing::Routes.object_id
- end
-
- def test_remote_addr
- get :test_remote_addr
- assert_equal "0.0.0.0", @response.body
-
- @request.remote_addr = "192.0.0.1"
- get :test_remote_addr
- assert_equal "192.0.0.1", @response.body
- end
-
- def test_header_properly_reset_after_remote_http_request
- xhr :get, :test_params
- assert_nil @request.env['HTTP_X_REQUESTED_WITH']
- end
-
- def test_header_properly_reset_after_get_request
- get :test_params
- @request.recycle!
- assert_nil @request.instance_variable_get("@request_method")
- end
-
- %w(controller response request).each do |variable|
- %w(get post put delete head process).each do |method|
- define_method("test_#{variable}_missing_for_#{method}_raises_error") do
- remove_instance_variable "@#{variable}"
- begin
- send(method, :test_remote_addr)
- assert false, "expected RuntimeError, got nothing"
- rescue RuntimeError => error
- assert true
- assert_match %r{@#{variable} is nil}, error.message
- rescue => error
- assert false, "expected RuntimeError, got #{error.class}"
- end
- end
- end
- end
-
- FILES_DIR = File.dirname(__FILE__) + '/../fixtures/multipart'
-
- def test_test_uploaded_file
- filename = 'mona_lisa.jpg'
- path = "#{FILES_DIR}/#{filename}"
- content_type = 'image/png'
-
- file = ActionController::TestUploadedFile.new(path, content_type)
- assert_equal filename, file.original_filename
- assert_equal content_type, file.content_type
- assert_equal file.path, file.local_path
- assert_equal File.read(path), file.read
- end
-
- def test_fixture_file_upload
- post :test_file_upload, :file => fixture_file_upload(FILES_DIR + "/mona_lisa.jpg", "image/jpg")
- assert_equal 159528, @response.body
- end
-
- def test_test_uploaded_file_exception_when_file_doesnt_exist
- assert_raise(RuntimeError) { ActionController::TestUploadedFile.new('non_existent_file') }
- end
-
- def test_assert_redirected_to_symbol
- with_foo_routing do |set|
- assert_deprecated(/generate_url.*redirect_to/) do
- get :redirect_to_symbol
- end
- assert_response :redirect
- assert_redirected_to :generate_url
- end
- end
-
- def test_assert_follow_redirect_to_same_controller
- with_foo_routing do |set|
- get :redirect_to_same_controller
- assert_response :redirect
- assert_redirected_to :controller => 'test_test/test', :action => 'test_uri', :id => 5
- assert_nothing_raised { follow_redirect }
- end
- end
-
- def test_assert_follow_redirect_to_different_controller
- with_foo_routing do |set|
- get :redirect_to_different_controller
- assert_response :redirect
- assert_redirected_to :controller => 'fail', :id => 5
- assert_raise(RuntimeError) { follow_redirect }
- end
- end
-
- def test_redirect_url_only_cares_about_location_header
- get :create
- assert_response :created
-
- # Redirect url doesn't care that it wasn't a :redirect response.
- assert_equal 'created resource', @response.redirect_url
- assert_equal @response.redirect_url, redirect_to_url
-
- # Must be a :redirect response.
- assert_raise(Test::Unit::AssertionFailedError) do
- assert_redirected_to 'created resource'
- end
- end
-
- protected
- def with_foo_routing
- with_routing do |set|
- set.draw do |map|
- map.generate_url 'foo', :controller => 'test'
- map.connect ':controller/:action/:id'
- end
- yield set
- end
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/url_rewriter_test.rb b/tracks/vendor/rails/actionpack/test/controller/url_rewriter_test.rb
deleted file mode 100644
index 882add49..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/url_rewriter_test.rb
+++ /dev/null
@@ -1,115 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class UrlRewriterTests < Test::Unit::TestCase
- def setup
- @request = ActionController::TestRequest.new
- @params = {}
- @rewriter = ActionController::UrlRewriter.new(@request, @params)
- end
-
- def test_overwrite_params
- @params[:controller] = 'hi'
- @params[:action] = 'bye'
- @params[:id] = '2'
-
- assert_equal '/hi/hi/2', @rewriter.rewrite(:only_path => true, :overwrite_params => {:action => 'hi'})
- u = @rewriter.rewrite(:only_path => false, :overwrite_params => {:action => 'hi'})
- assert_match %r(/hi/hi/2$), u
- end
-
-
- private
- def split_query_string(str)
- [str[0].chr] + str[1..-1].split(/&/).sort
- end
-
- def assert_query_equal(q1, q2)
- assert_equal(split_query_string(q1), split_query_string(q2))
- end
-end
-
-class UrlWriterTests < Test::Unit::TestCase
-
- class W
- include ActionController::UrlWriter
- end
-
- def teardown
- W.default_url_options.clear
- end
-
- def add_host!
- W.default_url_options[:host] = 'www.basecamphq.com'
- end
-
- def test_exception_is_thrown_without_host
- assert_raises RuntimeError do
- W.new.url_for :controller => 'c', :action => 'a', :id => 'i'
- end
- end
-
- def test_default_host
- add_host!
- assert_equal('http://www.basecamphq.com/c/a/i',
- W.new.url_for(:controller => 'c', :action => 'a', :id => 'i')
- )
- end
-
- def test_host_may_be_overridden
- add_host!
- assert_equal('http://37signals.basecamphq.com/c/a/i',
- W.new.url_for(:host => '37signals.basecamphq.com', :controller => 'c', :action => 'a', :id => 'i')
- )
- end
-
- def test_port
- add_host!
- assert_equal('http://www.basecamphq.com:3000/c/a/i',
- W.new.url_for(:controller => 'c', :action => 'a', :id => 'i', :port => 3000)
- )
- end
-
- def test_protocol
- add_host!
- assert_equal('https://www.basecamphq.com/c/a/i',
- W.new.url_for(:controller => 'c', :action => 'a', :id => 'i', :protocol => 'https')
- )
- end
-
- def test_named_route
- ActionController::Routing::Routes.draw do |map|
- map.home '/home/sweet/home/:user', :controller => 'home', :action => 'index'
- map.connect ':controller/:action/:id'
- end
-
- # We need to create a new class in order to install the new named route.
- kls = Class.new { include ActionController::UrlWriter }
- controller = kls.new
- assert controller.respond_to?(:home_url)
- assert_equal 'http://www.basecamphq.com/home/sweet/home/again',
- controller.send(:home_url, :host => 'www.basecamphq.com', :user => 'again')
-
- assert_equal("/home/sweet/home/alabama", controller.send(:home_path, :user => 'alabama', :host => 'unused'))
- ensure
- ActionController::Routing::Routes.load!
- end
-
- def test_only_path
- ActionController::Routing::Routes.draw do |map|
- map.home '/home/sweet/home/:user', :controller => 'home', :action => 'index'
- map.connect ':controller/:action/:id'
- end
-
- # We need to create a new class in order to install the new named route.
- kls = Class.new { include ActionController::UrlWriter }
- controller = kls.new
- assert controller.respond_to?(:home_url)
- assert_equal '/brave/new/world',
- controller.send(:url_for, :controller => 'brave', :action => 'new', :id => 'world', :only_path => true)
-
- assert_equal("/home/sweet/home/alabama", controller.send(:home_url, :user => 'alabama', :host => 'unused', :only_path => true))
- ensure
- ActionController::Routing::Routes.load!
- end
-
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/verification_test.rb b/tracks/vendor/rails/actionpack/test/controller/verification_test.rb
deleted file mode 100644
index 05012cf7..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/verification_test.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
-class VerificationTest < Test::Unit::TestCase
- class TestController < ActionController::Base
- verify :only => :guarded_one, :params => "one",
- :add_flash => { :error => 'unguarded' },
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_two, :params => %w( one two ),
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_with_flash, :params => "one",
- :add_flash => { :notice => "prereqs failed" },
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_in_session, :session => "one",
- :redirect_to => { :action => "unguarded" }
-
- verify :only => [:multi_one, :multi_two], :session => %w( one two ),
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_by_method, :method => :post,
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_by_xhr, :xhr => true,
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :guarded_by_not_xhr, :xhr => false,
- :redirect_to => { :action => "unguarded" }
-
- before_filter :unconditional_redirect, :only => :two_redirects
- verify :only => :two_redirects, :method => :post,
- :redirect_to => { :action => "unguarded" }
-
- verify :only => :must_be_post, :method => :post, :render => { :status => 405, :text => "Must be post" }, :add_headers => { "Allow" => "POST" }
-
- def guarded_one
- render :text => "#{params[:one]}"
- end
-
- def guarded_with_flash
- render :text => "#{params[:one]}"
- end
-
- def guarded_two
- render :text => "#{params[:one]}:#{params[:two]}"
- end
-
- def guarded_in_session
- render :text => "#{session["one"]}"
- end
-
- def multi_one
- render :text => "#{session["one"]}:#{session["two"]}"
- end
-
- def multi_two
- render :text => "#{session["two"]}:#{session["one"]}"
- end
-
- def guarded_by_method
- render :text => "#{request.method}"
- end
-
- def guarded_by_xhr
- render :text => "#{request.xhr?}"
- end
-
- def guarded_by_not_xhr
- render :text => "#{request.xhr?}"
- end
-
- def unguarded
- render :text => "#{params[:one]}"
- end
-
- def two_redirects
- render :nothing => true
- end
-
- def must_be_post
- render :text => "Was a post!"
- end
-
- protected
- def rescue_action(e) raise end
-
- def unconditional_redirect
- redirect_to :action => "unguarded"
- end
- end
-
- def setup
- @controller = TestController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- def test_guarded_one_with_prereqs
- get :guarded_one, :one => "here"
- assert_equal "here", @response.body
- end
-
- def test_guarded_one_without_prereqs
- get :guarded_one
- assert_redirected_to :action => "unguarded"
- assert_equal 'unguarded', flash[:error]
- end
-
- def test_guarded_with_flash_with_prereqs
- get :guarded_with_flash, :one => "here"
- assert_equal "here", @response.body
- assert flash.empty?
- end
-
- def test_guarded_with_flash_without_prereqs
- get :guarded_with_flash
- assert_redirected_to :action => "unguarded"
- assert_equal "prereqs failed", flash[:notice]
- end
-
- def test_guarded_two_with_prereqs
- get :guarded_two, :one => "here", :two => "there"
- assert_equal "here:there", @response.body
- end
-
- def test_guarded_two_without_prereqs_one
- get :guarded_two, :two => "there"
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_two_without_prereqs_two
- get :guarded_two, :one => "here"
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_two_without_prereqs_both
- get :guarded_two
- assert_redirected_to :action => "unguarded"
- end
-
- def test_unguarded_with_params
- get :unguarded, :one => "here"
- assert_equal "here", @response.body
- end
-
- def test_unguarded_without_params
- get :unguarded
- assert_equal "", @response.body
- end
-
- def test_guarded_in_session_with_prereqs
- get :guarded_in_session, {}, "one" => "here"
- assert_equal "here", @response.body
- end
-
- def test_guarded_in_session_without_prereqs
- get :guarded_in_session
- assert_redirected_to :action => "unguarded"
- end
-
- def test_multi_one_with_prereqs
- get :multi_one, {}, "one" => "here", "two" => "there"
- assert_equal "here:there", @response.body
- end
-
- def test_multi_one_without_prereqs
- get :multi_one
- assert_redirected_to :action => "unguarded"
- end
-
- def test_multi_two_with_prereqs
- get :multi_two, {}, "one" => "here", "two" => "there"
- assert_equal "there:here", @response.body
- end
-
- def test_multi_two_without_prereqs
- get :multi_two
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_by_method_with_prereqs
- post :guarded_by_method
- assert_equal "post", @response.body
- end
-
- def test_guarded_by_method_without_prereqs
- get :guarded_by_method
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_by_xhr_with_prereqs
- xhr :post, :guarded_by_xhr
- assert_equal "true", @response.body
- end
-
- def test_guarded_by_xhr_without_prereqs
- get :guarded_by_xhr
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_by_not_xhr_with_prereqs
- get :guarded_by_not_xhr
- assert_equal "false", @response.body
- end
-
- def test_guarded_by_not_xhr_without_prereqs
- xhr :post, :guarded_by_not_xhr
- assert_redirected_to :action => "unguarded"
- end
-
- def test_guarded_post_and_calls_render_succeeds
- post :must_be_post
- assert_equal "Was a post!", @response.body
- end
-
- def test_guarded_post_and_calls_render_fails_and_sets_allow_header
- get :must_be_post
- assert_response 405
- assert_equal "Must be post", @response.body
- assert_equal "POST", @response.headers["Allow"]
- end
-
- def test_second_redirect
- assert_nothing_raised { get :two_redirects }
- end
-end
diff --git a/tracks/vendor/rails/actionpack/test/controller/webservice_test.rb b/tracks/vendor/rails/actionpack/test/controller/webservice_test.rb
deleted file mode 100644
index e60e3a84..00000000
--- a/tracks/vendor/rails/actionpack/test/controller/webservice_test.rb
+++ /dev/null
@@ -1,248 +0,0 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'stringio'
-
-class WebServiceTest < Test::Unit::TestCase
-
- class MockCGI < CGI #:nodoc:
- attr_accessor :stdinput, :stdoutput, :env_table
-
- def initialize(env, data = '')
- self.env_table = env
- self.stdinput = StringIO.new(data)
- self.stdoutput = StringIO.new
- super()
- end
- end
-
-
- class TestController < ActionController::Base
- session :off
-
- def assign_parameters
- if params[:full]
- render :text => dump_params_keys
- else
- render :text => (params.keys - ['controller', 'action']).sort.join(", ")
- end
- end
-
- def dump_params_keys(hash=params)
- hash.keys.sort.inject("") do |s, k|
- value = hash[k]
- value = Hash === value ? "(#{dump_params_keys(value)})" : ""
- s << ", " unless s.empty?
- s << "#{k}#{value}"
- end
- end
-
- def rescue_action(e) raise end
- end
-
- def setup
- @controller = TestController.new
- ActionController::Base.param_parsers.clear
- ActionController::Base.param_parsers[Mime::XML] = :xml_node
- end
-
- def test_check_parameters
- process('GET')
- assert_equal '', @controller.response.body
- end
-
- def test_post_xml
- process('POST', 'application/xml', 'content... ')
-
- assert_equal 'entry', @controller.response.body
- assert @controller.params.has_key?(:entry)
- assert_equal 'content...', @controller.params["entry"].summary.node_value
- assert_equal 'true', @controller.params["entry"]['attributed']
- end
-
- def test_put_xml
- process('PUT', 'application/xml', 'content... ')
-
- assert_equal 'entry', @controller.response.body
- assert @controller.params.has_key?(:entry)
- assert_equal 'content...', @controller.params["entry"].summary.node_value
- assert_equal 'true', @controller.params["entry"]['attributed']
- end
-
- def test_register_and_use_yaml
- ActionController::Base.param_parsers[Mime::YAML] = Proc.new { |d| YAML.load(d) }
- process('POST', 'application/x-yaml', {"entry" => "loaded from yaml"}.to_yaml)
- assert_equal 'entry', @controller.response.body
- assert @controller.params.has_key?(:entry)
- assert_equal 'loaded from yaml', @controller.params["entry"]
- end
-
- def test_register_and_use_yaml_as_symbol
- ActionController::Base.param_parsers[Mime::YAML] = :yaml
- process('POST', 'application/x-yaml', {"entry" => "loaded from yaml"}.to_yaml)
- assert_equal 'entry', @controller.response.body
- assert @controller.params.has_key?(:entry)
- assert_equal 'loaded from yaml', @controller.params["entry"]
- end
-
- def test_register_and_use_xml_simple
- ActionController::Base.param_parsers[Mime::XML] = Proc.new { |data| XmlSimple.xml_in(data, 'ForceArray' => false) }
- process('POST', 'application/xml', 'content... SimpleXml ' )
- assert_equal 'summary, title', @controller.response.body
- assert @controller.params.has_key?(:summary)
- assert @controller.params.has_key?(:title)
- assert_equal 'content...', @controller.params["summary"]
- assert_equal 'SimpleXml', @controller.params["title"]
- end
-
- def test_use_xml_ximple_with_empty_request
- ActionController::Base.param_parsers[Mime::XML] = :xml_simple
- assert_nothing_raised { process('POST', 'application/xml', "") }
- assert_equal "", @controller.response.body
- end
-
- def test_deprecated_request_methods
- process('POST', 'application/x-yaml')
- assert_equal Mime::YAML, @controller.request.content_type
- assert_equal true, @controller.request.post?
- assert_equal :yaml, @controller.request.post_format
- assert_equal true, @controller.request.yaml_post?
- assert_equal false, @controller.request.xml_post?
- end
-
- def test_dasherized_keys_as_xml
- ActionController::Base.param_parsers[Mime::XML] = :xml_simple
- process('POST', 'application/xml', "\n... \n ", true)
- assert_equal 'action, controller, first_key(sub_key), full', @controller.response.body
- assert_equal "...", @controller.params[:first_key][:sub_key]
- end
-
- def test_typecast_as_xml
- ActionController::Base.param_parsers[Mime::XML] = :xml_simple
- process('POST', 'application/xml', <<-XML)
-
- 15
- false
- true
- 2005-03-17
- 2005-03-17T21:41:07Z
- unparsed
- 1
- hello
- 1974-07-25
-
- XML
- params = @controller.params
- assert_equal 15, params[:data][:a]
- assert_equal false, params[:data][:b]
- assert_equal true, params[:data][:c]
- assert_equal Date.new(2005,3,17), params[:data][:d]
- assert_equal Time.utc(2005,3,17,21,41,7), params[:data][:e]
- assert_equal "unparsed", params[:data][:f]
- assert_equal [1, "hello", Date.new(1974,7,25)], params[:data][:g]
- end
-
- def test_entities_unescaped_as_xml_simple
- ActionController::Base.param_parsers[Mime::XML] = :xml_simple
- process('POST', 'application/xml', <<-XML)
- <foo "bar's" & friends>
- XML
- assert_equal %(), @controller.params[:data]
- end
-
- def test_typecast_as_yaml
- ActionController::Base.param_parsers[Mime::YAML] = :yaml
- process('POST', 'application/x-yaml', <<-YAML)
- ---
- data:
- a: 15
- b: false
- c: true
- d: 2005-03-17
- e: 2005-03-17T21:41:07Z
- f: unparsed
- g:
- - 1
- - hello
- - 1974-07-25
- YAML
- params = @controller.params
- assert_equal 15, params[:data][:a]
- assert_equal false, params[:data][:b]
- assert_equal true, params[:data][:c]
- assert_equal Date.new(2005,3,17), params[:data][:d]
- assert_equal Time.utc(2005,3,17,21,41,7), params[:data][:e]
- assert_equal "unparsed", params[:data][:f]
- assert_equal [1, "hello", Date.new(1974,7,25)], params[:data][:g]
- end
-
- private
-
- def process(verb, content_type = 'application/x-www-form-urlencoded', data = '', full=false)
-
- cgi = MockCGI.new({
- 'REQUEST_METHOD' => verb,
- 'CONTENT_TYPE' => content_type,
- 'QUERY_STRING' => "action=assign_parameters&controller=webservicetest/test#{"&full=1" if full}",
- "REQUEST_URI" => "/",
- "HTTP_HOST" => 'testdomain.com',
- "CONTENT_LENGTH" => data.size,
- "SERVER_PORT" => "80",
- "HTTPS" => "off"}, data)
-
- @controller.send(:process, ActionController::CgiRequest.new(cgi, {}), ActionController::CgiResponse.new(cgi))
- end
-
-end
-
-
-class XmlNodeTest < Test::Unit::TestCase
- def test_all
- xn = XmlNode.from_xml(%{
-
-
- With O'Reilly and Adaptive Path
-
-
- Staying at the Savoy
-
-
-
-
-
-
-
-
- }
- )
- assert_equal 'UTF-8', xn.node.document.encoding
- assert_equal '1.0', xn.node.document.version
- assert_equal 'true', xn['success']
- assert_equal 'response', xn.node_name
- assert_equal 'Ajax Summit', xn.page['title']
- assert_equal '1133', xn.page['id']
- assert_equal "With O'Reilly and Adaptive Path", xn.page.description.node_value
- assert_equal nil, xn.nonexistent
- assert_equal "Staying at the Savoy", xn.page.notes.note.node_value.strip
- assert_equal 'Technology', xn.page.tags.tag[0]['name']
- assert_equal 'Travel', xn.page.tags.tag[1][:name]
- matches = xn.xpath('//@id').map{ |id| id.to_i }
- assert_equal [4, 5, 1020, 1133], matches.sort
- matches = xn.xpath('//tag').map{ |tag| tag['name'] }
- assert_equal ['Technology', 'Travel'], matches.sort
- assert_equal "Ajax Summit", xn.page['title']
- xn.page['title'] = 'Ajax Summit V2'
- assert_equal "Ajax Summit V2", xn.page['title']
- assert_equal "Staying at the Savoy", xn.page.notes.note.node_value.strip
- xn.page.notes.note.node_value = "Staying at the Ritz"
- assert_equal "Staying at the Ritz", xn.page.notes.note.node_value.strip
- assert_equal '5', xn.page.tags.tag[1][:id]
- xn.page.tags.tag[1]['id'] = '7'
- assert_equal '7', xn.page.tags.tag[1]['id']
- end
-
-
- def test_small_entry
- node = XmlNode.from_xml('hi ')
- assert_equal 'hi', node.node_value
- end
-
-end
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/addresses/list.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/addresses/list.rhtml
deleted file mode 100644
index c75e01ee..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/addresses/list.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-We only need to get this far!
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/companies.yml b/tracks/vendor/rails/actionpack/test/fixtures/companies.yml
deleted file mode 100644
index 707f72ab..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/companies.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-thirty_seven_signals:
- id: 1
- name: 37Signals
- rating: 4
-
-TextDrive:
- id: 2
- name: TextDrive
- rating: 4
-
-PlanetArgon:
- id: 3
- name: Planet Argon
- rating: 4
-
-Google:
- id: 4
- name: Google
- rating: 4
-
-Ionist:
- id: 5
- name: Ioni.st
- rating: 4
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/company.rb b/tracks/vendor/rails/actionpack/test/fixtures/company.rb
deleted file mode 100644
index 0d1c29b9..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/company.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class Company < ActiveRecord::Base
- attr_protected :rating
- set_sequence_name :companies_nonstd_seq
-
- validates_presence_of :name
- def validate
- errors.add('rating', 'rating should not be 2') if rating == 2
- end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml
deleted file mode 100644
index 25dc7468..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-world
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml
deleted file mode 100644
index c7926d48..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= 'hello world!' %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs b/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs
deleted file mode 100644
index 8d614d04..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs
+++ /dev/null
@@ -1 +0,0 @@
-page.alert 'hello world!'
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml b/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml
deleted file mode 100644
index 598d62e2..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml
+++ /dev/null
@@ -1 +0,0 @@
-xml.p "Hello world!"
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql b/tracks/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql
deleted file mode 100644
index b4e7539d..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql
+++ /dev/null
@@ -1,42 +0,0 @@
-CREATE TABLE 'companies' (
- 'id' INTEGER PRIMARY KEY NOT NULL,
- 'name' TEXT DEFAULT NULL,
- 'rating' INTEGER DEFAULT 1
-);
-
-CREATE TABLE 'replies' (
- 'id' INTEGER PRIMARY KEY NOT NULL,
- 'content' text,
- 'created_at' datetime,
- 'updated_at' datetime,
- 'topic_id' integer
-);
-
-CREATE TABLE 'topics' (
- 'id' INTEGER PRIMARY KEY NOT NULL,
- 'title' varchar(255),
- 'subtitle' varchar(255),
- 'content' text,
- 'created_at' datetime,
- 'updated_at' datetime
-);
-
-CREATE TABLE 'developers' (
- 'id' INTEGER PRIMARY KEY NOT NULL,
- 'name' TEXT DEFAULT NULL,
- 'salary' INTEGER DEFAULT 70000,
- 'created_at' DATETIME DEFAULT NULL,
- 'updated_at' DATETIME DEFAULT NULL
-);
-
-CREATE TABLE 'projects' (
- 'id' INTEGER PRIMARY KEY NOT NULL,
- 'name' TEXT DEFAULT NULL
-);
-
-CREATE TABLE 'developers_projects' (
- 'developer_id' INTEGER NOT NULL,
- 'project_id' INTEGER NOT NULL,
- 'joined_on' DATE DEFAULT NULL,
- 'access_level' INTEGER DEFAULT 1
-);
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml
deleted file mode 100644
index 4e8a2d80..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @cookies[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml
deleted file mode 100644
index 68e88bb7..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= cookies[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml
deleted file mode 100644
index 4b4782b2..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @flash[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml
deleted file mode 100644
index f7f9d091..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= flash[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml
deleted file mode 100644
index 1176c93a..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @headers[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml
deleted file mode 100644
index 308c4eb6..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= headers[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml
deleted file mode 100644
index 1eea6875..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @params[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml
deleted file mode 100644
index 7e349b4c..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= params[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml
deleted file mode 100644
index a1680c23..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @request.method %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml
deleted file mode 100644
index 0c74cf1c..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= request.method %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml
deleted file mode 100644
index 2f12d2ce..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @response.body %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml
deleted file mode 100644
index 948c7592..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= response.body %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml
deleted file mode 100644
index 3acc1b85..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @session[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml
deleted file mode 100644
index a899387c..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= session[:test] %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/developer.rb b/tracks/vendor/rails/actionpack/test/fixtures/developer.rb
deleted file mode 100644
index f5e5b901..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/developer.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class Developer < ActiveRecord::Base
- has_and_belongs_to_many :projects
-end
-
-class DeVeLoPeR < ActiveRecord::Base
- set_table_name "developers"
-end
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/developers.yml b/tracks/vendor/rails/actionpack/test/fixtures/developers.yml
deleted file mode 100644
index 308bf75d..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/developers.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-david:
- id: 1
- name: David
- salary: 80000
-
-jamis:
- id: 2
- name: Jamis
- salary: 150000
-
-<% for digit in 3..10 %>
-dev_<%= digit %>:
- id: <%= digit %>
- name: fixture_<%= digit %>
- salary: 100000
-<% end %>
-
-poor_jamis:
- id: 11
- name: Jamis
- salary: 9000
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/developers_projects.yml b/tracks/vendor/rails/actionpack/test/fixtures/developers_projects.yml
deleted file mode 100644
index cee359c7..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/developers_projects.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-david_action_controller:
- developer_id: 1
- project_id: 2
- joined_on: 2004-10-10
-
-david_active_record:
- developer_id: 1
- project_id: 1
- joined_on: 2004-10-10
-
-jamis_active_record:
- developer_id: 2
- project_id: 1
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.rhtml
deleted file mode 100644
index 1ebfbe25..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-Living in a nested world
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb b/tracks/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb
deleted file mode 100644
index 7104ff37..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module AbcHelper
- def bare_a() end
- def bare_b() end
- def bare_c() end
-end
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb b/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb
deleted file mode 100644
index bf60d9db..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-module Fun::GamesHelper
- def stratego() "Iz guuut!" end
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb b/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb
deleted file mode 100644
index 1890f6c9..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-module Fun::PDFHelper
- def foobar() 'baz' end
-end
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml
deleted file mode 100644
index 5f86a7de..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-controller_name_space/nested.rhtml <%= yield %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml
deleted file mode 100644
index 1bc7cbda..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-item.rhtml <%= yield %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml
deleted file mode 100644
index c0f2642b..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-layout_test.rhtml <%= yield %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab b/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab
deleted file mode 100644
index 018abfb0..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab
+++ /dev/null
@@ -1 +0,0 @@
-Mab
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml
deleted file mode 100644
index bbccf091..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-hello.rhtml
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layouts/builder.rxml b/tracks/vendor/rails/actionpack/test/fixtures/layouts/builder.rxml
deleted file mode 100644
index 729af4b8..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layouts/builder.rxml
+++ /dev/null
@@ -1,3 +0,0 @@
-xml.wrapper do
- xml << @content_for_layout
-end
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layouts/standard.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layouts/standard.rhtml
deleted file mode 100644
index 368764e6..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layouts/standard.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @content_for_layout %><%= @variable_for_layout %>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.rhtml
deleted file mode 100644
index 187aab07..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= @title || @content_for_title %>
-<%= @content_for_layout -%>
\ No newline at end of file
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/layouts/yield.rhtml b/tracks/vendor/rails/actionpack/test/fixtures/layouts/yield.rhtml
deleted file mode 100644
index 482dc902..00000000
--- a/tracks/vendor/rails/actionpack/test/fixtures/layouts/yield.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= yield :title %>
-<%= yield %>
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/multipart/binary_file b/tracks/vendor/rails/actionpack/test/fixtures/multipart/binary_file
deleted file mode 100644
index 7e4c68c62eba63bd7d59addbc3be8eaafb6479cb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 19846
zcmbTdWmFwOv?h881oz;s!5xBofP=eBaDsDi*93QWcMa|?2MG{d4iMx3!QE}RGxxoB
z=gqty^Qu>^?$xzwf8Xk^+SPm4*DNgJCKBvio@mIDjt;IC4z4U;tzDcPU94TL9UTNH
zEFGQgSyI9XWz7e>w|4lb4!&MZ<6W{&384pssbrq&K7&R+jP?QQvO6M!ivEh`Oxfq?-4
z-w(hW1Rx1Ogoj6f|A>fyfPjRAh>VJZhKhoMN{Ial1BaA|oQ#x+goJ{Im5zdnnVN)z
zo|l1{or9a3o1Bhcn2%G4m5ZD6Ka9X2At9lnpc0^=5pYtHP;&ksm$yCu79xxh3<4|+
z72pFF3@jGR+Yo>R0Qdm=&K3snf0vK2aPS`xU=ZJ1r7!^>U|?ZCz`?@9!NI{I!UAAE
zzyjc~K4MdHh{JzUHK76p;czAt)c503OU%%ynQn18pI;#0Nz!two4Euh7JhA*eK$h{
z1NeVo{0Au9NBH+PCM>{*|12YL|%m*x3N^A}|@lUE$oF7dJaHu7MKneA4s{mA3
zn0M;1SO8JL-6MTrAoBlID_b9bmS%jv({9D;N51jkd&E#b5yPwGFN@s3PqosBfw8pY
z10ai+-8anXMebg|^c$y5xKQ-}L*%>WKRZw(^nDrX%~-z5#2YNIKYOM5zBr2$WYrG)
z22lNkbf2sIN5koU@&=B@Zl)Z39lf)koA=YN>-;tfMBH@CUh1s(^&VrID%twcFgJJh
zCGiU)_?6}dp2@Nga`K4}sXD=A#b3qgRSUok>`P^jrGHPCAZggOOJSkP{}>|bc#>-`@FB0R}uH;?MVkJ
zXK|Bc{_E=DlIlmisxL`Q7LsSJ?q|7q;XC_ULK5d|*5V!?UcCVvqx}8TJCezT$PA4$
zHA1o$PB=h41d|ysd3fpQ5ml%(YFPmS#ZrzvY#>);y}b+Q`|e4ptMEW}$Q8~J-Eu9t
z^lRkQif19`hi?TDouifRZ-8deNS(bH^N59+P|aj0QKj`YwT6cjj#fI3subY=y8@dP
zO@h9&$X;8^{1fdqb49{yCN*WEPz5A9Uhe;VSTx!EhN;YULI33vBJDRD#ut%|0v5jX_nX4d_JQp~yiu0WNY{GI#*c{kt<67_I(4ayBh6Yc}K+0kkSrkFDg
z(^;@>so*W=XbIxz4*%ogcL<)RKUl4SS9`USv9eErj`1&kK<9}<7hZfE2AD>Y^>{!z
z-R$MSp{yc@b?L#`7jA4NSDx^Bip9;#;gjf2Bk{Q1pzbHs*fO5O&W<<0Mgtj3@8>7^`X8uKB_4L4
zg5kx$qkFB)n)c!8ndq#4pk8RUKeeyPffws8
zW)oVgXCkK$magTD$HW9|gV1C4qQm&R18TYLHxSaUx=qg@hIM)x++&hRlA%g0PPyIt
zwLuqrBs*{KmZjkrFGnD1k~`#cT~uGRPFxpfy$dF|?_qpwGk_)r>~0r?J`!hX=2%8M
zO1Tl&XJ3ujnCd`LV})ak^P!~UpwazcQ2~WJZKAJZ``fnKLh>&!#D5=qT=!jE{(#mr
ztquFWpHluMM#YbIAP}iqx~YK1ya5!DFIFLkcgPM@+AYcH%DQ+TGEcdv`ik4{IIDX0skChyZG
z*dfbZpvty_X}c~VcxZB68(fZz)$k(XxxzJDT
z1r!85{XJ7+LW{}AMdp|iuVGE9@T+BGG%a)^>-F?rFcF-?tuvFOFD$25mBIo1KULDh
zg*2zS6+4^8MrWtD8Nj^Myv*&Xs*}XsMQ?yz)JZh@rPKN%Z!al37D4Fw2(1oc)3Mm-
zRbgllZ}5y2G{AOUehYiSUuuMPUQIMyGVyJaaSSI&djf!p^_OD4*P}37O$*GcH-E<^
zV{PJa#$AMrNH~2gd?+6P+x3v9F;8RV;M*p^Hh=TXa2m7q#DZq=^ySWrqa8YO?2YPP
zTACw8Y0wj0asD~yg;(3`uxdJ&REy}9%sB2j-KCTSHP{qA&
z8Ag?(lzvw7c9GNX=hYdobqLstegk-iy#Z(s{Y0Z>;vR_NVx{Zar))y#d#fdPK
zav~Vi(-BwIePJIWR3VobXkfn&_?Ajv!m0N&K0YgSF4sF6^k<=9s~79z{_$7u(>H*P
z1GeeES)L*Kf{ghOd^8KXJU%)QWIZK;d^()K@7lky|*UNs`
z*DjRh-duiszb^|NP%Q?pMabvPX7z8e
zV1LT1_bOY|C47Ir+de4r_TnF#n^b}bMq>cebWiF+uGN|}%Mo=qOkoU;Wrm}DSIuJN
z1{#0ZA~xIQ)49j6zuJ$>$71a0DdLzSWi2W%s|(FZAXRaU=U_Bt9q^zDFzf}@>{DY8
zfCY(r=Vt4)oX3w>r;wgv2IDrG#DZZEC>DN*%>0+Rro}s))?lzk8_ilsKV?34xE?m!
z%)9hqaooD~Bjb-?Z>wgntYIwEJCC2mW~mghWpy?3%oQr<`VA?QT`LUT1TCPZ3uRwI
zdm20sM~XqAJ~RG*0(RGSlR2pqM3kho5tLmGzylAH$Y0Sx}K(8zDT}*3W?FU`L)Fx
z;Nk;HhLBJi-oqOJMd0_nK|F%=ZU51+Z8wi}a|!dSDMgM4G}ud6W=D?!i#BE_K~j3N
zis7I5X5^JHlg1lh;xT3_PJp`#ZrAu|bQ%`6)|1zI+)
z-OS-5W5OaFekh-Sh%~g@*i;I*syxql(m+ntbORJ
zw;vlLO2};YD9=XI%9U!d4Dg_4s4oV*p+J2Vw$3@0FSkiw8Bj2fG%UUvkw)O(=c|hk
zKz`+-jZ3Bdj59HsEsc|O*AcxBDG_INo-wcaKJ)!>1hY|u^Tivab?W-U2+`!dq|QoK
zQ_X0=G$SP6NJNv63}9AWlc0_Y)uyOj@Ae!!0?&0zRoPnZNVeP3a2>}aN+pGIKx^Ls
z2Ijs`3l&lrQLxFgPo$)#C@nhnma^trv>_zf9{Wdzl6;=5U)C8kP<4mW8GSBdnTGAo
zYVB&3Q>Z_m_qqJp3Aqo_V}YMmPeo}zQ^&iDh;JCjoJdLv%6)B4NV00o>eER(cFfdp
zir^}lC226ALm?-?|T_0d=}lvObSG#s6q`nlCw0n
z>Tu}Vx%`kuCzFITSE@fN4dFW7zbz%KB=W$sK9zkw+^{Z~#WPH_%(2GT-}!RtPqXVc
zOf@NsI_bzM*FK*8d=Smkq>Tk^7;2y#|210skDIiNoAhSVN)3R_3s?ZQ18Py^3DWiu7zMQo_}L4e(2<4f$$OAITIf|sCl
za1RmF7SErr_qKV5wKCyy-Ofsn1+3!FPnSQViE#Z%adE*JWFyu#|hdCd~EP9Mb
zgag<65Nz(Gi2dFk{2vCv+H`H@P=$%hI1^^%LTZv+9%M9ovTJGUHVxe!k~N
zHOScU@zQH%#u%wns6#?p64@e%PIa2u
z8c-~QrPcaQwVcBo&QzD`dgZc!?aYZ;<;7R18>V8;_?AxE!b{A9(2t5VDl3P#_ztB^
zc-f=IPG2aO5$Wc4JFhDk^!%e0LDnpd$4ML3NM4n!u~8Lc)L!-|j^WYKi2~XFzS8(`8y)}GM-
zOrC(l7)-^PcsuBEpv66Dq;Y{-G|roVrimbB*(W3cu>AiBZbrd!
zv9psmDD>4VH#p4;_G`uU;^$m-2%ux|n)j9B#?M$C8ETKtHvs&OY??~v%uZWRC|^bv
zefc`hHCeNS8W{tm-Rv>5xpY;&OwUW*$Y32Pay7LA{zdvx4JAi7i*HSeRVh)(V2X2s
zL8hQ29%6<022j+QlmrZ6#YvHu$ZHysR3C9$wol@gqI0vz@#Y!|wO&!HQbpei2RM%8
zY3GW&koJa~bs=30Kerfr*99zgBLR&O`4I|AltyggnpCAYf;8L+IfzCC>c<{550$-N
zE#|!0J_O>~T$r;XTg>^RhTvHi@<)umA4NIo^o%A%>0{5fe9IDrC@lGdM-cOzLkvwL->bp-u
zUS9_)zqsU<9mGwgqAy=+WK>Q1^4zxbIMdNA!Ce^`Dy1&YD!c*Q;Qjp<^p(1v>?0NY
zZ{=EllRs%WYY+9S$C|$Z4qJ~Ds@G5uJuvyed)BUNLK}0uXIeFpr0ibNxEjC4g!#GC
zwRaT`wo7EAp5+C2k`v6Zf6{XO?GgEkj#0TNXDBVK4s4(MVD~L)6eW5&f~W=_r251Vg>B0=6O-z`Uvu0~V}qWgy3t>F
z^uHScHH3imfc(xLQ4w23o~|l~R&*_d80Y#xF0fz(Z0OBCY1PLql&rQ5U=6iaQh*wY
z8(GfLpUn_8OB4_1V5Lrpx?_6zbJ+&nPb#ua@ujmD&7|bhnJ59xNUeiyP4)?M+0GnG
z&FU9C&llg>C)})UnH!Z<&2@R1nFWJl@1aC#8cp`{3ZBNPQeL0wBVqXXp-|VcyXvV*
zx!RmELxV=?FGw2aWz6Cx_c!Ir)`eVh&A0mJ&qP0;W!aM8;)jVj6Nh2Bi~%wfml&i1
z3rtZz<5Xn~3vy7MzwjHFV+?+7*2cT7^1%%p&)C5-VEnS6747#1$S?>xn>5*#i3Ab%
z4*YhSp0{l4N*_;BE=p)!xt-8T6Yn%BYqw1u|Hy%G=y#;PWqs4SxR<19FMYW#z9BM`
zz7S{16%2y3mS~2_B`(?$P&ezAc50@K-Sdr&{+$-%(yu09CcugLQgClZpbEAri>|XA
zQFLYP?%}l=VwAyV(3wF11bE8?6e>E_LcXn1nmOes)-R-X>8Y6AqGRs*@lIGzmpJHi}#1+Ll9H~bo9iJ20!Fm(6xePvn
z8kcF?(}ZWS_qDm50zv`Ex}wKcb-yoH5&K}U73WOaQR05=^nUK~G+C5KNsUeoSJKq4
z?*r@{83j1j*?5Om&Vh-$d;YR+X_({C+&q{sm96Br&eoW=hQOFvi)yLH-HKBgG2nAm6&@?v`0?4rFDDx{QlpJ;2H)*@
zswLJ@%H!PSTa*M`ae9=|jbu&sg?~5L2||BdgVvs3-4Mcs6v|}eQ4GMINz`1ZChk}L
zXVW&Zf5CTD^D-Wmai7<`>c7A|#GPoS8Yul)>FQFtNNb8(am`Uy@r0O8)pKThj6wa~
z0@N-HPt*KhkZ`Kl`8SGxk-{S$8?|6a}UQ41E8w#FQez3+p
zw|(lYm{Cq9z(rlARECA^l{?5bTzhDvw!xwVA2J$poRV$*cB(Efv;C#wZq@c;qif+E
zK^V~9L2>DZlEv1Xnox5BPOc^vRPy$5Qncfq3^>uFiC=5`6dp`@`qJw-m13}F05+Wy
z+OV_u&CAH~Tr`42zAGGereSuuq$-86TRsIiNIE)EanRXI_DhhzIpAD&
zVaiZ7&atEHDOZURb-wV
z@33t*+sVJQ2rB`Ef^lyS5G9(zz?^h{fH7%R;+U@&jmNF{HIxc6ucvGryXKZ8aULEc
zBqx3;qdKo^z5w#~!$odyyS4l*_KoL5=4bYSIkhIPoffVXT;sJLU60;b?I30Bu4av#
zRS?gWK-tN^Ry`JNugKNehIB7@kkHd5U6$-t8B=%YWT|JwTqpSI&?9c{WLlRB=o|Kn
zUf|nDa~4NqZKSNpwyJ0S{>7O%JfIM-Xnp2>$o!^t13$SaI-aj72e=2@B>m$8?xuuyJ}7w&je6Scqd*P)5dmnrN33jU3HS71v{RnaB{f
za7qmBgvMR0US#~=
zTGaVd&N9=pEggHgbN!UfnS5yozh&_m2X~G9gj05Z$5_GYKX7D^K|kY*awYm5<=>s}
zg6T_}X5h1Sb(TM7hmho-UA{isFBo|5%pK@^HZx7+p{){s{Kk`JCYy^BTi|!jl{65m
zT;g?GRC*|2qM!P6bzFTY--)ST8rB{gIoPDsBL`jHz6Ed@syv@9p8@94qmn)@@
z8Db;KGTcyf*;rPpbH#gEn%JihL^6g|yQ9I?;~BGs3;is
zc*YhFkL&9QijKVl6+*c7cZ*ZR8&VgYzA_MewtStu^B^O(Df{wMS!}OBu;S-E6vSpK
z)f%X2yVeB59l4xEEjY97a}*vvK9<1n9+OPJ1t=bPa8t%^4O*A`EN^@mjr2i*Raqf)
z^!bP%ZjyGy8zyzc?<03hPbw2XO-oni#wJ<=;}^L4+-`xZ)%Jaql%h`unJDu7<}E21
z5h{{gqniM~(L;0$SfRNi`Enkn3KqL#%D{ZhiMj!f37EfB^{YnJElVhr;RcN0CTVFP
z-_)jXdzpadb!KV`f2(~*GTm=%!OEC!LU-QR=Jb9cuUqF~}
zv&k%2(_+eY+bQztr@L4Ux1Xbh1>}cjQ}CEXT>CYG(d%c7^P4?9Ro;3#jx2d=~&);O`=xvp@^%QOtc
zRhftWBR$00;gZA%1L-2-2w|>20nHY6Jm3^uR%&C!kKbyQ_#YP_veedam-Vc~>?1?Q
z0TmH^2y;A;v~e(ES@dmLCJK=%kNaKUIx|WOU*eZk!~Jc|O;$f7=*}-(y(^7KJbX^f
zS+>_R$6RgE$7sP%5MhM&>Px-u;lEiPkRb$v4Sv3_nD!~
zLZE7Qy=)hHQS3^(j5xcSs@YZG;$>)Oo3rXK&U`XqK*eU?;vU3`uZQX1j$pB!RZ^aw
zHSRMTnUQ}(d-n_0rrTvmS1Z%~)zggZGr?h_
z(GW??X5I9BfDKb2>kR(#?D1)5^3!&H#b?1%m&1{wQg$Y~nxWeyMS8|R_^@Y~MY=_i$Fqc0GYtNOI7$xuY{{>PD{qP_pY-PM~1y?n`w)D%BQKUA2n;Y
z`?uAj7iT&o
zM*^<?6$eao30Wm+UtBQU6=M{fm;Z+S&v+{Hz9`>8n1s
zZ+uvb45)vYU>|`MM35$x8SgYA82vZCpGiXV
z`?hsckSTppk-uk*GcO!lm(X8#b5Zsg-@D_Q$jfuZQtb`!UBwBD}V@
zQP!u>@PG_$-lXRe0uZv~1R^-y-qcAMI4@}JEegwgnHy?=gu-i@#1A>+-*Goy7(e3q
z<1m!}yJSQ6^gq+#ocd|ntiCIB_UF^VQQSs)0Q5wmNFFiv>tM>qfqKBEIk{2u;Sp{V
z`-3U{BIU@i7(NtGy;zsucOkb}Z{M2}jz+F2*-z>O&y+_OH>^7*iV-O-DfY*quIBU<
z^{-_tou&yRFO3VN%*o&Nbk?3twJ}L~w&@;i(C>;8nZPWSa5vQRMD?IWpgT8*#-(hP
znzItoJUOR~nq16_ul5z}SOWPgTzvvxL-5=G8>3EiWy}f!H9syoPQ-b%x`LKjqCCUS
zQmRFoAd5MptQLZx5?}vaxkcPF$`Am7;Fj!0$uB^)HxZFXFmU5**w*&}%ymxC{7q@_
zxPFrh`XXYxu?}jSl5L1Uasw@nc#k7cmMjl7wdZ@s@K!vHlig;WBBWQ~zz!QBe$Bjr
zv^@UV3$~p)u12@Ra|`v?4=#IT!)b!s>q?kY@bJEchOZBT66j!BRfdkQPGYtLIBT6c
zXLMjb^3!;28RlH}R90wdl5?9$(Lr9;1Ro3W)(g(TT-f_sba_sPt*CW2V4&~*>)Pyi
z8{jeTihMlndxu?WT8;Zq^Su22FSEM{$8dkoIz2MZ==ZU+auAr@
z1&>4$GoB$H0tvaSQ1SABN!(yC^c+h3m9&S%_h?yV^H{8nDSc~_@)bhZb07^Kz?i1K
zz=25jv@W
z6l!4x(m5mDm>EfuKd$Cx^M2k$^;UH&YeG%|JV*rhX@ZD1rwm+Xs_tGJ+L39ySVCVG
z)eXld+;$6G!Y@V0ywxeo^pXiWMN`yTt)trg1o%0@%*B{%H@JT0Ep4ISQ^&}3<}(Ta
zj;gtXy|Z1fERAWd0_QPJ?n_DAs!YH79mVI7>CdN@_s1dWIQ0Vw!JdUR=&@ez-^@})
z1sr{EM*oE1Bc)h{*QRZn34BzMYfLmXQ
zsl~kZ|8~<@S6Y?q?1dr3Q8fysej73VYi~=1?SZ%+p?+En%FB^8rJXZC+Ds(_T~rKP
zQ?)k!YPV{|8i^w?+YLsV=Ih%uoA=SUQiN-fVoe5Ccb!uF1XmPns{d@2l5$-9!|Of*e6arc9o&X(rvy>Xv9eGn3YnNkh*6kTkYY?FtR8q9o)%!s+H#V8+$>l-|ClVkc3ot(TTtrFF3
zMdkuyz(OV+s6I2#;-*2x$YN*I&xj&rNrvfM%=J($b~P=*D}{z~8a5%HfNqurR@&4<
zMb72X#PGo+l0e|Q%O({DoMryrxR1QKtIaHinNZjv?hZU=L_=QOy@8(}s{`
z^Y`kydQ8w)br351mmtm&8aliBcqkZXBBhnd&
zfZZvYF#Ksh_5nZfqY{@`zTh?3-CUmSqj(h|FIg1905
z<-~!bwXC34+qVfcCG_n&f?Q&*q@yi$8|Z*CNu~?$TNIK^;R**cR?g#tJD2x+c}8p>
zE7)25!LsPrA`hC}=7ut}XDG!S<7Zg#w4JlF;M|jJZ;XE5v?H}#;>p*MZGEz$*s#lr
z>Gxo(wkN`Amsr~N__kFgXfL&cCb8`vczdR&NIW2Si^x__Bc3Yt)sEqxOz*yCl5C4W
z^nuU&_D4GhK|>JYX6@V>iQ7@;+V@*Dv;x908wsv!K%23KUeElaz13
zIfrpEGg_{_%BpyrkP$y8KU@CFl^E;`)*I{@y|E4sMv|X=qo^_pbNp@u)z7MEmGzf2
zS~O43FQVO|skRLHiBraLsDV`@(vlwpv^AXha-(7uXbi<6myXsZCQm>-SmQIJAuJ+Y+-^Eeeyg!)^9-_5{r&l{w!X;{B60<
z{uJjop%y=(#HkvP;4IEyUc}mAXmFQLabpIzww-tN1K3G{*&S{~faF}5;VcZ=YOf_x
z!!>oVC(9g0h&DA72SzBhVzWxZ*-3iahc5Yvf8`3g@raHsoDa3Pf#QRmwYjNrcB{cVE
zG`4zfa0-~A!qn=K@KV<)EPb|{YLk&gx>AlqnGp$1MRM(Rytgk@)AZWyblqz%yp!o|
zLm{1a{=NTm6%x0rQ=(8O%J|3AN~5Jgb}M}tsz`
z?LG@+{)Mn)b5s+H+vk&oW$$MLJi#t{NK_C)2Siw*JKW5RFE!To#T)%Jm;GE{RV5N@
zWe8{-6**b3YxH*zW<`YUuf$ZIY8?4^@Ce5=bliA-o-CT?DG8Xq$t%$(Z$SzOr{
zYiYJ=apuQ;5l0(!`Eh^^NmTiWmgM%4AJt!J>zMY~OH4h6LIsmf=pFf8^?n#z4GoC<
zu6!Dkf=R>>Dy(x0HqnE0izEAGnqQIr$zvnjX%}VF8?h0v*vN1f4ePg~bTTN4PER(Y
zf!17|AC0XIjheza{De|)_RV0MWO%zIxs4Yb_1#bPC5!R*NBp1aI2ES
ziS+;S@m*jb6tomQ_xF>vh(UluLDA2Mt5wSB}L6Sj4KDXDFJmgWhkr2
z
zJ~#C@hB~!z+-jzBWW&eKsPGyS&fi!SI~BB4`UZU{TySJ9
z%;e+2ck4{RNWtxV*_s|&CIEQfRF7o}dcZ-v65;#qy+)4)QC~Ip_osI6m+o;pSl<94
zA#Z@KX*Xwdk2TqDkswcURgJ8NwX$dX%LMLDOoIGt5;MTx8_&?7#J
zlR&QzCK=k(tFbvqQcMGoe=8NI&&(9Rhm1LdEZ1h0z@n)RQ_S4avbf)$u5qi#w@b7M
zFW&=SwilV_zpGt?k{6ATev6U~Dw(oD@>E?I+BnmV6=;y2d>xULPtB^eo=}D&WVa2B
z)?{V#1R8s0I^x)kj0E01``*uED=dGF#3>`x8ewpaY*m+Sh3BDlSgBAR
z2e9G**aba!AH#(^HTywj5XTmLEXr0fLwRSeDZj&Uj}-_>@=2r!!~<@o5264XEiml4
z1^s!9wZ4xee$rCoj75(3jx*DZaV7NSs5C?^O6Dx9+zjqD`pA0z28gP;kymE)T7{^i
zGzXI)y?}empBaqwT$!(i<>M4U$VQTm4GcM3;Ac+n=SHBAyq8JUL82oJDk!mmZ;%N+
z5W|rFsE6DEAtlKN}T}Uf;Em;1QS%(olLzt0}v$%ZsvMZcsX~j`$
zwy0e@Q~fy_`ov=z|e|WR$jvMn(GhPNfB(L!Nph5ngi_ff^y(+2w55>oulIU%X{W
zb*w?j%$yv@@hmp~QS*qLw7D$8-Z6K^ERx+chh<7=L0ERD6@fg*xwQN$Ilr)~@sF>#
z_3aPyw)6*I@<8(s{8NInbTg~_I41z#j
zm-FONTJ3B_EuR#1mJNZO_9r`W))Z+UgC3E+EOSlsbpq)-
zrNv=$vm?Qf!mv>NaM%h0YfC3w!NiZ>!u0BsOrt7PMNU=N2VyheQ#y|uWoZ&zhVd{b
zOFJ{D!&HJ$6XKnLu-lr{*;qy{WL2IORDLBZw2EP%>A{oS93~GJ4-2%M!Rjd18^QEv
zF;;%MgVnBu9LdDM%1<)lABUW%pJ%7SA7sTsGIR(=V=647|>qA6Oj8d~?%tnV*u
zhgxK?S<;X9O5=-@c3p`J_DQQ6G7^n2(urO#Um0~&4b@48iQk7IgiLefq5`rhyNL@CgSY{dq8GNE71R!r1*)Xvtns_C$KUd=R`(k>D
zmgtk?)K1lrYJFMBm~mh+?)lO%Fin!kNZLCuz6mpzjo#ecY=Ox+!8L>gI36(rU*~!M
z#xmP=@JeqZP$^hAF)M=v>)e!f){;tg?N)>Y%OjHmp^)yeA~x@>^>}7@A+itSzB1s
zx}>`E(>x{_z2@x{=Pd&*(9O~^5gFi*C*---%(oeDQ&*9gh_^Z%2au;MI0*=ViOJX
zbAHhpp(mD+JkR=R6d9`cK2Ztb_l(fAXH#=5#B;5R>kPFlr(67a*lB0vRTGbECec_N
zifJ>I=SCZI&8r$chH?t~JlOWkr7q)}XkBB)@`F>3pks~oYtQCYut4@`UhcaYaTVP1~$K7*wNReDQJ=7|^TN2%}J!e97VYArH~;&IG92~5C*^h-NkSXB7;oN$q>)_1?v00Sx_RB2Mk@%ENpUQ{pxr`lMk8Rv$iaW(gr4-
z3Ymn|-v_Eo;MY9&};0t}DHN5)K6{8{;`vrio~r!2lI&jo0x!RCv*2(7gv&IvHLdh=
zKTaS)qzO({*C&S``$FdaVI@E#!3+&VT;yn6$cmF$4V^sF6~bW4(uWz8l+
zV+>{)ac!0+l=flfl|?v8fib^(c1I{sAhJb>`y@s6b}}vK
zB=hfA;`&rmX$0}?86|GdA#Xb$X;^23RvV@nx%eMTV|#i)!Jsxj22yJRcr^?O4&5cM%JBmX`H5V}b|fm@L&pOmdXVl7gu=O^&p;%C?5DpsrcyMB+g
zGIGqHd201=)-hu3$x~HTkmjwTNA6*MH^pB+i;DaUJ|Zs4h#NEBIESVEq}Ww)?E!
z_!whD{4yb&Wkm|B%!WwYUN`Hd^t?jjnpi_BINeByLFl>2TZ0?`e(yI+F<3AoqzGfl~I+$y=*-=?#FX%ksrYXV1Wx+dk0mfkcz9c6>n9Fj+`_
ztGo#knz+(ZMSgFU?OVmIGWsE0A<#+AB}BVf(cws|^LJt(I1oWh#4^Y=ULUb$8~yLR
z81!|47i1;0+KuAQZPHaZs(;2-qhG(^$PD+_)HqR@4D8HLwt35g(ser2^fgXF8zk8l
zoxgr?pnN$-q4qryqPakkyQj=9xb}IBOtmdRBeHW;;biPy+WSczFOo+}`va%6#(rJ5
zn%S`!-DiJ1ACys&FKBO>fd&AQ;z@DTR+&qWmc6
z?_y2A723_X{vdsO%`muV&9Qqz1Uf<7_Mt}Q9-i47TyebLs#COar-UF>vl0R
zf_i4|>iD)ieNo^rP5RZBGg#tI-}~nS^N0$etG@GzPhwp3kS2;7y4OYnECcAQr7#+c
z{pw-BXWkeRR;4@0@OSPB`s)Xs!*@yb(6h6|;gC-}`lcY%MfVKdGgO#_lb|%7R(|@!e392UfPsl?wULHfXF8Ru_|4F`|758Ba9_p3tp1
z;c&gDcan>g<5YnQYEZ0bUxU|$(({v^B9|I{DUcH?5b~GcK5&0-7nnNUS~N=$Hy%X&
z24D=5l9h79LYA)pHynAA@J%n~XtKz$anAoDDVUz?2GEwXQOnxX>T
z3`Q|bKcboa!-`E^J&2W>*o^fO-AFq8G7A*pmjz4ec{p%HDptUTMDAFLL6k#@<32)w
zfzs#HsCDFcPRi}VwxTQ{Hkldfdnh2rv(`bn;pk1+`GliG4n5_Mvc16E&;6IR`h<6Y
zx$Sv+RKc514Q${8NUCRrTSK{(LYPBSUws(*k!TxGR6<6gs4;wh^}^%6+aCqmk&VF>Z+snQ)o5W0qD%_v_8Py2W^-gA3t$Y$jQTZ;@hRYcBII
zTt*d@5avwHL#n`8N|)GUc$Ww56dPV_DU{xII5X$ycz;cjOp8xV!*za+@Np~=o?7Dc
zj8y>U*LMFtZ%uxC?9I+Wp-@^v=JONk{onw`IZr`}B<<8~*)q2l1Lkp&>x_TG9d0%7
zy(N%`zn0BdkY8Wv5e5Xz>SkLw>~-Sf`0Xx3B9y2s8R0plnGU-y@>K(i+6b$(3u2(9
zLWm*80FI=!*XDD&KG<5~B@(m6Fl7lfhYSs*Qvw=i4w`eAQU)t#eD->_E>>+)&%*$L
z`qH0`-CQTAoyZ}v`vq0*ygd$;v%faW5i#t@0?1brZIo}WY37u_&J6odokZw1@U8b1
zXSU=B9IA-NOw$8g3H{$?9P?Xlg5|}jw28_rhCR5Z>`4F6lrC6yJDSwsu-N1Io;IJ7
zW|K%I^u_U#Rxr<@oVwD~)+}d)(l=T0KA`B>ZpNQ2DKx|-i8^Neh$LOffkMwFp
zUfCMOlCW6%Obtt>^r8Nq&y3N$f7WGO>r9PPXJnU^WC7W?Cy@u4QBjpv21UqCF4h%%
zi>8`s<6bQCM&-h-$oe+GY
zr%&x_tm>H%Ap=zK=6rTAYCAHWDy7
zO&DzT{&SY>b7jum7ku&;u1EDrJ#;)bQW3nD3YO7zTlO1i@)Waws6NW{G}r<+!_4!=
zi5e7N*2vZml5kwtFvN!$I$aV4mI(iVd*IA&6~$$tN@Z_=#b(O}5qPITbrk_w!si%U
zMK_t7ue8fVn@iH|+#^_H!Nt6iV5RoD&+QFd1_^Y}^kXo>$`y5bpS$if!zC-$$`s^=
z{Cm4)IA_U_ufLs3*tO0J1PqJ6tDSA*@agqCb%_I2qH_h`0NrkzD{x=#4k7h>6{BjP
z^Sfd3ZBJ~iVBqS8n$Err$?eftb#f)VFtGoxbgu)Ay*XX96X2${r@P}rcP|ugRsVWPrR1E`04q{zztGJ2C-B2n1SvuG8|JKKuhC`vZVSJ<#iHKtf
zgAp^P#WIq0Le@ALBFm%`$~xAvjAR*0Ic6A>H4(<%jK)brQ4D4%Tej?y=`e<5o3SMC
zoGxmEZ~oe35Gbm
zL?r%UTNh0x=(rl`o17<;8U>2arv_rMIXu(kTxzG
zVvW9;6M@(>w2mJK~gx((JfKgr&uGaN
ztsqZ`f@ge%&i0t?$o}=!Tikt83NF+YcC7+xP_ZNxaYI*g64g^;eI|SeK0|EI+5I*=
z-2^EV#xv%u^*oHB<0OOn?Dn0>Lhma{!h3hClCel@X}Y)4LtcW24mI>e_4si^87&Tb
ziUDdS8;*-1$7<%+<|VSE9^YKae*^*5GP)pBXs5S=1+JHeS4y%D?|n$B&h$zb%hc-(
zm9TK><`+%Z!gT3?sd>OR8Zn>E(VCqw_fVfi#dL@wHJ8y5^JOF^CXble9mt3HQIAQv
z=GkH%8w1Tn#G4(Gv0CBL04<@hM5tAr@{?TONflHBW!Z1&wpH_Tt{78EW_7ft`2gSz
zS&RSBieWiSm~sZh&Zd0fTu^c_j$%7aKd5gH5t=_@%IQN7GMSrrJkf3K+(1!ZTk6(t
zUK;?RTEDW2l8{F#zSjKV&t)zxv|Mk=F3
zjj~d}da$CG!R6{?wVM{d_lWigE&Dt0W2grJdTp;@Czjm+Bld_~qS1IJ9lFqMe};AXO1EZS*o%RS-}inSpF%tqb2scvL+rm$}N&nyze=%t1f
zYnR}*bomv`UV_(^aqrN(PdskKT*993AKf~3_>c6oJ##>GW!ffpsKJ^y7l40rkzp2p
z>_yL1d~EI57D`Lr{aV&w5WjG(NY(VCI>q5YGK^i>&~&rjA|&?MvL%Hah_Ad;x`GIx
zaXGKWX7i^~{7xqGtNieLx=je}xH!hezrXF$SRvL6Ud;@(Ey>iv6yD9ZtIC@Xyst`%
zJP$8C>63|(Je=!b&1FUyFZ<`Ir58<`A6YBBzcUyXIB_Kf>7yuA6862n@k_i(^+)Eq
zx?otx+61K_O;EJeI`tX9sq(z$>t4n
z!unZKm?;G~k7RL1D&7J40u~y~gW=f;YEyW=ZZ2@^0ATtSbm1;cmzt>cp*1-y%JU(Y
zQW4f05FAtox%_@fns@(u`~BDbXIakF?lWoOsqBoM_wQM^9!`X~s?c;zD;0}vYVvhO
zOWOTkCtalFaRNv9s@n{0oy;VRu7Qj(i*WsFsKA(aid1XcT?FG>ubE1d3P4JZj|z+@
zg}?Gl9q;TTQfhV*l2C(A0zpQ5Y2@6T)&2>5Dy5%=_z0Sus>eCSN7(Co&x3x{YUq$3
zbVOM;wt~3C@W4u0)ztYmNHRP!66v%}@6+7A9;)P3sNg^4$Czdz9U^)Susf-;qS|X@49@X$wHdn
z?!|V*btS*g5#54wfF$%0b5yWod2@(qi5E7asyd)l9e;6|=Wj!Y(!kIEtIVjf_G+>#
zzl>n?NmVu8daXI|Yz6|k#C>LrK9n9bbbn|C|A$HLPAi9BC*rGymma@7D{ec+PcX1{v%C8er>1S9454!4
z#J2+g#EdWfxnW%wS7DY@RRC5E^NLgVm=mSWf#D;cD{KLe7q;$>@vmqnQ_4)7!C3;Sm?pplP{4L20db
zVQ~s}x#Y2FXT3va4V6E^XA#l!YSEcTWF6EX5v?5SWBQRu`^DDIb}fjW-~ycx05bGFcG;
zhmq79VS3?g#NzH1eY@8k+vN|v3G&xC6;8hN$JE>A5|01g(^BR(@W)8mbn*Fb7QbDF
zgO(sIl2{i7L|i4(1qsvD%ns2KiMqWcimv&DGwDZf#juZ~ET*3~rRx`^mN+hndbz~9
z({i0pms3xK0=^%;Y1z2CAqg=}gUC?C$$B1z#co1;TpW~b0u}-}OCJENq{-=8*#P>q
z{(_{ol}+_IE>5(PWI88I1a$CdJ$DV8o@+VLt8XROueypH2hZc|08UwFz_S8F%DG6|
zm&Eu(m-VJc3wPYFsTcopDO+xPB8tg~bGx(8N62?WTAuIZOE6sb$H!*D0?ou|Ss|gz
zvlP<(KEjDUvz7jrHJElhMY{1x!a#KNeob1O7eq@^ETvbA1>
zB-ATf$^|X_C<$_E)g;EoRb%Zw>`Ck@ejy9WbagNKn>*srF-1=-)(w)cW39j3zUsqr
zdj_IWwX>fhl)<|@HjNQGMYDAu8la2xMMODEN}ssrDQ&`K!tck;PEg-?5K!grJI?Ix
zz3*ts0f0ObBn_fI_IxZUhE~U^+r041#E$U_E9gfg5SRa-gzjGu9bZy>EvyaPxB4ME
zd{2ik+^kbQ87}+u5o7Dh!wXfv#_LQ=vpadtz+fgPC0+b-BT>ZUCzMnr3Uu4LN;2--
z^!$55FLpc{=L7~t2*6__2&m|2rxb=dJAax!4$(!%Qn;39xz}yeRBz~Q*7swrITd=;*Z4*d9
zbfWA2vzKr_cbcsp2taA+C$SdwjdW!1@fYe}85NhSz%Befe
zVjb@uJ-@!m29A+UR}9Q4Lja8{hCP3DO;L6^yNz|1`82?|D*|~Ekg#H7(
CEBHE
z^voYUbyuxbYt^dSyY8(zRp->cEG*(C66{y#R%!
zgOeSLxrvL3Aceh&orN%!rGo<%8ZsKPsfiOBGRyyNW00+d^Lz9Eg3|DGv=E@MbG3B=
zIhr`Ru-Sn;EXD6Uy#D`
z9pt}reJ`=Pc)0v8h%Oc$E^LmrCLsI&^lkQk4&3?wFN&>$yM>c8tF@!m{{jTEGqJK@
zvv#zw`X2`EWMc1ZY2m~oWpCzS4zjlrpfCm5zYq66T;7)6HUXG&(z4P37#J7;@cjY2
ztpX$gi16?T@E;Ko5D<`%5Rp-F&`?oOPzkX=Vc?Jwk&}@Uk&sZ(u+mXbF;kO}(DO1d
zvvY8BbCc8Y3-fUbv2t;9{-+ZdBqStM6jTB*9PIx=0_Fo2EG0GvocJeID$b84`8d=Pf#CSMw-o>?EX+G~
zSS)}j;O>#WAOQJ)$`vh-KTFcT-)XmC^K5^F3mypNQdA@Rvqx;HOw=M8jBG@&S;=
zOYiGv^&)n!U;2zw$DJwq{vq;R^Pe545&FCg_M|UeW#A3u+nv4Ad|#Ns3AAd1eFLa|
zLb}gU{-fb|KXC)cVmn<1xsKY|&&mDi+j)K)2_|m5WiN5k`+AQtMU@14G|b7Fc}e(!
z2zjOXfoHPhjhuAiO{z{XQT|tPYQ+L@1N&0ZZD}E58?$ytb8$ac*%HT*b6+D3iz)js
zmq|#~IZEG>IAUzM;?p%i?Z!7DUTQ$Bui0#q%8T{EVl{r!2|U$h2*QL-92O~P$ib)+
zC{Hi38W8l1LPs>X2tLxs^^)$6X36Ps+0r9kCRB2ZI-TSb{yyj9=~>AAd3(a1%1PWL
ziT}E4sJQA8ukuSGlZE72i`!XFZrIMgmXO5x8c5vz!>bp7V}!qNYDY4u0GXj-x>`uq
z!Vw3khhQ=dArC7VIid=YMlH=ppjgbdgAL${sIzkhf8RYRaS`s%3ckWQqFbsVmwt_y
zT=pp7{O~P5ykn%o?G4Z*8lkfnZ5}>99io{8C8_{jQ){?O;b^7ds7e9;zca8&(IoIY
zi|jQ>=AUSnnF|tL6R9Z^g(@Jy;d1}y!-C1?H%w)=3;O4OsRbOHWJ}j)GX;#g`ky$x
zcb?|{jGgNv=Ed`p>B*2JUKZ_l5JkBamyT{$D?%GRi52GjP&r1U`$h=Q<~ARFDrL6p
z)K8qp?bkS2_35JaBZ3WPX%@I2@|>A&99}GLJ
zJThZ+>{d-AtS76lr4N$1_cR{#gkq!1Lbha*e%KRI#H3G1`3fy+ox=kRr088NDLx2b
zdYea3hT{;7nSuHQrI>U2T!1P&c{_Or@~*%eBx{F{v9U@op^Dv7!Vps*5iKVG_#ij
z`_l4k*2M=WAJpak7CG;&1M1YTAv%AkIt1faX=AM8D*x1bF?y6rCu+1rcx#}!BZ#4+
z)Ry@9yz+$2Q7mj;4xL1G7>UR326jE6#+33LcC^0%HtNY(dOknN*Zn|^EOxj36a+5@
z8QE)L*3{?4$)!q3apggK{`w>CWy#IB?8eq*%0#in{xyaCat>?o9}+%X14;INdHHl!
z6leJzF5L?e5Ctd^e>OG8)lZ
zJQ6s)v2-n`-N(ma>xCY(7VO8~4N&uKpMj8e%zLib>iAs&@P1FzMJu})c~5{zq_3u@<^PinQa;6AmvJ2
zmvuF4ZK?xBjS-GE&V!PUfk*a(L^__hw#9l)H*xV-
zrNX>at-dUObP8}$6r~;$DATvHf*KA2-URN@T!H!ECfX
z!FzdCWb0%K7Y@wq!ANP~gwE)j-pAM_Fuhype~^DyVn0+US!7+}NYUzg<)0t;
z^!H4O2`xGg7nx&HyqYz!+_#2}(X_yotjEJ^-b8Q~x7JLKzMza=RSF02e`iT|XVUDd
z7VIndi3QE#>C2rbM;mnb*bCLIq$FF4
z(x5x4{QPtF3$M1>Vd-s!y9j!BGwLl-iN*&vrPAAx>iil53j(j;N0sd~C#!7v+f^nL
zM-C1EHuXn>{aI3L(Vg>kJw*%8J=4(c5Bv>>a_qpk&7cw8QUp^AOoGK?%k
zDfz7A*WY9
zDo`WDR>Qf=R<-&E`UZFf8SZ74NtX9nIWuxU1yg@*gN@oD*ej=*smoW)j1^%h;Y2W~
zqa&`Y{lY#-s6sB$U(bH;|1E{Sm{ad(TwG?zY>rnH_|JU)Ru9(4{o}7*r*8mjdu-Ex
zGdzRz`RQ{X_-N*JdAxO2k@b`W^5}2^zH9&bhFHrwpK5v1{02ZgTH6t>STFryS2JIl
zb9)6cg|mJ}_0G!B#9N02F?~+_rqPF05#{0ri>uiwzb^~zS1p39h0Ev8WcF>bV1LT3
z^DJG^C47Is+ukVhcH$qK8dU-bMxp^zbWiF+E>)T|OX0OQOrZ=8rG_KDS50E%1{#0Z
z!Z+LG)3`^mzuJw-$6)N}DdLzSWiBW$sSC|YAXRdVWn(mE9`K+EFzf|Z?^9#a3uPZdI~qK9
z2Z{lqUNioG0>m+gqT
zOo>xuP1lS3qvQgB(bCs{h133B)(tr~sT3^bZ-C?;bv;enJdr%VWD=t>^J|MYz{LlY
zbRnTsyoWaciooxCgE$1~+rFb?n=T&drefw-Q;KYNXppC{%#I!d7H#xSyrlGICBr}Q
z&4?>uCXF}1_+#{BtN?c<+^+G_$P_GWjR&{+!f?or{Pe+Apo;i*H$LI8=P@I(o0GeDQgW&Y1`mcPaif$
zq>$O}QLeS7l?&BEDd0iPP+tsqLxK7#49Y&1FSAZt?pH96Ff6(nmPX*;=c|qLM}Fm^
zjZLBbj59uxC5@AK*B-UMS}e}$G;Ln}efs<1FlK`Y=ZhCu>(u3iaaEJ|k~%XgWAwg=VH&bMtFf(7
zPNx2R-s}8lC-^>4j|F~8Jq4xhOdanoJg$BWb38FIFz2-?KGCWnvsWke*das1F`TP-
zhNRwr4uLGal6^H(r?Ycc5*yts$VSx0+x6Bmnj(mAek4$}KK3=SB{0|T=5F8-+Cl~W
zHblc&gY%WjHpcTrzh;v8l{m|w@ZX=kBqQh{dhg2+;j`#QMq&UWMI~zRk({NmRl9xX
z&gF+xI+;YA*%JL3=~b@N{o4}43L
zb;5yDu5B#q`5=m?Q5y?bKUhyW_G_f(A2)qL1c1JvHGUA>kP~1TfODi&-^a~dJZ)w-
zCXmB471+#J!t{+haBf7&FS#v8t(>MPDnLJ1Pi)96ilj_r4LL@2(`wh_!E#o^tQ(E*
zJad(MvHL4)DNe>FV+r1fN=C$XX82LX1AjW01fFVU<#3Z8<}LES`5
zTReZh-rM9Jk_#Z!c*h9-F-fOpXTJkKWcb3`H-|kIpt-A7;HJGwCrN5e`&`
zj%$?SMTZRnLX8cFp3uFtvyK*CWulnRIG)?qp
zog$nI>}0n`$RtV^*~XqQ(e~J(E%%=v
zX4n-_2laolBx*zDc4Ui@yZ+@rl|++o1S@s?mB{=atx*A$;kX^kwTf
z*JMo+YGe$nZDx-dO(iSxrFx#~Mh5FZk*mpN$S=~5YAD&lnS5(ftV#(&29uoQ3^Mt}
zajRCCZvaJ|2}!^pR;(0xvAm`sN!1azW!nU92|7269B+=HP|FpyDpl02u)o7_u6B;N
zGigtlStruP&~vk~SFQg-7ZT7Iksl$ySZUZgwoz4zBT&PYkb`JgplbbzXC_6HMQ7){B&7Eybtds!I-rk?U%gFxv1PhxS8_7n{$_Y~8eML@@CQ>yFm^
zJat?3NttSRV(hwJi&JRj->_tw-bqi9&2vBc&Z2tW7VUJ9<^I$;AI@dgtGfFn*4e*U|Qt#fkx-h}h0Zi5ZAk`~|C~Q-@nUGlf{hH%`3LE?+)rJ1TqyOCq
zs38Qb1LSpdi;CDN@^n_(x1ehwL_5_5a6tsaVMA{ANh?2Yp=7ph0IR9B68+UsT*Xo5>5UsOmcD~!!1!feE6Vo`kZuroHes?W69Fdf>HqCG
zHD}q{nKqWFTo~W7d^@g{D&ApI+Gdk7_K^eO(Dz7v3v|=6u$QQ5Cw;jtz9BN5HXm!s
z6$D;wDb@^?OIWZWpl;GF>Cj9bz2_Sp`8y@XrC&wBOn?*pCI8-xKow$L8dYmKtmwkp
z)y-=?$S8x&pfimC@b{AOFHm%-S^c&`Y37)hP~DUq6ty`&vDD(=TFpp*xij*Vhjk3r
zf;1nuk6nz7ET@5fpKj%j^NZY{ooQS|;(YU;jc6*vW;Tbk95R+s{s6cWLVhoppI}FJ
zm|1LzUE|LCOyHWztUMiD)%XiMtpsq5ay%LIwTIgG2wbzFZ}>LI#?rCjU#=d^UJiMl
zocwqL3_;m(IJyaT>w>%@<~*eA?d(fJ>^f-0q=`k}7qOXIWOPt)cxCe*uca78a`{BTZ1=zNDBf
z4D@N(lYdFB2Qu?Ph*71}0K=j6Kau~b?H7--P
zrwGqt?rU;71cdyNbw!V@YJXp@AojvwE6$p G|C4VX`2Pk`k2?rlhG~*9+J=
zGV*t*we||Bn1v8`b^m4E(lE!Nxp^>OEM3lPnW;8y35GG#{E7f0Es(o-q^48LCP=sI
zQHeUET<5a?&?5GJK#dU
x^Td$p1Yyh4_uq?l2MPC+1@KXH(WO
ze<62Nb29Fhv7gsG>%PD|#GYuT7%2T&?(9^$NNtQ3A2fOnu4`Q0Pv9QSB($
zFp^bGck2bbu;~25t=4a1NigiM>@&j!wZ`C9{%lX2FfqmG9C$1&;wqJ1WWxOmgUu=C
z69LUUgN3t8v^9r7o7vRHgBE`=qeaQ)j_mQmLB^bb@9{V%yp}`{HWV_Y`~bo|w|VL)
zpH@yHz(rl6RECA^kvqsTTzhDxw#K4_95NbmoRV$*cC0EZwfUvuX4U#)t!v>GPUzp(
zPI2jqlF8PT5?_4+Nva|iRPyq6RJ7%u@ITR`iCb&^6c$8z`qJYtnQX9T05P2v+OW0w
z&CAH~TsVwGzAGGireSuus49iATQ&(eNIW`GvDev4@{N~E&!4&kAL%8z+T&byV#-i8
z%(5gWiT-Z;gzDTxuyc-!wtll)1ad1n!8bSE8Scyua?qpT?8b6`$A~Hvgci6g{
z<>*&Zh!qb;!MHaEh!Ra=U{1I_z?ifsam>|;#^IL#8cYG3*HJc%UUN&5I1P;wk`up_
zQk~Z}T>$y};3BrSU7LRv`NZ)d^D}$HoPvmJri3d5*Ldwl)}wY-+DRF^s#qgt6vT5R
zP*66@!#+2iC-ih8KNh8O$av!wW#wZ
zon)qFn%nnsX8S0cGWb#ve#_!B4(uBF3McRWj<$l;f8fX(g?`2tMVWC3MR=ryL^4Nn>X;CvkOg0B6Cg1m*E3rRDx!Ciz
zu;fs{L_g){%9#3Ko+EL-`oUB+`z(*H%eu%G`R5H|F$oX*bi$LX8l6d%u?Hq0S((qu
zl#R9K+5%}AAVZz@Q2HX@HH^zACr_aa@v=i+m8u2suS@g9308h5x1EpeJ0zxAMwA-Z
zD{lbS4~`!$(H)(Sj&zSYbm1K6rI(4}oV>A>L`jHz;xjT6z05q9>bEjmmMWx=8Dhdq
z(_K+?*;tmVa>RRB8rdfiMAC;;RU01pb6pj%LhVT=z>yQAz?=xMWs4xikc-jUJ
zkL&9&ijJK<6+)QycZ*ZR8&YST-cm4pmVB+e(*Ps3Df`k>X-tnmkmBb(6vQSf)oQ3|
zo7OnP9l4xE4J4!Wb0i)1(P!D`;oi3JB5j#rnxg?V-u~O@e5pCPM5&dO4~k4a^a_g3>0~O^XBCAa1}|e
zkxhW_$RRogtkCR{d>Ic@Ig9NvWk8H6!mht6X*{X6NE#6@`pbD(Z_ir|0WAt9!N4SE44A=$8R-C{EzdiveY2B%Q{wK_TfQe|MGA?
zgjt@|)G-KRY1D0L1`3fXkK0}EIx|W$U&5CZ!~Jc|O;%qd=*}-(y(^6fJbX^f8MfCm
zha7Fu$0)&1tHKCvRhN2QLw_?Ji*>`}8Ueh7H&fy>wTRp;g4Av4B+c^jWZ+XJQO2#z
zaqczIQK23x!rrPCUpLdg9l;`7tHfMA5biS@
znUQ}(d$$YL#@nUU&K9QotEXw%XM)29qd}79
z&DyCse`}@!)@l5und8%rq^Iq?^3Q@L&WFQ=CG1Re)q}T*iu8)b(>wjs#rx
zNASZe!)!l>^wG6W>0O`DHcY=t^KHRx-dzjK+uJs-Gm5(=1@^@vcZ4%zygbzM%)ZBO
zPo)}DCYYI5-7hP;qmT3)u#Yg;$6OxfUb0&0NBnO2_AiP@Yii%FUgLEQ~78AX^~eel6_5t5J8$$W~{@AVC3J}eg+B6@7tD5
zL8i0?MgHzl&fG9;T|z(I%>~(Ke6RLvB2SNHOSLz^cNIq**O412_>^gWC-rw2mzf*;
z(oLDFOa?KmQxMGKtSB)_iwtuovzoiclt9lLU?8-)qsfMFW0y!%S9R_~g;%rhM_KOz
z!viw3Ig{?oRe+EsClJB$_NG?Kz-eA3gr=Fz78aR?5_iCnv)wf9UkE}vOk#8
zFHjB-iQz*5RSUIwy%%x|b#^`3VQA!moX*&>sWv1k&othn4ftMBA`_UU5blO}oTwf&3v}gV(>Rx|P;*uw
znkQwKQj?2$^3}XT9Ew-}3Rj)LR}=j9`^KmfRS~_6K+TVfjuUj#$|vf&iL?R5prDP(BhLc_-!K?!^?r7A4J(U$&oZ#GMQnZ(sHNnS1y!C{$Hy8H07G0XvVJmEz@$c`w|GG9a)(Uvc
zy&@k={oZbyl3MLH*fb}<|I6$y+#$@*qgIcMGwOZrET8OL9C9eXPM|J4`Z(C}biyN%
zM31G52d@TSmaBNW!z64l7BpF&zQ9?P
z?rxcPfx4^E(iDXaWRH37EL289Lik05@k0o9v{KEOyocx``8?LU_uc@r``XQ%o5|F|
z45YJ0y3x~;B!67Y&E|Z)i0Z6rm)C?G{dtfG?o$O3Z%!Gw%v9YxH?$*Ccd>-NET|if
zjl1sVJBMA0ka?+7mg*%DbciOawSXeqdA;
z13fdHuPhCzE&}J#jc$vH+p0{z`W(dPkm=7Sm-fe2({SqgAIx^MZfjL}vDky?MPL_mSqQ3=H3A`G8wriK)dr
z_y2a$fGVttclJUNVyPO0Qoaov|FyHB!gfbo4_7}e0_SGSn$pf1AZ@0QfiKF3KvXRa
zzuK%?u!ds^%yxs2rucd{&E~u{t`y;#rC5`IRh_34KOyD$o9aJXBxU+^!Ot}kOedBr
zS~?^+Ab8zJfH&4Z--FxG?c_kpSymS61R)dia4`zAa#D=R_>}`M!_$0hSsME8W6P|J29f(wlzGE$oD^*6wEmxFWZhUD(5ECI>;
zJ*<5{#&gd~_e=4Xh{67{`LSpf%ToyD74
zMSrVu#FuEH8PW*YAQ8%c*6=;Zmmd>^mjoSquW~@Pvkgit`OLT)pK_d(9l!_bZveP>
zGf`(|t_Gp&n_6DcODqT@olsn?eMrgXaSVH(Ve3?BwOe9;T~c%(qNAhdgjIsNjmT_3
zG(^ax9o2jKS==R&q|wesK~iA
zk`OkKND=^iH`%1ZfU}I>8}|`6cQqMBFyjh4#9aZ$jA+OUyEpK2gVmrf5^`ni)qk(9
zt40NVR0p84e+gn8pdm9WkB5Q*CQ@1%JU(1sJOo22ZV#qr3L6%fZ&*Yy7kWl@``I0%
z2*aNCV;&%+hZv0zcL%2h%rLX{=ks2Z!afS;tPg&MhbW2ec18ZU&CM|zCx{!;Ury{f
zT1xY4w0#=ElS1FF!^tIPi`!dMwt@C26J)yZK83+a6fSTuqh&naxU;#xm!`$`v4Wh$
zA1n)hE%2bpZEh$tdxTKTGJb}IOxZd)3C=#r_C)LVPB~D^C7gU6-qt58j0wFgpL%z;
zYP!Q6cZsEKj&EC30{2qdX%brRfwyORip2eLw}@+j)
zUw^c55Yz`EZr04Mk+>dZtbM;lLyJe%4d!JWh{EJ2%NFpSGYc%KDMvxIK1u!toV6bl
zGo$6&tEh~_2_E)!^tIuySdPZNV7L=BshyTm=gin4-V||DQ-;T*0k}ie1JGAFuTDG3y_=(Gn|D&TkNzXs<|c)
z_GFnu3DG8}V<8A7HeBRC&Scw$=CD~RLhPbEAv72%47=T>V4ecs6udAI(LtaXYg#Xa
z)b}X!@}+3fw$`Aw0aPS1UaFPr9m4ECQv{Zx{v&BH^3+*NE5>hOio|~wpC~278bh~S
zRnYxw;MX0`Wf{X|{bP}d16@={nbrD$o6tf*{C&^{5)oef3LQoCm_V#tit@s6tfk$i
zl%V{VwO8&!^(Q_VtTL9l4<7K@UDfrdP0&o>ySX?z(S6ZZs_QVO=tvtugr%_K=Na4m
zUex|)W3k`+1pDG<{OgYZ-JP)PET^{h*g-8LXo?dooAf;*X>Rus}X
zr{DWOS5{+pb&3^gMH&BiSZOrZ%WkC&Vcb0YW(Qt>?huW>)XNw=%5cvCNqC1dNb^^3-c#xBn~y%M=?7c10XPmd13i96aBeC*MJ?
zb)~BvfraVsTr$p55-bD$o=8aiC6NbZ{Ba&+vQ;;W8#E9qveywS-jeR@f-=4cHkH}*
zQU}`MacV$QNR|B`32GzyM+cor#2|?KkHWDn2Znq;9wyP~3374GcIbG9#W18@OuNql
z8Glz03Hx$JtV4CLVHA5p*!4+i!aq6yP}Ogn#(?}uc{IWHL?dm
z0t*%q@(r6C2s(tNP1y*~n|n`|KqXJA5lkI|)o^o+hpqF6Rcr7ezL$r=lL8
z&SUsq=N1(%oLD+B4G*S)=VFv09x;pROK*Uc8a)}`8pAQ!glo=vH&eIUzLV7>1GVMd
zQ3zF!=?V5NA`g>IGqx;~2r14c$wjP>InlLl4GCYw7_F3)srD)M(k4c&-k9#anPxcN
znMQNa!ZIRO3C?KL_0G?ojV$>O%|#9@M6wp*O{(38P$$_b>YjaFB;k_KKD=v)m%4%V
z$n2q;_da$IC*ml;IKXq~wwktULt+@o!jgX+9b=}hnd|R(WfeZAf2cXN*R!~?57y#L
zat^hYm&&aVJ*q+BVVe&(xB+Jm`hAOh5`kX4(J{EUDbXlTQv=s`>t#X
zlY&Xa5Gt&53o+4K?Gi`!%`m?r{gcZ^xYH)erZ;RYV6l6+AQ1z9`|xzi)xb}9G|e7DP#E3OF_vUCr%uYOy1E>W(4&OIefGZoS#>ayI~M+3$nhi
zxLjJN@aI@+V08TUiP6{u55uFQ;hbyY(9uL^?brX`uFd+#}NG=Tc5xxYWTd%t*(+s^t12o8P&
zY)!d3p}Viic8LUfkgIAGv;uiB*c-vX>NaZsf3{HLODR_W?e?t6X&KI8VnMNCQ3@_q
z!<9@P`0o+G7l27_`j8SwvV(NXv46QW)ssrfRx(ympP*nCKv4^|i^SY(#v?u7JUltk
z2?3@dF~|D_?OTLzC;NM7DU&K85o#hdhEGSGBSx0g{3^;hxy9+Ek|Rn4qCgM-EKUNw
zKA2!=ORK`>AW1g$NB*r;lr}wG^zJfd6S7>JRR9Yo+f6ZZMoMFUf4au4B;PL9CcJ!i
zeA!-Pp8u|N4oF@!toB(HZ&1mU4v?ql!qCQ=ZY)Cs_2g@bq`a$FKzc&yimSV=5VS@s
z>nHH&Gt&{rZbSs|=Go_d4qIXAYXnXyq1G^iOGJyhYzsUOt@BdO8=zP$l~*r&?cARg
z2f!}q&ifc9+@aYAE?sqK#>b*;5i^u`;+ph59CKe@B}qDo5LtDHo9@CPMr`K}>P)Od>r1Bua0R|PEP|r8OgdTkH
z0_wW$0TuNQ6-Uo-8({_7KALrThP(@D<*o(GzB21DqNfWp5^@%m?Ot|<(JU@INX-_=-5vO^x;3n}HE(zy7NUe!l*;Lacj}i=}nx_*$-ytmy
zo0Am*SuF?+(GP!rmW~4xij{+#pL6?>vNuIZ@J)
zP93Teh#DW~1ccqzq|U-Jawe^^-oE^y|nU;50Z$&a}!P0iqX)zr)GWsU^~D;}^EX!Ra$M@N3B@wQFwo!=B_RNL!^oP6HNnI)f&IAxx6cRDQ?yv0
z9H(ZomQ?G@a{9DAi*fgt`u-`B1V+-HIq^-H*(~&?rX~wa&T+0mB*5{o8RRo=C!
zuDxekD}hQOGXl6{c7IB*jXc~k@D;@)og<*$$sbGo!30+^eU!$_Av8bSA^<|5y1Osv
zs7$Je)6(nJwO8%TkuhNwLf@J!+h-fYe_POQLQB6w1LENs8f&STIoQ*o0uk!gO{-X>
zJ;JQb`f7@%5HgjO^aFy1JsBP=&tHRPtsw=^`@Ya3qgA<*(_T=
zrb8!RbjG#aL`sE3pr_kzdTcqj{FqU{3w=iMcBqtH}_@Kok{x#cy+2JA}?h>*+V`!@2$
z6j7SOjL%?kUX|WblX?7w`cdjTx9}H!mKuxn!Z;jr4+0Yi;TZWhJwLWzQ6w3kXp4Se
zhy8{}XLmMSTa`hk=VXXu{Q~uQzbq&g$_0kZYZf#*uzqzoqRCsG+5=e@M`{BTPlZf^
z>+S*(F%PUvWB$>ToAQLM0ekcCzME+OCP#C(TW8tTX7#qvNrn^>l9sXVauBWbQXftL
zL4*lTW#=dRANxY)exb!cBf)eHL|o)3T*;2C*K3Au7L_djhP2Ebl{8C|;3dsQLSqbO
z8F6ivMwGT92DHY9C6aQn>e%vOt^>98gBAf>puLF)wcBb!)~Bm|9<~TYf9cA9McNKV
z-E;kmiYdUssEP`2jy{nadx(698jWtCa0`oYqyl4J*UXMkfIvjE5cf&4>g_~o;7P{c
zuf%mJrqT%FS<_0~9)n)C-qNs62rbr3({gb?7DxB=fP#Uoz6_)w0(dnH2@c&+Ob9jQ
zVJU8&vz+UyIQYAfW&EZDibRwc_1sPkLzCJ(tUpFvK1?7S?BATEM6LA723*?aL;@xp
zWx^XJH0lf7D%FGYP6z&d3Ltcod>pqtLq0J}e;6cEqvtE|-Qs8G!U|T4`MZ9PwIX8F
zk9l(CaK>Krd$`ruF>RM1_@z#pIp(QIU&V~=r+Yl_N78cyk^6F6Zkz;e_iVH1w2C^o
z-B8t>;3nQ_v(~!$wv_GfRCRxY4(xxQx5tODLHyF_)|@4NbWpSj*R9uNTA3csla|Nr6F#V8S>n
z;^j%X;6>Ob#?Bx`sx|r2^|kO_YL|aybtF!jDzWYSLa5G*pUe4Hpb-6OsJ7dT-qs}Y@rSzOa!=!m_mS~oO7^tlcN2RR>$vz07w9Wn22SdOPoGp^)~w7IWg$#
zJTKTvXr&9qjoYNNU_}3nty;fs-hmnJuc>i@G8x2)pKSA%2c`3Lu<>iGf;L#PH7alY
z;6V9ultS%$!m8#xMb4fwyWraAQ8Lxmc#VjT5rvb{dugvHb-V~3DeVuO(i;1xeJ#9c^7_u)J>#}plGp7bWCZn$
zoRzU{dHTYDA)2(SFK4jC9X|KZ2j=1BLRY=#3&UyJLQZvYI18!p05PGzYO*}?IxML))5rS#{v>3*0e*B%^}lPvXA?=0
z4$c;XIOKh_9b4SoXfabao;FR!;seC*5F#3?zxOfIw$CJq3)Jkzh+tcgiW~jdDgHbc
zl@S{1^3?G|qpLM8?jU)LzL)QYnmnMQdA3Bzo3>tKg|MoK#EKE^OYm5VIq-yT%@K#|
zJ-m}ts2r;boL7TlMfn)K&X=5@bQd~T>q~(hQGu&}3GM^-XLo@qV=aX<6tQE0)NcUB
zKq*-%S1e@ta!CD=2MOQQLbfK092@7{FOvMJ*)9NW85^~%9jz``3rL6rD@MHh5M>~e
zVd@dh>>pN4%F02E)c9tMr|3rF;g=bp2)`^uQqSFsvPPfq4lr9*
zMG>M-uQr3nOxQ+E)m|~p!`LW`qdEWw{@P(Cg7pK;bhP$E$~Wm~q?wb_7qOyoNKpK!ZtHGEI;
z>cd~lCal$8U+EG01t(Y{~q|R}!q1Z?0)(mA_68c~hN)>(=wF_ZDR|
zXA2yvh(}M+16&CG-enwfTdsm-MJcoi$}EQ6xTfq#|Im~!Sa#bR)!?w$U($pZ9GeYT`%s6jwR7@A+&*o$r;^G9IyOl}P?|q|m)aOTf)grHK
z4PuE{EWM_N#gqC_KaXd|DBeHoGA^~I#wpXXOG>hUtlN`_gN(??3M+#`5%D~D&P
z4->_eKA8XZBz~o`NOdfej1#vFmT+kUGCQZ{eDAvc>A}FBmXxQqz>}tqm57`53EmHD
zF8)Bv{wDH7cH4UtE?=7Kg}A1E0akm3Dnq4WII`0@zOAUdH428oEb3{s|uXY=#!>_?JG;yvwNU-hOVz`
zjreFiK!TMUt!vK0y7iZ@k8Hl8_53y2r9QMijL^{BQoJ#R6odR4q_KgHX^4`|3LTWR
z#~Sf4a_%GV!XAD(X2>5-&Tq~D8cJ^iWBikPKaLU<8_^))o+MXUX6WfHpD_6FD!$}o_36WWNpR+VzWM!xUmjFT28;JJ+eOiU35
zS-t<9CHq{FefI^Q{DtdLeL@c%&y`dJ@1>k&WZj1SMw&d?>>sMPGCd8pz|9czTv37s
z#g{d*^@Btlmo*IWA%+g;1c61uKag%Xvs*=RS*TL!8(^WyvR(wuOvjNt@d+UJ(oc|-820tjIeTft={L(JIyf3^0iV0xk104
zE*Z`lGUV%T=MuIpa{~TD;_qr_n^=5${SIB?0F|g5!8bsc>*g}tm%GE&y1nudHSqb}
zkodL-wpI{uWkXG8-
z2T>735QR%8KoAnLDqsMqp-2^00t6`mSBlh7l@dfsD9VyRh}30OAaoN9D+Ux4LJ1&E
znsh|sQUW3^p@`f#cjn%go%`_3{9n$?nK|FX_dnlH+77%=80aZYNj)!a<@k{yE;ioO~cFu*Cv
z8A5T29~5aRVxrwCND0|9-e~b&?}VbDtl;&Q_4N4xKA^X2={?^vay>Vk?JUUE6hCz+
z-Jl|?&YIe&a3X>#^777szbFO0kZb&Ez*=kI{<=@T5Bj<&tLIyIz;^z<2HiQF#V27{
zI=npgdR_=($K09xc*DH*fh`;uIj+l`|8V<$E8_{3pEt7&dKbYJ_K?0$M7^M(z!@_I=Djg
zXSe3F^O*C5#Qk5?0ySZ_qU7^Cd_dh1`##q}-P4b6;Z91=`0@5;8$6u2+S*!1gMO#S
zirCa5N}C&PvT8tKJ7pi0m|hju3+%fXsa<&<=iPLkQ-6h}6kklfP04>y
znem1fRe0r=aJ^cEGF46?^9T_19)AV9Cou6I7Fy*mi?E2)#D7#t|NEdXg?0(huikI4
z;)0QrB}T(DKSSqwP4}e!`s{tqZAu(2&=r289I98oA|82DTYU=MTWob9Vi-P4YRcXJ
zGBVQ$DH0?w=B;!*451Tby}F#Xy{RJaYsrEKcPdkGC@YChZ-ock1Q8Ra?}zU7=Y%nu
z?GNMwRgAYBmO@WeFKjG`W{W>^Un_VB0o5?NAk!G+8~#EUqmi}Z?BfSL$yHfi86sIa
z9buy8&fUDi85-CwO)xDV_*yOYqZvlM1LhXynVE8vbuwK5Z~&s
zsW&{E&EjIAd58qlW0IC@+%`aSSR4szS*!Rs&u>ZzT~A&0AHHqbw3;WvRFGUBt8O|1
zctbW4dRnl{_LC;;L6KilKd~<>*c(Q(kTdt|+Cl{uPMEO!F+)t|Hi1BL-MBdTq`x(7
z=U-l10D&6+((>Zahf01{yb;eNuP!z_Hs_ROe>i=v6mDXxJG^+-Mlzb!7v^KtU+}B8
zl%`r~31Bls-b>G@Dn-TJ{MTOLUV+sBdtNN<2+$KQct)x$^u_VENu%130Uwi$z3
zS}62OFhsUId!K=4CS#e3BqDG-MJ5h|9N%$^yoz4lk_6_U@4BlR7+ff--TghA3^912
zCceB+bX_re39}RBvNG--d;5Xg8!;2L&!#rPOVx{DM5q^pOQ61
zAf3a0B{Ekqo$7x!g;(jD{~x==uy(C+4&mKx=Z12TKJa>0m`!n(2Da!B
za?~Yw(OKUttl059dn*nz(r`5(UnS$ojM<5eqI-Ko;X#wvQc=G00>$B92O2&l7+1Y#
zZmRN!w{J{R3)A@}-AWC=hv7=gte}74tthh~Y*K(C+2ojJ!(~vij^#(N-Yf*3lc+LH;OXW7ca8uiZ$Ovtz_e*e8a*v3;nAKC
zIMnj+zQB;+T8PoR6$$SC@6FdA_x{XwqIF+Lk4R%>?!9}reCxqvsEZO^+oVGNsdaUM
zws3J%9Q_R->j#
zx!)db(a-|okRpOAq?FSZS|KU$s3;V2x3gb;*D*}Nt4JwE
z2uO!1MT#lb2u5tNpYy(miXa&C{TK;q?Fv4lF$9Ym4KaJ2%RgoT9D=_q3%TR`o-PGx
zdUFuh9^aMnE?0O5&IXb(C(O_xVr5OCCdFR3$jYj~5>qlCyfd;+jVTo(69W*FiK?~T5Kk=`
zO=wJ3^-x?;Az=r(?yXv>trcH
z>E@X)M*xT^PsTI-+AfaV9J{g*tQ_tYuj(<+Z?Rt+Pp|rtRXgiG0i8%Q{LvH|K<`m@
z+VXN4jqZ}E?Ul0_s?LWwpG6&KOm6ChJaPl3ssdHFl%y+fQscqIy+Y<`yHKSkYB8OQ
zhiAf|bj+M}?BNlBO=gOoJpM@L%1h$)l&L+V#GC}+j
z8gIkn?yKN@w@Xwr6xFm3gmPz|Bz+bhDD>JND10nAP;>onSY=2>Hg?vu1)hZSKj
z=QuZdo|AML?MxWp>q&QuhV?Bmh)Fs`l6sD!<5Bd~Re*p0w5=eBY>p@B|{?z
z&^e>KD0aoty6PeaFI+)3nHMAh+PQ5#H#O_t8@Vy-Z^SmQy9k{IFW_wf$m|Q?Ilf`V
zJQV#?Qo=DKotd$sJ+~XGPk%UJs3&fv~Cm^
zwA#+(z;^EIV4rH)84!WZ&cB<|Or)+A9BLCX+hF>MehxmKTSb44ul9Ar_N623)Qg02
zG@geh*2!DQ1TTIo4o0@9lj7p5aJD@MqWkinDEyLL-Ae&x4tPxLlgH+pdMS=Lt53JD
z`!2iw38K@kfcG+&C9l(Ro4?Vf6nbaPPA4#ESeY!7IQ+
z%WuLXcQuJ4O`26x5mJ9VWb9mfaJllwM6F3lP6yW+7|fL9WUWs(lZ1@FL&=rGK-Zn?
zWW)Y#&%Y;i;wEB%9xt;OTMO?ts#(GK24&l}7Pm;d_V3F5ukSwi+--R$Ib|0wnRzR}tQ=SOw9xUU@_Zuqh2vaeAueiyUW?+2UX^O(LLbCBL)76KNEj6@jrIi#fv}Z
K|3KY-&i@8`gAwQe
diff --git a/tracks/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg b/tracks/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg
deleted file mode 100644
index 5cf3bef3d03b6ad0c49615447b4fcf32aace32f7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 159528
zcmbUIcT`hd7e0z^2oRc~2pS|1lxU=g6vc!VK&7d46cs6gB7TSzr3wikpuV9CqJ{(%
zrKmIu@LB*t0v3XRf`SrFAOccDgv1ce%KJOxoH6cS_uh=*7;Ja4_nK?X^~`5JbFQ`F
zH72C&;^6E6Nk~XY`bzpj(Ao&J7gB)B%E`hN)8BzN!ff5`v>Q*b+qZw8p4kC+7kfABz5DFM50Ow%R8&SNqg7PUc7|IG
z?f!rMtcf7)z2_qnqQgSZT+lJW<9F-0h6SGw4~o%o4?7=xW~~iUk(El92UDr6R4m
z*~Cs}y+;syOO%>vYJRz_u6;why64AvjM>TPG&%VV8<85Dwr<02*VEs%+k6iWZ?SjZ
zeg{V|nwnewecjRdri
z=a)CM%jueV&a0n{{wTizv+Kv!1+i)WS@!>(VQK$=S@!=J_W#=T6;gyrfW?EUKm_Q0
zY3h!8N}jg}E&8{@86WK%5|pl*ph4%aL7SS)c9yK5cYbG8mWznJ<#`e7D8cyYp(Za8
z@fiEOot-RcJ9?YU9y0k)yXZnr!>-WHDU+9VD4vpLrUIaePS+1`&-M{5FO4LX+XbUotO))U0oc1KJL9zRLr
zP98k->_L;J=5!(b;Gap4^Y8Z+HW!K1+c39|ln%+y+MYi5g{8qKiM+#&j)$AayfgZ2
zRH2d<&j=XUt*?Gm!C=GIYZOU4dgXxdtgD=m>!j%-7%f-?H>m
zj1>uf@KcwF@nNh1mlLJgK#l5!A6z(~@Z?n9jAsozC4LQ>CQ{@Ty$sHMha^rkw_~H|
zi!(DbH!Mn@ue{CAgijIbrf0XizS(7=N^UeHtEYz;YcO0LS@~YoJJ%acd}|65%`;kA
zqDZ|oxXG3@xD```3Z53l-`Q<)!xT62gv`RxtJWYwe_>qWmCdom#+SFb$`DHkMMn>N
z=$!t#6&|;DtbuS)a80ng^=_mH}_Gi~^Dt?{w
zs2!!`>Z-I<`OU=xWg}<8O2Bd81P*uZ0HUu7mI>3RknkOO
z8}sRd5V7a&vvfJBR0SESve&6Y_%6K>?X8<#Ogy8@0#TAtb0b3D|02RvN{WJ0o8vg?
zvwfruC04HXC0|NHfR8&`1Z!L~Nob^Ty;`~szbSZekz
z^dIfxsx?a0FcgBCCHxcV-g5eHO^roJpyC?jwQ{obw~@!k%c5z0R`5QYN-`&rs%HLO|arL0G
zt7(GN8dSJy=B%rjhlrZ8pwWe*C(nN0aatz%q{9m7->gK`HK_c)U&QG^J1JF%WFlkn
z&x4mgBQbNQjd2H`xf;troN1^2g3cwu#Wl!^xby5@mGRp)FQP<5#^>_W;RP+c-bBF?
zxb>&|q2I$e2l>wNlJ(D_ko63ha1Ek<(q7se#YGrHbM)~cexIs+A~UM{R|43KqE{?mT`ol
z6ARZcw(j+QoF=w)3T-v9U$FjdUPI#x-=M+#JUmBuEnnFz;;R`0*JZf?y!#|lnKG+W
z_zPi8M6E#qovwGG(r+8nfdQOb2Mw<}*jyr6aQZyCc`+2l#HaxpciLlvj)2LI0e`MR
zpJ&PYu1p~;Ln4m|Swfb~2J!<{JOXUeT6r24w
z+O3KIv(!NP;4G$)8Z!xAb!h!y@l`1j6EclwUi<^hW9q?}g+;nN@F!1o4r
z(BP^F_ihhzZa{mC1IBFraD$r3>(u8OLI!XOn@2q-5f+PZzF^?axP$M~68L)Myu?U%
zH%CZd#H^hDcqY)W8shUEP
zsoB3}4XU2DmqJn;32tp7@2ZMAd$&snH}EQJGqs7+N#YhxlRYm-9Zz^8KbR^(q^4~+U{1}p`y)EhA$zv}f1L1eJjps9*8y`K)w
zD+PGb=0zvwrMH%SL3ZO<7;@Sx_Q~SFvP<`z@mO7)khpWv%+?*R*tVXIEnFoE1}C9z
z+mRc1?Fvq+cz*8R3TfPpJoKh%Ph%?Wmt{)I(z^Ci=f9POw4q7Qb0;Mic<_N%LM~Te
zt*p0$VjRwiNG32=yj)oZjiNbS94Chbr%k)Li%tq3<+`pC+_)<}+E(?ZGKnI;WP)Jq
zcIUYpNRAbGc?lR)*MFa-QQCs*b%SB+_=J1T&&N-BV^D#Dr8fvO%2Jof6oJ8CiVXM`
z)84a;;f@J;bAzanj7$eM+Jj^_lgp)XKfZsL`>!pVoa&PGzx*++7!e3}HcJ^zM&ILE
zbpt{;zsoaG`ij48jza>LWF}@I)_TF=k#gZ_a*P1(fRJ5nBQDao5bt{9d^c-V43_;N1}5m
z%V5V&2VTpGc;ov&6eX2Jyqp6JSgz2yj&FyP1uTHCGY{2PN7v^rh`hDl-bLzY%NSd)
zK?gxl8?X=d-5H#kUN`_AM{~Ji;?q&!%j@Z~ZnY>u@!IBi_i;VFaMu!W_nyy~or-EN
zU>VFrB85n0p7vW``k-yO+9#GJB_7SOjKW9{`oT~BM_zW=cLv2lmP<=oQ|EWC);!Rj
z8Sb_8ejf1m-SL=;kdN&)a0RM^0&D<4UQbo3(F=z?!5CGGxanz;%@RM@J+_w9GaBDD
zYbHRC&s;mv0+V-^k48q*^@-Y9i?yecHkHepIkfI^cXgZRrqYHMcdItoFE*w#6naMC
z)x2qu_1TNvr!dLOewV&