backlog 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/LICENSE_LOCALIZATION +20 -0
- data/Manifest.txt +216 -0
- data/README +180 -0
- data/README_LOCALIZATION +61 -0
- data/README_LOGIN_SUGAR +194 -0
- data/Rakefile +19 -0
- data/app/controllers/application.rb +142 -0
- data/app/controllers/backlogs_controller.rb +117 -0
- data/app/controllers/estimates_controller.rb +10 -0
- data/app/controllers/periods_controller.rb +227 -0
- data/app/controllers/tasks_controller.rb +229 -0
- data/app/controllers/user_controller.rb +183 -0
- data/app/controllers/works_controller.rb +117 -0
- data/app/helpers/application_helper.rb +26 -0
- data/app/helpers/backlogs_helper.rb +2 -0
- data/app/helpers/estimates_helper.rb +2 -0
- data/app/helpers/periods_helper.rb +2 -0
- data/app/helpers/tasks_helper.rb +17 -0
- data/app/helpers/user_helper.rb +53 -0
- data/app/helpers/works_helper.rb +2 -0
- data/app/models/backlog.rb +40 -0
- data/app/models/estimate.rb +10 -0
- data/app/models/period.rb +124 -0
- data/app/models/task.rb +280 -0
- data/app/models/user.rb +101 -0
- data/app/models/user_notify.rb +50 -0
- data/app/models/work.rb +94 -0
- data/app/views/backlogs/_form.rhtml +49 -0
- data/app/views/backlogs/edit.rhtml +10 -0
- data/app/views/backlogs/new.rhtml +11 -0
- data/app/views/backlogs/show.rhtml +90 -0
- data/app/views/layouts/_headers.rhtml +22 -0
- data/app/views/layouts/mwrt002.rhtml +83 -0
- data/app/views/layouts/wide.rhtml +22 -0
- data/app/views/periods/_burn_down_chart.rhtml +8 -0
- data/app/views/periods/_form.rhtml +56 -0
- data/app/views/periods/_show_active.rhtml +64 -0
- data/app/views/periods/_title.rhtml +10 -0
- data/app/views/periods/edit.rhtml +10 -0
- data/app/views/periods/new.rhtml +10 -0
- data/app/views/periods/show.rhtml +26 -0
- data/app/views/tasks/_form.rhtml +29 -0
- data/app/views/tasks/_task.rhtml +102 -0
- data/app/views/tasks/edit.rhtml +11 -0
- data/app/views/tasks/list.rhtml +77 -0
- data/app/views/tasks/list_started.rhtml +64 -0
- data/app/views/tasks/new.rhtml +10 -0
- data/app/views/user/_edit.rhtml +30 -0
- data/app/views/user/_password.rhtml +21 -0
- data/app/views/user/change_password.rhtml +15 -0
- data/app/views/user/edit.rhtml +19 -0
- data/app/views/user/forgot_password.rhtml +19 -0
- data/app/views/user/login.rhtml +30 -0
- data/app/views/user/logout.rhtml +8 -0
- data/app/views/user/signup.rhtml +14 -0
- data/app/views/user/welcome.rhtml +10 -0
- data/app/views/user_notify/change_password.rhtml +10 -0
- data/app/views/user_notify/change_password_no.rhtml +10 -0
- data/app/views/user_notify/forgot_password.rhtml +11 -0
- data/app/views/user_notify/forgot_password_no.rhtml +11 -0
- data/app/views/user_notify/signup.rhtml +12 -0
- data/app/views/user_notify/signup_no.rhtml +12 -0
- data/app/views/works/_form.rhtml +85 -0
- data/app/views/works/daily_work_sheet.rhtml +99 -0
- data/app/views/works/edit.rhtml +11 -0
- data/app/views/works/list.rhtml +47 -0
- data/app/views/works/new.rhtml +11 -0
- data/app/views/works/show.rhtml +10 -0
- data/app/views/works/timeliste.rhtml +883 -0
- data/app/views/works/weekly_work_sheet.rhtml +84 -0
- data/backlog.gemspec +21 -0
- data/bin/backlog +44 -0
- data/bin/backlog_init.d +27 -0
- data/config/boot.rb +45 -0
- data/config/database.yml +38 -0
- data/config/deploy.rb +20 -0
- data/config/deploy_datek.rb +21 -0
- data/config/deploy_kubosch.rb +19 -0
- data/config/environment.rb +63 -0
- data/config/environments/datek_production.rb +26 -0
- data/config/environments/development.rb +27 -0
- data/config/environments/kubosch_production.rb +21 -0
- data/config/environments/localization_environment.rb +12 -0
- data/config/environments/production.rb +20 -0
- data/config/environments/test.rb +19 -0
- data/config/environments/user_environment.rb +21 -0
- data/config/mime_types.yaml +1 -0
- data/config/routes.rb +5 -0
- data/db/migrate/001_tasks.rb +15 -0
- data/db/migrate/002_backlogs.rb +14 -0
- data/db/migrate/003_add_estimation_points.rb +16 -0
- data/db/migrate/004_add_period.rb +63 -0
- data/db/migrate/005_add_field_work_started_at.rb +9 -0
- data/db/migrate/006_works_data_fix.rb +13 -0
- data/db/migrate/007_add_task_created_at.rb +23 -0
- data/db/migrate/008_add_backlog_options.rb +13 -0
- data/db/migrate/009_add_subtasks.rb +28 -0
- data/db/migrate/010_add_work_start.rb +9 -0
- data/db/migrate/011_login_sugar.rb +21 -0
- data/db/migrate/012_add_resolution.rb +12 -0
- data/db/migrate/013_create_estimates.rb +20 -0
- data/db/migrate/014_add_customer_option.rb +11 -0
- data/db/migrate/015_add_user_option.rb +43 -0
- data/db/migrate/016_add_invoicable_flag.rb +11 -0
- data/db/migrate/017_insert_datek_projects.rb +95 -0
- data/db/schema.rb +92 -0
- data/lang/en.yaml +75 -0
- data/lang/localizations.yaml +2 -0
- data/lang/no.yaml +74 -0
- data/lib/array_helper.rb +10 -0
- data/lib/clock.rb +14 -0
- data/lib/localization.rb +88 -0
- data/lib/tasks/capistrano.rake +90 -0
- data/lib/user_system.rb +70 -0
- data/public/404.html +8 -0
- data/public/500.html +8 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +24 -0
- data/public/dispatch.rb +10 -0
- data/public/favicon.ico +0 -0
- data/public/images/add.png +0 -0
- data/public/images/add.svg +70 -0
- data/public/images/appunti_architetto_franc_01.svg +92 -0
- data/public/images/arrow07_2.png +0 -0
- data/public/images/arrow07_4.png +0 -0
- data/public/images/arrow_down.png +0 -0
- data/public/images/arrow_down.svg +59 -0
- data/public/images/arrow_left.png +0 -0
- data/public/images/arrow_left.svg +59 -0
- data/public/images/arrow_right.png +0 -0
- data/public/images/arrow_right.svg +59 -0
- data/public/images/arrow_up.png +0 -0
- data/public/images/arrow_up.svg +59 -0
- data/public/images/blank.jpg +0 -0
- data/public/images/cestino_pieno_architetto_01.svg +470 -0
- data/public/images/checkmark.png +0 -0
- data/public/images/checkmark_org.png +0 -0
- data/public/images/clipboard.png +0 -0
- data/public/images/clipboard.svg +62 -0
- data/public/images/construction_hammer_jon__01.svg +116 -0
- data/public/images/eraser.png +0 -0
- data/public/images/eraser_org.png +0 -0
- data/public/images/ernes_stop.png +0 -0
- data/public/images/ernes_stop_org.png +0 -0
- data/public/images/hammer.png +0 -0
- data/public/images/header.jpg +0 -0
- data/public/images/pagebak.jpg +0 -0
- data/public/images/paper3.svg +54 -0
- data/public/images/period.png +0 -0
- data/public/images/period_org.png +0 -0
- data/public/images/question.svg +56 -0
- data/public/images/rails.png +0 -0
- data/public/images/tabella_architetto_franc_01.svg +105 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +833 -0
- data/public/javascripts/dragdrop.js +944 -0
- data/public/javascripts/effects.js +1088 -0
- data/public/javascripts/prototype.js +2515 -0
- data/public/javascripts/zapatec/utils/transport.js +2217 -0
- data/public/javascripts/zapatec/utils/utils.js +1799 -0
- data/public/javascripts/zapatec/utils/zapatec.js +90 -0
- data/public/javascripts/zapatec/utils/zpeventdriven.js +212 -0
- data/public/javascripts/zapatec/utils/zpwidget.js +729 -0
- data/public/javascripts/zapatec/zpcal/lang/calendar-no.js +124 -0
- data/public/javascripts/zapatec/zpcal/src/calendar-core.js +2878 -0
- data/public/javascripts/zapatec/zpcal/src/calendar-date-core.js +348 -0
- data/public/javascripts/zapatec/zpcal/src/calendar-setup.js +360 -0
- data/public/javascripts/zapatec/zpcal/src/calendar.js +35 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/backlog.css +65 -0
- data/public/stylesheets/mwrt002.css +54 -0
- data/public/stylesheets/mwrt002MAC.css +3 -0
- data/public/stylesheets/mwrt002NN.css +3 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/public/stylesheets/user.css +74 -0
- data/public/stylesheets/zpcal/themes/green.css +153 -0
- data/public/stylesheets/zpcal/themes/layouts/layout-2d.css +134 -0
- data/public/stylesheets/zpcal/themes/layouts/layout-common.css +74 -0
- data/public/stylesheets/zpcal/themes/menuarrow.gif +0 -0
- data/public/stylesheets/zpcal/themes/scroller-down.gif +0 -0
- data/public/stylesheets/zpcal/themes/scroller-up.gif +0 -0
- data/script/about +3 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/test/fixtures/backlogs.yml +7 -0
- data/test/fixtures/estimates.yml +9 -0
- data/test/fixtures/periods.yml +14 -0
- data/test/fixtures/tasks.yml +12 -0
- data/test/fixtures/users.yml +59 -0
- data/test/fixtures/works.yml +10 -0
- data/test/functional/backlogs_controller_test.rb +78 -0
- data/test/functional/estimates_controller_test.rb +18 -0
- data/test/functional/periods_controller_test.rb +80 -0
- data/test/functional/tasks_controller_test.rb +94 -0
- data/test/functional/user_controller_test.rb +267 -0
- data/test/functional/works_controller_test.rb +89 -0
- data/test/integration/user_system_test.rb +95 -0
- data/test/mocks/test/clock.rb +14 -0
- data/test/mocks/test/user_notify.rb +16 -0
- data/test/test_helper.rb +1 -2
- data/test/unit/estimate_test.rb +10 -0
- data/test/unit/localization_test.rb +47 -0
- data/test/unit/period_test.rb +10 -0
- data/test/unit/task_test.rb +10 -0
- data/test/unit/user_test.rb +133 -0
- data/test/unit/work_test.rb +10 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/init.rb +2 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +180 -0
- data/vendor/plugins/assert_cookie/MIT-LICENSE +7 -0
- data/vendor/plugins/assert_cookie/README +6 -0
- data/vendor/plugins/assert_cookie/Rakefile +21 -0
- data/vendor/plugins/assert_cookie/init.rb +1 -0
- data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +75 -0
- data/vendor/plugins/assert_cookie/meta.yml +7 -0
- data/vendor/plugins/assert_cookie/test/test_assert_cookie.rb +124 -0
- data/vendor/plugins/assert_cookie/test/test_helper.rb +31 -0
- data/vendor/plugins/foreign_key_migrations/CHANGELOG +67 -0
- data/vendor/plugins/foreign_key_migrations/MIT-LICENSE +20 -0
- data/vendor/plugins/foreign_key_migrations/README +60 -0
- data/vendor/plugins/foreign_key_migrations/init.rb +2 -0
- data/vendor/plugins/foreign_key_migrations/install.rb +1 -0
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations.rb +57 -0
- data/vendor/plugins/redhillonrails_core/CHANGELOG +85 -0
- data/vendor/plugins/redhillonrails_core/MIT-LICENSE +20 -0
- data/vendor/plugins/redhillonrails_core/README +97 -0
- data/vendor/plugins/redhillonrails_core/init.rb +9 -0
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core.rb +290 -0
- data/vendor/rails/REVISION_6747 +0 -0
- data/vendor/rails/actionmailer/CHANGELOG +281 -0
- data/vendor/rails/actionmailer/MIT-LICENSE +21 -0
- data/vendor/rails/actionmailer/README +145 -0
- data/vendor/rails/actionmailer/Rakefile +95 -0
- data/vendor/rails/actionmailer/install.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer.rb +51 -0
- data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +570 -0
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +111 -0
- data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +19 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +113 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +51 -0
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +59 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +8 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/text/format.rb +1466 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +3 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb +242 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb +41 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb +71 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb +69 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb +467 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/facade.rb +552 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb +914 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/info.rb +35 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/loader.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb +447 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb +433 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mbox.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb +280 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb +135 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb +1522 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb +377 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +131 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb +41 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb +263 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb +277 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/tmail.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb +238 -0
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +9 -0
- data/vendor/rails/actionmailer/test/abstract_unit.rb +39 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email +14 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email10 +20 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email11 +34 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email12 +32 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email13 +29 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email2 +114 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email3 +70 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email4 +59 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email5 +19 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email6 +20 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email7 +66 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email8 +47 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email9 +28 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +14 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +100 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml +0 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -0
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +91 -0
- data/vendor/rails/actionmailer/test/mail_render_test.rb +79 -0
- data/vendor/rails/actionmailer/test/mail_service_test.rb +850 -0
- data/vendor/rails/actionmailer/test/quoting_test.rb +57 -0
- data/vendor/rails/actionmailer/test/test_helper_test.rb +79 -0
- data/vendor/rails/actionmailer/test/tmail_test.rb +21 -0
- data/vendor/rails/actionmailer/test/url_test.rb +68 -0
- data/vendor/rails/actionpack/CHANGELOG +3560 -0
- data/vendor/rails/actionpack/MIT-LICENSE +21 -0
- data/vendor/rails/actionpack/README +469 -0
- data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +25 -0
- data/vendor/rails/actionpack/Rakefile +154 -0
- data/vendor/rails/actionpack/examples/address_book/index.erb +33 -0
- data/vendor/rails/actionpack/examples/address_book/index.rhtml +0 -0
- data/vendor/rails/actionpack/examples/address_book/layout.erb +8 -0
- data/vendor/rails/actionpack/examples/address_book/layout.rhtml +0 -0
- data/vendor/rails/actionpack/examples/address_book_controller.cgi +9 -0
- data/vendor/rails/actionpack/examples/address_book_controller.fcgi +6 -0
- data/vendor/rails/actionpack/examples/address_book_controller.rb +52 -0
- data/vendor/rails/actionpack/examples/address_book_controller.rbx +4 -0
- data/vendor/rails/actionpack/examples/benchmark.rb +52 -0
- data/vendor/rails/actionpack/examples/benchmark_with_ar.fcgi +89 -0
- data/vendor/rails/actionpack/examples/blog_controller.cgi +53 -0
- data/vendor/rails/actionpack/examples/debate/index.erb +14 -0
- data/vendor/rails/actionpack/examples/debate/index.rhtml +0 -0
- data/vendor/rails/actionpack/examples/debate/new_topic.erb +22 -0
- data/vendor/rails/actionpack/examples/debate/new_topic.rhtml +0 -0
- data/vendor/rails/actionpack/examples/debate/topic.erb +32 -0
- data/vendor/rails/actionpack/examples/debate/topic.rhtml +0 -0
- data/vendor/rails/actionpack/examples/debate_controller.cgi +57 -0
- data/vendor/rails/actionpack/install.rb +30 -0
- data/vendor/rails/actionpack/lib/action_controller.rb +85 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions.rb +70 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +25 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +12 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +141 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +99 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +585 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +117 -0
- data/vendor/rails/actionpack/lib/action_controller/base.rb +1251 -0
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +93 -0
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +656 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +18 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +123 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/parameters.rb +208 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +96 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +63 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +23 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +217 -0
- data/vendor/rails/actionpack/lib/action_controller/components.rb +165 -0
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +78 -0
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +752 -0
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +184 -0
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +153 -0
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +121 -0
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +552 -0
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +318 -0
- data/vendor/rails/actionpack/lib/action_controller/macros/auto_complete.rb +53 -0
- data/vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb +33 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +191 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +157 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +20 -0
- data/vendor/rails/actionpack/lib/action_controller/pagination.rb +402 -0
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +56 -0
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +91 -0
- data/vendor/rails/actionpack/lib/action_controller/request.rb +316 -0
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +152 -0
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +485 -0
- data/vendor/rails/actionpack/lib/action_controller/response.rb +76 -0
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +1365 -0
- data/vendor/rails/actionpack/lib/action_controller/scaffolding.rb +191 -0
- data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +335 -0
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +143 -0
- data/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb +32 -0
- data/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb +35 -0
- data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +105 -0
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +150 -0
- data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +88 -0
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +141 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +26 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +29 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +10 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/edit.erb +7 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/layout.erb +69 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/list.erb +27 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/list.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/new.erb +6 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/new.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/show.erb +9 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/show.rhtml +0 -0
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +516 -0
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +124 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +64 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +530 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +828 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +105 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +108 -0
- data/vendor/rails/actionpack/lib/action_pack.rb +24 -0
- data/vendor/rails/actionpack/lib/action_pack/version.rb +9 -0
- data/vendor/rails/actionpack/lib/action_view.rb +31 -0
- data/vendor/rails/actionpack/lib/action_view/base.rb +625 -0
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +69 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +237 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +405 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +24 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +10 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +128 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +454 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +31 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +609 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +372 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +192 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb +233 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +193 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +833 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +942 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +1088 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +2515 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +152 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb +86 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +913 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +20 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +59 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +140 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +108 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +401 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +496 -0
- data/vendor/rails/actionpack/lib/action_view/partials.rb +128 -0
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +102 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +29 -0
- data/vendor/rails/actionpack/test/active_record_unit.rb +108 -0
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +142 -0
- data/vendor/rails/actionpack/test/activerecord/pagination_test.rb +156 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +479 -0
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +43 -0
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +597 -0
- data/vendor/rails/actionpack/test/controller/base_test.rb +134 -0
- data/vendor/rails/actionpack/test/controller/benchmark_test.rb +33 -0
- data/vendor/rails/actionpack/test/controller/caching_test.rb +262 -0
- data/vendor/rails/actionpack/test/controller/capture_test.rb +71 -0
- data/vendor/rails/actionpack/test/controller/cgi_test.rb +432 -0
- data/vendor/rails/actionpack/test/controller/components_test.rb +129 -0
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +139 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +88 -0
- data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +41 -0
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +48 -0
- data/vendor/rails/actionpack/test/controller/fake_controllers.rb +16 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +42 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +752 -0
- data/vendor/rails/actionpack/test/controller/flash_test.rb +147 -0
- data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +45 -0
- data/vendor/rails/actionpack/test/controller/helper_test.rb +204 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +104 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +69 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +239 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +51 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +125 -0
- data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +42 -0
- data/vendor/rails/actionpack/test/controller/integration_test.rb +187 -0
- data/vendor/rails/actionpack/test/controller/layout_test.rb +202 -0
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +358 -0
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +54 -0
- data/vendor/rails/actionpack/test/controller/new_render_test.rb +769 -0
- data/vendor/rails/actionpack/test/controller/raw_post_test.rb +74 -0
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +103 -0
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +180 -0
- data/vendor/rails/actionpack/test/controller/render_test.rb +404 -0
- data/vendor/rails/actionpack/test/controller/request_test.rb +393 -0
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +215 -0
- data/vendor/rails/actionpack/test/controller/resources_test.rb +585 -0
- data/vendor/rails/actionpack/test/controller/routing_test.rb +1902 -0
- data/vendor/rails/actionpack/test/controller/selector_test.rb +628 -0
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +127 -0
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +228 -0
- data/vendor/rails/actionpack/test/controller/session_management_test.rb +156 -0
- data/vendor/rails/actionpack/test/controller/test_test.rb +520 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +218 -0
- data/vendor/rails/actionpack/test/controller/verification_test.rb +242 -0
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +79 -0
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +181 -0
- data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/addresses/list.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/companies.yml +24 -0
- data/vendor/rails/actionpack/test/fixtures/company.rb +9 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +1 -0
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +42 -0
- data/vendor/rails/actionpack/test/fixtures/developer.rb +7 -0
- data/vendor/rails/actionpack/test/fixtures/developers.yml +21 -0
- data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +13 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/project.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/projects.yml +7 -0
- data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/replies.yml +13 -0
- data/vendor/rails/actionpack/test/fixtures/reply.rb +5 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hello.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_only.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/_person.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/_person.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/block_content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/block_content_for.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/capturing.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +6 -0
- data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/greeting.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/list.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.rxml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +9 -0
- data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.rhtml +0 -0
- data/vendor/rails/actionpack/test/fixtures/topic.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/topics.yml +22 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +197 -0
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +367 -0
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +72 -0
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +168 -0
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +1394 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +611 -0
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +489 -0
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +149 -0
- data/vendor/rails/actionpack/test/template/java_script_macros_helper_test.rb +109 -0
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +67 -0
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +89 -0
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +556 -0
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +90 -0
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +74 -0
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +356 -0
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +423 -0
- data/vendor/rails/actionpack/test/testing_sandbox.rb +11 -0
- data/vendor/rails/actionwebservice/CHANGELOG +265 -0
- data/vendor/rails/actionwebservice/MIT-LICENSE +21 -0
- data/vendor/rails/actionwebservice/README +364 -0
- data/vendor/rails/actionwebservice/Rakefile +171 -0
- data/vendor/rails/actionwebservice/TODO +32 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/README +143 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +50 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +57 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +108 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb +7 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb +50 -0
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb +58 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/README +17 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +60 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +34 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +67 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +48 -0
- data/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +16 -0
- data/vendor/rails/actionwebservice/install.rb +30 -0
- data/vendor/rails/actionwebservice/lib/action_web_service.rb +66 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/api.rb +301 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/base.rb +42 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/casting.rb +138 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/client.rb +3 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb +28 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb +113 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +58 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/container.rb +3 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb +93 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb +86 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb +69 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb +2 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +207 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +379 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb +202 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb +4 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb +112 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb +37 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +176 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +235 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +122 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb +283 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/struct.rb +68 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +26 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb +226 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb +65 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb +6 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb +29 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb +30 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb +110 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +9 -0
- data/vendor/rails/actionwebservice/setup.rb +1379 -0
- data/vendor/rails/actionwebservice/test/abstract_client.rb +183 -0
- data/vendor/rails/actionwebservice/test/abstract_dispatcher.rb +551 -0
- data/vendor/rails/actionwebservice/test/abstract_unit.rb +45 -0
- data/vendor/rails/actionwebservice/test/api_test.rb +102 -0
- data/vendor/rails/actionwebservice/test/apis/auto_load_api.rb +3 -0
- data/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb +2 -0
- data/vendor/rails/actionwebservice/test/base_test.rb +42 -0
- data/vendor/rails/actionwebservice/test/casting_test.rb +86 -0
- data/vendor/rails/actionwebservice/test/client_soap_test.rb +153 -0
- data/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb +152 -0
- data/vendor/rails/actionwebservice/test/container_test.rb +73 -0
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb +137 -0
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +59 -0
- data/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql +8 -0
- data/vendor/rails/actionwebservice/test/fixtures/users.yml +12 -0
- data/vendor/rails/actionwebservice/test/gencov +3 -0
- data/vendor/rails/actionwebservice/test/invocation_test.rb +185 -0
- data/vendor/rails/actionwebservice/test/run +6 -0
- data/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb +146 -0
- data/vendor/rails/actionwebservice/test/struct_test.rb +52 -0
- data/vendor/rails/actionwebservice/test/test_invoke_test.rb +112 -0
- data/vendor/rails/activerecord/CHANGELOG +3195 -0
- data/vendor/rails/activerecord/MIT-LICENSE +20 -0
- data/vendor/rails/activerecord/README +360 -0
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +64 -0
- data/vendor/rails/activerecord/Rakefile +223 -0
- data/vendor/rails/activerecord/benchmarks/benchmark.rb +26 -0
- data/vendor/rails/activerecord/benchmarks/mysql_benchmark.rb +19 -0
- data/vendor/rails/activerecord/examples/associations.png +0 -0
- data/vendor/rails/activerecord/examples/associations.rb +87 -0
- data/vendor/rails/activerecord/examples/shared_setup.rb +15 -0
- data/vendor/rails/activerecord/examples/validation.rb +85 -0
- data/vendor/rails/activerecord/install.rb +30 -0
- data/vendor/rails/activerecord/lib/active_record.rb +85 -0
- data/vendor/rails/activerecord/lib/active_record/acts/list.rb +253 -0
- data/vendor/rails/activerecord/lib/active_record/acts/nested_set.rb +211 -0
- data/vendor/rails/activerecord/lib/active_record/acts/tree.rb +96 -0
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +191 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +1701 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +212 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +162 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +56 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +50 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +163 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +196 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +245 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +96 -0
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +75 -0
- data/vendor/rails/activerecord/lib/active_record/base.rb +2276 -0
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +274 -0
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +371 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +279 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +135 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +61 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +393 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +303 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +157 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/db2_adapter.rb +228 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb +728 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb +863 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +421 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb +349 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +710 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +582 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +415 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +606 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb +666 -0
- data/vendor/rails/activerecord/lib/active_record/deprecated_associations.rb +104 -0
- data/vendor/rails/activerecord/lib/active_record/deprecated_finders.rb +44 -0
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +639 -0
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +137 -0
- data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +77 -0
- data/vendor/rails/activerecord/lib/active_record/migration.rb +393 -0
- data/vendor/rails/activerecord/lib/active_record/observer.rb +178 -0
- data/vendor/rails/activerecord/lib/active_record/query_cache.rb +111 -0
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +219 -0
- data/vendor/rails/activerecord/lib/active_record/schema.rb +58 -0
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +164 -0
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +50 -0
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +128 -0
- data/vendor/rails/activerecord/lib/active_record/validations.rb +902 -0
- data/vendor/rails/activerecord/lib/active_record/vendor/db2.rb +362 -0
- data/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb +1214 -0
- data/vendor/rails/activerecord/lib/active_record/version.rb +9 -0
- data/vendor/rails/activerecord/lib/active_record/wrappers/yaml_wrapper.rb +15 -0
- data/vendor/rails/activerecord/lib/active_record/wrappings.rb +58 -0
- data/vendor/rails/activerecord/lib/active_record/xml_serialization.rb +327 -0
- data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +59 -0
- data/vendor/rails/activerecord/test/abstract_unit.rb +79 -0
- data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +31 -0
- data/vendor/rails/activerecord/test/adapter_test.rb +87 -0
- data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +95 -0
- data/vendor/rails/activerecord/test/aggregations_test.rb +95 -0
- data/vendor/rails/activerecord/test/all.sh +8 -0
- data/vendor/rails/activerecord/test/ar_schema_test.rb +33 -0
- data/vendor/rails/activerecord/test/association_inheritance_reload.rb +14 -0
- data/vendor/rails/activerecord/test/associations/callbacks_test.rb +126 -0
- data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +138 -0
- data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +145 -0
- data/vendor/rails/activerecord/test/associations/eager_test.rb +393 -0
- data/vendor/rails/activerecord/test/associations/extension_test.rb +42 -0
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +497 -0
- data/vendor/rails/activerecord/test/associations_test.rb +1880 -0
- data/vendor/rails/activerecord/test/attribute_methods_test.rb +49 -0
- data/vendor/rails/activerecord/test/base_test.rb +1656 -0
- data/vendor/rails/activerecord/test/binary_test.rb +37 -0
- data/vendor/rails/activerecord/test/calculations_test.rb +219 -0
- data/vendor/rails/activerecord/test/callbacks_test.rb +400 -0
- data/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb +32 -0
- data/vendor/rails/activerecord/test/column_alias_test.rb +17 -0
- data/vendor/rails/activerecord/test/connection_test_firebird.rb +8 -0
- data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +26 -0
- data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +21 -0
- data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +27 -0
- data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +23 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +18 -0
- data/vendor/rails/activerecord/test/connections/native_sqlserver/connection.rb +23 -0
- data/vendor/rails/activerecord/test/connections/native_sqlserver_odbc/connection.rb +25 -0
- data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +23 -0
- data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +65 -0
- data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +52 -0
- data/vendor/rails/activerecord/test/default_test_firebird.rb +16 -0
- data/vendor/rails/activerecord/test/defaults_test.rb +60 -0
- data/vendor/rails/activerecord/test/deprecated_associations_test.rb +396 -0
- data/vendor/rails/activerecord/test/deprecated_finder_test.rb +151 -0
- data/vendor/rails/activerecord/test/empty_date_time_test.rb +25 -0
- data/vendor/rails/activerecord/test/finder_test.rb +523 -0
- data/vendor/rails/activerecord/test/fixtures/accounts.yml +28 -0
- data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
- data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
- data/vendor/rails/activerecord/test/fixtures/author.rb +99 -0
- data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/authors.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/auto_id.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char +1 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces +1 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line +3 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes +3 -0
- data/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value +1 -0
- data/vendor/rails/activerecord/test/fixtures/binary.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/categories.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +23 -0
- data/vendor/rails/activerecord/test/fixtures/categorization.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/categorizations.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/category.rb +20 -0
- data/vendor/rails/activerecord/test/fixtures/column_name.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/comment.rb +23 -0
- data/vendor/rails/activerecord/test/fixtures/comments.yml +59 -0
- data/vendor/rails/activerecord/test/fixtures/companies.yml +55 -0
- data/vendor/rails/activerecord/test/fixtures/company.rb +111 -0
- data/vendor/rails/activerecord/test/fixtures/company_in_module.rb +59 -0
- data/vendor/rails/activerecord/test/fixtures/computer.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/computers.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/course.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/courses.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/customer.rb +55 -0
- data/vendor/rails/activerecord/test/fixtures/customers.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +32 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +231 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +63 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +304 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql +6 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +32 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +268 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql +1 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.drop.sql +32 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.sql +234 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +302 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql +7 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +65 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +325 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql +6 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +37 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +247 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +74 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +32 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +215 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +34 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.sql +243 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql +2 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +34 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +218 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql +4 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql +5 -0
- data/vendor/rails/activerecord/test/fixtures/default.rb +2 -0
- data/vendor/rails/activerecord/test/fixtures/developer.rb +52 -0
- data/vendor/rails/activerecord/test/fixtures/developers.yml +21 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller +3 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record +3 -0
- data/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record +2 -0
- data/vendor/rails/activerecord/test/fixtures/edge.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/edges.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/entrant.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/entrants.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures/joke.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/keyboard.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/legacy_thing.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_decimal/1_give_me_big_numbers.rb +15 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_foo.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkey.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/mixin.rb +63 -0
- data/vendor/rails/activerecord/test/fixtures/mixins.yml +127 -0
- data/vendor/rails/activerecord/test/fixtures/movie.rb +5 -0
- data/vendor/rails/activerecord/test/fixtures/movies.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +1 -0
- data/vendor/rails/activerecord/test/fixtures/order.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/people.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/person.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/post.rb +58 -0
- data/vendor/rails/activerecord/test/fixtures/posts.yml +48 -0
- data/vendor/rails/activerecord/test/fixtures/project.rb +27 -0
- data/vendor/rails/activerecord/test/fixtures/projects.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/reader.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/readers.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/reply.rb +37 -0
- data/vendor/rails/activerecord/test/fixtures/subject.rb +4 -0
- data/vendor/rails/activerecord/test/fixtures/subscriber.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers/first +2 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers/second +2 -0
- data/vendor/rails/activerecord/test/fixtures/tag.rb +7 -0
- data/vendor/rails/activerecord/test/fixtures/tagging.rb +6 -0
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +18 -0
- data/vendor/rails/activerecord/test/fixtures/tags.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/task.rb +3 -0
- data/vendor/rails/activerecord/test/fixtures/tasks.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/topic.rb +25 -0
- data/vendor/rails/activerecord/test/fixtures/topics.yml +22 -0
- data/vendor/rails/activerecord/test/fixtures/vertex.rb +9 -0
- data/vendor/rails/activerecord/test/fixtures/vertices.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures_test.rb +410 -0
- data/vendor/rails/activerecord/test/inheritance_test.rb +212 -0
- data/vendor/rails/activerecord/test/lifecycle_test.rb +137 -0
- data/vendor/rails/activerecord/test/locking_test.rb +241 -0
- data/vendor/rails/activerecord/test/method_scoping_test.rb +416 -0
- data/vendor/rails/activerecord/test/migration_test.rb +781 -0
- data/vendor/rails/activerecord/test/migration_test_firebird.rb +124 -0
- data/vendor/rails/activerecord/test/mixin_nested_set_test.rb +196 -0
- data/vendor/rails/activerecord/test/mixin_test.rb +550 -0
- data/vendor/rails/activerecord/test/modules_test.rb +34 -0
- data/vendor/rails/activerecord/test/multiple_db_test.rb +60 -0
- data/vendor/rails/activerecord/test/pk_test.rb +101 -0
- data/vendor/rails/activerecord/test/query_cache_test.rb +107 -0
- data/vendor/rails/activerecord/test/readonly_test.rb +107 -0
- data/vendor/rails/activerecord/test/reflection_test.rb +166 -0
- data/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb +75 -0
- data/vendor/rails/activerecord/test/schema_dumper_test.rb +124 -0
- data/vendor/rails/activerecord/test/schema_test_postgresql.rb +64 -0
- data/vendor/rails/activerecord/test/synonym_test_oracle.rb +17 -0
- data/vendor/rails/activerecord/test/table_name_test_sqlserver.rb +23 -0
- data/vendor/rails/activerecord/test/threaded_connections_test.rb +48 -0
- data/vendor/rails/activerecord/test/transactions_test.rb +268 -0
- data/vendor/rails/activerecord/test/unconnected_test.rb +32 -0
- data/vendor/rails/activerecord/test/validations_test.rb +1131 -0
- data/vendor/rails/activerecord/test/xml_serialization_test.rb +153 -0
- data/vendor/rails/activeresource/CHANGELOG +177 -0
- data/vendor/rails/activeresource/MIT-LICENSE +20 -0
- data/vendor/rails/activeresource/README +235 -0
- data/vendor/rails/activeresource/Rakefile +132 -0
- data/vendor/rails/activeresource/lib/active_resource.rb +47 -0
- data/vendor/rails/activeresource/lib/active_resource/base.rb +424 -0
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +161 -0
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +104 -0
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +131 -0
- data/vendor/rails/activeresource/lib/active_resource/struct.rb +16 -0
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +161 -0
- data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
- data/vendor/rails/activeresource/test/abstract_unit.rb +10 -0
- data/vendor/rails/activeresource/test/authorization_test.rb +82 -0
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +87 -0
- data/vendor/rails/activeresource/test/base/equality_test.rb +43 -0
- data/vendor/rails/activeresource/test/base/load_test.rb +111 -0
- data/vendor/rails/activeresource/test/base_errors_test.rb +35 -0
- data/vendor/rails/activeresource/test/base_test.rb +390 -0
- data/vendor/rails/activeresource/test/connection_test.rb +148 -0
- data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
- data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
- data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
- data/vendor/rails/activeresource/test/setter_trap.rb +29 -0
- data/vendor/rails/activesupport/CHANGELOG +787 -0
- data/vendor/rails/activesupport/MIT-LICENSE +20 -0
- data/vendor/rails/activesupport/README +43 -0
- data/vendor/rails/activesupport/Rakefile +82 -0
- data/vendor/rails/activesupport/install.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support.rb +46 -0
- data/vendor/rails/activesupport/lib/active_support/caching_tools.rb +62 -0
- data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +78 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +72 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +55 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +3 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/formatting.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +50 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +3 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +48 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +45 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +173 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +62 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +221 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +101 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +53 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +51 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +70 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +48 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +41 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +17 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +44 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +91 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +54 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +58 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +153 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +17 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +42 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/test/difference.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +239 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +39 -0
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +539 -0
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +202 -0
- data/vendor/rails/activesupport/lib/active_support/duration.rb +89 -0
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +275 -0
- data/vendor/rails/activesupport/lib/active_support/json.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +45 -0
- data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +129 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb +149 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +458 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +43 -0
- data/vendor/rails/activesupport/lib/active_support/option_merger.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +44 -0
- data/vendor/rails/activesupport/lib/active_support/reloadable.rb +60 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +180 -0
- data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/blankslate.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xchar.rb +112 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlbase.rb +145 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlevents.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlmarkup.rb +327 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb +1021 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +38 -0
- data/vendor/rails/activesupport/test/abstract_unit.rb +7 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +7 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +5 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +4 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +1 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +2 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +3 -0
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +3 -0
- data/vendor/rails/activesupport/test/caching_tools_test.rb +79 -0
- data/vendor/rails/activesupport/test/clean_logger_test.rb +87 -0
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +182 -0
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +11 -0
- data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +14 -0
- data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +31 -0
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +208 -0
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +36 -0
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +21 -0
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +152 -0
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +21 -0
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +61 -0
- data/vendor/rails/activesupport/test/core_ext/exception_test.rb +64 -0
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +29 -0
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +622 -0
- data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +37 -0
- data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +43 -0
- data/vendor/rails/activesupport/test/core_ext/load_error_tests.rb +16 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default.rb +30 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +52 -0
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +33 -0
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +31 -0
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +274 -0
- data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +24 -0
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +104 -0
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +216 -0
- data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +9 -0
- data/vendor/rails/activesupport/test/core_ext/proc_test.rb +11 -0
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +13 -0
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +152 -0
- data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +9 -0
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +373 -0
- data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +2 -0
- data/vendor/rails/activesupport/test/dependencies/conflict.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +3 -0
- data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +4 -0
- data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +4 -0
- data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +3 -0
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +1 -0
- data/vendor/rails/activesupport/test/dependencies/service_one.rb +5 -0
- data/vendor/rails/activesupport/test/dependencies/service_two.rb +2 -0
- data/vendor/rails/activesupport/test/dependencies_test.rb +752 -0
- data/vendor/rails/activesupport/test/deprecation_test.rb +151 -0
- data/vendor/rails/activesupport/test/inflector_test.rb +438 -0
- data/vendor/rails/activesupport/test/json/decoding_test.rb +28 -0
- data/vendor/rails/activesupport/test/json/encoding_test.rb +96 -0
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +164 -0
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +141 -0
- data/vendor/rails/activesupport/test/multibyte_handler_test.rb +277 -0
- data/vendor/rails/activesupport/test/option_merger_test.rb +50 -0
- data/vendor/rails/activesupport/test/ordered_options_test.rb +80 -0
- data/vendor/rails/activesupport/test/reloadable_test.rb +123 -0
- data/vendor/rails/activesupport/test/test_test.rb +56 -0
- data/vendor/rails/activesupport/test/time_zone_test.rb +91 -0
- data/vendor/rails/activesupport/test/whiny_nil_test.rb +38 -0
- data/vendor/rails/railties/CHANGELOG +1407 -0
- data/vendor/rails/railties/MIT-LICENSE +20 -0
- data/vendor/rails/railties/README +180 -0
- data/vendor/rails/railties/Rakefile +355 -0
- data/vendor/rails/railties/bin/about +3 -0
- data/vendor/rails/railties/bin/console +3 -0
- data/vendor/rails/railties/bin/destroy +3 -0
- data/vendor/rails/railties/bin/generate +3 -0
- data/vendor/rails/railties/bin/performance/benchmarker +3 -0
- data/vendor/rails/railties/bin/performance/profiler +3 -0
- data/vendor/rails/railties/bin/plugin +3 -0
- data/vendor/rails/railties/bin/process/inspector +3 -0
- data/vendor/rails/railties/bin/process/reaper +3 -0
- data/vendor/rails/railties/bin/process/spawner +3 -0
- data/vendor/rails/railties/bin/rails +19 -0
- data/vendor/rails/railties/bin/runner +3 -0
- data/vendor/rails/railties/bin/server +3 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +123 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +9 -0
- data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +2 -0
- data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +2 -0
- data/vendor/rails/railties/configs/apache.conf +40 -0
- data/vendor/rails/railties/configs/databases/frontbase.yml +28 -0
- data/vendor/rails/railties/configs/databases/mysql.yml +48 -0
- data/vendor/rails/railties/configs/databases/oracle.yml +39 -0
- data/vendor/rails/railties/configs/databases/postgresql.yml +44 -0
- data/vendor/rails/railties/configs/databases/sqlite2.yml +16 -0
- data/vendor/rails/railties/configs/databases/sqlite3.yml +19 -0
- data/vendor/rails/railties/configs/initializers/inflections.rb +8 -0
- data/vendor/rails/railties/configs/initializers/mime_types.rb +3 -0
- data/vendor/rails/railties/configs/lighttpd.conf +54 -0
- data/vendor/rails/railties/configs/routes.rb +27 -0
- data/vendor/rails/railties/dispatches/dispatch.fcgi +24 -0
- data/vendor/rails/railties/dispatches/dispatch.rb +10 -0
- data/vendor/rails/railties/dispatches/gateway.cgi +97 -0
- data/vendor/rails/railties/doc/README_FOR_APP +2 -0
- data/vendor/rails/railties/environments/boot.rb +36 -0
- data/vendor/rails/railties/environments/development.rb +18 -0
- data/vendor/rails/railties/environments/environment.rb +55 -0
- data/vendor/rails/railties/environments/production.rb +18 -0
- data/vendor/rails/railties/environments/test.rb +19 -0
- data/vendor/rails/railties/fresh_rakefile +10 -0
- data/vendor/rails/railties/helpers/application.rb +6 -0
- data/vendor/rails/railties/helpers/application_helper.rb +3 -0
- data/vendor/rails/railties/helpers/test_helper.rb +36 -0
- data/vendor/rails/railties/html/404.html +30 -0
- data/vendor/rails/railties/html/500.html +30 -0
- data/vendor/rails/railties/html/favicon.ico +0 -0
- data/vendor/rails/railties/html/images/rails.png +0 -0
- data/vendor/rails/railties/html/index.html +277 -0
- data/vendor/rails/railties/html/javascripts/application.js +2 -0
- data/vendor/rails/railties/html/javascripts/controls.js +833 -0
- data/vendor/rails/railties/html/javascripts/dragdrop.js +942 -0
- data/vendor/rails/railties/html/javascripts/effects.js +1088 -0
- data/vendor/rails/railties/html/javascripts/prototype.js +2515 -0
- data/vendor/rails/railties/html/robots.txt +1 -0
- data/vendor/rails/railties/lib/code_statistics.rb +107 -0
- data/vendor/rails/railties/lib/commands.rb +17 -0
- data/vendor/rails/railties/lib/commands/about.rb +2 -0
- data/vendor/rails/railties/lib/commands/console.rb +32 -0
- data/vendor/rails/railties/lib/commands/destroy.rb +6 -0
- data/vendor/rails/railties/lib/commands/generate.rb +6 -0
- data/vendor/rails/railties/lib/commands/ncgi/listener +86 -0
- data/vendor/rails/railties/lib/commands/ncgi/tracker +69 -0
- data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +24 -0
- data/vendor/rails/railties/lib/commands/performance/profiler.rb +50 -0
- data/vendor/rails/railties/lib/commands/plugin.rb +918 -0
- data/vendor/rails/railties/lib/commands/process/inspector.rb +68 -0
- data/vendor/rails/railties/lib/commands/process/reaper.rb +149 -0
- data/vendor/rails/railties/lib/commands/process/spawner.rb +209 -0
- data/vendor/rails/railties/lib/commands/process/spinner.rb +57 -0
- data/vendor/rails/railties/lib/commands/runner.rb +48 -0
- data/vendor/rails/railties/lib/commands/server.rb +39 -0
- data/vendor/rails/railties/lib/commands/servers/base.rb +31 -0
- data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +94 -0
- data/vendor/rails/railties/lib/commands/servers/mongrel.rb +69 -0
- data/vendor/rails/railties/lib/commands/servers/webrick.rb +65 -0
- data/vendor/rails/railties/lib/commands/update.rb +4 -0
- data/vendor/rails/railties/lib/console_app.rb +27 -0
- data/vendor/rails/railties/lib/console_sandbox.rb +6 -0
- data/vendor/rails/railties/lib/console_with_helpers.rb +23 -0
- data/vendor/rails/railties/lib/dispatcher.rb +181 -0
- data/vendor/rails/railties/lib/fcgi_handler.rb +207 -0
- data/vendor/rails/railties/lib/initializer.rb +693 -0
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +123 -0
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +59 -0
- data/vendor/rails/railties/lib/rails/version.rb +9 -0
- data/vendor/rails/railties/lib/rails_generator.rb +43 -0
- data/vendor/rails/railties/lib/rails_generator/base.rb +261 -0
- data/vendor/rails/railties/lib/rails_generator/commands.rb +581 -0
- data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +42 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +175 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +30 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +37 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +14 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +34 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +37 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +14 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +26 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +38 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +11 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +15 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +35 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +39 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +22 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +4 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +1 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +30 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +63 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/USAGE +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/fixtures.yml +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/migration.rb +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/model.rb +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/unit_test.rb +0 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +37 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +92 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +85 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/fixtures.yml +11 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +57 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +17 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb +13 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/model.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +74 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/unit_test.rb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +24 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +10 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +15 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +18 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/USAGE +28 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/api_definition.rb +5 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/controller.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/functional_test.rb +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/web_service_generator.rb +29 -0
- data/vendor/rails/railties/lib/rails_generator/lookup.rb +209 -0
- data/vendor/rails/railties/lib/rails_generator/manifest.rb +53 -0
- data/vendor/rails/railties/lib/rails_generator/options.rb +143 -0
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +83 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +30 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +12 -0
- data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +46 -0
- data/vendor/rails/railties/lib/rails_generator/spec.rb +44 -0
- data/vendor/rails/railties/lib/railties_path.rb +1 -0
- data/vendor/rails/railties/lib/ruby_version_check.rb +17 -0
- data/vendor/rails/railties/lib/rubyprof_ext.rb +35 -0
- data/vendor/rails/railties/lib/tasks/annotations.rake +84 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +187 -0
- data/vendor/rails/railties/lib/tasks/documentation.rake +82 -0
- data/vendor/rails/railties/lib/tasks/framework.rake +112 -0
- data/vendor/rails/railties/lib/tasks/log.rake +9 -0
- data/vendor/rails/railties/lib/tasks/misc.rake +4 -0
- data/vendor/rails/railties/lib/tasks/pre_namespace_aliases.rake +53 -0
- data/vendor/rails/railties/lib/tasks/rails.rb +8 -0
- data/vendor/rails/railties/lib/tasks/statistics.rake +18 -0
- data/vendor/rails/railties/lib/tasks/testing.rake +120 -0
- data/vendor/rails/railties/lib/tasks/tmp.rake +37 -0
- data/vendor/rails/railties/lib/test_help.rb +17 -0
- data/vendor/rails/railties/lib/webrick_server.rb +165 -0
- data/vendor/rails/railties/test/abstract_unit.rb +17 -0
- data/vendor/rails/railties/test/dispatcher_test.rb +139 -0
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +266 -0
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -0
- data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
- data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +2 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +7 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +2 -0
- data/vendor/rails/railties/test/initializer_test.rb +22 -0
- data/vendor/rails/railties/test/mocks/dispatcher.rb +13 -0
- data/vendor/rails/railties/test/mocks/fcgi.rb +15 -0
- data/vendor/rails/railties/test/mocks/routes.rb +6 -0
- data/vendor/rails/railties/test/mocks/stubbed_breakpoint.rb +2 -0
- data/vendor/rails/railties/test/mocks/stubbed_kernel.rb +5 -0
- data/vendor/rails/railties/test/plugin_loader_test.rb +78 -0
- data/vendor/rails/railties/test/plugin_locator_test.rb +41 -0
- data/vendor/rails/railties/test/plugin_test_helper.rb +18 -0
- data/vendor/rails/railties/test/rails_generator_test.rb +137 -0
- data/vendor/rails/railties/test/rails_info_controller_test.rb +48 -0
- data/vendor/rails/railties/test/rails_info_test.rb +98 -0
- metadata +1802 -8
@@ -0,0 +1,1799 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview Common functions used in all Zapatec widgets.
|
3
|
+
*
|
4
|
+
* <pre>
|
5
|
+
* Copyright (c) 2004-2006 by Zapatec, Inc.
|
6
|
+
* http://www.zapatec.com
|
7
|
+
* 1700 MLK Way, Berkeley, California,
|
8
|
+
* 94709, U.S.A.
|
9
|
+
* All rights reserved.
|
10
|
+
* </pre>
|
11
|
+
*/
|
12
|
+
|
13
|
+
/* $Id: utils.js 5148 2006-11-15 20:14:58Z vkulov $ */
|
14
|
+
|
15
|
+
if (typeof Zapatec == 'undefined') {
|
16
|
+
/**
|
17
|
+
* Namespace definition.
|
18
|
+
* @constructor
|
19
|
+
*/
|
20
|
+
Zapatec = {};
|
21
|
+
}
|
22
|
+
|
23
|
+
/**************************** ErrorHandler ****************************/
|
24
|
+
Zapatec.ErrorHandler = {};
|
25
|
+
|
26
|
+
Zapatec.ErrorHandler.setup = function(window, report_url) {
|
27
|
+
this.window = window;
|
28
|
+
this.report_url = report_url;
|
29
|
+
|
30
|
+
this.window.onerror = Zapatec.ErrorHandler.handleError;
|
31
|
+
}
|
32
|
+
|
33
|
+
Zapatec.ErrorHandler.handleError = function(desc, path, line) {
|
34
|
+
if (Zapatec.ErrorHandler.err_stack == undefined) Zapatec.ErrorHandler.err_stack = [];
|
35
|
+
Zapatec.ErrorHandler.err_stack.push([desc, path, line]);
|
36
|
+
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
|
40
|
+
Zapatec.ErrorHandler.getErrStack = function() {
|
41
|
+
return Zapatec.ErrorHandler.err_stack;
|
42
|
+
}
|
43
|
+
|
44
|
+
//Zapatec.ErrorHandler.setup(self);
|
45
|
+
/************************** ErrorHandler end **************************/
|
46
|
+
|
47
|
+
/// define the Utils namespace
|
48
|
+
Zapatec.Utils = {};
|
49
|
+
|
50
|
+
/// Deprecated. Use Zapatec.Utils.getElementOffset instead.
|
51
|
+
/// Retrieves the absolute position (relative to <body>) of a given element.
|
52
|
+
///
|
53
|
+
/// @param el [HTMLElement] reference to the element.
|
54
|
+
/// @return [object] { x, y } containing the position.
|
55
|
+
Zapatec.Utils.getAbsolutePos = function(el, scrollOff) {
|
56
|
+
var SL = 0, ST = 0;
|
57
|
+
if (!scrollOff) {
|
58
|
+
var is_div = /^div$/i.test(el.tagName);
|
59
|
+
if (is_div && el.scrollLeft)
|
60
|
+
SL = el.scrollLeft;
|
61
|
+
if (is_div && el.scrollTop)
|
62
|
+
ST = el.scrollTop;
|
63
|
+
}
|
64
|
+
var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
|
65
|
+
if (el.offsetParent) {
|
66
|
+
var tmp = this.getAbsolutePos(el.offsetParent);
|
67
|
+
r.x += tmp.x;
|
68
|
+
r.y += tmp.y;
|
69
|
+
}
|
70
|
+
return r;
|
71
|
+
};
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Returns absolute position of an element on the page and its width and height.
|
75
|
+
*
|
76
|
+
* @private
|
77
|
+
* @param {object} objElement Element object
|
78
|
+
* @return Offset: left or x - left offset; top or y - top offset
|
79
|
+
* @object
|
80
|
+
*/
|
81
|
+
Zapatec.Utils.getElementOffset = function(objElement) {
|
82
|
+
var iLeft = iTop = iWidth = iHeight = 0;
|
83
|
+
if (objElement.getBoundingClientRect) {
|
84
|
+
// IE
|
85
|
+
var objRectangle = objElement.getBoundingClientRect();
|
86
|
+
iLeft = objRectangle.left;
|
87
|
+
iTop = objRectangle.top;
|
88
|
+
iWidth = objRectangle.right - iLeft;
|
89
|
+
iHeight = objRectangle.bottom - iTop;
|
90
|
+
// getBoundingClientRect returns coordinates relative to the window
|
91
|
+
iLeft += Zapatec.Utils.getPageScrollX() - 2;
|
92
|
+
iTop += Zapatec.Utils.getPageScrollY() - 2;
|
93
|
+
} else if (document.getBoxObjectFor) {
|
94
|
+
// Mozilla
|
95
|
+
var objRectangle = document.getBoxObjectFor(objElement);
|
96
|
+
iLeft = objRectangle.x;
|
97
|
+
iTop = objRectangle.y;
|
98
|
+
iWidth = objRectangle.width;
|
99
|
+
iHeight = objRectangle.height;
|
100
|
+
} else {
|
101
|
+
// Others
|
102
|
+
iWidth = objElement.offsetWidth;
|
103
|
+
iHeight = objElement.offsetHeight;
|
104
|
+
while (objElement.offsetParent) {
|
105
|
+
iLeft += objElement.offsetLeft;
|
106
|
+
iTop += objElement.offsetTop;
|
107
|
+
objElement = objElement.offsetParent;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
return {
|
111
|
+
left: iLeft,
|
112
|
+
top: iTop,
|
113
|
+
x: iLeft,
|
114
|
+
y: iTop,
|
115
|
+
width: iWidth,
|
116
|
+
height: iHeight
|
117
|
+
};
|
118
|
+
};
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Returns offset of content of a scrollable element relative to the document
|
122
|
+
* body. Offset is calulated as offset of an element minus scrollLeft/scrollTop
|
123
|
+
* value.
|
124
|
+
*
|
125
|
+
* @private
|
126
|
+
* @param {object} objElement Element object
|
127
|
+
* @return Offset: left or x - left offset; top or y - top offset
|
128
|
+
* @object
|
129
|
+
*/
|
130
|
+
Zapatec.Utils.getElementOffsetScrollable = function(objElement) {
|
131
|
+
var objPos = Zapatec.Utils.getElementOffset(objElement);
|
132
|
+
var iLeft = objPos.left;
|
133
|
+
if (objElement.scrollLeft) {
|
134
|
+
iLeft -= objElement.scrollLeft;
|
135
|
+
}
|
136
|
+
var iTop = objPos.top;
|
137
|
+
if (objElement.scrollTop) {
|
138
|
+
iTop -= objElement.scrollTop;
|
139
|
+
}
|
140
|
+
return {left: iLeft, top: iTop, x: iLeft, y: iTop};
|
141
|
+
};
|
142
|
+
|
143
|
+
/// Modify the position of a box to fit in browser's view. This function will
|
144
|
+
/// modify the passed object itself, so it doesn't need to return a value.
|
145
|
+
///
|
146
|
+
/// @param [object] box { x, y, width, height } specifying the area.
|
147
|
+
Zapatec.Utils.fixBoxPosition = function(box) {
|
148
|
+
if (box.x < 0)
|
149
|
+
box.x = 0;
|
150
|
+
if (box.y < 0)
|
151
|
+
box.y = 0;
|
152
|
+
var cp = Zapatec.Utils.createElement("div");
|
153
|
+
var s = cp.style;
|
154
|
+
s.position = "absolute";
|
155
|
+
s.right = s.bottom = s.width = s.height = "0px";
|
156
|
+
window.document.body.appendChild(cp);
|
157
|
+
var br = Zapatec.Utils.getAbsolutePos(cp);
|
158
|
+
window.document.body.removeChild(cp);
|
159
|
+
if (Zapatec.is_ie) {
|
160
|
+
br.y += window.document.body.scrollTop;
|
161
|
+
br.x += window.document.body.scrollLeft;
|
162
|
+
} else {
|
163
|
+
br.y += window.scrollY;
|
164
|
+
br.x += window.scrollX;
|
165
|
+
}
|
166
|
+
var tmp = box.x + box.width - br.x;
|
167
|
+
if (tmp > 0) box.x -= tmp;
|
168
|
+
tmp = box.y + box.height - br.y;
|
169
|
+
if (tmp > 0) box.y -= tmp;
|
170
|
+
};
|
171
|
+
|
172
|
+
/// Determines if an event is related to a certain element. This is a poor
|
173
|
+
/// substitute for some events that are missing from DOM since forever (like
|
174
|
+
/// onenter, onleave, which MSIE provides). Basically onmouseover and
|
175
|
+
/// onmouseout are fired even if the mouse was already in the element but moved
|
176
|
+
/// from text to a blank area, so in order not to close a popup element when
|
177
|
+
/// onmouseout occurs in this situation, one would need to first check if the
|
178
|
+
/// event is not related to that popup element:
|
179
|
+
///
|
180
|
+
/// \code
|
181
|
+
/// function handler_onMouseOut(event) {
|
182
|
+
/// if (!Zapatec.Utils.isRelated(this, event)) {
|
183
|
+
/// /// can safely hide it now
|
184
|
+
/// this.style.display = "none";
|
185
|
+
/// }
|
186
|
+
/// }
|
187
|
+
/// \endcode
|
188
|
+
///
|
189
|
+
/// @param el [HTMLElement] reference to the element to check the event against
|
190
|
+
/// @param evt [Event] reference to the Event object
|
191
|
+
/// @return [boolean] true if the event is related to the element
|
192
|
+
Zapatec.Utils.isRelated = function (el, evt) {
|
193
|
+
evt || (evt = window.event);
|
194
|
+
var related = evt.relatedTarget;
|
195
|
+
if (!related) {
|
196
|
+
var type = evt.type;
|
197
|
+
if (type == "mouseover") {
|
198
|
+
related = evt.fromElement;
|
199
|
+
} else if (type == "mouseout") {
|
200
|
+
related = evt.toElement;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
try {
|
204
|
+
while (related) {
|
205
|
+
if (related == el) {
|
206
|
+
return true;
|
207
|
+
}
|
208
|
+
related = related.parentNode;
|
209
|
+
}
|
210
|
+
} catch(e) {};
|
211
|
+
return false;
|
212
|
+
};
|
213
|
+
|
214
|
+
/// Remove a certain [CSS] class from the given element.
|
215
|
+
/// @param el [HTMLElement] reference to the element.
|
216
|
+
/// @param className [string] the class to remove.
|
217
|
+
Zapatec.Utils.removeClass = function(el, className) {
|
218
|
+
if (!(el && el.className)) {
|
219
|
+
return;
|
220
|
+
}
|
221
|
+
var cls = el.className.split(" ");
|
222
|
+
var ar = [];
|
223
|
+
for (var i = cls.length; i > 0;) {
|
224
|
+
if (cls[--i] != className) {
|
225
|
+
ar[ar.length] = cls[i];
|
226
|
+
}
|
227
|
+
}
|
228
|
+
el.className = ar.join(" ");
|
229
|
+
};
|
230
|
+
|
231
|
+
/// Appends a certain [CSS] class to the given element.
|
232
|
+
/// @param el [HTMLElement] reference to the element.
|
233
|
+
/// @param className [string] the class to append.
|
234
|
+
Zapatec.Utils.addClass = function(el, className) {
|
235
|
+
Zapatec.Utils.removeClass(el, className);
|
236
|
+
el.className += " " + className;
|
237
|
+
};
|
238
|
+
|
239
|
+
/// Retrieves the current target element for some event (useful when bubbling).
|
240
|
+
/// This function is not actually very useful, but it's legacy from the old calendar code.
|
241
|
+
/// @param ev [Event] the event object.
|
242
|
+
/// @return [HTMLElement] window.event.srcElement for MSIE, ev.currentTarget for other browsers.
|
243
|
+
Zapatec.Utils.getElement = function(ev) {
|
244
|
+
if (Zapatec.is_ie) {
|
245
|
+
return window.event.srcElement;
|
246
|
+
} else {
|
247
|
+
return ev.currentTarget;
|
248
|
+
}
|
249
|
+
};
|
250
|
+
|
251
|
+
/// Retrieves the target element for some event (useful when bubbling).
|
252
|
+
/// This function is not actually very useful, but it's legacy from the old calendar code.
|
253
|
+
/// @param ev [Event] the event object.
|
254
|
+
/// @return [HTMLElement] window.event.srcElement for MSIE, ev.target for other browsers.
|
255
|
+
Zapatec.Utils.getTargetElement = function(ev) {
|
256
|
+
if (Zapatec.is_ie) {
|
257
|
+
return window.event.srcElement;
|
258
|
+
} else {
|
259
|
+
return ev.target;
|
260
|
+
}
|
261
|
+
};
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Returns mouse position during the event.
|
265
|
+
*
|
266
|
+
* @param {object} objEvent Optional. Event object
|
267
|
+
* @return Mouse position during the event:
|
268
|
+
* <pre>
|
269
|
+
* {
|
270
|
+
* pageX: [number] x coordinate relative to the document,
|
271
|
+
* pageY: [number] y coordinate relative to the document,
|
272
|
+
* clientX: [number] x coordinate relative to the window,
|
273
|
+
* clientY: [number] y coordinate relative to the window
|
274
|
+
* }
|
275
|
+
* </pre>
|
276
|
+
* @type object
|
277
|
+
*/
|
278
|
+
Zapatec.Utils.getMousePos = function(objEvent) {
|
279
|
+
var objPos = {
|
280
|
+
pageX: 0,
|
281
|
+
pageY: 0,
|
282
|
+
clientX: 0,
|
283
|
+
clientY: 0
|
284
|
+
};
|
285
|
+
var boolIsPageX = (typeof objEvent.pageX != 'undefined');
|
286
|
+
var boolIsClientX = (typeof objEvent.clientX != 'undefined');
|
287
|
+
objEvent || (objEvent = window.event);
|
288
|
+
if (objEvent && (boolIsPageX || boolIsClientX)) {
|
289
|
+
if (boolIsPageX) {
|
290
|
+
objPos.pageX = objEvent.pageX;
|
291
|
+
objPos.pageY = objEvent.pageY;
|
292
|
+
} else {
|
293
|
+
objPos.pageX = objEvent.clientX + Zapatec.Utils.getPageScrollX();
|
294
|
+
objPos.pageY = objEvent.clientY + Zapatec.Utils.getPageScrollY();
|
295
|
+
}
|
296
|
+
if (boolIsClientX) {
|
297
|
+
objPos.clientX = objEvent.clientX;
|
298
|
+
objPos.clientY = objEvent.clientY;
|
299
|
+
} else {
|
300
|
+
objPos.clientX = objEvent.pageX - Zapatec.Utils.getPageScrollX();
|
301
|
+
objPos.clientY = objEvent.pageY - Zapatec.Utils.getPageScrollY();
|
302
|
+
}
|
303
|
+
}
|
304
|
+
return objPos;
|
305
|
+
};
|
306
|
+
|
307
|
+
/// Stops bubbling and propagation of some event.
|
308
|
+
/// @param ev [Event] the event object
|
309
|
+
/// @return false
|
310
|
+
Zapatec.Utils.stopEvent = function(ev) {
|
311
|
+
ev || (ev = window.event);
|
312
|
+
if (ev) {
|
313
|
+
if (Zapatec.is_ie) {
|
314
|
+
ev.cancelBubble = true;
|
315
|
+
ev.returnValue = false;
|
316
|
+
} else {
|
317
|
+
ev.preventDefault();
|
318
|
+
ev.stopPropagation();
|
319
|
+
}
|
320
|
+
}
|
321
|
+
return false;
|
322
|
+
};
|
323
|
+
|
324
|
+
Zapatec.Utils.removeOnUnload = [];
|
325
|
+
/// Adds an event handler to a certain element. This function adds a handler
|
326
|
+
/// using the DOM2 addEventListener (or attachEvent for MSIE). Doing this
|
327
|
+
/// means that you can add multiple handlers for the same element and same
|
328
|
+
/// event name, and they will be called in order.
|
329
|
+
///
|
330
|
+
/// WARNING: for really old browsers that don't support attachEvent nor
|
331
|
+
/// addEventListener, it falls back to the default way: el.onclick = func.
|
332
|
+
/// This means that you CANNOT add multiple handlers in those browsers, as a
|
333
|
+
/// new one will override the old one.
|
334
|
+
///
|
335
|
+
/// @param el [HTMLElement] reference to the element.
|
336
|
+
/// @param evname [string] the event name, excluding the "on" prefix.
|
337
|
+
/// @param func event handler function.
|
338
|
+
/// @param useCapture [boolean, optional] default: false, see
|
339
|
+
/// http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget-addEventListener
|
340
|
+
/// for details
|
341
|
+
Zapatec.Utils.addEvent = function(el, evname, func, useCapture) {
|
342
|
+
if (el.addEventListener) { // Gecko / W3C
|
343
|
+
if (!useCapture) {
|
344
|
+
useCapture = false;
|
345
|
+
}
|
346
|
+
el.addEventListener(evname, func, useCapture);
|
347
|
+
} else if (el.attachEvent) { // IE
|
348
|
+
el.detachEvent("on" + evname, func);
|
349
|
+
el.attachEvent("on" + evname, func);
|
350
|
+
if (useCapture) {el.setCapture(false);}
|
351
|
+
} else {
|
352
|
+
el["on" + evname] = func;
|
353
|
+
}
|
354
|
+
Zapatec.Utils.removeOnUnload.push({"element" : el, "event" : evname, "listener" : func});
|
355
|
+
};
|
356
|
+
|
357
|
+
/// Removes an event handler added with Zapatec.Utils.addEvent(). The
|
358
|
+
/// prototype scheme is the same.
|
359
|
+
Zapatec.Utils.removeEvent = function(el, evname, func) {
|
360
|
+
if (el.detachEvent) { // IE
|
361
|
+
el.detachEvent("on" + evname, func);
|
362
|
+
} else if (el.removeEventListener) { // Gecko / W3C
|
363
|
+
el.removeEventListener(evname, func, false);
|
364
|
+
} else {
|
365
|
+
el["on" + evname] = null;
|
366
|
+
}
|
367
|
+
};
|
368
|
+
|
369
|
+
/// Create an element of a certain type using document.createElement(). A
|
370
|
+
/// function was needed in order to add some common attributes to all created
|
371
|
+
/// elements, but also in order to be able to use it in XHTML too (Gecko and
|
372
|
+
/// other W3C-compliant browsers).
|
373
|
+
///
|
374
|
+
/// This function will create an element of the given type and set certain
|
375
|
+
/// properties to it: unselectable for IE, and the CSS "-moz-user-select" for
|
376
|
+
/// Gecko, in order to make the element unselectable in these browsers.
|
377
|
+
/// Optionally, if the second argument is passed, it will appendChild() the
|
378
|
+
/// newly created element to its parent.
|
379
|
+
///
|
380
|
+
/// @param type [string] the tag name of the new element.
|
381
|
+
/// @param parent [HTMLElement, optional] a parent for the new element.
|
382
|
+
/// @param selectable [boolean] the flag to indicate wether element is selectable(rather usefull).
|
383
|
+
/// @return [HTMLElement] reference to the new element.
|
384
|
+
Zapatec.Utils.createElement = function(type, parent, selectable) {
|
385
|
+
var el = null;
|
386
|
+
if (window.self.document.createElementNS)
|
387
|
+
// use the XHTML namespace; IE won't normally get here unless
|
388
|
+
// _they_ "fix" the DOM2 implementation.
|
389
|
+
el = window.self.document.createElementNS("http://www.w3.org/1999/xhtml", type);
|
390
|
+
else
|
391
|
+
el = document.createElement(type);
|
392
|
+
if (typeof parent != "undefined" && parent != null)
|
393
|
+
parent.appendChild(el);
|
394
|
+
if (!selectable) {
|
395
|
+
if (Zapatec.is_ie)
|
396
|
+
el.setAttribute("unselectable", true);
|
397
|
+
if (Zapatec.is_gecko)
|
398
|
+
el.style.setProperty("-moz-user-select", "none", "");
|
399
|
+
}
|
400
|
+
return el;
|
401
|
+
};
|
402
|
+
|
403
|
+
// Cookie management
|
404
|
+
|
405
|
+
/// Sets a cooke given certain specifications. It overrides any existing
|
406
|
+
/// cookie with the same name.
|
407
|
+
///
|
408
|
+
/// @param name [string] the cookie name.
|
409
|
+
/// @param value [string] the cookie value.
|
410
|
+
/// @param domain [string, optional] the cookie domain.
|
411
|
+
/// @param path [string, optional] the cookie path.
|
412
|
+
/// @param exp_days [number, optional] number of days of cookie validity.
|
413
|
+
Zapatec.Utils.writeCookie = function(name, value, domain, path, exp_days) {
|
414
|
+
value = escape(value);
|
415
|
+
var ck = name + "=" + value, exp;
|
416
|
+
if (domain)
|
417
|
+
ck += ";domain=" + domain;
|
418
|
+
if (path)
|
419
|
+
ck += ";path=" + path;
|
420
|
+
if (exp_days) {
|
421
|
+
exp = new Date();
|
422
|
+
exp.setTime(exp_days * 86400000 + exp.getTime());
|
423
|
+
ck += ";expires=" + exp.toGMTString();
|
424
|
+
}
|
425
|
+
document.cookie = ck;
|
426
|
+
};
|
427
|
+
|
428
|
+
/**
|
429
|
+
* Retrieves the value of a cookie.
|
430
|
+
*
|
431
|
+
* @param name [string] the cookie name
|
432
|
+
* @return [string or null] a string with the cookie value, or null if it can't be found.
|
433
|
+
*/
|
434
|
+
|
435
|
+
/* ? inside regular expression is not supported in IE 5.0
|
436
|
+
Zapatec.Utils.getCookie = function(name) {
|
437
|
+
var re = new RegExp("(^|;\\s*)" + name + "\\s*=(.*?)(;|$)");
|
438
|
+
if (re.test(document.cookie)) {
|
439
|
+
var value = RegExp.$2;
|
440
|
+
value = unescape(value);
|
441
|
+
return (value);
|
442
|
+
}
|
443
|
+
return null;
|
444
|
+
};
|
445
|
+
*/
|
446
|
+
|
447
|
+
Zapatec.Utils.getCookie = function(name) {
|
448
|
+
var pattern = name + "=";
|
449
|
+
var tokenPos = 0;
|
450
|
+
while (tokenPos < document.cookie.length) {
|
451
|
+
var valuePos = tokenPos + pattern.length;
|
452
|
+
if (document.cookie.substring(tokenPos, valuePos) == pattern) {
|
453
|
+
var endValuePos = document.cookie.indexOf(";", valuePos);
|
454
|
+
if (endValuePos == -1) { // Last cookie
|
455
|
+
endValuePos = document.cookie.length;
|
456
|
+
}
|
457
|
+
return unescape(document.cookie.substring(valuePos, endValuePos));
|
458
|
+
}
|
459
|
+
tokenPos=document.cookie.indexOf(" ",tokenPos)+1;
|
460
|
+
if (tokenPos == 0) { // No more tokens
|
461
|
+
break;
|
462
|
+
}
|
463
|
+
}
|
464
|
+
return null;
|
465
|
+
};
|
466
|
+
|
467
|
+
/**
|
468
|
+
* Given an object, create a string suitable for saving the object in a cookie.
|
469
|
+
* This is similar to serialization. WARNING: it does not support nested
|
470
|
+
* objects.
|
471
|
+
*
|
472
|
+
* @param obj [Object] reference to the object to serialize.
|
473
|
+
* @return [string] the serialized object.
|
474
|
+
*/
|
475
|
+
Zapatec.Utils.makePref = function(obj) {
|
476
|
+
function stringify(val) {
|
477
|
+
if (typeof val == "object" && !val)
|
478
|
+
return "null";
|
479
|
+
else if (typeof val == "number" || typeof val == "boolean")
|
480
|
+
return val;
|
481
|
+
else if (typeof val == "string")
|
482
|
+
return '"' + val.replace(/\x22/, "\\22") + '"';
|
483
|
+
else return null;
|
484
|
+
};
|
485
|
+
var txt = "", i;
|
486
|
+
for (i in obj)
|
487
|
+
txt += (txt ? ",'" : "'") + i + "':" + stringify(obj[i]);
|
488
|
+
return txt;
|
489
|
+
};
|
490
|
+
|
491
|
+
/**
|
492
|
+
* The reverse of Zapatec.Utils.makePref(), this function unserializes the
|
493
|
+
* given string and creates an object from it.
|
494
|
+
*
|
495
|
+
* @param txt [string] the serialized value.
|
496
|
+
* @return [Object] a new object if it was created successfully or null otherwise.
|
497
|
+
*/
|
498
|
+
Zapatec.Utils.loadPref = function(txt) {
|
499
|
+
var obj = null;
|
500
|
+
try {
|
501
|
+
eval("obj={" + txt + "}");
|
502
|
+
} catch(e) {}
|
503
|
+
return obj;
|
504
|
+
};
|
505
|
+
|
506
|
+
/**
|
507
|
+
* Merges the values of the source object into the destination object.
|
508
|
+
*
|
509
|
+
* @param dest [Object] the destination object.
|
510
|
+
* @param src [Object] the source object.
|
511
|
+
*/
|
512
|
+
Zapatec.Utils.mergeObjects = function(dest, src) {
|
513
|
+
for (var i in src)
|
514
|
+
dest[i] = src[i];
|
515
|
+
};
|
516
|
+
|
517
|
+
// based on the WCH idea
|
518
|
+
// http://www.aplus.co.yu/WCH/code3/WCH.js
|
519
|
+
|
520
|
+
/// \defgroup WCH functions
|
521
|
+
//@{
|
522
|
+
|
523
|
+
Zapatec.Utils.__wch_id = 0; /**< [number, static] used to create ID-s for the WCH objects */
|
524
|
+
|
525
|
+
/**
|
526
|
+
* Create an WCH object. This function does nothing if the browser is not
|
527
|
+
* IE5.5 or IE6.0. A WCH object is one of the most bizarre tricks to avoid a
|
528
|
+
* notorious IE bug: IE normally shows "windowed controls" on top of any HTML
|
529
|
+
* elements, regardless of any z-index that might be specified in CSS. This
|
530
|
+
* technique is described at: http://www.aplus.co.yu/WCH/
|
531
|
+
*
|
532
|
+
* A "WCH object" is actually an HTMLIFrame element having a certain "CSS
|
533
|
+
* filter" (proprietary MSIE extension) that forces opacity zero. This object,
|
534
|
+
* displayed on top of a windowed control such as a select box, will completely
|
535
|
+
* hide the select box, allowing us to place other HTMLElement objects above.
|
536
|
+
*
|
537
|
+
* WCH stands for "Windowed Controls Hider".
|
538
|
+
*
|
539
|
+
* @param element [HTMLElement, optional] -- Create the WCH IFRAME inside this.
|
540
|
+
*
|
541
|
+
*
|
542
|
+
* @return [HTMLIFrame or null] a new WCH object if the browser is "supported", null otherwise.
|
543
|
+
*/
|
544
|
+
Zapatec.Utils.createWCH = function(element) {
|
545
|
+
var f = null;
|
546
|
+
element = element || window.self.document.body;
|
547
|
+
if (Zapatec.is_ie && !Zapatec.is_ie5) {
|
548
|
+
var filter = 'filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);';
|
549
|
+
var id = "WCH" + (++Zapatec.Utils.__wch_id);
|
550
|
+
element.insertAdjacentHTML
|
551
|
+
('beforeEnd', '<iframe id="' + id + '" scroll="no" frameborder="0" ' +
|
552
|
+
'style="z-index:0;position:absolute;visibility:hidden;' + filter +
|
553
|
+
'border:0;top:0;left:0;width:0;height:0;" ' +
|
554
|
+
'src="javascript:false;"></iframe>');
|
555
|
+
f = window.self.document.getElementById(id);
|
556
|
+
}
|
557
|
+
return f;
|
558
|
+
};
|
559
|
+
|
560
|
+
/**
|
561
|
+
* Configure a given WCH object to be displayed on top of the given element.
|
562
|
+
* Optionally, a second element can be passed, and in this case it will setup
|
563
|
+
* the WCH object to cover both elements.
|
564
|
+
*
|
565
|
+
* @param f [HTMLIFrame] the WCH object
|
566
|
+
* @param el [HTMLElement] the element to cover.
|
567
|
+
* @param el2 [HTMLElement, optional] another element to cover.
|
568
|
+
*/
|
569
|
+
Zapatec.Utils.setupWCH_el = function(f, el, el2) {
|
570
|
+
if (f) {
|
571
|
+
var pos = Zapatec.Utils.getAbsolutePos(el),
|
572
|
+
X1 = pos.x,
|
573
|
+
Y1 = pos.y,
|
574
|
+
X2 = X1 + el.offsetWidth,
|
575
|
+
Y2 = Y1 + el.offsetHeight;
|
576
|
+
if (el2) {
|
577
|
+
var p2 = Zapatec.Utils.getAbsolutePos(el2),
|
578
|
+
XX1 = p2.x,
|
579
|
+
YY1 = p2.y,
|
580
|
+
XX2 = XX1 + el2.offsetWidth,
|
581
|
+
YY2 = YY1 + el2.offsetHeight;
|
582
|
+
if (X1 > XX1)
|
583
|
+
X1 = XX1;
|
584
|
+
if (Y1 > YY1)
|
585
|
+
Y1 = YY1;
|
586
|
+
if (X2 < XX2)
|
587
|
+
X2 = XX2;
|
588
|
+
if (Y2 < YY2)
|
589
|
+
Y2 = YY2;
|
590
|
+
}
|
591
|
+
Zapatec.Utils.setupWCH(f, X1, Y1, X2-X1, Y2-Y1);
|
592
|
+
}
|
593
|
+
};
|
594
|
+
|
595
|
+
/**
|
596
|
+
* Configure a WCH object to cover a certain part of the screen.
|
597
|
+
*
|
598
|
+
* @param f [HTMLIFrame] the WCH object.
|
599
|
+
* @param x [number] the X coordinate.
|
600
|
+
* @param y [number] the Y coordinate.
|
601
|
+
* @param w [number] the width of the area.
|
602
|
+
* @param h [number] the height of the area.
|
603
|
+
*/
|
604
|
+
Zapatec.Utils.setupWCH = function(f, x, y, w, h) {
|
605
|
+
if (f) {
|
606
|
+
var s = f.style;
|
607
|
+
(typeof x != "undefined") && (s.left = x + "px");
|
608
|
+
(typeof y != "undefined") && (s.top = y + "px");
|
609
|
+
(typeof w != "undefined") && (s.width = w + "px");
|
610
|
+
(typeof h != "undefined") && (s.height = h + "px");
|
611
|
+
s.visibility = "inherit";
|
612
|
+
}
|
613
|
+
};
|
614
|
+
|
615
|
+
/**
|
616
|
+
* Hide a WCH object.
|
617
|
+
*
|
618
|
+
* @param f [HTMLIFrame] object to hide.
|
619
|
+
*/
|
620
|
+
Zapatec.Utils.hideWCH = function(f) {
|
621
|
+
if (f)
|
622
|
+
f.style.visibility = "hidden";
|
623
|
+
};
|
624
|
+
|
625
|
+
//@}
|
626
|
+
|
627
|
+
/// \defgroup Scroll-with-window functions
|
628
|
+
//@{
|
629
|
+
|
630
|
+
/**
|
631
|
+
* Returns current document vertical scroll position.
|
632
|
+
*/
|
633
|
+
Zapatec.Utils.getPageScrollY = function() {
|
634
|
+
if (window.pageYOffset) {
|
635
|
+
return window.pageYOffset;
|
636
|
+
} else if (document.body && document.body.scrollTop) {
|
637
|
+
return document.body.scrollTop;
|
638
|
+
} else if (document.documentElement && document.documentElement.scrollTop) {
|
639
|
+
return document.documentElement.scrollTop;
|
640
|
+
}
|
641
|
+
return 0;
|
642
|
+
};
|
643
|
+
|
644
|
+
/**
|
645
|
+
* Returns current document horizontal scroll position.
|
646
|
+
*/
|
647
|
+
Zapatec.Utils.getPageScrollX = function() {
|
648
|
+
if (window.pageXOffset) {
|
649
|
+
return window.pageXOffset;
|
650
|
+
} else if (document.body && document.body.scrollLeft) {
|
651
|
+
return document.body.scrollLeft;
|
652
|
+
} else if (document.documentElement && document.documentElement.scrollLeft) {
|
653
|
+
return document.documentElement.scrollLeft;
|
654
|
+
}
|
655
|
+
return 0;
|
656
|
+
};
|
657
|
+
|
658
|
+
// Object setup.
|
659
|
+
Zapatec.ScrollWithWindow = {};
|
660
|
+
Zapatec.ScrollWithWindow.list = [];
|
661
|
+
// Set to a number between 0 and 1, lower means longer scrolling.
|
662
|
+
Zapatec.ScrollWithWindow.stickiness = 0.25;
|
663
|
+
|
664
|
+
/**
|
665
|
+
* Registers a given object to have its style.top set equal to the window
|
666
|
+
* scroll position as the browser scrolls.
|
667
|
+
*
|
668
|
+
* @param node [HTMLElement] -- a reference to the node to scroll.
|
669
|
+
*/
|
670
|
+
Zapatec.ScrollWithWindow.register = function(node) {
|
671
|
+
var top = node.offsetTop || 0;
|
672
|
+
var left = node.offsetLeft || 0;
|
673
|
+
Zapatec.ScrollWithWindow.list[Zapatec.ScrollWithWindow.list.length] = {
|
674
|
+
node: node,
|
675
|
+
origTop: top,
|
676
|
+
origleft: left
|
677
|
+
};
|
678
|
+
};
|
679
|
+
|
680
|
+
/**
|
681
|
+
* Unregisters a given object.
|
682
|
+
*
|
683
|
+
* @param node [HTMLElement] -- a reference to the node to scroll.
|
684
|
+
*/
|
685
|
+
Zapatec.ScrollWithWindow.unregister = function(node) {
|
686
|
+
for (var count = 0; count < Zapatec.ScrollWithWindow.list.length; count++) {
|
687
|
+
var elm = Zapatec.ScrollWithWindow.list[count];
|
688
|
+
if (node == elm.node) {
|
689
|
+
Zapatec.ScrollWithWindow.list.splice(count, 1);
|
690
|
+
return;
|
691
|
+
}
|
692
|
+
}
|
693
|
+
};
|
694
|
+
|
695
|
+
/**
|
696
|
+
* \internal Called each time the window is scrolled to set objects' positions.
|
697
|
+
*
|
698
|
+
* @param newScrollY [number] -- the new window scroll position.
|
699
|
+
* @param direction [string] - "vertical"/"horizontal" controlls which scrolling we are handling
|
700
|
+
*/
|
701
|
+
Zapatec.ScrollWithWindow.handler = function(newScroll, direction) {
|
702
|
+
// Move oldScrollY towards newScrollY, evening up if the difference is small.
|
703
|
+
if (direction == "vertical") {
|
704
|
+
var newScrollY = newScroll;
|
705
|
+
oldScrollY += ((newScrollY - oldScrollY) * this.stickiness);
|
706
|
+
if (Math.abs(oldScrollY - newScrollY) <= 1) oldScrollY = newScrollY;
|
707
|
+
} else {
|
708
|
+
var newScrollX = newScroll;
|
709
|
+
oldScrollX += ((newScrollX - oldScrollX) * this.stickiness);
|
710
|
+
if (Math.abs(oldScrollX - newScrollX) <= 1) oldScrollX = newScrollX;
|
711
|
+
}
|
712
|
+
for (var count = 0; count < Zapatec.ScrollWithWindow.list.length; count++) {
|
713
|
+
var elm = Zapatec.ScrollWithWindow.list[count];
|
714
|
+
var node = elm.node;
|
715
|
+
node.style.position = 'absolute';
|
716
|
+
if (!elm.origTop && elm.origTop !== 0 && (direction == "vertical")) {
|
717
|
+
elm.origTop = parseInt(node.style.top) || 0;
|
718
|
+
}
|
719
|
+
if (!elm.origLeft && elm.origLeft !== 0 && (direction == "horizontal")) {
|
720
|
+
elm.origLeft = parseInt(node.style.left) || 0;
|
721
|
+
}
|
722
|
+
if (direction == "vertical") {
|
723
|
+
node.style.top = (elm.origTop + parseInt(oldScrollY)) + 'px';
|
724
|
+
} else {
|
725
|
+
node.style.left = (elm.origLeft + parseInt(oldScrollX)) + 'px';
|
726
|
+
}
|
727
|
+
}
|
728
|
+
};
|
729
|
+
|
730
|
+
// Processed scroll position & Event hook.
|
731
|
+
var oldScrollY = Zapatec.Utils.getPageScrollY();
|
732
|
+
var oldScrollX = Zapatec.Utils.getPageScrollX();
|
733
|
+
setInterval(
|
734
|
+
'var newScrollY = Zapatec.Utils.getPageScrollY(); ' +
|
735
|
+
'var newScrollX = Zapatec.Utils.getPageScrollX(); ' +
|
736
|
+
'if (newScrollY != oldScrollY) { ' +
|
737
|
+
'Zapatec.ScrollWithWindow.handler(newScrollY, "vertical"); ' +
|
738
|
+
'}' +
|
739
|
+
'if (newScrollX != oldScrollX) { ' +
|
740
|
+
'Zapatec.ScrollWithWindow.handler(newScrollX, "horizontal"); ' +
|
741
|
+
'}', 50);
|
742
|
+
|
743
|
+
//@}
|
744
|
+
|
745
|
+
/**
|
746
|
+
* Destroys the given element (remove it from the DOM tree) if it's not null
|
747
|
+
* and it's parent is not null.
|
748
|
+
*
|
749
|
+
* @param el [HTMLElement] the element to destroy.
|
750
|
+
*/
|
751
|
+
Zapatec.Utils.destroy = function(el) {
|
752
|
+
if (el && el.parentNode)
|
753
|
+
el.parentNode.removeChild(el);
|
754
|
+
};
|
755
|
+
|
756
|
+
/**
|
757
|
+
* Opens a new window at a certain URL and having some properties.
|
758
|
+
*
|
759
|
+
* @param url [string] the URL to open a new window to.
|
760
|
+
* @param windowName [string] the name of the new window (as for target attribute).
|
761
|
+
* @param width [number] the width of the new window in pixels.
|
762
|
+
* @param height [number] the height of the new window in pixels.
|
763
|
+
* @param scrollbars [string] "yes" or "no" for scrollbars.
|
764
|
+
*
|
765
|
+
* @return [object] the new window
|
766
|
+
*/
|
767
|
+
Zapatec.Utils.newCenteredWindow = function(url, windowName, width, height, scrollbars){
|
768
|
+
var leftPosition = 0;
|
769
|
+
var topPosition = 0;
|
770
|
+
if (screen.width)
|
771
|
+
leftPosition = (screen.width - width)/2;
|
772
|
+
if (screen.height)
|
773
|
+
topPosition = (screen.height - height)/2;
|
774
|
+
var winArgs =
|
775
|
+
'height=' + height +
|
776
|
+
',width=' + width +
|
777
|
+
',top=' + topPosition +
|
778
|
+
',left=' + leftPosition +
|
779
|
+
',scrollbars=' + scrollbars +
|
780
|
+
',resizable';
|
781
|
+
var win = window.open(url,windowName,winArgs);
|
782
|
+
return win;
|
783
|
+
};
|
784
|
+
|
785
|
+
/**
|
786
|
+
* Finds the size of the current web page. This is the usable size
|
787
|
+
* and does not include the browser's menu and buttons.
|
788
|
+
*
|
789
|
+
* @return [object] dimension with the height and width of the window
|
790
|
+
*/
|
791
|
+
Zapatec.Utils.getWindowSize = function() {
|
792
|
+
var iWidth = 0;
|
793
|
+
var iHeight = 0;
|
794
|
+
|
795
|
+
if (Zapatec.is_opera) {
|
796
|
+
iWidth = document.body.clientWidth || 0;
|
797
|
+
iHeight = document.body.clientHeight || 0;
|
798
|
+
} else if (Zapatec.is_khtml) {
|
799
|
+
iWidth = window.innerWidth || 0;
|
800
|
+
iHeight = window.innerHeight || 0;
|
801
|
+
} else if (document.compatMode && document.compatMode == 'CSS1Compat') {
|
802
|
+
// Standards-compliant mode
|
803
|
+
iWidth = document.documentElement.clientWidth || 0;
|
804
|
+
iHeight = document.documentElement.clientHeight || 0;
|
805
|
+
} else {
|
806
|
+
// Non standards-compliant mode
|
807
|
+
iWidth = document.body.clientWidth || 0;
|
808
|
+
iHeight = document.body.clientHeight || 0;
|
809
|
+
}
|
810
|
+
|
811
|
+
return {
|
812
|
+
width: iWidth,
|
813
|
+
height: iHeight
|
814
|
+
};
|
815
|
+
};
|
816
|
+
|
817
|
+
|
818
|
+
/**
|
819
|
+
* Given a reference to a select element, this function will select the option
|
820
|
+
* having the given value and optionally will call the default handler for
|
821
|
+
* "onchange".
|
822
|
+
*
|
823
|
+
* @param sel [HTMLSelectElement] reference to the SELECT element.
|
824
|
+
* @param val [string] the value that we should select.
|
825
|
+
* @param call_default [boolean] true if the default onchange should be called.
|
826
|
+
*/
|
827
|
+
Zapatec.Utils.selectOption = function(sel, val, call_default) {
|
828
|
+
var a = sel.options, i, o;
|
829
|
+
for (i = a.length; --i >= 0;) {
|
830
|
+
o = a[i];
|
831
|
+
o.selected = (o.val == val);
|
832
|
+
}
|
833
|
+
sel.value = val;
|
834
|
+
if (call_default) {
|
835
|
+
if (typeof sel.onchange == "function")
|
836
|
+
sel.onchange();
|
837
|
+
else if (typeof sel.onchange == "string")
|
838
|
+
eval(sel.onchange);
|
839
|
+
}
|
840
|
+
};
|
841
|
+
|
842
|
+
/**
|
843
|
+
* A more flexible way to get the "nextSibling" of a given element. If the
|
844
|
+
* "tag" argument is passed, then this function will return the next sibling
|
845
|
+
* that has a certain tag. Otherwise it will simply return el.nextSibling.
|
846
|
+
*
|
847
|
+
* @param {object} el Element object
|
848
|
+
* @param {string} tag Optional. Tag name of the returned element
|
849
|
+
* @param {string} alternateTag Optional. Alternate tag name of the returned
|
850
|
+
* element
|
851
|
+
* @return First element after el having the specified tag; null if element
|
852
|
+
* is not found; nextSibling if tag is not specified
|
853
|
+
* @type object
|
854
|
+
*/
|
855
|
+
Zapatec.Utils.getNextSibling = function(el, tag, alternateTag) {
|
856
|
+
el = el.nextSibling;
|
857
|
+
if (!tag) {
|
858
|
+
return el;
|
859
|
+
}
|
860
|
+
tag = tag.toLowerCase();
|
861
|
+
if (alternateTag) alternateTag = alternateTag.toLowerCase();
|
862
|
+
while (el) {
|
863
|
+
if (el.nodeType == 1 && (el.tagName.toLowerCase() == tag ||
|
864
|
+
(alternateTag && el.tagName.toLowerCase() == alternateTag))) {
|
865
|
+
return el;
|
866
|
+
}
|
867
|
+
el = el.nextSibling;
|
868
|
+
}
|
869
|
+
return el;
|
870
|
+
};
|
871
|
+
|
872
|
+
/**
|
873
|
+
* A more flexible way to get the "previousSibling" of a given element. If the
|
874
|
+
* "tag" argument is passed, then this function will return the previous sibling
|
875
|
+
* that has a certain tag. Otherwise it will simply return el.previousSibling.
|
876
|
+
*
|
877
|
+
* @param {object} el Element object
|
878
|
+
* @param {string} tag Optional. Tag name of the returned element
|
879
|
+
* @param {string} alternateTag Optional. Alternate tag name of the returned
|
880
|
+
* element
|
881
|
+
* @return First element before el having the specified tag; previousSibling if
|
882
|
+
* tag is not specified; null if desired element is not found
|
883
|
+
* @type object
|
884
|
+
*/
|
885
|
+
Zapatec.Utils.getPreviousSibling = function(el, tag, alternateTag) {
|
886
|
+
el = el.previousSibling;
|
887
|
+
if (!tag) {
|
888
|
+
return el;
|
889
|
+
}
|
890
|
+
tag = tag.toLowerCase();
|
891
|
+
if (alternateTag) alternateTag = alternateTag.toLowerCase();
|
892
|
+
while (el) {
|
893
|
+
if (el.nodeType == 1 && (el.tagName.toLowerCase() == tag ||
|
894
|
+
(alternateTag && el.tagName.toLowerCase() == alternateTag))) {
|
895
|
+
return el;
|
896
|
+
}
|
897
|
+
el = el.previousSibling;
|
898
|
+
}
|
899
|
+
return el;
|
900
|
+
};
|
901
|
+
|
902
|
+
/**
|
903
|
+
* Returns first child of the given element that has a specified tag.
|
904
|
+
*
|
905
|
+
* @param {object} el Element object
|
906
|
+
* @param {string} tag Optional. Tag name of the returned element
|
907
|
+
* @param {string} alternateTag Optional. Alternate tag name of the returned
|
908
|
+
* element
|
909
|
+
* @return First child of the element that has a specified tag; firstChild if
|
910
|
+
* tag is not specified; null if desired element is not found
|
911
|
+
* @type object
|
912
|
+
*/
|
913
|
+
Zapatec.Utils.getFirstChild = function(el, tag, alternateTag) {
|
914
|
+
if (!el) {
|
915
|
+
return null;
|
916
|
+
}
|
917
|
+
el = el.firstChild;
|
918
|
+
if (!el) {
|
919
|
+
return null;
|
920
|
+
}
|
921
|
+
if (!tag) {
|
922
|
+
return el;
|
923
|
+
}
|
924
|
+
tag = tag.toLowerCase();
|
925
|
+
if (el.nodeType == 1) {
|
926
|
+
if (el.tagName.toLowerCase() == tag) {
|
927
|
+
return el;
|
928
|
+
} else if (alternateTag) {
|
929
|
+
alternateTag = alternateTag.toLowerCase();
|
930
|
+
if (el.tagName.toLowerCase() == alternateTag) {
|
931
|
+
return el;
|
932
|
+
}
|
933
|
+
}
|
934
|
+
}
|
935
|
+
return Zapatec.Utils.getNextSibling(el, tag, alternateTag);
|
936
|
+
};
|
937
|
+
|
938
|
+
/**
|
939
|
+
* Returns last child of the given element that has a specified tag.
|
940
|
+
*
|
941
|
+
* @param {object} el Element object
|
942
|
+
* @param {string} tag Optional. Tag name of the returned element
|
943
|
+
* @param {string} alternateTag Optional. Alternate tag name of the returned
|
944
|
+
* element
|
945
|
+
* @return Last child of the element that has a specified tag; lastChild if
|
946
|
+
* tag is not specified; null if desired element is not found
|
947
|
+
* @type object
|
948
|
+
*/
|
949
|
+
Zapatec.Utils.getLastChild = function(el, tag, alternateTag) {
|
950
|
+
if (!el) {
|
951
|
+
return null;
|
952
|
+
}
|
953
|
+
el = el.lastChild;
|
954
|
+
if (!el) {
|
955
|
+
return null;
|
956
|
+
}
|
957
|
+
if (!tag) {
|
958
|
+
return el;
|
959
|
+
}
|
960
|
+
tag = tag.toLowerCase();
|
961
|
+
if (el.nodeType == 1) {
|
962
|
+
if (el.tagName.toLowerCase() == tag) {
|
963
|
+
return el;
|
964
|
+
} else if (alternateTag) {
|
965
|
+
alternateTag = alternateTag.toLowerCase();
|
966
|
+
if (el.tagName.toLowerCase() == alternateTag) {
|
967
|
+
return el;
|
968
|
+
}
|
969
|
+
}
|
970
|
+
}
|
971
|
+
return Zapatec.Utils.getPreviousSibling(el, tag, alternateTag);
|
972
|
+
};
|
973
|
+
|
974
|
+
/**
|
975
|
+
* Function that concatenates and returns all text child nodes of the
|
976
|
+
* specified node.
|
977
|
+
*
|
978
|
+
* @param objNode [Node] -- reference to the node.
|
979
|
+
* @return [string] -- concatenated text child nodes
|
980
|
+
*/
|
981
|
+
Zapatec.Utils.getChildText = function(objNode) {
|
982
|
+
if (objNode == null) {
|
983
|
+
return '';
|
984
|
+
}
|
985
|
+
var arrText = [];
|
986
|
+
var objChild = objNode.firstChild;
|
987
|
+
while (objChild != null) {
|
988
|
+
if (objChild.nodeType == 3) { // Node.TEXT_NODE
|
989
|
+
arrText.push(objChild.data);
|
990
|
+
}
|
991
|
+
objChild = objChild.nextSibling;
|
992
|
+
}
|
993
|
+
return arrText.join(' ');
|
994
|
+
};
|
995
|
+
|
996
|
+
/**
|
997
|
+
* Similar to the DOM's built in insertBefore.
|
998
|
+
* Insert a node after an existing node.
|
999
|
+
*
|
1000
|
+
* @param el [oldNode] The existing element
|
1001
|
+
* @param el [newNode] the new element to insert after the old one.
|
1002
|
+
*
|
1003
|
+
*/
|
1004
|
+
Zapatec.Utils.insertAfter = function(oldNode, newNode) {
|
1005
|
+
if(oldNode.nextSibling) {
|
1006
|
+
oldNode.parentNode.insertBefore(newNode, oldNode.nextSibling);
|
1007
|
+
} else {
|
1008
|
+
oldNode.parentNode.appendChild(newNode);
|
1009
|
+
}
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
Zapatec.Utils._ids = {}; /**< [number, static] maintains a list of generated IDs */
|
1013
|
+
|
1014
|
+
/**
|
1015
|
+
* Generates an unique ID, for a certain code (let's say "class"). If the
|
1016
|
+
* optional "id" argument is passed, then it just returns the id for that code
|
1017
|
+
* (no generation). This function is sometimes useful when we need to create
|
1018
|
+
* elements and be able to access them later by ID.
|
1019
|
+
*
|
1020
|
+
* @param code [string] the class of ids. User defined, can be anything.
|
1021
|
+
* @param id [string, optional] specify if the ID is already known.
|
1022
|
+
*
|
1023
|
+
* @return [string] the unique ID
|
1024
|
+
*/
|
1025
|
+
Zapatec.Utils.generateID = function(code, id) {
|
1026
|
+
if (typeof id == "undefined") {
|
1027
|
+
if (typeof this._ids[code] == "undefined")
|
1028
|
+
this._ids[code] = 0;
|
1029
|
+
id = ++this._ids[code];
|
1030
|
+
}
|
1031
|
+
return "zapatec-" + code + "-" + id;
|
1032
|
+
};
|
1033
|
+
|
1034
|
+
/**
|
1035
|
+
* Add a tooltip to the specified element.
|
1036
|
+
*
|
1037
|
+
* Function that adds a custom tooltip for an element. The "target" is the
|
1038
|
+
* element to where the tooltip should be added to, and the "tooltip" is a DIV
|
1039
|
+
* that contains the tooltip text. Optionally, the tooltip DIV can have the
|
1040
|
+
* "title" attribute set; if so, its value will be displayed highlighted as
|
1041
|
+
* the title of the tooltip.
|
1042
|
+
*
|
1043
|
+
* @param target reference to or ID of the target element
|
1044
|
+
* @param tooltip reference to or ID of the tooltip content element
|
1045
|
+
*/
|
1046
|
+
|
1047
|
+
Zapatec.Utils.addTooltip = function(target, tooltip) {
|
1048
|
+
return new Zapatec.Tooltip(target, tooltip);
|
1049
|
+
};
|
1050
|
+
|
1051
|
+
Zapatec.isLite=true;
|
1052
|
+
|
1053
|
+
Zapatec.Utils.checkActivation = function() {
|
1054
|
+
if (!Zapatec.isLite) return true;
|
1055
|
+
|
1056
|
+
var arrProducts=[]
|
1057
|
+
|
1058
|
+
add_product=function(script, webdir_in, name_in)
|
1059
|
+
{
|
1060
|
+
arrProducts[script]={webdir:webdir_in, name:name_in, bActive:false}
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
add_product('calendar.js', 'prod1', 'Calendar')
|
1064
|
+
add_product('zpmenu.js', 'prod2', 'Menu')
|
1065
|
+
add_product('tree.js', 'prod3', 'Tree')
|
1066
|
+
add_product('form.js', 'forms', 'Forms')
|
1067
|
+
add_product('effects.js', 'effects', 'Effects')
|
1068
|
+
add_product('hoverer.js', 'effects', 'Effects - Hoverer')
|
1069
|
+
add_product('slideshow.js','effects', 'Effects - Slidshow')
|
1070
|
+
add_product('zpgrid.js', 'grid', 'Grid')
|
1071
|
+
add_product('slider.js', 'slider', 'Slider')
|
1072
|
+
add_product('zptabs.js', 'tabs', 'Tabs')
|
1073
|
+
add_product('zptime.js', 'time', 'Time')
|
1074
|
+
add_product('window.js', 'windows', 'Window')
|
1075
|
+
|
1076
|
+
|
1077
|
+
var strName, arrName, i
|
1078
|
+
var bProduct=false // Flag yes if we have a zapatec script
|
1079
|
+
var scripts = document.getElementsByTagName('script');
|
1080
|
+
for (i=0; i<scripts.length; i++)
|
1081
|
+
{
|
1082
|
+
// If wizard then do NOT do link back check, which makes wizard err out
|
1083
|
+
if (/wizard.js/i.test(scripts[i].src))
|
1084
|
+
return true
|
1085
|
+
|
1086
|
+
arrName=scripts[i].src.split('/')
|
1087
|
+
if (arrName.length==0)
|
1088
|
+
strName=scripts[i]
|
1089
|
+
else
|
1090
|
+
strName=arrName[arrName.length-1]
|
1091
|
+
strName=strName.toLowerCase()
|
1092
|
+
// Get each active product
|
1093
|
+
if (typeof arrProducts[strName] != 'undefined')
|
1094
|
+
{
|
1095
|
+
bProduct=true
|
1096
|
+
arrProducts[strName].bActive=true
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
// Is a LITE product even being used?
|
1101
|
+
if (!bProduct) return true;
|
1102
|
+
|
1103
|
+
|
1104
|
+
var anchors = document.getElementsByTagName('A');
|
1105
|
+
for(i = 0; i < anchors.length; i++)
|
1106
|
+
if (/(dev|www)\.zapatec\.com/i.test(anchors[i].href))
|
1107
|
+
return true;
|
1108
|
+
|
1109
|
+
var strMsg='You are using the Free version of the Zapatec Software.\n'+
|
1110
|
+
'While using the Free version, a link to www.zapatec.com in this page is required.'
|
1111
|
+
|
1112
|
+
for (i in arrProducts)
|
1113
|
+
// Get each active product
|
1114
|
+
if (arrProducts[i].bActive==true)
|
1115
|
+
strMsg+='\nTo purchase the Zapatec ' + arrProducts[i].name + ' visit www.zapatec.com/website/main/products/' + arrProducts[i].webdir + '/'
|
1116
|
+
|
1117
|
+
alert(strMsg)
|
1118
|
+
|
1119
|
+
return false;
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
/**
|
1123
|
+
* Makes a copy of an object.
|
1124
|
+
*
|
1125
|
+
* @param {object} objSource Source object to clone
|
1126
|
+
*/
|
1127
|
+
Zapatec.Utils.clone = function(objSource) {
|
1128
|
+
var objClone;
|
1129
|
+
if ((objSource instanceof String) || (objSource instanceof Number) ||
|
1130
|
+
(objSource instanceof Boolean)) {
|
1131
|
+
objClone = new objSource.constructor(objSource.valueOf());
|
1132
|
+
} else {
|
1133
|
+
objClone = new objSource.constructor();
|
1134
|
+
}
|
1135
|
+
for (var strProperty in objSource) {
|
1136
|
+
if (typeof objSource[strProperty] == 'object') {
|
1137
|
+
objClone[strProperty] = Zapatec.Utils.clone(objSource[strProperty], true);
|
1138
|
+
} else {
|
1139
|
+
objClone[strProperty] = objSource[strProperty];
|
1140
|
+
}
|
1141
|
+
}
|
1142
|
+
return objClone;
|
1143
|
+
};
|
1144
|
+
|
1145
|
+
// Browser sniffing
|
1146
|
+
|
1147
|
+
/// detect Opera browser
|
1148
|
+
Zapatec.is_opera = /opera/i.test(navigator.userAgent);
|
1149
|
+
|
1150
|
+
/// detect a special case of "web browser"
|
1151
|
+
Zapatec.is_ie = ( /msie/i.test(navigator.userAgent) && !Zapatec.is_opera );
|
1152
|
+
|
1153
|
+
/// detect IE5.0/Win
|
1154
|
+
Zapatec.is_ie5 = ( Zapatec.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
|
1155
|
+
|
1156
|
+
/// detect IE7.0/Win
|
1157
|
+
Zapatec.is_ie7 = ( Zapatec.is_ie && /msie 7\.0/i.test(navigator.userAgent) );
|
1158
|
+
|
1159
|
+
/// detect IE for Macintosh
|
1160
|
+
Zapatec.is_mac_ie = ( /msie.*mac/i.test(navigator.userAgent) && !Zapatec.is_opera );
|
1161
|
+
|
1162
|
+
/// detect KHTML-based browsers
|
1163
|
+
Zapatec.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
|
1164
|
+
|
1165
|
+
/// detect Konqueror
|
1166
|
+
Zapatec.is_konqueror = /Konqueror/i.test(navigator.userAgent);
|
1167
|
+
|
1168
|
+
/// detect Gecko
|
1169
|
+
Zapatec.is_gecko = /Gecko/i.test(navigator.userAgent);
|
1170
|
+
|
1171
|
+
/**
|
1172
|
+
* Simulation of Object hasOwnProperty() method that is missing in IE 5.0.
|
1173
|
+
*/
|
1174
|
+
if (!Object.prototype.hasOwnProperty) {
|
1175
|
+
Object.prototype.hasOwnProperty = function(strProperty) {
|
1176
|
+
try {
|
1177
|
+
var objPrototype = this.constructor.prototype;
|
1178
|
+
while (objPrototype) {
|
1179
|
+
if (objPrototype[strProperty] == this[strProperty]) {
|
1180
|
+
return false;
|
1181
|
+
}
|
1182
|
+
objPrototype = objPrototype.prototype;
|
1183
|
+
}
|
1184
|
+
} catch (objException) {}
|
1185
|
+
return true;
|
1186
|
+
};
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
/**
|
1190
|
+
* Simulation of Function call() method that is missing in IE 5.0.
|
1191
|
+
*/
|
1192
|
+
if (!Function.prototype.call) {
|
1193
|
+
Function.prototype.call = function() {
|
1194
|
+
var objThis = arguments[0];
|
1195
|
+
objThis._this_func = this;
|
1196
|
+
var arrArgs = [];
|
1197
|
+
for (var iArg = 1; iArg < arguments.length; iArg++) {
|
1198
|
+
arrArgs[arrArgs.length] = 'arguments[' + iArg + ']';
|
1199
|
+
}
|
1200
|
+
var ret = eval('objThis._this_func(' + arrArgs.join(',') + ')');
|
1201
|
+
objThis._this_func = null;
|
1202
|
+
return ret;
|
1203
|
+
};
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
/**
|
1207
|
+
* Simulation of Function apply() method that is missing in IE 5.0.
|
1208
|
+
*/
|
1209
|
+
if (!Function.prototype.apply) {
|
1210
|
+
Function.prototype.apply = function() {
|
1211
|
+
var objThis = arguments[0];
|
1212
|
+
var objArgs = arguments[1];
|
1213
|
+
objThis._this_func = this;
|
1214
|
+
var arrArgs = [];
|
1215
|
+
if (objArgs) {
|
1216
|
+
for (var iArg = 0; iArg < objArgs.length; iArg++) {
|
1217
|
+
arrArgs[arrArgs.length] = 'objArgs[' + iArg + ']';
|
1218
|
+
}
|
1219
|
+
}
|
1220
|
+
var ret = eval('objThis._this_func(' + arrArgs.join(',') + ')');
|
1221
|
+
objThis._this_func = null;
|
1222
|
+
return ret;
|
1223
|
+
};
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
/**
|
1227
|
+
* Simulation of Array pop() method that is missing in IE 5.0.
|
1228
|
+
*/
|
1229
|
+
if (!Array.prototype.pop) {
|
1230
|
+
Array.prototype.pop = function() {
|
1231
|
+
var last;
|
1232
|
+
if (this.length) {
|
1233
|
+
last = this[this.length - 1];
|
1234
|
+
this.length -= 1;
|
1235
|
+
}
|
1236
|
+
return last;
|
1237
|
+
};
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
/**
|
1241
|
+
* Simulation of Array push() method that is missing in IE 5.0
|
1242
|
+
*/
|
1243
|
+
if (!Array.prototype.push) {
|
1244
|
+
Array.prototype.push = function() {
|
1245
|
+
for (var i = 0; i < arguments.length; i++) {
|
1246
|
+
this[this.length] = arguments[i];
|
1247
|
+
}
|
1248
|
+
return this.length;
|
1249
|
+
};
|
1250
|
+
}
|
1251
|
+
|
1252
|
+
/**
|
1253
|
+
* Simulation of Array shift() method that is missing in IE 5.0.
|
1254
|
+
*/
|
1255
|
+
if (!Array.prototype.shift) {
|
1256
|
+
Array.prototype.shift = function() {
|
1257
|
+
var first;
|
1258
|
+
if (this.length) {
|
1259
|
+
first = this[0];
|
1260
|
+
for (var i = 0; i < this.length - 1; i++) {
|
1261
|
+
this[i] = this[i + 1];
|
1262
|
+
}
|
1263
|
+
this.length -= 1;
|
1264
|
+
}
|
1265
|
+
return first;
|
1266
|
+
};
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
/**
|
1270
|
+
* Simulation of Array unshift() method that is missing in IE 5.0.
|
1271
|
+
*/
|
1272
|
+
if (!Array.prototype.unshift) {
|
1273
|
+
Array.prototype.unshift = function() {
|
1274
|
+
if (arguments.length) {
|
1275
|
+
var i, len = arguments.length;
|
1276
|
+
for (i = this.length + len - 1; i >= len; i--) {
|
1277
|
+
this[i] = this[i - len];
|
1278
|
+
}
|
1279
|
+
for (i = 0; i < len; i++) {
|
1280
|
+
this[i] = arguments[i];
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
return this.length;
|
1284
|
+
};
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
/**
|
1288
|
+
* Simulation of Array splice() method that is missing in IE 5.0.
|
1289
|
+
*/
|
1290
|
+
if (!Array.prototype.splice) {
|
1291
|
+
Array.prototype.splice = function(index, howMany) {
|
1292
|
+
var elements = [], removed = [], i;
|
1293
|
+
for (i = 2; i < arguments.length; i++) {
|
1294
|
+
elements.push(arguments[i]);
|
1295
|
+
}
|
1296
|
+
for (i = index; (i < index + howMany) && (i < this.length); i++) {
|
1297
|
+
removed.push(this[i]);
|
1298
|
+
}
|
1299
|
+
for (i = index + howMany; i < this.length; i++) {
|
1300
|
+
this[i - howMany] = this[i];
|
1301
|
+
}
|
1302
|
+
this.length -= removed.length;
|
1303
|
+
for (i = this.length + elements.length - 1; i >= index + elements.length;
|
1304
|
+
i--) {
|
1305
|
+
this[i] = this[i - elements.length];
|
1306
|
+
}
|
1307
|
+
for (i = 0; i < elements.length; i++) {
|
1308
|
+
this[index + i] = elements[i];
|
1309
|
+
}
|
1310
|
+
return removed;
|
1311
|
+
};
|
1312
|
+
}
|
1313
|
+
|
1314
|
+
/**
|
1315
|
+
* Crossbrowser replacement for Array indexOf() method. See:
|
1316
|
+
* http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:indexOf
|
1317
|
+
*
|
1318
|
+
* @param {object} arr Array to search in
|
1319
|
+
* @param {any} searchElement Element to locate in the array
|
1320
|
+
* @param {any} fromIndex The index at which to begin the search
|
1321
|
+
* @return The first index at which a given element can be found in the array,
|
1322
|
+
* or -1 if it is not present
|
1323
|
+
* @type number
|
1324
|
+
*/
|
1325
|
+
Zapatec.Utils.arrIndexOf = function(arr, searchElement, fromIndex) {
|
1326
|
+
if (Array.prototype.indexOf) {
|
1327
|
+
return arr.indexOf(searchElement, fromIndex);
|
1328
|
+
}
|
1329
|
+
if (!fromIndex) {
|
1330
|
+
fromIndex = 0;
|
1331
|
+
}
|
1332
|
+
for (var iElement = fromIndex; iElement < arr.length; iElement++) {
|
1333
|
+
if (arr[iElement] == searchElement) {
|
1334
|
+
return iElement;
|
1335
|
+
}
|
1336
|
+
}
|
1337
|
+
return -1;
|
1338
|
+
};
|
1339
|
+
|
1340
|
+
/**
|
1341
|
+
* Displays error message. Override this if needed.
|
1342
|
+
*
|
1343
|
+
* \param objArgs [number] error object:
|
1344
|
+
* {
|
1345
|
+
* severity: [string, optional] error severity,
|
1346
|
+
* description: [string] human readable error description
|
1347
|
+
* }
|
1348
|
+
*/
|
1349
|
+
Zapatec.Log = function(objArgs) {
|
1350
|
+
// Check arguments
|
1351
|
+
if (!objArgs) {
|
1352
|
+
return;
|
1353
|
+
}
|
1354
|
+
// Form error message
|
1355
|
+
var strMessage = objArgs.description;
|
1356
|
+
if (objArgs.severity) {
|
1357
|
+
strMessage = objArgs.severity + ':\n' + strMessage;
|
1358
|
+
}
|
1359
|
+
// Display error message
|
1360
|
+
alert(strMessage);
|
1361
|
+
};
|
1362
|
+
|
1363
|
+
/// Zapatec.Utils.Array object which contains additional for arrays method
|
1364
|
+
Zapatec.Utils.Array = {};
|
1365
|
+
|
1366
|
+
/**
|
1367
|
+
* Inserts the element into array.
|
1368
|
+
* It influences the order in which the elements will be iterated in the for...in cycle.
|
1369
|
+
*
|
1370
|
+
* @param arr [array] array to work with.
|
1371
|
+
* @param el [mixed] element to insert.
|
1372
|
+
* @param key [string] element to insert.
|
1373
|
+
* @param nextKey [string] element to be inserted before.
|
1374
|
+
* @return [string] new Array.
|
1375
|
+
*/
|
1376
|
+
Zapatec.Utils.Array.insertBefore = function (arr, el, key, nextKey) {
|
1377
|
+
var tmp = new Array();
|
1378
|
+
for(var i in arr) {
|
1379
|
+
if (i == nextKey) {
|
1380
|
+
if (key) {
|
1381
|
+
tmp[key] = el;
|
1382
|
+
} else {
|
1383
|
+
tmp.push(el);
|
1384
|
+
}
|
1385
|
+
}
|
1386
|
+
tmp[i] = arr[i];
|
1387
|
+
}
|
1388
|
+
return tmp;
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
/**
|
1392
|
+
* Extends one class with another. Gives ability to access properties and
|
1393
|
+
* methods of the superclass having the same names as in subclass.
|
1394
|
+
*
|
1395
|
+
* <pre>
|
1396
|
+
* Zapatec.Widget specific feature: If superclass has static property "path",
|
1397
|
+
* subclass will get path to js file from which this function is called into
|
1398
|
+
* "path" property instead of value from superclass.
|
1399
|
+
*
|
1400
|
+
* To determine path correctly when widget module is included using
|
1401
|
+
* Zapatec#include, static property "id" should be set in widget class. Value of
|
1402
|
+
* this property must be passed to Zapatec#include as script id.
|
1403
|
+
*
|
1404
|
+
* Should be used as follows:
|
1405
|
+
*
|
1406
|
+
* // Define SuperClass and its methods
|
1407
|
+
* Zapatec.SuperClass = function(objArgs) {
|
1408
|
+
* ...
|
1409
|
+
* };
|
1410
|
+
*
|
1411
|
+
* Zapatec.SuperClass.prototype.init = function(objArgs) {
|
1412
|
+
* ...
|
1413
|
+
* };
|
1414
|
+
*
|
1415
|
+
* // Define SubClass and its methods
|
1416
|
+
* Zapatec.SubClass = function(objArgs) {
|
1417
|
+
* ...
|
1418
|
+
* // Call constructor of superclass
|
1419
|
+
* Zapatec.SubClass.SUPERconstructor.call(this, objArgs);
|
1420
|
+
* ...
|
1421
|
+
* };
|
1422
|
+
*
|
1423
|
+
* // Unique static id of the widget class to determine path correctly
|
1424
|
+
* // Neded only if class is derived from Zapatec.Widget class
|
1425
|
+
* Zapatec.SubClass.id = 'Zapatec.SubClass';
|
1426
|
+
*
|
1427
|
+
* // Inherit SuperClass
|
1428
|
+
* Zapatec.inherit(Zapatec.SubClass, Zapatec.SuperClass);
|
1429
|
+
*
|
1430
|
+
* Zapatec.SubClass.prototype.init = function(objArgs) {
|
1431
|
+
* ...
|
1432
|
+
* // Call method of superclass
|
1433
|
+
* Zapatec.SubClass.SUPERclass.init.call(this, objArgs);
|
1434
|
+
* ...
|
1435
|
+
* };
|
1436
|
+
*
|
1437
|
+
* Note: This function must be invoked during page load to determine path to js
|
1438
|
+
* file from which it is called correctly.
|
1439
|
+
* </pre>
|
1440
|
+
*
|
1441
|
+
* @param {object} objSubClass Inheriting class
|
1442
|
+
* @param {object} objSuperClass Class from which to inherit
|
1443
|
+
*/
|
1444
|
+
Zapatec.inherit = function(objSubClass, objSuperClass) {
|
1445
|
+
// Duplicate prototype of superclass
|
1446
|
+
var Inheritance = function() {};
|
1447
|
+
Inheritance.prototype = objSuperClass.prototype;
|
1448
|
+
objSubClass.prototype = new Inheritance();
|
1449
|
+
// Fix constructor property to point to the self constructor because it is
|
1450
|
+
// pointing to the nested Inheritance function
|
1451
|
+
objSubClass.prototype.constructor = objSubClass;
|
1452
|
+
// Reference to constructor of superclass to be able to invoke it
|
1453
|
+
objSubClass.SUPERconstructor = objSuperClass;
|
1454
|
+
// Reference to prototype of superclass to be able to invoke its methods
|
1455
|
+
objSubClass.SUPERclass = objSuperClass.prototype;
|
1456
|
+
// Path to js file from which this function is called
|
1457
|
+
if (typeof objSuperClass.path != 'undefined') {
|
1458
|
+
objSubClass.path = Zapatec.getPath(objSubClass.id);
|
1459
|
+
}
|
1460
|
+
};
|
1461
|
+
|
1462
|
+
/**
|
1463
|
+
* Returns path from the script element with specified id. If id is not
|
1464
|
+
* specified or specified id is not found on the page, returns path from the
|
1465
|
+
* last loaded script element. Splits src attribute value and returns path
|
1466
|
+
* without js file name. Returns empty string if path is not found.
|
1467
|
+
*
|
1468
|
+
* <pre>
|
1469
|
+
* If specified id is not found on the page, returns last script element instead
|
1470
|
+
* of alerting. This gives ability for developer to include script using
|
1471
|
+
* Zapatec#include and specify id because in some cases it may be needed to get
|
1472
|
+
* correct path; and for user to include script directly into the page without
|
1473
|
+
* remembering internal Zapatec ids because id is not needed to determine path
|
1474
|
+
* correctly in this case.
|
1475
|
+
*
|
1476
|
+
* Developer is responsible for checking that the same script id is passed to
|
1477
|
+
* Zapatec#include and Zapatec#getPath because there is no alert if they are
|
1478
|
+
* different and result may be wrong.
|
1479
|
+
*
|
1480
|
+
* Note: This function must be invoked during page load to determine path to js
|
1481
|
+
* file from which it is called correctly.
|
1482
|
+
* </pre>
|
1483
|
+
*
|
1484
|
+
* @param {string} strId Optional. Id of the script element
|
1485
|
+
* @return Path to the script, e.g. '../src/' or '' if path is not found
|
1486
|
+
* @type string
|
1487
|
+
*/
|
1488
|
+
Zapatec.getPath = function(strId) {
|
1489
|
+
// Get script element
|
1490
|
+
var objScript;
|
1491
|
+
if (typeof strId == 'string') {
|
1492
|
+
// Try to use element with specified id
|
1493
|
+
objScript = document.getElementById(strId);
|
1494
|
+
}
|
1495
|
+
if (!objScript) {
|
1496
|
+
if(Zapatec.lastLoadedModule != null){
|
1497
|
+
return Zapatec.lastLoadedModule;
|
1498
|
+
}
|
1499
|
+
// Get last script element
|
1500
|
+
var objContainer = document.body;
|
1501
|
+
if (!objContainer) {
|
1502
|
+
objContainer = document.getElementsByTagName('head')[0];
|
1503
|
+
if (!objContainer) {
|
1504
|
+
objContainer = document;
|
1505
|
+
}
|
1506
|
+
}
|
1507
|
+
objScript = Zapatec.Utils.getLastChild(objContainer, 'script');
|
1508
|
+
}
|
1509
|
+
if (!objScript) {
|
1510
|
+
// Not found
|
1511
|
+
return '';
|
1512
|
+
}
|
1513
|
+
// Get path
|
1514
|
+
var strSrc = objScript.getAttribute('src');
|
1515
|
+
if (!strSrc) {
|
1516
|
+
return '';
|
1517
|
+
}
|
1518
|
+
var arrTokens = strSrc.split('/');
|
1519
|
+
// Remove last token
|
1520
|
+
arrTokens = arrTokens.slice(0, -1);
|
1521
|
+
if (!arrTokens.length) {
|
1522
|
+
return '';
|
1523
|
+
}
|
1524
|
+
return arrTokens.join('/') + '/';
|
1525
|
+
};
|
1526
|
+
|
1527
|
+
/**
|
1528
|
+
* This is some kind of indicator that window has already loaded.
|
1529
|
+
*/
|
1530
|
+
Zapatec.windowLoaded = typeof(document.readyState) != 'undefined' ?
|
1531
|
+
(
|
1532
|
+
document.readyState == 'loaded' || // Konqueror
|
1533
|
+
document.readyState == 'complete' // IE/Opera
|
1534
|
+
) :
|
1535
|
+
// Mozilla
|
1536
|
+
document.getElementsByTagName != null && typeof(document.getElementsByTagName('body')[0]) != 'undefined'
|
1537
|
+
;
|
1538
|
+
|
1539
|
+
Zapatec.Utils.addEvent(window, "load", function() {Zapatec.windowLoaded = true;});
|
1540
|
+
|
1541
|
+
/*
|
1542
|
+
* Use this method to display your custom message before unload event.
|
1543
|
+
* For example you could warn user that he has some unsaved changes
|
1544
|
+
* on page.
|
1545
|
+
*
|
1546
|
+
* \param msg [string] - message to display. Default value - "All your changes will be lost.":
|
1547
|
+
* \param win [object] - reference to window object. By default - current window
|
1548
|
+
*/
|
1549
|
+
Zapatec.Utils.warnUnload = function(msg, win){
|
1550
|
+
Zapatec.Utils.warnUnloadFlag = true;
|
1551
|
+
if(typeof(msg) != "string"){
|
1552
|
+
msg = "All your changes will be lost.";
|
1553
|
+
}
|
1554
|
+
|
1555
|
+
if(typeof(win) == 'undefined'){
|
1556
|
+
win = window;
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
Zapatec.Utils.addEvent(win, 'beforeunload', function(ev){
|
1560
|
+
if(Zapatec.Utils.warnUnloadFlag != true){
|
1561
|
+
return true;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
if(typeof(ev) == 'undefined'){
|
1565
|
+
ev = window.event;
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
ev.returnValue = msg;
|
1569
|
+
|
1570
|
+
return false;
|
1571
|
+
});
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
/*
|
1575
|
+
* Using this method you can remove displaying of your message on page unload.
|
1576
|
+
*/
|
1577
|
+
Zapatec.Utils.unwarnUnload = function(msg, win){
|
1578
|
+
Zapatec.Utils.warnUnloadFlag = false;
|
1579
|
+
}
|
1580
|
+
|
1581
|
+
/*
|
1582
|
+
* \internal Variable that determines if unload handler should be used.
|
1583
|
+
*/
|
1584
|
+
Zapatec.Utils.warnUnloadFlag = false;
|
1585
|
+
|
1586
|
+
/**
|
1587
|
+
* @return Max z-index value
|
1588
|
+
* @type number
|
1589
|
+
*/
|
1590
|
+
Zapatec.Utils.getMaxZindex = function() {
|
1591
|
+
if (window.opera || Zapatec.is_khtml) {
|
1592
|
+
return 2147483583;
|
1593
|
+
} else if (Zapatec.is_ie){
|
1594
|
+
return 2147483647;
|
1595
|
+
} else {
|
1596
|
+
return 10737418239;
|
1597
|
+
}
|
1598
|
+
};
|
1599
|
+
|
1600
|
+
/**
|
1601
|
+
* Corrects CSS length.
|
1602
|
+
*
|
1603
|
+
* @param {any} val Value to correct
|
1604
|
+
* @return Valid CSS length
|
1605
|
+
* @type string
|
1606
|
+
*/
|
1607
|
+
Zapatec.Utils.correctCssLength = function(val) {
|
1608
|
+
if (typeof val == 'undefined' || (typeof val == 'object' && !val)) {
|
1609
|
+
// Undefined or null
|
1610
|
+
return 'auto';
|
1611
|
+
}
|
1612
|
+
// Convert to string
|
1613
|
+
val += '';
|
1614
|
+
if (!val.length) {
|
1615
|
+
// Empty
|
1616
|
+
return 'auto';
|
1617
|
+
}
|
1618
|
+
if (/\d$/.test(val)) {
|
1619
|
+
// Number
|
1620
|
+
val += 'px';
|
1621
|
+
}
|
1622
|
+
return val;
|
1623
|
+
};
|
1624
|
+
|
1625
|
+
/**
|
1626
|
+
* @ignore Holds properties of DOM objects that must be set to null on window
|
1627
|
+
* unload event to prevent memory leaks in IE.
|
1628
|
+
*/
|
1629
|
+
Zapatec.Utils.destroyOnUnload = [];
|
1630
|
+
|
1631
|
+
/**
|
1632
|
+
* Saves a property that must be set to null on window unload event. Should be
|
1633
|
+
* used for properties that can't be destroyed by garbage collector due to
|
1634
|
+
* circular references.
|
1635
|
+
*
|
1636
|
+
* @param {object} objElement DOM object
|
1637
|
+
* @param {string} strProperty Property name
|
1638
|
+
*/
|
1639
|
+
Zapatec.Utils.addDestroyOnUnload = function(objElement, strProperty) {
|
1640
|
+
Zapatec.Utils.destroyOnUnload.push([objElement, strProperty]);
|
1641
|
+
};
|
1642
|
+
|
1643
|
+
/**
|
1644
|
+
* Assigns a value to a custom property of DOM object. This property will be
|
1645
|
+
* set to null on window unload event. Use this function to create properties
|
1646
|
+
* that can't be destroyed by garbage collector due to circular references.
|
1647
|
+
*
|
1648
|
+
* @param {object} objElement DOM object
|
1649
|
+
* @param {string} strProperty Property name
|
1650
|
+
* @param {any} val Property value
|
1651
|
+
*/
|
1652
|
+
Zapatec.Utils.createProperty = function(objElement, strProperty, val) {
|
1653
|
+
objElement[strProperty] = val;
|
1654
|
+
Zapatec.Utils.addDestroyOnUnload(objElement, strProperty);
|
1655
|
+
};
|
1656
|
+
|
1657
|
+
// Remove circular references to prevent memory leaks in IE
|
1658
|
+
Zapatec.Utils.addEvent(window, 'unload', function() {
|
1659
|
+
for (var iObj = Zapatec.Utils.destroyOnUnload.length - 1; iObj >= 0; iObj--) {
|
1660
|
+
var objDestroy = Zapatec.Utils.destroyOnUnload[iObj];
|
1661
|
+
objDestroy[0][objDestroy[1]] = null;
|
1662
|
+
objDestroy[0] = null;
|
1663
|
+
}
|
1664
|
+
for (var iLis = Zapatec.Utils.removeOnUnload.length - 1; iLis >= 0; iLis--) {
|
1665
|
+
var listener = Zapatec.Utils.removeOnUnload[iLis];
|
1666
|
+
Zapatec.Utils.removeEvent(listener["element"], listener["event"], listener["listener"]);
|
1667
|
+
}
|
1668
|
+
});
|
1669
|
+
|
1670
|
+
|
1671
|
+
/**
|
1672
|
+
* Escapes all special HTML characters so string can be added via innerHTML property as-is
|
1673
|
+
*
|
1674
|
+
* @param {string} str String to escape
|
1675
|
+
* @return escaped string
|
1676
|
+
* @type string
|
1677
|
+
*/
|
1678
|
+
Zapatec.Utils.htmlEncode = function(str) {
|
1679
|
+
// we don't need regexp for that, but.. so be it for now.
|
1680
|
+
str = str.replace(/&/ig, "&");
|
1681
|
+
str = str.replace(/</ig, "<");
|
1682
|
+
str = str.replace(/>/ig, ">");
|
1683
|
+
str = str.replace(/\x22/ig, """);
|
1684
|
+
// \x22 means '"' -- we use hex reprezentation so that we don't disturb
|
1685
|
+
// JS compressors (well, at least mine fails.. ;)
|
1686
|
+
|
1687
|
+
return str;
|
1688
|
+
};
|
1689
|
+
|
1690
|
+
|
1691
|
+
/**
|
1692
|
+
* Applies given style to given element.
|
1693
|
+
* @param {any} elRef reference to target element. Required.
|
1694
|
+
* @param {string} style string value of style. Required.
|
1695
|
+
*/
|
1696
|
+
Zapatec.Utils.applyStyle = function(elRef, style){
|
1697
|
+
if(typeof(elRef) == 'string'){
|
1698
|
+
elRef = document.getElementById(elRef);
|
1699
|
+
}
|
1700
|
+
|
1701
|
+
if(elRef == null || style == null || elRef.style == null){
|
1702
|
+
return null;
|
1703
|
+
}
|
1704
|
+
|
1705
|
+
if(Zapatec.is_opera){
|
1706
|
+
var pairs = style.split(";");
|
1707
|
+
|
1708
|
+
for(var ii =0; ii < pairs.length; ii++){
|
1709
|
+
var kv = pairs[ii].split(":");
|
1710
|
+
|
1711
|
+
// trim value
|
1712
|
+
if (!kv[1]) {
|
1713
|
+
continue;
|
1714
|
+
}
|
1715
|
+
var value = kv[1].replace(/^\s*/, '').replace(/\s*$/, '');
|
1716
|
+
var key = "";
|
1717
|
+
|
1718
|
+
for(var jj = 0; jj < kv[0].length; jj++){
|
1719
|
+
if(kv[0].charAt(jj) == "-"){
|
1720
|
+
jj++;
|
1721
|
+
|
1722
|
+
if(jj < kv[0].length){
|
1723
|
+
key += kv[0].charAt(jj).toUpperCase();
|
1724
|
+
}
|
1725
|
+
|
1726
|
+
continue;
|
1727
|
+
}
|
1728
|
+
|
1729
|
+
key += kv[0].charAt(jj);
|
1730
|
+
}
|
1731
|
+
|
1732
|
+
switch(key){
|
1733
|
+
case "float":
|
1734
|
+
key = "cssFloat";
|
1735
|
+
break;
|
1736
|
+
}
|
1737
|
+
|
1738
|
+
try{
|
1739
|
+
elRef.style[key] = value;
|
1740
|
+
} catch(e){}
|
1741
|
+
}
|
1742
|
+
} else {
|
1743
|
+
elRef.style.cssText = style;
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
return true;
|
1747
|
+
}
|
1748
|
+
|
1749
|
+
/**
|
1750
|
+
* Retrieves computed CSS property values from an element.
|
1751
|
+
*
|
1752
|
+
* @param {object} Element object
|
1753
|
+
* @param {string} Property name of element's style, e.g. "borderLeftWidth"
|
1754
|
+
* @return Computed CSS property value
|
1755
|
+
* @type string
|
1756
|
+
*/
|
1757
|
+
Zapatec.Utils.getStyleProperty = function(objElement, strProperty) {
|
1758
|
+
if (document.defaultView && document.defaultView.getComputedStyle) {
|
1759
|
+
// Standard
|
1760
|
+
strProperty = strProperty.replace(/([A-Z])/g, '-$1').toLowerCase();
|
1761
|
+
return document.defaultView.getComputedStyle(objElement, '')
|
1762
|
+
.getPropertyValue(strProperty);
|
1763
|
+
} else if (objElement.currentStyle) {
|
1764
|
+
// IE
|
1765
|
+
return objElement.currentStyle[strProperty];
|
1766
|
+
}
|
1767
|
+
// None
|
1768
|
+
return objElement.style[strProperty];
|
1769
|
+
};
|
1770
|
+
|
1771
|
+
/**
|
1772
|
+
* Returns precision of a number with floating point.
|
1773
|
+
*
|
1774
|
+
* @param {number} fFloat Number with floating point
|
1775
|
+
* @return Precision
|
1776
|
+
* @type number
|
1777
|
+
*/
|
1778
|
+
Zapatec.Utils.getPrecision = function(fFloat){
|
1779
|
+
return (fFloat + '').replace(/^\d*\.*/, '').length;
|
1780
|
+
};
|
1781
|
+
|
1782
|
+
/**
|
1783
|
+
* Reduces precision of a number with floating point. Useful to correct
|
1784
|
+
* precision before displaying the result of arithmetic operation. E.g.
|
1785
|
+
* 1.1 + 2.22 == 3.3200000000000003 and
|
1786
|
+
* Zapatec.Utils.setPrecision(1.1 + 2.22) == 3.32 .
|
1787
|
+
*
|
1788
|
+
* Unlike Number.prototype.toPrecision, returns integer if param iPrecision
|
1789
|
+
* is 0.
|
1790
|
+
*
|
1791
|
+
* @param {number} fFloat Number with floating point
|
1792
|
+
* @param {number} iPrecision Desired precision
|
1793
|
+
* @return Number with floating point with desired precision
|
1794
|
+
* @type number
|
1795
|
+
*/
|
1796
|
+
Zapatec.Utils.setPrecision = function(fFloat, iPrecision){
|
1797
|
+
var iPow = Math.pow(10, iPrecision);
|
1798
|
+
return parseInt(fFloat * iPow, 10) / iPow;
|
1799
|
+
};
|