radiant-rc 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +489 -0
- data/CONTRIBUTORS +194 -0
- data/INSTALL +40 -0
- data/LICENSE +21 -0
- data/README +64 -0
- data/Rakefile +11 -0
- data/app/controllers/admin/export_controller.rb +5 -0
- data/app/controllers/admin/extensions_controller.rb +11 -0
- data/app/controllers/admin/layouts_controller.rb +13 -0
- data/app/controllers/admin/page_parts_controller.rb +9 -0
- data/app/controllers/admin/pages_controller.rb +55 -0
- data/app/controllers/admin/preferences_controller.rb +45 -0
- data/app/controllers/admin/references_controller.rb +7 -0
- data/app/controllers/admin/resource_controller.rb +173 -0
- data/app/controllers/admin/snippets_controller.rb +13 -0
- data/app/controllers/admin/users_controller.rb +25 -0
- data/app/controllers/admin/welcome_controller.rb +43 -0
- data/app/controllers/application_controller.rb +74 -0
- data/app/controllers/site_controller.rb +61 -0
- data/app/helpers/admin/abstract_model_helper.rb +2 -0
- data/app/helpers/admin/export_helper.rb +2 -0
- data/app/helpers/admin/extensions_helper.rb +2 -0
- data/app/helpers/admin/layouts_helper.rb +2 -0
- data/app/helpers/admin/node_helper.rb +87 -0
- data/app/helpers/admin/pages_helper.rb +112 -0
- data/app/helpers/admin/preferences_helper.rb +2 -0
- data/app/helpers/admin/references_helper.rb +42 -0
- data/app/helpers/admin/regions_helper.rb +28 -0
- data/app/helpers/admin/snippets_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +8 -0
- data/app/helpers/admin/welcome_helper.rb +2 -0
- data/app/helpers/application_helper.rb +174 -0
- data/app/helpers/site_helper.rb +2 -0
- data/app/models/env_dump_page.rb +17 -0
- data/app/models/file_not_found_page.rb +28 -0
- data/app/models/layout.rb +16 -0
- data/app/models/page.rb +297 -0
- data/app/models/page_context.rb +46 -0
- data/app/models/page_part.rb +21 -0
- data/app/models/radiant/config.rb +100 -0
- data/app/models/radiant/exporter.rb +11 -0
- data/app/models/snippet.rb +19 -0
- data/app/models/standard_tags.rb +1057 -0
- data/app/models/status.rb +31 -0
- data/app/models/text_filter.rb +25 -0
- data/app/models/user.rb +97 -0
- data/app/models/user_action_observer.rb +13 -0
- data/app/views/admin/extensions/index.html.haml +41 -0
- data/app/views/admin/layouts/_form.html.haml +36 -0
- data/app/views/admin/layouts/edit.html.haml +9 -0
- data/app/views/admin/layouts/index.html.haml +35 -0
- data/app/views/admin/layouts/new.html.haml +7 -0
- data/app/views/admin/layouts/remove.html.haml +16 -0
- data/app/views/admin/page_parts/_page_part.html.haml +17 -0
- data/app/views/admin/pages/_fields.html.haml +56 -0
- data/app/views/admin/pages/_meta_row.html.haml +6 -0
- data/app/views/admin/pages/_node.html.haml +25 -0
- data/app/views/admin/pages/_popups.html.haml +14 -0
- data/app/views/admin/pages/children.html.haml +2 -0
- data/app/views/admin/pages/edit.html.haml +14 -0
- data/app/views/admin/pages/index.html.haml +26 -0
- data/app/views/admin/pages/new.html.haml +12 -0
- data/app/views/admin/pages/remove.html.haml +21 -0
- data/app/views/admin/preferences/edit.html.haml +36 -0
- data/app/views/admin/references/_tag_reference.haml +3 -0
- data/app/views/admin/references/filters.haml +6 -0
- data/app/views/admin/references/tags.haml +24 -0
- data/app/views/admin/snippets/_form.html.haml +28 -0
- data/app/views/admin/snippets/edit.html.haml +9 -0
- data/app/views/admin/snippets/index.html.haml +33 -0
- data/app/views/admin/snippets/new.html.haml +7 -0
- data/app/views/admin/snippets/remove.html.haml +19 -0
- data/app/views/admin/users/_form.html.haml +45 -0
- data/app/views/admin/users/_password_fields.html.haml +16 -0
- data/app/views/admin/users/edit.html.haml +9 -0
- data/app/views/admin/users/index.html.haml +37 -0
- data/app/views/admin/users/new.html.haml +7 -0
- data/app/views/admin/users/remove.html.haml +18 -0
- data/app/views/admin/welcome/login.html.haml +24 -0
- data/app/views/layouts/application.html.haml +53 -0
- data/app/views/site/not_found.html.haml +3 -0
- data/bin/radiant +53 -0
- data/config/boot.rb +162 -0
- data/config/database.db2.yml +20 -0
- data/config/database.mysql.yml +25 -0
- data/config/database.postgresql.yml +25 -0
- data/config/database.sqlserver.yml +20 -0
- data/config/environment.rb +81 -0
- data/config/environments/development.rb +17 -0
- data/config/environments/production.rb +19 -0
- data/config/environments/test.rb +35 -0
- data/config/routes.rb +44 -0
- data/db/migrate/001_create_radiant_tables.rb +75 -0
- data/db/migrate/002_insert_initial_data.rb +12 -0
- data/db/migrate/003_rename_behavior_column.rb +9 -0
- data/db/migrate/004_rename_filter_column.rb +11 -0
- data/db/migrate/005_add_virtual_column_to_page.rb +9 -0
- data/db/migrate/006_integer_columns_to_boolean.rb +36 -0
- data/db/migrate/007_remove_virtual_column_from_page.rb +9 -0
- data/db/migrate/008_add_virtual_column_to_page_again.rb +9 -0
- data/db/migrate/009_add_content_type_field_to_layout.rb +9 -0
- data/db/migrate/010_merge_behaviors_and_pages.rb +57 -0
- data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +9 -0
- data/db/migrate/012_create_extension_meta.rb +13 -0
- data/db/migrate/013_add_notes_field_to_user.rb +9 -0
- data/db/migrate/014_rename_config_default_parts_key.rb +17 -0
- data/db/migrate/015_add_optimistic_locking.rb +15 -0
- data/db/migrate/016_add_sessions.rb +16 -0
- data/db/migrate/017_rename_created_by_updated_by_columns.rb +15 -0
- data/db/migrate/018_add_description_and_keywords_to_pages.rb +11 -0
- data/db/migrate/019_add_salt_to_users.rb +11 -0
- data/db/migrate/020_add_session_info_to_users.rb +11 -0
- data/db/migrate/021_remove_session_expire_from_users.rb +9 -0
- data/db/migrate/20081203140407_add_indexes.rb +19 -0
- data/db/migrate/20090929164633_rename_developer_role_to_designer.rb +9 -0
- data/db/schema.rb +112 -0
- data/db/templates/empty.yml +2 -0
- data/db/templates/roasters.yml +1210 -0
- data/db/templates/simple-blog.yml +197 -0
- data/db/templates/styled-blog.yml +472 -0
- data/features/admin/content_negotiation.feature +24 -0
- data/features/admin/layouts_management.feature +10 -0
- data/features/admin/pages_management.feature +72 -0
- data/features/admin/snippets_management.feature +56 -0
- data/features/admin/user_permissions.feature +157 -0
- data/features/admin/user_preferences.feature +18 -0
- data/features/admin/users_management.feature +62 -0
- data/features/page_serving.feature +42 -0
- data/features/step_definitions/admin/admin_steps.rb +31 -0
- data/features/step_definitions/admin/content_negotiation_steps.rb +37 -0
- data/features/step_definitions/admin/pages_management_steps.rb +14 -0
- data/features/step_definitions/admin/users_management_steps.rb +15 -0
- data/features/step_definitions/page_serving_steps.rb +65 -0
- data/features/step_definitions/webrat_steps.rb +125 -0
- data/features/support/env.rb +24 -0
- data/features/support/paths.rb +21 -0
- data/lib/annotatable.rb +68 -0
- data/lib/autotest/discover.rb +3 -0
- data/lib/autotest/radiant_rails_rspec.rb +111 -0
- data/lib/generators/extension/USAGE +30 -0
- data/lib/generators/extension/extension_generator.rb +65 -0
- data/lib/generators/extension/templates/README +3 -0
- data/lib/generators/extension/templates/RSpecRakefile +123 -0
- data/lib/generators/extension/templates/Rakefile +25 -0
- data/lib/generators/extension/templates/cucumber.yml +1 -0
- data/lib/generators/extension/templates/cucumber_env.rb +16 -0
- data/lib/generators/extension/templates/cucumber_paths.rb +14 -0
- data/lib/generators/extension/templates/extension.rb +18 -0
- data/lib/generators/extension/templates/functional_test.rb +15 -0
- data/lib/generators/extension/templates/migration.rb +9 -0
- data/lib/generators/extension/templates/spec.opts +6 -0
- data/lib/generators/extension/templates/spec_helper.rb +36 -0
- data/lib/generators/extension/templates/tasks.rake +28 -0
- data/lib/generators/extension/templates/test_helper.rb +26 -0
- data/lib/generators/extension_controller/USAGE +36 -0
- data/lib/generators/extension_controller/extension_controller_generator.rb +84 -0
- data/lib/generators/extension_controller/templates/controller.rb +10 -0
- data/lib/generators/extension_controller/templates/controller_spec.rb +23 -0
- data/lib/generators/extension_controller/templates/functional_test.rb +11 -0
- data/lib/generators/extension_controller/templates/helper.rb +2 -0
- data/lib/generators/extension_controller/templates/helper_spec.rb +11 -0
- data/lib/generators/extension_controller/templates/helper_test.rb +4 -0
- data/lib/generators/extension_controller/templates/view.html.erb +2 -0
- data/lib/generators/extension_controller/templates/view_spec.rb +12 -0
- data/lib/generators/extension_mailer/USAGE +17 -0
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +68 -0
- data/lib/generators/extension_mailer/templates/fixture.erb +3 -0
- data/lib/generators/extension_mailer/templates/mailer.rb +15 -0
- data/lib/generators/extension_mailer/templates/unit_test.rb +21 -0
- data/lib/generators/extension_mailer/templates/view.erb +3 -0
- data/lib/generators/extension_migration/USAGE +34 -0
- data/lib/generators/extension_migration/extension_migration_generator.rb +25 -0
- data/lib/generators/extension_migration/templates/migration.rb +11 -0
- data/lib/generators/extension_model/USAGE +35 -0
- data/lib/generators/extension_model/extension_model_generator.rb +68 -0
- data/lib/generators/extension_model/templates/fixtures.yml +19 -0
- data/lib/generators/extension_model/templates/migration.rb +16 -0
- data/lib/generators/extension_model/templates/model.rb +2 -0
- data/lib/generators/extension_model/templates/model_spec.rb +11 -0
- data/lib/generators/extension_model/templates/unit_test.rb +8 -0
- data/lib/generators/generator_base_extension.rb +16 -0
- data/lib/generators/instance/instance_generator.rb +117 -0
- data/lib/generators/instance/templates/databases/db2.yml +40 -0
- data/lib/generators/instance/templates/databases/mysql.yml +47 -0
- data/lib/generators/instance/templates/databases/postgresql.yml +44 -0
- data/lib/generators/instance/templates/databases/sqlite3.yml +16 -0
- data/lib/generators/instance/templates/databases/sqlserver.yml +20 -0
- data/lib/generators/instance/templates/instance_boot.rb +161 -0
- data/lib/generators/instance/templates/instance_environment.rb +81 -0
- data/lib/generators/instance/templates/instance_generate +18 -0
- data/lib/generators/instance/templates/instance_rakefile +3 -0
- data/lib/generators/instance/templates/instance_routes.rb +1 -0
- data/lib/inheritable_class_attributes.rb +65 -0
- data/lib/local_time.rb +6 -0
- data/lib/login_system.rb +128 -0
- data/lib/method_observer.rb +50 -0
- data/lib/plugins/active_record_extensions/init.rb +1 -0
- data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +47 -0
- data/lib/plugins/extension_patches/init.rb +1 -0
- data/lib/plugins/extension_patches/lib/routing_extension.rb +31 -0
- data/lib/plugins/object_extensions/init.rb +1 -0
- data/lib/plugins/object_extensions/lib/object_extensions.rb +5 -0
- data/lib/plugins/response_cache_timeout/init.rb +3 -0
- data/lib/plugins/string_extensions/init.rb +1 -0
- data/lib/plugins/string_extensions/lib/string_extensions.rb +23 -0
- data/lib/plugins/symbol_extensions/init.rb +1 -0
- data/lib/plugins/symbol_extensions/lib/symbol_extensions.rb +5 -0
- data/lib/radiant.rb +18 -0
- data/lib/radiant/admin_ui.rb +230 -0
- data/lib/radiant/admin_ui/region_partials.rb +18 -0
- data/lib/radiant/admin_ui/region_set.rb +35 -0
- data/lib/radiant/cache.rb +98 -0
- data/lib/radiant/extension.rb +100 -0
- data/lib/radiant/extension/script.rb +347 -0
- data/lib/radiant/extension_loader.rb +153 -0
- data/lib/radiant/extension_migrator.rb +86 -0
- data/lib/radiant/initializer.rb +244 -0
- data/lib/radiant/legacy_routes.rb +72 -0
- data/lib/radiant/resource_responses.rb +115 -0
- data/lib/radiant/setup.rb +212 -0
- data/lib/radiant/taggable.rb +91 -0
- data/lib/simpleton.rb +21 -0
- data/lib/task_support.rb +33 -0
- data/lib/tasks/cucumber.rake +21 -0
- data/lib/tasks/database.rake +31 -0
- data/lib/tasks/environments.rake +11 -0
- data/lib/tasks/extensions.rake +86 -0
- data/lib/tasks/framework.rake +171 -0
- data/lib/tasks/instance.rake +23 -0
- data/lib/tasks/prototype.rake +34 -0
- data/lib/tasks/radiant_config.rake +18 -0
- data/lib/tasks/release.rake +121 -0
- data/lib/tasks/rspec.rake +221 -0
- data/lib/tasks/undefine.rake +28 -0
- data/log/.keep +0 -0
- data/public/.htaccess +40 -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/admin/add_child.png +0 -0
- data/public/images/admin/add_tab.png +0 -0
- data/public/images/admin/avatar_32x32.png +0 -0
- data/public/images/admin/brown_bottom_line.gif +0 -0
- data/public/images/admin/buttons_background.png +0 -0
- data/public/images/admin/collapse.png +0 -0
- data/public/images/admin/draft_page.png +0 -0
- data/public/images/admin/expand.png +0 -0
- data/public/images/admin/layout.png +0 -0
- data/public/images/admin/login_shadow.png +0 -0
- data/public/images/admin/metadata_toggle.png +0 -0
- data/public/images/admin/minus.png +0 -0
- data/public/images/admin/minus_grey.png +0 -0
- data/public/images/admin/navigation_background.gif +0 -0
- data/public/images/admin/navigation_secondary_background.png +0 -0
- data/public/images/admin/navigation_secondary_separator.gif +0 -0
- data/public/images/admin/navigation_shadow.png +0 -0
- data/public/images/admin/navigation_tabs.png +0 -0
- data/public/images/admin/new_homepage.png +0 -0
- data/public/images/admin/new_layout.png +0 -0
- data/public/images/admin/new_snippet.png +0 -0
- data/public/images/admin/new_user.png +0 -0
- data/public/images/admin/page.png +0 -0
- data/public/images/admin/plus.png +0 -0
- data/public/images/admin/plus_grey.png +0 -0
- data/public/images/admin/popup_border_background.png +0 -0
- data/public/images/admin/popup_border_bottom_left.png +0 -0
- data/public/images/admin/popup_border_bottom_right.png +0 -0
- data/public/images/admin/popup_border_top_left.png +0 -0
- data/public/images/admin/popup_border_top_right.png +0 -0
- data/public/images/admin/remove.png +0 -0
- data/public/images/admin/remove_disabled.png +0 -0
- data/public/images/admin/snippet.png +0 -0
- data/public/images/admin/spacer.gif +0 -0
- data/public/images/admin/spinner.gif +0 -0
- data/public/images/admin/status_background.png +0 -0
- data/public/images/admin/status_bottom_left.png +0 -0
- data/public/images/admin/status_bottom_right.png +0 -0
- data/public/images/admin/status_spinner.gif +0 -0
- data/public/images/admin/status_top_left.png +0 -0
- data/public/images/admin/status_top_right.png +0 -0
- data/public/images/admin/tab_close.png +0 -0
- data/public/images/admin/vertical_tan_gradient.png +0 -0
- data/public/images/admin/view_site.png +0 -0
- data/public/images/admin/virtual_page.png +0 -0
- data/public/javascripts/admin/application.js +52 -0
- data/public/javascripts/admin/codearea.js +165 -0
- data/public/javascripts/admin/controls.js +965 -0
- data/public/javascripts/admin/cookie.js +80 -0
- data/public/javascripts/admin/dragdrop.js +974 -0
- data/public/javascripts/admin/effects.js +1122 -0
- data/public/javascripts/admin/lowpro.js +339 -0
- data/public/javascripts/admin/pngfix.js +39 -0
- data/public/javascripts/admin/popup.js +216 -0
- data/public/javascripts/admin/prototype.js +4184 -0
- data/public/javascripts/admin/ruledtable.js +13 -0
- data/public/javascripts/admin/shortcuts.js +27 -0
- data/public/javascripts/admin/sitemap.js +150 -0
- data/public/javascripts/admin/status.js +198 -0
- data/public/javascripts/admin/tabcontrol.js +141 -0
- data/public/javascripts/admin/utility.js +52 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/admin/main.css +907 -0
- data/public/stylesheets/sass/admin/_avatars.sass +4 -0
- data/public/stylesheets/sass/admin/_base.sass +61 -0
- data/public/stylesheets/sass/admin/_content.sass +215 -0
- data/public/stylesheets/sass/admin/_footer.sass +12 -0
- data/public/stylesheets/sass/admin/_forms.sass +269 -0
- data/public/stylesheets/sass/admin/_header.sass +117 -0
- data/public/stylesheets/sass/admin/_layout.sass +10 -0
- data/public/stylesheets/sass/admin/_messages.sass +10 -0
- data/public/stylesheets/sass/admin/_popup.sass +116 -0
- data/public/stylesheets/sass/admin/_reset.sass +36 -0
- data/public/stylesheets/sass/admin/_status.sass +8 -0
- data/public/stylesheets/sass/admin/_tabcontrol.sass +74 -0
- data/public/stylesheets/sass/admin/main.sass +14 -0
- data/public/stylesheets/sass/admin/styles.sass +13 -0
- data/script/about +3 -0
- data/script/autospec +5 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/cucumber +8 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/extension +5 -0
- data/script/generate +4 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +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/process/spinner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/script/spec +5 -0
- data/script/spec_server +116 -0
- data/script/version +5 -0
- data/spec/controllers/admin/export_controller_spec.rb +16 -0
- data/spec/controllers/admin/extensions_controller_spec.rb +36 -0
- data/spec/controllers/admin/layouts_controller_spec.rb +102 -0
- data/spec/controllers/admin/pages_controller_spec.rb +241 -0
- data/spec/controllers/admin/preferences_controller_spec.rb +43 -0
- data/spec/controllers/admin/references_controller_spec.rb +15 -0
- data/spec/controllers/admin/snippets_controller_spec.rb +110 -0
- data/spec/controllers/admin/users_controller_spec.rb +92 -0
- data/spec/controllers/admin/welcome_controller_spec.rb +98 -0
- data/spec/controllers/application_controller_spec.rb +88 -0
- data/spec/controllers/site_controller_spec.rb +135 -0
- data/spec/datasets/config_dataset.rb +11 -0
- data/spec/datasets/file_not_found_dataset.rb +22 -0
- data/spec/datasets/home_page_dataset.rb +64 -0
- data/spec/datasets/layouts_dataset.rb +58 -0
- data/spec/datasets/markup_pages_dataset.rb +13 -0
- data/spec/datasets/pages_dataset.rb +61 -0
- data/spec/datasets/pages_with_layouts_dataset.rb +10 -0
- data/spec/datasets/snippets_dataset.rb +38 -0
- data/spec/datasets/users_and_pages_dataset.rb +9 -0
- data/spec/datasets/users_dataset.rb +43 -0
- data/spec/fixtures/example_extension/README +3 -0
- data/spec/fixtures/example_extension/Rakefile +120 -0
- data/spec/fixtures/example_extension/example_extension.rb +21 -0
- data/spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake +28 -0
- data/spec/fixtures/example_extension/spec/spec.opts +6 -0
- data/spec/fixtures/example_extension/spec/spec_helper.rb +36 -0
- data/spec/fixtures/radiant_config.yml +10 -0
- data/spec/fixtures/sample.txt +1 -0
- data/spec/generators/extension_controller_generator_spec.rb +85 -0
- data/spec/generators/extension_generator_spec.rb +184 -0
- data/spec/generators/extension_generators_spec_helper.rb +139 -0
- data/spec/generators/extension_mailer_generator_spec.rb +60 -0
- data/spec/generators/extension_migration_generator_spec.rb +21 -0
- data/spec/generators/extension_model_generator_spec.rb +61 -0
- data/spec/helpers/admin/abstract_model_helper_spec.rb +4 -0
- data/spec/helpers/admin/export_helper_spec.rb +4 -0
- data/spec/helpers/admin/extensions_helper_spec.rb +4 -0
- data/spec/helpers/admin/layouts_helper_spec.rb +4 -0
- data/spec/helpers/admin/node_helper_spec.rb +105 -0
- data/spec/helpers/admin/pages_helper_spec.rb +63 -0
- data/spec/helpers/admin/preferences_helper_spec.rb +11 -0
- data/spec/helpers/admin/references_helper_spec.rb +115 -0
- data/spec/helpers/admin/regions_helper_spec.rb +47 -0
- data/spec/helpers/admin/snippets_helper_spec.rb +4 -0
- data/spec/helpers/admin/users_helper_spec.rb +11 -0
- data/spec/helpers/admin/welcome_helper_spec.rb +4 -0
- data/spec/helpers/application_helper_spec.rb +164 -0
- data/spec/helpers/site_helper_spec.rb +4 -0
- data/spec/lib/annotatable_spec.rb +86 -0
- data/spec/lib/autotest_spec.rb +81 -0
- data/spec/lib/core_ext/string_ext_spec.rb +11 -0
- data/spec/lib/inheritable_class_attributes_spec.rb +90 -0
- data/spec/lib/login_system_spec.rb +195 -0
- data/spec/lib/method_observer_spec.rb +48 -0
- data/spec/lib/radiant/admin_ui/nav_tabs_spec.rb +167 -0
- data/spec/lib/radiant/admin_ui/region_partials_spec.rb +35 -0
- data/spec/lib/radiant/admin_ui/region_set_spec.rb +61 -0
- data/spec/lib/radiant/admin_ui_spec.rb +120 -0
- data/spec/lib/radiant/extension/script_spec.rb +456 -0
- data/spec/lib/radiant/extension_loader_spec.rb +218 -0
- data/spec/lib/radiant/extension_migrator_spec.rb +46 -0
- data/spec/lib/radiant/extension_spec.rb +101 -0
- data/spec/lib/radiant/initializer_spec.rb +131 -0
- data/spec/lib/radiant/legacy_routes_spec.rb +14 -0
- data/spec/lib/radiant/resource_responses_spec.rb +207 -0
- data/spec/lib/radiant/taggable_spec.rb +186 -0
- data/spec/lib/radiant_spec.rb +26 -0
- data/spec/lib/simpleton_spec.rb +45 -0
- data/spec/lib/task_support_spec.rb +42 -0
- data/spec/matchers/autotest_matchers.rb +47 -0
- data/spec/matchers/generator_matchers.rb +237 -0
- data/spec/matchers/login_system_matcher.rb +79 -0
- data/spec/matchers/render_form_errors_matcher.rb +62 -0
- data/spec/matchers/render_matcher.rb +120 -0
- data/spec/models/env_dump_page_spec.rb +18 -0
- data/spec/models/file_not_found_page_spec.rb +31 -0
- data/spec/models/layout_spec.rb +29 -0
- data/spec/models/page_context_spec.rb +66 -0
- data/spec/models/page_part_spec.rb +67 -0
- data/spec/models/page_spec.rb +609 -0
- data/spec/models/radiant/config_spec.rb +114 -0
- data/spec/models/radiant/exporter_spec.rb +25 -0
- data/spec/models/snippet_spec.rb +41 -0
- data/spec/models/standard_tags_spec.rb +1027 -0
- data/spec/models/status_spec.rb +53 -0
- data/spec/models/text_filter_spec.rb +40 -0
- data/spec/models/user_action_observer_spec.rb +34 -0
- data/spec/models/user_spec.rb +203 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +74 -0
- data/test/fixtures/extensions/01_basic/app/controllers/basic_extension_controller.rb +7 -0
- data/test/fixtures/extensions/01_basic/app/metal/basic_metal.rb +9 -0
- data/test/fixtures/extensions/01_basic/app/models/basic_extension_mailer.rb +4 -0
- data/test/fixtures/extensions/01_basic/app/models/basic_extension_model.rb +2 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension/index.html.erb +1 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension/override.html.erb +1 -0
- data/test/fixtures/extensions/01_basic/app/views/basic_extension_mailer/message.text.html.erb +1 -0
- data/test/fixtures/extensions/01_basic/basic_extension.rb +14 -0
- data/test/fixtures/extensions/01_basic/db/migrate/200812131420_create_initial_schema.rb +10 -0
- data/test/fixtures/extensions/01_basic/db/migrate/200812131421_modify_initial_schema.rb +10 -0
- data/test/fixtures/extensions/01_basic/lib/new_module.rb +2 -0
- data/test/fixtures/extensions/01_basic/vendor/plugins/multiple/init.rb +1 -0
- data/test/fixtures/extensions/01_basic/vendor/plugins/multiple/lib/multiple.rb +2 -0
- data/test/fixtures/extensions/01_basic/vendor/plugins/plugin_normal/init.rb +1 -0
- data/test/fixtures/extensions/01_basic/vendor/plugins/plugin_normal/lib/normal_plugin.rb +2 -0
- data/test/fixtures/extensions/02_overriding/app/metal/basic_metal.rb +9 -0
- data/test/fixtures/extensions/02_overriding/app/views/basic_extension/override.html.erb +1 -0
- data/test/fixtures/extensions/02_overriding/overriding_extension.rb +8 -0
- data/test/fixtures/extensions/02_overriding/vendor/plugins/multiple/init.rb +1 -0
- data/test/fixtures/extensions/02_overriding/vendor/plugins/multiple/lib/multiple.rb +2 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/01_first.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/02_second.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/03_pending.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/db/migrate/04_dont_run.rb +7 -0
- data/test/fixtures/extensions/03_upgrading/upgrading_extension.rb +2 -0
- data/test/fixtures/extensions/load_order_blue/load_order_blue_extension.rb +8 -0
- data/test/fixtures/extensions/load_order_green/load_order_green_extension.rb +8 -0
- data/test/fixtures/extensions/load_order_red/load_order_red_extension.rb +8 -0
- data/test/fixtures/extensions/special_characters/db/migrate/001_create_initial_schema.rb +10 -0
- data/test/fixtures/extensions/special_characters/special_characters_extension.rb +3 -0
- data/test/helpers/page_test_helper.rb +79 -0
- data/test/helpers/render_test_helper.rb +60 -0
- data/test/helpers/user_test_helper.rb +35 -0
- data/test/helpers/validation_test_helper.rb +42 -0
- data/test/test_helper.rb +64 -0
- data/vendor/extensions/archive/README +29 -0
- data/vendor/extensions/archive/Rakefile +120 -0
- data/vendor/extensions/archive/app/models/archive_day_index_page.rb +28 -0
- data/vendor/extensions/archive/app/models/archive_finder.rb +55 -0
- data/vendor/extensions/archive/app/models/archive_month_index_page.rb +28 -0
- data/vendor/extensions/archive/app/models/archive_page.rb +36 -0
- data/vendor/extensions/archive/app/models/archive_year_index_page.rb +28 -0
- data/vendor/extensions/archive/archive_extension.rb +19 -0
- data/vendor/extensions/archive/lib/archive_index_tags_and_methods.rb +57 -0
- data/vendor/extensions/archive/lib/tasks/archive_extension_tasks.rake +28 -0
- data/vendor/extensions/archive/spec/datasets/archive_dataset.rb +51 -0
- data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/models/archive_page_spec.rb +33 -0
- data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +20 -0
- data/vendor/extensions/archive/spec/spec.opts +6 -0
- data/vendor/extensions/archive/spec/spec_helper.rb +36 -0
- data/vendor/extensions/archive/test/fixtures/pages.yml +397 -0
- data/vendor/extensions/archive/test/functional/archive_extension_test.rb +16 -0
- data/vendor/extensions/archive/test/helpers/archive_index_test_helper.rb +37 -0
- data/vendor/extensions/archive/test/test_helper.rb +26 -0
- data/vendor/extensions/archive/test/unit/archive_day_index_page_test.rb +22 -0
- data/vendor/extensions/archive/test/unit/archive_month_index_page_test.rb +22 -0
- data/vendor/extensions/archive/test/unit/archive_page_test.rb +40 -0
- data/vendor/extensions/archive/test/unit/archive_year_index_page_test.rb +22 -0
- data/vendor/extensions/markdown_filter/README +1 -0
- data/vendor/extensions/markdown_filter/Rakefile +120 -0
- data/vendor/extensions/markdown_filter/lib/markdown_filter.rb +10 -0
- data/vendor/extensions/markdown_filter/lib/markdown_tags.rb +33 -0
- data/vendor/extensions/markdown_filter/lib/smarty_pants_filter.rb +7 -0
- data/vendor/extensions/markdown_filter/lib/tasks/markdown_filter_extension_tasks.rake +28 -0
- data/vendor/extensions/markdown_filter/markdown.html +123 -0
- data/vendor/extensions/markdown_filter/markdown_filter_extension.rb +27 -0
- data/vendor/extensions/markdown_filter/smartypants.html +47 -0
- data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +22 -0
- data/vendor/extensions/markdown_filter/spec/models/smarty_pants_filter_spec.rb +19 -0
- data/vendor/extensions/markdown_filter/spec/spec.opts +6 -0
- data/vendor/extensions/markdown_filter/spec/spec_helper.rb +36 -0
- data/vendor/extensions/markdown_filter/test/test_helper.rb +19 -0
- data/vendor/extensions/markdown_filter/test/unit/markdown_filter_test.rb +18 -0
- data/vendor/extensions/markdown_filter/test/unit/smarty_pants_filter_test.rb +14 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/CHANGES +366 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/LICENSE +340 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/README +99 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/bin/bluecloth +83 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/install.rb +150 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/lib/bluecloth.rb +1144 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/test.rb +117 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb +71 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/05_Markdown.tests.rb +1527 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb +57 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/15_Contrib.tests.rb +132 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/bctestcase.rb +274 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/antsugar.txt +34 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/ml-announce.txt +17 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow.txt +67 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow2.txt +281 -0
- data/vendor/extensions/markdown_filter/vendor/bluecloth/utils.rb +553 -0
- data/vendor/extensions/markdown_filter/vendor/rubypants/README +114 -0
- data/vendor/extensions/markdown_filter/vendor/rubypants/Rakefile +84 -0
- data/vendor/extensions/markdown_filter/vendor/rubypants/install.rb +9 -0
- data/vendor/extensions/markdown_filter/vendor/rubypants/rubypants.rb +490 -0
- data/vendor/extensions/markdown_filter/vendor/rubypants/test_rubypants.rb +162 -0
- data/vendor/extensions/textile_filter/README +1 -0
- data/vendor/extensions/textile_filter/Rakefile +120 -0
- data/vendor/extensions/textile_filter/lib/tasks/textile_filter_extension_tasks.rake +0 -0
- data/vendor/extensions/textile_filter/lib/textile_filter.rb +6 -0
- data/vendor/extensions/textile_filter/lib/textile_tags.rb +24 -0
- data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +19 -0
- data/vendor/extensions/textile_filter/spec/spec.opts +6 -0
- data/vendor/extensions/textile_filter/spec/spec_helper.rb +36 -0
- data/vendor/extensions/textile_filter/test/test_helper.rb +19 -0
- data/vendor/extensions/textile_filter/test/unit/textile_filter_test.rb +13 -0
- data/vendor/extensions/textile_filter/textile.html +115 -0
- data/vendor/extensions/textile_filter/textile_filter_extension.rb +10 -0
- data/vendor/highline/CHANGELOG +222 -0
- data/vendor/highline/INSTALL +35 -0
- data/vendor/highline/LICENSE +7 -0
- data/vendor/highline/README +63 -0
- data/vendor/highline/Rakefile +82 -0
- data/vendor/highline/TODO +6 -0
- data/vendor/highline/examples/ansi_colors.rb +38 -0
- data/vendor/highline/examples/asking_for_arrays.rb +18 -0
- data/vendor/highline/examples/basic_usage.rb +75 -0
- data/vendor/highline/examples/color_scheme.rb +32 -0
- data/vendor/highline/examples/limit.rb +12 -0
- data/vendor/highline/examples/menus.rb +65 -0
- data/vendor/highline/examples/overwrite.rb +19 -0
- data/vendor/highline/examples/page_and_wrap.rb +322 -0
- data/vendor/highline/examples/password.rb +7 -0
- data/vendor/highline/examples/trapping_eof.rb +22 -0
- data/vendor/highline/examples/using_readline.rb +17 -0
- data/vendor/highline/lib/highline.rb +758 -0
- data/vendor/highline/lib/highline/color_scheme.rb +120 -0
- data/vendor/highline/lib/highline/compatibility.rb +17 -0
- data/vendor/highline/lib/highline/import.rb +43 -0
- data/vendor/highline/lib/highline/menu.rb +395 -0
- data/vendor/highline/lib/highline/question.rb +463 -0
- data/vendor/highline/lib/highline/system_extensions.rb +193 -0
- data/vendor/highline/setup.rb +1360 -0
- data/vendor/highline/test/tc_color_scheme.rb +56 -0
- data/vendor/highline/test/tc_highline.rb +823 -0
- data/vendor/highline/test/tc_import.rb +54 -0
- data/vendor/highline/test/tc_menu.rb +429 -0
- data/vendor/highline/test/ts_all.rb +15 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/haml/FAQ +138 -0
- data/vendor/plugins/haml/MIT-LICENSE +20 -0
- data/vendor/plugins/haml/README.rdoc +319 -0
- data/vendor/plugins/haml/REVISION +1 -0
- data/vendor/plugins/haml/Rakefile +184 -0
- data/vendor/plugins/haml/VERSION +1 -0
- data/vendor/plugins/haml/bin/css2sass +7 -0
- data/vendor/plugins/haml/bin/haml +9 -0
- data/vendor/plugins/haml/bin/html2haml +7 -0
- data/vendor/plugins/haml/bin/sass +8 -0
- data/vendor/plugins/haml/extra/haml-mode.el +331 -0
- data/vendor/plugins/haml/extra/sass-mode.el +89 -0
- data/vendor/plugins/haml/init.rb +8 -0
- data/vendor/plugins/haml/lib/haml.rb +1018 -0
- data/vendor/plugins/haml/lib/haml/buffer.rb +240 -0
- data/vendor/plugins/haml/lib/haml/engine.rb +265 -0
- data/vendor/plugins/haml/lib/haml/error.rb +22 -0
- data/vendor/plugins/haml/lib/haml/exec.rb +374 -0
- data/vendor/plugins/haml/lib/haml/filters.rb +276 -0
- data/vendor/plugins/haml/lib/haml/helpers.rb +465 -0
- data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +45 -0
- data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +181 -0
- data/vendor/plugins/haml/lib/haml/html.rb +222 -0
- data/vendor/plugins/haml/lib/haml/precompiler.rb +811 -0
- data/vendor/plugins/haml/lib/haml/template.rb +51 -0
- data/vendor/plugins/haml/lib/haml/template/patch.rb +58 -0
- data/vendor/plugins/haml/lib/haml/template/plugin.rb +72 -0
- data/vendor/plugins/haml/lib/haml/util.rb +23 -0
- data/vendor/plugins/haml/lib/haml/version.rb +47 -0
- data/vendor/plugins/haml/lib/sass.rb +873 -0
- data/vendor/plugins/haml/lib/sass/constant.rb +216 -0
- data/vendor/plugins/haml/lib/sass/constant/color.rb +101 -0
- data/vendor/plugins/haml/lib/sass/constant/literal.rb +54 -0
- data/vendor/plugins/haml/lib/sass/constant/nil.rb +9 -0
- data/vendor/plugins/haml/lib/sass/constant/number.rb +87 -0
- data/vendor/plugins/haml/lib/sass/constant/operation.rb +30 -0
- data/vendor/plugins/haml/lib/sass/constant/string.rb +22 -0
- data/vendor/plugins/haml/lib/sass/css.rb +394 -0
- data/vendor/plugins/haml/lib/sass/engine.rb +466 -0
- data/vendor/plugins/haml/lib/sass/error.rb +35 -0
- data/vendor/plugins/haml/lib/sass/plugin.rb +169 -0
- data/vendor/plugins/haml/lib/sass/plugin/merb.rb +56 -0
- data/vendor/plugins/haml/lib/sass/plugin/rails.rb +24 -0
- data/vendor/plugins/haml/lib/sass/tree/attr_node.rb +57 -0
- data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +20 -0
- data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +46 -0
- data/vendor/plugins/haml/lib/sass/tree/node.rb +46 -0
- data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +93 -0
- data/vendor/plugins/haml/lib/sass/tree/value_node.rb +20 -0
- data/vendor/plugins/haml/rails/init.rb +1 -0
- data/vendor/plugins/haml/test/benchmark.rb +99 -0
- data/vendor/plugins/haml/test/haml/engine_test.rb +657 -0
- data/vendor/plugins/haml/test/haml/helper_test.rb +224 -0
- data/vendor/plugins/haml/test/haml/html2haml_test.rb +92 -0
- data/vendor/plugins/haml/test/haml/markaby/standard.mab +52 -0
- data/vendor/plugins/haml/test/haml/mocks/article.rb +6 -0
- data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +15 -0
- data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +9 -0
- data/vendor/plugins/haml/test/haml/results/filters.xhtml +60 -0
- data/vendor/plugins/haml/test/haml/results/helpers.xhtml +93 -0
- data/vendor/plugins/haml/test/haml/results/helpful.xhtml +10 -0
- data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +68 -0
- data/vendor/plugins/haml/test/haml/results/list.xhtml +12 -0
- data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +40 -0
- data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +148 -0
- data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +20 -0
- data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +5 -0
- data/vendor/plugins/haml/test/haml/results/partials.xhtml +21 -0
- data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +3 -0
- data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +74 -0
- data/vendor/plugins/haml/test/haml/results/standard.xhtml +42 -0
- data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +23 -0
- data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +5 -0
- data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +89 -0
- data/vendor/plugins/haml/test/haml/rhtml/_av_partial_1.rhtml +12 -0
- data/vendor/plugins/haml/test/haml/rhtml/_av_partial_2.rhtml +8 -0
- data/vendor/plugins/haml/test/haml/rhtml/action_view.rhtml +62 -0
- data/vendor/plugins/haml/test/haml/rhtml/standard.rhtml +54 -0
- data/vendor/plugins/haml/test/haml/template_test.rb +204 -0
- data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +9 -0
- data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +9 -0
- data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +5 -0
- data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +5 -0
- data/vendor/plugins/haml/test/haml/templates/_layout.erb +3 -0
- data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +3 -0
- data/vendor/plugins/haml/test/haml/templates/_partial.haml +8 -0
- data/vendor/plugins/haml/test/haml/templates/_text_area.haml +3 -0
- data/vendor/plugins/haml/test/haml/templates/action_view.haml +47 -0
- data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +47 -0
- data/vendor/plugins/haml/test/haml/templates/breakage.haml +8 -0
- data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +10 -0
- data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +11 -0
- data/vendor/plugins/haml/test/haml/templates/filters.haml +66 -0
- data/vendor/plugins/haml/test/haml/templates/helpers.haml +95 -0
- data/vendor/plugins/haml/test/haml/templates/helpful.haml +11 -0
- data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +83 -0
- data/vendor/plugins/haml/test/haml/templates/list.haml +12 -0
- data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +32 -0
- data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +144 -0
- data/vendor/plugins/haml/test/haml/templates/original_engine.haml +17 -0
- data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +3 -0
- data/vendor/plugins/haml/test/haml/templates/partialize.haml +1 -0
- data/vendor/plugins/haml/test/haml/templates/partials.haml +12 -0
- data/vendor/plugins/haml/test/haml/templates/render_layout.haml +2 -0
- data/vendor/plugins/haml/test/haml/templates/silent_script.haml +40 -0
- data/vendor/plugins/haml/test/haml/templates/standard.haml +42 -0
- data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +42 -0
- data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +21 -0
- data/vendor/plugins/haml/test/haml/templates/very_basic.haml +4 -0
- data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +87 -0
- data/vendor/plugins/haml/test/linked_rails.rb +12 -0
- data/vendor/plugins/haml/test/sass/css2sass_test.rb +193 -0
- data/vendor/plugins/haml/test/sass/engine_test.rb +294 -0
- data/vendor/plugins/haml/test/sass/plugin_test.rb +161 -0
- data/vendor/plugins/haml/test/sass/results/alt.css +4 -0
- data/vendor/plugins/haml/test/sass/results/basic.css +9 -0
- data/vendor/plugins/haml/test/sass/results/compact.css +5 -0
- data/vendor/plugins/haml/test/sass/results/complex.css +87 -0
- data/vendor/plugins/haml/test/sass/results/compressed.css +1 -0
- data/vendor/plugins/haml/test/sass/results/constants.css +16 -0
- data/vendor/plugins/haml/test/sass/results/expanded.css +19 -0
- data/vendor/plugins/haml/test/sass/results/import.css +29 -0
- data/vendor/plugins/haml/test/sass/results/mixins.css +95 -0
- data/vendor/plugins/haml/test/sass/results/multiline.css +24 -0
- data/vendor/plugins/haml/test/sass/results/nested.css +22 -0
- data/vendor/plugins/haml/test/sass/results/parent_ref.css +13 -0
- data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
- data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +1 -0
- data/vendor/plugins/haml/test/sass/templates/_partial.sass +2 -0
- data/vendor/plugins/haml/test/sass/templates/alt.sass +16 -0
- data/vendor/plugins/haml/test/sass/templates/basic.sass +23 -0
- data/vendor/plugins/haml/test/sass/templates/bork.sass +2 -0
- data/vendor/plugins/haml/test/sass/templates/bork2.sass +2 -0
- data/vendor/plugins/haml/test/sass/templates/compact.sass +17 -0
- data/vendor/plugins/haml/test/sass/templates/complex.sass +310 -0
- data/vendor/plugins/haml/test/sass/templates/compressed.sass +15 -0
- data/vendor/plugins/haml/test/sass/templates/constants.sass +100 -0
- data/vendor/plugins/haml/test/sass/templates/expanded.sass +17 -0
- data/vendor/plugins/haml/test/sass/templates/import.sass +11 -0
- data/vendor/plugins/haml/test/sass/templates/importee.sass +14 -0
- data/vendor/plugins/haml/test/sass/templates/mixins.sass +76 -0
- data/vendor/plugins/haml/test/sass/templates/multiline.sass +20 -0
- data/vendor/plugins/haml/test/sass/templates/nested.sass +25 -0
- data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +25 -0
- data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
- data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +6 -0
- data/vendor/plugins/haml/test/test_helper.rb +13 -0
- data/vendor/rack-cache/CHANGES +128 -0
- data/vendor/rack-cache/COPYING +18 -0
- data/vendor/rack-cache/README +110 -0
- data/vendor/rack-cache/Rakefile +137 -0
- data/vendor/rack-cache/TODO +31 -0
- data/vendor/rack-cache/doc/configuration.markdown +86 -0
- data/vendor/rack-cache/doc/faq.markdown +141 -0
- data/vendor/rack-cache/doc/index.markdown +118 -0
- data/vendor/rack-cache/doc/layout.html.erb +34 -0
- data/vendor/rack-cache/doc/license.markdown +24 -0
- data/vendor/rack-cache/doc/rack-cache.css +362 -0
- data/vendor/rack-cache/doc/server.ru +34 -0
- data/vendor/rack-cache/doc/storage.markdown +162 -0
- data/vendor/rack-cache/example/sinatra/app.rb +25 -0
- data/vendor/rack-cache/example/sinatra/views/index.erb +44 -0
- data/vendor/rack-cache/lib/rack/cache.rb +45 -0
- data/vendor/rack-cache/lib/rack/cache/cachecontrol.rb +193 -0
- data/vendor/rack-cache/lib/rack/cache/context.rb +233 -0
- data/vendor/rack-cache/lib/rack/cache/entitystore.rb +253 -0
- data/vendor/rack-cache/lib/rack/cache/key.rb +52 -0
- data/vendor/rack-cache/lib/rack/cache/metastore.rb +328 -0
- data/vendor/rack-cache/lib/rack/cache/options.rb +150 -0
- data/vendor/rack-cache/lib/rack/cache/request.rb +33 -0
- data/vendor/rack-cache/lib/rack/cache/response.rb +267 -0
- data/vendor/rack-cache/lib/rack/cache/storage.rb +49 -0
- data/vendor/rack-cache/rack-cache.gemspec +69 -0
- data/vendor/rack-cache/test/cache_test.rb +38 -0
- data/vendor/rack-cache/test/cachecontrol_test.rb +139 -0
- data/vendor/rack-cache/test/context_test.rb +727 -0
- data/vendor/rack-cache/test/entitystore_test.rb +189 -0
- data/vendor/rack-cache/test/key_test.rb +50 -0
- data/vendor/rack-cache/test/metastore_test.rb +263 -0
- data/vendor/rack-cache/test/options_test.rb +78 -0
- data/vendor/rack-cache/test/pony.jpg +0 -0
- data/vendor/rack-cache/test/request_test.rb +19 -0
- data/vendor/rack-cache/test/response_test.rb +178 -0
- data/vendor/rack-cache/test/spec_setup.rb +202 -0
- data/vendor/rack-cache/test/storage_test.rb +94 -0
- data/vendor/radius/CHANGELOG +33 -0
- data/vendor/radius/Manifest.txt +21 -0
- data/vendor/radius/QUICKSTART.rdoc +322 -0
- data/vendor/radius/README.rdoc +118 -0
- data/vendor/radius/Rakefile +31 -0
- data/vendor/radius/lib/radius.rb +10 -0
- data/vendor/radius/lib/radius/context.rb +139 -0
- data/vendor/radius/lib/radius/delegating_open_struct.rb +31 -0
- data/vendor/radius/lib/radius/error.rb +43 -0
- data/vendor/radius/lib/radius/parse_tag.rb +24 -0
- data/vendor/radius/lib/radius/parser.rb +65 -0
- data/vendor/radius/lib/radius/parser/scan.rb +1247 -0
- data/vendor/radius/lib/radius/parser/scan.rl +123 -0
- data/vendor/radius/lib/radius/tag_binding.rb +71 -0
- data/vendor/radius/lib/radius/tag_definitions.rb +78 -0
- data/vendor/radius/lib/radius/utility.rb +30 -0
- data/vendor/radius/lib/radius/version.rb +14 -0
- data/vendor/radius/radius.gemspec +38 -0
- data/vendor/radius/tasks/scan.rake +27 -0
- data/vendor/radius/test/context_test.rb +61 -0
- data/vendor/radius/test/parser_test.rb +290 -0
- data/vendor/radius/test/quickstart_test.rb +153 -0
- data/vendor/radius/test/test_helper.rb +28 -0
- data/vendor/rails/actionmailer/CHANGELOG +366 -0
- data/vendor/rails/actionmailer/MIT-LICENSE +21 -0
- data/vendor/rails/actionmailer/README +149 -0
- data/vendor/rails/actionmailer/Rakefile +99 -0
- data/vendor/rails/actionmailer/install.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer.rb +62 -0
- data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +30 -0
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +706 -0
- data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +113 -0
- data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +17 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part.rb +107 -0
- data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +55 -0
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +61 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +64 -0
- data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +68 -0
- data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +7 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb +10 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb +5 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb +426 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +46 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb +46 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb +41 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb +63 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb +581 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb +960 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb +9 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb +1130 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb +3 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb +578 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb +495 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb +6 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb +3 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb +248 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb +132 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +1476 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb +379 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb +118 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb +58 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb +49 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb +261 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb +280 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb +337 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb +39 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +17 -0
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +9 -0
- data/vendor/rails/actionmailer/lib/actionmailer.rb +1 -0
- data/vendor/rails/actionmailer/test/abstract_unit.rb +62 -0
- data/vendor/rails/actionmailer/test/asset_host_test.rb +54 -0
- data/vendor/rails/actionmailer/test/delivery_method_test.rb +51 -0
- data/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
- data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/layouts/spam.html.erb +1 -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/raw_email +14 -0
- data/vendor/rails/actionmailer/test/fixtures/raw_email10 +20 -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_invalid_characters_in_content_type +104 -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/templates/signed_up.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/body_ivar.erb +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -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.text.html.erb +10 -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.yaml.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +2 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb +3 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
- data/vendor/rails/actionmailer/test/mail_helper_test.rb +95 -0
- data/vendor/rails/actionmailer/test/mail_layout_test.rb +123 -0
- data/vendor/rails/actionmailer/test/mail_render_test.rb +116 -0
- data/vendor/rails/actionmailer/test/mail_service_test.rb +1079 -0
- data/vendor/rails/actionmailer/test/quoting_test.rb +99 -0
- data/vendor/rails/actionmailer/test/test_helper_test.rb +129 -0
- data/vendor/rails/actionmailer/test/tmail_test.rb +22 -0
- data/vendor/rails/actionmailer/test/url_test.rb +76 -0
- data/vendor/rails/actionpack/CHANGELOG +5172 -0
- data/vendor/rails/actionpack/MIT-LICENSE +21 -0
- data/vendor/rails/actionpack/README +409 -0
- data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +24 -0
- data/vendor/rails/actionpack/Rakefile +160 -0
- data/vendor/rails/actionpack/install.rb +30 -0
- data/vendor/rails/actionpack/lib/action_controller.rb +111 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +39 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +160 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +146 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +632 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +127 -0
- data/vendor/rails/actionpack/lib/action_controller/base.rb +1423 -0
- data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +107 -0
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +70 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/actions.rb +177 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +120 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/pages.rb +152 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/sweeper.rb +45 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb +55 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +15 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +112 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +22 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +24 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +77 -0
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +94 -0
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +133 -0
- data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +86 -0
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +680 -0
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +171 -0
- data/vendor/rails/actionpack/lib/action_controller/headers.rb +33 -0
- data/vendor/rails/actionpack/lib/action_controller/helpers.rb +225 -0
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +308 -0
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +680 -0
- data/vendor/rails/actionpack/lib/action_controller/layout.rb +281 -0
- data/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb +119 -0
- data/vendor/rails/actionpack/lib/action_controller/middlewares.rb +12 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +193 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +212 -0
- data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/params_parser.rb +77 -0
- data/vendor/rails/actionpack/lib/action_controller/performance_test.rb +15 -0
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +204 -0
- data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +104 -0
- data/vendor/rails/actionpack/lib/action_controller/reloader.rb +54 -0
- data/vendor/rails/actionpack/lib/action_controller/request.rb +493 -0
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +109 -0
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +183 -0
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +682 -0
- data/vendor/rails/actionpack/lib/action_controller/response.rb +238 -0
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +388 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/builder.rb +197 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb +130 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb +167 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/route.rb +265 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +502 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/routing_ext.rb +49 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/segments.rb +343 -0
- data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +181 -0
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +221 -0
- data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +51 -0
- data/vendor/rails/actionpack/lib/action_controller/session_management.rb +54 -0
- data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +88 -0
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +181 -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/_trace.erb +26 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +29 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +10 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/test_case.rb +204 -0
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +580 -0
- data/vendor/rails/actionpack/lib/action_controller/translation.rb +13 -0
- data/vendor/rails/actionpack/lib/action_controller/uploaded_file.rb +44 -0
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +216 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner.rb +16 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +68 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +537 -0
- data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -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 +130 -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 +58 -0
- data/vendor/rails/actionpack/lib/action_view/base.rb +357 -0
- data/vendor/rails/actionpack/lib/action_view/erb/util.rb +38 -0
- data/vendor/rails/actionpack/lib/action_view/helpers.rb +57 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +305 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +694 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +198 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +54 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +39 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +136 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +976 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +38 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +1053 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +600 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +487 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +208 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +303 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +1305 -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 +58 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +251 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +226 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +150 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +587 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb +39 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +638 -0
- data/vendor/rails/actionpack/lib/action_view/inline_template.rb +19 -0
- data/vendor/rails/actionpack/lib/action_view/locale/en.yml +114 -0
- data/vendor/rails/actionpack/lib/action_view/partials.rb +240 -0
- data/vendor/rails/actionpack/lib/action_view/paths.rb +69 -0
- data/vendor/rails/actionpack/lib/action_view/reloadable_template.rb +117 -0
- data/vendor/rails/actionpack/lib/action_view/renderable.rb +95 -0
- data/vendor/rails/actionpack/lib/action_view/renderable_partial.rb +47 -0
- data/vendor/rails/actionpack/lib/action_view/template.rb +246 -0
- data/vendor/rails/actionpack/lib/action_view/template_error.rb +99 -0
- data/vendor/rails/actionpack/lib/action_view/template_handler.rb +34 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers.rb +48 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +17 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +22 -0
- data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +13 -0
- data/vendor/rails/actionpack/lib/action_view/test_case.rb +87 -0
- data/vendor/rails/actionpack/lib/actionpack.rb +1 -0
- data/vendor/rails/actionpack/test/abstract_unit.rb +61 -0
- data/vendor/rails/actionpack/test/active_record_unit.rb +104 -0
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +174 -0
- data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +188 -0
- data/vendor/rails/actionpack/test/adv_attr_test.rb +20 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +543 -0
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +37 -0
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +734 -0
- data/vendor/rails/actionpack/test/controller/base_test.rb +217 -0
- data/vendor/rails/actionpack/test/controller/benchmark_test.rb +32 -0
- data/vendor/rails/actionpack/test/controller/caching_test.rb +729 -0
- data/vendor/rails/actionpack/test/controller/capture_test.rb +66 -0
- data/vendor/rails/actionpack/test/controller/content_type_test.rb +168 -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 +127 -0
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +32 -0
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +144 -0
- data/vendor/rails/actionpack/test/controller/failsafe_test.rb +60 -0
- data/vendor/rails/actionpack/test/controller/fake_controllers.rb +33 -0
- data/vendor/rails/actionpack/test/controller/fake_models.rb +19 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +51 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +885 -0
- data/vendor/rails/actionpack/test/controller/flash_test.rb +147 -0
- data/vendor/rails/actionpack/test/controller/header_test.rb +14 -0
- data/vendor/rails/actionpack/test/controller/helper_test.rb +224 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/cdata_node_test.rb +15 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +148 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +89 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +273 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +238 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +50 -0
- data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +131 -0
- data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +113 -0
- data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +232 -0
- data/vendor/rails/actionpack/test/controller/integration_test.rb +445 -0
- data/vendor/rails/actionpack/test/controller/layout_test.rb +204 -0
- data/vendor/rails/actionpack/test/controller/logging_test.rb +46 -0
- data/vendor/rails/actionpack/test/controller/middleware_stack_test.rb +90 -0
- data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +536 -0
- data/vendor/rails/actionpack/test/controller/mime_type_test.rb +93 -0
- data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +293 -0
- data/vendor/rails/actionpack/test/controller/rack_test.rb +311 -0
- data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +139 -0
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +285 -0
- data/vendor/rails/actionpack/test/controller/reloader_test.rb +124 -0
- data/vendor/rails/actionpack/test/controller/render_test.rb +1762 -0
- data/vendor/rails/actionpack/test/controller/request/json_params_parsing_test.rb +65 -0
- data/vendor/rails/actionpack/test/controller/request/multipart_params_parsing_test.rb +162 -0
- data/vendor/rails/actionpack/test/controller/request/query_string_parsing_test.rb +120 -0
- data/vendor/rails/actionpack/test/controller/request/test_request_test.rb +35 -0
- data/vendor/rails/actionpack/test/controller/request/url_encoded_params_parsing_test.rb +146 -0
- data/vendor/rails/actionpack/test/controller/request/xml_params_parsing_test.rb +103 -0
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +247 -0
- data/vendor/rails/actionpack/test/controller/request_test.rb +395 -0
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +536 -0
- data/vendor/rails/actionpack/test/controller/resources_test.rb +1393 -0
- data/vendor/rails/actionpack/test/controller/routing_test.rb +2583 -0
- data/vendor/rails/actionpack/test/controller/selector_test.rb +628 -0
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +171 -0
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +216 -0
- data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +127 -0
- data/vendor/rails/actionpack/test/controller/session/test_session_test.rb +58 -0
- data/vendor/rails/actionpack/test/controller/test_test.rb +700 -0
- data/vendor/rails/actionpack/test/controller/translation_test.rb +26 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +385 -0
- data/vendor/rails/actionpack/test/controller/verification_test.rb +270 -0
- data/vendor/rails/actionpack/test/controller/view_paths_test.rb +141 -0
- data/vendor/rails/actionpack/test/controller/webservice_test.rb +260 -0
- data/vendor/rails/actionpack/test/fixtures/_top_level_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/companies.yml +24 -0
- data/vendor/rails/actionpack/test/fixtures/company.rb +10 -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/customers/_customer.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +49 -0
- data/vendor/rails/actionpack/test/fixtures/developer.rb +9 -0
- data/vendor/rails/actionpack/test/fixtures/developers.yml +21 -0
- data/vendor/rails/actionpack/test/fixtures/developers/_developer.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +13 -0
- data/vendor/rails/actionpack/test/fixtures/failsafe/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/_game.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/fun/serious/games/_game.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.js.rjs +6 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +5 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/good_customers/_good_customer.html.erb +1 -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/alt/hello.rhtml +1 -0
- data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/layouts/alt.rhtml +0 -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/_column.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/default_html.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/xhr.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/mascot.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/mascots.yml +4 -0
- data/vendor/rails/actionpack/test/fixtures/mascots/_mascot.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/empty +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/hello.txt +1 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +10 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
- data/vendor/rails/actionpack/test/fixtures/multipart/none +9 -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/override2/layouts/test/sub.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/project.rb +3 -0
- data/vendor/rails/actionpack/test/fixtures/projects.yml +7 -0
- data/vendor/rails/actionpack/test/fixtures/projects/_project.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.da.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/absolute/test.css +23 -0
- data/vendor/rails/actionpack/test/fixtures/public/absolute/test.js +63 -0
- data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/controls.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/dragdrop.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/effects.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/prototype.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/subdir/subdir.js +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/javascripts/version.1.0.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/public/stylesheets/subdir/subdir.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/stylesheets/version.1.0.css +1 -0
- data/vendor/rails/actionpack/test/fixtures/quiz/questions/_question.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/replies.yml +15 -0
- data/vendor/rails/actionpack/test/fixtures/replies/_reply.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/reply.rb +7 -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/custom_constant_handling_without_block.mobile.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.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/shared.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/symlink_parent/symlinked_layout.erb +5 -0
- data/vendor/rails/actionpack/test/fixtures/test/_counter.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_counter.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_with_var.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_form.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_labelling_form.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/_local_inspector.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_one.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_person.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/_raise.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_two.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/dont_pick_me +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +6 -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.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.da.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.pt-BR.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
- data/vendor/rails/actionpack/test/fixtures/test/hyphen-ated.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/implicit_content_type.atom.builder +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/nested_layout.erb +3 -0
- data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +4 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_explicit_html_template.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_from_template.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template.js.rjs +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.da.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_implicit_js_template_without_layout.js.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/sub_template_raise.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/template.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +9 -0
- data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block_with_args.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/utf8.html.erb +2 -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/fixtures/topics/_topic.html.erb +1 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb +44 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +302 -0
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +759 -0
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +315 -0
- data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +86 -0
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +203 -0
- data/vendor/rails/actionpack/test/template/date_helper_i18n_test.rb +120 -0
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +2469 -0
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +24 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +1313 -0
- data/vendor/rails/actionpack/test/template/form_options_helper_i18n_test.rb +27 -0
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +807 -0
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +344 -0
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +106 -0
- data/vendor/rails/actionpack/test/template/number_helper_i18n_test.rb +69 -0
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +128 -0
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +639 -0
- data/vendor/rails/actionpack/test/template/record_tag_helper_test.rb +58 -0
- data/vendor/rails/actionpack/test/template/render_test.rb +290 -0
- data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +48 -0
- data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +90 -0
- data/vendor/rails/actionpack/test/template/tag_helper_test.rb +97 -0
- data/vendor/rails/actionpack/test/template/template_test.rb +32 -0
- data/vendor/rails/actionpack/test/template/test_test.rb +54 -0
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +543 -0
- data/vendor/rails/actionpack/test/template/translation_helper_test.rb +32 -0
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +622 -0
- data/vendor/rails/actionpack/test/testing_sandbox.rb +15 -0
- data/vendor/rails/actionpack/test/view/test_case_test.rb +8 -0
- data/vendor/rails/activerecord/CHANGELOG +5850 -0
- data/vendor/rails/activerecord/README +351 -0
- data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +36 -0
- data/vendor/rails/activerecord/Rakefile +270 -0
- data/vendor/rails/activerecord/examples/associations.png +0 -0
- data/vendor/rails/activerecord/examples/performance.rb +162 -0
- data/vendor/rails/activerecord/install.rb +30 -0
- data/vendor/rails/activerecord/lib/active_record.rb +84 -0
- data/vendor/rails/activerecord/lib/active_record/aggregations.rb +261 -0
- data/vendor/rails/activerecord/lib/active_record/association_preload.rb +389 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +2238 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +475 -0
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +279 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +76 -0
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +53 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +143 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +122 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +266 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +124 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb +37 -0
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +388 -0
- data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +355 -0
- data/vendor/rails/activerecord/lib/active_record/base.rb +3158 -0
- data/vendor/rails/activerecord/lib/active_record/batches.rb +81 -0
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +311 -0
- data/vendor/rails/activerecord/lib/active_record/callbacks.rb +360 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +371 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +139 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +289 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +94 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +69 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +722 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +434 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +241 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +626 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +1113 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +453 -0
- data/vendor/rails/activerecord/lib/active_record/dirty.rb +183 -0
- data/vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb +41 -0
- data/vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb +25 -0
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +996 -0
- data/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
- data/vendor/rails/activerecord/lib/active_record/locale/en.yml +58 -0
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +181 -0
- data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +77 -0
- data/vendor/rails/activerecord/lib/active_record/migration.rb +566 -0
- data/vendor/rails/activerecord/lib/active_record/named_scope.rb +192 -0
- data/vendor/rails/activerecord/lib/active_record/nested_attributes.rb +329 -0
- data/vendor/rails/activerecord/lib/active_record/observer.rb +197 -0
- data/vendor/rails/activerecord/lib/active_record/query_cache.rb +33 -0
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +320 -0
- data/vendor/rails/activerecord/lib/active_record/schema.rb +51 -0
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +182 -0
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +101 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +91 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +357 -0
- data/vendor/rails/activerecord/lib/active_record/session_store.rb +326 -0
- data/vendor/rails/activerecord/lib/active_record/test_case.rb +66 -0
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +71 -0
- data/vendor/rails/activerecord/lib/active_record/transactions.rb +235 -0
- data/vendor/rails/activerecord/lib/active_record/validations.rb +1135 -0
- data/vendor/rails/activerecord/lib/active_record/version.rb +9 -0
- data/vendor/rails/activerecord/lib/activerecord.rb +1 -0
- data/vendor/rails/activerecord/test/assets/example.log +1 -0
- data/vendor/rails/activerecord/test/assets/flowers.jpg +0 -0
- data/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb +24 -0
- data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +100 -0
- data/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb +24 -0
- data/vendor/rails/activerecord/test/cases/adapter_test.rb +145 -0
- data/vendor/rails/activerecord/test/cases/aggregations_test.rb +167 -0
- data/vendor/rails/activerecord/test/cases/ar_schema_test.rb +32 -0
- data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +425 -0
- data/vendor/rails/activerecord/test/cases/associations/callbacks_test.rb +161 -0
- data/vendor/rails/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +131 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +36 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +130 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_singularization_test.rb +145 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +834 -0
- data/vendor/rails/activerecord/test/cases/associations/extension_test.rb +62 -0
- data/vendor/rails/activerecord/test/cases/associations/habtm_join_table_test.rb +56 -0
- data/vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +822 -0
- data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +1122 -0
- data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +324 -0
- data/vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb +309 -0
- data/vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb +209 -0
- data/vendor/rails/activerecord/test/cases/associations/inner_join_association_test.rb +93 -0
- data/vendor/rails/activerecord/test/cases/associations/join_model_test.rb +712 -0
- data/vendor/rails/activerecord/test/cases/associations_test.rb +262 -0
- data/vendor/rails/activerecord/test/cases/attribute_methods_test.rb +305 -0
- data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +923 -0
- data/vendor/rails/activerecord/test/cases/base_test.rb +2152 -0
- data/vendor/rails/activerecord/test/cases/batches_test.rb +61 -0
- data/vendor/rails/activerecord/test/cases/binary_test.rb +30 -0
- data/vendor/rails/activerecord/test/cases/calculations_test.rb +348 -0
- data/vendor/rails/activerecord/test/cases/callbacks_observers_test.rb +38 -0
- data/vendor/rails/activerecord/test/cases/callbacks_test.rb +438 -0
- data/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb +32 -0
- data/vendor/rails/activerecord/test/cases/column_alias_test.rb +17 -0
- data/vendor/rails/activerecord/test/cases/column_definition_test.rb +70 -0
- data/vendor/rails/activerecord/test/cases/connection_pool_test.rb +25 -0
- data/vendor/rails/activerecord/test/cases/connection_test_firebird.rb +8 -0
- data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +56 -0
- data/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb +80 -0
- data/vendor/rails/activerecord/test/cases/database_statements_test.rb +12 -0
- data/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb +204 -0
- data/vendor/rails/activerecord/test/cases/date_time_test.rb +37 -0
- data/vendor/rails/activerecord/test/cases/default_test_firebird.rb +16 -0
- data/vendor/rails/activerecord/test/cases/defaults_test.rb +111 -0
- data/vendor/rails/activerecord/test/cases/deprecated_finder_test.rb +30 -0
- data/vendor/rails/activerecord/test/cases/dirty_test.rb +316 -0
- data/vendor/rails/activerecord/test/cases/finder_respond_to_test.rb +76 -0
- data/vendor/rails/activerecord/test/cases/finder_test.rb +1054 -0
- data/vendor/rails/activerecord/test/cases/fixtures_test.rb +656 -0
- data/vendor/rails/activerecord/test/cases/helper.rb +68 -0
- data/vendor/rails/activerecord/test/cases/i18n_test.rb +46 -0
- data/vendor/rails/activerecord/test/cases/inheritance_test.rb +262 -0
- data/vendor/rails/activerecord/test/cases/invalid_date_test.rb +24 -0
- data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +205 -0
- data/vendor/rails/activerecord/test/cases/lifecycle_test.rb +193 -0
- data/vendor/rails/activerecord/test/cases/locking_test.rb +322 -0
- data/vendor/rails/activerecord/test/cases/method_scoping_test.rb +704 -0
- data/vendor/rails/activerecord/test/cases/migration_test.rb +1523 -0
- data/vendor/rails/activerecord/test/cases/migration_test_firebird.rb +124 -0
- data/vendor/rails/activerecord/test/cases/mixin_test.rb +96 -0
- data/vendor/rails/activerecord/test/cases/modules_test.rb +81 -0
- data/vendor/rails/activerecord/test/cases/multiple_db_test.rb +85 -0
- data/vendor/rails/activerecord/test/cases/named_scope_test.rb +361 -0
- data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +509 -0
- data/vendor/rails/activerecord/test/cases/pk_test.rb +119 -0
- data/vendor/rails/activerecord/test/cases/pooled_connections_test.rb +103 -0
- data/vendor/rails/activerecord/test/cases/query_cache_test.rb +123 -0
- data/vendor/rails/activerecord/test/cases/readonly_test.rb +107 -0
- data/vendor/rails/activerecord/test/cases/reflection_test.rb +194 -0
- data/vendor/rails/activerecord/test/cases/reload_models_test.rb +22 -0
- data/vendor/rails/activerecord/test/cases/repair_helper.rb +50 -0
- data/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb +176 -0
- data/vendor/rails/activerecord/test/cases/sanitize_test.rb +25 -0
- data/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb +75 -0
- data/vendor/rails/activerecord/test/cases/schema_dumper_test.rb +211 -0
- data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +178 -0
- data/vendor/rails/activerecord/test/cases/serialization_test.rb +47 -0
- data/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb +17 -0
- data/vendor/rails/activerecord/test/cases/timestamp_test.rb +75 -0
- data/vendor/rails/activerecord/test/cases/transactions_test.rb +522 -0
- data/vendor/rails/activerecord/test/cases/unconnected_test.rb +32 -0
- data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +947 -0
- data/vendor/rails/activerecord/test/cases/validations_test.rb +1612 -0
- data/vendor/rails/activerecord/test/cases/xml_serialization_test.rb +240 -0
- data/vendor/rails/activerecord/test/config.rb +5 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbcderby/connection.rb +18 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbch2/connection.rb +18 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbchsqldb/connection.rb +18 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbcmysql/connection.rb +26 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb +26 -0
- data/vendor/rails/activerecord/test/connections/jdbc_jdbcsqlite3/connection.rb +25 -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 +25 -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 +21 -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_sybase/connection.rb +23 -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_addresses.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/authors.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/binaries.yml +132 -0
- data/vendor/rails/activerecord/test/fixtures/books.yml +7 -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/categorizations.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/clubs.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/comments.yml +59 -0
- data/vendor/rails/activerecord/test/fixtures/companies.yml +56 -0
- data/vendor/rails/activerecord/test/fixtures/computers.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/courses.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/customers.yml +26 -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/edges.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/entrants.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -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/funny_jokes.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures/items.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/jobs.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +3 -0
- data/vendor/rails/activerecord/test/fixtures/mateys.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/member_types.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/members.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/memberships.yml +20 -0
- data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +2 -0
- data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
- data/vendor/rails/activerecord/test/fixtures/mixins.yml +29 -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/organizations.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/owners.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/parrots.yml +27 -0
- data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/people.yml +15 -0
- data/vendor/rails/activerecord/test/fixtures/pets.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/pirates.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/posts.yml +52 -0
- data/vendor/rails/activerecord/test/fixtures/price_estimates.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/projects.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/readers.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/references.yml +17 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +14 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +8 -0
- data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/ships.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/sponsors.yml +9 -0
- data/vendor/rails/activerecord/test/fixtures/subscribers.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/subscriptions.yml +12 -0
- data/vendor/rails/activerecord/test/fixtures/taggings.yml +28 -0
- data/vendor/rails/activerecord/test/fixtures/tags.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/tasks.yml +7 -0
- data/vendor/rails/activerecord/test/fixtures/topics.yml +42 -0
- data/vendor/rails/activerecord/test/fixtures/toys.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/treasures.yml +10 -0
- data/vendor/rails/activerecord/test/fixtures/vertices.yml +4 -0
- data/vendor/rails/activerecord/test/fixtures/warehouse-things.yml +3 -0
- data/vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb +10 -0
- data/vendor/rails/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +15 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/3_foo.rb +7 -0
- data/vendor/rails/activerecord/test/migrations/duplicate/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb +7 -0
- data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb +7 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +8 -0
- data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb +9 -0
- data/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb +12 -0
- data/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb +12 -0
- data/vendor/rails/activerecord/test/models/author.rb +146 -0
- data/vendor/rails/activerecord/test/models/auto_id.rb +4 -0
- data/vendor/rails/activerecord/test/models/binary.rb +2 -0
- data/vendor/rails/activerecord/test/models/bird.rb +3 -0
- data/vendor/rails/activerecord/test/models/book.rb +4 -0
- data/vendor/rails/activerecord/test/models/categorization.rb +5 -0
- data/vendor/rails/activerecord/test/models/category.rb +34 -0
- data/vendor/rails/activerecord/test/models/citation.rb +6 -0
- data/vendor/rails/activerecord/test/models/club.rb +13 -0
- data/vendor/rails/activerecord/test/models/column_name.rb +3 -0
- data/vendor/rails/activerecord/test/models/comment.rb +29 -0
- data/vendor/rails/activerecord/test/models/company.rb +161 -0
- data/vendor/rails/activerecord/test/models/company_in_module.rb +61 -0
- data/vendor/rails/activerecord/test/models/computer.rb +3 -0
- data/vendor/rails/activerecord/test/models/contact.rb +16 -0
- data/vendor/rails/activerecord/test/models/contract.rb +5 -0
- data/vendor/rails/activerecord/test/models/course.rb +3 -0
- data/vendor/rails/activerecord/test/models/customer.rb +73 -0
- data/vendor/rails/activerecord/test/models/default.rb +2 -0
- data/vendor/rails/activerecord/test/models/developer.rb +101 -0
- data/vendor/rails/activerecord/test/models/edge.rb +5 -0
- data/vendor/rails/activerecord/test/models/entrant.rb +3 -0
- data/vendor/rails/activerecord/test/models/essay.rb +3 -0
- data/vendor/rails/activerecord/test/models/event.rb +3 -0
- data/vendor/rails/activerecord/test/models/guid.rb +2 -0
- data/vendor/rails/activerecord/test/models/item.rb +7 -0
- data/vendor/rails/activerecord/test/models/job.rb +5 -0
- data/vendor/rails/activerecord/test/models/joke.rb +3 -0
- data/vendor/rails/activerecord/test/models/keyboard.rb +3 -0
- data/vendor/rails/activerecord/test/models/legacy_thing.rb +3 -0
- data/vendor/rails/activerecord/test/models/matey.rb +4 -0
- data/vendor/rails/activerecord/test/models/member.rb +12 -0
- data/vendor/rails/activerecord/test/models/member_detail.rb +5 -0
- data/vendor/rails/activerecord/test/models/member_type.rb +3 -0
- data/vendor/rails/activerecord/test/models/membership.rb +9 -0
- data/vendor/rails/activerecord/test/models/minimalistic.rb +2 -0
- data/vendor/rails/activerecord/test/models/mixed_case_monkey.rb +3 -0
- data/vendor/rails/activerecord/test/models/movie.rb +5 -0
- data/vendor/rails/activerecord/test/models/order.rb +4 -0
- data/vendor/rails/activerecord/test/models/organization.rb +6 -0
- data/vendor/rails/activerecord/test/models/owner.rb +5 -0
- data/vendor/rails/activerecord/test/models/parrot.rb +16 -0
- data/vendor/rails/activerecord/test/models/person.rb +16 -0
- data/vendor/rails/activerecord/test/models/pet.rb +5 -0
- data/vendor/rails/activerecord/test/models/pirate.rb +63 -0
- data/vendor/rails/activerecord/test/models/post.rb +100 -0
- data/vendor/rails/activerecord/test/models/price_estimate.rb +3 -0
- data/vendor/rails/activerecord/test/models/project.rb +30 -0
- data/vendor/rails/activerecord/test/models/reader.rb +4 -0
- data/vendor/rails/activerecord/test/models/reference.rb +4 -0
- data/vendor/rails/activerecord/test/models/reply.rb +46 -0
- data/vendor/rails/activerecord/test/models/ship.rb +10 -0
- data/vendor/rails/activerecord/test/models/ship_part.rb +5 -0
- data/vendor/rails/activerecord/test/models/sponsor.rb +4 -0
- data/vendor/rails/activerecord/test/models/subject.rb +4 -0
- data/vendor/rails/activerecord/test/models/subscriber.rb +8 -0
- data/vendor/rails/activerecord/test/models/subscription.rb +4 -0
- data/vendor/rails/activerecord/test/models/tag.rb +7 -0
- data/vendor/rails/activerecord/test/models/tagging.rb +10 -0
- data/vendor/rails/activerecord/test/models/task.rb +3 -0
- data/vendor/rails/activerecord/test/models/topic.rb +80 -0
- data/vendor/rails/activerecord/test/models/toy.rb +6 -0
- data/vendor/rails/activerecord/test/models/treasure.rb +6 -0
- data/vendor/rails/activerecord/test/models/vertex.rb +9 -0
- data/vendor/rails/activerecord/test/models/warehouse_thing.rb +5 -0
- data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +12 -0
- data/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb +114 -0
- data/vendor/rails/activerecord/test/schema/schema.rb +492 -0
- data/vendor/rails/activerecord/test/schema/schema2.rb +6 -0
- data/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb +25 -0
- data/vendor/rails/activeresource/CHANGELOG +283 -0
- data/vendor/rails/activeresource/README +165 -0
- data/vendor/rails/activeresource/Rakefile +139 -0
- data/vendor/rails/activeresource/lib/active_resource.rb +44 -0
- data/vendor/rails/activeresource/lib/active_resource/base.rb +1157 -0
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +283 -0
- data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +120 -0
- data/vendor/rails/activeresource/lib/active_resource/exceptions.rb +66 -0
- data/vendor/rails/activeresource/lib/active_resource/formats.rb +14 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +23 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +34 -0
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +207 -0
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +290 -0
- data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
- data/vendor/rails/activeresource/lib/activeresource.rb +1 -0
- data/vendor/rails/activeresource/test/abstract_unit.rb +21 -0
- data/vendor/rails/activeresource/test/authorization_test.rb +122 -0
- data/vendor/rails/activeresource/test/base/custom_methods_test.rb +100 -0
- data/vendor/rails/activeresource/test/base/equality_test.rb +52 -0
- data/vendor/rails/activeresource/test/base/load_test.rb +161 -0
- data/vendor/rails/activeresource/test/base_errors_test.rb +85 -0
- data/vendor/rails/activeresource/test/base_test.rb +1038 -0
- data/vendor/rails/activeresource/test/connection_test.rb +238 -0
- data/vendor/rails/activeresource/test/debug.log +7974 -0
- data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
- data/vendor/rails/activeresource/test/fixtures/customer.rb +3 -0
- data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
- data/vendor/rails/activeresource/test/fixtures/proxy.rb +4 -0
- data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
- data/vendor/rails/activeresource/test/format_test.rb +112 -0
- data/vendor/rails/activeresource/test/setter_trap.rb +26 -0
- data/vendor/rails/activesupport/CHANGELOG +1322 -0
- data/vendor/rails/activesupport/README +43 -0
- data/vendor/rails/activesupport/lib/active_support.rb +59 -0
- data/vendor/rails/activesupport/lib/active_support/all.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/backtrace_cleaner.rb +72 -0
- data/vendor/rails/activesupport/lib/active_support/base64.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/basic_object.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +127 -0
- data/vendor/rails/activesupport/lib/active_support/cache.rb +241 -0
- data/vendor/rails/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/cache/drb_store.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/cache/file_store.rb +72 -0
- data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +138 -0
- data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +104 -0
- data/vendor/rails/activesupport/lib/active_support/cache/synchronized_memory_store.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/callbacks.rb +279 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +53 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +197 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +106 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/wrapper.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/base64.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +58 -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 +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +47 -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 +50 -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 +42 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +231 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +107 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +12 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +126 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +96 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +43 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +114 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +45 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +46 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +247 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +143 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +29 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/integer/time.rb +45 -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 +7 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +59 -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 +145 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +74 -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 +32 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +60 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +135 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +90 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/synchronization.rb +39 -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 +9 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +50 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +81 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +80 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +90 -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/process.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +32 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +15 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/rexml.rb +41 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +106 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/behavior.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/bytesize.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/filters.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +167 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/multibyte.rb +81 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +42 -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 +303 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +90 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb +86 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/try.rb +36 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/uri.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +625 -0
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +196 -0
- data/vendor/rails/activesupport/lib/active_support/duration.rb +100 -0
- data/vendor/rails/activesupport/lib/active_support/gzip.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +406 -0
- data/vendor/rails/activesupport/lib/active_support/json.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/json/backends/jsongem.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb +88 -0
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +17 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +21 -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 +9 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +7 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +102 -0
- data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
- data/vendor/rails/activesupport/lib/active_support/locale/en.yml +33 -0
- data/vendor/rails/activesupport/lib/active_support/memoizable.rb +100 -0
- data/vendor/rails/activesupport/lib/active_support/message_encryptor.rb +70 -0
- data/vendor/rails/activesupport/lib/active_support/message_verifier.rb +59 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +57 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +707 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/exceptions.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/unicode_database.rb +71 -0
- data/vendor/rails/activesupport/lib/active_support/multibyte/utils.rb +61 -0
- data/vendor/rails/activesupport/lib/active_support/option_merger.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +134 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/rescuable.rb +108 -0
- data/vendor/rails/activesupport/lib/active_support/secure_random.rb +199 -0
- data/vendor/rails/activesupport/lib/active_support/string_inquirer.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/testing/assertions.rb +65 -0
- data/vendor/rails/activesupport/lib/active_support/testing/declarative.rb +21 -0
- data/vendor/rails/activesupport/lib/active_support/testing/default.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb +57 -0
- data/vendor/rails/activesupport/lib/active_support/testing/performance.rb +452 -0
- data/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb +91 -0
- data/vendor/rails/activesupport/lib/active_support/time_with_zone.rb +335 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +404 -0
- data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/README.textile +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/Rakefile +5 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb +199 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +214 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/exceptions.rb +53 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/all.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +99 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +124 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +3 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +567 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb +1107 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +9 -0
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +58 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini.rb +31 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini/jdom.rb +162 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb +133 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb +77 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini/rexml.rb +108 -0
- data/vendor/rails/activesupport/lib/activesupport.rb +1 -0
- data/vendor/rails/railties/CHANGELOG +2166 -0
- data/vendor/rails/railties/MIT-LICENSE +20 -0
- data/vendor/rails/railties/README +243 -0
- data/vendor/rails/railties/Rakefile +368 -0
- data/vendor/rails/railties/bin/about +4 -0
- data/vendor/rails/railties/bin/console +3 -0
- data/vendor/rails/railties/bin/dbconsole +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/rails +20 -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 +131 -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/databases/frontbase.yml +28 -0
- data/vendor/rails/railties/configs/databases/ibm_db.yml +62 -0
- data/vendor/rails/railties/configs/databases/mysql.yml +60 -0
- data/vendor/rails/railties/configs/databases/oracle.yml +39 -0
- data/vendor/rails/railties/configs/databases/postgresql.yml +51 -0
- data/vendor/rails/railties/configs/databases/sqlite2.yml +19 -0
- data/vendor/rails/railties/configs/databases/sqlite3.yml +22 -0
- data/vendor/rails/railties/configs/empty.log +0 -0
- data/vendor/rails/railties/configs/initializers/backtrace_silencers.rb +7 -0
- data/vendor/rails/railties/configs/initializers/inflections.rb +10 -0
- data/vendor/rails/railties/configs/initializers/mime_types.rb +5 -0
- data/vendor/rails/railties/configs/initializers/new_rails_defaults.rb +21 -0
- data/vendor/rails/railties/configs/initializers/session_store.rb +15 -0
- data/vendor/rails/railties/configs/locales/en.yml +5 -0
- data/vendor/rails/railties/configs/routes.rb +43 -0
- data/vendor/rails/railties/configs/seeds.rb +7 -0
- data/vendor/rails/railties/dispatches/config.ru +7 -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 +110 -0
- data/vendor/rails/railties/environments/development.rb +17 -0
- data/vendor/rails/railties/environments/environment.rb +41 -0
- data/vendor/rails/railties/environments/production.rb +28 -0
- data/vendor/rails/railties/environments/test.rb +28 -0
- data/vendor/rails/railties/fresh_rakefile +10 -0
- data/vendor/rails/railties/guides/files/javascripts/code_highlighter.js +188 -0
- data/vendor/rails/railties/guides/files/javascripts/guides.js +8 -0
- data/vendor/rails/railties/guides/files/javascripts/highlighters.js +90 -0
- data/vendor/rails/railties/guides/files/stylesheets/main.css +441 -0
- data/vendor/rails/railties/guides/files/stylesheets/print.css +52 -0
- data/vendor/rails/railties/guides/files/stylesheets/reset.css +43 -0
- data/vendor/rails/railties/guides/files/stylesheets/style.css +13 -0
- data/vendor/rails/railties/guides/files/stylesheets/syntax.css +31 -0
- data/vendor/rails/railties/guides/images/belongs_to.png +0 -0
- data/vendor/rails/railties/guides/images/book_icon.gif +0 -0
- data/vendor/rails/railties/guides/images/bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/chapters_icon.gif +0 -0
- data/vendor/rails/railties/guides/images/check_bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/credits_pic_blank.gif +0 -0
- data/vendor/rails/railties/guides/images/csrf.png +0 -0
- data/vendor/rails/railties/guides/images/customized_error_messages.png +0 -0
- data/vendor/rails/railties/guides/images/error_messages.png +0 -0
- data/vendor/rails/railties/guides/images/feature_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/footer_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/fxn.jpg +0 -0
- data/vendor/rails/railties/guides/images/grey_bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/habtm.png +0 -0
- data/vendor/rails/railties/guides/images/has_many.png +0 -0
- data/vendor/rails/railties/guides/images/has_many_through.png +0 -0
- data/vendor/rails/railties/guides/images/has_one.png +0 -0
- data/vendor/rails/railties/guides/images/has_one_through.png +0 -0
- data/vendor/rails/railties/guides/images/header_backdrop.png +0 -0
- data/vendor/rails/railties/guides/images/header_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_localized_pirate.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translated_en.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translated_pirate.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translation_missing.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_untranslated.png +0 -0
- data/vendor/rails/railties/guides/images/icons/README +5 -0
- data/vendor/rails/railties/guides/images/icons/callouts/1.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/10.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/11.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/12.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/13.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/14.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/15.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/2.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/3.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/4.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/5.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/6.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/7.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/8.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/9.png +0 -0
- data/vendor/rails/railties/guides/images/icons/caution.png +0 -0
- data/vendor/rails/railties/guides/images/icons/example.png +0 -0
- data/vendor/rails/railties/guides/images/icons/home.png +0 -0
- data/vendor/rails/railties/guides/images/icons/important.png +0 -0
- data/vendor/rails/railties/guides/images/icons/next.png +0 -0
- data/vendor/rails/railties/guides/images/icons/note.png +0 -0
- data/vendor/rails/railties/guides/images/icons/prev.png +0 -0
- data/vendor/rails/railties/guides/images/icons/tip.png +0 -0
- data/vendor/rails/railties/guides/images/icons/up.png +0 -0
- data/vendor/rails/railties/guides/images/icons/warning.png +0 -0
- data/vendor/rails/railties/guides/images/nav_arrow.gif +0 -0
- data/vendor/rails/railties/guides/images/polymorphic.png +0 -0
- data/vendor/rails/railties/guides/images/posts_index.png +0 -0
- data/vendor/rails/railties/guides/images/rails_guides_logo.gif +0 -0
- data/vendor/rails/railties/guides/images/rails_logo_remix.gif +0 -0
- data/vendor/rails/railties/guides/images/rails_welcome.png +0 -0
- data/vendor/rails/railties/guides/images/session_fixation.png +0 -0
- data/vendor/rails/railties/guides/images/tab_grey.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_info.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_note.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_red.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_yellow.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_yellow.png +0 -0
- data/vendor/rails/railties/guides/images/validation_error_messages.png +0 -0
- data/vendor/rails/railties/guides/rails_guides.rb +42 -0
- data/vendor/rails/railties/guides/rails_guides/generator.rb +138 -0
- data/vendor/rails/railties/guides/rails_guides/helpers.rb +34 -0
- data/vendor/rails/railties/guides/rails_guides/indexer.rb +55 -0
- data/vendor/rails/railties/guides/rails_guides/textile_extensions.rb +41 -0
- data/vendor/rails/railties/guides/source/2_2_release_notes.textile +422 -0
- data/vendor/rails/railties/guides/source/2_3_release_notes.textile +610 -0
- data/vendor/rails/railties/guides/source/action_controller_overview.textile +776 -0
- data/vendor/rails/railties/guides/source/action_mailer_basics.textile +424 -0
- data/vendor/rails/railties/guides/source/active_record_basics.textile +135 -0
- data/vendor/rails/railties/guides/source/active_record_querying.textile +969 -0
- data/vendor/rails/railties/guides/source/activerecord_validations_callbacks.textile +1086 -0
- data/vendor/rails/railties/guides/source/association_basics.textile +1781 -0
- data/vendor/rails/railties/guides/source/caching_with_rails.textile +524 -0
- data/vendor/rails/railties/guides/source/command_line.textile +589 -0
- data/vendor/rails/railties/guides/source/configuring.textile +234 -0
- data/vendor/rails/railties/guides/source/contribute.textile +71 -0
- data/vendor/rails/railties/guides/source/contributing_to_rails.textile +239 -0
- data/vendor/rails/railties/guides/source/credits.erb.textile +52 -0
- data/vendor/rails/railties/guides/source/debugging_rails_applications.textile +709 -0
- data/vendor/rails/railties/guides/source/form_helpers.textile +766 -0
- data/vendor/rails/railties/guides/source/getting_started.textile +1297 -0
- data/vendor/rails/railties/guides/source/i18n.textile +912 -0
- data/vendor/rails/railties/guides/source/index.erb.textile +124 -0
- data/vendor/rails/railties/guides/source/layout.html.erb +103 -0
- data/vendor/rails/railties/guides/source/layouts_and_rendering.textile +979 -0
- data/vendor/rails/railties/guides/source/migrations.textile +591 -0
- data/vendor/rails/railties/guides/source/nested_model_forms.textile +222 -0
- data/vendor/rails/railties/guides/source/performance_testing.textile +531 -0
- data/vendor/rails/railties/guides/source/plugins.textile +1512 -0
- data/vendor/rails/railties/guides/source/rails_on_rack.textile +309 -0
- data/vendor/rails/railties/guides/source/routing.textile +903 -0
- data/vendor/rails/railties/guides/source/security.textile +986 -0
- data/vendor/rails/railties/guides/source/testing.textile +951 -0
- data/vendor/rails/railties/helpers/application_controller.rb +10 -0
- data/vendor/rails/railties/helpers/application_helper.rb +3 -0
- data/vendor/rails/railties/helpers/performance_test.rb +9 -0
- data/vendor/rails/railties/helpers/test_helper.rb +38 -0
- data/vendor/rails/railties/html/404.html +30 -0
- data/vendor/rails/railties/html/422.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 +275 -0
- data/vendor/rails/railties/html/javascripts/application.js +2 -0
- data/vendor/rails/railties/html/javascripts/controls.js +963 -0
- data/vendor/rails/railties/html/javascripts/dragdrop.js +973 -0
- data/vendor/rails/railties/html/javascripts/effects.js +1128 -0
- data/vendor/rails/railties/html/javascripts/prototype.js +4320 -0
- data/vendor/rails/railties/html/robots.txt +5 -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 +3 -0
- data/vendor/rails/railties/lib/commands/console.rb +45 -0
- data/vendor/rails/railties/lib/commands/dbconsole.rb +87 -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 +968 -0
- data/vendor/rails/railties/lib/commands/runner.rb +54 -0
- data/vendor/rails/railties/lib/commands/server.rb +114 -0
- data/vendor/rails/railties/lib/commands/update.rb +4 -0
- data/vendor/rails/railties/lib/console_app.rb +30 -0
- data/vendor/rails/railties/lib/console_sandbox.rb +6 -0
- data/vendor/rails/railties/lib/console_with_helpers.rb +5 -0
- data/vendor/rails/railties/lib/dispatcher.rb +24 -0
- data/vendor/rails/railties/lib/fcgi_handler.rb +239 -0
- data/vendor/rails/railties/lib/initializer.rb +1128 -0
- data/vendor/rails/railties/lib/performance_test_help.rb +5 -0
- data/vendor/rails/railties/lib/rails/backtrace_cleaner.rb +54 -0
- data/vendor/rails/railties/lib/rails/gem_builder.rb +21 -0
- data/vendor/rails/railties/lib/rails/gem_dependency.rb +311 -0
- data/vendor/rails/railties/lib/rails/plugin.rb +179 -0
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +198 -0
- data/vendor/rails/railties/lib/rails/plugin/locator.rb +100 -0
- data/vendor/rails/railties/lib/rails/rack.rb +8 -0
- data/vendor/rails/railties/lib/rails/rack/debugger.rb +21 -0
- data/vendor/rails/railties/lib/rails/rack/log_tailer.rb +35 -0
- data/vendor/rails/railties/lib/rails/rack/metal.rb +51 -0
- data/vendor/rails/railties/lib/rails/rack/static.rb +46 -0
- data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +140 -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 +266 -0
- data/vendor/rails/railties/lib/rails_generator/commands.rb +621 -0
- data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +46 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +9 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +263 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/scm.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/svn.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb +401 -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 +43 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +7 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +8 -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/helper_test.rb +4 -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/helper/USAGE +24 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/helper/helper_generator.rb +25 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper.rb +2 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper_test.rb +4 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +8 -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 +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +30 -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 +15 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +20 -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/metal/USAGE +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/metal/metal_generator.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/metal/templates/metal.rb +12 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +29 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +20 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +11 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +27 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +52 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +19 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +5 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +13 -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 +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/USAGE +8 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb +16 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb +9 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +25 -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 +23 -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/test_helper.rb +3 -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 +23 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +76 -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/functional_test.rb +8 -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/helper_test.rb +4 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +29 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +103 -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/functional_test.rb +45 -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/helper_test.rb +4 -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/style.css +54 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +18 -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 +17 -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 +10 -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/lookup.rb +249 -0
- data/vendor/rails/railties/lib/rails_generator/manifest.rb +53 -0
- data/vendor/rails/railties/lib/rails_generator/options.rb +150 -0
- data/vendor/rails/railties/lib/rails_generator/scripts.rb +89 -0
- data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +29 -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/secret_key_generator.rb +24 -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/source_annotation_extractor.rb +102 -0
- data/vendor/rails/railties/lib/tasks/annotations.rake +20 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +436 -0
- data/vendor/rails/railties/lib/tasks/documentation.rake +88 -0
- data/vendor/rails/railties/lib/tasks/framework.rake +143 -0
- data/vendor/rails/railties/lib/tasks/gems.rake +78 -0
- data/vendor/rails/railties/lib/tasks/log.rake +9 -0
- data/vendor/rails/railties/lib/tasks/middleware.rake +7 -0
- data/vendor/rails/railties/lib/tasks/misc.rake +63 -0
- data/vendor/rails/railties/lib/tasks/rails.rb +8 -0
- data/vendor/rails/railties/lib/tasks/routes.rake +18 -0
- data/vendor/rails/railties/lib/tasks/statistics.rake +17 -0
- data/vendor/rails/railties/lib/tasks/testing.rake +139 -0
- data/vendor/rails/railties/lib/test_help.rb +38 -0
- data/vendor/rails/railties/lib/webrick_server.rb +156 -0
- data/vendor/redcloth/Rakefile +196 -0
- data/vendor/redcloth/bin/redcloth +3 -0
- data/vendor/redcloth/doc/CHANGELOG +160 -0
- data/vendor/redcloth/doc/COPYING +25 -0
- data/vendor/redcloth/doc/README +106 -0
- data/vendor/redcloth/doc/REFERENCE +216 -0
- data/vendor/redcloth/doc/make.rb +359 -0
- data/vendor/redcloth/lib/rctodb.rb +1107 -0
- data/vendor/redcloth/lib/redcloth.rb +1130 -0
- data/vendor/redcloth/run-tests.rb +28 -0
- data/vendor/redcloth/setup.rb +1376 -0
- data/vendor/redcloth/tests/code.yml +105 -0
- data/vendor/redcloth/tests/images.yml +171 -0
- data/vendor/redcloth/tests/instiki.yml +39 -0
- data/vendor/redcloth/tests/links.yml +155 -0
- data/vendor/redcloth/tests/lists.yml +77 -0
- data/vendor/redcloth/tests/markdown.yml +218 -0
- data/vendor/redcloth/tests/poignant.yml +64 -0
- data/vendor/redcloth/tests/table.yml +198 -0
- data/vendor/redcloth/tests/textism.yml +406 -0
- metadata +2474 -0
@@ -0,0 +1,2152 @@
|
|
1
|
+
require "cases/helper"
|
2
|
+
require 'models/post'
|
3
|
+
require 'models/author'
|
4
|
+
require 'models/topic'
|
5
|
+
require 'models/reply'
|
6
|
+
require 'models/category'
|
7
|
+
require 'models/company'
|
8
|
+
require 'models/customer'
|
9
|
+
require 'models/developer'
|
10
|
+
require 'models/project'
|
11
|
+
require 'models/default'
|
12
|
+
require 'models/auto_id'
|
13
|
+
require 'models/column_name'
|
14
|
+
require 'models/subscriber'
|
15
|
+
require 'models/keyboard'
|
16
|
+
require 'models/comment'
|
17
|
+
require 'models/minimalistic'
|
18
|
+
require 'models/warehouse_thing'
|
19
|
+
require 'models/parrot'
|
20
|
+
require 'rexml/document'
|
21
|
+
|
22
|
+
class Category < ActiveRecord::Base; end
|
23
|
+
class Categorization < ActiveRecord::Base; end
|
24
|
+
class Smarts < ActiveRecord::Base; end
|
25
|
+
class CreditCard < ActiveRecord::Base
|
26
|
+
class PinNumber < ActiveRecord::Base
|
27
|
+
class CvvCode < ActiveRecord::Base; end
|
28
|
+
class SubCvvCode < CvvCode; end
|
29
|
+
end
|
30
|
+
class SubPinNumber < PinNumber; end
|
31
|
+
class Brand < Category; end
|
32
|
+
end
|
33
|
+
class MasterCreditCard < ActiveRecord::Base; end
|
34
|
+
class Post < ActiveRecord::Base; end
|
35
|
+
class Computer < ActiveRecord::Base; end
|
36
|
+
class NonExistentTable < ActiveRecord::Base; end
|
37
|
+
class TestOracleDefault < ActiveRecord::Base; end
|
38
|
+
|
39
|
+
class LoosePerson < ActiveRecord::Base
|
40
|
+
self.table_name = 'people'
|
41
|
+
self.abstract_class = true
|
42
|
+
attr_protected :credit_rating, :administrator
|
43
|
+
end
|
44
|
+
|
45
|
+
class LooseDescendant < LoosePerson
|
46
|
+
attr_protected :phone_number
|
47
|
+
end
|
48
|
+
|
49
|
+
class LooseDescendantSecond< LoosePerson
|
50
|
+
attr_protected :phone_number
|
51
|
+
attr_protected :name
|
52
|
+
end
|
53
|
+
|
54
|
+
class TightPerson < ActiveRecord::Base
|
55
|
+
self.table_name = 'people'
|
56
|
+
attr_accessible :name, :address
|
57
|
+
end
|
58
|
+
|
59
|
+
class TightDescendant < TightPerson
|
60
|
+
attr_accessible :phone_number
|
61
|
+
end
|
62
|
+
|
63
|
+
class ReadonlyTitlePost < Post
|
64
|
+
attr_readonly :title
|
65
|
+
end
|
66
|
+
|
67
|
+
class Booleantest < ActiveRecord::Base; end
|
68
|
+
|
69
|
+
class Task < ActiveRecord::Base
|
70
|
+
attr_protected :starting
|
71
|
+
end
|
72
|
+
|
73
|
+
class TopicWithProtectedContentAndAccessibleAuthorName < ActiveRecord::Base
|
74
|
+
self.table_name = 'topics'
|
75
|
+
attr_accessible :author_name
|
76
|
+
attr_protected :content
|
77
|
+
end
|
78
|
+
|
79
|
+
class BasicsTest < ActiveRecord::TestCase
|
80
|
+
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts
|
81
|
+
|
82
|
+
def test_table_exists
|
83
|
+
assert !NonExistentTable.table_exists?
|
84
|
+
assert Topic.table_exists?
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_set_attributes
|
88
|
+
topic = Topic.find(1)
|
89
|
+
topic.attributes = { "title" => "Budget", "author_name" => "Jason" }
|
90
|
+
topic.save
|
91
|
+
assert_equal("Budget", topic.title)
|
92
|
+
assert_equal("Jason", topic.author_name)
|
93
|
+
assert_equal(topics(:first).author_email_address, Topic.find(1).author_email_address)
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_integers_as_nil
|
97
|
+
test = AutoId.create('value' => '')
|
98
|
+
assert_nil AutoId.find(test.id).value
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_set_attributes_with_block
|
102
|
+
topic = Topic.new do |t|
|
103
|
+
t.title = "Budget"
|
104
|
+
t.author_name = "Jason"
|
105
|
+
end
|
106
|
+
|
107
|
+
assert_equal("Budget", topic.title)
|
108
|
+
assert_equal("Jason", topic.author_name)
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_respond_to?
|
112
|
+
topic = Topic.find(1)
|
113
|
+
assert topic.respond_to?("title")
|
114
|
+
assert topic.respond_to?("title?")
|
115
|
+
assert topic.respond_to?("title=")
|
116
|
+
assert topic.respond_to?(:title)
|
117
|
+
assert topic.respond_to?(:title?)
|
118
|
+
assert topic.respond_to?(:title=)
|
119
|
+
assert topic.respond_to?("author_name")
|
120
|
+
assert topic.respond_to?("attribute_names")
|
121
|
+
assert !topic.respond_to?("nothingness")
|
122
|
+
assert !topic.respond_to?(:nothingness)
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_array_content
|
126
|
+
topic = Topic.new
|
127
|
+
topic.content = %w( one two three )
|
128
|
+
topic.save
|
129
|
+
|
130
|
+
assert_equal(%w( one two three ), Topic.find(topic.id).content)
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_read_attributes_before_type_cast
|
134
|
+
category = Category.new({:name=>"Test categoty", :type => nil})
|
135
|
+
category_attrs = {"name"=>"Test categoty", "type" => nil, "categorizations_count" => nil}
|
136
|
+
assert_equal category_attrs , category.attributes_before_type_cast
|
137
|
+
end
|
138
|
+
|
139
|
+
if current_adapter?(:MysqlAdapter)
|
140
|
+
def test_read_attributes_before_type_cast_on_boolean
|
141
|
+
bool = Booleantest.create({ "value" => false })
|
142
|
+
assert_equal "0", bool.reload.attributes_before_type_cast["value"]
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def test_read_attributes_before_type_cast_on_datetime
|
147
|
+
developer = Developer.find(:first)
|
148
|
+
assert_equal developer.created_at.to_s(:db) , developer.attributes_before_type_cast["created_at"]
|
149
|
+
end
|
150
|
+
|
151
|
+
def test_hash_content
|
152
|
+
topic = Topic.new
|
153
|
+
topic.content = { "one" => 1, "two" => 2 }
|
154
|
+
topic.save
|
155
|
+
|
156
|
+
assert_equal 2, Topic.find(topic.id).content["two"]
|
157
|
+
|
158
|
+
topic.content_will_change!
|
159
|
+
topic.content["three"] = 3
|
160
|
+
topic.save
|
161
|
+
|
162
|
+
assert_equal 3, Topic.find(topic.id).content["three"]
|
163
|
+
end
|
164
|
+
|
165
|
+
def test_update_array_content
|
166
|
+
topic = Topic.new
|
167
|
+
topic.content = %w( one two three )
|
168
|
+
|
169
|
+
topic.content.push "four"
|
170
|
+
assert_equal(%w( one two three four ), topic.content)
|
171
|
+
|
172
|
+
topic.save
|
173
|
+
|
174
|
+
topic = Topic.find(topic.id)
|
175
|
+
topic.content << "five"
|
176
|
+
assert_equal(%w( one two three four five ), topic.content)
|
177
|
+
end
|
178
|
+
|
179
|
+
def test_case_sensitive_attributes_hash
|
180
|
+
# DB2 is not case-sensitive
|
181
|
+
return true if current_adapter?(:DB2Adapter)
|
182
|
+
|
183
|
+
assert_equal @loaded_fixtures['computers']['workstation'].to_hash, Computer.find(:first).attributes
|
184
|
+
end
|
185
|
+
|
186
|
+
def test_create
|
187
|
+
topic = Topic.new
|
188
|
+
topic.title = "New Topic"
|
189
|
+
topic.save
|
190
|
+
topic_reloaded = Topic.find(topic.id)
|
191
|
+
assert_equal("New Topic", topic_reloaded.title)
|
192
|
+
end
|
193
|
+
|
194
|
+
def test_save!
|
195
|
+
topic = Topic.new(:title => "New Topic")
|
196
|
+
assert topic.save!
|
197
|
+
|
198
|
+
reply = Reply.new
|
199
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.save! }
|
200
|
+
end
|
201
|
+
|
202
|
+
def test_save_null_string_attributes
|
203
|
+
topic = Topic.find(1)
|
204
|
+
topic.attributes = { "title" => "null", "author_name" => "null" }
|
205
|
+
topic.save!
|
206
|
+
topic.reload
|
207
|
+
assert_equal("null", topic.title)
|
208
|
+
assert_equal("null", topic.author_name)
|
209
|
+
end
|
210
|
+
|
211
|
+
def test_save_nil_string_attributes
|
212
|
+
topic = Topic.find(1)
|
213
|
+
topic.title = nil
|
214
|
+
topic.save!
|
215
|
+
topic.reload
|
216
|
+
assert_nil topic.title
|
217
|
+
end
|
218
|
+
|
219
|
+
def test_save_for_record_with_only_primary_key
|
220
|
+
minimalistic = Minimalistic.new
|
221
|
+
assert_nothing_raised { minimalistic.save }
|
222
|
+
end
|
223
|
+
|
224
|
+
def test_save_for_record_with_only_primary_key_that_is_provided
|
225
|
+
assert_nothing_raised { Minimalistic.create!(:id => 2) }
|
226
|
+
end
|
227
|
+
|
228
|
+
def test_hashes_not_mangled
|
229
|
+
new_topic = { :title => "New Topic" }
|
230
|
+
new_topic_values = { :title => "AnotherTopic" }
|
231
|
+
|
232
|
+
topic = Topic.new(new_topic)
|
233
|
+
assert_equal new_topic[:title], topic.title
|
234
|
+
|
235
|
+
topic.attributes= new_topic_values
|
236
|
+
assert_equal new_topic_values[:title], topic.title
|
237
|
+
end
|
238
|
+
|
239
|
+
def test_create_many
|
240
|
+
topics = Topic.create([ { "title" => "first" }, { "title" => "second" }])
|
241
|
+
assert_equal 2, topics.size
|
242
|
+
assert_equal "first", topics.first.title
|
243
|
+
end
|
244
|
+
|
245
|
+
def test_create_columns_not_equal_attributes
|
246
|
+
topic = Topic.new
|
247
|
+
topic.title = 'Another New Topic'
|
248
|
+
topic.send :write_attribute, 'does_not_exist', 'test'
|
249
|
+
assert_nothing_raised { topic.save }
|
250
|
+
end
|
251
|
+
|
252
|
+
def test_create_through_factory
|
253
|
+
topic = Topic.create("title" => "New Topic")
|
254
|
+
topicReloaded = Topic.find(topic.id)
|
255
|
+
assert_equal(topic, topicReloaded)
|
256
|
+
end
|
257
|
+
|
258
|
+
def test_create_through_factory_with_block
|
259
|
+
topic = Topic.create("title" => "New Topic") do |t|
|
260
|
+
t.author_name = "David"
|
261
|
+
end
|
262
|
+
topicReloaded = Topic.find(topic.id)
|
263
|
+
assert_equal("New Topic", topic.title)
|
264
|
+
assert_equal("David", topic.author_name)
|
265
|
+
end
|
266
|
+
|
267
|
+
def test_create_many_through_factory_with_block
|
268
|
+
topics = Topic.create([ { "title" => "first" }, { "title" => "second" }]) do |t|
|
269
|
+
t.author_name = "David"
|
270
|
+
end
|
271
|
+
assert_equal 2, topics.size
|
272
|
+
topic1, topic2 = Topic.find(topics[0].id), Topic.find(topics[1].id)
|
273
|
+
assert_equal "first", topic1.title
|
274
|
+
assert_equal "David", topic1.author_name
|
275
|
+
assert_equal "second", topic2.title
|
276
|
+
assert_equal "David", topic2.author_name
|
277
|
+
end
|
278
|
+
|
279
|
+
def test_update
|
280
|
+
topic = Topic.new
|
281
|
+
topic.title = "Another New Topic"
|
282
|
+
topic.written_on = "2003-12-12 23:23:00"
|
283
|
+
topic.save
|
284
|
+
topicReloaded = Topic.find(topic.id)
|
285
|
+
assert_equal("Another New Topic", topicReloaded.title)
|
286
|
+
|
287
|
+
topicReloaded.title = "Updated topic"
|
288
|
+
topicReloaded.save
|
289
|
+
|
290
|
+
topicReloadedAgain = Topic.find(topic.id)
|
291
|
+
|
292
|
+
assert_equal("Updated topic", topicReloadedAgain.title)
|
293
|
+
end
|
294
|
+
|
295
|
+
def test_update_columns_not_equal_attributes
|
296
|
+
topic = Topic.new
|
297
|
+
topic.title = "Still another topic"
|
298
|
+
topic.save
|
299
|
+
|
300
|
+
topicReloaded = Topic.find(topic.id)
|
301
|
+
topicReloaded.title = "A New Topic"
|
302
|
+
topicReloaded.send :write_attribute, 'does_not_exist', 'test'
|
303
|
+
assert_nothing_raised { topicReloaded.save }
|
304
|
+
end
|
305
|
+
|
306
|
+
def test_update_for_record_with_only_primary_key
|
307
|
+
minimalistic = minimalistics(:first)
|
308
|
+
assert_nothing_raised { minimalistic.save }
|
309
|
+
end
|
310
|
+
|
311
|
+
def test_write_attribute
|
312
|
+
topic = Topic.new
|
313
|
+
topic.send(:write_attribute, :title, "Still another topic")
|
314
|
+
assert_equal "Still another topic", topic.title
|
315
|
+
|
316
|
+
topic.send(:write_attribute, "title", "Still another topic: part 2")
|
317
|
+
assert_equal "Still another topic: part 2", topic.title
|
318
|
+
end
|
319
|
+
|
320
|
+
def test_read_attribute
|
321
|
+
topic = Topic.new
|
322
|
+
topic.title = "Don't change the topic"
|
323
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, "title")
|
324
|
+
assert_equal "Don't change the topic", topic["title"]
|
325
|
+
|
326
|
+
assert_equal "Don't change the topic", topic.send(:read_attribute, :title)
|
327
|
+
assert_equal "Don't change the topic", topic[:title]
|
328
|
+
end
|
329
|
+
|
330
|
+
def test_read_attribute_when_false
|
331
|
+
topic = topics(:first)
|
332
|
+
topic.approved = false
|
333
|
+
assert !topic.approved?, "approved should be false"
|
334
|
+
topic.approved = "false"
|
335
|
+
assert !topic.approved?, "approved should be false"
|
336
|
+
end
|
337
|
+
|
338
|
+
def test_read_attribute_when_true
|
339
|
+
topic = topics(:first)
|
340
|
+
topic.approved = true
|
341
|
+
assert topic.approved?, "approved should be true"
|
342
|
+
topic.approved = "true"
|
343
|
+
assert topic.approved?, "approved should be true"
|
344
|
+
end
|
345
|
+
|
346
|
+
def test_read_write_boolean_attribute
|
347
|
+
topic = Topic.new
|
348
|
+
# puts ""
|
349
|
+
# puts "New Topic"
|
350
|
+
# puts topic.inspect
|
351
|
+
topic.approved = "false"
|
352
|
+
# puts "Expecting false"
|
353
|
+
# puts topic.inspect
|
354
|
+
assert !topic.approved?, "approved should be false"
|
355
|
+
topic.approved = "false"
|
356
|
+
# puts "Expecting false"
|
357
|
+
# puts topic.inspect
|
358
|
+
assert !topic.approved?, "approved should be false"
|
359
|
+
topic.approved = "true"
|
360
|
+
# puts "Expecting true"
|
361
|
+
# puts topic.inspect
|
362
|
+
assert topic.approved?, "approved should be true"
|
363
|
+
topic.approved = "true"
|
364
|
+
# puts "Expecting true"
|
365
|
+
# puts topic.inspect
|
366
|
+
assert topic.approved?, "approved should be true"
|
367
|
+
# puts ""
|
368
|
+
end
|
369
|
+
|
370
|
+
def test_query_attribute_string
|
371
|
+
[nil, "", " "].each do |value|
|
372
|
+
assert_equal false, Topic.new(:author_name => value).author_name?
|
373
|
+
end
|
374
|
+
|
375
|
+
assert_equal true, Topic.new(:author_name => "Name").author_name?
|
376
|
+
end
|
377
|
+
|
378
|
+
def test_query_attribute_number
|
379
|
+
[nil, 0, "0"].each do |value|
|
380
|
+
assert_equal false, Developer.new(:salary => value).salary?
|
381
|
+
end
|
382
|
+
|
383
|
+
assert_equal true, Developer.new(:salary => 1).salary?
|
384
|
+
assert_equal true, Developer.new(:salary => "1").salary?
|
385
|
+
end
|
386
|
+
|
387
|
+
def test_query_attribute_boolean
|
388
|
+
[nil, "", false, "false", "f", 0].each do |value|
|
389
|
+
assert_equal false, Topic.new(:approved => value).approved?
|
390
|
+
end
|
391
|
+
|
392
|
+
[true, "true", "1", 1].each do |value|
|
393
|
+
assert_equal true, Topic.new(:approved => value).approved?
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
def test_query_attribute_with_custom_fields
|
398
|
+
object = Company.find_by_sql(<<-SQL).first
|
399
|
+
SELECT c1.*, c2.ruby_type as string_value, c2.rating as int_value
|
400
|
+
FROM companies c1, companies c2
|
401
|
+
WHERE c1.firm_id = c2.id
|
402
|
+
AND c1.id = 2
|
403
|
+
SQL
|
404
|
+
|
405
|
+
assert_equal "Firm", object.string_value
|
406
|
+
assert object.string_value?
|
407
|
+
|
408
|
+
object.string_value = " "
|
409
|
+
assert !object.string_value?
|
410
|
+
|
411
|
+
assert_equal 1, object.int_value.to_i
|
412
|
+
assert object.int_value?
|
413
|
+
|
414
|
+
object.int_value = "0"
|
415
|
+
assert !object.int_value?
|
416
|
+
end
|
417
|
+
|
418
|
+
|
419
|
+
def test_reader_for_invalid_column_names
|
420
|
+
Topic.send(:define_read_method, "mumub-jumbo".to_sym, "mumub-jumbo", nil)
|
421
|
+
assert !Topic.generated_methods.include?("mumub-jumbo")
|
422
|
+
end
|
423
|
+
|
424
|
+
def test_non_attribute_access_and_assignment
|
425
|
+
topic = Topic.new
|
426
|
+
assert !topic.respond_to?("mumbo")
|
427
|
+
assert_raise(NoMethodError) { topic.mumbo }
|
428
|
+
assert_raise(NoMethodError) { topic.mumbo = 5 }
|
429
|
+
end
|
430
|
+
|
431
|
+
def test_preserving_date_objects
|
432
|
+
if current_adapter?(:SybaseAdapter, :OracleAdapter)
|
433
|
+
# Sybase ctlib does not (yet?) support the date type; use datetime instead.
|
434
|
+
# Oracle treats all dates/times as Time.
|
435
|
+
assert_kind_of(
|
436
|
+
Time, Topic.find(1).last_read,
|
437
|
+
"The last_read attribute should be of the Time class"
|
438
|
+
)
|
439
|
+
else
|
440
|
+
assert_kind_of(
|
441
|
+
Date, Topic.find(1).last_read,
|
442
|
+
"The last_read attribute should be of the Date class"
|
443
|
+
)
|
444
|
+
end
|
445
|
+
end
|
446
|
+
|
447
|
+
def test_preserving_time_objects
|
448
|
+
assert_kind_of(
|
449
|
+
Time, Topic.find(1).bonus_time,
|
450
|
+
"The bonus_time attribute should be of the Time class"
|
451
|
+
)
|
452
|
+
|
453
|
+
assert_kind_of(
|
454
|
+
Time, Topic.find(1).written_on,
|
455
|
+
"The written_on attribute should be of the Time class"
|
456
|
+
)
|
457
|
+
|
458
|
+
# For adapters which support microsecond resolution.
|
459
|
+
if current_adapter?(:PostgreSQLAdapter)
|
460
|
+
assert_equal 11, Topic.find(1).written_on.sec
|
461
|
+
assert_equal 223300, Topic.find(1).written_on.usec
|
462
|
+
assert_equal 9900, Topic.find(2).written_on.usec
|
463
|
+
end
|
464
|
+
end
|
465
|
+
|
466
|
+
def test_custom_mutator
|
467
|
+
topic = Topic.find(1)
|
468
|
+
# This mutator is protected in the class definition
|
469
|
+
topic.send(:approved=, true)
|
470
|
+
assert topic.instance_variable_get("@custom_approved")
|
471
|
+
end
|
472
|
+
|
473
|
+
def test_delete
|
474
|
+
topic = Topic.find(1)
|
475
|
+
assert_equal topic, topic.delete, 'topic.delete did not return self'
|
476
|
+
assert topic.frozen?, 'topic not frozen after delete'
|
477
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(topic.id) }
|
478
|
+
end
|
479
|
+
|
480
|
+
def test_delete_doesnt_run_callbacks
|
481
|
+
Topic.find(1).delete
|
482
|
+
assert_not_nil Topic.find(2)
|
483
|
+
end
|
484
|
+
|
485
|
+
def test_destroy
|
486
|
+
topic = Topic.find(1)
|
487
|
+
assert_equal topic, topic.destroy, 'topic.destroy did not return self'
|
488
|
+
assert topic.frozen?, 'topic not frozen after destroy'
|
489
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(topic.id) }
|
490
|
+
end
|
491
|
+
|
492
|
+
def test_record_not_found_exception
|
493
|
+
assert_raise(ActiveRecord::RecordNotFound) { topicReloaded = Topic.find(99999) }
|
494
|
+
end
|
495
|
+
|
496
|
+
def test_initialize_with_attributes
|
497
|
+
topic = Topic.new({
|
498
|
+
"title" => "initialized from attributes", "written_on" => "2003-12-12 23:23"
|
499
|
+
})
|
500
|
+
|
501
|
+
assert_equal("initialized from attributes", topic.title)
|
502
|
+
end
|
503
|
+
|
504
|
+
def test_initialize_with_invalid_attribute
|
505
|
+
begin
|
506
|
+
topic = Topic.new({ "title" => "test",
|
507
|
+
"last_read(1i)" => "2005", "last_read(2i)" => "2", "last_read(3i)" => "31"})
|
508
|
+
rescue ActiveRecord::MultiparameterAssignmentErrors => ex
|
509
|
+
assert_equal(1, ex.errors.size)
|
510
|
+
assert_equal("last_read", ex.errors[0].attribute)
|
511
|
+
end
|
512
|
+
end
|
513
|
+
|
514
|
+
def test_load
|
515
|
+
topics = Topic.find(:all, :order => 'id')
|
516
|
+
assert_equal(4, topics.size)
|
517
|
+
assert_equal(topics(:first).title, topics.first.title)
|
518
|
+
end
|
519
|
+
|
520
|
+
def test_load_with_condition
|
521
|
+
topics = Topic.find(:all, :conditions => "author_name = 'Mary'")
|
522
|
+
|
523
|
+
assert_equal(1, topics.size)
|
524
|
+
assert_equal(topics(:second).title, topics.first.title)
|
525
|
+
end
|
526
|
+
|
527
|
+
def test_table_name_guesses
|
528
|
+
classes = [Category, Smarts, CreditCard, CreditCard::PinNumber, CreditCard::PinNumber::CvvCode, CreditCard::SubPinNumber, CreditCard::Brand, MasterCreditCard]
|
529
|
+
|
530
|
+
assert_equal "topics", Topic.table_name
|
531
|
+
|
532
|
+
assert_equal "categories", Category.table_name
|
533
|
+
assert_equal "smarts", Smarts.table_name
|
534
|
+
assert_equal "credit_cards", CreditCard.table_name
|
535
|
+
assert_equal "credit_card_pin_numbers", CreditCard::PinNumber.table_name
|
536
|
+
assert_equal "credit_card_pin_number_cvv_codes", CreditCard::PinNumber::CvvCode.table_name
|
537
|
+
assert_equal "credit_card_pin_numbers", CreditCard::SubPinNumber.table_name
|
538
|
+
assert_equal "categories", CreditCard::Brand.table_name
|
539
|
+
assert_equal "master_credit_cards", MasterCreditCard.table_name
|
540
|
+
|
541
|
+
ActiveRecord::Base.pluralize_table_names = false
|
542
|
+
classes.each(&:reset_table_name)
|
543
|
+
|
544
|
+
assert_equal "category", Category.table_name
|
545
|
+
assert_equal "smarts", Smarts.table_name
|
546
|
+
assert_equal "credit_card", CreditCard.table_name
|
547
|
+
assert_equal "credit_card_pin_number", CreditCard::PinNumber.table_name
|
548
|
+
assert_equal "credit_card_pin_number_cvv_code", CreditCard::PinNumber::CvvCode.table_name
|
549
|
+
assert_equal "credit_card_pin_number", CreditCard::SubPinNumber.table_name
|
550
|
+
assert_equal "category", CreditCard::Brand.table_name
|
551
|
+
assert_equal "master_credit_card", MasterCreditCard.table_name
|
552
|
+
|
553
|
+
ActiveRecord::Base.pluralize_table_names = true
|
554
|
+
classes.each(&:reset_table_name)
|
555
|
+
|
556
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
557
|
+
Category.reset_table_name
|
558
|
+
assert_equal "test_categories", Category.table_name
|
559
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
560
|
+
Category.reset_table_name
|
561
|
+
assert_equal "test_categories_test", Category.table_name
|
562
|
+
ActiveRecord::Base.table_name_prefix = ""
|
563
|
+
Category.reset_table_name
|
564
|
+
assert_equal "categories_test", Category.table_name
|
565
|
+
ActiveRecord::Base.table_name_suffix = ""
|
566
|
+
Category.reset_table_name
|
567
|
+
assert_equal "categories", Category.table_name
|
568
|
+
|
569
|
+
ActiveRecord::Base.pluralize_table_names = false
|
570
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
571
|
+
Category.reset_table_name
|
572
|
+
assert_equal "test_category", Category.table_name
|
573
|
+
ActiveRecord::Base.table_name_suffix = "_test"
|
574
|
+
Category.reset_table_name
|
575
|
+
assert_equal "test_category_test", Category.table_name
|
576
|
+
ActiveRecord::Base.table_name_prefix = ""
|
577
|
+
Category.reset_table_name
|
578
|
+
assert_equal "category_test", Category.table_name
|
579
|
+
ActiveRecord::Base.table_name_suffix = ""
|
580
|
+
Category.reset_table_name
|
581
|
+
assert_equal "category", Category.table_name
|
582
|
+
|
583
|
+
ActiveRecord::Base.pluralize_table_names = true
|
584
|
+
classes.each(&:reset_table_name)
|
585
|
+
end
|
586
|
+
|
587
|
+
def test_destroy_all
|
588
|
+
original_count = Topic.count
|
589
|
+
topics_by_mary = Topic.count(:conditions => mary = "author_name = 'Mary'")
|
590
|
+
|
591
|
+
Topic.destroy_all mary
|
592
|
+
assert_equal original_count - topics_by_mary, Topic.count
|
593
|
+
end
|
594
|
+
|
595
|
+
def test_destroy_many
|
596
|
+
assert_equal 3, Client.count
|
597
|
+
Client.destroy([2, 3])
|
598
|
+
assert_equal 1, Client.count
|
599
|
+
end
|
600
|
+
|
601
|
+
def test_delete_many
|
602
|
+
original_count = Topic.count
|
603
|
+
Topic.delete(deleting = [1, 2])
|
604
|
+
assert_equal original_count - deleting.size, Topic.count
|
605
|
+
end
|
606
|
+
|
607
|
+
def test_boolean_attributes
|
608
|
+
assert ! Topic.find(1).approved?
|
609
|
+
assert Topic.find(2).approved?
|
610
|
+
end
|
611
|
+
|
612
|
+
def test_increment_counter
|
613
|
+
Topic.increment_counter("replies_count", 1)
|
614
|
+
assert_equal 2, Topic.find(1).replies_count
|
615
|
+
|
616
|
+
Topic.increment_counter("replies_count", 1)
|
617
|
+
assert_equal 3, Topic.find(1).replies_count
|
618
|
+
end
|
619
|
+
|
620
|
+
def test_decrement_counter
|
621
|
+
Topic.decrement_counter("replies_count", 2)
|
622
|
+
assert_equal -1, Topic.find(2).replies_count
|
623
|
+
|
624
|
+
Topic.decrement_counter("replies_count", 2)
|
625
|
+
assert_equal -2, Topic.find(2).replies_count
|
626
|
+
end
|
627
|
+
|
628
|
+
def test_update_counter
|
629
|
+
category = categories(:general)
|
630
|
+
assert_nil category.categorizations_count
|
631
|
+
assert_equal 2, category.categorizations.count
|
632
|
+
|
633
|
+
Category.update_counters(category.id, "categorizations_count" => category.categorizations.count)
|
634
|
+
category.reload
|
635
|
+
assert_not_nil category.categorizations_count
|
636
|
+
assert_equal 2, category.categorizations_count
|
637
|
+
|
638
|
+
Category.update_counters(category.id, "categorizations_count" => category.categorizations.count)
|
639
|
+
category.reload
|
640
|
+
assert_not_nil category.categorizations_count
|
641
|
+
assert_equal 4, category.categorizations_count
|
642
|
+
|
643
|
+
category_2 = categories(:technology)
|
644
|
+
count_1, count_2 = (category.categorizations_count || 0), (category_2.categorizations_count || 0)
|
645
|
+
Category.update_counters([category.id, category_2.id], "categorizations_count" => 2)
|
646
|
+
category.reload; category_2.reload
|
647
|
+
assert_equal count_1 + 2, category.categorizations_count
|
648
|
+
assert_equal count_2 + 2, category_2.categorizations_count
|
649
|
+
end
|
650
|
+
|
651
|
+
def test_update_all
|
652
|
+
assert_equal Topic.count, Topic.update_all("content = 'bulk updated!'")
|
653
|
+
assert_equal "bulk updated!", Topic.find(1).content
|
654
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
655
|
+
|
656
|
+
assert_equal Topic.count, Topic.update_all(['content = ?', 'bulk updated again!'])
|
657
|
+
assert_equal "bulk updated again!", Topic.find(1).content
|
658
|
+
assert_equal "bulk updated again!", Topic.find(2).content
|
659
|
+
|
660
|
+
assert_equal Topic.count, Topic.update_all(['content = ?', nil])
|
661
|
+
assert_nil Topic.find(1).content
|
662
|
+
end
|
663
|
+
|
664
|
+
def test_update_all_with_hash
|
665
|
+
assert_not_nil Topic.find(1).last_read
|
666
|
+
assert_equal Topic.count, Topic.update_all(:content => 'bulk updated with hash!', :last_read => nil)
|
667
|
+
assert_equal "bulk updated with hash!", Topic.find(1).content
|
668
|
+
assert_equal "bulk updated with hash!", Topic.find(2).content
|
669
|
+
assert_nil Topic.find(1).last_read
|
670
|
+
assert_nil Topic.find(2).last_read
|
671
|
+
end
|
672
|
+
|
673
|
+
def test_update_all_with_non_standard_table_name
|
674
|
+
assert_equal 1, WarehouseThing.update_all(['value = ?', 0], ['id = ?', 1])
|
675
|
+
assert_equal 0, WarehouseThing.find(1).value
|
676
|
+
end
|
677
|
+
|
678
|
+
if current_adapter?(:MysqlAdapter)
|
679
|
+
def test_update_all_with_order_and_limit
|
680
|
+
assert_equal 1, Topic.update_all("content = 'bulk updated!'", nil, :limit => 1, :order => 'id DESC')
|
681
|
+
end
|
682
|
+
end
|
683
|
+
|
684
|
+
def test_update_all_ignores_order_without_limit_from_association
|
685
|
+
author = authors(:david)
|
686
|
+
assert_nothing_raised do
|
687
|
+
assert_equal author.posts_with_comments_and_categories.length, author.posts_with_comments_and_categories.update_all([ "body = ?", "bulk update!" ])
|
688
|
+
end
|
689
|
+
end
|
690
|
+
|
691
|
+
def test_update_all_with_order_and_limit_updates_subset_only
|
692
|
+
author = authors(:david)
|
693
|
+
assert_nothing_raised do
|
694
|
+
assert_equal 1, author.posts_sorted_by_id_limited.size
|
695
|
+
assert_equal 2, author.posts_sorted_by_id_limited.find(:all, :limit => 2).size
|
696
|
+
assert_equal 1, author.posts_sorted_by_id_limited.update_all([ "body = ?", "bulk update!" ])
|
697
|
+
assert_equal "bulk update!", posts(:welcome).body
|
698
|
+
assert_not_equal "bulk update!", posts(:thinking).body
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
def test_update_many
|
703
|
+
topic_data = { 1 => { "content" => "1 updated" }, 2 => { "content" => "2 updated" } }
|
704
|
+
updated = Topic.update(topic_data.keys, topic_data.values)
|
705
|
+
|
706
|
+
assert_equal 2, updated.size
|
707
|
+
assert_equal "1 updated", Topic.find(1).content
|
708
|
+
assert_equal "2 updated", Topic.find(2).content
|
709
|
+
end
|
710
|
+
|
711
|
+
def test_delete_all
|
712
|
+
assert Topic.count > 0
|
713
|
+
|
714
|
+
assert_equal Topic.count, Topic.delete_all
|
715
|
+
end
|
716
|
+
|
717
|
+
def test_update_by_condition
|
718
|
+
Topic.update_all "content = 'bulk updated!'", ["approved = ?", true]
|
719
|
+
assert_equal "Have a nice day", Topic.find(1).content
|
720
|
+
assert_equal "bulk updated!", Topic.find(2).content
|
721
|
+
end
|
722
|
+
|
723
|
+
def test_attribute_present
|
724
|
+
t = Topic.new
|
725
|
+
t.title = "hello there!"
|
726
|
+
t.written_on = Time.now
|
727
|
+
assert t.attribute_present?("title")
|
728
|
+
assert t.attribute_present?("written_on")
|
729
|
+
assert !t.attribute_present?("content")
|
730
|
+
end
|
731
|
+
|
732
|
+
def test_attribute_keys_on_new_instance
|
733
|
+
t = Topic.new
|
734
|
+
assert_equal nil, t.title, "The topics table has a title column, so it should be nil"
|
735
|
+
assert_raise(NoMethodError) { t.title2 }
|
736
|
+
end
|
737
|
+
|
738
|
+
def test_class_name
|
739
|
+
assert_equal "Firm", ActiveRecord::Base.class_name("firms")
|
740
|
+
assert_equal "Category", ActiveRecord::Base.class_name("categories")
|
741
|
+
assert_equal "AccountHolder", ActiveRecord::Base.class_name("account_holder")
|
742
|
+
|
743
|
+
ActiveRecord::Base.pluralize_table_names = false
|
744
|
+
assert_equal "Firms", ActiveRecord::Base.class_name( "firms" )
|
745
|
+
ActiveRecord::Base.pluralize_table_names = true
|
746
|
+
|
747
|
+
ActiveRecord::Base.table_name_prefix = "test_"
|
748
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms" )
|
749
|
+
ActiveRecord::Base.table_name_suffix = "_tests"
|
750
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "test_firms_tests" )
|
751
|
+
ActiveRecord::Base.table_name_prefix = ""
|
752
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms_tests" )
|
753
|
+
ActiveRecord::Base.table_name_suffix = ""
|
754
|
+
assert_equal "Firm", ActiveRecord::Base.class_name( "firms" )
|
755
|
+
end
|
756
|
+
|
757
|
+
def test_null_fields
|
758
|
+
assert_nil Topic.find(1).parent_id
|
759
|
+
assert_nil Topic.create("title" => "Hey you").parent_id
|
760
|
+
end
|
761
|
+
|
762
|
+
def test_default_values
|
763
|
+
topic = Topic.new
|
764
|
+
assert topic.approved?
|
765
|
+
assert_nil topic.written_on
|
766
|
+
assert_nil topic.bonus_time
|
767
|
+
assert_nil topic.last_read
|
768
|
+
|
769
|
+
topic.save
|
770
|
+
|
771
|
+
topic = Topic.find(topic.id)
|
772
|
+
assert topic.approved?
|
773
|
+
assert_nil topic.last_read
|
774
|
+
|
775
|
+
# Oracle has some funky default handling, so it requires a bit of
|
776
|
+
# extra testing. See ticket #2788.
|
777
|
+
if current_adapter?(:OracleAdapter)
|
778
|
+
test = TestOracleDefault.new
|
779
|
+
assert_equal "X", test.test_char
|
780
|
+
assert_equal "hello", test.test_string
|
781
|
+
assert_equal 3, test.test_int
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
# Oracle, and Sybase do not have a TIME datatype.
|
786
|
+
unless current_adapter?(:OracleAdapter, :SybaseAdapter)
|
787
|
+
def test_utc_as_time_zone
|
788
|
+
Topic.default_timezone = :utc
|
789
|
+
attributes = { "bonus_time" => "5:42:00AM" }
|
790
|
+
topic = Topic.find(1)
|
791
|
+
topic.attributes = attributes
|
792
|
+
assert_equal Time.utc(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
793
|
+
Topic.default_timezone = :local
|
794
|
+
end
|
795
|
+
|
796
|
+
def test_utc_as_time_zone_and_new
|
797
|
+
Topic.default_timezone = :utc
|
798
|
+
attributes = { "bonus_time(1i)"=>"2000",
|
799
|
+
"bonus_time(2i)"=>"1",
|
800
|
+
"bonus_time(3i)"=>"1",
|
801
|
+
"bonus_time(4i)"=>"10",
|
802
|
+
"bonus_time(5i)"=>"35",
|
803
|
+
"bonus_time(6i)"=>"50" }
|
804
|
+
topic = Topic.new(attributes)
|
805
|
+
assert_equal Time.utc(2000, 1, 1, 10, 35, 50), topic.bonus_time
|
806
|
+
Topic.default_timezone = :local
|
807
|
+
end
|
808
|
+
end
|
809
|
+
|
810
|
+
def test_default_values_on_empty_strings
|
811
|
+
topic = Topic.new
|
812
|
+
topic.approved = nil
|
813
|
+
topic.last_read = nil
|
814
|
+
|
815
|
+
topic.save
|
816
|
+
|
817
|
+
topic = Topic.find(topic.id)
|
818
|
+
assert_nil topic.last_read
|
819
|
+
|
820
|
+
# Sybase adapter does not allow nulls in boolean columns
|
821
|
+
if current_adapter?(:SybaseAdapter)
|
822
|
+
assert topic.approved == false
|
823
|
+
else
|
824
|
+
assert_nil topic.approved
|
825
|
+
end
|
826
|
+
end
|
827
|
+
|
828
|
+
def test_equality
|
829
|
+
assert_equal Topic.find(1), Topic.find(2).topic
|
830
|
+
end
|
831
|
+
|
832
|
+
def test_equality_of_new_records
|
833
|
+
assert_not_equal Topic.new, Topic.new
|
834
|
+
end
|
835
|
+
|
836
|
+
def test_hashing
|
837
|
+
assert_equal [ Topic.find(1) ], [ Topic.find(2).topic ] & [ Topic.find(1) ]
|
838
|
+
end
|
839
|
+
|
840
|
+
def test_delete_new_record
|
841
|
+
client = Client.new
|
842
|
+
client.delete
|
843
|
+
assert client.frozen?
|
844
|
+
end
|
845
|
+
|
846
|
+
def test_delete_record_with_associations
|
847
|
+
client = Client.find(3)
|
848
|
+
client.delete
|
849
|
+
assert client.frozen?
|
850
|
+
assert_kind_of Firm, client.firm
|
851
|
+
assert_raise(ActiveSupport::FrozenObjectError) { client.name = "something else" }
|
852
|
+
end
|
853
|
+
|
854
|
+
def test_destroy_new_record
|
855
|
+
client = Client.new
|
856
|
+
client.destroy
|
857
|
+
assert client.frozen?
|
858
|
+
end
|
859
|
+
|
860
|
+
def test_destroy_record_with_associations
|
861
|
+
client = Client.find(3)
|
862
|
+
client.destroy
|
863
|
+
assert client.frozen?
|
864
|
+
assert_kind_of Firm, client.firm
|
865
|
+
assert_raise(ActiveSupport::FrozenObjectError) { client.name = "something else" }
|
866
|
+
end
|
867
|
+
|
868
|
+
def test_update_attribute
|
869
|
+
assert !Topic.find(1).approved?
|
870
|
+
Topic.find(1).update_attribute("approved", true)
|
871
|
+
assert Topic.find(1).approved?
|
872
|
+
|
873
|
+
Topic.find(1).update_attribute(:approved, false)
|
874
|
+
assert !Topic.find(1).approved?
|
875
|
+
end
|
876
|
+
|
877
|
+
def test_update_attributes
|
878
|
+
topic = Topic.find(1)
|
879
|
+
assert !topic.approved?
|
880
|
+
assert_equal "The First Topic", topic.title
|
881
|
+
|
882
|
+
topic.update_attributes("approved" => true, "title" => "The First Topic Updated")
|
883
|
+
topic.reload
|
884
|
+
assert topic.approved?
|
885
|
+
assert_equal "The First Topic Updated", topic.title
|
886
|
+
|
887
|
+
topic.update_attributes(:approved => false, :title => "The First Topic")
|
888
|
+
topic.reload
|
889
|
+
assert !topic.approved?
|
890
|
+
assert_equal "The First Topic", topic.title
|
891
|
+
end
|
892
|
+
|
893
|
+
def test_update_attributes!
|
894
|
+
reply = Reply.find(2)
|
895
|
+
assert_equal "The Second Topic of the day", reply.title
|
896
|
+
assert_equal "Have a nice day", reply.content
|
897
|
+
|
898
|
+
reply.update_attributes!("title" => "The Second Topic of the day updated", "content" => "Have a nice evening")
|
899
|
+
reply.reload
|
900
|
+
assert_equal "The Second Topic of the day updated", reply.title
|
901
|
+
assert_equal "Have a nice evening", reply.content
|
902
|
+
|
903
|
+
reply.update_attributes!(:title => "The Second Topic of the day", :content => "Have a nice day")
|
904
|
+
reply.reload
|
905
|
+
assert_equal "The Second Topic of the day", reply.title
|
906
|
+
assert_equal "Have a nice day", reply.content
|
907
|
+
|
908
|
+
assert_raise(ActiveRecord::RecordInvalid) { reply.update_attributes!(:title => nil, :content => "Have a nice evening") }
|
909
|
+
end
|
910
|
+
|
911
|
+
def test_mass_assignment_should_raise_exception_if_accessible_and_protected_attribute_writers_are_both_used
|
912
|
+
topic = TopicWithProtectedContentAndAccessibleAuthorName.new
|
913
|
+
assert_raise(RuntimeError) { topic.attributes = { "author_name" => "me" } }
|
914
|
+
assert_raise(RuntimeError) { topic.attributes = { "content" => "stuff" } }
|
915
|
+
end
|
916
|
+
|
917
|
+
def test_mass_assignment_protection
|
918
|
+
firm = Firm.new
|
919
|
+
firm.attributes = { "name" => "Next Angle", "rating" => 5 }
|
920
|
+
assert_equal 1, firm.rating
|
921
|
+
end
|
922
|
+
|
923
|
+
def test_mass_assignment_protection_against_class_attribute_writers
|
924
|
+
[:logger, :configurations, :primary_key_prefix_type, :table_name_prefix, :table_name_suffix, :pluralize_table_names, :colorize_logging,
|
925
|
+
:default_timezone, :schema_format, :lock_optimistically, :record_timestamps].each do |method|
|
926
|
+
assert Task.respond_to?(method)
|
927
|
+
assert Task.respond_to?("#{method}=")
|
928
|
+
assert Task.new.respond_to?(method)
|
929
|
+
assert !Task.new.respond_to?("#{method}=")
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
def test_customized_primary_key_remains_protected
|
934
|
+
subscriber = Subscriber.new(:nick => 'webster123', :name => 'nice try')
|
935
|
+
assert_nil subscriber.id
|
936
|
+
|
937
|
+
keyboard = Keyboard.new(:key_number => 9, :name => 'nice try')
|
938
|
+
assert_nil keyboard.id
|
939
|
+
end
|
940
|
+
|
941
|
+
def test_customized_primary_key_remains_protected_when_referred_to_as_id
|
942
|
+
subscriber = Subscriber.new(:id => 'webster123', :name => 'nice try')
|
943
|
+
assert_nil subscriber.id
|
944
|
+
|
945
|
+
keyboard = Keyboard.new(:id => 9, :name => 'nice try')
|
946
|
+
assert_nil keyboard.id
|
947
|
+
end
|
948
|
+
|
949
|
+
def test_mass_assigning_invalid_attribute
|
950
|
+
firm = Firm.new
|
951
|
+
|
952
|
+
assert_raise(ActiveRecord::UnknownAttributeError) do
|
953
|
+
firm.attributes = { "id" => 5, "type" => "Client", "i_dont_even_exist" => 20 }
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
def test_mass_assignment_protection_on_defaults
|
958
|
+
firm = Firm.new
|
959
|
+
firm.attributes = { "id" => 5, "type" => "Client" }
|
960
|
+
assert_nil firm.id
|
961
|
+
assert_equal "Firm", firm[:type]
|
962
|
+
end
|
963
|
+
|
964
|
+
def test_mass_assignment_accessible
|
965
|
+
reply = Reply.new("title" => "hello", "content" => "world", "approved" => true)
|
966
|
+
reply.save
|
967
|
+
|
968
|
+
assert reply.approved?
|
969
|
+
|
970
|
+
reply.approved = false
|
971
|
+
reply.save
|
972
|
+
|
973
|
+
assert !reply.approved?
|
974
|
+
end
|
975
|
+
|
976
|
+
def test_mass_assignment_protection_inheritance
|
977
|
+
assert_nil LoosePerson.accessible_attributes
|
978
|
+
assert_equal Set.new([ 'credit_rating', 'administrator' ]), LoosePerson.protected_attributes
|
979
|
+
|
980
|
+
assert_nil LooseDescendant.accessible_attributes
|
981
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number' ]), LooseDescendant.protected_attributes
|
982
|
+
|
983
|
+
assert_nil LooseDescendantSecond.accessible_attributes
|
984
|
+
assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number', 'name' ]), LooseDescendantSecond.protected_attributes, 'Running attr_protected twice in one class should merge the protections'
|
985
|
+
|
986
|
+
assert_nil TightPerson.protected_attributes
|
987
|
+
assert_equal Set.new([ 'name', 'address' ]), TightPerson.accessible_attributes
|
988
|
+
|
989
|
+
assert_nil TightDescendant.protected_attributes
|
990
|
+
assert_equal Set.new([ 'name', 'address', 'phone_number' ]), TightDescendant.accessible_attributes
|
991
|
+
end
|
992
|
+
|
993
|
+
def test_readonly_attributes
|
994
|
+
assert_equal Set.new([ 'title' , 'comments_count' ]), ReadonlyTitlePost.readonly_attributes
|
995
|
+
|
996
|
+
post = ReadonlyTitlePost.create(:title => "cannot change this", :body => "changeable")
|
997
|
+
post.reload
|
998
|
+
assert_equal "cannot change this", post.title
|
999
|
+
|
1000
|
+
post.update_attributes(:title => "try to change", :body => "changed")
|
1001
|
+
post.reload
|
1002
|
+
assert_equal "cannot change this", post.title
|
1003
|
+
assert_equal "changed", post.body
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
def test_multiparameter_attributes_on_date
|
1007
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "24" }
|
1008
|
+
topic = Topic.find(1)
|
1009
|
+
topic.attributes = attributes
|
1010
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1011
|
+
# treats dates/times the same
|
1012
|
+
assert_date_from_db Date.new(2004, 6, 24), topic.last_read.to_date
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
def test_multiparameter_attributes_on_date_with_empty_year
|
1016
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "6", "last_read(3i)" => "24" }
|
1017
|
+
topic = Topic.find(1)
|
1018
|
+
topic.attributes = attributes
|
1019
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1020
|
+
# treats dates/times the same
|
1021
|
+
assert_date_from_db Date.new(1, 6, 24), topic.last_read.to_date
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
def test_multiparameter_attributes_on_date_with_empty_month
|
1025
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "", "last_read(3i)" => "24" }
|
1026
|
+
topic = Topic.find(1)
|
1027
|
+
topic.attributes = attributes
|
1028
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1029
|
+
# treats dates/times the same
|
1030
|
+
assert_date_from_db Date.new(2004, 1, 24), topic.last_read.to_date
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
def test_multiparameter_attributes_on_date_with_empty_day
|
1034
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "" }
|
1035
|
+
topic = Topic.find(1)
|
1036
|
+
topic.attributes = attributes
|
1037
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1038
|
+
# treats dates/times the same
|
1039
|
+
assert_date_from_db Date.new(2004, 6, 1), topic.last_read.to_date
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
def test_multiparameter_attributes_on_date_with_empty_day_and_year
|
1043
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "6", "last_read(3i)" => "" }
|
1044
|
+
topic = Topic.find(1)
|
1045
|
+
topic.attributes = attributes
|
1046
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1047
|
+
# treats dates/times the same
|
1048
|
+
assert_date_from_db Date.new(1, 6, 1), topic.last_read.to_date
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
def test_multiparameter_attributes_on_date_with_empty_day_and_month
|
1052
|
+
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "", "last_read(3i)" => "" }
|
1053
|
+
topic = Topic.find(1)
|
1054
|
+
topic.attributes = attributes
|
1055
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1056
|
+
# treats dates/times the same
|
1057
|
+
assert_date_from_db Date.new(2004, 1, 1), topic.last_read.to_date
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
def test_multiparameter_attributes_on_date_with_empty_year_and_month
|
1061
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "", "last_read(3i)" => "24" }
|
1062
|
+
topic = Topic.find(1)
|
1063
|
+
topic.attributes = attributes
|
1064
|
+
# note that extra #to_date call allows test to pass for Oracle, which
|
1065
|
+
# treats dates/times the same
|
1066
|
+
assert_date_from_db Date.new(1, 1, 24), topic.last_read.to_date
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
def test_multiparameter_attributes_on_date_with_all_empty
|
1070
|
+
attributes = { "last_read(1i)" => "", "last_read(2i)" => "", "last_read(3i)" => "" }
|
1071
|
+
topic = Topic.find(1)
|
1072
|
+
topic.attributes = attributes
|
1073
|
+
assert_nil topic.last_read
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
def test_multiparameter_attributes_on_time
|
1077
|
+
attributes = {
|
1078
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1079
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1080
|
+
}
|
1081
|
+
topic = Topic.find(1)
|
1082
|
+
topic.attributes = attributes
|
1083
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
def test_multiparameter_attributes_on_time_with_old_date
|
1087
|
+
attributes = {
|
1088
|
+
"written_on(1i)" => "1850", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1089
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1090
|
+
}
|
1091
|
+
topic = Topic.find(1)
|
1092
|
+
topic.attributes = attributes
|
1093
|
+
# testing against to_s(:db) representation because either a Time or a DateTime might be returned, depending on platform
|
1094
|
+
assert_equal "1850-06-24 16:24:00", topic.written_on.to_s(:db)
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
def test_multiparameter_attributes_on_time_with_utc
|
1098
|
+
ActiveRecord::Base.default_timezone = :utc
|
1099
|
+
attributes = {
|
1100
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1101
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1102
|
+
}
|
1103
|
+
topic = Topic.find(1)
|
1104
|
+
topic.attributes = attributes
|
1105
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on
|
1106
|
+
ensure
|
1107
|
+
ActiveRecord::Base.default_timezone = :local
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
def test_multiparameter_attributes_on_time_with_time_zone_aware_attributes
|
1111
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1112
|
+
ActiveRecord::Base.default_timezone = :utc
|
1113
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1114
|
+
attributes = {
|
1115
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1116
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1117
|
+
}
|
1118
|
+
topic = Topic.find(1)
|
1119
|
+
topic.attributes = attributes
|
1120
|
+
assert_equal Time.utc(2004, 6, 24, 23, 24, 0), topic.written_on
|
1121
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on.time
|
1122
|
+
assert_equal Time.zone, topic.written_on.time_zone
|
1123
|
+
ensure
|
1124
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1125
|
+
ActiveRecord::Base.default_timezone = :local
|
1126
|
+
Time.zone = nil
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
def test_multiparameter_attributes_on_time_with_time_zone_aware_attributes_false
|
1130
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1131
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1132
|
+
attributes = {
|
1133
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1134
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1135
|
+
}
|
1136
|
+
topic = Topic.find(1)
|
1137
|
+
topic.attributes = attributes
|
1138
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
1139
|
+
assert_equal false, topic.written_on.respond_to?(:time_zone)
|
1140
|
+
ensure
|
1141
|
+
Time.zone = nil
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
def test_multiparameter_attributes_on_time_with_skip_time_zone_conversion_for_attributes
|
1145
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1146
|
+
ActiveRecord::Base.default_timezone = :utc
|
1147
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1148
|
+
Topic.skip_time_zone_conversion_for_attributes = [:written_on]
|
1149
|
+
attributes = {
|
1150
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1151
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => "00"
|
1152
|
+
}
|
1153
|
+
topic = Topic.find(1)
|
1154
|
+
topic.attributes = attributes
|
1155
|
+
assert_equal Time.utc(2004, 6, 24, 16, 24, 0), topic.written_on
|
1156
|
+
assert_equal false, topic.written_on.respond_to?(:time_zone)
|
1157
|
+
ensure
|
1158
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1159
|
+
ActiveRecord::Base.default_timezone = :local
|
1160
|
+
Time.zone = nil
|
1161
|
+
Topic.skip_time_zone_conversion_for_attributes = []
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
def test_multiparameter_attributes_on_time_only_column_with_time_zone_aware_attributes_does_not_do_time_zone_conversion
|
1165
|
+
ActiveRecord::Base.time_zone_aware_attributes = true
|
1166
|
+
ActiveRecord::Base.default_timezone = :utc
|
1167
|
+
Time.zone = ActiveSupport::TimeZone[-28800]
|
1168
|
+
attributes = {
|
1169
|
+
"bonus_time(1i)" => "2000", "bonus_time(2i)" => "1", "bonus_time(3i)" => "1",
|
1170
|
+
"bonus_time(4i)" => "16", "bonus_time(5i)" => "24"
|
1171
|
+
}
|
1172
|
+
topic = Topic.find(1)
|
1173
|
+
topic.attributes = attributes
|
1174
|
+
assert_equal Time.utc(2000, 1, 1, 16, 24, 0), topic.bonus_time
|
1175
|
+
assert topic.bonus_time.utc?
|
1176
|
+
ensure
|
1177
|
+
ActiveRecord::Base.time_zone_aware_attributes = false
|
1178
|
+
ActiveRecord::Base.default_timezone = :local
|
1179
|
+
Time.zone = nil
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
def test_multiparameter_attributes_on_time_with_empty_seconds
|
1183
|
+
attributes = {
|
1184
|
+
"written_on(1i)" => "2004", "written_on(2i)" => "6", "written_on(3i)" => "24",
|
1185
|
+
"written_on(4i)" => "16", "written_on(5i)" => "24", "written_on(6i)" => ""
|
1186
|
+
}
|
1187
|
+
topic = Topic.find(1)
|
1188
|
+
topic.attributes = attributes
|
1189
|
+
assert_equal Time.local(2004, 6, 24, 16, 24, 0), topic.written_on
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
def test_multiparameter_mass_assignment_protector
|
1193
|
+
task = Task.new
|
1194
|
+
time = Time.mktime(2000, 1, 1, 1)
|
1195
|
+
task.starting = time
|
1196
|
+
attributes = { "starting(1i)" => "2004", "starting(2i)" => "6", "starting(3i)" => "24" }
|
1197
|
+
task.attributes = attributes
|
1198
|
+
assert_equal time, task.starting
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
def test_multiparameter_assignment_of_aggregation
|
1202
|
+
customer = Customer.new
|
1203
|
+
address = Address.new("The Street", "The City", "The Country")
|
1204
|
+
attributes = { "address(1)" => address.street, "address(2)" => address.city, "address(3)" => address.country }
|
1205
|
+
customer.attributes = attributes
|
1206
|
+
assert_equal address, customer.address
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
def test_attributes_on_dummy_time
|
1210
|
+
# Oracle, and Sybase do not have a TIME datatype.
|
1211
|
+
return true if current_adapter?(:OracleAdapter, :SybaseAdapter)
|
1212
|
+
|
1213
|
+
attributes = {
|
1214
|
+
"bonus_time" => "5:42:00AM"
|
1215
|
+
}
|
1216
|
+
topic = Topic.find(1)
|
1217
|
+
topic.attributes = attributes
|
1218
|
+
assert_equal Time.local(2000, 1, 1, 5, 42, 0), topic.bonus_time
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
def test_boolean
|
1222
|
+
b_nil = Booleantest.create({ "value" => nil })
|
1223
|
+
nil_id = b_nil.id
|
1224
|
+
b_false = Booleantest.create({ "value" => false })
|
1225
|
+
false_id = b_false.id
|
1226
|
+
b_true = Booleantest.create({ "value" => true })
|
1227
|
+
true_id = b_true.id
|
1228
|
+
|
1229
|
+
b_nil = Booleantest.find(nil_id)
|
1230
|
+
assert_nil b_nil.value
|
1231
|
+
b_false = Booleantest.find(false_id)
|
1232
|
+
assert !b_false.value?
|
1233
|
+
b_true = Booleantest.find(true_id)
|
1234
|
+
assert b_true.value?
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
def test_boolean_cast_from_string
|
1238
|
+
b_blank = Booleantest.create({ "value" => "" })
|
1239
|
+
blank_id = b_blank.id
|
1240
|
+
b_false = Booleantest.create({ "value" => "0" })
|
1241
|
+
false_id = b_false.id
|
1242
|
+
b_true = Booleantest.create({ "value" => "1" })
|
1243
|
+
true_id = b_true.id
|
1244
|
+
|
1245
|
+
b_blank = Booleantest.find(blank_id)
|
1246
|
+
assert_nil b_blank.value
|
1247
|
+
b_false = Booleantest.find(false_id)
|
1248
|
+
assert !b_false.value?
|
1249
|
+
b_true = Booleantest.find(true_id)
|
1250
|
+
assert b_true.value?
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
def test_new_record_returns_boolean
|
1254
|
+
assert_equal Topic.new.new_record?, true
|
1255
|
+
assert_equal Topic.find(1).new_record?, false
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
def test_clone
|
1259
|
+
topic = Topic.find(1)
|
1260
|
+
cloned_topic = nil
|
1261
|
+
assert_nothing_raised { cloned_topic = topic.clone }
|
1262
|
+
assert_equal topic.title, cloned_topic.title
|
1263
|
+
assert cloned_topic.new_record?
|
1264
|
+
|
1265
|
+
# test if the attributes have been cloned
|
1266
|
+
topic.title = "a"
|
1267
|
+
cloned_topic.title = "b"
|
1268
|
+
assert_equal "a", topic.title
|
1269
|
+
assert_equal "b", cloned_topic.title
|
1270
|
+
|
1271
|
+
# test if the attribute values have been cloned
|
1272
|
+
topic.title = {"a" => "b"}
|
1273
|
+
cloned_topic = topic.clone
|
1274
|
+
cloned_topic.title["a"] = "c"
|
1275
|
+
assert_equal "b", topic.title["a"]
|
1276
|
+
|
1277
|
+
#test if attributes set as part of after_initialize are cloned correctly
|
1278
|
+
assert_equal topic.author_email_address, cloned_topic.author_email_address
|
1279
|
+
|
1280
|
+
# test if saved clone object differs from original
|
1281
|
+
cloned_topic.save
|
1282
|
+
assert !cloned_topic.new_record?
|
1283
|
+
assert cloned_topic.id != topic.id
|
1284
|
+
end
|
1285
|
+
|
1286
|
+
def test_clone_with_aggregate_of_same_name_as_attribute
|
1287
|
+
dev = DeveloperWithAggregate.find(1)
|
1288
|
+
assert_kind_of DeveloperSalary, dev.salary
|
1289
|
+
|
1290
|
+
clone = nil
|
1291
|
+
assert_nothing_raised { clone = dev.clone }
|
1292
|
+
assert_kind_of DeveloperSalary, clone.salary
|
1293
|
+
assert_equal dev.salary.amount, clone.salary.amount
|
1294
|
+
assert clone.new_record?
|
1295
|
+
|
1296
|
+
# test if the attributes have been cloned
|
1297
|
+
original_amount = clone.salary.amount
|
1298
|
+
dev.salary.amount = 1
|
1299
|
+
assert_equal original_amount, clone.salary.amount
|
1300
|
+
|
1301
|
+
assert clone.save
|
1302
|
+
assert !clone.new_record?
|
1303
|
+
assert clone.id != dev.id
|
1304
|
+
end
|
1305
|
+
|
1306
|
+
def test_clone_preserves_subtype
|
1307
|
+
clone = nil
|
1308
|
+
assert_nothing_raised { clone = Company.find(3).clone }
|
1309
|
+
assert_kind_of Client, clone
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
def test_bignum
|
1313
|
+
company = Company.find(1)
|
1314
|
+
company.rating = 2147483647
|
1315
|
+
company.save
|
1316
|
+
company = Company.find(1)
|
1317
|
+
assert_equal 2147483647, company.rating
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# TODO: extend defaults tests to other databases!
|
1321
|
+
if current_adapter?(:PostgreSQLAdapter)
|
1322
|
+
def test_default
|
1323
|
+
default = Default.new
|
1324
|
+
|
1325
|
+
# fixed dates / times
|
1326
|
+
assert_equal Date.new(2004, 1, 1), default.fixed_date
|
1327
|
+
assert_equal Time.local(2004, 1,1,0,0,0,0), default.fixed_time
|
1328
|
+
|
1329
|
+
# char types
|
1330
|
+
assert_equal 'Y', default.char1
|
1331
|
+
assert_equal 'a varchar field', default.char2
|
1332
|
+
assert_equal 'a text field', default.char3
|
1333
|
+
end
|
1334
|
+
|
1335
|
+
class Geometric < ActiveRecord::Base; end
|
1336
|
+
def test_geometric_content
|
1337
|
+
|
1338
|
+
# accepted format notes:
|
1339
|
+
# ()'s aren't required
|
1340
|
+
# values can be a mix of float or integer
|
1341
|
+
|
1342
|
+
g = Geometric.new(
|
1343
|
+
:a_point => '(5.0, 6.1)',
|
1344
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1345
|
+
:a_line_segment => '(2.0, 3), (5.5, 7.0)',
|
1346
|
+
:a_box => '2.0, 3, 5.5, 7.0',
|
1347
|
+
:a_path => '[(2.0, 3), (5.5, 7.0), (8.5, 11.0)]', # [ ] is an open path
|
1348
|
+
:a_polygon => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))',
|
1349
|
+
:a_circle => '<(5.3, 10.4), 2>'
|
1350
|
+
)
|
1351
|
+
|
1352
|
+
assert g.save
|
1353
|
+
|
1354
|
+
# Reload and check that we have all the geometric attributes.
|
1355
|
+
h = Geometric.find(g.id)
|
1356
|
+
|
1357
|
+
assert_equal '(5,6.1)', h.a_point
|
1358
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1359
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1360
|
+
assert_equal '[(2,3),(5.5,7),(8.5,11)]', h.a_path
|
1361
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1362
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1363
|
+
|
1364
|
+
# use a geometric function to test for an open path
|
1365
|
+
objs = Geometric.find_by_sql ["select isopen(a_path) from geometrics where id = ?", g.id]
|
1366
|
+
assert_equal objs[0].isopen, 't'
|
1367
|
+
|
1368
|
+
# test alternate formats when defining the geometric types
|
1369
|
+
|
1370
|
+
g = Geometric.new(
|
1371
|
+
:a_point => '5.0, 6.1',
|
1372
|
+
#:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
|
1373
|
+
:a_line_segment => '((2.0, 3), (5.5, 7.0))',
|
1374
|
+
:a_box => '(2.0, 3), (5.5, 7.0)',
|
1375
|
+
:a_path => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))', # ( ) is a closed path
|
1376
|
+
:a_polygon => '2.0, 3, 5.5, 7.0, 8.5, 11.0',
|
1377
|
+
:a_circle => '((5.3, 10.4), 2)'
|
1378
|
+
)
|
1379
|
+
|
1380
|
+
assert g.save
|
1381
|
+
|
1382
|
+
# Reload and check that we have all the geometric attributes.
|
1383
|
+
h = Geometric.find(g.id)
|
1384
|
+
|
1385
|
+
assert_equal '(5,6.1)', h.a_point
|
1386
|
+
assert_equal '[(2,3),(5.5,7)]', h.a_line_segment
|
1387
|
+
assert_equal '(5.5,7),(2,3)', h.a_box # reordered to store upper right corner then bottom left corner
|
1388
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_path
|
1389
|
+
assert_equal '((2,3),(5.5,7),(8.5,11))', h.a_polygon
|
1390
|
+
assert_equal '<(5.3,10.4),2>', h.a_circle
|
1391
|
+
|
1392
|
+
# use a geometric function to test for an closed path
|
1393
|
+
objs = Geometric.find_by_sql ["select isclosed(a_path) from geometrics where id = ?", g.id]
|
1394
|
+
assert_equal objs[0].isclosed, 't'
|
1395
|
+
end
|
1396
|
+
end
|
1397
|
+
|
1398
|
+
class NumericData < ActiveRecord::Base
|
1399
|
+
self.table_name = 'numeric_data'
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
def test_numeric_fields
|
1403
|
+
m = NumericData.new(
|
1404
|
+
:bank_balance => 1586.43,
|
1405
|
+
:big_bank_balance => BigDecimal("1000234000567.95"),
|
1406
|
+
:world_population => 6000000000,
|
1407
|
+
:my_house_population => 3
|
1408
|
+
)
|
1409
|
+
assert m.save
|
1410
|
+
|
1411
|
+
m1 = NumericData.find(m.id)
|
1412
|
+
assert_not_nil m1
|
1413
|
+
|
1414
|
+
# As with migration_test.rb, we should make world_population >= 2**62
|
1415
|
+
# to cover 64-bit platforms and test it is a Bignum, but the main thing
|
1416
|
+
# is that it's an Integer.
|
1417
|
+
assert_kind_of Integer, m1.world_population
|
1418
|
+
assert_equal 6000000000, m1.world_population
|
1419
|
+
|
1420
|
+
assert_kind_of Fixnum, m1.my_house_population
|
1421
|
+
assert_equal 3, m1.my_house_population
|
1422
|
+
|
1423
|
+
assert_kind_of BigDecimal, m1.bank_balance
|
1424
|
+
assert_equal BigDecimal("1586.43"), m1.bank_balance
|
1425
|
+
|
1426
|
+
assert_kind_of BigDecimal, m1.big_bank_balance
|
1427
|
+
assert_equal BigDecimal("1000234000567.95"), m1.big_bank_balance
|
1428
|
+
end
|
1429
|
+
|
1430
|
+
def test_auto_id
|
1431
|
+
auto = AutoId.new
|
1432
|
+
auto.save
|
1433
|
+
assert (auto.id > 0)
|
1434
|
+
end
|
1435
|
+
|
1436
|
+
def quote_column_name(name)
|
1437
|
+
"<#{name}>"
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
def test_quote_keys
|
1441
|
+
ar = AutoId.new
|
1442
|
+
source = {"foo" => "bar", "baz" => "quux"}
|
1443
|
+
actual = ar.send(:quote_columns, self, source)
|
1444
|
+
inverted = actual.invert
|
1445
|
+
assert_equal("<foo>", inverted["bar"])
|
1446
|
+
assert_equal("<baz>", inverted["quux"])
|
1447
|
+
end
|
1448
|
+
|
1449
|
+
def test_sql_injection_via_find
|
1450
|
+
assert_raise(ActiveRecord::RecordNotFound, ActiveRecord::StatementInvalid) do
|
1451
|
+
Topic.find("123456 OR id > 0")
|
1452
|
+
end
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
def test_column_name_properly_quoted
|
1456
|
+
col_record = ColumnName.new
|
1457
|
+
col_record.references = 40
|
1458
|
+
assert col_record.save
|
1459
|
+
col_record.references = 41
|
1460
|
+
assert col_record.save
|
1461
|
+
assert_not_nil c2 = ColumnName.find(col_record.id)
|
1462
|
+
assert_equal(41, c2.references)
|
1463
|
+
end
|
1464
|
+
|
1465
|
+
def test_quoting_arrays
|
1466
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", topics(:first).replies.collect(&:id) ])
|
1467
|
+
assert_equal topics(:first).replies.size, replies.size
|
1468
|
+
|
1469
|
+
replies = Reply.find(:all, :conditions => [ "id IN (?)", [] ])
|
1470
|
+
assert_equal 0, replies.size
|
1471
|
+
end
|
1472
|
+
|
1473
|
+
MyObject = Struct.new :attribute1, :attribute2
|
1474
|
+
|
1475
|
+
def test_serialized_attribute
|
1476
|
+
myobj = MyObject.new('value1', 'value2')
|
1477
|
+
topic = Topic.create("content" => myobj)
|
1478
|
+
Topic.serialize("content", MyObject)
|
1479
|
+
assert_equal(myobj, topic.content)
|
1480
|
+
end
|
1481
|
+
|
1482
|
+
def test_serialized_time_attribute
|
1483
|
+
myobj = Time.local(2008,1,1,1,0)
|
1484
|
+
topic = Topic.create("content" => myobj).reload
|
1485
|
+
assert_equal(myobj, topic.content)
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
def test_serialized_string_attribute
|
1489
|
+
myobj = "Yes"
|
1490
|
+
topic = Topic.create("content" => myobj).reload
|
1491
|
+
assert_equal(myobj, topic.content)
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
def test_nil_serialized_attribute_with_class_constraint
|
1495
|
+
myobj = MyObject.new('value1', 'value2')
|
1496
|
+
topic = Topic.new
|
1497
|
+
assert_nil topic.content
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
def test_should_raise_exception_on_serialized_attribute_with_type_mismatch
|
1501
|
+
myobj = MyObject.new('value1', 'value2')
|
1502
|
+
topic = Topic.new(:content => myobj)
|
1503
|
+
assert topic.save
|
1504
|
+
Topic.serialize(:content, Hash)
|
1505
|
+
assert_raise(ActiveRecord::SerializationTypeMismatch) { Topic.find(topic.id).content }
|
1506
|
+
ensure
|
1507
|
+
Topic.serialize(:content)
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
def test_serialized_attribute_with_class_constraint
|
1511
|
+
settings = { "color" => "blue" }
|
1512
|
+
Topic.serialize(:content, Hash)
|
1513
|
+
topic = Topic.new(:content => settings)
|
1514
|
+
assert topic.save
|
1515
|
+
assert_equal(settings, Topic.find(topic.id).content)
|
1516
|
+
ensure
|
1517
|
+
Topic.serialize(:content)
|
1518
|
+
end
|
1519
|
+
|
1520
|
+
def test_quote
|
1521
|
+
author_name = "\\ \001 ' \n \\n \""
|
1522
|
+
topic = Topic.create('author_name' => author_name)
|
1523
|
+
assert_equal author_name, Topic.find(topic.id).author_name
|
1524
|
+
end
|
1525
|
+
|
1526
|
+
if RUBY_VERSION < '1.9'
|
1527
|
+
def test_quote_chars
|
1528
|
+
with_kcode('UTF8') do
|
1529
|
+
str = 'The Narrator'
|
1530
|
+
topic = Topic.create(:author_name => str)
|
1531
|
+
assert_equal str, topic.author_name
|
1532
|
+
|
1533
|
+
assert_kind_of ActiveSupport::Multibyte.proxy_class, str.mb_chars
|
1534
|
+
topic = Topic.find_by_author_name(str.mb_chars)
|
1535
|
+
|
1536
|
+
assert_kind_of Topic, topic
|
1537
|
+
assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
|
1538
|
+
end
|
1539
|
+
end
|
1540
|
+
end
|
1541
|
+
|
1542
|
+
def test_class_level_destroy
|
1543
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1544
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1545
|
+
|
1546
|
+
Topic.destroy(1)
|
1547
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1548
|
+
assert_raise(ActiveRecord::RecordNotFound) { Reply.find(should_be_destroyed_reply.id) }
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
def test_class_level_delete
|
1552
|
+
should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")
|
1553
|
+
Topic.find(1).replies << should_be_destroyed_reply
|
1554
|
+
|
1555
|
+
Topic.delete(1)
|
1556
|
+
assert_raise(ActiveRecord::RecordNotFound) { Topic.find(1) }
|
1557
|
+
assert_nothing_raised { Reply.find(should_be_destroyed_reply.id) }
|
1558
|
+
end
|
1559
|
+
|
1560
|
+
def test_increment_attribute
|
1561
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1562
|
+
accounts(:signals37).increment! :credit_limit
|
1563
|
+
assert_equal 51, accounts(:signals37, :reload).credit_limit
|
1564
|
+
|
1565
|
+
accounts(:signals37).increment(:credit_limit).increment!(:credit_limit)
|
1566
|
+
assert_equal 53, accounts(:signals37, :reload).credit_limit
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
def test_increment_nil_attribute
|
1570
|
+
assert_nil topics(:first).parent_id
|
1571
|
+
topics(:first).increment! :parent_id
|
1572
|
+
assert_equal 1, topics(:first).parent_id
|
1573
|
+
end
|
1574
|
+
|
1575
|
+
def test_increment_attribute_by
|
1576
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1577
|
+
accounts(:signals37).increment! :credit_limit, 5
|
1578
|
+
assert_equal 55, accounts(:signals37, :reload).credit_limit
|
1579
|
+
|
1580
|
+
accounts(:signals37).increment(:credit_limit, 1).increment!(:credit_limit, 3)
|
1581
|
+
assert_equal 59, accounts(:signals37, :reload).credit_limit
|
1582
|
+
end
|
1583
|
+
|
1584
|
+
def test_decrement_attribute
|
1585
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1586
|
+
|
1587
|
+
accounts(:signals37).decrement!(:credit_limit)
|
1588
|
+
assert_equal 49, accounts(:signals37, :reload).credit_limit
|
1589
|
+
|
1590
|
+
accounts(:signals37).decrement(:credit_limit).decrement!(:credit_limit)
|
1591
|
+
assert_equal 47, accounts(:signals37, :reload).credit_limit
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
def test_decrement_attribute_by
|
1595
|
+
assert_equal 50, accounts(:signals37).credit_limit
|
1596
|
+
accounts(:signals37).decrement! :credit_limit, 5
|
1597
|
+
assert_equal 45, accounts(:signals37, :reload).credit_limit
|
1598
|
+
|
1599
|
+
accounts(:signals37).decrement(:credit_limit, 1).decrement!(:credit_limit, 3)
|
1600
|
+
assert_equal 41, accounts(:signals37, :reload).credit_limit
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
def test_toggle_attribute
|
1604
|
+
assert !topics(:first).approved?
|
1605
|
+
topics(:first).toggle!(:approved)
|
1606
|
+
assert topics(:first).approved?
|
1607
|
+
topic = topics(:first)
|
1608
|
+
topic.toggle(:approved)
|
1609
|
+
assert !topic.approved?
|
1610
|
+
topic.reload
|
1611
|
+
assert topic.approved?
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
def test_reload
|
1615
|
+
t1 = Topic.find(1)
|
1616
|
+
t2 = Topic.find(1)
|
1617
|
+
t1.title = "something else"
|
1618
|
+
t1.save
|
1619
|
+
t2.reload
|
1620
|
+
assert_equal t1.title, t2.title
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
def test_define_attr_method_with_value
|
1624
|
+
k = Class.new( ActiveRecord::Base )
|
1625
|
+
k.send(:define_attr_method, :table_name, "foo")
|
1626
|
+
assert_equal "foo", k.table_name
|
1627
|
+
end
|
1628
|
+
|
1629
|
+
def test_define_attr_method_with_block
|
1630
|
+
k = Class.new( ActiveRecord::Base )
|
1631
|
+
k.send(:define_attr_method, :primary_key) { "sys_" + original_primary_key }
|
1632
|
+
assert_equal "sys_id", k.primary_key
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
def test_set_table_name_with_value
|
1636
|
+
k = Class.new( ActiveRecord::Base )
|
1637
|
+
k.table_name = "foo"
|
1638
|
+
assert_equal "foo", k.table_name
|
1639
|
+
k.set_table_name "bar"
|
1640
|
+
assert_equal "bar", k.table_name
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
def test_set_table_name_with_block
|
1644
|
+
k = Class.new( ActiveRecord::Base )
|
1645
|
+
k.set_table_name { "ks" }
|
1646
|
+
assert_equal "ks", k.table_name
|
1647
|
+
end
|
1648
|
+
|
1649
|
+
def test_set_primary_key_with_value
|
1650
|
+
k = Class.new( ActiveRecord::Base )
|
1651
|
+
k.primary_key = "foo"
|
1652
|
+
assert_equal "foo", k.primary_key
|
1653
|
+
k.set_primary_key "bar"
|
1654
|
+
assert_equal "bar", k.primary_key
|
1655
|
+
end
|
1656
|
+
|
1657
|
+
def test_set_primary_key_with_block
|
1658
|
+
k = Class.new( ActiveRecord::Base )
|
1659
|
+
k.set_primary_key { "sys_" + original_primary_key }
|
1660
|
+
assert_equal "sys_id", k.primary_key
|
1661
|
+
end
|
1662
|
+
|
1663
|
+
def test_set_inheritance_column_with_value
|
1664
|
+
k = Class.new( ActiveRecord::Base )
|
1665
|
+
k.inheritance_column = "foo"
|
1666
|
+
assert_equal "foo", k.inheritance_column
|
1667
|
+
k.set_inheritance_column "bar"
|
1668
|
+
assert_equal "bar", k.inheritance_column
|
1669
|
+
end
|
1670
|
+
|
1671
|
+
def test_set_inheritance_column_with_block
|
1672
|
+
k = Class.new( ActiveRecord::Base )
|
1673
|
+
k.set_inheritance_column { original_inheritance_column + "_id" }
|
1674
|
+
assert_equal "type_id", k.inheritance_column
|
1675
|
+
end
|
1676
|
+
|
1677
|
+
def test_count_with_join
|
1678
|
+
res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.#{QUOTED_TYPE} = 'Post'"
|
1679
|
+
|
1680
|
+
res2 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'", :joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1681
|
+
assert_equal res, res2
|
1682
|
+
|
1683
|
+
res3 = nil
|
1684
|
+
assert_nothing_raised do
|
1685
|
+
res3 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'",
|
1686
|
+
:joins => "LEFT JOIN comments ON posts.id=comments.post_id")
|
1687
|
+
end
|
1688
|
+
assert_equal res, res3
|
1689
|
+
|
1690
|
+
res4 = Post.count_by_sql "SELECT COUNT(p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1691
|
+
res5 = nil
|
1692
|
+
assert_nothing_raised do
|
1693
|
+
res5 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1694
|
+
:joins => "p, comments co",
|
1695
|
+
:select => "p.id")
|
1696
|
+
end
|
1697
|
+
|
1698
|
+
assert_equal res4, res5
|
1699
|
+
|
1700
|
+
unless current_adapter?(:SQLite2Adapter, :DeprecatedSQLiteAdapter)
|
1701
|
+
res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
|
1702
|
+
res7 = nil
|
1703
|
+
assert_nothing_raised do
|
1704
|
+
res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
|
1705
|
+
:joins => "p, comments co",
|
1706
|
+
:select => "p.id",
|
1707
|
+
:distinct => true)
|
1708
|
+
end
|
1709
|
+
assert_equal res6, res7
|
1710
|
+
end
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
def test_clear_association_cache_stored
|
1714
|
+
firm = Firm.find(1)
|
1715
|
+
assert_kind_of Firm, firm
|
1716
|
+
|
1717
|
+
firm.clear_association_cache
|
1718
|
+
assert_equal Firm.find(1).clients.collect{ |x| x.name }.sort, firm.clients.collect{ |x| x.name }.sort
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
def test_clear_association_cache_new_record
|
1722
|
+
firm = Firm.new
|
1723
|
+
client_stored = Client.find(3)
|
1724
|
+
client_new = Client.new
|
1725
|
+
client_new.name = "The Joneses"
|
1726
|
+
clients = [ client_stored, client_new ]
|
1727
|
+
|
1728
|
+
firm.clients << clients
|
1729
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1730
|
+
|
1731
|
+
firm.clear_association_cache
|
1732
|
+
assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
def test_interpolate_sql
|
1736
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo@bar') }
|
1737
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar) baz') }
|
1738
|
+
assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar} baz') }
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
def test_scoped_find_conditions
|
1742
|
+
scoped_developers = Developer.with_scope(:find => { :conditions => 'salary > 90000' }) do
|
1743
|
+
Developer.find(:all, :conditions => 'id < 5')
|
1744
|
+
end
|
1745
|
+
assert !scoped_developers.include?(developers(:david)) # David's salary is less than 90,000
|
1746
|
+
assert_equal 3, scoped_developers.size
|
1747
|
+
end
|
1748
|
+
|
1749
|
+
def test_scoped_find_limit_offset
|
1750
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :offset => 2 }) do
|
1751
|
+
Developer.find(:all, :order => 'id')
|
1752
|
+
end
|
1753
|
+
assert !scoped_developers.include?(developers(:david))
|
1754
|
+
assert !scoped_developers.include?(developers(:jamis))
|
1755
|
+
assert_equal 3, scoped_developers.size
|
1756
|
+
|
1757
|
+
# Test without scoped find conditions to ensure we get the whole thing
|
1758
|
+
developers = Developer.find(:all, :order => 'id')
|
1759
|
+
assert_equal Developer.count, developers.size
|
1760
|
+
end
|
1761
|
+
|
1762
|
+
def test_scoped_find_order
|
1763
|
+
# Test order in scope
|
1764
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1, :order => 'salary DESC' }) do
|
1765
|
+
Developer.find(:all)
|
1766
|
+
end
|
1767
|
+
assert_equal 'Jamis', scoped_developers.first.name
|
1768
|
+
assert scoped_developers.include?(developers(:jamis))
|
1769
|
+
# Test scope without order and order in find
|
1770
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 1 }) do
|
1771
|
+
Developer.find(:all, :order => 'salary DESC')
|
1772
|
+
end
|
1773
|
+
# Test scope order + find order, find has priority
|
1774
|
+
scoped_developers = Developer.with_scope(:find => { :limit => 3, :order => 'id DESC' }) do
|
1775
|
+
Developer.find(:all, :order => 'salary ASC')
|
1776
|
+
end
|
1777
|
+
assert scoped_developers.include?(developers(:poor_jamis))
|
1778
|
+
assert scoped_developers.include?(developers(:david))
|
1779
|
+
assert scoped_developers.include?(developers(:dev_10))
|
1780
|
+
# Test without scoped find conditions to ensure we get the right thing
|
1781
|
+
developers = Developer.find(:all, :order => 'id', :limit => 1)
|
1782
|
+
assert scoped_developers.include?(developers(:david))
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
def test_scoped_find_limit_offset_including_has_many_association
|
1786
|
+
topics = Topic.with_scope(:find => {:limit => 1, :offset => 1, :include => :replies}) do
|
1787
|
+
Topic.find(:all, :order => "topics.id")
|
1788
|
+
end
|
1789
|
+
assert_equal 1, topics.size
|
1790
|
+
assert_equal 2, topics.first.id
|
1791
|
+
end
|
1792
|
+
|
1793
|
+
def test_scoped_find_order_including_has_many_association
|
1794
|
+
developers = Developer.with_scope(:find => { :order => 'developers.salary DESC', :include => :projects }) do
|
1795
|
+
Developer.find(:all)
|
1796
|
+
end
|
1797
|
+
assert developers.size >= 2
|
1798
|
+
for i in 1...developers.size
|
1799
|
+
assert developers[i-1].salary >= developers[i].salary
|
1800
|
+
end
|
1801
|
+
end
|
1802
|
+
|
1803
|
+
def test_scoped_find_with_group_and_having
|
1804
|
+
developers = Developer.with_scope(:find => { :group => 'developers.salary', :having => "SUM(salary) > 10000", :select => "SUM(salary) as salary" }) do
|
1805
|
+
Developer.find(:all)
|
1806
|
+
end
|
1807
|
+
assert_equal 3, developers.size
|
1808
|
+
end
|
1809
|
+
|
1810
|
+
def test_find_last
|
1811
|
+
last = Developer.find :last
|
1812
|
+
assert_equal last, Developer.find(:first, :order => 'id desc')
|
1813
|
+
end
|
1814
|
+
|
1815
|
+
def test_last
|
1816
|
+
assert_equal Developer.find(:first, :order => 'id desc'), Developer.last
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
def test_all_with_conditions
|
1820
|
+
assert_equal Developer.find(:all, :order => 'id desc'), Developer.all(:order => 'id desc')
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
def test_find_ordered_last
|
1824
|
+
last = Developer.find :last, :order => 'developers.salary ASC'
|
1825
|
+
assert_equal last, Developer.find(:all, :order => 'developers.salary ASC').last
|
1826
|
+
end
|
1827
|
+
|
1828
|
+
def test_find_reverse_ordered_last
|
1829
|
+
last = Developer.find :last, :order => 'developers.salary DESC'
|
1830
|
+
assert_equal last, Developer.find(:all, :order => 'developers.salary DESC').last
|
1831
|
+
end
|
1832
|
+
|
1833
|
+
def test_find_multiple_ordered_last
|
1834
|
+
last = Developer.find :last, :order => 'developers.name, developers.salary DESC'
|
1835
|
+
assert_equal last, Developer.find(:all, :order => 'developers.name, developers.salary DESC').last
|
1836
|
+
end
|
1837
|
+
|
1838
|
+
def test_find_symbol_ordered_last
|
1839
|
+
last = Developer.find :last, :order => :salary
|
1840
|
+
assert_equal last, Developer.find(:all, :order => :salary).last
|
1841
|
+
end
|
1842
|
+
|
1843
|
+
def test_find_scoped_ordered_last
|
1844
|
+
last_developer = Developer.with_scope(:find => { :order => 'developers.salary ASC' }) do
|
1845
|
+
Developer.find(:last)
|
1846
|
+
end
|
1847
|
+
assert_equal last_developer, Developer.find(:all, :order => 'developers.salary ASC').last
|
1848
|
+
end
|
1849
|
+
|
1850
|
+
def test_abstract_class
|
1851
|
+
assert !ActiveRecord::Base.abstract_class?
|
1852
|
+
assert LoosePerson.abstract_class?
|
1853
|
+
assert !LooseDescendant.abstract_class?
|
1854
|
+
end
|
1855
|
+
|
1856
|
+
def test_base_class
|
1857
|
+
assert_equal LoosePerson, LoosePerson.base_class
|
1858
|
+
assert_equal LooseDescendant, LooseDescendant.base_class
|
1859
|
+
assert_equal TightPerson, TightPerson.base_class
|
1860
|
+
assert_equal TightPerson, TightDescendant.base_class
|
1861
|
+
|
1862
|
+
assert_equal Post, Post.base_class
|
1863
|
+
assert_equal Post, SpecialPost.base_class
|
1864
|
+
assert_equal Post, StiPost.base_class
|
1865
|
+
assert_equal SubStiPost, SubStiPost.base_class
|
1866
|
+
end
|
1867
|
+
|
1868
|
+
def test_descends_from_active_record
|
1869
|
+
# Tries to call Object.abstract_class?
|
1870
|
+
assert_raise(NoMethodError) do
|
1871
|
+
ActiveRecord::Base.descends_from_active_record?
|
1872
|
+
end
|
1873
|
+
|
1874
|
+
# Abstract subclass of AR::Base.
|
1875
|
+
assert LoosePerson.descends_from_active_record?
|
1876
|
+
|
1877
|
+
# Concrete subclass of an abstract class.
|
1878
|
+
assert LooseDescendant.descends_from_active_record?
|
1879
|
+
|
1880
|
+
# Concrete subclass of AR::Base.
|
1881
|
+
assert TightPerson.descends_from_active_record?
|
1882
|
+
|
1883
|
+
# Concrete subclass of a concrete class but has no type column.
|
1884
|
+
assert TightDescendant.descends_from_active_record?
|
1885
|
+
|
1886
|
+
# Concrete subclass of AR::Base.
|
1887
|
+
assert Post.descends_from_active_record?
|
1888
|
+
|
1889
|
+
# Abstract subclass of a concrete class which has a type column.
|
1890
|
+
# This is pathological, as you'll never have Sub < Abstract < Concrete.
|
1891
|
+
assert !StiPost.descends_from_active_record?
|
1892
|
+
|
1893
|
+
# Concrete subclasses an abstract class which has a type column.
|
1894
|
+
assert !SubStiPost.descends_from_active_record?
|
1895
|
+
end
|
1896
|
+
|
1897
|
+
def test_find_on_abstract_base_class_doesnt_use_type_condition
|
1898
|
+
old_class = LooseDescendant
|
1899
|
+
Object.send :remove_const, :LooseDescendant
|
1900
|
+
|
1901
|
+
descendant = old_class.create! :first_name => 'bob'
|
1902
|
+
assert_not_nil LoosePerson.find(descendant.id), "Should have found instance of LooseDescendant when finding abstract LoosePerson: #{descendant.inspect}"
|
1903
|
+
ensure
|
1904
|
+
unless Object.const_defined?(:LooseDescendant)
|
1905
|
+
Object.const_set :LooseDescendant, old_class
|
1906
|
+
end
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
def test_assert_queries
|
1910
|
+
query = lambda { ActiveRecord::Base.connection.execute 'select count(*) from developers' }
|
1911
|
+
assert_queries(2) { 2.times { query.call } }
|
1912
|
+
assert_queries 1, &query
|
1913
|
+
assert_no_queries { assert true }
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
def test_to_xml
|
1917
|
+
xml = REXML::Document.new(topics(:first).to_xml(:indent => 0))
|
1918
|
+
bonus_time_in_current_timezone = topics(:first).bonus_time.xmlschema
|
1919
|
+
written_on_in_current_timezone = topics(:first).written_on.xmlschema
|
1920
|
+
last_read_in_current_timezone = topics(:first).last_read.xmlschema
|
1921
|
+
|
1922
|
+
assert_equal "topic", xml.root.name
|
1923
|
+
assert_equal "The First Topic" , xml.elements["//title"].text
|
1924
|
+
assert_equal "David" , xml.elements["//author-name"].text
|
1925
|
+
|
1926
|
+
assert_equal "1", xml.elements["//id"].text
|
1927
|
+
assert_equal "integer" , xml.elements["//id"].attributes['type']
|
1928
|
+
|
1929
|
+
assert_equal "1", xml.elements["//replies-count"].text
|
1930
|
+
assert_equal "integer" , xml.elements["//replies-count"].attributes['type']
|
1931
|
+
|
1932
|
+
assert_equal written_on_in_current_timezone, xml.elements["//written-on"].text
|
1933
|
+
assert_equal "datetime" , xml.elements["//written-on"].attributes['type']
|
1934
|
+
|
1935
|
+
assert_equal "--- Have a nice day\n" , xml.elements["//content"].text
|
1936
|
+
assert_equal "yaml" , xml.elements["//content"].attributes['type']
|
1937
|
+
|
1938
|
+
assert_equal "david@loudthinking.com", xml.elements["//author-email-address"].text
|
1939
|
+
|
1940
|
+
assert_equal nil, xml.elements["//parent-id"].text
|
1941
|
+
assert_equal "integer", xml.elements["//parent-id"].attributes['type']
|
1942
|
+
assert_equal "true", xml.elements["//parent-id"].attributes['nil']
|
1943
|
+
|
1944
|
+
if current_adapter?(:SybaseAdapter, :OracleAdapter)
|
1945
|
+
assert_equal last_read_in_current_timezone, xml.elements["//last-read"].text
|
1946
|
+
assert_equal "datetime" , xml.elements["//last-read"].attributes['type']
|
1947
|
+
else
|
1948
|
+
assert_equal "2004-04-15", xml.elements["//last-read"].text
|
1949
|
+
assert_equal "date" , xml.elements["//last-read"].attributes['type']
|
1950
|
+
end
|
1951
|
+
|
1952
|
+
# Oracle and DB2 don't have true boolean or time-only fields
|
1953
|
+
unless current_adapter?(:OracleAdapter, :DB2Adapter)
|
1954
|
+
assert_equal "false", xml.elements["//approved"].text
|
1955
|
+
assert_equal "boolean" , xml.elements["//approved"].attributes['type']
|
1956
|
+
|
1957
|
+
assert_equal bonus_time_in_current_timezone, xml.elements["//bonus-time"].text
|
1958
|
+
assert_equal "datetime" , xml.elements["//bonus-time"].attributes['type']
|
1959
|
+
end
|
1960
|
+
end
|
1961
|
+
|
1962
|
+
def test_to_xml_skipping_attributes
|
1963
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :replies_count])
|
1964
|
+
assert_equal "<topic>", xml.first(7)
|
1965
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1966
|
+
assert xml.include?(%(<author-name>David</author-name>))
|
1967
|
+
|
1968
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :except => [:title, :author_name, :replies_count])
|
1969
|
+
assert !xml.include?(%(<title>The First Topic</title>))
|
1970
|
+
assert !xml.include?(%(<author-name>David</author-name>))
|
1971
|
+
end
|
1972
|
+
|
1973
|
+
def test_to_xml_including_has_many_association
|
1974
|
+
xml = topics(:first).to_xml(:indent => 0, :skip_instruct => true, :include => :replies, :except => :replies_count)
|
1975
|
+
assert_equal "<topic>", xml.first(7)
|
1976
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1977
|
+
assert xml.include?(%(<title>The Second Topic of the day</title>))
|
1978
|
+
end
|
1979
|
+
|
1980
|
+
def test_array_to_xml_including_has_many_association
|
1981
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :include => :replies)
|
1982
|
+
assert xml.include?(%(<replies type="array"><reply>))
|
1983
|
+
end
|
1984
|
+
|
1985
|
+
def test_array_to_xml_including_methods
|
1986
|
+
xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :methods => [ :topic_id ])
|
1987
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:first).topic_id}</topic-id>)), xml
|
1988
|
+
assert xml.include?(%(<topic-id type="integer">#{topics(:second).topic_id}</topic-id>)), xml
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
def test_array_to_xml_including_has_one_association
|
1992
|
+
xml = [ companies(:first_firm), companies(:rails_core) ].to_xml(:indent => 0, :skip_instruct => true, :include => :account)
|
1993
|
+
assert xml.include?(companies(:first_firm).account.to_xml(:indent => 0, :skip_instruct => true))
|
1994
|
+
assert xml.include?(companies(:rails_core).account.to_xml(:indent => 0, :skip_instruct => true))
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
def test_array_to_xml_including_belongs_to_association
|
1998
|
+
xml = [ companies(:first_client), companies(:second_client), companies(:another_client) ].to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
1999
|
+
assert xml.include?(companies(:first_client).to_xml(:indent => 0, :skip_instruct => true))
|
2000
|
+
assert xml.include?(companies(:second_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
2001
|
+
assert xml.include?(companies(:another_client).firm.to_xml(:indent => 0, :skip_instruct => true))
|
2002
|
+
end
|
2003
|
+
|
2004
|
+
def test_to_xml_including_belongs_to_association
|
2005
|
+
xml = companies(:first_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
2006
|
+
assert !xml.include?("<firm>")
|
2007
|
+
|
2008
|
+
xml = companies(:second_client).to_xml(:indent => 0, :skip_instruct => true, :include => :firm)
|
2009
|
+
assert xml.include?("<firm>")
|
2010
|
+
end
|
2011
|
+
|
2012
|
+
def test_to_xml_including_multiple_associations
|
2013
|
+
xml = companies(:first_firm).to_xml(:indent => 0, :skip_instruct => true, :include => [ :clients, :account ])
|
2014
|
+
assert_equal "<firm>", xml.first(6)
|
2015
|
+
assert xml.include?(%(<account>))
|
2016
|
+
assert xml.include?(%(<clients type="array"><client>))
|
2017
|
+
end
|
2018
|
+
|
2019
|
+
def test_to_xml_including_multiple_associations_with_options
|
2020
|
+
xml = companies(:first_firm).to_xml(
|
2021
|
+
:indent => 0, :skip_instruct => true,
|
2022
|
+
:include => { :clients => { :only => :name } }
|
2023
|
+
)
|
2024
|
+
|
2025
|
+
assert_equal "<firm>", xml.first(6)
|
2026
|
+
assert xml.include?(%(<client><name>Summit</name></client>))
|
2027
|
+
assert xml.include?(%(<clients type="array"><client>))
|
2028
|
+
end
|
2029
|
+
|
2030
|
+
def test_to_xml_including_methods
|
2031
|
+
xml = Company.new.to_xml(:methods => :arbitrary_method, :skip_instruct => true)
|
2032
|
+
assert_equal "<company>", xml.first(9)
|
2033
|
+
assert xml.include?(%(<arbitrary-method>I am Jack's profound disappointment</arbitrary-method>))
|
2034
|
+
end
|
2035
|
+
|
2036
|
+
def test_to_xml_with_block
|
2037
|
+
value = "Rockin' the block"
|
2038
|
+
xml = Company.new.to_xml(:skip_instruct => true) do |xml|
|
2039
|
+
xml.tag! "arbitrary-element", value
|
2040
|
+
end
|
2041
|
+
assert_equal "<company>", xml.first(9)
|
2042
|
+
assert xml.include?(%(<arbitrary-element>#{value}</arbitrary-element>))
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
def test_type_name_with_module_should_handle_beginning
|
2046
|
+
assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person')
|
2047
|
+
assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person')
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
def test_to_param_should_return_string
|
2051
|
+
assert_kind_of String, Client.find(:first).to_param
|
2052
|
+
end
|
2053
|
+
|
2054
|
+
def test_inspect_class
|
2055
|
+
assert_equal 'ActiveRecord::Base', ActiveRecord::Base.inspect
|
2056
|
+
assert_equal 'LoosePerson(abstract)', LoosePerson.inspect
|
2057
|
+
assert_match(/^Topic\(id: integer, title: string/, Topic.inspect)
|
2058
|
+
end
|
2059
|
+
|
2060
|
+
def test_inspect_instance
|
2061
|
+
topic = topics(:first)
|
2062
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic", author_name: "David", author_email_address: "david@loudthinking.com", written_on: "#{topic.written_on.to_s(:db)}", bonus_time: "#{topic.bonus_time.to_s(:db)}", last_read: "#{topic.last_read.to_s(:db)}", content: "Have a nice day", approved: false, replies_count: 1, parent_id: nil, parent_title: nil, type: nil>), topic.inspect
|
2063
|
+
end
|
2064
|
+
|
2065
|
+
def test_inspect_new_instance
|
2066
|
+
assert_match /Topic id: nil/, Topic.new.inspect
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
def test_inspect_limited_select_instance
|
2070
|
+
assert_equal %(#<Topic id: 1>), Topic.find(:first, :select => 'id', :conditions => 'id = 1').inspect
|
2071
|
+
assert_equal %(#<Topic id: 1, title: "The First Topic">), Topic.find(:first, :select => 'id, title', :conditions => 'id = 1').inspect
|
2072
|
+
end
|
2073
|
+
|
2074
|
+
def test_inspect_class_without_table
|
2075
|
+
assert_equal "NonExistentTable(Table doesn't exist)", NonExistentTable.inspect
|
2076
|
+
end
|
2077
|
+
|
2078
|
+
def test_attribute_for_inspect
|
2079
|
+
t = topics(:first)
|
2080
|
+
t.title = "The First Topic Now Has A Title With\nNewlines And More Than 50 Characters"
|
2081
|
+
|
2082
|
+
assert_equal %("#{t.written_on.to_s(:db)}"), t.attribute_for_inspect(:written_on)
|
2083
|
+
assert_equal '"The First Topic Now Has A Title With\nNewlines And M..."', t.attribute_for_inspect(:title)
|
2084
|
+
end
|
2085
|
+
|
2086
|
+
def test_becomes
|
2087
|
+
assert_kind_of Reply, topics(:first).becomes(Reply)
|
2088
|
+
assert_equal "The First Topic", topics(:first).becomes(Reply).title
|
2089
|
+
end
|
2090
|
+
|
2091
|
+
def test_silence_sets_log_level_to_error_in_block
|
2092
|
+
original_logger = ActiveRecord::Base.logger
|
2093
|
+
log = StringIO.new
|
2094
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
2095
|
+
ActiveRecord::Base.logger.level = Logger::DEBUG
|
2096
|
+
ActiveRecord::Base.silence do
|
2097
|
+
ActiveRecord::Base.logger.warn "warn"
|
2098
|
+
ActiveRecord::Base.logger.error "error"
|
2099
|
+
end
|
2100
|
+
assert_equal "error\n", log.string
|
2101
|
+
ensure
|
2102
|
+
ActiveRecord::Base.logger = original_logger
|
2103
|
+
end
|
2104
|
+
|
2105
|
+
def test_silence_sets_log_level_back_to_level_before_yield
|
2106
|
+
original_logger = ActiveRecord::Base.logger
|
2107
|
+
log = StringIO.new
|
2108
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
2109
|
+
ActiveRecord::Base.logger.level = Logger::WARN
|
2110
|
+
ActiveRecord::Base.silence do
|
2111
|
+
end
|
2112
|
+
assert_equal Logger::WARN, ActiveRecord::Base.logger.level
|
2113
|
+
ensure
|
2114
|
+
ActiveRecord::Base.logger = original_logger
|
2115
|
+
end
|
2116
|
+
|
2117
|
+
def test_benchmark_with_log_level
|
2118
|
+
original_logger = ActiveRecord::Base.logger
|
2119
|
+
log = StringIO.new
|
2120
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
2121
|
+
ActiveRecord::Base.logger.level = Logger::WARN
|
2122
|
+
ActiveRecord::Base.benchmark("Debug Topic Count", Logger::DEBUG) { Topic.count }
|
2123
|
+
ActiveRecord::Base.benchmark("Warn Topic Count", Logger::WARN) { Topic.count }
|
2124
|
+
ActiveRecord::Base.benchmark("Error Topic Count", Logger::ERROR) { Topic.count }
|
2125
|
+
assert_no_match /Debug Topic Count/, log.string
|
2126
|
+
assert_match /Warn Topic Count/, log.string
|
2127
|
+
assert_match /Error Topic Count/, log.string
|
2128
|
+
ensure
|
2129
|
+
ActiveRecord::Base.logger = original_logger
|
2130
|
+
end
|
2131
|
+
|
2132
|
+
def test_benchmark_with_use_silence
|
2133
|
+
original_logger = ActiveRecord::Base.logger
|
2134
|
+
log = StringIO.new
|
2135
|
+
ActiveRecord::Base.logger = Logger.new(log)
|
2136
|
+
ActiveRecord::Base.benchmark("Logging", Logger::DEBUG, true) { ActiveRecord::Base.logger.debug "Loud" }
|
2137
|
+
ActiveRecord::Base.benchmark("Logging", Logger::DEBUG, false) { ActiveRecord::Base.logger.debug "Quiet" }
|
2138
|
+
assert_no_match /Loud/, log.string
|
2139
|
+
assert_match /Quiet/, log.string
|
2140
|
+
ensure
|
2141
|
+
ActiveRecord::Base.logger = original_logger
|
2142
|
+
end
|
2143
|
+
|
2144
|
+
def test_create_with_custom_timestamps
|
2145
|
+
custom_datetime = 1.hour.ago.beginning_of_day
|
2146
|
+
|
2147
|
+
%w(created_at created_on updated_at updated_on).each do |attribute|
|
2148
|
+
parrot = LiveParrot.create(:name => "colombian", attribute => custom_datetime)
|
2149
|
+
assert_equal custom_datetime, parrot[attribute]
|
2150
|
+
end
|
2151
|
+
end
|
2152
|
+
end
|