kajam 1.0.3.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kajam might be problematic. Click here for more details.

Files changed (2635) hide show
  1. data/.gitignore +20 -0
  2. data/INSTALL +35 -0
  3. data/LICENSE +21 -0
  4. data/README +84 -0
  5. data/Rakefile +11 -0
  6. data/app/controllers/admin/configuration_controller.rb +50 -0
  7. data/app/controllers/admin/extensions_controller.rb +11 -0
  8. data/app/controllers/admin/layouts_controller.rb +8 -0
  9. data/app/controllers/admin/page_fields_controller.rb +9 -0
  10. data/app/controllers/admin/page_parts_controller.rb +9 -0
  11. data/app/controllers/admin/pages_controller.rb +79 -0
  12. data/app/controllers/admin/preferences_controller.rb +46 -0
  13. data/app/controllers/admin/references_controller.rb +7 -0
  14. data/app/controllers/admin/resource_controller.rb +242 -0
  15. data/app/controllers/admin/snippets_controller.rb +8 -0
  16. data/app/controllers/admin/users_controller.rb +40 -0
  17. data/app/controllers/admin/welcome_controller.rb +48 -0
  18. data/app/controllers/application_controller.rb +87 -0
  19. data/app/controllers/site_controller.rb +77 -0
  20. data/app/helpers/admin/configuration_helper.rb +80 -0
  21. data/app/helpers/admin/export_helper.rb +2 -0
  22. data/app/helpers/admin/extensions_helper.rb +2 -0
  23. data/app/helpers/admin/layouts_helper.rb +21 -0
  24. data/app/helpers/admin/node_helper.rb +133 -0
  25. data/app/helpers/admin/pages_helper.rb +117 -0
  26. data/app/helpers/admin/preferences_helper.rb +3 -0
  27. data/app/helpers/admin/references_helper.rb +44 -0
  28. data/app/helpers/admin/regions_helper.rb +28 -0
  29. data/app/helpers/admin/snippets_helper.rb +41 -0
  30. data/app/helpers/admin/users_helper.rb +8 -0
  31. data/app/helpers/admin/welcome_helper.rb +2 -0
  32. data/app/helpers/application_helper.rb +236 -0
  33. data/app/helpers/site_helper.rb +2 -0
  34. data/app/models/deprecated_tags.rb +34 -0
  35. data/app/models/file_not_found_page.rb +32 -0
  36. data/app/models/kajam/config.rb +305 -0
  37. data/app/models/layout.rb +15 -0
  38. data/app/models/page.rb +363 -0
  39. data/app/models/page_context.rb +46 -0
  40. data/app/models/page_field.rb +3 -0
  41. data/app/models/page_part.rb +20 -0
  42. data/app/models/snippet.rb +23 -0
  43. data/app/models/standard_tags.rb +1364 -0
  44. data/app/models/status.rb +41 -0
  45. data/app/models/text_filter.rb +36 -0
  46. data/app/models/user.rb +97 -0
  47. data/app/models/user_action_observer.rb +25 -0
  48. data/app/views/admin/configuration/edit.html.haml +38 -0
  49. data/app/views/admin/configuration/show.html.haml +58 -0
  50. data/app/views/admin/extensions/index.html.haml +41 -0
  51. data/app/views/admin/layouts/_form.html.haml +39 -0
  52. data/app/views/admin/layouts/edit.html.haml +9 -0
  53. data/app/views/admin/layouts/index.html.haml +36 -0
  54. data/app/views/admin/layouts/new.html.haml +7 -0
  55. data/app/views/admin/layouts/remove.html.haml +16 -0
  56. data/app/views/admin/page_fields/_page_field.html.haml +12 -0
  57. data/app/views/admin/page_parts/_page_part.html.haml +18 -0
  58. data/app/views/admin/pages/_fields.html.haml +71 -0
  59. data/app/views/admin/pages/_meta_row.html.haml +8 -0
  60. data/app/views/admin/pages/_node.html.haml +26 -0
  61. data/app/views/admin/pages/_popups.html.haml +27 -0
  62. data/app/views/admin/pages/children.html.haml +2 -0
  63. data/app/views/admin/pages/edit.html.haml +12 -0
  64. data/app/views/admin/pages/index.html.haml +26 -0
  65. data/app/views/admin/pages/new.html.haml +10 -0
  66. data/app/views/admin/pages/remove.html.haml +18 -0
  67. data/app/views/admin/preferences/edit.html.haml +44 -0
  68. data/app/views/admin/references/_tag_reference.haml +3 -0
  69. data/app/views/admin/references/filters.haml +6 -0
  70. data/app/views/admin/references/tags.haml +30 -0
  71. data/app/views/admin/snippets/_form.html.haml +33 -0
  72. data/app/views/admin/snippets/edit.html.haml +9 -0
  73. data/app/views/admin/snippets/index.html.haml +34 -0
  74. data/app/views/admin/snippets/new.html.haml +7 -0
  75. data/app/views/admin/snippets/remove.html.haml +17 -0
  76. data/app/views/admin/users/_avatar.html.haml +5 -0
  77. data/app/views/admin/users/_form.html.haml +53 -0
  78. data/app/views/admin/users/_password_fields.html.haml +18 -0
  79. data/app/views/admin/users/edit.html.haml +9 -0
  80. data/app/views/admin/users/index.html.haml +39 -0
  81. data/app/views/admin/users/new.html.haml +6 -0
  82. data/app/views/admin/users/remove.html.haml +16 -0
  83. data/app/views/admin/welcome/login.html.haml +23 -0
  84. data/app/views/layouts/application.html.haml +50 -0
  85. data/app/views/site/not_found.html.haml +3 -0
  86. data/bin/kajam +53 -0
  87. data/config/boot.rb +179 -0
  88. data/config/compass.config +18 -0
  89. data/config/cucumber.yml +7 -0
  90. data/config/database.db2.yml +23 -0
  91. data/config/database.mysql.yml +28 -0
  92. data/config/database.postgresql.yml +28 -0
  93. data/config/database.sqlite.yml +19 -0
  94. data/config/database.sqlserver.yml +23 -0
  95. data/config/environment.rb +98 -0
  96. data/config/environments/cucumber.rb +29 -0
  97. data/config/environments/development.rb +17 -0
  98. data/config/environments/production.rb +24 -0
  99. data/config/environments/test.rb +38 -0
  100. data/config/initializers/compass.rb +6 -0
  101. data/config/initializers/haml.rb +2 -0
  102. data/config/initializers/kajam_config.rb +17 -0
  103. data/config/locales/en.yml +238 -0
  104. data/config/locales/en_available_tags.yml +625 -0
  105. data/config/routes.rb +42 -0
  106. data/db/migrate/001_create_kajam_tables.rb +75 -0
  107. data/db/migrate/002_insert_initial_data.rb +12 -0
  108. data/db/migrate/003_rename_behavior_column.rb +9 -0
  109. data/db/migrate/004_rename_filter_column.rb +11 -0
  110. data/db/migrate/005_add_virtual_column_to_page.rb +9 -0
  111. data/db/migrate/006_integer_columns_to_boolean.rb +36 -0
  112. data/db/migrate/007_remove_virtual_column_from_page.rb +9 -0
  113. data/db/migrate/008_add_virtual_column_to_page_again.rb +9 -0
  114. data/db/migrate/009_add_content_type_field_to_layout.rb +9 -0
  115. data/db/migrate/010_merge_behaviors_and_pages.rb +57 -0
  116. data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +9 -0
  117. data/db/migrate/012_create_extension_meta.rb +13 -0
  118. data/db/migrate/013_add_notes_field_to_user.rb +9 -0
  119. data/db/migrate/014_rename_config_default_parts_key.rb +17 -0
  120. data/db/migrate/015_add_optimistic_locking.rb +15 -0
  121. data/db/migrate/016_add_sessions.rb +16 -0
  122. data/db/migrate/017_rename_created_by_updated_by_columns.rb +15 -0
  123. data/db/migrate/018_add_description_and_keywords_to_pages.rb +11 -0
  124. data/db/migrate/019_add_salt_to_users.rb +11 -0
  125. data/db/migrate/020_add_session_info_to_users.rb +11 -0
  126. data/db/migrate/021_remove_session_expire_from_users.rb +9 -0
  127. data/db/migrate/20081203140407_add_indexes.rb +19 -0
  128. data/db/migrate/20090226140109_add_user_language.rb +9 -0
  129. data/db/migrate/20090929164633_rename_developer_role_to_designer.rb +9 -0
  130. data/db/migrate/20091003095744_change_user_language_to_locale.rb +9 -0
  131. data/db/migrate/20100805154952_add_page_fields.rb +15 -0
  132. data/db/migrate/20100805155020_convert_page_metas.rb +15 -0
  133. data/db/migrate/20100810151922_add_field_name_index.rb +11 -0
  134. data/db/schema.rb +141 -0
  135. data/features/admin/configuration.feature +38 -0
  136. data/features/admin/content_negotiation.feature +24 -0
  137. data/features/admin/layouts_management.feature +10 -0
  138. data/features/admin/pages_management.feature +78 -0
  139. data/features/admin/resource_pagination.feature +27 -0
  140. data/features/admin/snippets_management.feature +57 -0
  141. data/features/admin/user_permissions.feature +156 -0
  142. data/features/admin/user_preferences.feature +35 -0
  143. data/features/admin/users_management.feature +62 -0
  144. data/features/navigation_rendering.feature +30 -0
  145. data/features/page_serving.feature +42 -0
  146. data/features/step_definitions/admin/admin_steps.rb +38 -0
  147. data/features/step_definitions/admin/content_negotiation_steps.rb +50 -0
  148. data/features/step_definitions/admin/pages_management_steps.rb +28 -0
  149. data/features/step_definitions/admin/pagination_steps.rb +44 -0
  150. data/features/step_definitions/admin/users_management_steps.rb +15 -0
  151. data/features/step_definitions/page_serving_steps.rb +62 -0
  152. data/features/step_definitions/web_steps.rb +273 -0
  153. data/features/support/dataset.rb +13 -0
  154. data/features/support/datasets_loader.rb +3 -0
  155. data/features/support/env.rb +60 -0
  156. data/features/support/matchers.rb +3 -0
  157. data/features/support/paths.rb +74 -0
  158. data/kajam.gemspec +43 -0
  159. data/lib/annotatable.rb +68 -0
  160. data/lib/autotest/discover.rb +3 -0
  161. data/lib/autotest/kajam_rails_rspec.rb +111 -0
  162. data/lib/generators/extension/USAGE +30 -0
  163. data/lib/generators/extension/extension_generator.rb +99 -0
  164. data/lib/generators/extension/templates/README +6 -0
  165. data/lib/generators/extension/templates/RSpecRakefile +109 -0
  166. data/lib/generators/extension/templates/Rakefile +25 -0
  167. data/lib/generators/extension/templates/cucumber.yml +1 -0
  168. data/lib/generators/extension/templates/cucumber_env.rb +11 -0
  169. data/lib/generators/extension/templates/cucumber_paths.rb +22 -0
  170. data/lib/generators/extension/templates/en.yml +3 -0
  171. data/lib/generators/extension/templates/extension.rb +23 -0
  172. data/lib/generators/extension/templates/functional_test.rb +15 -0
  173. data/lib/generators/extension/templates/gemspec.rb +29 -0
  174. data/lib/generators/extension/templates/kajam_config.rb +3 -0
  175. data/lib/generators/extension/templates/lib.rb +2 -0
  176. data/lib/generators/extension/templates/migration.rb +9 -0
  177. data/lib/generators/extension/templates/routes.rb +5 -0
  178. data/lib/generators/extension/templates/spec.opts +6 -0
  179. data/lib/generators/extension/templates/spec_helper.rb +36 -0
  180. data/lib/generators/extension/templates/tasks.rake +55 -0
  181. data/lib/generators/extension/templates/test_helper.rb +26 -0
  182. data/lib/generators/extension/templates/version.rb +3 -0
  183. data/lib/generators/extension_controller/USAGE +36 -0
  184. data/lib/generators/extension_controller/extension_controller_generator.rb +84 -0
  185. data/lib/generators/extension_controller/templates/controller.rb +10 -0
  186. data/lib/generators/extension_controller/templates/controller_spec.rb +23 -0
  187. data/lib/generators/extension_controller/templates/functional_test.rb +11 -0
  188. data/lib/generators/extension_controller/templates/helper.rb +2 -0
  189. data/lib/generators/extension_controller/templates/helper_spec.rb +11 -0
  190. data/lib/generators/extension_controller/templates/helper_test.rb +4 -0
  191. data/lib/generators/extension_controller/templates/view.html.erb +2 -0
  192. data/lib/generators/extension_controller/templates/view_spec.rb +12 -0
  193. data/lib/generators/extension_mailer/USAGE +17 -0
  194. data/lib/generators/extension_mailer/extension_mailer_generator.rb +68 -0
  195. data/lib/generators/extension_mailer/templates/fixture.erb +3 -0
  196. data/lib/generators/extension_mailer/templates/mailer.rb +15 -0
  197. data/lib/generators/extension_mailer/templates/unit_test.rb +21 -0
  198. data/lib/generators/extension_mailer/templates/view.erb +3 -0
  199. data/lib/generators/extension_migration/USAGE +34 -0
  200. data/lib/generators/extension_migration/extension_migration_generator.rb +25 -0
  201. data/lib/generators/extension_migration/templates/migration.rb +11 -0
  202. data/lib/generators/extension_model/USAGE +35 -0
  203. data/lib/generators/extension_model/extension_model_generator.rb +68 -0
  204. data/lib/generators/extension_model/templates/fixtures.yml +19 -0
  205. data/lib/generators/extension_model/templates/migration.rb +16 -0
  206. data/lib/generators/extension_model/templates/model.rb +2 -0
  207. data/lib/generators/extension_model/templates/model_spec.rb +11 -0
  208. data/lib/generators/extension_model/templates/unit_test.rb +8 -0
  209. data/lib/generators/generator_base_extension.rb +16 -0
  210. data/lib/generators/instance/instance_generator.rb +119 -0
  211. data/lib/generators/instance/templates/databases/db2.yml +40 -0
  212. data/lib/generators/instance/templates/databases/mysql.yml +47 -0
  213. data/lib/generators/instance/templates/databases/postgresql.yml +44 -0
  214. data/lib/generators/instance/templates/databases/sqlite3.yml +16 -0
  215. data/lib/generators/instance/templates/databases/sqlserver.yml +21 -0
  216. data/lib/generators/instance/templates/instance_boot.rb +179 -0
  217. data/lib/generators/instance/templates/instance_environment.rb +93 -0
  218. data/lib/generators/instance/templates/instance_generate +18 -0
  219. data/lib/generators/instance/templates/instance_kajam_config.rb +16 -0
  220. data/lib/generators/instance/templates/instance_rakefile +3 -0
  221. data/lib/generators/instance/templates/instance_routes.rb +1 -0
  222. data/lib/generators/language_extension/USAGE +27 -0
  223. data/lib/generators/language_extension/language_extension_generator.rb +49 -0
  224. data/lib/generators/language_extension/templates/README +3 -0
  225. data/lib/generators/language_extension/templates/RSpecRakefile +123 -0
  226. data/lib/generators/language_extension/templates/Rakefile +25 -0
  227. data/lib/generators/language_extension/templates/available_tags.yml +553 -0
  228. data/lib/generators/language_extension/templates/cucumber.yml +1 -0
  229. data/lib/generators/language_extension/templates/cucumber_env.rb +16 -0
  230. data/lib/generators/language_extension/templates/cucumber_paths.rb +14 -0
  231. data/lib/generators/language_extension/templates/extension.rb +8 -0
  232. data/lib/generators/language_extension/templates/functional_test.rb +15 -0
  233. data/lib/generators/language_extension/templates/lang.yml +181 -0
  234. data/lib/generators/language_extension/templates/spec.opts +6 -0
  235. data/lib/generators/language_extension/templates/spec_helper.rb +36 -0
  236. data/lib/generators/language_extension/templates/tasks.rake +28 -0
  237. data/lib/generators/language_extension/templates/test_helper.rb +26 -0
  238. data/lib/inheritable_class_attributes.rb +65 -0
  239. data/lib/kajam.rb +19 -0
  240. data/lib/kajam/admin_ui.rb +258 -0
  241. data/lib/kajam/admin_ui/region_partials.rb +18 -0
  242. data/lib/kajam/admin_ui/region_set.rb +35 -0
  243. data/lib/kajam/available_locales.rb +31 -0
  244. data/lib/kajam/cache.rb +99 -0
  245. data/lib/kajam/config/definition.rb +142 -0
  246. data/lib/kajam/extension.rb +151 -0
  247. data/lib/kajam/extension/script.rb +393 -0
  248. data/lib/kajam/extension_gem.rb +12 -0
  249. data/lib/kajam/extension_loader.rb +174 -0
  250. data/lib/kajam/extension_locator.rb +25 -0
  251. data/lib/kajam/extension_migrator.rb +98 -0
  252. data/lib/kajam/gem_dependency_fix.rb +21 -0
  253. data/lib/kajam/gem_locator.rb +28 -0
  254. data/lib/kajam/initializer.rb +319 -0
  255. data/lib/kajam/pagination/controller.rb +35 -0
  256. data/lib/kajam/pagination/link_renderer.rb +34 -0
  257. data/lib/kajam/resource_responses.rb +115 -0
  258. data/lib/kajam/setup.rb +224 -0
  259. data/lib/kajam/taggable.rb +132 -0
  260. data/lib/local_time.rb +8 -0
  261. data/lib/login_system.rb +128 -0
  262. data/lib/method_observer.rb +50 -0
  263. data/lib/plugins/active_record_extensions/init.rb +1 -0
  264. data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +28 -0
  265. data/lib/plugins/extension_patches/init.rb +1 -0
  266. data/lib/plugins/extension_patches/lib/routing_extension.rb +31 -0
  267. data/lib/plugins/object_extensions/init.rb +1 -0
  268. data/lib/plugins/object_extensions/lib/object_extensions.rb +8 -0
  269. data/lib/plugins/response_cache_timeout/init.rb +3 -0
  270. data/lib/plugins/string_extensions/init.rb +1 -0
  271. data/lib/plugins/string_extensions/lib/string_extensions.rb +23 -0
  272. data/lib/plugins/symbol_extensions/init.rb +1 -0
  273. data/lib/plugins/symbol_extensions/lib/symbol_extensions.rb +5 -0
  274. data/lib/simpleton.rb +21 -0
  275. data/lib/task_support.rb +64 -0
  276. data/lib/tasks/ci.rake +9 -0
  277. data/lib/tasks/cucumber.rake +47 -0
  278. data/lib/tasks/database.rake +33 -0
  279. data/lib/tasks/environments.rake +11 -0
  280. data/lib/tasks/extensions.rake +97 -0
  281. data/lib/tasks/framework.rake +223 -0
  282. data/lib/tasks/instance.rake +23 -0
  283. data/lib/tasks/kajam_config.rake +18 -0
  284. data/lib/tasks/prototype.rake +31 -0
  285. data/lib/tasks/release.rake +130 -0
  286. data/lib/tasks/rspec.rake +221 -0
  287. data/lib/tasks/translate.rake +59 -0
  288. data/lib/tasks/undefine.rake +28 -0
  289. data/lib/translation_support.rb +54 -0
  290. data/log/.keep +0 -0
  291. data/public/.htaccess +40 -0
  292. data/public/404.html +8 -0
  293. data/public/500.html +8 -0
  294. data/public/dispatch.cgi +10 -0
  295. data/public/dispatch.fcgi +24 -0
  296. data/public/dispatch.rb +10 -0
  297. data/public/favicon.ico +0 -0
  298. data/public/images/admin/add_tab.png +0 -0
  299. data/public/images/admin/avatar_32x32.png +0 -0
  300. data/public/images/admin/avatar_64x64.png +0 -0
  301. data/public/images/admin/avatar_96x96.png +0 -0
  302. data/public/images/admin/brown_bottom_line.gif +0 -0
  303. data/public/images/admin/calendar_down.gif +0 -0
  304. data/public/images/admin/collapse.png +0 -0
  305. data/public/images/admin/draft_page.png +0 -0
  306. data/public/images/admin/expand.png +0 -0
  307. data/public/images/admin/image.png +0 -0
  308. data/public/images/admin/javascript.png +0 -0
  309. data/public/images/admin/layout.png +0 -0
  310. data/public/images/admin/metadata_toggle.png +0 -0
  311. data/public/images/admin/minus.png +0 -0
  312. data/public/images/admin/minus_disabled.png +0 -0
  313. data/public/images/admin/minus_grey.png +0 -0
  314. data/public/images/admin/navigation_secondary_separator.gif +0 -0
  315. data/public/images/admin/page.png +0 -0
  316. data/public/images/admin/plus.png +0 -0
  317. data/public/images/admin/plus_disabled.png +0 -0
  318. data/public/images/admin/plus_grey.png +0 -0
  319. data/public/images/admin/popup_border_background.png +0 -0
  320. data/public/images/admin/popup_border_bottom_left.png +0 -0
  321. data/public/images/admin/popup_border_bottom_right.png +0 -0
  322. data/public/images/admin/popup_border_top_left.png +0 -0
  323. data/public/images/admin/popup_border_top_right.png +0 -0
  324. data/public/images/admin/search.png +0 -0
  325. data/public/images/admin/single_form_shadow.png +0 -0
  326. data/public/images/admin/snippet.png +0 -0
  327. data/public/images/admin/spinner.gif +0 -0
  328. data/public/images/admin/status_background.png +0 -0
  329. data/public/images/admin/status_bottom_left.png +0 -0
  330. data/public/images/admin/status_bottom_right.png +0 -0
  331. data/public/images/admin/status_spinner.gif +0 -0
  332. data/public/images/admin/status_top_left.png +0 -0
  333. data/public/images/admin/status_top_right.png +0 -0
  334. data/public/images/admin/stylesheet.png +0 -0
  335. data/public/images/admin/tab_close.png +0 -0
  336. data/public/images/admin/upload.png +0 -0
  337. data/public/images/admin/virtual_page.png +0 -0
  338. data/public/images/kajam/kajam-badge-color.png +0 -0
  339. data/public/javascripts/admin/application.js +94 -0
  340. data/public/javascripts/admin/codearea.js +165 -0
  341. data/public/javascripts/admin/controls.js +965 -0
  342. data/public/javascripts/admin/cookie.js +80 -0
  343. data/public/javascripts/admin/dateinput.js +402 -0
  344. data/public/javascripts/admin/dragdrop.js +974 -0
  345. data/public/javascripts/admin/dropdown.js +216 -0
  346. data/public/javascripts/admin/effects.js +1122 -0
  347. data/public/javascripts/admin/lowpro.js +340 -0
  348. data/public/javascripts/admin/overrides.js +1 -0
  349. data/public/javascripts/admin/page_preview.js +41 -0
  350. data/public/javascripts/admin/pagefield.js +54 -0
  351. data/public/javascripts/admin/pagestatus.js +17 -0
  352. data/public/javascripts/admin/popup.js +339 -0
  353. data/public/javascripts/admin/prototype.js +4874 -0
  354. data/public/javascripts/admin/ruledtable.js +13 -0
  355. data/public/javascripts/admin/shortcuts.js +27 -0
  356. data/public/javascripts/admin/sitemap.js +149 -0
  357. data/public/javascripts/admin/status.js +233 -0
  358. data/public/javascripts/admin/tabcontrol.js +123 -0
  359. data/public/javascripts/admin/toggle.js +430 -0
  360. data/public/javascripts/admin/utility.js +53 -0
  361. data/public/javascripts/admin/validationerror.js +18 -0
  362. data/public/loading-iframe.html +11 -0
  363. data/public/robots.txt +1 -0
  364. data/public/stylesheets/admin/base.css +1 -0
  365. data/public/stylesheets/admin/main.css +1 -0
  366. data/public/stylesheets/admin/overrides.css +0 -0
  367. data/public/stylesheets/sass/admin/_base.sass +17 -0
  368. data/public/stylesheets/sass/admin/main.sass +27 -0
  369. data/public/stylesheets/sass/admin/modules/_boxes.sass +6 -0
  370. data/public/stylesheets/sass/admin/modules/_links.sass +18 -0
  371. data/public/stylesheets/sass/admin/overrides.sass +2 -0
  372. data/public/stylesheets/sass/admin/partials/_actions.sass +96 -0
  373. data/public/stylesheets/sass/admin/partials/_avatars.sass +10 -0
  374. data/public/stylesheets/sass/admin/partials/_content.sass +58 -0
  375. data/public/stylesheets/sass/admin/partials/_dateinput.sass +62 -0
  376. data/public/stylesheets/sass/admin/partials/_deprecated.sass +55 -0
  377. data/public/stylesheets/sass/admin/partials/_dropdown.sass +28 -0
  378. data/public/stylesheets/sass/admin/partials/_footer.sass +12 -0
  379. data/public/stylesheets/sass/admin/partials/_forms.sass +322 -0
  380. data/public/stylesheets/sass/admin/partials/_header.sass +114 -0
  381. data/public/stylesheets/sass/admin/partials/_index.sass +147 -0
  382. data/public/stylesheets/sass/admin/partials/_layout.sass +10 -0
  383. data/public/stylesheets/sass/admin/partials/_messages.sass +10 -0
  384. data/public/stylesheets/sass/admin/partials/_popup.sass +213 -0
  385. data/public/stylesheets/sass/admin/partials/_tabcontrol.sass +72 -0
  386. data/public/stylesheets/sass/admin/partials/_toolbar.sass +31 -0
  387. data/public/stylesheets/sass/admin/partials/_typography.sass +60 -0
  388. data/public/stylesheets/sass/admin/partials/_validations.sass +19 -0
  389. data/script/about +3 -0
  390. data/script/autospec +5 -0
  391. data/script/breakpointer +3 -0
  392. data/script/console +3 -0
  393. data/script/cucumber +10 -0
  394. data/script/dbconsole +3 -0
  395. data/script/destroy +3 -0
  396. data/script/extension +5 -0
  397. data/script/generate +4 -0
  398. data/script/performance/benchmarker +3 -0
  399. data/script/performance/profiler +3 -0
  400. data/script/performance/request +3 -0
  401. data/script/plugin +3 -0
  402. data/script/process/inspector +3 -0
  403. data/script/process/reaper +3 -0
  404. data/script/process/spawner +3 -0
  405. data/script/process/spinner +3 -0
  406. data/script/runner +3 -0
  407. data/script/server +3 -0
  408. data/script/spec +5 -0
  409. data/script/spec_server +116 -0
  410. data/script/version +5 -0
  411. data/spec/controllers/admin/extensions_controller_spec.rb +36 -0
  412. data/spec/controllers/admin/layouts_controller_spec.rb +102 -0
  413. data/spec/controllers/admin/page_fields_controller_spec.rb +17 -0
  414. data/spec/controllers/admin/pages_controller_spec.rb +341 -0
  415. data/spec/controllers/admin/paginated_controller_spec.rb +26 -0
  416. data/spec/controllers/admin/preferences_controller_spec.rb +57 -0
  417. data/spec/controllers/admin/references_controller_spec.rb +15 -0
  418. data/spec/controllers/admin/snippets_controller_spec.rb +110 -0
  419. data/spec/controllers/admin/users_controller_spec.rb +101 -0
  420. data/spec/controllers/admin/welcome_controller_spec.rb +98 -0
  421. data/spec/controllers/application_controller_spec.rb +88 -0
  422. data/spec/controllers/site_controller_spec.rb +182 -0
  423. data/spec/datasets/config_dataset.rb +13 -0
  424. data/spec/datasets/file_not_found_dataset.rb +22 -0
  425. data/spec/datasets/home_page_dataset.rb +62 -0
  426. data/spec/datasets/layouts_dataset.rb +58 -0
  427. data/spec/datasets/markup_pages_dataset.rb +13 -0
  428. data/spec/datasets/pages_dataset.rb +65 -0
  429. data/spec/datasets/pages_with_layouts_dataset.rb +10 -0
  430. data/spec/datasets/snippets_dataset.rb +38 -0
  431. data/spec/datasets/users_and_pages_dataset.rb +9 -0
  432. data/spec/datasets/users_dataset.rb +56 -0
  433. data/spec/fixtures/bad_settings.rb +5 -0
  434. data/spec/fixtures/example_extension/README +3 -0
  435. data/spec/fixtures/example_extension/Rakefile +120 -0
  436. data/spec/fixtures/example_extension/example_extension.rb +21 -0
  437. data/spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake +28 -0
  438. data/spec/fixtures/example_extension/spec/spec.opts +6 -0
  439. data/spec/fixtures/example_extension/spec/spec_helper.rb +36 -0
  440. data/spec/fixtures/invalid_config.yml +11 -0
  441. data/spec/fixtures/kajam_config.yml +10 -0
  442. data/spec/fixtures/more_settings.rb +8 -0
  443. data/spec/fixtures/sample.txt +1 -0
  444. data/spec/fixtures/settings.rb +5 -0
  445. data/spec/generators/extension_controller_generator_spec.rb +97 -0
  446. data/spec/generators/extension_generator_spec.rb +237 -0
  447. data/spec/generators/extension_generators_spec_helper.rb +164 -0
  448. data/spec/generators/extension_mailer_generator_spec.rb +62 -0
  449. data/spec/generators/extension_migration_generator_spec.rb +22 -0
  450. data/spec/generators/extension_model_generator_spec.rb +63 -0
  451. data/spec/generators/instance_generator_spec.rb +159 -0
  452. data/spec/helpers/admin/export_helper_spec.rb +4 -0
  453. data/spec/helpers/admin/extensions_helper_spec.rb +4 -0
  454. data/spec/helpers/admin/layouts_helper_spec.rb +4 -0
  455. data/spec/helpers/admin/node_helper_spec.rb +160 -0
  456. data/spec/helpers/admin/pages_helper_spec.rb +66 -0
  457. data/spec/helpers/admin/preferences_helper_spec.rb +11 -0
  458. data/spec/helpers/admin/references_helper_spec.rb +124 -0
  459. data/spec/helpers/admin/regions_helper_spec.rb +47 -0
  460. data/spec/helpers/admin/snippets_helper_spec.rb +4 -0
  461. data/spec/helpers/admin/users_helper_spec.rb +11 -0
  462. data/spec/helpers/admin/welcome_helper_spec.rb +4 -0
  463. data/spec/helpers/application_helper_spec.rb +256 -0
  464. data/spec/helpers/site_helper_spec.rb +4 -0
  465. data/spec/lib/annotatable_spec.rb +86 -0
  466. data/spec/lib/autotest_spec.rb +81 -0
  467. data/spec/lib/core_ext/string_ext_spec.rb +11 -0
  468. data/spec/lib/inheritable_class_attributes_spec.rb +90 -0
  469. data/spec/lib/kajam/admin_ui/nav_tabs_spec.rb +139 -0
  470. data/spec/lib/kajam/admin_ui/region_partials_spec.rb +35 -0
  471. data/spec/lib/kajam/admin_ui/region_set_spec.rb +61 -0
  472. data/spec/lib/kajam/admin_ui_spec.rb +121 -0
  473. data/spec/lib/kajam/available_locales_spec.rb +13 -0
  474. data/spec/lib/kajam/config/definition_spec.rb +160 -0
  475. data/spec/lib/kajam/extension/script_spec.rb +473 -0
  476. data/spec/lib/kajam/extension_loader_spec.rb +271 -0
  477. data/spec/lib/kajam/extension_migrator_spec.rb +65 -0
  478. data/spec/lib/kajam/extension_spec.rb +152 -0
  479. data/spec/lib/kajam/initializer_spec.rb +178 -0
  480. data/spec/lib/kajam/resource_responses_spec.rb +207 -0
  481. data/spec/lib/kajam/taggable_spec.rb +243 -0
  482. data/spec/lib/kajam_spec.rb +30 -0
  483. data/spec/lib/locator_spec.rb +41 -0
  484. data/spec/lib/login_system_spec.rb +201 -0
  485. data/spec/lib/method_observer_spec.rb +48 -0
  486. data/spec/lib/simpleton_spec.rb +45 -0
  487. data/spec/lib/task_support_spec.rb +93 -0
  488. data/spec/lib/translation_support_spec.rb +16 -0
  489. data/spec/matchers/autotest_matchers.rb +47 -0
  490. data/spec/matchers/generator_matchers.rb +235 -0
  491. data/spec/matchers/login_system_matcher.rb +79 -0
  492. data/spec/matchers/render_form_errors_matcher.rb +62 -0
  493. data/spec/matchers/render_matcher.rb +133 -0
  494. data/spec/models/deprecated_tags_spec.rb +124 -0
  495. data/spec/models/file_not_found_page_spec.rb +35 -0
  496. data/spec/models/kajam/config_spec.rb +149 -0
  497. data/spec/models/layout_spec.rb +29 -0
  498. data/spec/models/page_context_spec.rb +66 -0
  499. data/spec/models/page_part_spec.rb +60 -0
  500. data/spec/models/page_spec.rb +700 -0
  501. data/spec/models/snippet_spec.rb +59 -0
  502. data/spec/models/standard_tags_spec.rb +1183 -0
  503. data/spec/models/status_spec.rb +64 -0
  504. data/spec/models/text_filter_spec.rb +44 -0
  505. data/spec/models/user_action_observer_spec.rb +34 -0
  506. data/spec/models/user_spec.rb +202 -0
  507. data/spec/rcov.opts +2 -0
  508. data/spec/spec.opts +4 -0
  509. data/spec/spec_helper.rb +84 -0
  510. data/test/fixtures/extensions/basic/app/controllers/basic_extension_controller.rb +7 -0
  511. data/test/fixtures/extensions/basic/app/metal/basic_metal.rb +9 -0
  512. data/test/fixtures/extensions/basic/app/models/basic_extension_mailer.rb +4 -0
  513. data/test/fixtures/extensions/basic/app/models/basic_extension_model.rb +2 -0
  514. data/test/fixtures/extensions/basic/app/views/basic_extension/index.html.erb +1 -0
  515. data/test/fixtures/extensions/basic/app/views/basic_extension/override.html.erb +1 -0
  516. data/test/fixtures/extensions/basic/app/views/basic_extension_mailer/message.text.html.erb +1 -0
  517. data/test/fixtures/extensions/basic/basic_extension.rb +11 -0
  518. data/test/fixtures/extensions/basic/config/routes.rb +3 -0
  519. data/test/fixtures/extensions/basic/db/migrate/200812131420_create_initial_schema.rb +10 -0
  520. data/test/fixtures/extensions/basic/db/migrate/200812131421_modify_initial_schema.rb +10 -0
  521. data/test/fixtures/extensions/basic/lib/new_module.rb +2 -0
  522. data/test/fixtures/extensions/basic/vendor/plugins/multiple/init.rb +1 -0
  523. data/test/fixtures/extensions/basic/vendor/plugins/multiple/lib/multiple.rb +2 -0
  524. data/test/fixtures/extensions/basic/vendor/plugins/plugin_normal/init.rb +1 -0
  525. data/test/fixtures/extensions/basic/vendor/plugins/plugin_normal/lib/normal_plugin.rb +2 -0
  526. data/test/fixtures/extensions/load_order_blue/load_order_blue_extension.rb +8 -0
  527. data/test/fixtures/extensions/load_order_green/load_order_green_extension.rb +8 -0
  528. data/test/fixtures/extensions/load_order_red/load_order_red_extension.rb +8 -0
  529. data/test/fixtures/extensions/locale/config/locales/en-uk.yml +3 -0
  530. data/test/fixtures/extensions/locale/config/locales/en.yml +3 -0
  531. data/test/fixtures/extensions/locale/locale_extension.rb +5 -0
  532. data/test/fixtures/extensions/overriding/app/metal/basic_metal.rb +9 -0
  533. data/test/fixtures/extensions/overriding/app/views/basic_extension/override.html.erb +1 -0
  534. data/test/fixtures/extensions/overriding/overriding_extension.rb +8 -0
  535. data/test/fixtures/extensions/overriding/vendor/plugins/multiple/init.rb +1 -0
  536. data/test/fixtures/extensions/overriding/vendor/plugins/multiple/lib/multiple.rb +2 -0
  537. data/test/fixtures/extensions/replacing/db/migrate/200812131420_create_initial_schema.rb +10 -0
  538. data/test/fixtures/extensions/replacing/db/migrate/201106021232_further_modify_schema.rb +7 -0
  539. data/test/fixtures/extensions/replacing/replacing_extension.rb +3 -0
  540. data/test/fixtures/extensions/routed/config/routes.rb +1 -0
  541. data/test/fixtures/extensions/routed/routed_extension.rb +2 -0
  542. data/test/fixtures/extensions/special_characters/db/migrate/001_create_initial_schema.rb +10 -0
  543. data/test/fixtures/extensions/special_characters/special_characters_extension.rb +3 -0
  544. data/test/fixtures/extensions/unrouted/unrouted_extension.rb +2 -0
  545. data/test/fixtures/extensions/upgrading/db/migrate/01_first.rb +7 -0
  546. data/test/fixtures/extensions/upgrading/db/migrate/02_second.rb +7 -0
  547. data/test/fixtures/extensions/upgrading/db/migrate/03_pending.rb +7 -0
  548. data/test/fixtures/extensions/upgrading/db/migrate/04_dont_run.rb +7 -0
  549. data/test/fixtures/extensions/upgrading/upgrading_extension.rb +2 -0
  550. data/test/fixtures/gems/kajam-gem_ext-extension-0.0.0/app/views/dummy.haml +0 -0
  551. data/test/fixtures/gems/kajam-gem_ext-extension-0.0.0/gem_ext_extension.rb +2 -0
  552. data/test/fixtures/gems/kajam-gem_ext-extension-0.0.0/lib/gem_ext.rb +3 -0
  553. data/test/fixtures/gems/misnamed_ext-0.0.0/misnamed_ext_extension.rb +2 -0
  554. data/test/helpers/page_test_helper.rb +79 -0
  555. data/test/helpers/render_test_helper.rb +60 -0
  556. data/test/helpers/user_test_helper.rb +35 -0
  557. data/test/helpers/validation_test_helper.rb +42 -0
  558. data/test/test_helper.rb +64 -0
  559. data/vendor/extensions/debug/README +3 -0
  560. data/vendor/extensions/debug/Rakefile +136 -0
  561. data/vendor/extensions/debug/app/models/env_dump_page.rb +17 -0
  562. data/vendor/extensions/debug/config/locales/en.yml +3 -0
  563. data/vendor/extensions/debug/config/routes.rb +5 -0
  564. data/vendor/extensions/debug/debug_extension.rb +11 -0
  565. data/vendor/extensions/debug/lib/tasks/debug_extension_tasks.rake +55 -0
  566. data/vendor/extensions/debug/spec/models/env_dump_page_spec.rb +18 -0
  567. data/vendor/extensions/debug/spec/spec.opts +6 -0
  568. data/vendor/extensions/debug/spec/spec_helper.rb +36 -0
  569. data/vendor/extensions/exporter/README +5 -0
  570. data/vendor/extensions/exporter/Rakefile +116 -0
  571. data/vendor/extensions/exporter/app/controllers/admin/export_controller.rb +5 -0
  572. data/vendor/extensions/exporter/app/models/kajam/exporter.rb +41 -0
  573. data/vendor/extensions/exporter/config/locales/en.yml +3 -0
  574. data/vendor/extensions/exporter/config/routes.rb +6 -0
  575. data/vendor/extensions/exporter/cucumber.yml +1 -0
  576. data/vendor/extensions/exporter/exporter_extension.rb +8 -0
  577. data/vendor/extensions/exporter/features/support/env.rb +16 -0
  578. data/vendor/extensions/exporter/features/support/paths.rb +14 -0
  579. data/vendor/extensions/exporter/lib/tasks/exporter_extension_tasks.rake +55 -0
  580. data/vendor/extensions/exporter/spec/controllers/admin/export_controller_spec.rb +16 -0
  581. data/vendor/extensions/exporter/spec/models/kajam/exporter_spec.rb +29 -0
  582. data/vendor/extensions/exporter/spec/spec.opts +6 -0
  583. data/vendor/extensions/exporter/spec/spec_helper.rb +36 -0
  584. data/vendor/extensions/site_templates/README +3 -0
  585. data/vendor/extensions/site_templates/Rakefile +136 -0
  586. data/vendor/extensions/site_templates/db/templates/empty.yml +2 -0
  587. data/vendor/extensions/site_templates/db/templates/roasters.yml +7826 -0
  588. data/vendor/extensions/site_templates/db/templates/simple-blog.yml +251 -0
  589. data/vendor/extensions/site_templates/db/templates/styled-blog.yml +532 -0
  590. data/vendor/extensions/site_templates/lib/tasks/site_templates_extension_tasks.rake +55 -0
  591. data/vendor/extensions/site_templates/public/images/roasters/banner.jpg +0 -0
  592. data/vendor/extensions/site_templates/public/images/roasters/closelabel.gif +0 -0
  593. data/vendor/extensions/site_templates/public/images/roasters/comment.png +0 -0
  594. data/vendor/extensions/site_templates/public/images/roasters/gallery1.jpg +0 -0
  595. data/vendor/extensions/site_templates/public/images/roasters/gallery2.jpg +0 -0
  596. data/vendor/extensions/site_templates/public/images/roasters/gallery3.jpg +0 -0
  597. data/vendor/extensions/site_templates/public/images/roasters/gallery4.jpg +0 -0
  598. data/vendor/extensions/site_templates/public/images/roasters/gift.gif +0 -0
  599. data/vendor/extensions/site_templates/public/images/roasters/green.gif +0 -0
  600. data/vendor/extensions/site_templates/public/images/roasters/nav-background.gif +0 -0
  601. data/vendor/extensions/site_templates/public/images/roasters/nav-divider.gif +0 -0
  602. data/vendor/extensions/site_templates/public/images/roasters/nextlabel.gif +0 -0
  603. data/vendor/extensions/site_templates/public/images/roasters/open.gif +0 -0
  604. data/vendor/extensions/site_templates/public/images/roasters/preview-1.jpg +0 -0
  605. data/vendor/extensions/site_templates/public/images/roasters/preview.jpg +0 -0
  606. data/vendor/extensions/site_templates/public/images/roasters/prevlabel.gif +0 -0
  607. data/vendor/extensions/site_templates/public/images/roasters/prize.gif +0 -0
  608. data/vendor/extensions/site_templates/public/images/roasters/recycle.gif +0 -0
  609. data/vendor/extensions/site_templates/public/images/roasters/rss.gif +0 -0
  610. data/vendor/extensions/site_templates/public/images/roasters/thumb-grinder.jpg +0 -0
  611. data/vendor/extensions/site_templates/public/images/roasters/thumb-grower.jpg +0 -0
  612. data/vendor/extensions/site_templates/public/images/roasters/thumb-roaster.jpg +0 -0
  613. data/vendor/extensions/site_templates/public/images/roasters/truck.gif +0 -0
  614. data/vendor/extensions/site_templates/site_templates_extension.rb +8 -0
  615. data/vendor/extensions/textile_filter/README +1 -0
  616. data/vendor/extensions/textile_filter/Rakefile +120 -0
  617. data/vendor/extensions/textile_filter/lib/tasks/textile_filter_extension_tasks.rake +0 -0
  618. data/vendor/extensions/textile_filter/lib/textile_filter.rb +6 -0
  619. data/vendor/extensions/textile_filter/lib/textile_tags.rb +24 -0
  620. data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +19 -0
  621. data/vendor/extensions/textile_filter/spec/spec.opts +6 -0
  622. data/vendor/extensions/textile_filter/spec/spec_helper.rb +36 -0
  623. data/vendor/extensions/textile_filter/test/test_helper.rb +19 -0
  624. data/vendor/extensions/textile_filter/test/unit/textile_filter_test.rb +13 -0
  625. data/vendor/extensions/textile_filter/textile.html +115 -0
  626. data/vendor/extensions/textile_filter/textile_filter_extension.rb +10 -0
  627. data/vendor/highline/CHANGELOG +222 -0
  628. data/vendor/highline/INSTALL +35 -0
  629. data/vendor/highline/LICENSE +7 -0
  630. data/vendor/highline/README +63 -0
  631. data/vendor/highline/Rakefile +82 -0
  632. data/vendor/highline/TODO +6 -0
  633. data/vendor/highline/examples/ansi_colors.rb +38 -0
  634. data/vendor/highline/examples/asking_for_arrays.rb +18 -0
  635. data/vendor/highline/examples/basic_usage.rb +75 -0
  636. data/vendor/highline/examples/color_scheme.rb +32 -0
  637. data/vendor/highline/examples/limit.rb +12 -0
  638. data/vendor/highline/examples/menus.rb +65 -0
  639. data/vendor/highline/examples/overwrite.rb +19 -0
  640. data/vendor/highline/examples/page_and_wrap.rb +322 -0
  641. data/vendor/highline/examples/password.rb +7 -0
  642. data/vendor/highline/examples/trapping_eof.rb +22 -0
  643. data/vendor/highline/examples/using_readline.rb +17 -0
  644. data/vendor/highline/lib/highline.rb +758 -0
  645. data/vendor/highline/lib/highline/color_scheme.rb +120 -0
  646. data/vendor/highline/lib/highline/compatibility.rb +17 -0
  647. data/vendor/highline/lib/highline/import.rb +43 -0
  648. data/vendor/highline/lib/highline/menu.rb +395 -0
  649. data/vendor/highline/lib/highline/question.rb +463 -0
  650. data/vendor/highline/lib/highline/system_extensions.rb +193 -0
  651. data/vendor/highline/setup.rb +1360 -0
  652. data/vendor/highline/test/tc_color_scheme.rb +56 -0
  653. data/vendor/highline/test/tc_highline.rb +823 -0
  654. data/vendor/highline/test/tc_import.rb +54 -0
  655. data/vendor/highline/test/tc_menu.rb +429 -0
  656. data/vendor/highline/test/ts_all.rb +15 -0
  657. data/vendor/plugins/acts_as_tree/README +26 -0
  658. data/vendor/plugins/acts_as_tree/Rakefile +22 -0
  659. data/vendor/plugins/acts_as_tree/init.rb +1 -0
  660. data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
  661. data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
  662. data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
  663. data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
  664. data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
  665. data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
  666. data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
  667. data/vendor/plugins/dataset/CHANGELOG +59 -0
  668. data/vendor/plugins/dataset/LICENSE +19 -0
  669. data/vendor/plugins/dataset/README +111 -0
  670. data/vendor/plugins/dataset/Rakefile +31 -0
  671. data/vendor/plugins/dataset/TODO +15 -0
  672. data/vendor/plugins/dataset/VERSION.yml +4 -0
  673. data/vendor/plugins/dataset/dataset.gemspec +33 -0
  674. data/vendor/plugins/dataset/lib/dataset.rb +128 -0
  675. data/vendor/plugins/dataset/lib/dataset/base.rb +157 -0
  676. data/vendor/plugins/dataset/lib/dataset/collection.rb +19 -0
  677. data/vendor/plugins/dataset/lib/dataset/database/base.rb +30 -0
  678. data/vendor/plugins/dataset/lib/dataset/database/mysql.rb +34 -0
  679. data/vendor/plugins/dataset/lib/dataset/database/postgresql.rb +34 -0
  680. data/vendor/plugins/dataset/lib/dataset/database/sqlite3.rb +32 -0
  681. data/vendor/plugins/dataset/lib/dataset/extensions/cucumber.rb +21 -0
  682. data/vendor/plugins/dataset/lib/dataset/extensions/rspec.rb +21 -0
  683. data/vendor/plugins/dataset/lib/dataset/extensions/test_unit.rb +60 -0
  684. data/vendor/plugins/dataset/lib/dataset/instance_methods.rb +10 -0
  685. data/vendor/plugins/dataset/lib/dataset/load.rb +37 -0
  686. data/vendor/plugins/dataset/lib/dataset/record/fixture.rb +73 -0
  687. data/vendor/plugins/dataset/lib/dataset/record/meta.rb +66 -0
  688. data/vendor/plugins/dataset/lib/dataset/record/model.rb +50 -0
  689. data/vendor/plugins/dataset/lib/dataset/resolver.rb +110 -0
  690. data/vendor/plugins/dataset/lib/dataset/session.rb +35 -0
  691. data/vendor/plugins/dataset/lib/dataset/session_binding.rb +307 -0
  692. data/vendor/plugins/dataset/lib/dataset/version.rb +9 -0
  693. data/vendor/plugins/dataset/plugit/descriptor.rb +25 -0
  694. data/vendor/plugins/dataset/spec/dataset/cucumber_spec.rb +54 -0
  695. data/vendor/plugins/dataset/spec/dataset/database/base_spec.rb +21 -0
  696. data/vendor/plugins/dataset/spec/dataset/record/meta_spec.rb +14 -0
  697. data/vendor/plugins/dataset/spec/dataset/resolver_spec.rb +110 -0
  698. data/vendor/plugins/dataset/spec/dataset/rspec_spec.rb +133 -0
  699. data/vendor/plugins/dataset/spec/dataset/session_binding_spec.rb +198 -0
  700. data/vendor/plugins/dataset/spec/dataset/session_spec.rb +299 -0
  701. data/vendor/plugins/dataset/spec/dataset/test_unit_spec.rb +210 -0
  702. data/vendor/plugins/dataset/spec/fixtures/datasets/constant_not_defined.rb +0 -0
  703. data/vendor/plugins/dataset/spec/fixtures/datasets/ending_with_dataset.rb +2 -0
  704. data/vendor/plugins/dataset/spec/fixtures/datasets/exact_name.rb +2 -0
  705. data/vendor/plugins/dataset/spec/fixtures/datasets/not_a_dataset_base.rb +2 -0
  706. data/vendor/plugins/dataset/spec/fixtures/more_datasets/in_another_directory.rb +2 -0
  707. data/vendor/plugins/dataset/spec/models.rb +18 -0
  708. data/vendor/plugins/dataset/spec/schema.rb +26 -0
  709. data/vendor/plugins/dataset/spec/spec.opts +7 -0
  710. data/vendor/plugins/dataset/spec/spec_helper.rb +47 -0
  711. data/vendor/plugins/dataset/spec/stubs/mini_rails.rb +18 -0
  712. data/vendor/plugins/dataset/spec/stubs/test_help.rb +1 -0
  713. data/vendor/plugins/dataset/tasks/dataset.rake +19 -0
  714. data/vendor/radius/CHANGELOG +33 -0
  715. data/vendor/radius/LICENSE +19 -0
  716. data/vendor/radius/QUICKSTART.rdoc +322 -0
  717. data/vendor/radius/README.rdoc +102 -0
  718. data/vendor/radius/Rakefile +8 -0
  719. data/vendor/radius/VERSION +1 -0
  720. data/vendor/radius/lib/radius.rb +10 -0
  721. data/vendor/radius/lib/radius/context.rb +139 -0
  722. data/vendor/radius/lib/radius/delegating_open_struct.rb +31 -0
  723. data/vendor/radius/lib/radius/error.rb +43 -0
  724. data/vendor/radius/lib/radius/parse_tag.rb +24 -0
  725. data/vendor/radius/lib/radius/parser.rb +65 -0
  726. data/vendor/radius/lib/radius/parser/scan.rb +678 -0
  727. data/vendor/radius/lib/radius/parser/scan.rl +124 -0
  728. data/vendor/radius/lib/radius/tag_binding.rb +71 -0
  729. data/vendor/radius/lib/radius/tag_definitions.rb +78 -0
  730. data/vendor/radius/lib/radius/utility.rb +30 -0
  731. data/vendor/radius/lib/radius/version.rb +8 -0
  732. data/vendor/radius/radius.gemspec +71 -0
  733. data/vendor/radius/tasks/jeweler.rake +21 -0
  734. data/vendor/radius/tasks/rdoc.rake +13 -0
  735. data/vendor/radius/tasks/scan.rake +27 -0
  736. data/vendor/radius/tasks/test.rake +7 -0
  737. data/vendor/radius/test/context_test.rb +61 -0
  738. data/vendor/radius/test/parser_test.rb +295 -0
  739. data/vendor/radius/test/quickstart_test.rb +153 -0
  740. data/vendor/radius/test/test_helper.rb +29 -0
  741. data/vendor/rails/Rakefile +83 -0
  742. data/vendor/rails/actionmailer/CHANGELOG +387 -0
  743. data/vendor/rails/actionmailer/MIT-LICENSE +21 -0
  744. data/vendor/rails/actionmailer/README +149 -0
  745. data/vendor/rails/actionmailer/Rakefile +99 -0
  746. data/vendor/rails/actionmailer/install.rb +30 -0
  747. data/vendor/rails/actionmailer/lib/action_mailer.rb +62 -0
  748. data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +30 -0
  749. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +739 -0
  750. data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +113 -0
  751. data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +17 -0
  752. data/vendor/rails/actionmailer/lib/action_mailer/part.rb +107 -0
  753. data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +55 -0
  754. data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +62 -0
  755. data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +64 -0
  756. data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +68 -0
  757. data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +7 -0
  758. data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
  759. data/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb +10 -0
  760. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail.rb +6 -0
  761. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
  762. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/address.rb +392 -0
  763. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
  764. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/base64.rb +46 -0
  765. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb +41 -0
  766. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/config.rb +67 -0
  767. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/core_extensions.rb +63 -0
  768. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/encode.rb +590 -0
  769. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/header.rb +962 -0
  770. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/index.rb +9 -0
  771. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb +1162 -0
  772. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/loader.rb +3 -0
  773. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb +578 -0
  774. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb +496 -0
  775. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/main.rb +6 -0
  776. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mbox.rb +3 -0
  777. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/net.rb +250 -0
  778. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/obsolete.rb +132 -0
  779. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
  780. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
  781. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb +379 -0
  782. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb +164 -0
  783. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb +58 -0
  784. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner.rb +49 -0
  785. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner_r.rb +262 -0
  786. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/stringio.rb +280 -0
  787. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb +362 -0
  788. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
  789. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
  790. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
  791. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
  792. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
  793. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
  794. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
  795. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
  796. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
  797. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
  798. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
  799. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
  800. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
  801. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
  802. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
  803. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
  804. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
  805. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
  806. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
  807. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
  808. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
  809. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
  810. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
  811. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
  812. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
  813. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
  814. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
  815. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
  816. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
  817. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
  818. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
  819. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
  820. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
  821. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
  822. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
  823. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
  824. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
  825. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/version.rb +39 -0
  826. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +17 -0
  827. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +9 -0
  828. data/vendor/rails/actionmailer/lib/actionmailer.rb +2 -0
  829. data/vendor/rails/actionmailer/test/abstract_unit.rb +62 -0
  830. data/vendor/rails/actionmailer/test/asset_host_test.rb +54 -0
  831. data/vendor/rails/actionmailer/test/delivery_method_test.rb +51 -0
  832. data/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
  833. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
  834. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
  835. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
  836. data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
  837. data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
  838. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
  839. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
  840. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +1 -0
  841. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
  842. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
  843. data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
  844. data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
  845. data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
  846. data/vendor/rails/actionmailer/test/fixtures/layouts/spam.html.erb +1 -0
  847. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
  848. data/vendor/rails/actionmailer/test/fixtures/raw_email +14 -0
  849. data/vendor/rails/actionmailer/test/fixtures/raw_email10 +20 -0
  850. data/vendor/rails/actionmailer/test/fixtures/raw_email12 +32 -0
  851. data/vendor/rails/actionmailer/test/fixtures/raw_email13 +29 -0
  852. data/vendor/rails/actionmailer/test/fixtures/raw_email2 +114 -0
  853. data/vendor/rails/actionmailer/test/fixtures/raw_email3 +70 -0
  854. data/vendor/rails/actionmailer/test/fixtures/raw_email4 +59 -0
  855. data/vendor/rails/actionmailer/test/fixtures/raw_email5 +19 -0
  856. data/vendor/rails/actionmailer/test/fixtures/raw_email6 +20 -0
  857. data/vendor/rails/actionmailer/test/fixtures/raw_email7 +66 -0
  858. data/vendor/rails/actionmailer/test/fixtures/raw_email8 +47 -0
  859. data/vendor/rails/actionmailer/test/fixtures/raw_email9 +28 -0
  860. data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +14 -0
  861. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
  862. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +100 -0
  863. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
  864. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +1 -0
  865. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
  866. data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
  867. data/vendor/rails/actionmailer/test/fixtures/test_mailer/body_ivar.erb +2 -0
  868. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
  869. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
  870. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
  871. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
  872. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
  873. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ +10 -0
  874. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
  875. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
  876. data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
  877. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +2 -0
  878. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +2 -0
  879. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb +3 -0
  880. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
  881. data/vendor/rails/actionmailer/test/mail_helper_test.rb +95 -0
  882. data/vendor/rails/actionmailer/test/mail_layout_test.rb +123 -0
  883. data/vendor/rails/actionmailer/test/mail_render_test.rb +116 -0
  884. data/vendor/rails/actionmailer/test/mail_service_test.rb +1145 -0
  885. data/vendor/rails/actionmailer/test/quoting_test.rb +105 -0
  886. data/vendor/rails/actionmailer/test/test_helper_test.rb +129 -0
  887. data/vendor/rails/actionmailer/test/tmail_test.rb +22 -0
  888. data/vendor/rails/actionmailer/test/url_test.rb +76 -0
  889. data/vendor/rails/actionpack/CHANGELOG +5250 -0
  890. data/vendor/rails/actionpack/MIT-LICENSE +21 -0
  891. data/vendor/rails/actionpack/README +409 -0
  892. data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +24 -0
  893. data/vendor/rails/actionpack/Rakefile +160 -0
  894. data/vendor/rails/actionpack/install.rb +30 -0
  895. data/vendor/rails/actionpack/lib/action_controller.rb +113 -0
  896. data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +55 -0
  897. data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +21 -0
  898. data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +169 -0
  899. data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +146 -0
  900. data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +638 -0
  901. data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +127 -0
  902. data/vendor/rails/actionpack/lib/action_controller/base.rb +1425 -0
  903. data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +107 -0
  904. data/vendor/rails/actionpack/lib/action_controller/caching.rb +71 -0
  905. data/vendor/rails/actionpack/lib/action_controller/caching/actions.rb +177 -0
  906. data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +120 -0
  907. data/vendor/rails/actionpack/lib/action_controller/caching/pages.rb +152 -0
  908. data/vendor/rails/actionpack/lib/action_controller/caching/sweeper.rb +45 -0
  909. data/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb +55 -0
  910. data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +15 -0
  911. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +112 -0
  912. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +22 -0
  913. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +24 -0
  914. data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +77 -0
  915. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +197 -0
  916. data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +133 -0
  917. data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +87 -0
  918. data/vendor/rails/actionpack/lib/action_controller/filters.rb +680 -0
  919. data/vendor/rails/actionpack/lib/action_controller/flash.rb +213 -0
  920. data/vendor/rails/actionpack/lib/action_controller/headers.rb +33 -0
  921. data/vendor/rails/actionpack/lib/action_controller/helpers.rb +225 -0
  922. data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +309 -0
  923. data/vendor/rails/actionpack/lib/action_controller/integration.rb +708 -0
  924. data/vendor/rails/actionpack/lib/action_controller/layout.rb +286 -0
  925. data/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb +119 -0
  926. data/vendor/rails/actionpack/lib/action_controller/middlewares.rb +14 -0
  927. data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +193 -0
  928. data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +212 -0
  929. data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +21 -0
  930. data/vendor/rails/actionpack/lib/action_controller/params_parser.rb +77 -0
  931. data/vendor/rails/actionpack/lib/action_controller/performance_test.rb +15 -0
  932. data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +189 -0
  933. data/vendor/rails/actionpack/lib/action_controller/rack_lint_patch.rb +36 -0
  934. data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +104 -0
  935. data/vendor/rails/actionpack/lib/action_controller/reloader.rb +54 -0
  936. data/vendor/rails/actionpack/lib/action_controller/request.rb +493 -0
  937. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +116 -0
  938. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +183 -0
  939. data/vendor/rails/actionpack/lib/action_controller/resources.rb +682 -0
  940. data/vendor/rails/actionpack/lib/action_controller/response.rb +236 -0
  941. data/vendor/rails/actionpack/lib/action_controller/routing.rb +388 -0
  942. data/vendor/rails/actionpack/lib/action_controller/routing/builder.rb +197 -0
  943. data/vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb +130 -0
  944. data/vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb +167 -0
  945. data/vendor/rails/actionpack/lib/action_controller/routing/route.rb +265 -0
  946. data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +503 -0
  947. data/vendor/rails/actionpack/lib/action_controller/routing/routing_ext.rb +49 -0
  948. data/vendor/rails/actionpack/lib/action_controller/routing/segments.rb +343 -0
  949. data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +275 -0
  950. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +240 -0
  951. data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +60 -0
  952. data/vendor/rails/actionpack/lib/action_controller/session_management.rb +54 -0
  953. data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +88 -0
  954. data/vendor/rails/actionpack/lib/action_controller/streaming.rb +181 -0
  955. data/vendor/rails/actionpack/lib/action_controller/string_coercion.rb +29 -0
  956. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
  957. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +26 -0
  958. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
  959. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +29 -0
  960. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +2 -0
  961. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +10 -0
  962. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
  963. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +2 -0
  964. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +209 -0
  965. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +580 -0
  966. data/vendor/rails/actionpack/lib/action_controller/translation.rb +13 -0
  967. data/vendor/rails/actionpack/lib/action_controller/uploaded_file.rb +44 -0
  968. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +229 -0
  969. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner.rb +16 -0
  970. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +68 -0
  971. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +537 -0
  972. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -0
  973. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +828 -0
  974. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +105 -0
  975. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +11 -0
  976. data/vendor/rails/actionpack/lib/action_controller/verification.rb +130 -0
  977. data/vendor/rails/actionpack/lib/action_pack.rb +24 -0
  978. data/vendor/rails/actionpack/lib/action_pack/version.rb +9 -0
  979. data/vendor/rails/actionpack/lib/action_view.rb +58 -0
  980. data/vendor/rails/actionpack/lib/action_view/base.rb +362 -0
  981. data/vendor/rails/actionpack/lib/action_view/helpers.rb +61 -0
  982. data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +305 -0
  983. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +695 -0
  984. data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +198 -0
  985. data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +54 -0
  986. data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +39 -0
  987. data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +136 -0
  988. data/vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb +14 -0
  989. data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +989 -0
  990. data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +38 -0
  991. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +1118 -0
  992. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +599 -0
  993. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +490 -0
  994. data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +208 -0
  995. data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +308 -0
  996. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +1305 -0
  997. data/vendor/rails/actionpack/lib/action_view/helpers/raw_output_helper.rb +9 -0
  998. data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +20 -0
  999. data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +58 -0
  1000. data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +251 -0
  1001. data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +226 -0
  1002. data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +151 -0
  1003. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +597 -0
  1004. data/vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb +67 -0
  1005. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +637 -0
  1006. data/vendor/rails/actionpack/lib/action_view/inline_template.rb +19 -0
  1007. data/vendor/rails/actionpack/lib/action_view/locale/en.yml +117 -0
  1008. data/vendor/rails/actionpack/lib/action_view/partials.rb +241 -0
  1009. data/vendor/rails/actionpack/lib/action_view/paths.rb +77 -0
  1010. data/vendor/rails/actionpack/lib/action_view/reloadable_template.rb +117 -0
  1011. data/vendor/rails/actionpack/lib/action_view/renderable.rb +109 -0
  1012. data/vendor/rails/actionpack/lib/action_view/renderable_partial.rb +53 -0
  1013. data/vendor/rails/actionpack/lib/action_view/template.rb +252 -0
  1014. data/vendor/rails/actionpack/lib/action_view/template_error.rb +99 -0
  1015. data/vendor/rails/actionpack/lib/action_view/template_handler.rb +34 -0
  1016. data/vendor/rails/actionpack/lib/action_view/template_handlers.rb +48 -0
  1017. data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +17 -0
  1018. data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +25 -0
  1019. data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +13 -0
  1020. data/vendor/rails/actionpack/lib/action_view/test_case.rb +162 -0
  1021. data/vendor/rails/actionpack/lib/actionpack.rb +2 -0
  1022. data/vendor/rails/actionpack/test/abstract_unit.rb +78 -0
  1023. data/vendor/rails/actionpack/test/active_record_unit.rb +104 -0
  1024. data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +221 -0
  1025. data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +188 -0
  1026. data/vendor/rails/actionpack/test/adv_attr_test.rb +20 -0
  1027. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +545 -0
  1028. data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +37 -0
  1029. data/vendor/rails/actionpack/test/controller/assert_select_test.rb +735 -0
  1030. data/vendor/rails/actionpack/test/controller/base_test.rb +217 -0
  1031. data/vendor/rails/actionpack/test/controller/benchmark_test.rb +32 -0
  1032. data/vendor/rails/actionpack/test/controller/caching_test.rb +743 -0
  1033. data/vendor/rails/actionpack/test/controller/capture_test.rb +66 -0
  1034. data/vendor/rails/actionpack/test/controller/content_type_test.rb +168 -0
  1035. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
  1036. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
  1037. data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
  1038. data/vendor/rails/actionpack/test/controller/cookie_test.rb +208 -0
  1039. data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +32 -0
  1040. data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +144 -0
  1041. data/vendor/rails/actionpack/test/controller/dom_assertions_test.rb +53 -0
  1042. data/vendor/rails/actionpack/test/controller/failsafe_test.rb +60 -0
  1043. data/vendor/rails/actionpack/test/controller/fake_controllers.rb +33 -0
  1044. data/vendor/rails/actionpack/test/controller/fake_models.rb +19 -0
  1045. data/vendor/rails/actionpack/test/controller/filter_params_test.rb +52 -0
  1046. data/vendor/rails/actionpack/test/controller/filters_test.rb +885 -0
  1047. data/vendor/rails/actionpack/test/controller/flash_test.rb +174 -0
  1048. data/vendor/rails/actionpack/test/controller/header_test.rb +14 -0
  1049. data/vendor/rails/actionpack/test/controller/helper_test.rb +224 -0
  1050. data/vendor/rails/actionpack/test/controller/html-scanner/cdata_node_test.rb +15 -0
  1051. data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +148 -0
  1052. data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +89 -0
  1053. data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +274 -0
  1054. data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +238 -0
  1055. data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +50 -0
  1056. data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +131 -0
  1057. data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +113 -0
  1058. data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +254 -0
  1059. data/vendor/rails/actionpack/test/controller/integration_test.rb +526 -0
  1060. data/vendor/rails/actionpack/test/controller/layout_test.rb +215 -0
  1061. data/vendor/rails/actionpack/test/controller/localized_templates_test.rb +24 -0
  1062. data/vendor/rails/actionpack/test/controller/logging_test.rb +46 -0
  1063. data/vendor/rails/actionpack/test/controller/middleware_stack_test.rb +90 -0
  1064. data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +536 -0
  1065. data/vendor/rails/actionpack/test/controller/mime_type_test.rb +93 -0
  1066. data/vendor/rails/actionpack/test/controller/output_escaping_test.rb +19 -0
  1067. data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +297 -0
  1068. data/vendor/rails/actionpack/test/controller/rack_test.rb +308 -0
  1069. data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +139 -0
  1070. data/vendor/rails/actionpack/test/controller/redirect_test.rb +285 -0
  1071. data/vendor/rails/actionpack/test/controller/reloader_test.rb +125 -0
  1072. data/vendor/rails/actionpack/test/controller/render_test.rb +1783 -0
  1073. data/vendor/rails/actionpack/test/controller/request/json_params_parsing_test.rb +65 -0
  1074. data/vendor/rails/actionpack/test/controller/request/multipart_params_parsing_test.rb +177 -0
  1075. data/vendor/rails/actionpack/test/controller/request/query_string_parsing_test.rb +120 -0
  1076. data/vendor/rails/actionpack/test/controller/request/test_request_test.rb +35 -0
  1077. data/vendor/rails/actionpack/test/controller/request/url_encoded_params_parsing_test.rb +146 -0
  1078. data/vendor/rails/actionpack/test/controller/request/xml_params_parsing_test.rb +103 -0
  1079. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +233 -0
  1080. data/vendor/rails/actionpack/test/controller/request_test.rb +395 -0
  1081. data/vendor/rails/actionpack/test/controller/rescue_test.rb +541 -0
  1082. data/vendor/rails/actionpack/test/controller/resources_test.rb +1393 -0
  1083. data/vendor/rails/actionpack/test/controller/routing_test.rb +2592 -0
  1084. data/vendor/rails/actionpack/test/controller/selector_test.rb +628 -0
  1085. data/vendor/rails/actionpack/test/controller/send_file_test.rb +171 -0
  1086. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +310 -0
  1087. data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +187 -0
  1088. data/vendor/rails/actionpack/test/controller/session/test_session_test.rb +58 -0
  1089. data/vendor/rails/actionpack/test/controller/test_test.rb +700 -0
  1090. data/vendor/rails/actionpack/test/controller/translation_test.rb +26 -0
  1091. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +395 -0
  1092. data/vendor/rails/actionpack/test/controller/verification_test.rb +270 -0
  1093. data/vendor/rails/actionpack/test/controller/view_paths_test.rb +141 -0
  1094. data/vendor/rails/actionpack/test/controller/webservice_test.rb +260 -0
  1095. data/vendor/rails/actionpack/test/fixtures/_top_level_partial.html.erb +1 -0
  1096. data/vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb +1 -0
  1097. data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +1 -0
  1098. data/vendor/rails/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +3 -0
  1099. data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +1 -0
  1100. data/vendor/rails/actionpack/test/fixtures/companies.yml +24 -0
  1101. data/vendor/rails/actionpack/test/fixtures/company.rb +10 -0
  1102. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +1 -0
  1103. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +1 -0
  1104. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +1 -0
  1105. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +1 -0
  1106. data/vendor/rails/actionpack/test/fixtures/customers/_customer.html.erb +1 -0
  1107. data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +49 -0
  1108. data/vendor/rails/actionpack/test/fixtures/developer.rb +9 -0
  1109. data/vendor/rails/actionpack/test/fixtures/developers.yml +21 -0
  1110. data/vendor/rails/actionpack/test/fixtures/developers/_developer.erb +1 -0
  1111. data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +13 -0
  1112. data/vendor/rails/actionpack/test/fixtures/failsafe/500.html +1 -0
  1113. data/vendor/rails/actionpack/test/fixtures/fun/games/_game.erb +1 -0
  1114. data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +1 -0
  1115. data/vendor/rails/actionpack/test/fixtures/fun/serious/games/_game.erb +1 -0
  1116. data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +3 -0
  1117. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +3 -0
  1118. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.js.rjs +6 -0
  1119. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +5 -0
  1120. data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +2 -0
  1121. data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +1 -0
  1122. data/vendor/rails/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +2 -0
  1123. data/vendor/rails/actionpack/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs +1 -0
  1124. data/vendor/rails/actionpack/test/fixtures/good_customers/_good_customer.html.erb +1 -0
  1125. data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +5 -0
  1126. data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +3 -0
  1127. data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +3 -0
  1128. data/vendor/rails/actionpack/test/fixtures/layout_tests/abs_path_layout.rhtml +1 -0
  1129. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +1 -0
  1130. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/layouts/alt.rhtml +0 -0
  1131. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +1 -0
  1132. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +1 -0
  1133. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +1 -0
  1134. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
  1135. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +1 -0
  1136. data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +1 -0
  1137. data/vendor/rails/actionpack/test/fixtures/layouts/_column.html.erb +2 -0
  1138. data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +3 -0
  1139. data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +3 -0
  1140. data/vendor/rails/actionpack/test/fixtures/layouts/default_html.html.erb +1 -0
  1141. data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +3 -0
  1142. data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +1 -0
  1143. data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +2 -0
  1144. data/vendor/rails/actionpack/test/fixtures/layouts/xhr.html.erb +2 -0
  1145. data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +2 -0
  1146. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.de.html +1 -0
  1147. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.en.html +1 -0
  1148. data/vendor/rails/actionpack/test/fixtures/mascot.rb +3 -0
  1149. data/vendor/rails/actionpack/test/fixtures/mascots.yml +4 -0
  1150. data/vendor/rails/actionpack/test/fixtures/mascots/_mascot.html.erb +1 -0
  1151. data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
  1152. data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +10 -0
  1153. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
  1154. data/vendor/rails/actionpack/test/fixtures/multipart/empty +10 -0
  1155. data/vendor/rails/actionpack/test/fixtures/multipart/hello.txt +1 -0
  1156. data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +10 -0
  1157. data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
  1158. data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
  1159. data/vendor/rails/actionpack/test/fixtures/multipart/none +9 -0
  1160. data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +5 -0
  1161. data/vendor/rails/actionpack/test/fixtures/multipart/text_file +10 -0
  1162. data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +1 -0
  1163. data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +1 -0
  1164. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
  1165. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
  1166. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
  1167. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
  1168. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
  1169. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
  1170. data/vendor/rails/actionpack/test/fixtures/project.rb +3 -0
  1171. data/vendor/rails/actionpack/test/fixtures/projects.yml +7 -0
  1172. data/vendor/rails/actionpack/test/fixtures/projects/_project.erb +1 -0
  1173. data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
  1174. data/vendor/rails/actionpack/test/fixtures/public/500.da.html +1 -0
  1175. data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
  1176. data/vendor/rails/actionpack/test/fixtures/public/absolute/test.css +23 -0
  1177. data/vendor/rails/actionpack/test/fixtures/public/absolute/test.js +63 -0
  1178. data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
  1179. data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +1 -0
  1180. data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +1 -0
  1181. data/vendor/rails/actionpack/test/fixtures/public/javascripts/controls.js +1 -0
  1182. data/vendor/rails/actionpack/test/fixtures/public/javascripts/dragdrop.js +1 -0
  1183. data/vendor/rails/actionpack/test/fixtures/public/javascripts/effects.js +1 -0
  1184. data/vendor/rails/actionpack/test/fixtures/public/javascripts/prototype.js +1 -0
  1185. data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
  1186. data/vendor/rails/actionpack/test/fixtures/public/javascripts/subdir/subdir.js +1 -0
  1187. data/vendor/rails/actionpack/test/fixtures/public/javascripts/version.1.0.js +1 -0
  1188. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +1 -0
  1189. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +1 -0
  1190. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/subdir/subdir.css +1 -0
  1191. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/version.1.0.css +1 -0
  1192. data/vendor/rails/actionpack/test/fixtures/quiz/questions/_question.html.erb +1 -0
  1193. data/vendor/rails/actionpack/test/fixtures/replies.yml +15 -0
  1194. data/vendor/rails/actionpack/test/fixtures/replies/_reply.erb +1 -0
  1195. data/vendor/rails/actionpack/test/fixtures/reply.rb +7 -0
  1196. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +1 -0
  1197. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +1 -0
  1198. data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
  1199. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
  1200. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
  1201. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
  1202. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
  1203. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
  1204. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +1 -0
  1205. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +1 -0
  1206. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +1 -0
  1207. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +1 -0
  1208. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +1 -0
  1209. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +1 -0
  1210. data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +1 -0
  1211. data/vendor/rails/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +10 -0
  1212. data/vendor/rails/actionpack/test/fixtures/shared.html.erb +1 -0
  1213. data/vendor/rails/actionpack/test/fixtures/symlink_parent/symlinked_layout.erb +5 -0
  1214. data/vendor/rails/actionpack/test/fixtures/test/_counter.html.erb +1 -0
  1215. data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +1 -0
  1216. data/vendor/rails/actionpack/test/fixtures/test/_customer_counter.erb +1 -0
  1217. data/vendor/rails/actionpack/test/fixtures/test/_customer_counter_with_as.erb +1 -0
  1218. data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +1 -0
  1219. data/vendor/rails/actionpack/test/fixtures/test/_customer_with_var.erb +1 -0
  1220. data/vendor/rails/actionpack/test/fixtures/test/_form.erb +1 -0
  1221. data/vendor/rails/actionpack/test/fixtures/test/_from_helper.erb +1 -0
  1222. data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +1 -0
  1223. data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +2 -0
  1224. data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +1 -0
  1225. data/vendor/rails/actionpack/test/fixtures/test/_labelling_form.erb +1 -0
  1226. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb +3 -0
  1227. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +3 -0
  1228. data/vendor/rails/actionpack/test/fixtures/test/_local_inspector.html.erb +1 -0
  1229. data/vendor/rails/actionpack/test/fixtures/test/_one.html.erb +1 -0
  1230. data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
  1231. data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
  1232. data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
  1233. data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
  1234. data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +1 -0
  1235. data/vendor/rails/actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb +1 -0
  1236. data/vendor/rails/actionpack/test/fixtures/test/_person.erb +2 -0
  1237. data/vendor/rails/actionpack/test/fixtures/test/_raise.html.erb +1 -0
  1238. data/vendor/rails/actionpack/test/fixtures/test/_two.html.erb +1 -0
  1239. data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial.html.erb +1 -0
  1240. data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial_magic.html.erb +2 -0
  1241. data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +2 -0
  1242. data/vendor/rails/actionpack/test/fixtures/test/array_translation.erb +1 -0
  1243. data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
  1244. data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +4 -0
  1245. data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +2 -0
  1246. data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +3 -0
  1247. data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +2 -0
  1248. data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +2 -0
  1249. data/vendor/rails/actionpack/test/fixtures/test/dont_pick_me +1 -0
  1250. data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +1 -0
  1251. data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +6 -0
  1252. data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +1 -0
  1253. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
  1254. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
  1255. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
  1256. data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +1 -0
  1257. data/vendor/rails/actionpack/test/fixtures/test/greeting.js.rjs +1 -0
  1258. data/vendor/rails/actionpack/test/fixtures/test/hello.builder +4 -0
  1259. data/vendor/rails/actionpack/test/fixtures/test/hello_world.da.html.erb +1 -0
  1260. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +1 -0
  1261. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb~ +1 -0
  1262. data/vendor/rails/actionpack/test/fixtures/test/hello_world.pt-BR.html.erb +1 -0
  1263. data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +3 -0
  1264. data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +4 -0
  1265. data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +1 -0
  1266. data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +11 -0
  1267. data/vendor/rails/actionpack/test/fixtures/test/hyphen-ated.erb +1 -0
  1268. data/vendor/rails/actionpack/test/fixtures/test/implicit_content_type.atom.builder +2 -0
  1269. data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
  1270. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.en.html.erb~ +1 -0
  1271. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.erb~ +1 -0
  1272. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.html.erb~ +1 -0
  1273. data/vendor/rails/actionpack/test/fixtures/test/nested_layout.erb +3 -0
  1274. data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +4 -0
  1275. data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +4 -0
  1276. data/vendor/rails/actionpack/test/fixtures/test/render_explicit_html_template.js.rjs +1 -0
  1277. data/vendor/rails/actionpack/test/fixtures/test/render_file_from_template.html.erb +1 -0
  1278. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +1 -0
  1279. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +1 -0
  1280. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template.js.rjs +1 -0
  1281. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.da.html.erb +1 -0
  1282. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.html.erb +1 -0
  1283. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_js_template_without_layout.js.erb +1 -0
  1284. data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +1 -0
  1285. data/vendor/rails/actionpack/test/fixtures/test/scoped_array_translation.erb +1 -0
  1286. data/vendor/rails/actionpack/test/fixtures/test/sub_template_raise.html.erb +1 -0
  1287. data/vendor/rails/actionpack/test/fixtures/test/template.erb +1 -0
  1288. data/vendor/rails/actionpack/test/fixtures/test/translation.erb +1 -0
  1289. data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +9 -0
  1290. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +1 -0
  1291. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block_with_args.html.erb +1 -0
  1292. data/vendor/rails/actionpack/test/fixtures/test/utf8.html.erb +4 -0
  1293. data/vendor/rails/actionpack/test/fixtures/test/utf8_magic.html.erb +5 -0
  1294. data/vendor/rails/actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +5 -0
  1295. data/vendor/rails/actionpack/test/fixtures/topic.rb +3 -0
  1296. data/vendor/rails/actionpack/test/fixtures/topics.yml +22 -0
  1297. data/vendor/rails/actionpack/test/fixtures/topics/_topic.html.erb +1 -0
  1298. data/vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb +51 -0
  1299. data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +302 -0
  1300. data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +770 -0
  1301. data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +315 -0
  1302. data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +86 -0
  1303. data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +204 -0
  1304. data/vendor/rails/actionpack/test/template/date_helper_i18n_test.rb +121 -0
  1305. data/vendor/rails/actionpack/test/template/date_helper_test.rb +2603 -0
  1306. data/vendor/rails/actionpack/test/template/erb_util_test.rb +36 -0
  1307. data/vendor/rails/actionpack/test/template/form_helper_test.rb +1447 -0
  1308. data/vendor/rails/actionpack/test/template/form_options_helper_i18n_test.rb +27 -0
  1309. data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +811 -0
  1310. data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +356 -0
  1311. data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +106 -0
  1312. data/vendor/rails/actionpack/test/template/number_helper_i18n_test.rb +69 -0
  1313. data/vendor/rails/actionpack/test/template/number_helper_test.rb +132 -0
  1314. data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +639 -0
  1315. data/vendor/rails/actionpack/test/template/raw_output_helper_test.rb +21 -0
  1316. data/vendor/rails/actionpack/test/template/record_tag_helper_test.rb +58 -0
  1317. data/vendor/rails/actionpack/test/template/render_test.rb +329 -0
  1318. data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +57 -0
  1319. data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +90 -0
  1320. data/vendor/rails/actionpack/test/template/tag_helper_test.rb +98 -0
  1321. data/vendor/rails/actionpack/test/template/template_test.rb +32 -0
  1322. data/vendor/rails/actionpack/test/template/test_test.rb +54 -0
  1323. data/vendor/rails/actionpack/test/template/text_helper_test.rb +597 -0
  1324. data/vendor/rails/actionpack/test/template/translation_helper_test.rb +95 -0
  1325. data/vendor/rails/actionpack/test/template/url_helper_test.rb +641 -0
  1326. data/vendor/rails/actionpack/test/testing_sandbox.rb +15 -0
  1327. data/vendor/rails/actionpack/test/view/test_case_test.rb +176 -0
  1328. data/vendor/rails/activemodel/CHANGES +12 -0
  1329. data/vendor/rails/activemodel/README +21 -0
  1330. data/vendor/rails/activemodel/Rakefile +24 -0
  1331. data/vendor/rails/activemodel/lib/active_model.rb +5 -0
  1332. data/vendor/rails/activemodel/lib/active_model/base.rb +8 -0
  1333. data/vendor/rails/activemodel/lib/active_model/callbacks.rb +7 -0
  1334. data/vendor/rails/activemodel/lib/active_model/core.rb +7 -0
  1335. data/vendor/rails/activemodel/lib/active_model/deprecated_error_methods.rb +38 -0
  1336. data/vendor/rails/activemodel/lib/active_model/errors.rb +82 -0
  1337. data/vendor/rails/activemodel/lib/active_model/observing.rb +98 -0
  1338. data/vendor/rails/activemodel/lib/active_model/state_machine.rb +68 -0
  1339. data/vendor/rails/activemodel/lib/active_model/state_machine/event.rb +64 -0
  1340. data/vendor/rails/activemodel/lib/active_model/state_machine/machine.rb +78 -0
  1341. data/vendor/rails/activemodel/lib/active_model/state_machine/state.rb +47 -0
  1342. data/vendor/rails/activemodel/lib/active_model/state_machine/state_transition.rb +40 -0
  1343. data/vendor/rails/activemodel/lib/active_model/validations.rb +126 -0
  1344. data/vendor/rails/activemodel/lib/active_model/validations/acceptance.rb +45 -0
  1345. data/vendor/rails/activemodel/lib/active_model/validations/associated.rb +46 -0
  1346. data/vendor/rails/activemodel/lib/active_model/validations/confirmation.rb +44 -0
  1347. data/vendor/rails/activemodel/lib/active_model/validations/exclusion.rb +37 -0
  1348. data/vendor/rails/activemodel/lib/active_model/validations/format.rb +39 -0
  1349. data/vendor/rails/activemodel/lib/active_model/validations/inclusion.rb +37 -0
  1350. data/vendor/rails/activemodel/lib/active_model/validations/length.rb +95 -0
  1351. data/vendor/rails/activemodel/lib/active_model/validations/numericality.rb +80 -0
  1352. data/vendor/rails/activemodel/lib/active_model/validations/presence.rb +42 -0
  1353. data/vendor/rails/activemodel/lib/active_model/validations/uniqueness.rb +104 -0
  1354. data/vendor/rails/activemodel/test/observing_test.rb +121 -0
  1355. data/vendor/rails/activemodel/test/state_machine/event_test.rb +49 -0
  1356. data/vendor/rails/activemodel/test/state_machine/machine_test.rb +43 -0
  1357. data/vendor/rails/activemodel/test/state_machine/state_test.rb +72 -0
  1358. data/vendor/rails/activemodel/test/state_machine/state_transition_test.rb +84 -0
  1359. data/vendor/rails/activemodel/test/state_machine_test.rb +312 -0
  1360. data/vendor/rails/activemodel/test/test_helper.rb +21 -0
  1361. data/vendor/rails/activerecord/CHANGELOG +5904 -0
  1362. data/vendor/rails/activerecord/MIT-LICENSE +20 -0
  1363. data/vendor/rails/activerecord/README +351 -0
  1364. data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +36 -0
  1365. data/vendor/rails/activerecord/Rakefile +270 -0
  1366. data/vendor/rails/activerecord/examples/associations.png +0 -0
  1367. data/vendor/rails/activerecord/examples/performance.rb +198 -0
  1368. data/vendor/rails/activerecord/install.rb +30 -0
  1369. data/vendor/rails/activerecord/lib/active_record.rb +83 -0
  1370. data/vendor/rails/activerecord/lib/active_record/aggregations.rb +261 -0
  1371. data/vendor/rails/activerecord/lib/active_record/association_preload.rb +406 -0
  1372. data/vendor/rails/activerecord/lib/active_record/associations.rb +2251 -0
  1373. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +533 -0
  1374. data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +288 -0
  1375. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +86 -0
  1376. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +77 -0
  1377. data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +143 -0
  1378. data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +127 -0
  1379. data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +266 -0
  1380. data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +142 -0
  1381. data/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb +37 -0
  1382. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +388 -0
  1383. data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +395 -0
  1384. data/vendor/rails/activerecord/lib/active_record/base.rb +3218 -0
  1385. data/vendor/rails/activerecord/lib/active_record/batches.rb +85 -0
  1386. data/vendor/rails/activerecord/lib/active_record/calculations.rb +321 -0
  1387. data/vendor/rails/activerecord/lib/active_record/callbacks.rb +360 -0
  1388. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +371 -0
  1389. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +139 -0
  1390. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb +57 -0
  1391. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +289 -0
  1392. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +94 -0
  1393. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +65 -0
  1394. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +722 -0
  1395. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +490 -0
  1396. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +249 -0
  1397. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +662 -0
  1398. data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +1078 -0
  1399. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
  1400. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +454 -0
  1401. data/vendor/rails/activerecord/lib/active_record/dirty.rb +183 -0
  1402. data/vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb +41 -0
  1403. data/vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb +25 -0
  1404. data/vendor/rails/activerecord/lib/active_record/fixtures.rb +997 -0
  1405. data/vendor/rails/activerecord/lib/active_record/locale/en.yml +58 -0
  1406. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +182 -0
  1407. data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +55 -0
  1408. data/vendor/rails/activerecord/lib/active_record/migration.rb +571 -0
  1409. data/vendor/rails/activerecord/lib/active_record/named_scope.rb +197 -0
  1410. data/vendor/rails/activerecord/lib/active_record/nested_attributes.rb +404 -0
  1411. data/vendor/rails/activerecord/lib/active_record/observer.rb +197 -0
  1412. data/vendor/rails/activerecord/lib/active_record/query_cache.rb +33 -0
  1413. data/vendor/rails/activerecord/lib/active_record/reflection.rb +385 -0
  1414. data/vendor/rails/activerecord/lib/active_record/schema.rb +55 -0
  1415. data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +185 -0
  1416. data/vendor/rails/activerecord/lib/active_record/serialization.rb +101 -0
  1417. data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +91 -0
  1418. data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +357 -0
  1419. data/vendor/rails/activerecord/lib/active_record/session_store.rb +334 -0
  1420. data/vendor/rails/activerecord/lib/active_record/test_case.rb +66 -0
  1421. data/vendor/rails/activerecord/lib/active_record/timestamp.rb +71 -0
  1422. data/vendor/rails/activerecord/lib/active_record/transactions.rb +235 -0
  1423. data/vendor/rails/activerecord/lib/active_record/validations.rb +1147 -0
  1424. data/vendor/rails/activerecord/lib/active_record/version.rb +9 -0
  1425. data/vendor/rails/activerecord/lib/activerecord.rb +2 -0
  1426. data/vendor/rails/activerecord/test/assets/example.log +1 -0
  1427. data/vendor/rails/activerecord/test/assets/flowers.jpg +0 -0
  1428. data/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb +24 -0
  1429. data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +122 -0
  1430. data/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb +24 -0
  1431. data/vendor/rails/activerecord/test/cases/adapter_test.rb +144 -0
  1432. data/vendor/rails/activerecord/test/cases/aggregations_test.rb +167 -0
  1433. data/vendor/rails/activerecord/test/cases/ar_schema_test.rb +32 -0
  1434. data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +438 -0
  1435. data/vendor/rails/activerecord/test/cases/associations/callbacks_test.rb +161 -0
  1436. data/vendor/rails/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +131 -0
  1437. data/vendor/rails/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +36 -0
  1438. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +131 -0
  1439. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_polymorphic_include.rb +19 -0
  1440. data/vendor/rails/activerecord/test/cases/associations/eager_singularization_test.rb +145 -0
  1441. data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +852 -0
  1442. data/vendor/rails/activerecord/test/cases/associations/extension_test.rb +62 -0
  1443. data/vendor/rails/activerecord/test/cases/associations/habtm_join_table_test.rb +56 -0
  1444. data/vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +827 -0
  1445. data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +1264 -0
  1446. data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +360 -0
  1447. data/vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb +330 -0
  1448. data/vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb +209 -0
  1449. data/vendor/rails/activerecord/test/cases/associations/inner_join_association_test.rb +93 -0
  1450. data/vendor/rails/activerecord/test/cases/associations/inverse_associations_test.rb +566 -0
  1451. data/vendor/rails/activerecord/test/cases/associations/join_model_test.rb +712 -0
  1452. data/vendor/rails/activerecord/test/cases/associations_test.rb +282 -0
  1453. data/vendor/rails/activerecord/test/cases/attribute_methods_test.rb +305 -0
  1454. data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +1218 -0
  1455. data/vendor/rails/activerecord/test/cases/base_test.rb +2143 -0
  1456. data/vendor/rails/activerecord/test/cases/batches_test.rb +81 -0
  1457. data/vendor/rails/activerecord/test/cases/binary_test.rb +30 -0
  1458. data/vendor/rails/activerecord/test/cases/calculations_test.rb +360 -0
  1459. data/vendor/rails/activerecord/test/cases/callbacks_observers_test.rb +38 -0
  1460. data/vendor/rails/activerecord/test/cases/callbacks_test.rb +438 -0
  1461. data/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb +32 -0
  1462. data/vendor/rails/activerecord/test/cases/column_alias_test.rb +17 -0
  1463. data/vendor/rails/activerecord/test/cases/column_definition_test.rb +70 -0
  1464. data/vendor/rails/activerecord/test/cases/connection_pool_test.rb +25 -0
  1465. data/vendor/rails/activerecord/test/cases/connection_test_firebird.rb +8 -0
  1466. data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +65 -0
  1467. data/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb +80 -0
  1468. data/vendor/rails/activerecord/test/cases/counter_cache_test.rb +84 -0
  1469. data/vendor/rails/activerecord/test/cases/database_statements_test.rb +12 -0
  1470. data/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb +204 -0
  1471. data/vendor/rails/activerecord/test/cases/date_time_test.rb +37 -0
  1472. data/vendor/rails/activerecord/test/cases/default_test_firebird.rb +16 -0
  1473. data/vendor/rails/activerecord/test/cases/defaults_test.rb +111 -0
  1474. data/vendor/rails/activerecord/test/cases/deprecated_finder_test.rb +30 -0
  1475. data/vendor/rails/activerecord/test/cases/dirty_test.rb +316 -0
  1476. data/vendor/rails/activerecord/test/cases/finder_respond_to_test.rb +76 -0
  1477. data/vendor/rails/activerecord/test/cases/finder_test.rb +1070 -0
  1478. data/vendor/rails/activerecord/test/cases/fixtures_test.rb +661 -0
  1479. data/vendor/rails/activerecord/test/cases/helper.rb +68 -0
  1480. data/vendor/rails/activerecord/test/cases/i18n_test.rb +46 -0
  1481. data/vendor/rails/activerecord/test/cases/inheritance_test.rb +262 -0
  1482. data/vendor/rails/activerecord/test/cases/invalid_date_test.rb +24 -0
  1483. data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +219 -0
  1484. data/vendor/rails/activerecord/test/cases/lifecycle_test.rb +193 -0
  1485. data/vendor/rails/activerecord/test/cases/locking_test.rb +350 -0
  1486. data/vendor/rails/activerecord/test/cases/method_scoping_test.rb +704 -0
  1487. data/vendor/rails/activerecord/test/cases/migration_test.rb +1649 -0
  1488. data/vendor/rails/activerecord/test/cases/migration_test_firebird.rb +124 -0
  1489. data/vendor/rails/activerecord/test/cases/mixin_test.rb +96 -0
  1490. data/vendor/rails/activerecord/test/cases/modules_test.rb +109 -0
  1491. data/vendor/rails/activerecord/test/cases/multiple_db_test.rb +85 -0
  1492. data/vendor/rails/activerecord/test/cases/named_scope_test.rb +372 -0
  1493. data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +840 -0
  1494. data/vendor/rails/activerecord/test/cases/pk_test.rb +119 -0
  1495. data/vendor/rails/activerecord/test/cases/pooled_connections_test.rb +103 -0
  1496. data/vendor/rails/activerecord/test/cases/query_cache_test.rb +129 -0
  1497. data/vendor/rails/activerecord/test/cases/readonly_test.rb +107 -0
  1498. data/vendor/rails/activerecord/test/cases/reflection_test.rb +234 -0
  1499. data/vendor/rails/activerecord/test/cases/reload_models_test.rb +22 -0
  1500. data/vendor/rails/activerecord/test/cases/repair_helper.rb +50 -0
  1501. data/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb +176 -0
  1502. data/vendor/rails/activerecord/test/cases/sanitize_test.rb +25 -0
  1503. data/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb +75 -0
  1504. data/vendor/rails/activerecord/test/cases/schema_dumper_test.rb +211 -0
  1505. data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +178 -0
  1506. data/vendor/rails/activerecord/test/cases/serialization_test.rb +47 -0
  1507. data/vendor/rails/activerecord/test/cases/sp_test_mysql.rb +16 -0
  1508. data/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb +17 -0
  1509. data/vendor/rails/activerecord/test/cases/timestamp_test.rb +75 -0
  1510. data/vendor/rails/activerecord/test/cases/transactions_test.rb +543 -0
  1511. data/vendor/rails/activerecord/test/cases/unconnected_test.rb +32 -0
  1512. data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +925 -0
  1513. data/vendor/rails/activerecord/test/cases/validations_test.rb +1684 -0
  1514. data/vendor/rails/activerecord/test/cases/xml_serialization_test.rb +240 -0
  1515. data/vendor/rails/activerecord/test/cases/yaml_serialization_test.rb +11 -0
  1516. data/vendor/rails/activerecord/test/config.rb +5 -0
  1517. data/vendor/rails/activerecord/test/connections/jdbc_jdbcderby/connection.rb +18 -0
  1518. data/vendor/rails/activerecord/test/connections/jdbc_jdbch2/connection.rb +18 -0
  1519. data/vendor/rails/activerecord/test/connections/jdbc_jdbchsqldb/connection.rb +18 -0
  1520. data/vendor/rails/activerecord/test/connections/jdbc_jdbcmysql/connection.rb +26 -0
  1521. data/vendor/rails/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb +26 -0
  1522. data/vendor/rails/activerecord/test/connections/jdbc_jdbcsqlite3/connection.rb +25 -0
  1523. data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +25 -0
  1524. data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +26 -0
  1525. data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +27 -0
  1526. data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +25 -0
  1527. data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +21 -0
  1528. data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +27 -0
  1529. data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +21 -0
  1530. data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +25 -0
  1531. data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +25 -0
  1532. data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +18 -0
  1533. data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +23 -0
  1534. data/vendor/rails/activerecord/test/fixtures/accounts.yml +29 -0
  1535. data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
  1536. data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
  1537. data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
  1538. data/vendor/rails/activerecord/test/fixtures/author_addresses.yml +5 -0
  1539. data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +4 -0
  1540. data/vendor/rails/activerecord/test/fixtures/authors.yml +9 -0
  1541. data/vendor/rails/activerecord/test/fixtures/binaries.yml +132 -0
  1542. data/vendor/rails/activerecord/test/fixtures/books.yml +7 -0
  1543. data/vendor/rails/activerecord/test/fixtures/categories.yml +14 -0
  1544. data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +9 -0
  1545. data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
  1546. data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +7 -0
  1547. data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +23 -0
  1548. data/vendor/rails/activerecord/test/fixtures/categorizations.yml +17 -0
  1549. data/vendor/rails/activerecord/test/fixtures/clubs.yml +6 -0
  1550. data/vendor/rails/activerecord/test/fixtures/comments.yml +59 -0
  1551. data/vendor/rails/activerecord/test/fixtures/companies.yml +56 -0
  1552. data/vendor/rails/activerecord/test/fixtures/computers.yml +4 -0
  1553. data/vendor/rails/activerecord/test/fixtures/courses.yml +7 -0
  1554. data/vendor/rails/activerecord/test/fixtures/customers.yml +26 -0
  1555. data/vendor/rails/activerecord/test/fixtures/developers.yml +21 -0
  1556. data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +17 -0
  1557. data/vendor/rails/activerecord/test/fixtures/edges.yml +6 -0
  1558. data/vendor/rails/activerecord/test/fixtures/entrants.yml +14 -0
  1559. data/vendor/rails/activerecord/test/fixtures/faces.yml +11 -0
  1560. data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +3 -0
  1561. data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +2 -0
  1562. data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +10 -0
  1563. data/vendor/rails/activerecord/test/fixtures/interests.yml +33 -0
  1564. data/vendor/rails/activerecord/test/fixtures/items.yml +4 -0
  1565. data/vendor/rails/activerecord/test/fixtures/jobs.yml +7 -0
  1566. data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +3 -0
  1567. data/vendor/rails/activerecord/test/fixtures/mateys.yml +4 -0
  1568. data/vendor/rails/activerecord/test/fixtures/member_types.yml +6 -0
  1569. data/vendor/rails/activerecord/test/fixtures/members.yml +6 -0
  1570. data/vendor/rails/activerecord/test/fixtures/memberships.yml +20 -0
  1571. data/vendor/rails/activerecord/test/fixtures/men.yml +5 -0
  1572. data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +2 -0
  1573. data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
  1574. data/vendor/rails/activerecord/test/fixtures/mixins.yml +29 -0
  1575. data/vendor/rails/activerecord/test/fixtures/movies.yml +7 -0
  1576. data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +1 -0
  1577. data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +1 -0
  1578. data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +1 -0
  1579. data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +1 -0
  1580. data/vendor/rails/activerecord/test/fixtures/organizations.yml +5 -0
  1581. data/vendor/rails/activerecord/test/fixtures/owners.yml +7 -0
  1582. data/vendor/rails/activerecord/test/fixtures/parrots.yml +27 -0
  1583. data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +7 -0
  1584. data/vendor/rails/activerecord/test/fixtures/people.yml +15 -0
  1585. data/vendor/rails/activerecord/test/fixtures/pets.yml +14 -0
  1586. data/vendor/rails/activerecord/test/fixtures/pirates.yml +9 -0
  1587. data/vendor/rails/activerecord/test/fixtures/polymorphic_designs.yml +19 -0
  1588. data/vendor/rails/activerecord/test/fixtures/polymorphic_prices.yml +19 -0
  1589. data/vendor/rails/activerecord/test/fixtures/posts.yml +52 -0
  1590. data/vendor/rails/activerecord/test/fixtures/price_estimates.yml +7 -0
  1591. data/vendor/rails/activerecord/test/fixtures/projects.yml +7 -0
  1592. data/vendor/rails/activerecord/test/fixtures/readers.yml +9 -0
  1593. data/vendor/rails/activerecord/test/fixtures/references.yml +17 -0
  1594. data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
  1595. data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
  1596. data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +14 -0
  1597. data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +8 -0
  1598. data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +7 -0
  1599. data/vendor/rails/activerecord/test/fixtures/ships.yml +5 -0
  1600. data/vendor/rails/activerecord/test/fixtures/sponsors.yml +9 -0
  1601. data/vendor/rails/activerecord/test/fixtures/subscribers.yml +7 -0
  1602. data/vendor/rails/activerecord/test/fixtures/subscriptions.yml +12 -0
  1603. data/vendor/rails/activerecord/test/fixtures/taggings.yml +28 -0
  1604. data/vendor/rails/activerecord/test/fixtures/tags.yml +7 -0
  1605. data/vendor/rails/activerecord/test/fixtures/tasks.yml +7 -0
  1606. data/vendor/rails/activerecord/test/fixtures/tees.yml +4 -0
  1607. data/vendor/rails/activerecord/test/fixtures/ties.yml +4 -0
  1608. data/vendor/rails/activerecord/test/fixtures/topics.yml +42 -0
  1609. data/vendor/rails/activerecord/test/fixtures/toys.yml +4 -0
  1610. data/vendor/rails/activerecord/test/fixtures/treasures.yml +10 -0
  1611. data/vendor/rails/activerecord/test/fixtures/vertices.yml +4 -0
  1612. data/vendor/rails/activerecord/test/fixtures/warehouse-things.yml +3 -0
  1613. data/vendor/rails/activerecord/test/fixtures/zines.yml +5 -0
  1614. data/vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb +10 -0
  1615. data/vendor/rails/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +15 -0
  1616. data/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb +9 -0
  1617. data/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb +12 -0
  1618. data/vendor/rails/activerecord/test/migrations/duplicate/3_foo.rb +7 -0
  1619. data/vendor/rails/activerecord/test/migrations/duplicate/3_innocent_jointable.rb +12 -0
  1620. data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb +7 -0
  1621. data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb +7 -0
  1622. data/vendor/rails/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb +12 -0
  1623. data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +9 -0
  1624. data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb +12 -0
  1625. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +9 -0
  1626. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +8 -0
  1627. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +12 -0
  1628. data/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +9 -0
  1629. data/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb +9 -0
  1630. data/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb +12 -0
  1631. data/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb +12 -0
  1632. data/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb +9 -0
  1633. data/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb +12 -0
  1634. data/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb +12 -0
  1635. data/vendor/rails/activerecord/test/models/author.rb +151 -0
  1636. data/vendor/rails/activerecord/test/models/auto_id.rb +4 -0
  1637. data/vendor/rails/activerecord/test/models/binary.rb +2 -0
  1638. data/vendor/rails/activerecord/test/models/bird.rb +9 -0
  1639. data/vendor/rails/activerecord/test/models/book.rb +4 -0
  1640. data/vendor/rails/activerecord/test/models/categorization.rb +5 -0
  1641. data/vendor/rails/activerecord/test/models/category.rb +34 -0
  1642. data/vendor/rails/activerecord/test/models/citation.rb +6 -0
  1643. data/vendor/rails/activerecord/test/models/club.rb +13 -0
  1644. data/vendor/rails/activerecord/test/models/column_name.rb +3 -0
  1645. data/vendor/rails/activerecord/test/models/comment.rb +29 -0
  1646. data/vendor/rails/activerecord/test/models/company.rb +173 -0
  1647. data/vendor/rails/activerecord/test/models/company_in_module.rb +78 -0
  1648. data/vendor/rails/activerecord/test/models/computer.rb +3 -0
  1649. data/vendor/rails/activerecord/test/models/contact.rb +16 -0
  1650. data/vendor/rails/activerecord/test/models/contract.rb +5 -0
  1651. data/vendor/rails/activerecord/test/models/course.rb +3 -0
  1652. data/vendor/rails/activerecord/test/models/customer.rb +73 -0
  1653. data/vendor/rails/activerecord/test/models/default.rb +2 -0
  1654. data/vendor/rails/activerecord/test/models/developer.rb +101 -0
  1655. data/vendor/rails/activerecord/test/models/edge.rb +5 -0
  1656. data/vendor/rails/activerecord/test/models/entrant.rb +3 -0
  1657. data/vendor/rails/activerecord/test/models/essay.rb +3 -0
  1658. data/vendor/rails/activerecord/test/models/event.rb +3 -0
  1659. data/vendor/rails/activerecord/test/models/event_author.rb +8 -0
  1660. data/vendor/rails/activerecord/test/models/face.rb +7 -0
  1661. data/vendor/rails/activerecord/test/models/guid.rb +2 -0
  1662. data/vendor/rails/activerecord/test/models/interest.rb +5 -0
  1663. data/vendor/rails/activerecord/test/models/invoice.rb +4 -0
  1664. data/vendor/rails/activerecord/test/models/item.rb +7 -0
  1665. data/vendor/rails/activerecord/test/models/job.rb +5 -0
  1666. data/vendor/rails/activerecord/test/models/joke.rb +3 -0
  1667. data/vendor/rails/activerecord/test/models/keyboard.rb +3 -0
  1668. data/vendor/rails/activerecord/test/models/legacy_thing.rb +3 -0
  1669. data/vendor/rails/activerecord/test/models/line_item.rb +3 -0
  1670. data/vendor/rails/activerecord/test/models/man.rb +9 -0
  1671. data/vendor/rails/activerecord/test/models/matey.rb +4 -0
  1672. data/vendor/rails/activerecord/test/models/member.rb +12 -0
  1673. data/vendor/rails/activerecord/test/models/member_detail.rb +5 -0
  1674. data/vendor/rails/activerecord/test/models/member_type.rb +3 -0
  1675. data/vendor/rails/activerecord/test/models/membership.rb +9 -0
  1676. data/vendor/rails/activerecord/test/models/minimalistic.rb +2 -0
  1677. data/vendor/rails/activerecord/test/models/mixed_case_monkey.rb +3 -0
  1678. data/vendor/rails/activerecord/test/models/movie.rb +5 -0
  1679. data/vendor/rails/activerecord/test/models/order.rb +4 -0
  1680. data/vendor/rails/activerecord/test/models/organization.rb +6 -0
  1681. data/vendor/rails/activerecord/test/models/owner.rb +5 -0
  1682. data/vendor/rails/activerecord/test/models/parrot.rb +22 -0
  1683. data/vendor/rails/activerecord/test/models/person.rb +16 -0
  1684. data/vendor/rails/activerecord/test/models/pet.rb +5 -0
  1685. data/vendor/rails/activerecord/test/models/pirate.rb +80 -0
  1686. data/vendor/rails/activerecord/test/models/polymorphic_design.rb +3 -0
  1687. data/vendor/rails/activerecord/test/models/polymorphic_price.rb +3 -0
  1688. data/vendor/rails/activerecord/test/models/post.rb +102 -0
  1689. data/vendor/rails/activerecord/test/models/price_estimate.rb +3 -0
  1690. data/vendor/rails/activerecord/test/models/project.rb +30 -0
  1691. data/vendor/rails/activerecord/test/models/reader.rb +4 -0
  1692. data/vendor/rails/activerecord/test/models/reference.rb +4 -0
  1693. data/vendor/rails/activerecord/test/models/reply.rb +46 -0
  1694. data/vendor/rails/activerecord/test/models/ship.rb +19 -0
  1695. data/vendor/rails/activerecord/test/models/ship_part.rb +7 -0
  1696. data/vendor/rails/activerecord/test/models/sponsor.rb +4 -0
  1697. data/vendor/rails/activerecord/test/models/subject.rb +4 -0
  1698. data/vendor/rails/activerecord/test/models/subscriber.rb +8 -0
  1699. data/vendor/rails/activerecord/test/models/subscription.rb +4 -0
  1700. data/vendor/rails/activerecord/test/models/tag.rb +7 -0
  1701. data/vendor/rails/activerecord/test/models/tagging.rb +10 -0
  1702. data/vendor/rails/activerecord/test/models/task.rb +3 -0
  1703. data/vendor/rails/activerecord/test/models/tee.rb +4 -0
  1704. data/vendor/rails/activerecord/test/models/tie.rb +4 -0
  1705. data/vendor/rails/activerecord/test/models/topic.rb +80 -0
  1706. data/vendor/rails/activerecord/test/models/toy.rb +6 -0
  1707. data/vendor/rails/activerecord/test/models/treasure.rb +8 -0
  1708. data/vendor/rails/activerecord/test/models/vertex.rb +9 -0
  1709. data/vendor/rails/activerecord/test/models/warehouse_thing.rb +5 -0
  1710. data/vendor/rails/activerecord/test/models/zine.rb +3 -0
  1711. data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +31 -0
  1712. data/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb +114 -0
  1713. data/vendor/rails/activerecord/test/schema/schema.rb +550 -0
  1714. data/vendor/rails/activerecord/test/schema/schema2.rb +6 -0
  1715. data/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb +25 -0
  1716. data/vendor/rails/activeresource/CHANGELOG +306 -0
  1717. data/vendor/rails/activeresource/MIT-LICENSE +20 -0
  1718. data/vendor/rails/activeresource/README +165 -0
  1719. data/vendor/rails/activeresource/Rakefile +139 -0
  1720. data/vendor/rails/activeresource/lib/active_resource.rb +44 -0
  1721. data/vendor/rails/activeresource/lib/active_resource/base.rb +1166 -0
  1722. data/vendor/rails/activeresource/lib/active_resource/connection.rb +283 -0
  1723. data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +120 -0
  1724. data/vendor/rails/activeresource/lib/active_resource/exceptions.rb +66 -0
  1725. data/vendor/rails/activeresource/lib/active_resource/formats.rb +14 -0
  1726. data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +23 -0
  1727. data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +34 -0
  1728. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +302 -0
  1729. data/vendor/rails/activeresource/lib/active_resource/validations.rb +290 -0
  1730. data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
  1731. data/vendor/rails/activeresource/lib/activeresource.rb +2 -0
  1732. data/vendor/rails/activeresource/test/abstract_unit.rb +21 -0
  1733. data/vendor/rails/activeresource/test/authorization_test.rb +122 -0
  1734. data/vendor/rails/activeresource/test/base/custom_methods_test.rb +100 -0
  1735. data/vendor/rails/activeresource/test/base/equality_test.rb +52 -0
  1736. data/vendor/rails/activeresource/test/base/load_test.rb +161 -0
  1737. data/vendor/rails/activeresource/test/base_errors_test.rb +98 -0
  1738. data/vendor/rails/activeresource/test/base_test.rb +1087 -0
  1739. data/vendor/rails/activeresource/test/connection_test.rb +238 -0
  1740. data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
  1741. data/vendor/rails/activeresource/test/fixtures/customer.rb +3 -0
  1742. data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
  1743. data/vendor/rails/activeresource/test/fixtures/proxy.rb +4 -0
  1744. data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
  1745. data/vendor/rails/activeresource/test/format_test.rb +112 -0
  1746. data/vendor/rails/activeresource/test/http_mock_test.rb +155 -0
  1747. data/vendor/rails/activeresource/test/setter_trap.rb +26 -0
  1748. data/vendor/rails/activesupport/CHANGELOG +1383 -0
  1749. data/vendor/rails/activesupport/MIT-LICENSE +20 -0
  1750. data/vendor/rails/activesupport/README +43 -0
  1751. data/vendor/rails/activesupport/Rakefile +175 -0
  1752. data/vendor/rails/activesupport/bin/generate_tables +147 -0
  1753. data/vendor/rails/activesupport/install.rb +30 -0
  1754. data/vendor/rails/activesupport/lib/active_support.rb +60 -0
  1755. data/vendor/rails/activesupport/lib/active_support/all.rb +8 -0
  1756. data/vendor/rails/activesupport/lib/active_support/backtrace_cleaner.rb +72 -0
  1757. data/vendor/rails/activesupport/lib/active_support/base64.rb +33 -0
  1758. data/vendor/rails/activesupport/lib/active_support/basic_object.rb +21 -0
  1759. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +129 -0
  1760. data/vendor/rails/activesupport/lib/active_support/cache.rb +248 -0
  1761. data/vendor/rails/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
  1762. data/vendor/rails/activesupport/lib/active_support/cache/drb_store.rb +14 -0
  1763. data/vendor/rails/activesupport/lib/active_support/cache/file_store.rb +72 -0
  1764. data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +143 -0
  1765. data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +58 -0
  1766. data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +104 -0
  1767. data/vendor/rails/activesupport/lib/active_support/cache/synchronized_memory_store.rb +47 -0
  1768. data/vendor/rails/activesupport/lib/active_support/callbacks.rb +279 -0
  1769. data/vendor/rails/activesupport/lib/active_support/core_ext.rb +8 -0
  1770. data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +15 -0
  1771. data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +53 -0
  1772. data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +197 -0
  1773. data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +20 -0
  1774. data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +106 -0
  1775. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +42 -0
  1776. data/vendor/rails/activesupport/lib/active_support/core_ext/array/wrapper.rb +24 -0
  1777. data/vendor/rails/activesupport/lib/active_support/core_ext/base64.rb +4 -0
  1778. data/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb +16 -0
  1779. data/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb +19 -0
  1780. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +6 -0
  1781. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
  1782. data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +2 -0
  1783. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +5 -0
  1784. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +23 -0
  1785. data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +5 -0
  1786. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute.rb +67 -0
  1787. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +61 -0
  1788. data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +47 -0
  1789. data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
  1790. data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +50 -0
  1791. data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +10 -0
  1792. data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +42 -0
  1793. data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +241 -0
  1794. data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +107 -0
  1795. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +12 -0
  1796. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +126 -0
  1797. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +107 -0
  1798. data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +43 -0
  1799. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +120 -0
  1800. data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +45 -0
  1801. data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +5 -0
  1802. data/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +47 -0
  1803. data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +7 -0
  1804. data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
  1805. data/vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb +27 -0
  1806. data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +14 -0
  1807. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +247 -0
  1808. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
  1809. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +19 -0
  1810. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +25 -0
  1811. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +143 -0
  1812. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +52 -0
  1813. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
  1814. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +40 -0
  1815. data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +9 -0
  1816. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +29 -0
  1817. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +20 -0
  1818. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/time.rb +45 -0
  1819. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +5 -0
  1820. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
  1821. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
  1822. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +16 -0
  1823. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +59 -0
  1824. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +24 -0
  1825. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb +13 -0
  1826. data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +38 -0
  1827. data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +145 -0
  1828. data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +23 -0
  1829. data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +74 -0
  1830. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
  1831. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +32 -0
  1832. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +67 -0
  1833. data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +135 -0
  1834. data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +30 -0
  1835. data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +90 -0
  1836. data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +23 -0
  1837. data/vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb +25 -0
  1838. data/vendor/rails/activesupport/lib/active_support/core_ext/module/remove_method.rb +6 -0
  1839. data/vendor/rails/activesupport/lib/active_support/core_ext/module/synchronization.rb +39 -0
  1840. data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +19 -0
  1841. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +9 -0
  1842. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +50 -0
  1843. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +19 -0
  1844. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +81 -0
  1845. data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +7 -0
  1846. data/vendor/rails/activesupport/lib/active_support/core_ext/object/blank.rb +76 -0
  1847. data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +15 -0
  1848. data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +80 -0
  1849. data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +74 -0
  1850. data/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb +14 -0
  1851. data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +93 -0
  1852. data/vendor/rails/activesupport/lib/active_support/core_ext/object/singleton_class.rb +13 -0
  1853. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +7 -0
  1854. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
  1855. data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +12 -0
  1856. data/vendor/rails/activesupport/lib/active_support/core_ext/process.rb +1 -0
  1857. data/vendor/rails/activesupport/lib/active_support/core_ext/process/daemon.rb +25 -0
  1858. data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +11 -0
  1859. data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +32 -0
  1860. data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +27 -0
  1861. data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +30 -0
  1862. data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +15 -0
  1863. data/vendor/rails/activesupport/lib/active_support/core_ext/rexml.rb +41 -0
  1864. data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +24 -0
  1865. data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +106 -0
  1866. data/vendor/rails/activesupport/lib/active_support/core_ext/string/behavior.rb +13 -0
  1867. data/vendor/rails/activesupport/lib/active_support/core_ext/string/bytesize.rb +5 -0
  1868. data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +28 -0
  1869. data/vendor/rails/activesupport/lib/active_support/core_ext/string/filters.rb +26 -0
  1870. data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +167 -0
  1871. data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +23 -0
  1872. data/vendor/rails/activesupport/lib/active_support/core_ext/string/multibyte.rb +81 -0
  1873. data/vendor/rails/activesupport/lib/active_support/core_ext/string/output_safety.rb +101 -0
  1874. data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +33 -0
  1875. data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
  1876. data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +14 -0
  1877. data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +46 -0
  1878. data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
  1879. data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +313 -0
  1880. data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +90 -0
  1881. data/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb +86 -0
  1882. data/vendor/rails/activesupport/lib/active_support/core_ext/try.rb +36 -0
  1883. data/vendor/rails/activesupport/lib/active_support/core_ext/uri.rb +16 -0
  1884. data/vendor/rails/activesupport/lib/active_support/dependencies.rb +651 -0
  1885. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +204 -0
  1886. data/vendor/rails/activesupport/lib/active_support/duration.rb +100 -0
  1887. data/vendor/rails/activesupport/lib/active_support/gzip.rb +25 -0
  1888. data/vendor/rails/activesupport/lib/active_support/inflections.rb +56 -0
  1889. data/vendor/rails/activesupport/lib/active_support/inflector.rb +409 -0
  1890. data/vendor/rails/activesupport/lib/active_support/json.rb +2 -0
  1891. data/vendor/rails/activesupport/lib/active_support/json/backends/jsongem.rb +37 -0
  1892. data/vendor/rails/activesupport/lib/active_support/json/backends/yajl.rb +40 -0
  1893. data/vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb +87 -0
  1894. data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +50 -0
  1895. data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +22 -0
  1896. data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +22 -0
  1897. data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +17 -0
  1898. data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +7 -0
  1899. data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +56 -0
  1900. data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +7 -0
  1901. data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +21 -0
  1902. data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +10 -0
  1903. data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +9 -0
  1904. data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +9 -0
  1905. data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
  1906. data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +22 -0
  1907. data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +7 -0
  1908. data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +111 -0
  1909. data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
  1910. data/vendor/rails/activesupport/lib/active_support/locale/en.yml +36 -0
  1911. data/vendor/rails/activesupport/lib/active_support/memoizable.rb +102 -0
  1912. data/vendor/rails/activesupport/lib/active_support/message_encryptor.rb +70 -0
  1913. data/vendor/rails/activesupport/lib/active_support/message_verifier.rb +79 -0
  1914. data/vendor/rails/activesupport/lib/active_support/multibyte.rb +57 -0
  1915. data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +707 -0
  1916. data/vendor/rails/activesupport/lib/active_support/multibyte/exceptions.rb +8 -0
  1917. data/vendor/rails/activesupport/lib/active_support/multibyte/unicode_database.rb +71 -0
  1918. data/vendor/rails/activesupport/lib/active_support/multibyte/utils.rb +60 -0
  1919. data/vendor/rails/activesupport/lib/active_support/option_merger.rb +23 -0
  1920. data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +164 -0
  1921. data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +19 -0
  1922. data/vendor/rails/activesupport/lib/active_support/rescuable.rb +108 -0
  1923. data/vendor/rails/activesupport/lib/active_support/secure_random.rb +199 -0
  1924. data/vendor/rails/activesupport/lib/active_support/string_inquirer.rb +21 -0
  1925. data/vendor/rails/activesupport/lib/active_support/test_case.rb +40 -0
  1926. data/vendor/rails/activesupport/lib/active_support/testing/assertions.rb +79 -0
  1927. data/vendor/rails/activesupport/lib/active_support/testing/declarative.rb +21 -0
  1928. data/vendor/rails/activesupport/lib/active_support/testing/default.rb +9 -0
  1929. data/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb +57 -0
  1930. data/vendor/rails/activesupport/lib/active_support/testing/performance.rb +452 -0
  1931. data/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb +91 -0
  1932. data/vendor/rails/activesupport/lib/active_support/time_with_zone.rb +335 -0
  1933. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +416 -0
  1934. data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
  1935. data/vendor/rails/activesupport/lib/active_support/vendor.rb +36 -0
  1936. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
  1937. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
  1938. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
  1939. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
  1940. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
  1941. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
  1942. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
  1943. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
  1944. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n.rb +322 -0
  1945. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend.rb +20 -0
  1946. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb +61 -0
  1947. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record/missing.rb +65 -0
  1948. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record/store_procs.rb +38 -0
  1949. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record/translation.rb +93 -0
  1950. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/base.rb +237 -0
  1951. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cache.rb +77 -0
  1952. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cascade.rb +57 -0
  1953. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/chain.rb +77 -0
  1954. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cldr.rb +100 -0
  1955. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/fallbacks.rb +69 -0
  1956. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/flatten.rb +113 -0
  1957. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/gettext.rb +75 -0
  1958. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/interpolation_compiler.rb +123 -0
  1959. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/key_value.rb +102 -0
  1960. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/memoize.rb +48 -0
  1961. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/metadata.rb +65 -0
  1962. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/pluralization.rb +57 -0
  1963. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/simple.rb +87 -0
  1964. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/transliterator.rb +98 -0
  1965. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/config.rb +84 -0
  1966. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/core_ext/hash.rb +28 -0
  1967. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/core_ext/string/interpolate.rb +98 -0
  1968. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb +61 -0
  1969. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext.rb +27 -0
  1970. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/helpers.rb +65 -0
  1971. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/po_parser.rb +329 -0
  1972. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale.rb +6 -0
  1973. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/fallbacks.rb +98 -0
  1974. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag.rb +28 -0
  1975. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/parents.rb +24 -0
  1976. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb +76 -0
  1977. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/simple.rb +41 -0
  1978. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/version.rb +3 -0
  1979. data/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb +1107 -0
  1980. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
  1981. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
  1982. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
  1983. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
  1984. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
  1985. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
  1986. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
  1987. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
  1988. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
  1989. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
  1990. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
  1991. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
  1992. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
  1993. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
  1994. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
  1995. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
  1996. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
  1997. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
  1998. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
  1999. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
  2000. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
  2001. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
  2002. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
  2003. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
  2004. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
  2005. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
  2006. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
  2007. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
  2008. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
  2009. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
  2010. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
  2011. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
  2012. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
  2013. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
  2014. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
  2015. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
  2016. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
  2017. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
  2018. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
  2019. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
  2020. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
  2021. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
  2022. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
  2023. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
  2024. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
  2025. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
  2026. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
  2027. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
  2028. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
  2029. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
  2030. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
  2031. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
  2032. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
  2033. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
  2034. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
  2035. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
  2036. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
  2037. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
  2038. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
  2039. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
  2040. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
  2041. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
  2042. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
  2043. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
  2044. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
  2045. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
  2046. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
  2047. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
  2048. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
  2049. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
  2050. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
  2051. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
  2052. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
  2053. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
  2054. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
  2055. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
  2056. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
  2057. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
  2058. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
  2059. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
  2060. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
  2061. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
  2062. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
  2063. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
  2064. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
  2065. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
  2066. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
  2067. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
  2068. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
  2069. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
  2070. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
  2071. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
  2072. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
  2073. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
  2074. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
  2075. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
  2076. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
  2077. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
  2078. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
  2079. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
  2080. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
  2081. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
  2082. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
  2083. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
  2084. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
  2085. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
  2086. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
  2087. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
  2088. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
  2089. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
  2090. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
  2091. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
  2092. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
  2093. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
  2094. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
  2095. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
  2096. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
  2097. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
  2098. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
  2099. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
  2100. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
  2101. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
  2102. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
  2103. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
  2104. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
  2105. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
  2106. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
  2107. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
  2108. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
  2109. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
  2110. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
  2111. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
  2112. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
  2113. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
  2114. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
  2115. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
  2116. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
  2117. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
  2118. data/vendor/rails/activesupport/lib/active_support/version.rb +9 -0
  2119. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +64 -0
  2120. data/vendor/rails/activesupport/lib/active_support/xml_mini.rb +31 -0
  2121. data/vendor/rails/activesupport/lib/active_support/xml_mini/jdom.rb +162 -0
  2122. data/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb +73 -0
  2123. data/vendor/rails/activesupport/lib/active_support/xml_mini/libxmlsax.rb +74 -0
  2124. data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb +72 -0
  2125. data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogirisax.rb +73 -0
  2126. data/vendor/rails/activesupport/lib/active_support/xml_mini/rexml.rb +108 -0
  2127. data/vendor/rails/activesupport/lib/activesupport.rb +2 -0
  2128. data/vendor/rails/activesupport/test/abstract_unit.rb +37 -0
  2129. data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +2 -0
  2130. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +2 -0
  2131. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +2 -0
  2132. data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +1 -0
  2133. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +3 -0
  2134. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +3 -0
  2135. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +2 -0
  2136. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +7 -0
  2137. data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +1 -0
  2138. data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +5 -0
  2139. data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +2 -0
  2140. data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +2 -0
  2141. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +2 -0
  2142. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +4 -0
  2143. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +2 -0
  2144. data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +1 -0
  2145. data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +2 -0
  2146. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +3 -0
  2147. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +3 -0
  2148. data/vendor/rails/activesupport/test/buffered_logger_test.rb +146 -0
  2149. data/vendor/rails/activesupport/test/caching_test.rb +355 -0
  2150. data/vendor/rails/activesupport/test/callbacks_test.rb +188 -0
  2151. data/vendor/rails/activesupport/test/clean_backtrace_test.rb +47 -0
  2152. data/vendor/rails/activesupport/test/clean_logger_test.rb +57 -0
  2153. data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +394 -0
  2154. data/vendor/rails/activesupport/test/core_ext/base64_ext_test.rb +8 -0
  2155. data/vendor/rails/activesupport/test/core_ext/bigdecimal.rb +10 -0
  2156. data/vendor/rails/activesupport/test/core_ext/blank_test.rb +21 -0
  2157. data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +14 -0
  2158. data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +38 -0
  2159. data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +224 -0
  2160. data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +115 -0
  2161. data/vendor/rails/activesupport/test/core_ext/class_test.rb +46 -0
  2162. data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +286 -0
  2163. data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +363 -0
  2164. data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +22 -0
  2165. data/vendor/rails/activesupport/test/core_ext/duration_test.rb +121 -0
  2166. data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +102 -0
  2167. data/vendor/rails/activesupport/test/core_ext/exception_test.rb +68 -0
  2168. data/vendor/rails/activesupport/test/core_ext/file_test.rb +67 -0
  2169. data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +25 -0
  2170. data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +1016 -0
  2171. data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +37 -0
  2172. data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +43 -0
  2173. data/vendor/rails/activesupport/test/core_ext/load_error_test.rb +16 -0
  2174. data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
  2175. data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +52 -0
  2176. data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +39 -0
  2177. data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +58 -0
  2178. data/vendor/rails/activesupport/test/core_ext/module/model_naming_test.rb +27 -0
  2179. data/vendor/rails/activesupport/test/core_ext/module/synchronization_test.rb +86 -0
  2180. data/vendor/rails/activesupport/test/core_ext/module_test.rb +363 -0
  2181. data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +20 -0
  2182. data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +168 -0
  2183. data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +294 -0
  2184. data/vendor/rails/activesupport/test/core_ext/object_ext_test.rb +8 -0
  2185. data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +9 -0
  2186. data/vendor/rails/activesupport/test/core_ext/proc_test.rb +11 -0
  2187. data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +63 -0
  2188. data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +402 -0
  2189. data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +9 -0
  2190. data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +771 -0
  2191. data/vendor/rails/activesupport/test/core_ext/time_with_zone_test.rb +851 -0
  2192. data/vendor/rails/activesupport/test/core_ext/uri_ext_test.rb +12 -0
  2193. data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +2 -0
  2194. data/vendor/rails/activesupport/test/dependencies/conflict.rb +1 -0
  2195. data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +3 -0
  2196. data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +4 -0
  2197. data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +4 -0
  2198. data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +3 -0
  2199. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +1 -0
  2200. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +1 -0
  2201. data/vendor/rails/activesupport/test/dependencies/service_one.rb +5 -0
  2202. data/vendor/rails/activesupport/test/dependencies/service_two.rb +2 -0
  2203. data/vendor/rails/activesupport/test/dependencies_test.rb +789 -0
  2204. data/vendor/rails/activesupport/test/deprecation/proxy_wrappers_test.rb +22 -0
  2205. data/vendor/rails/activesupport/test/deprecation_test.rb +167 -0
  2206. data/vendor/rails/activesupport/test/empty_bool.rb +7 -0
  2207. data/vendor/rails/activesupport/test/flush_cache_on_private_memoization_test.rb +43 -0
  2208. data/vendor/rails/activesupport/test/gzip_test.rb +7 -0
  2209. data/vendor/rails/activesupport/test/i18n_test.rb +98 -0
  2210. data/vendor/rails/activesupport/test/inflector_test.rb +298 -0
  2211. data/vendor/rails/activesupport/test/inflector_test_cases.rb +262 -0
  2212. data/vendor/rails/activesupport/test/json/decoding_test.rb +79 -0
  2213. data/vendor/rails/activesupport/test/json/encoding_test.rb +162 -0
  2214. data/vendor/rails/activesupport/test/memoizable_test.rb +261 -0
  2215. data/vendor/rails/activesupport/test/message_encryptor_test.rb +55 -0
  2216. data/vendor/rails/activesupport/test/message_verifier_test.rb +31 -0
  2217. data/vendor/rails/activesupport/test/multibyte_chars_test.rb +606 -0
  2218. data/vendor/rails/activesupport/test/multibyte_conformance.rb +129 -0
  2219. data/vendor/rails/activesupport/test/multibyte_test_helpers.rb +19 -0
  2220. data/vendor/rails/activesupport/test/multibyte_unicode_database_test.rb +22 -0
  2221. data/vendor/rails/activesupport/test/multibyte_utils_test.rb +137 -0
  2222. data/vendor/rails/activesupport/test/option_merger_test.rb +85 -0
  2223. data/vendor/rails/activesupport/test/ordered_hash_test.rb +237 -0
  2224. data/vendor/rails/activesupport/test/ordered_options_test.rb +53 -0
  2225. data/vendor/rails/activesupport/test/rescuable_test.rb +75 -0
  2226. data/vendor/rails/activesupport/test/safe_buffer_test.rb +36 -0
  2227. data/vendor/rails/activesupport/test/secure_random_test.rb +19 -0
  2228. data/vendor/rails/activesupport/test/string_inquirer_test.rb +15 -0
  2229. data/vendor/rails/activesupport/test/test_case_test.rb +57 -0
  2230. data/vendor/rails/activesupport/test/test_test.rb +188 -0
  2231. data/vendor/rails/activesupport/test/time_zone_test.rb +285 -0
  2232. data/vendor/rails/activesupport/test/whiny_nil_test.rb +50 -0
  2233. data/vendor/rails/activesupport/test/xml_mini/jdom_engine_test.rb +153 -0
  2234. data/vendor/rails/activesupport/test/xml_mini/libxml_engine_test.rb +204 -0
  2235. data/vendor/rails/activesupport/test/xml_mini/libxmlsax_engine_test.rb +181 -0
  2236. data/vendor/rails/activesupport/test/xml_mini/nokogiri_engine_test.rb +204 -0
  2237. data/vendor/rails/activesupport/test/xml_mini/nokogirisax_engine_test.rb +217 -0
  2238. data/vendor/rails/activesupport/test/xml_mini/rexml_engine_test.rb +15 -0
  2239. data/vendor/rails/railties/CHANGELOG +2193 -0
  2240. data/vendor/rails/railties/MIT-LICENSE +20 -0
  2241. data/vendor/rails/railties/README +243 -0
  2242. data/vendor/rails/railties/Rakefile +367 -0
  2243. data/vendor/rails/railties/bin/about +4 -0
  2244. data/vendor/rails/railties/bin/console +3 -0
  2245. data/vendor/rails/railties/bin/dbconsole +3 -0
  2246. data/vendor/rails/railties/bin/destroy +3 -0
  2247. data/vendor/rails/railties/bin/generate +3 -0
  2248. data/vendor/rails/railties/bin/performance/benchmarker +3 -0
  2249. data/vendor/rails/railties/bin/performance/profiler +3 -0
  2250. data/vendor/rails/railties/bin/plugin +3 -0
  2251. data/vendor/rails/railties/bin/rails +21 -0
  2252. data/vendor/rails/railties/bin/runner +3 -0
  2253. data/vendor/rails/railties/bin/server +3 -0
  2254. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +131 -0
  2255. data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +9 -0
  2256. data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +2 -0
  2257. data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +2 -0
  2258. data/vendor/rails/railties/configs/databases/frontbase.yml +28 -0
  2259. data/vendor/rails/railties/configs/databases/ibm_db.yml +62 -0
  2260. data/vendor/rails/railties/configs/databases/mysql.yml +60 -0
  2261. data/vendor/rails/railties/configs/databases/oracle.yml +39 -0
  2262. data/vendor/rails/railties/configs/databases/postgresql.yml +51 -0
  2263. data/vendor/rails/railties/configs/databases/sqlite2.yml +19 -0
  2264. data/vendor/rails/railties/configs/databases/sqlite3.yml +22 -0
  2265. data/vendor/rails/railties/configs/empty.log +0 -0
  2266. data/vendor/rails/railties/configs/initializers/backtrace_silencers.rb +7 -0
  2267. data/vendor/rails/railties/configs/initializers/cookie_verification_secret.rb +7 -0
  2268. data/vendor/rails/railties/configs/initializers/inflections.rb +10 -0
  2269. data/vendor/rails/railties/configs/initializers/mime_types.rb +5 -0
  2270. data/vendor/rails/railties/configs/initializers/new_rails_defaults.rb +21 -0
  2271. data/vendor/rails/railties/configs/initializers/session_store.rb +15 -0
  2272. data/vendor/rails/railties/configs/locales/en.yml +5 -0
  2273. data/vendor/rails/railties/configs/routes.rb +43 -0
  2274. data/vendor/rails/railties/configs/seeds.rb +7 -0
  2275. data/vendor/rails/railties/dispatches/config.ru +7 -0
  2276. data/vendor/rails/railties/dispatches/dispatch.fcgi +24 -0
  2277. data/vendor/rails/railties/dispatches/dispatch.rb +10 -0
  2278. data/vendor/rails/railties/dispatches/gateway.cgi +97 -0
  2279. data/vendor/rails/railties/doc/README_FOR_APP +2 -0
  2280. data/vendor/rails/railties/environments/boot.rb +114 -0
  2281. data/vendor/rails/railties/environments/development.rb +17 -0
  2282. data/vendor/rails/railties/environments/environment.rb +41 -0
  2283. data/vendor/rails/railties/environments/production.rb +28 -0
  2284. data/vendor/rails/railties/environments/test.rb +28 -0
  2285. data/vendor/rails/railties/fresh_rakefile +10 -0
  2286. data/vendor/rails/railties/guides/files/javascripts/code_highlighter.js +188 -0
  2287. data/vendor/rails/railties/guides/files/javascripts/guides.js +8 -0
  2288. data/vendor/rails/railties/guides/files/javascripts/highlighters.js +90 -0
  2289. data/vendor/rails/railties/guides/files/stylesheets/main.css +441 -0
  2290. data/vendor/rails/railties/guides/files/stylesheets/print.css +52 -0
  2291. data/vendor/rails/railties/guides/files/stylesheets/reset.css +43 -0
  2292. data/vendor/rails/railties/guides/files/stylesheets/style.css +13 -0
  2293. data/vendor/rails/railties/guides/files/stylesheets/syntax.css +31 -0
  2294. data/vendor/rails/railties/guides/images/belongs_to.png +0 -0
  2295. data/vendor/rails/railties/guides/images/book_icon.gif +0 -0
  2296. data/vendor/rails/railties/guides/images/bullet.gif +0 -0
  2297. data/vendor/rails/railties/guides/images/chapters_icon.gif +0 -0
  2298. data/vendor/rails/railties/guides/images/check_bullet.gif +0 -0
  2299. data/vendor/rails/railties/guides/images/credits_pic_blank.gif +0 -0
  2300. data/vendor/rails/railties/guides/images/csrf.png +0 -0
  2301. data/vendor/rails/railties/guides/images/customized_error_messages.png +0 -0
  2302. data/vendor/rails/railties/guides/images/error_messages.png +0 -0
  2303. data/vendor/rails/railties/guides/images/feature_tile.gif +0 -0
  2304. data/vendor/rails/railties/guides/images/footer_tile.gif +0 -0
  2305. data/vendor/rails/railties/guides/images/fxn.jpg +0 -0
  2306. data/vendor/rails/railties/guides/images/grey_bullet.gif +0 -0
  2307. data/vendor/rails/railties/guides/images/habtm.png +0 -0
  2308. data/vendor/rails/railties/guides/images/has_many.png +0 -0
  2309. data/vendor/rails/railties/guides/images/has_many_through.png +0 -0
  2310. data/vendor/rails/railties/guides/images/has_one.png +0 -0
  2311. data/vendor/rails/railties/guides/images/has_one_through.png +0 -0
  2312. data/vendor/rails/railties/guides/images/header_backdrop.png +0 -0
  2313. data/vendor/rails/railties/guides/images/header_tile.gif +0 -0
  2314. data/vendor/rails/railties/guides/images/i18n/demo_localized_pirate.png +0 -0
  2315. data/vendor/rails/railties/guides/images/i18n/demo_translated_en.png +0 -0
  2316. data/vendor/rails/railties/guides/images/i18n/demo_translated_pirate.png +0 -0
  2317. data/vendor/rails/railties/guides/images/i18n/demo_translation_missing.png +0 -0
  2318. data/vendor/rails/railties/guides/images/i18n/demo_untranslated.png +0 -0
  2319. data/vendor/rails/railties/guides/images/icons/README +5 -0
  2320. data/vendor/rails/railties/guides/images/icons/callouts/1.png +0 -0
  2321. data/vendor/rails/railties/guides/images/icons/callouts/10.png +0 -0
  2322. data/vendor/rails/railties/guides/images/icons/callouts/11.png +0 -0
  2323. data/vendor/rails/railties/guides/images/icons/callouts/12.png +0 -0
  2324. data/vendor/rails/railties/guides/images/icons/callouts/13.png +0 -0
  2325. data/vendor/rails/railties/guides/images/icons/callouts/14.png +0 -0
  2326. data/vendor/rails/railties/guides/images/icons/callouts/15.png +0 -0
  2327. data/vendor/rails/railties/guides/images/icons/callouts/2.png +0 -0
  2328. data/vendor/rails/railties/guides/images/icons/callouts/3.png +0 -0
  2329. data/vendor/rails/railties/guides/images/icons/callouts/4.png +0 -0
  2330. data/vendor/rails/railties/guides/images/icons/callouts/5.png +0 -0
  2331. data/vendor/rails/railties/guides/images/icons/callouts/6.png +0 -0
  2332. data/vendor/rails/railties/guides/images/icons/callouts/7.png +0 -0
  2333. data/vendor/rails/railties/guides/images/icons/callouts/8.png +0 -0
  2334. data/vendor/rails/railties/guides/images/icons/callouts/9.png +0 -0
  2335. data/vendor/rails/railties/guides/images/icons/caution.png +0 -0
  2336. data/vendor/rails/railties/guides/images/icons/example.png +0 -0
  2337. data/vendor/rails/railties/guides/images/icons/home.png +0 -0
  2338. data/vendor/rails/railties/guides/images/icons/important.png +0 -0
  2339. data/vendor/rails/railties/guides/images/icons/next.png +0 -0
  2340. data/vendor/rails/railties/guides/images/icons/note.png +0 -0
  2341. data/vendor/rails/railties/guides/images/icons/prev.png +0 -0
  2342. data/vendor/rails/railties/guides/images/icons/tip.png +0 -0
  2343. data/vendor/rails/railties/guides/images/icons/up.png +0 -0
  2344. data/vendor/rails/railties/guides/images/icons/warning.png +0 -0
  2345. data/vendor/rails/railties/guides/images/nav_arrow.gif +0 -0
  2346. data/vendor/rails/railties/guides/images/polymorphic.png +0 -0
  2347. data/vendor/rails/railties/guides/images/posts_index.png +0 -0
  2348. data/vendor/rails/railties/guides/images/rails_guides_logo.gif +0 -0
  2349. data/vendor/rails/railties/guides/images/rails_logo_remix.gif +0 -0
  2350. data/vendor/rails/railties/guides/images/rails_welcome.png +0 -0
  2351. data/vendor/rails/railties/guides/images/session_fixation.png +0 -0
  2352. data/vendor/rails/railties/guides/images/tab_grey.gif +0 -0
  2353. data/vendor/rails/railties/guides/images/tab_info.gif +0 -0
  2354. data/vendor/rails/railties/guides/images/tab_note.gif +0 -0
  2355. data/vendor/rails/railties/guides/images/tab_red.gif +0 -0
  2356. data/vendor/rails/railties/guides/images/tab_yellow.gif +0 -0
  2357. data/vendor/rails/railties/guides/images/tab_yellow.png +0 -0
  2358. data/vendor/rails/railties/guides/images/validation_error_messages.png +0 -0
  2359. data/vendor/rails/railties/guides/rails_guides.rb +31 -0
  2360. data/vendor/rails/railties/guides/rails_guides/generator.rb +258 -0
  2361. data/vendor/rails/railties/guides/rails_guides/helpers.rb +34 -0
  2362. data/vendor/rails/railties/guides/rails_guides/indexer.rb +68 -0
  2363. data/vendor/rails/railties/guides/rails_guides/levenshtein.rb +31 -0
  2364. data/vendor/rails/railties/guides/rails_guides/textile_extensions.rb +41 -0
  2365. data/vendor/rails/railties/guides/source/2_2_release_notes.textile +422 -0
  2366. data/vendor/rails/railties/guides/source/2_3_release_notes.textile +610 -0
  2367. data/vendor/rails/railties/guides/source/action_controller_overview.textile +776 -0
  2368. data/vendor/rails/railties/guides/source/action_mailer_basics.textile +441 -0
  2369. data/vendor/rails/railties/guides/source/active_record_basics.textile +135 -0
  2370. data/vendor/rails/railties/guides/source/active_record_querying.textile +969 -0
  2371. data/vendor/rails/railties/guides/source/activerecord_validations_callbacks.textile +1086 -0
  2372. data/vendor/rails/railties/guides/source/association_basics.textile +1781 -0
  2373. data/vendor/rails/railties/guides/source/caching_with_rails.textile +524 -0
  2374. data/vendor/rails/railties/guides/source/command_line.textile +589 -0
  2375. data/vendor/rails/railties/guides/source/configuring.textile +234 -0
  2376. data/vendor/rails/railties/guides/source/contribute.textile +71 -0
  2377. data/vendor/rails/railties/guides/source/contributing_to_rails.textile +239 -0
  2378. data/vendor/rails/railties/guides/source/credits.html.erb +52 -0
  2379. data/vendor/rails/railties/guides/source/debugging_rails_applications.textile +709 -0
  2380. data/vendor/rails/railties/guides/source/form_helpers.textile +766 -0
  2381. data/vendor/rails/railties/guides/source/getting_started.textile +1297 -0
  2382. data/vendor/rails/railties/guides/source/i18n.textile +912 -0
  2383. data/vendor/rails/railties/guides/source/index.html.erb +125 -0
  2384. data/vendor/rails/railties/guides/source/layout.html.erb +103 -0
  2385. data/vendor/rails/railties/guides/source/layouts_and_rendering.textile +979 -0
  2386. data/vendor/rails/railties/guides/source/migrations.textile +591 -0
  2387. data/vendor/rails/railties/guides/source/nested_model_forms.textile +222 -0
  2388. data/vendor/rails/railties/guides/source/performance_testing.textile +531 -0
  2389. data/vendor/rails/railties/guides/source/plugins.textile +1512 -0
  2390. data/vendor/rails/railties/guides/source/rails_on_rack.textile +309 -0
  2391. data/vendor/rails/railties/guides/source/routing.textile +903 -0
  2392. data/vendor/rails/railties/guides/source/security.textile +986 -0
  2393. data/vendor/rails/railties/guides/source/testing.textile +951 -0
  2394. data/vendor/rails/railties/helpers/application_controller.rb +10 -0
  2395. data/vendor/rails/railties/helpers/application_helper.rb +3 -0
  2396. data/vendor/rails/railties/helpers/performance_test.rb +9 -0
  2397. data/vendor/rails/railties/helpers/test_helper.rb +38 -0
  2398. data/vendor/rails/railties/html/404.html +30 -0
  2399. data/vendor/rails/railties/html/422.html +30 -0
  2400. data/vendor/rails/railties/html/500.html +30 -0
  2401. data/vendor/rails/railties/html/favicon.ico +0 -0
  2402. data/vendor/rails/railties/html/images/rails.png +0 -0
  2403. data/vendor/rails/railties/html/index.html +275 -0
  2404. data/vendor/rails/railties/html/javascripts/application.js +2 -0
  2405. data/vendor/rails/railties/html/javascripts/controls.js +963 -0
  2406. data/vendor/rails/railties/html/javascripts/dragdrop.js +973 -0
  2407. data/vendor/rails/railties/html/javascripts/effects.js +1128 -0
  2408. data/vendor/rails/railties/html/javascripts/prototype.js +4320 -0
  2409. data/vendor/rails/railties/html/robots.txt +5 -0
  2410. data/vendor/rails/railties/lib/code_statistics.rb +107 -0
  2411. data/vendor/rails/railties/lib/commands.rb +17 -0
  2412. data/vendor/rails/railties/lib/commands/about.rb +3 -0
  2413. data/vendor/rails/railties/lib/commands/console.rb +45 -0
  2414. data/vendor/rails/railties/lib/commands/dbconsole.rb +87 -0
  2415. data/vendor/rails/railties/lib/commands/destroy.rb +6 -0
  2416. data/vendor/rails/railties/lib/commands/generate.rb +6 -0
  2417. data/vendor/rails/railties/lib/commands/ncgi/listener +86 -0
  2418. data/vendor/rails/railties/lib/commands/ncgi/tracker +69 -0
  2419. data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +24 -0
  2420. data/vendor/rails/railties/lib/commands/performance/profiler.rb +50 -0
  2421. data/vendor/rails/railties/lib/commands/plugin.rb +968 -0
  2422. data/vendor/rails/railties/lib/commands/runner.rb +54 -0
  2423. data/vendor/rails/railties/lib/commands/server.rb +114 -0
  2424. data/vendor/rails/railties/lib/commands/update.rb +4 -0
  2425. data/vendor/rails/railties/lib/console_app.rb +30 -0
  2426. data/vendor/rails/railties/lib/console_sandbox.rb +6 -0
  2427. data/vendor/rails/railties/lib/console_with_helpers.rb +5 -0
  2428. data/vendor/rails/railties/lib/dispatcher.rb +24 -0
  2429. data/vendor/rails/railties/lib/fcgi_handler.rb +239 -0
  2430. data/vendor/rails/railties/lib/initializer.rb +1152 -0
  2431. data/vendor/rails/railties/lib/performance_test_help.rb +5 -0
  2432. data/vendor/rails/railties/lib/rails/backtrace_cleaner.rb +54 -0
  2433. data/vendor/rails/railties/lib/rails/gem_builder.rb +21 -0
  2434. data/vendor/rails/railties/lib/rails/gem_dependency.rb +320 -0
  2435. data/vendor/rails/railties/lib/rails/plugin.rb +179 -0
  2436. data/vendor/rails/railties/lib/rails/plugin/loader.rb +198 -0
  2437. data/vendor/rails/railties/lib/rails/plugin/locator.rb +100 -0
  2438. data/vendor/rails/railties/lib/rails/rack.rb +8 -0
  2439. data/vendor/rails/railties/lib/rails/rack/debugger.rb +23 -0
  2440. data/vendor/rails/railties/lib/rails/rack/log_tailer.rb +35 -0
  2441. data/vendor/rails/railties/lib/rails/rack/metal.rb +51 -0
  2442. data/vendor/rails/railties/lib/rails/rack/static.rb +46 -0
  2443. data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +140 -0
  2444. data/vendor/rails/railties/lib/rails/version.rb +9 -0
  2445. data/vendor/rails/railties/lib/rails_generator.rb +46 -0
  2446. data/vendor/rails/railties/lib/rails_generator/base.rb +266 -0
  2447. data/vendor/rails/railties/lib/rails_generator/commands.rb +621 -0
  2448. data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +47 -0
  2449. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +9 -0
  2450. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +266 -0
  2451. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/git.rb +18 -0
  2452. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/scm.rb +8 -0
  2453. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/svn.rb +7 -0
  2454. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb +401 -0
  2455. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +30 -0
  2456. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +43 -0
  2457. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +7 -0
  2458. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +8 -0
  2459. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +2 -0
  2460. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper_test.rb +4 -0
  2461. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +2 -0
  2462. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/USAGE +24 -0
  2463. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/helper_generator.rb +25 -0
  2464. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper.rb +2 -0
  2465. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper_test.rb +4 -0
  2466. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +8 -0
  2467. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +16 -0
  2468. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +10 -0
  2469. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +16 -0
  2470. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +30 -0
  2471. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
  2472. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
  2473. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +15 -0
  2474. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +20 -0
  2475. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
  2476. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
  2477. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/USAGE +8 -0
  2478. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/metal_generator.rb +8 -0
  2479. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/templates/metal.rb +12 -0
  2480. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +29 -0
  2481. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +20 -0
  2482. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +11 -0
  2483. data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +27 -0
  2484. data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +52 -0
  2485. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +23 -0
  2486. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +16 -0
  2487. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +5 -0
  2488. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +8 -0
  2489. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +13 -0
  2490. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
  2491. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
  2492. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +8 -0
  2493. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/USAGE +8 -0
  2494. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb +16 -0
  2495. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb +9 -0
  2496. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +25 -0
  2497. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +39 -0
  2498. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
  2499. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +13 -0
  2500. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +23 -0
  2501. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +8 -0
  2502. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +8 -0
  2503. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -0
  2504. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb +1 -0
  2505. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -0
  2506. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +4 -0
  2507. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/test_helper.rb +4 -0
  2508. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +1 -0
  2509. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +8 -0
  2510. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +23 -0
  2511. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +76 -0
  2512. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
  2513. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +8 -0
  2514. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
  2515. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper_test.rb +4 -0
  2516. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +29 -0
  2517. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +103 -0
  2518. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +83 -0
  2519. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +45 -0
  2520. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +2 -0
  2521. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper_test.rb +4 -0
  2522. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +17 -0
  2523. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +54 -0
  2524. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +18 -0
  2525. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +24 -0
  2526. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +17 -0
  2527. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +10 -0
  2528. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +10 -0
  2529. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +18 -0
  2530. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +16 -0
  2531. data/vendor/rails/railties/lib/rails_generator/lookup.rb +249 -0
  2532. data/vendor/rails/railties/lib/rails_generator/manifest.rb +53 -0
  2533. data/vendor/rails/railties/lib/rails_generator/options.rb +150 -0
  2534. data/vendor/rails/railties/lib/rails_generator/scripts.rb +89 -0
  2535. data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +29 -0
  2536. data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +7 -0
  2537. data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +12 -0
  2538. data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +24 -0
  2539. data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +46 -0
  2540. data/vendor/rails/railties/lib/rails_generator/spec.rb +44 -0
  2541. data/vendor/rails/railties/lib/railties_path.rb +1 -0
  2542. data/vendor/rails/railties/lib/ruby_version_check.rb +17 -0
  2543. data/vendor/rails/railties/lib/rubyprof_ext.rb +35 -0
  2544. data/vendor/rails/railties/lib/source_annotation_extractor.rb +102 -0
  2545. data/vendor/rails/railties/lib/tasks/annotations.rake +20 -0
  2546. data/vendor/rails/railties/lib/tasks/databases.rake +436 -0
  2547. data/vendor/rails/railties/lib/tasks/documentation.rake +88 -0
  2548. data/vendor/rails/railties/lib/tasks/framework.rake +146 -0
  2549. data/vendor/rails/railties/lib/tasks/gems.rake +78 -0
  2550. data/vendor/rails/railties/lib/tasks/log.rake +9 -0
  2551. data/vendor/rails/railties/lib/tasks/middleware.rake +7 -0
  2552. data/vendor/rails/railties/lib/tasks/misc.rake +63 -0
  2553. data/vendor/rails/railties/lib/tasks/rails.rb +14 -0
  2554. data/vendor/rails/railties/lib/tasks/routes.rake +18 -0
  2555. data/vendor/rails/railties/lib/tasks/statistics.rake +17 -0
  2556. data/vendor/rails/railties/lib/tasks/testing.rake +139 -0
  2557. data/vendor/rails/railties/lib/tasks/tmp.rake +37 -0
  2558. data/vendor/rails/railties/lib/test_help.rb +38 -0
  2559. data/vendor/rails/railties/lib/webrick_server.rb +156 -0
  2560. data/vendor/rails/railties/test/abstract_unit.rb +27 -0
  2561. data/vendor/rails/railties/test/backtrace_cleaner_test.rb +61 -0
  2562. data/vendor/rails/railties/test/boot_test.rb +178 -0
  2563. data/vendor/rails/railties/test/console_app_test.rb +42 -0
  2564. data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +266 -0
  2565. data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/about.yml +1 -0
  2566. data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +1 -0
  2567. data/vendor/rails/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +1 -0
  2568. data/vendor/rails/railties/test/fixtures/eager/zoo.rb +3 -0
  2569. data/vendor/rails/railties/test/fixtures/eager/zoo/reptile_house.rb +2 -0
  2570. data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -0
  2571. data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
  2572. data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +2 -0
  2573. data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_a.rb +5 -0
  2574. data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_b.rb +5 -0
  2575. data/vendor/rails/railties/test/fixtures/metal/pluralmetal/app/metal/legacy_routes.rb +5 -0
  2576. data/vendor/rails/railties/test/fixtures/metal/singlemetal/app/metal/foo_metal.rb +5 -0
  2577. data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_a.rb +7 -0
  2578. data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_b.rb +7 -0
  2579. data/vendor/rails/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb +4 -0
  2580. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/init.rb +1 -0
  2581. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb +2 -0
  2582. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/rails/init.rb +7 -0
  2583. data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
  2584. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/about.yml +2 -0
  2585. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/generators/stubby_generator/stubby_generator.rb +4 -0
  2586. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +7 -0
  2587. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +2 -0
  2588. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb +2 -0
  2589. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb +9 -0
  2590. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb +2 -0
  2591. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml +2 -0
  2592. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/routes.rb +3 -0
  2593. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/init.rb +3 -0
  2594. data/vendor/rails/railties/test/fixtures/public/foo/bar.html +1 -0
  2595. data/vendor/rails/railties/test/fixtures/public/foo/index.html +1 -0
  2596. data/vendor/rails/railties/test/fixtures/public/index.html +1 -0
  2597. data/vendor/rails/railties/test/gem_dependency_test.rb +227 -0
  2598. data/vendor/rails/railties/test/generator_lookup_test.rb +40 -0
  2599. data/vendor/rails/railties/test/generators/generated_attribute_test.rb +38 -0
  2600. data/vendor/rails/railties/test/generators/generator_test_helper.rb +322 -0
  2601. data/vendor/rails/railties/test/generators/rails_controller_generator_test.rb +44 -0
  2602. data/vendor/rails/railties/test/generators/rails_helper_generator_test.rb +36 -0
  2603. data/vendor/rails/railties/test/generators/rails_mailer_generator_test.rb +29 -0
  2604. data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +96 -0
  2605. data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +29 -0
  2606. data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +151 -0
  2607. data/vendor/rails/railties/test/generators/rails_template_runner_test.rb +216 -0
  2608. data/vendor/rails/railties/test/initializer_test.rb +437 -0
  2609. data/vendor/rails/railties/test/metal_test.rb +72 -0
  2610. data/vendor/rails/railties/test/mocks/routes.rb +6 -0
  2611. data/vendor/rails/railties/test/plugin_loader_test.rb +172 -0
  2612. data/vendor/rails/railties/test/plugin_locator_test.rb +62 -0
  2613. data/vendor/rails/railties/test/plugin_test.rb +162 -0
  2614. data/vendor/rails/railties/test/plugin_test_helper.rb +29 -0
  2615. data/vendor/rails/railties/test/rack_static_test.rb +47 -0
  2616. data/vendor/rails/railties/test/rails_generator_test.rb +145 -0
  2617. data/vendor/rails/railties/test/rails_info_controller_test.rb +52 -0
  2618. data/vendor/rails/railties/test/rails_info_test.rb +99 -0
  2619. data/vendor/rails/railties/test/secret_key_generation_test.rb +38 -0
  2620. data/vendor/rails/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb +1 -0
  2621. data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb +1 -0
  2622. data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb +1 -0
  2623. data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb +1 -0
  2624. data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb +1 -0
  2625. data/vendor/rails/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb +1 -0
  2626. data/vendor/rails/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb +1 -0
  2627. data/vendor/rails/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb +1 -0
  2628. data/vendor/rails/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb +1 -0
  2629. data/vendor/rails/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb +1 -0
  2630. data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile +0 -0
  2631. data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb +1 -0
  2632. data/vendor/rails/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb +1 -0
  2633. data/vendor/rails/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb +1 -0
  2634. data/vendor/rails/railties/test/vendor/gems/dummy-gem-l-1.0.0-x86-mswin32/lib/dummy-gem-l.rb +1 -0
  2635. metadata +3023 -0
@@ -0,0 +1,4320 @@
1
+ /* Prototype JavaScript framework, version 1.6.0.3
2
+ * (c) 2005-2008 Sam Stephenson
3
+ *
4
+ * Prototype is freely distributable under the terms of an MIT-style license.
5
+ * For details, see the Prototype web site: http://www.prototypejs.org/
6
+ *
7
+ *--------------------------------------------------------------------------*/
8
+
9
+ var Prototype = {
10
+ Version: '1.6.0.3',
11
+
12
+ Browser: {
13
+ IE: !!(window.attachEvent &&
14
+ navigator.userAgent.indexOf('Opera') === -1),
15
+ Opera: navigator.userAgent.indexOf('Opera') > -1,
16
+ WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
17
+ Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
18
+ navigator.userAgent.indexOf('KHTML') === -1,
19
+ MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
20
+ },
21
+
22
+ BrowserFeatures: {
23
+ XPath: !!document.evaluate,
24
+ SelectorsAPI: !!document.querySelector,
25
+ ElementExtensions: !!window.HTMLElement,
26
+ SpecificElementExtensions:
27
+ document.createElement('div')['__proto__'] &&
28
+ document.createElement('div')['__proto__'] !==
29
+ document.createElement('form')['__proto__']
30
+ },
31
+
32
+ ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
33
+ JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
34
+
35
+ emptyFunction: function() { },
36
+ K: function(x) { return x }
37
+ };
38
+
39
+ if (Prototype.Browser.MobileSafari)
40
+ Prototype.BrowserFeatures.SpecificElementExtensions = false;
41
+
42
+
43
+ /* Based on Alex Arnell's inheritance implementation. */
44
+ var Class = {
45
+ create: function() {
46
+ var parent = null, properties = $A(arguments);
47
+ if (Object.isFunction(properties[0]))
48
+ parent = properties.shift();
49
+
50
+ function klass() {
51
+ this.initialize.apply(this, arguments);
52
+ }
53
+
54
+ Object.extend(klass, Class.Methods);
55
+ klass.superclass = parent;
56
+ klass.subclasses = [];
57
+
58
+ if (parent) {
59
+ var subclass = function() { };
60
+ subclass.prototype = parent.prototype;
61
+ klass.prototype = new subclass;
62
+ parent.subclasses.push(klass);
63
+ }
64
+
65
+ for (var i = 0; i < properties.length; i++)
66
+ klass.addMethods(properties[i]);
67
+
68
+ if (!klass.prototype.initialize)
69
+ klass.prototype.initialize = Prototype.emptyFunction;
70
+
71
+ klass.prototype.constructor = klass;
72
+
73
+ return klass;
74
+ }
75
+ };
76
+
77
+ Class.Methods = {
78
+ addMethods: function(source) {
79
+ var ancestor = this.superclass && this.superclass.prototype;
80
+ var properties = Object.keys(source);
81
+
82
+ if (!Object.keys({ toString: true }).length)
83
+ properties.push("toString", "valueOf");
84
+
85
+ for (var i = 0, length = properties.length; i < length; i++) {
86
+ var property = properties[i], value = source[property];
87
+ if (ancestor && Object.isFunction(value) &&
88
+ value.argumentNames().first() == "$super") {
89
+ var method = value;
90
+ value = (function(m) {
91
+ return function() { return ancestor[m].apply(this, arguments) };
92
+ })(property).wrap(method);
93
+
94
+ value.valueOf = method.valueOf.bind(method);
95
+ value.toString = method.toString.bind(method);
96
+ }
97
+ this.prototype[property] = value;
98
+ }
99
+
100
+ return this;
101
+ }
102
+ };
103
+
104
+ var Abstract = { };
105
+
106
+ Object.extend = function(destination, source) {
107
+ for (var property in source)
108
+ destination[property] = source[property];
109
+ return destination;
110
+ };
111
+
112
+ Object.extend(Object, {
113
+ inspect: function(object) {
114
+ try {
115
+ if (Object.isUndefined(object)) return 'undefined';
116
+ if (object === null) return 'null';
117
+ return object.inspect ? object.inspect() : String(object);
118
+ } catch (e) {
119
+ if (e instanceof RangeError) return '...';
120
+ throw e;
121
+ }
122
+ },
123
+
124
+ toJSON: function(object) {
125
+ var type = typeof object;
126
+ switch (type) {
127
+ case 'undefined':
128
+ case 'function':
129
+ case 'unknown': return;
130
+ case 'boolean': return object.toString();
131
+ }
132
+
133
+ if (object === null) return 'null';
134
+ if (object.toJSON) return object.toJSON();
135
+ if (Object.isElement(object)) return;
136
+
137
+ var results = [];
138
+ for (var property in object) {
139
+ var value = Object.toJSON(object[property]);
140
+ if (!Object.isUndefined(value))
141
+ results.push(property.toJSON() + ': ' + value);
142
+ }
143
+
144
+ return '{' + results.join(', ') + '}';
145
+ },
146
+
147
+ toQueryString: function(object) {
148
+ return $H(object).toQueryString();
149
+ },
150
+
151
+ toHTML: function(object) {
152
+ return object && object.toHTML ? object.toHTML() : String.interpret(object);
153
+ },
154
+
155
+ keys: function(object) {
156
+ var keys = [];
157
+ for (var property in object)
158
+ keys.push(property);
159
+ return keys;
160
+ },
161
+
162
+ values: function(object) {
163
+ var values = [];
164
+ for (var property in object)
165
+ values.push(object[property]);
166
+ return values;
167
+ },
168
+
169
+ clone: function(object) {
170
+ return Object.extend({ }, object);
171
+ },
172
+
173
+ isElement: function(object) {
174
+ return !!(object && object.nodeType == 1);
175
+ },
176
+
177
+ isArray: function(object) {
178
+ return object != null && typeof object == "object" &&
179
+ 'splice' in object && 'join' in object;
180
+ },
181
+
182
+ isHash: function(object) {
183
+ return object instanceof Hash;
184
+ },
185
+
186
+ isFunction: function(object) {
187
+ return typeof object == "function";
188
+ },
189
+
190
+ isString: function(object) {
191
+ return typeof object == "string";
192
+ },
193
+
194
+ isNumber: function(object) {
195
+ return typeof object == "number";
196
+ },
197
+
198
+ isUndefined: function(object) {
199
+ return typeof object == "undefined";
200
+ }
201
+ });
202
+
203
+ Object.extend(Function.prototype, {
204
+ argumentNames: function() {
205
+ var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
206
+ .replace(/\s+/g, '').split(',');
207
+ return names.length == 1 && !names[0] ? [] : names;
208
+ },
209
+
210
+ bind: function() {
211
+ if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
212
+ var __method = this, args = $A(arguments), object = args.shift();
213
+ return function() {
214
+ return __method.apply(object, args.concat($A(arguments)));
215
+ }
216
+ },
217
+
218
+ bindAsEventListener: function() {
219
+ var __method = this, args = $A(arguments), object = args.shift();
220
+ return function(event) {
221
+ return __method.apply(object, [event || window.event].concat(args));
222
+ }
223
+ },
224
+
225
+ curry: function() {
226
+ if (!arguments.length) return this;
227
+ var __method = this, args = $A(arguments);
228
+ return function() {
229
+ return __method.apply(this, args.concat($A(arguments)));
230
+ }
231
+ },
232
+
233
+ delay: function() {
234
+ var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
235
+ return window.setTimeout(function() {
236
+ return __method.apply(__method, args);
237
+ }, timeout);
238
+ },
239
+
240
+ defer: function() {
241
+ var args = [0.01].concat($A(arguments));
242
+ return this.delay.apply(this, args);
243
+ },
244
+
245
+ wrap: function(wrapper) {
246
+ var __method = this;
247
+ return function() {
248
+ return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
249
+ }
250
+ },
251
+
252
+ methodize: function() {
253
+ if (this._methodized) return this._methodized;
254
+ var __method = this;
255
+ return this._methodized = function() {
256
+ return __method.apply(null, [this].concat($A(arguments)));
257
+ };
258
+ }
259
+ });
260
+
261
+ Date.prototype.toJSON = function() {
262
+ return '"' + this.getUTCFullYear() + '-' +
263
+ (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
264
+ this.getUTCDate().toPaddedString(2) + 'T' +
265
+ this.getUTCHours().toPaddedString(2) + ':' +
266
+ this.getUTCMinutes().toPaddedString(2) + ':' +
267
+ this.getUTCSeconds().toPaddedString(2) + 'Z"';
268
+ };
269
+
270
+ var Try = {
271
+ these: function() {
272
+ var returnValue;
273
+
274
+ for (var i = 0, length = arguments.length; i < length; i++) {
275
+ var lambda = arguments[i];
276
+ try {
277
+ returnValue = lambda();
278
+ break;
279
+ } catch (e) { }
280
+ }
281
+
282
+ return returnValue;
283
+ }
284
+ };
285
+
286
+ RegExp.prototype.match = RegExp.prototype.test;
287
+
288
+ RegExp.escape = function(str) {
289
+ return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
290
+ };
291
+
292
+ /*--------------------------------------------------------------------------*/
293
+
294
+ var PeriodicalExecuter = Class.create({
295
+ initialize: function(callback, frequency) {
296
+ this.callback = callback;
297
+ this.frequency = frequency;
298
+ this.currentlyExecuting = false;
299
+
300
+ this.registerCallback();
301
+ },
302
+
303
+ registerCallback: function() {
304
+ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
305
+ },
306
+
307
+ execute: function() {
308
+ this.callback(this);
309
+ },
310
+
311
+ stop: function() {
312
+ if (!this.timer) return;
313
+ clearInterval(this.timer);
314
+ this.timer = null;
315
+ },
316
+
317
+ onTimerEvent: function() {
318
+ if (!this.currentlyExecuting) {
319
+ try {
320
+ this.currentlyExecuting = true;
321
+ this.execute();
322
+ } finally {
323
+ this.currentlyExecuting = false;
324
+ }
325
+ }
326
+ }
327
+ });
328
+ Object.extend(String, {
329
+ interpret: function(value) {
330
+ return value == null ? '' : String(value);
331
+ },
332
+ specialChar: {
333
+ '\b': '\\b',
334
+ '\t': '\\t',
335
+ '\n': '\\n',
336
+ '\f': '\\f',
337
+ '\r': '\\r',
338
+ '\\': '\\\\'
339
+ }
340
+ });
341
+
342
+ Object.extend(String.prototype, {
343
+ gsub: function(pattern, replacement) {
344
+ var result = '', source = this, match;
345
+ replacement = arguments.callee.prepareReplacement(replacement);
346
+
347
+ while (source.length > 0) {
348
+ if (match = source.match(pattern)) {
349
+ result += source.slice(0, match.index);
350
+ result += String.interpret(replacement(match));
351
+ source = source.slice(match.index + match[0].length);
352
+ } else {
353
+ result += source, source = '';
354
+ }
355
+ }
356
+ return result;
357
+ },
358
+
359
+ sub: function(pattern, replacement, count) {
360
+ replacement = this.gsub.prepareReplacement(replacement);
361
+ count = Object.isUndefined(count) ? 1 : count;
362
+
363
+ return this.gsub(pattern, function(match) {
364
+ if (--count < 0) return match[0];
365
+ return replacement(match);
366
+ });
367
+ },
368
+
369
+ scan: function(pattern, iterator) {
370
+ this.gsub(pattern, iterator);
371
+ return String(this);
372
+ },
373
+
374
+ truncate: function(length, truncation) {
375
+ length = length || 30;
376
+ truncation = Object.isUndefined(truncation) ? '...' : truncation;
377
+ return this.length > length ?
378
+ this.slice(0, length - truncation.length) + truncation : String(this);
379
+ },
380
+
381
+ strip: function() {
382
+ return this.replace(/^\s+/, '').replace(/\s+$/, '');
383
+ },
384
+
385
+ stripTags: function() {
386
+ return this.replace(/<\/?[^>]+>/gi, '');
387
+ },
388
+
389
+ stripScripts: function() {
390
+ return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
391
+ },
392
+
393
+ extractScripts: function() {
394
+ var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
395
+ var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
396
+ return (this.match(matchAll) || []).map(function(scriptTag) {
397
+ return (scriptTag.match(matchOne) || ['', ''])[1];
398
+ });
399
+ },
400
+
401
+ evalScripts: function() {
402
+ return this.extractScripts().map(function(script) { return eval(script) });
403
+ },
404
+
405
+ escapeHTML: function() {
406
+ var self = arguments.callee;
407
+ self.text.data = this;
408
+ return self.div.innerHTML;
409
+ },
410
+
411
+ unescapeHTML: function() {
412
+ var div = new Element('div');
413
+ div.innerHTML = this.stripTags();
414
+ return div.childNodes[0] ? (div.childNodes.length > 1 ?
415
+ $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
416
+ div.childNodes[0].nodeValue) : '';
417
+ },
418
+
419
+ toQueryParams: function(separator) {
420
+ var match = this.strip().match(/([^?#]*)(#.*)?$/);
421
+ if (!match) return { };
422
+
423
+ return match[1].split(separator || '&').inject({ }, function(hash, pair) {
424
+ if ((pair = pair.split('='))[0]) {
425
+ var key = decodeURIComponent(pair.shift());
426
+ var value = pair.length > 1 ? pair.join('=') : pair[0];
427
+ if (value != undefined) value = decodeURIComponent(value);
428
+
429
+ if (key in hash) {
430
+ if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
431
+ hash[key].push(value);
432
+ }
433
+ else hash[key] = value;
434
+ }
435
+ return hash;
436
+ });
437
+ },
438
+
439
+ toArray: function() {
440
+ return this.split('');
441
+ },
442
+
443
+ succ: function() {
444
+ return this.slice(0, this.length - 1) +
445
+ String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
446
+ },
447
+
448
+ times: function(count) {
449
+ return count < 1 ? '' : new Array(count + 1).join(this);
450
+ },
451
+
452
+ camelize: function() {
453
+ var parts = this.split('-'), len = parts.length;
454
+ if (len == 1) return parts[0];
455
+
456
+ var camelized = this.charAt(0) == '-'
457
+ ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
458
+ : parts[0];
459
+
460
+ for (var i = 1; i < len; i++)
461
+ camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
462
+
463
+ return camelized;
464
+ },
465
+
466
+ capitalize: function() {
467
+ return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
468
+ },
469
+
470
+ underscore: function() {
471
+ return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
472
+ },
473
+
474
+ dasherize: function() {
475
+ return this.gsub(/_/,'-');
476
+ },
477
+
478
+ inspect: function(useDoubleQuotes) {
479
+ var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
480
+ var character = String.specialChar[match[0]];
481
+ return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
482
+ });
483
+ if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
484
+ return "'" + escapedString.replace(/'/g, '\\\'') + "'";
485
+ },
486
+
487
+ toJSON: function() {
488
+ return this.inspect(true);
489
+ },
490
+
491
+ unfilterJSON: function(filter) {
492
+ return this.sub(filter || Prototype.JSONFilter, '#{1}');
493
+ },
494
+
495
+ isJSON: function() {
496
+ var str = this;
497
+ if (str.blank()) return false;
498
+ str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
499
+ return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
500
+ },
501
+
502
+ evalJSON: function(sanitize) {
503
+ var json = this.unfilterJSON();
504
+ try {
505
+ if (!sanitize || json.isJSON()) return eval('(' + json + ')');
506
+ } catch (e) { }
507
+ throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
508
+ },
509
+
510
+ include: function(pattern) {
511
+ return this.indexOf(pattern) > -1;
512
+ },
513
+
514
+ startsWith: function(pattern) {
515
+ return this.indexOf(pattern) === 0;
516
+ },
517
+
518
+ endsWith: function(pattern) {
519
+ var d = this.length - pattern.length;
520
+ return d >= 0 && this.lastIndexOf(pattern) === d;
521
+ },
522
+
523
+ empty: function() {
524
+ return this == '';
525
+ },
526
+
527
+ blank: function() {
528
+ return /^\s*$/.test(this);
529
+ },
530
+
531
+ interpolate: function(object, pattern) {
532
+ return new Template(this, pattern).evaluate(object);
533
+ }
534
+ });
535
+
536
+ if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
537
+ escapeHTML: function() {
538
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
539
+ },
540
+ unescapeHTML: function() {
541
+ return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
542
+ }
543
+ });
544
+
545
+ String.prototype.gsub.prepareReplacement = function(replacement) {
546
+ if (Object.isFunction(replacement)) return replacement;
547
+ var template = new Template(replacement);
548
+ return function(match) { return template.evaluate(match) };
549
+ };
550
+
551
+ String.prototype.parseQuery = String.prototype.toQueryParams;
552
+
553
+ Object.extend(String.prototype.escapeHTML, {
554
+ div: document.createElement('div'),
555
+ text: document.createTextNode('')
556
+ });
557
+
558
+ String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
559
+
560
+ var Template = Class.create({
561
+ initialize: function(template, pattern) {
562
+ this.template = template.toString();
563
+ this.pattern = pattern || Template.Pattern;
564
+ },
565
+
566
+ evaluate: function(object) {
567
+ if (Object.isFunction(object.toTemplateReplacements))
568
+ object = object.toTemplateReplacements();
569
+
570
+ return this.template.gsub(this.pattern, function(match) {
571
+ if (object == null) return '';
572
+
573
+ var before = match[1] || '';
574
+ if (before == '\\') return match[2];
575
+
576
+ var ctx = object, expr = match[3];
577
+ var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
578
+ match = pattern.exec(expr);
579
+ if (match == null) return before;
580
+
581
+ while (match != null) {
582
+ var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
583
+ ctx = ctx[comp];
584
+ if (null == ctx || '' == match[3]) break;
585
+ expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
586
+ match = pattern.exec(expr);
587
+ }
588
+
589
+ return before + String.interpret(ctx);
590
+ });
591
+ }
592
+ });
593
+ Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
594
+
595
+ var $break = { };
596
+
597
+ var Enumerable = {
598
+ each: function(iterator, context) {
599
+ var index = 0;
600
+ try {
601
+ this._each(function(value) {
602
+ iterator.call(context, value, index++);
603
+ });
604
+ } catch (e) {
605
+ if (e != $break) throw e;
606
+ }
607
+ return this;
608
+ },
609
+
610
+ eachSlice: function(number, iterator, context) {
611
+ var index = -number, slices = [], array = this.toArray();
612
+ if (number < 1) return array;
613
+ while ((index += number) < array.length)
614
+ slices.push(array.slice(index, index+number));
615
+ return slices.collect(iterator, context);
616
+ },
617
+
618
+ all: function(iterator, context) {
619
+ iterator = iterator || Prototype.K;
620
+ var result = true;
621
+ this.each(function(value, index) {
622
+ result = result && !!iterator.call(context, value, index);
623
+ if (!result) throw $break;
624
+ });
625
+ return result;
626
+ },
627
+
628
+ any: function(iterator, context) {
629
+ iterator = iterator || Prototype.K;
630
+ var result = false;
631
+ this.each(function(value, index) {
632
+ if (result = !!iterator.call(context, value, index))
633
+ throw $break;
634
+ });
635
+ return result;
636
+ },
637
+
638
+ collect: function(iterator, context) {
639
+ iterator = iterator || Prototype.K;
640
+ var results = [];
641
+ this.each(function(value, index) {
642
+ results.push(iterator.call(context, value, index));
643
+ });
644
+ return results;
645
+ },
646
+
647
+ detect: function(iterator, context) {
648
+ var result;
649
+ this.each(function(value, index) {
650
+ if (iterator.call(context, value, index)) {
651
+ result = value;
652
+ throw $break;
653
+ }
654
+ });
655
+ return result;
656
+ },
657
+
658
+ findAll: function(iterator, context) {
659
+ var results = [];
660
+ this.each(function(value, index) {
661
+ if (iterator.call(context, value, index))
662
+ results.push(value);
663
+ });
664
+ return results;
665
+ },
666
+
667
+ grep: function(filter, iterator, context) {
668
+ iterator = iterator || Prototype.K;
669
+ var results = [];
670
+
671
+ if (Object.isString(filter))
672
+ filter = new RegExp(filter);
673
+
674
+ this.each(function(value, index) {
675
+ if (filter.match(value))
676
+ results.push(iterator.call(context, value, index));
677
+ });
678
+ return results;
679
+ },
680
+
681
+ include: function(object) {
682
+ if (Object.isFunction(this.indexOf))
683
+ if (this.indexOf(object) != -1) return true;
684
+
685
+ var found = false;
686
+ this.each(function(value) {
687
+ if (value == object) {
688
+ found = true;
689
+ throw $break;
690
+ }
691
+ });
692
+ return found;
693
+ },
694
+
695
+ inGroupsOf: function(number, fillWith) {
696
+ fillWith = Object.isUndefined(fillWith) ? null : fillWith;
697
+ return this.eachSlice(number, function(slice) {
698
+ while(slice.length < number) slice.push(fillWith);
699
+ return slice;
700
+ });
701
+ },
702
+
703
+ inject: function(memo, iterator, context) {
704
+ this.each(function(value, index) {
705
+ memo = iterator.call(context, memo, value, index);
706
+ });
707
+ return memo;
708
+ },
709
+
710
+ invoke: function(method) {
711
+ var args = $A(arguments).slice(1);
712
+ return this.map(function(value) {
713
+ return value[method].apply(value, args);
714
+ });
715
+ },
716
+
717
+ max: function(iterator, context) {
718
+ iterator = iterator || Prototype.K;
719
+ var result;
720
+ this.each(function(value, index) {
721
+ value = iterator.call(context, value, index);
722
+ if (result == null || value >= result)
723
+ result = value;
724
+ });
725
+ return result;
726
+ },
727
+
728
+ min: function(iterator, context) {
729
+ iterator = iterator || Prototype.K;
730
+ var result;
731
+ this.each(function(value, index) {
732
+ value = iterator.call(context, value, index);
733
+ if (result == null || value < result)
734
+ result = value;
735
+ });
736
+ return result;
737
+ },
738
+
739
+ partition: function(iterator, context) {
740
+ iterator = iterator || Prototype.K;
741
+ var trues = [], falses = [];
742
+ this.each(function(value, index) {
743
+ (iterator.call(context, value, index) ?
744
+ trues : falses).push(value);
745
+ });
746
+ return [trues, falses];
747
+ },
748
+
749
+ pluck: function(property) {
750
+ var results = [];
751
+ this.each(function(value) {
752
+ results.push(value[property]);
753
+ });
754
+ return results;
755
+ },
756
+
757
+ reject: function(iterator, context) {
758
+ var results = [];
759
+ this.each(function(value, index) {
760
+ if (!iterator.call(context, value, index))
761
+ results.push(value);
762
+ });
763
+ return results;
764
+ },
765
+
766
+ sortBy: function(iterator, context) {
767
+ return this.map(function(value, index) {
768
+ return {
769
+ value: value,
770
+ criteria: iterator.call(context, value, index)
771
+ };
772
+ }).sort(function(left, right) {
773
+ var a = left.criteria, b = right.criteria;
774
+ return a < b ? -1 : a > b ? 1 : 0;
775
+ }).pluck('value');
776
+ },
777
+
778
+ toArray: function() {
779
+ return this.map();
780
+ },
781
+
782
+ zip: function() {
783
+ var iterator = Prototype.K, args = $A(arguments);
784
+ if (Object.isFunction(args.last()))
785
+ iterator = args.pop();
786
+
787
+ var collections = [this].concat(args).map($A);
788
+ return this.map(function(value, index) {
789
+ return iterator(collections.pluck(index));
790
+ });
791
+ },
792
+
793
+ size: function() {
794
+ return this.toArray().length;
795
+ },
796
+
797
+ inspect: function() {
798
+ return '#<Enumerable:' + this.toArray().inspect() + '>';
799
+ }
800
+ };
801
+
802
+ Object.extend(Enumerable, {
803
+ map: Enumerable.collect,
804
+ find: Enumerable.detect,
805
+ select: Enumerable.findAll,
806
+ filter: Enumerable.findAll,
807
+ member: Enumerable.include,
808
+ entries: Enumerable.toArray,
809
+ every: Enumerable.all,
810
+ some: Enumerable.any
811
+ });
812
+ function $A(iterable) {
813
+ if (!iterable) return [];
814
+ if (iterable.toArray) return iterable.toArray();
815
+ var length = iterable.length || 0, results = new Array(length);
816
+ while (length--) results[length] = iterable[length];
817
+ return results;
818
+ }
819
+
820
+ if (Prototype.Browser.WebKit) {
821
+ $A = function(iterable) {
822
+ if (!iterable) return [];
823
+ // In Safari, only use the `toArray` method if it's not a NodeList.
824
+ // A NodeList is a function, has an function `item` property, and a numeric
825
+ // `length` property. Adapted from Google Doctype.
826
+ if (!(typeof iterable === 'function' && typeof iterable.length ===
827
+ 'number' && typeof iterable.item === 'function') && iterable.toArray)
828
+ return iterable.toArray();
829
+ var length = iterable.length || 0, results = new Array(length);
830
+ while (length--) results[length] = iterable[length];
831
+ return results;
832
+ };
833
+ }
834
+
835
+ Array.from = $A;
836
+
837
+ Object.extend(Array.prototype, Enumerable);
838
+
839
+ if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
840
+
841
+ Object.extend(Array.prototype, {
842
+ _each: function(iterator) {
843
+ for (var i = 0, length = this.length; i < length; i++)
844
+ iterator(this[i]);
845
+ },
846
+
847
+ clear: function() {
848
+ this.length = 0;
849
+ return this;
850
+ },
851
+
852
+ first: function() {
853
+ return this[0];
854
+ },
855
+
856
+ last: function() {
857
+ return this[this.length - 1];
858
+ },
859
+
860
+ compact: function() {
861
+ return this.select(function(value) {
862
+ return value != null;
863
+ });
864
+ },
865
+
866
+ flatten: function() {
867
+ return this.inject([], function(array, value) {
868
+ return array.concat(Object.isArray(value) ?
869
+ value.flatten() : [value]);
870
+ });
871
+ },
872
+
873
+ without: function() {
874
+ var values = $A(arguments);
875
+ return this.select(function(value) {
876
+ return !values.include(value);
877
+ });
878
+ },
879
+
880
+ reverse: function(inline) {
881
+ return (inline !== false ? this : this.toArray())._reverse();
882
+ },
883
+
884
+ reduce: function() {
885
+ return this.length > 1 ? this : this[0];
886
+ },
887
+
888
+ uniq: function(sorted) {
889
+ return this.inject([], function(array, value, index) {
890
+ if (0 == index || (sorted ? array.last() != value : !array.include(value)))
891
+ array.push(value);
892
+ return array;
893
+ });
894
+ },
895
+
896
+ intersect: function(array) {
897
+ return this.uniq().findAll(function(item) {
898
+ return array.detect(function(value) { return item === value });
899
+ });
900
+ },
901
+
902
+ clone: function() {
903
+ return [].concat(this);
904
+ },
905
+
906
+ size: function() {
907
+ return this.length;
908
+ },
909
+
910
+ inspect: function() {
911
+ return '[' + this.map(Object.inspect).join(', ') + ']';
912
+ },
913
+
914
+ toJSON: function() {
915
+ var results = [];
916
+ this.each(function(object) {
917
+ var value = Object.toJSON(object);
918
+ if (!Object.isUndefined(value)) results.push(value);
919
+ });
920
+ return '[' + results.join(', ') + ']';
921
+ }
922
+ });
923
+
924
+ // use native browser JS 1.6 implementation if available
925
+ if (Object.isFunction(Array.prototype.forEach))
926
+ Array.prototype._each = Array.prototype.forEach;
927
+
928
+ if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
929
+ i || (i = 0);
930
+ var length = this.length;
931
+ if (i < 0) i = length + i;
932
+ for (; i < length; i++)
933
+ if (this[i] === item) return i;
934
+ return -1;
935
+ };
936
+
937
+ if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
938
+ i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
939
+ var n = this.slice(0, i).reverse().indexOf(item);
940
+ return (n < 0) ? n : i - n - 1;
941
+ };
942
+
943
+ Array.prototype.toArray = Array.prototype.clone;
944
+
945
+ function $w(string) {
946
+ if (!Object.isString(string)) return [];
947
+ string = string.strip();
948
+ return string ? string.split(/\s+/) : [];
949
+ }
950
+
951
+ if (Prototype.Browser.Opera){
952
+ Array.prototype.concat = function() {
953
+ var array = [];
954
+ for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
955
+ for (var i = 0, length = arguments.length; i < length; i++) {
956
+ if (Object.isArray(arguments[i])) {
957
+ for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
958
+ array.push(arguments[i][j]);
959
+ } else {
960
+ array.push(arguments[i]);
961
+ }
962
+ }
963
+ return array;
964
+ };
965
+ }
966
+ Object.extend(Number.prototype, {
967
+ toColorPart: function() {
968
+ return this.toPaddedString(2, 16);
969
+ },
970
+
971
+ succ: function() {
972
+ return this + 1;
973
+ },
974
+
975
+ times: function(iterator, context) {
976
+ $R(0, this, true).each(iterator, context);
977
+ return this;
978
+ },
979
+
980
+ toPaddedString: function(length, radix) {
981
+ var string = this.toString(radix || 10);
982
+ return '0'.times(length - string.length) + string;
983
+ },
984
+
985
+ toJSON: function() {
986
+ return isFinite(this) ? this.toString() : 'null';
987
+ }
988
+ });
989
+
990
+ $w('abs round ceil floor').each(function(method){
991
+ Number.prototype[method] = Math[method].methodize();
992
+ });
993
+ function $H(object) {
994
+ return new Hash(object);
995
+ };
996
+
997
+ var Hash = Class.create(Enumerable, (function() {
998
+
999
+ function toQueryPair(key, value) {
1000
+ if (Object.isUndefined(value)) return key;
1001
+ return key + '=' + encodeURIComponent(String.interpret(value));
1002
+ }
1003
+
1004
+ return {
1005
+ initialize: function(object) {
1006
+ this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
1007
+ },
1008
+
1009
+ _each: function(iterator) {
1010
+ for (var key in this._object) {
1011
+ var value = this._object[key], pair = [key, value];
1012
+ pair.key = key;
1013
+ pair.value = value;
1014
+ iterator(pair);
1015
+ }
1016
+ },
1017
+
1018
+ set: function(key, value) {
1019
+ return this._object[key] = value;
1020
+ },
1021
+
1022
+ get: function(key) {
1023
+ // simulating poorly supported hasOwnProperty
1024
+ if (this._object[key] !== Object.prototype[key])
1025
+ return this._object[key];
1026
+ },
1027
+
1028
+ unset: function(key) {
1029
+ var value = this._object[key];
1030
+ delete this._object[key];
1031
+ return value;
1032
+ },
1033
+
1034
+ toObject: function() {
1035
+ return Object.clone(this._object);
1036
+ },
1037
+
1038
+ keys: function() {
1039
+ return this.pluck('key');
1040
+ },
1041
+
1042
+ values: function() {
1043
+ return this.pluck('value');
1044
+ },
1045
+
1046
+ index: function(value) {
1047
+ var match = this.detect(function(pair) {
1048
+ return pair.value === value;
1049
+ });
1050
+ return match && match.key;
1051
+ },
1052
+
1053
+ merge: function(object) {
1054
+ return this.clone().update(object);
1055
+ },
1056
+
1057
+ update: function(object) {
1058
+ return new Hash(object).inject(this, function(result, pair) {
1059
+ result.set(pair.key, pair.value);
1060
+ return result;
1061
+ });
1062
+ },
1063
+
1064
+ toQueryString: function() {
1065
+ return this.inject([], function(results, pair) {
1066
+ var key = encodeURIComponent(pair.key), values = pair.value;
1067
+
1068
+ if (values && typeof values == 'object') {
1069
+ if (Object.isArray(values))
1070
+ return results.concat(values.map(toQueryPair.curry(key)));
1071
+ } else results.push(toQueryPair(key, values));
1072
+ return results;
1073
+ }).join('&');
1074
+ },
1075
+
1076
+ inspect: function() {
1077
+ return '#<Hash:{' + this.map(function(pair) {
1078
+ return pair.map(Object.inspect).join(': ');
1079
+ }).join(', ') + '}>';
1080
+ },
1081
+
1082
+ toJSON: function() {
1083
+ return Object.toJSON(this.toObject());
1084
+ },
1085
+
1086
+ clone: function() {
1087
+ return new Hash(this);
1088
+ }
1089
+ }
1090
+ })());
1091
+
1092
+ Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
1093
+ Hash.from = $H;
1094
+ var ObjectRange = Class.create(Enumerable, {
1095
+ initialize: function(start, end, exclusive) {
1096
+ this.start = start;
1097
+ this.end = end;
1098
+ this.exclusive = exclusive;
1099
+ },
1100
+
1101
+ _each: function(iterator) {
1102
+ var value = this.start;
1103
+ while (this.include(value)) {
1104
+ iterator(value);
1105
+ value = value.succ();
1106
+ }
1107
+ },
1108
+
1109
+ include: function(value) {
1110
+ if (value < this.start)
1111
+ return false;
1112
+ if (this.exclusive)
1113
+ return value < this.end;
1114
+ return value <= this.end;
1115
+ }
1116
+ });
1117
+
1118
+ var $R = function(start, end, exclusive) {
1119
+ return new ObjectRange(start, end, exclusive);
1120
+ };
1121
+
1122
+ var Ajax = {
1123
+ getTransport: function() {
1124
+ return Try.these(
1125
+ function() {return new XMLHttpRequest()},
1126
+ function() {return new ActiveXObject('Msxml2.XMLHTTP')},
1127
+ function() {return new ActiveXObject('Microsoft.XMLHTTP')}
1128
+ ) || false;
1129
+ },
1130
+
1131
+ activeRequestCount: 0
1132
+ };
1133
+
1134
+ Ajax.Responders = {
1135
+ responders: [],
1136
+
1137
+ _each: function(iterator) {
1138
+ this.responders._each(iterator);
1139
+ },
1140
+
1141
+ register: function(responder) {
1142
+ if (!this.include(responder))
1143
+ this.responders.push(responder);
1144
+ },
1145
+
1146
+ unregister: function(responder) {
1147
+ this.responders = this.responders.without(responder);
1148
+ },
1149
+
1150
+ dispatch: function(callback, request, transport, json) {
1151
+ this.each(function(responder) {
1152
+ if (Object.isFunction(responder[callback])) {
1153
+ try {
1154
+ responder[callback].apply(responder, [request, transport, json]);
1155
+ } catch (e) { }
1156
+ }
1157
+ });
1158
+ }
1159
+ };
1160
+
1161
+ Object.extend(Ajax.Responders, Enumerable);
1162
+
1163
+ Ajax.Responders.register({
1164
+ onCreate: function() { Ajax.activeRequestCount++ },
1165
+ onComplete: function() { Ajax.activeRequestCount-- }
1166
+ });
1167
+
1168
+ Ajax.Base = Class.create({
1169
+ initialize: function(options) {
1170
+ this.options = {
1171
+ method: 'post',
1172
+ asynchronous: true,
1173
+ contentType: 'application/x-www-form-urlencoded',
1174
+ encoding: 'UTF-8',
1175
+ parameters: '',
1176
+ evalJSON: true,
1177
+ evalJS: true
1178
+ };
1179
+ Object.extend(this.options, options || { });
1180
+
1181
+ this.options.method = this.options.method.toLowerCase();
1182
+
1183
+ if (Object.isString(this.options.parameters))
1184
+ this.options.parameters = this.options.parameters.toQueryParams();
1185
+ else if (Object.isHash(this.options.parameters))
1186
+ this.options.parameters = this.options.parameters.toObject();
1187
+ }
1188
+ });
1189
+
1190
+ Ajax.Request = Class.create(Ajax.Base, {
1191
+ _complete: false,
1192
+
1193
+ initialize: function($super, url, options) {
1194
+ $super(options);
1195
+ this.transport = Ajax.getTransport();
1196
+ this.request(url);
1197
+ },
1198
+
1199
+ request: function(url) {
1200
+ this.url = url;
1201
+ this.method = this.options.method;
1202
+ var params = Object.clone(this.options.parameters);
1203
+
1204
+ if (!['get', 'post'].include(this.method)) {
1205
+ // simulate other verbs over post
1206
+ params['_method'] = this.method;
1207
+ this.method = 'post';
1208
+ }
1209
+
1210
+ this.parameters = params;
1211
+
1212
+ if (params = Object.toQueryString(params)) {
1213
+ // when GET, append parameters to URL
1214
+ if (this.method == 'get')
1215
+ this.url += (this.url.include('?') ? '&' : '?') + params;
1216
+ else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
1217
+ params += '&_=';
1218
+ }
1219
+
1220
+ try {
1221
+ var response = new Ajax.Response(this);
1222
+ if (this.options.onCreate) this.options.onCreate(response);
1223
+ Ajax.Responders.dispatch('onCreate', this, response);
1224
+
1225
+ this.transport.open(this.method.toUpperCase(), this.url,
1226
+ this.options.asynchronous);
1227
+
1228
+ if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
1229
+
1230
+ this.transport.onreadystatechange = this.onStateChange.bind(this);
1231
+ this.setRequestHeaders();
1232
+
1233
+ this.body = this.method == 'post' ? (this.options.postBody || params) : null;
1234
+ this.transport.send(this.body);
1235
+
1236
+ /* Force Firefox to handle ready state 4 for synchronous requests */
1237
+ if (!this.options.asynchronous && this.transport.overrideMimeType)
1238
+ this.onStateChange();
1239
+
1240
+ }
1241
+ catch (e) {
1242
+ this.dispatchException(e);
1243
+ }
1244
+ },
1245
+
1246
+ onStateChange: function() {
1247
+ var readyState = this.transport.readyState;
1248
+ if (readyState > 1 && !((readyState == 4) && this._complete))
1249
+ this.respondToReadyState(this.transport.readyState);
1250
+ },
1251
+
1252
+ setRequestHeaders: function() {
1253
+ var headers = {
1254
+ 'X-Requested-With': 'XMLHttpRequest',
1255
+ 'X-Prototype-Version': Prototype.Version,
1256
+ 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
1257
+ };
1258
+
1259
+ if (this.method == 'post') {
1260
+ headers['Content-type'] = this.options.contentType +
1261
+ (this.options.encoding ? '; charset=' + this.options.encoding : '');
1262
+
1263
+ /* Force "Connection: close" for older Mozilla browsers to work
1264
+ * around a bug where XMLHttpRequest sends an incorrect
1265
+ * Content-length header. See Mozilla Bugzilla #246651.
1266
+ */
1267
+ if (this.transport.overrideMimeType &&
1268
+ (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
1269
+ headers['Connection'] = 'close';
1270
+ }
1271
+
1272
+ // user-defined headers
1273
+ if (typeof this.options.requestHeaders == 'object') {
1274
+ var extras = this.options.requestHeaders;
1275
+
1276
+ if (Object.isFunction(extras.push))
1277
+ for (var i = 0, length = extras.length; i < length; i += 2)
1278
+ headers[extras[i]] = extras[i+1];
1279
+ else
1280
+ $H(extras).each(function(pair) { headers[pair.key] = pair.value });
1281
+ }
1282
+
1283
+ for (var name in headers)
1284
+ this.transport.setRequestHeader(name, headers[name]);
1285
+ },
1286
+
1287
+ success: function() {
1288
+ var status = this.getStatus();
1289
+ return !status || (status >= 200 && status < 300);
1290
+ },
1291
+
1292
+ getStatus: function() {
1293
+ try {
1294
+ return this.transport.status || 0;
1295
+ } catch (e) { return 0 }
1296
+ },
1297
+
1298
+ respondToReadyState: function(readyState) {
1299
+ var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
1300
+
1301
+ if (state == 'Complete') {
1302
+ try {
1303
+ this._complete = true;
1304
+ (this.options['on' + response.status]
1305
+ || this.options['on' + (this.success() ? 'Success' : 'Failure')]
1306
+ || Prototype.emptyFunction)(response, response.headerJSON);
1307
+ } catch (e) {
1308
+ this.dispatchException(e);
1309
+ }
1310
+
1311
+ var contentType = response.getHeader('Content-type');
1312
+ if (this.options.evalJS == 'force'
1313
+ || (this.options.evalJS && this.isSameOrigin() && contentType
1314
+ && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
1315
+ this.evalResponse();
1316
+ }
1317
+
1318
+ try {
1319
+ (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
1320
+ Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
1321
+ } catch (e) {
1322
+ this.dispatchException(e);
1323
+ }
1324
+
1325
+ if (state == 'Complete') {
1326
+ // avoid memory leak in MSIE: clean up
1327
+ this.transport.onreadystatechange = Prototype.emptyFunction;
1328
+ }
1329
+ },
1330
+
1331
+ isSameOrigin: function() {
1332
+ var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
1333
+ return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
1334
+ protocol: location.protocol,
1335
+ domain: document.domain,
1336
+ port: location.port ? ':' + location.port : ''
1337
+ }));
1338
+ },
1339
+
1340
+ getHeader: function(name) {
1341
+ try {
1342
+ return this.transport.getResponseHeader(name) || null;
1343
+ } catch (e) { return null }
1344
+ },
1345
+
1346
+ evalResponse: function() {
1347
+ try {
1348
+ return eval((this.transport.responseText || '').unfilterJSON());
1349
+ } catch (e) {
1350
+ this.dispatchException(e);
1351
+ }
1352
+ },
1353
+
1354
+ dispatchException: function(exception) {
1355
+ (this.options.onException || Prototype.emptyFunction)(this, exception);
1356
+ Ajax.Responders.dispatch('onException', this, exception);
1357
+ }
1358
+ });
1359
+
1360
+ Ajax.Request.Events =
1361
+ ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
1362
+
1363
+ Ajax.Response = Class.create({
1364
+ initialize: function(request){
1365
+ this.request = request;
1366
+ var transport = this.transport = request.transport,
1367
+ readyState = this.readyState = transport.readyState;
1368
+
1369
+ if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
1370
+ this.status = this.getStatus();
1371
+ this.statusText = this.getStatusText();
1372
+ this.responseText = String.interpret(transport.responseText);
1373
+ this.headerJSON = this._getHeaderJSON();
1374
+ }
1375
+
1376
+ if(readyState == 4) {
1377
+ var xml = transport.responseXML;
1378
+ this.responseXML = Object.isUndefined(xml) ? null : xml;
1379
+ this.responseJSON = this._getResponseJSON();
1380
+ }
1381
+ },
1382
+
1383
+ status: 0,
1384
+ statusText: '',
1385
+
1386
+ getStatus: Ajax.Request.prototype.getStatus,
1387
+
1388
+ getStatusText: function() {
1389
+ try {
1390
+ return this.transport.statusText || '';
1391
+ } catch (e) { return '' }
1392
+ },
1393
+
1394
+ getHeader: Ajax.Request.prototype.getHeader,
1395
+
1396
+ getAllHeaders: function() {
1397
+ try {
1398
+ return this.getAllResponseHeaders();
1399
+ } catch (e) { return null }
1400
+ },
1401
+
1402
+ getResponseHeader: function(name) {
1403
+ return this.transport.getResponseHeader(name);
1404
+ },
1405
+
1406
+ getAllResponseHeaders: function() {
1407
+ return this.transport.getAllResponseHeaders();
1408
+ },
1409
+
1410
+ _getHeaderJSON: function() {
1411
+ var json = this.getHeader('X-JSON');
1412
+ if (!json) return null;
1413
+ json = decodeURIComponent(escape(json));
1414
+ try {
1415
+ return json.evalJSON(this.request.options.sanitizeJSON ||
1416
+ !this.request.isSameOrigin());
1417
+ } catch (e) {
1418
+ this.request.dispatchException(e);
1419
+ }
1420
+ },
1421
+
1422
+ _getResponseJSON: function() {
1423
+ var options = this.request.options;
1424
+ if (!options.evalJSON || (options.evalJSON != 'force' &&
1425
+ !(this.getHeader('Content-type') || '').include('application/json')) ||
1426
+ this.responseText.blank())
1427
+ return null;
1428
+ try {
1429
+ return this.responseText.evalJSON(options.sanitizeJSON ||
1430
+ !this.request.isSameOrigin());
1431
+ } catch (e) {
1432
+ this.request.dispatchException(e);
1433
+ }
1434
+ }
1435
+ });
1436
+
1437
+ Ajax.Updater = Class.create(Ajax.Request, {
1438
+ initialize: function($super, container, url, options) {
1439
+ this.container = {
1440
+ success: (container.success || container),
1441
+ failure: (container.failure || (container.success ? null : container))
1442
+ };
1443
+
1444
+ options = Object.clone(options);
1445
+ var onComplete = options.onComplete;
1446
+ options.onComplete = (function(response, json) {
1447
+ this.updateContent(response.responseText);
1448
+ if (Object.isFunction(onComplete)) onComplete(response, json);
1449
+ }).bind(this);
1450
+
1451
+ $super(url, options);
1452
+ },
1453
+
1454
+ updateContent: function(responseText) {
1455
+ var receiver = this.container[this.success() ? 'success' : 'failure'],
1456
+ options = this.options;
1457
+
1458
+ if (!options.evalScripts) responseText = responseText.stripScripts();
1459
+
1460
+ if (receiver = $(receiver)) {
1461
+ if (options.insertion) {
1462
+ if (Object.isString(options.insertion)) {
1463
+ var insertion = { }; insertion[options.insertion] = responseText;
1464
+ receiver.insert(insertion);
1465
+ }
1466
+ else options.insertion(receiver, responseText);
1467
+ }
1468
+ else receiver.update(responseText);
1469
+ }
1470
+ }
1471
+ });
1472
+
1473
+ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
1474
+ initialize: function($super, container, url, options) {
1475
+ $super(options);
1476
+ this.onComplete = this.options.onComplete;
1477
+
1478
+ this.frequency = (this.options.frequency || 2);
1479
+ this.decay = (this.options.decay || 1);
1480
+
1481
+ this.updater = { };
1482
+ this.container = container;
1483
+ this.url = url;
1484
+
1485
+ this.start();
1486
+ },
1487
+
1488
+ start: function() {
1489
+ this.options.onComplete = this.updateComplete.bind(this);
1490
+ this.onTimerEvent();
1491
+ },
1492
+
1493
+ stop: function() {
1494
+ this.updater.options.onComplete = undefined;
1495
+ clearTimeout(this.timer);
1496
+ (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
1497
+ },
1498
+
1499
+ updateComplete: function(response) {
1500
+ if (this.options.decay) {
1501
+ this.decay = (response.responseText == this.lastText ?
1502
+ this.decay * this.options.decay : 1);
1503
+
1504
+ this.lastText = response.responseText;
1505
+ }
1506
+ this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
1507
+ },
1508
+
1509
+ onTimerEvent: function() {
1510
+ this.updater = new Ajax.Updater(this.container, this.url, this.options);
1511
+ }
1512
+ });
1513
+ function $(element) {
1514
+ if (arguments.length > 1) {
1515
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
1516
+ elements.push($(arguments[i]));
1517
+ return elements;
1518
+ }
1519
+ if (Object.isString(element))
1520
+ element = document.getElementById(element);
1521
+ return Element.extend(element);
1522
+ }
1523
+
1524
+ if (Prototype.BrowserFeatures.XPath) {
1525
+ document._getElementsByXPath = function(expression, parentElement) {
1526
+ var results = [];
1527
+ var query = document.evaluate(expression, $(parentElement) || document,
1528
+ null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
1529
+ for (var i = 0, length = query.snapshotLength; i < length; i++)
1530
+ results.push(Element.extend(query.snapshotItem(i)));
1531
+ return results;
1532
+ };
1533
+ }
1534
+
1535
+ /*--------------------------------------------------------------------------*/
1536
+
1537
+ if (!window.Node) var Node = { };
1538
+
1539
+ if (!Node.ELEMENT_NODE) {
1540
+ // DOM level 2 ECMAScript Language Binding
1541
+ Object.extend(Node, {
1542
+ ELEMENT_NODE: 1,
1543
+ ATTRIBUTE_NODE: 2,
1544
+ TEXT_NODE: 3,
1545
+ CDATA_SECTION_NODE: 4,
1546
+ ENTITY_REFERENCE_NODE: 5,
1547
+ ENTITY_NODE: 6,
1548
+ PROCESSING_INSTRUCTION_NODE: 7,
1549
+ COMMENT_NODE: 8,
1550
+ DOCUMENT_NODE: 9,
1551
+ DOCUMENT_TYPE_NODE: 10,
1552
+ DOCUMENT_FRAGMENT_NODE: 11,
1553
+ NOTATION_NODE: 12
1554
+ });
1555
+ }
1556
+
1557
+ (function() {
1558
+ var element = this.Element;
1559
+ this.Element = function(tagName, attributes) {
1560
+ attributes = attributes || { };
1561
+ tagName = tagName.toLowerCase();
1562
+ var cache = Element.cache;
1563
+ if (Prototype.Browser.IE && attributes.name) {
1564
+ tagName = '<' + tagName + ' name="' + attributes.name + '">';
1565
+ delete attributes.name;
1566
+ return Element.writeAttribute(document.createElement(tagName), attributes);
1567
+ }
1568
+ if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
1569
+ return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
1570
+ };
1571
+ Object.extend(this.Element, element || { });
1572
+ if (element) this.Element.prototype = element.prototype;
1573
+ }).call(window);
1574
+
1575
+ Element.cache = { };
1576
+
1577
+ Element.Methods = {
1578
+ visible: function(element) {
1579
+ return $(element).style.display != 'none';
1580
+ },
1581
+
1582
+ toggle: function(element) {
1583
+ element = $(element);
1584
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
1585
+ return element;
1586
+ },
1587
+
1588
+ hide: function(element) {
1589
+ element = $(element);
1590
+ element.style.display = 'none';
1591
+ return element;
1592
+ },
1593
+
1594
+ show: function(element) {
1595
+ element = $(element);
1596
+ element.style.display = '';
1597
+ return element;
1598
+ },
1599
+
1600
+ remove: function(element) {
1601
+ element = $(element);
1602
+ element.parentNode.removeChild(element);
1603
+ return element;
1604
+ },
1605
+
1606
+ update: function(element, content) {
1607
+ element = $(element);
1608
+ if (content && content.toElement) content = content.toElement();
1609
+ if (Object.isElement(content)) return element.update().insert(content);
1610
+ content = Object.toHTML(content);
1611
+ element.innerHTML = content.stripScripts();
1612
+ content.evalScripts.bind(content).defer();
1613
+ return element;
1614
+ },
1615
+
1616
+ replace: function(element, content) {
1617
+ element = $(element);
1618
+ if (content && content.toElement) content = content.toElement();
1619
+ else if (!Object.isElement(content)) {
1620
+ content = Object.toHTML(content);
1621
+ var range = element.ownerDocument.createRange();
1622
+ range.selectNode(element);
1623
+ content.evalScripts.bind(content).defer();
1624
+ content = range.createContextualFragment(content.stripScripts());
1625
+ }
1626
+ element.parentNode.replaceChild(content, element);
1627
+ return element;
1628
+ },
1629
+
1630
+ insert: function(element, insertions) {
1631
+ element = $(element);
1632
+
1633
+ if (Object.isString(insertions) || Object.isNumber(insertions) ||
1634
+ Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
1635
+ insertions = {bottom:insertions};
1636
+
1637
+ var content, insert, tagName, childNodes;
1638
+
1639
+ for (var position in insertions) {
1640
+ content = insertions[position];
1641
+ position = position.toLowerCase();
1642
+ insert = Element._insertionTranslations[position];
1643
+
1644
+ if (content && content.toElement) content = content.toElement();
1645
+ if (Object.isElement(content)) {
1646
+ insert(element, content);
1647
+ continue;
1648
+ }
1649
+
1650
+ content = Object.toHTML(content);
1651
+
1652
+ tagName = ((position == 'before' || position == 'after')
1653
+ ? element.parentNode : element).tagName.toUpperCase();
1654
+
1655
+ childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
1656
+
1657
+ if (position == 'top' || position == 'after') childNodes.reverse();
1658
+ childNodes.each(insert.curry(element));
1659
+
1660
+ content.evalScripts.bind(content).defer();
1661
+ }
1662
+
1663
+ return element;
1664
+ },
1665
+
1666
+ wrap: function(element, wrapper, attributes) {
1667
+ element = $(element);
1668
+ if (Object.isElement(wrapper))
1669
+ $(wrapper).writeAttribute(attributes || { });
1670
+ else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
1671
+ else wrapper = new Element('div', wrapper);
1672
+ if (element.parentNode)
1673
+ element.parentNode.replaceChild(wrapper, element);
1674
+ wrapper.appendChild(element);
1675
+ return wrapper;
1676
+ },
1677
+
1678
+ inspect: function(element) {
1679
+ element = $(element);
1680
+ var result = '<' + element.tagName.toLowerCase();
1681
+ $H({'id': 'id', 'className': 'class'}).each(function(pair) {
1682
+ var property = pair.first(), attribute = pair.last();
1683
+ var value = (element[property] || '').toString();
1684
+ if (value) result += ' ' + attribute + '=' + value.inspect(true);
1685
+ });
1686
+ return result + '>';
1687
+ },
1688
+
1689
+ recursivelyCollect: function(element, property) {
1690
+ element = $(element);
1691
+ var elements = [];
1692
+ while (element = element[property])
1693
+ if (element.nodeType == 1)
1694
+ elements.push(Element.extend(element));
1695
+ return elements;
1696
+ },
1697
+
1698
+ ancestors: function(element) {
1699
+ return $(element).recursivelyCollect('parentNode');
1700
+ },
1701
+
1702
+ descendants: function(element) {
1703
+ return $(element).select("*");
1704
+ },
1705
+
1706
+ firstDescendant: function(element) {
1707
+ element = $(element).firstChild;
1708
+ while (element && element.nodeType != 1) element = element.nextSibling;
1709
+ return $(element);
1710
+ },
1711
+
1712
+ immediateDescendants: function(element) {
1713
+ if (!(element = $(element).firstChild)) return [];
1714
+ while (element && element.nodeType != 1) element = element.nextSibling;
1715
+ if (element) return [element].concat($(element).nextSiblings());
1716
+ return [];
1717
+ },
1718
+
1719
+ previousSiblings: function(element) {
1720
+ return $(element).recursivelyCollect('previousSibling');
1721
+ },
1722
+
1723
+ nextSiblings: function(element) {
1724
+ return $(element).recursivelyCollect('nextSibling');
1725
+ },
1726
+
1727
+ siblings: function(element) {
1728
+ element = $(element);
1729
+ return element.previousSiblings().reverse().concat(element.nextSiblings());
1730
+ },
1731
+
1732
+ match: function(element, selector) {
1733
+ if (Object.isString(selector))
1734
+ selector = new Selector(selector);
1735
+ return selector.match($(element));
1736
+ },
1737
+
1738
+ up: function(element, expression, index) {
1739
+ element = $(element);
1740
+ if (arguments.length == 1) return $(element.parentNode);
1741
+ var ancestors = element.ancestors();
1742
+ return Object.isNumber(expression) ? ancestors[expression] :
1743
+ Selector.findElement(ancestors, expression, index);
1744
+ },
1745
+
1746
+ down: function(element, expression, index) {
1747
+ element = $(element);
1748
+ if (arguments.length == 1) return element.firstDescendant();
1749
+ return Object.isNumber(expression) ? element.descendants()[expression] :
1750
+ Element.select(element, expression)[index || 0];
1751
+ },
1752
+
1753
+ previous: function(element, expression, index) {
1754
+ element = $(element);
1755
+ if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
1756
+ var previousSiblings = element.previousSiblings();
1757
+ return Object.isNumber(expression) ? previousSiblings[expression] :
1758
+ Selector.findElement(previousSiblings, expression, index);
1759
+ },
1760
+
1761
+ next: function(element, expression, index) {
1762
+ element = $(element);
1763
+ if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
1764
+ var nextSiblings = element.nextSiblings();
1765
+ return Object.isNumber(expression) ? nextSiblings[expression] :
1766
+ Selector.findElement(nextSiblings, expression, index);
1767
+ },
1768
+
1769
+ select: function() {
1770
+ var args = $A(arguments), element = $(args.shift());
1771
+ return Selector.findChildElements(element, args);
1772
+ },
1773
+
1774
+ adjacent: function() {
1775
+ var args = $A(arguments), element = $(args.shift());
1776
+ return Selector.findChildElements(element.parentNode, args).without(element);
1777
+ },
1778
+
1779
+ identify: function(element) {
1780
+ element = $(element);
1781
+ var id = element.readAttribute('id'), self = arguments.callee;
1782
+ if (id) return id;
1783
+ do { id = 'anonymous_element_' + self.counter++ } while ($(id));
1784
+ element.writeAttribute('id', id);
1785
+ return id;
1786
+ },
1787
+
1788
+ readAttribute: function(element, name) {
1789
+ element = $(element);
1790
+ if (Prototype.Browser.IE) {
1791
+ var t = Element._attributeTranslations.read;
1792
+ if (t.values[name]) return t.values[name](element, name);
1793
+ if (t.names[name]) name = t.names[name];
1794
+ if (name.include(':')) {
1795
+ return (!element.attributes || !element.attributes[name]) ? null :
1796
+ element.attributes[name].value;
1797
+ }
1798
+ }
1799
+ return element.getAttribute(name);
1800
+ },
1801
+
1802
+ writeAttribute: function(element, name, value) {
1803
+ element = $(element);
1804
+ var attributes = { }, t = Element._attributeTranslations.write;
1805
+
1806
+ if (typeof name == 'object') attributes = name;
1807
+ else attributes[name] = Object.isUndefined(value) ? true : value;
1808
+
1809
+ for (var attr in attributes) {
1810
+ name = t.names[attr] || attr;
1811
+ value = attributes[attr];
1812
+ if (t.values[attr]) name = t.values[attr](element, value);
1813
+ if (value === false || value === null)
1814
+ element.removeAttribute(name);
1815
+ else if (value === true)
1816
+ element.setAttribute(name, name);
1817
+ else element.setAttribute(name, value);
1818
+ }
1819
+ return element;
1820
+ },
1821
+
1822
+ getHeight: function(element) {
1823
+ return $(element).getDimensions().height;
1824
+ },
1825
+
1826
+ getWidth: function(element) {
1827
+ return $(element).getDimensions().width;
1828
+ },
1829
+
1830
+ classNames: function(element) {
1831
+ return new Element.ClassNames(element);
1832
+ },
1833
+
1834
+ hasClassName: function(element, className) {
1835
+ if (!(element = $(element))) return;
1836
+ var elementClassName = element.className;
1837
+ return (elementClassName.length > 0 && (elementClassName == className ||
1838
+ new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
1839
+ },
1840
+
1841
+ addClassName: function(element, className) {
1842
+ if (!(element = $(element))) return;
1843
+ if (!element.hasClassName(className))
1844
+ element.className += (element.className ? ' ' : '') + className;
1845
+ return element;
1846
+ },
1847
+
1848
+ removeClassName: function(element, className) {
1849
+ if (!(element = $(element))) return;
1850
+ element.className = element.className.replace(
1851
+ new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
1852
+ return element;
1853
+ },
1854
+
1855
+ toggleClassName: function(element, className) {
1856
+ if (!(element = $(element))) return;
1857
+ return element[element.hasClassName(className) ?
1858
+ 'removeClassName' : 'addClassName'](className);
1859
+ },
1860
+
1861
+ // removes whitespace-only text node children
1862
+ cleanWhitespace: function(element) {
1863
+ element = $(element);
1864
+ var node = element.firstChild;
1865
+ while (node) {
1866
+ var nextNode = node.nextSibling;
1867
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
1868
+ element.removeChild(node);
1869
+ node = nextNode;
1870
+ }
1871
+ return element;
1872
+ },
1873
+
1874
+ empty: function(element) {
1875
+ return $(element).innerHTML.blank();
1876
+ },
1877
+
1878
+ descendantOf: function(element, ancestor) {
1879
+ element = $(element), ancestor = $(ancestor);
1880
+
1881
+ if (element.compareDocumentPosition)
1882
+ return (element.compareDocumentPosition(ancestor) & 8) === 8;
1883
+
1884
+ if (ancestor.contains)
1885
+ return ancestor.contains(element) && ancestor !== element;
1886
+
1887
+ while (element = element.parentNode)
1888
+ if (element == ancestor) return true;
1889
+
1890
+ return false;
1891
+ },
1892
+
1893
+ scrollTo: function(element) {
1894
+ element = $(element);
1895
+ var pos = element.cumulativeOffset();
1896
+ window.scrollTo(pos[0], pos[1]);
1897
+ return element;
1898
+ },
1899
+
1900
+ getStyle: function(element, style) {
1901
+ element = $(element);
1902
+ style = style == 'float' ? 'cssFloat' : style.camelize();
1903
+ var value = element.style[style];
1904
+ if (!value || value == 'auto') {
1905
+ var css = document.defaultView.getComputedStyle(element, null);
1906
+ value = css ? css[style] : null;
1907
+ }
1908
+ if (style == 'opacity') return value ? parseFloat(value) : 1.0;
1909
+ return value == 'auto' ? null : value;
1910
+ },
1911
+
1912
+ getOpacity: function(element) {
1913
+ return $(element).getStyle('opacity');
1914
+ },
1915
+
1916
+ setStyle: function(element, styles) {
1917
+ element = $(element);
1918
+ var elementStyle = element.style, match;
1919
+ if (Object.isString(styles)) {
1920
+ element.style.cssText += ';' + styles;
1921
+ return styles.include('opacity') ?
1922
+ element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
1923
+ }
1924
+ for (var property in styles)
1925
+ if (property == 'opacity') element.setOpacity(styles[property]);
1926
+ else
1927
+ elementStyle[(property == 'float' || property == 'cssFloat') ?
1928
+ (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
1929
+ property] = styles[property];
1930
+
1931
+ return element;
1932
+ },
1933
+
1934
+ setOpacity: function(element, value) {
1935
+ element = $(element);
1936
+ element.style.opacity = (value == 1 || value === '') ? '' :
1937
+ (value < 0.00001) ? 0 : value;
1938
+ return element;
1939
+ },
1940
+
1941
+ getDimensions: function(element) {
1942
+ element = $(element);
1943
+ var display = element.getStyle('display');
1944
+ if (display != 'none' && display != null) // Safari bug
1945
+ return {width: element.offsetWidth, height: element.offsetHeight};
1946
+
1947
+ // All *Width and *Height properties give 0 on elements with display none,
1948
+ // so enable the element temporarily
1949
+ var els = element.style;
1950
+ var originalVisibility = els.visibility;
1951
+ var originalPosition = els.position;
1952
+ var originalDisplay = els.display;
1953
+ els.visibility = 'hidden';
1954
+ els.position = 'absolute';
1955
+ els.display = 'block';
1956
+ var originalWidth = element.clientWidth;
1957
+ var originalHeight = element.clientHeight;
1958
+ els.display = originalDisplay;
1959
+ els.position = originalPosition;
1960
+ els.visibility = originalVisibility;
1961
+ return {width: originalWidth, height: originalHeight};
1962
+ },
1963
+
1964
+ makePositioned: function(element) {
1965
+ element = $(element);
1966
+ var pos = Element.getStyle(element, 'position');
1967
+ if (pos == 'static' || !pos) {
1968
+ element._madePositioned = true;
1969
+ element.style.position = 'relative';
1970
+ // Opera returns the offset relative to the positioning context, when an
1971
+ // element is position relative but top and left have not been defined
1972
+ if (Prototype.Browser.Opera) {
1973
+ element.style.top = 0;
1974
+ element.style.left = 0;
1975
+ }
1976
+ }
1977
+ return element;
1978
+ },
1979
+
1980
+ undoPositioned: function(element) {
1981
+ element = $(element);
1982
+ if (element._madePositioned) {
1983
+ element._madePositioned = undefined;
1984
+ element.style.position =
1985
+ element.style.top =
1986
+ element.style.left =
1987
+ element.style.bottom =
1988
+ element.style.right = '';
1989
+ }
1990
+ return element;
1991
+ },
1992
+
1993
+ makeClipping: function(element) {
1994
+ element = $(element);
1995
+ if (element._overflow) return element;
1996
+ element._overflow = Element.getStyle(element, 'overflow') || 'auto';
1997
+ if (element._overflow !== 'hidden')
1998
+ element.style.overflow = 'hidden';
1999
+ return element;
2000
+ },
2001
+
2002
+ undoClipping: function(element) {
2003
+ element = $(element);
2004
+ if (!element._overflow) return element;
2005
+ element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
2006
+ element._overflow = null;
2007
+ return element;
2008
+ },
2009
+
2010
+ cumulativeOffset: function(element) {
2011
+ var valueT = 0, valueL = 0;
2012
+ do {
2013
+ valueT += element.offsetTop || 0;
2014
+ valueL += element.offsetLeft || 0;
2015
+ element = element.offsetParent;
2016
+ } while (element);
2017
+ return Element._returnOffset(valueL, valueT);
2018
+ },
2019
+
2020
+ positionedOffset: function(element) {
2021
+ var valueT = 0, valueL = 0;
2022
+ do {
2023
+ valueT += element.offsetTop || 0;
2024
+ valueL += element.offsetLeft || 0;
2025
+ element = element.offsetParent;
2026
+ if (element) {
2027
+ if (element.tagName.toUpperCase() == 'BODY') break;
2028
+ var p = Element.getStyle(element, 'position');
2029
+ if (p !== 'static') break;
2030
+ }
2031
+ } while (element);
2032
+ return Element._returnOffset(valueL, valueT);
2033
+ },
2034
+
2035
+ absolutize: function(element) {
2036
+ element = $(element);
2037
+ if (element.getStyle('position') == 'absolute') return element;
2038
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2039
+
2040
+ var offsets = element.positionedOffset();
2041
+ var top = offsets[1];
2042
+ var left = offsets[0];
2043
+ var width = element.clientWidth;
2044
+ var height = element.clientHeight;
2045
+
2046
+ element._originalLeft = left - parseFloat(element.style.left || 0);
2047
+ element._originalTop = top - parseFloat(element.style.top || 0);
2048
+ element._originalWidth = element.style.width;
2049
+ element._originalHeight = element.style.height;
2050
+
2051
+ element.style.position = 'absolute';
2052
+ element.style.top = top + 'px';
2053
+ element.style.left = left + 'px';
2054
+ element.style.width = width + 'px';
2055
+ element.style.height = height + 'px';
2056
+ return element;
2057
+ },
2058
+
2059
+ relativize: function(element) {
2060
+ element = $(element);
2061
+ if (element.getStyle('position') == 'relative') return element;
2062
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2063
+
2064
+ element.style.position = 'relative';
2065
+ var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
2066
+ var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
2067
+
2068
+ element.style.top = top + 'px';
2069
+ element.style.left = left + 'px';
2070
+ element.style.height = element._originalHeight;
2071
+ element.style.width = element._originalWidth;
2072
+ return element;
2073
+ },
2074
+
2075
+ cumulativeScrollOffset: function(element) {
2076
+ var valueT = 0, valueL = 0;
2077
+ do {
2078
+ valueT += element.scrollTop || 0;
2079
+ valueL += element.scrollLeft || 0;
2080
+ element = element.parentNode;
2081
+ } while (element);
2082
+ return Element._returnOffset(valueL, valueT);
2083
+ },
2084
+
2085
+ getOffsetParent: function(element) {
2086
+ if (element.offsetParent) return $(element.offsetParent);
2087
+ if (element == document.body) return $(element);
2088
+
2089
+ while ((element = element.parentNode) && element != document.body)
2090
+ if (Element.getStyle(element, 'position') != 'static')
2091
+ return $(element);
2092
+
2093
+ return $(document.body);
2094
+ },
2095
+
2096
+ viewportOffset: function(forElement) {
2097
+ var valueT = 0, valueL = 0;
2098
+
2099
+ var element = forElement;
2100
+ do {
2101
+ valueT += element.offsetTop || 0;
2102
+ valueL += element.offsetLeft || 0;
2103
+
2104
+ // Safari fix
2105
+ if (element.offsetParent == document.body &&
2106
+ Element.getStyle(element, 'position') == 'absolute') break;
2107
+
2108
+ } while (element = element.offsetParent);
2109
+
2110
+ element = forElement;
2111
+ do {
2112
+ if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
2113
+ valueT -= element.scrollTop || 0;
2114
+ valueL -= element.scrollLeft || 0;
2115
+ }
2116
+ } while (element = element.parentNode);
2117
+
2118
+ return Element._returnOffset(valueL, valueT);
2119
+ },
2120
+
2121
+ clonePosition: function(element, source) {
2122
+ var options = Object.extend({
2123
+ setLeft: true,
2124
+ setTop: true,
2125
+ setWidth: true,
2126
+ setHeight: true,
2127
+ offsetTop: 0,
2128
+ offsetLeft: 0
2129
+ }, arguments[2] || { });
2130
+
2131
+ // find page position of source
2132
+ source = $(source);
2133
+ var p = source.viewportOffset();
2134
+
2135
+ // find coordinate system to use
2136
+ element = $(element);
2137
+ var delta = [0, 0];
2138
+ var parent = null;
2139
+ // delta [0,0] will do fine with position: fixed elements,
2140
+ // position:absolute needs offsetParent deltas
2141
+ if (Element.getStyle(element, 'position') == 'absolute') {
2142
+ parent = element.getOffsetParent();
2143
+ delta = parent.viewportOffset();
2144
+ }
2145
+
2146
+ // correct by body offsets (fixes Safari)
2147
+ if (parent == document.body) {
2148
+ delta[0] -= document.body.offsetLeft;
2149
+ delta[1] -= document.body.offsetTop;
2150
+ }
2151
+
2152
+ // set position
2153
+ if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
2154
+ if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
2155
+ if (options.setWidth) element.style.width = source.offsetWidth + 'px';
2156
+ if (options.setHeight) element.style.height = source.offsetHeight + 'px';
2157
+ return element;
2158
+ }
2159
+ };
2160
+
2161
+ Element.Methods.identify.counter = 1;
2162
+
2163
+ Object.extend(Element.Methods, {
2164
+ getElementsBySelector: Element.Methods.select,
2165
+ childElements: Element.Methods.immediateDescendants
2166
+ });
2167
+
2168
+ Element._attributeTranslations = {
2169
+ write: {
2170
+ names: {
2171
+ className: 'class',
2172
+ htmlFor: 'for'
2173
+ },
2174
+ values: { }
2175
+ }
2176
+ };
2177
+
2178
+ if (Prototype.Browser.Opera) {
2179
+ Element.Methods.getStyle = Element.Methods.getStyle.wrap(
2180
+ function(proceed, element, style) {
2181
+ switch (style) {
2182
+ case 'left': case 'top': case 'right': case 'bottom':
2183
+ if (proceed(element, 'position') === 'static') return null;
2184
+ case 'height': case 'width':
2185
+ // returns '0px' for hidden elements; we want it to return null
2186
+ if (!Element.visible(element)) return null;
2187
+
2188
+ // returns the border-box dimensions rather than the content-box
2189
+ // dimensions, so we subtract padding and borders from the value
2190
+ var dim = parseInt(proceed(element, style), 10);
2191
+
2192
+ if (dim !== element['offset' + style.capitalize()])
2193
+ return dim + 'px';
2194
+
2195
+ var properties;
2196
+ if (style === 'height') {
2197
+ properties = ['border-top-width', 'padding-top',
2198
+ 'padding-bottom', 'border-bottom-width'];
2199
+ }
2200
+ else {
2201
+ properties = ['border-left-width', 'padding-left',
2202
+ 'padding-right', 'border-right-width'];
2203
+ }
2204
+ return properties.inject(dim, function(memo, property) {
2205
+ var val = proceed(element, property);
2206
+ return val === null ? memo : memo - parseInt(val, 10);
2207
+ }) + 'px';
2208
+ default: return proceed(element, style);
2209
+ }
2210
+ }
2211
+ );
2212
+
2213
+ Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
2214
+ function(proceed, element, attribute) {
2215
+ if (attribute === 'title') return element.title;
2216
+ return proceed(element, attribute);
2217
+ }
2218
+ );
2219
+ }
2220
+
2221
+ else if (Prototype.Browser.IE) {
2222
+ // IE doesn't report offsets correctly for static elements, so we change them
2223
+ // to "relative" to get the values, then change them back.
2224
+ Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
2225
+ function(proceed, element) {
2226
+ element = $(element);
2227
+ // IE throws an error if element is not in document
2228
+ try { element.offsetParent }
2229
+ catch(e) { return $(document.body) }
2230
+ var position = element.getStyle('position');
2231
+ if (position !== 'static') return proceed(element);
2232
+ element.setStyle({ position: 'relative' });
2233
+ var value = proceed(element);
2234
+ element.setStyle({ position: position });
2235
+ return value;
2236
+ }
2237
+ );
2238
+
2239
+ $w('positionedOffset viewportOffset').each(function(method) {
2240
+ Element.Methods[method] = Element.Methods[method].wrap(
2241
+ function(proceed, element) {
2242
+ element = $(element);
2243
+ try { element.offsetParent }
2244
+ catch(e) { return Element._returnOffset(0,0) }
2245
+ var position = element.getStyle('position');
2246
+ if (position !== 'static') return proceed(element);
2247
+ // Trigger hasLayout on the offset parent so that IE6 reports
2248
+ // accurate offsetTop and offsetLeft values for position: fixed.
2249
+ var offsetParent = element.getOffsetParent();
2250
+ if (offsetParent && offsetParent.getStyle('position') === 'fixed')
2251
+ offsetParent.setStyle({ zoom: 1 });
2252
+ element.setStyle({ position: 'relative' });
2253
+ var value = proceed(element);
2254
+ element.setStyle({ position: position });
2255
+ return value;
2256
+ }
2257
+ );
2258
+ });
2259
+
2260
+ Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
2261
+ function(proceed, element) {
2262
+ try { element.offsetParent }
2263
+ catch(e) { return Element._returnOffset(0,0) }
2264
+ return proceed(element);
2265
+ }
2266
+ );
2267
+
2268
+ Element.Methods.getStyle = function(element, style) {
2269
+ element = $(element);
2270
+ style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
2271
+ var value = element.style[style];
2272
+ if (!value && element.currentStyle) value = element.currentStyle[style];
2273
+
2274
+ if (style == 'opacity') {
2275
+ if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
2276
+ if (value[1]) return parseFloat(value[1]) / 100;
2277
+ return 1.0;
2278
+ }
2279
+
2280
+ if (value == 'auto') {
2281
+ if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
2282
+ return element['offset' + style.capitalize()] + 'px';
2283
+ return null;
2284
+ }
2285
+ return value;
2286
+ };
2287
+
2288
+ Element.Methods.setOpacity = function(element, value) {
2289
+ function stripAlpha(filter){
2290
+ return filter.replace(/alpha\([^\)]*\)/gi,'');
2291
+ }
2292
+ element = $(element);
2293
+ var currentStyle = element.currentStyle;
2294
+ if ((currentStyle && !currentStyle.hasLayout) ||
2295
+ (!currentStyle && element.style.zoom == 'normal'))
2296
+ element.style.zoom = 1;
2297
+
2298
+ var filter = element.getStyle('filter'), style = element.style;
2299
+ if (value == 1 || value === '') {
2300
+ (filter = stripAlpha(filter)) ?
2301
+ style.filter = filter : style.removeAttribute('filter');
2302
+ return element;
2303
+ } else if (value < 0.00001) value = 0;
2304
+ style.filter = stripAlpha(filter) +
2305
+ 'alpha(opacity=' + (value * 100) + ')';
2306
+ return element;
2307
+ };
2308
+
2309
+ Element._attributeTranslations = {
2310
+ read: {
2311
+ names: {
2312
+ 'class': 'className',
2313
+ 'for': 'htmlFor'
2314
+ },
2315
+ values: {
2316
+ _getAttr: function(element, attribute) {
2317
+ return element.getAttribute(attribute, 2);
2318
+ },
2319
+ _getAttrNode: function(element, attribute) {
2320
+ var node = element.getAttributeNode(attribute);
2321
+ return node ? node.value : "";
2322
+ },
2323
+ _getEv: function(element, attribute) {
2324
+ attribute = element.getAttribute(attribute);
2325
+ return attribute ? attribute.toString().slice(23, -2) : null;
2326
+ },
2327
+ _flag: function(element, attribute) {
2328
+ return $(element).hasAttribute(attribute) ? attribute : null;
2329
+ },
2330
+ style: function(element) {
2331
+ return element.style.cssText.toLowerCase();
2332
+ },
2333
+ title: function(element) {
2334
+ return element.title;
2335
+ }
2336
+ }
2337
+ }
2338
+ };
2339
+
2340
+ Element._attributeTranslations.write = {
2341
+ names: Object.extend({
2342
+ cellpadding: 'cellPadding',
2343
+ cellspacing: 'cellSpacing'
2344
+ }, Element._attributeTranslations.read.names),
2345
+ values: {
2346
+ checked: function(element, value) {
2347
+ element.checked = !!value;
2348
+ },
2349
+
2350
+ style: function(element, value) {
2351
+ element.style.cssText = value ? value : '';
2352
+ }
2353
+ }
2354
+ };
2355
+
2356
+ Element._attributeTranslations.has = {};
2357
+
2358
+ $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
2359
+ 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
2360
+ Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
2361
+ Element._attributeTranslations.has[attr.toLowerCase()] = attr;
2362
+ });
2363
+
2364
+ (function(v) {
2365
+ Object.extend(v, {
2366
+ href: v._getAttr,
2367
+ src: v._getAttr,
2368
+ type: v._getAttr,
2369
+ action: v._getAttrNode,
2370
+ disabled: v._flag,
2371
+ checked: v._flag,
2372
+ readonly: v._flag,
2373
+ multiple: v._flag,
2374
+ onload: v._getEv,
2375
+ onunload: v._getEv,
2376
+ onclick: v._getEv,
2377
+ ondblclick: v._getEv,
2378
+ onmousedown: v._getEv,
2379
+ onmouseup: v._getEv,
2380
+ onmouseover: v._getEv,
2381
+ onmousemove: v._getEv,
2382
+ onmouseout: v._getEv,
2383
+ onfocus: v._getEv,
2384
+ onblur: v._getEv,
2385
+ onkeypress: v._getEv,
2386
+ onkeydown: v._getEv,
2387
+ onkeyup: v._getEv,
2388
+ onsubmit: v._getEv,
2389
+ onreset: v._getEv,
2390
+ onselect: v._getEv,
2391
+ onchange: v._getEv
2392
+ });
2393
+ })(Element._attributeTranslations.read.values);
2394
+ }
2395
+
2396
+ else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
2397
+ Element.Methods.setOpacity = function(element, value) {
2398
+ element = $(element);
2399
+ element.style.opacity = (value == 1) ? 0.999999 :
2400
+ (value === '') ? '' : (value < 0.00001) ? 0 : value;
2401
+ return element;
2402
+ };
2403
+ }
2404
+
2405
+ else if (Prototype.Browser.WebKit) {
2406
+ Element.Methods.setOpacity = function(element, value) {
2407
+ element = $(element);
2408
+ element.style.opacity = (value == 1 || value === '') ? '' :
2409
+ (value < 0.00001) ? 0 : value;
2410
+
2411
+ if (value == 1)
2412
+ if(element.tagName.toUpperCase() == 'IMG' && element.width) {
2413
+ element.width++; element.width--;
2414
+ } else try {
2415
+ var n = document.createTextNode(' ');
2416
+ element.appendChild(n);
2417
+ element.removeChild(n);
2418
+ } catch (e) { }
2419
+
2420
+ return element;
2421
+ };
2422
+
2423
+ // Safari returns margins on body which is incorrect if the child is absolutely
2424
+ // positioned. For performance reasons, redefine Element#cumulativeOffset for
2425
+ // KHTML/WebKit only.
2426
+ Element.Methods.cumulativeOffset = function(element) {
2427
+ var valueT = 0, valueL = 0;
2428
+ do {
2429
+ valueT += element.offsetTop || 0;
2430
+ valueL += element.offsetLeft || 0;
2431
+ if (element.offsetParent == document.body)
2432
+ if (Element.getStyle(element, 'position') == 'absolute') break;
2433
+
2434
+ element = element.offsetParent;
2435
+ } while (element);
2436
+
2437
+ return Element._returnOffset(valueL, valueT);
2438
+ };
2439
+ }
2440
+
2441
+ if (Prototype.Browser.IE || Prototype.Browser.Opera) {
2442
+ // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
2443
+ Element.Methods.update = function(element, content) {
2444
+ element = $(element);
2445
+
2446
+ if (content && content.toElement) content = content.toElement();
2447
+ if (Object.isElement(content)) return element.update().insert(content);
2448
+
2449
+ content = Object.toHTML(content);
2450
+ var tagName = element.tagName.toUpperCase();
2451
+
2452
+ if (tagName in Element._insertionTranslations.tags) {
2453
+ $A(element.childNodes).each(function(node) { element.removeChild(node) });
2454
+ Element._getContentFromAnonymousElement(tagName, content.stripScripts())
2455
+ .each(function(node) { element.appendChild(node) });
2456
+ }
2457
+ else element.innerHTML = content.stripScripts();
2458
+
2459
+ content.evalScripts.bind(content).defer();
2460
+ return element;
2461
+ };
2462
+ }
2463
+
2464
+ if ('outerHTML' in document.createElement('div')) {
2465
+ Element.Methods.replace = function(element, content) {
2466
+ element = $(element);
2467
+
2468
+ if (content && content.toElement) content = content.toElement();
2469
+ if (Object.isElement(content)) {
2470
+ element.parentNode.replaceChild(content, element);
2471
+ return element;
2472
+ }
2473
+
2474
+ content = Object.toHTML(content);
2475
+ var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
2476
+
2477
+ if (Element._insertionTranslations.tags[tagName]) {
2478
+ var nextSibling = element.next();
2479
+ var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2480
+ parent.removeChild(element);
2481
+ if (nextSibling)
2482
+ fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
2483
+ else
2484
+ fragments.each(function(node) { parent.appendChild(node) });
2485
+ }
2486
+ else element.outerHTML = content.stripScripts();
2487
+
2488
+ content.evalScripts.bind(content).defer();
2489
+ return element;
2490
+ };
2491
+ }
2492
+
2493
+ Element._returnOffset = function(l, t) {
2494
+ var result = [l, t];
2495
+ result.left = l;
2496
+ result.top = t;
2497
+ return result;
2498
+ };
2499
+
2500
+ Element._getContentFromAnonymousElement = function(tagName, html) {
2501
+ var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
2502
+ if (t) {
2503
+ div.innerHTML = t[0] + html + t[1];
2504
+ t[2].times(function() { div = div.firstChild });
2505
+ } else div.innerHTML = html;
2506
+ return $A(div.childNodes);
2507
+ };
2508
+
2509
+ Element._insertionTranslations = {
2510
+ before: function(element, node) {
2511
+ element.parentNode.insertBefore(node, element);
2512
+ },
2513
+ top: function(element, node) {
2514
+ element.insertBefore(node, element.firstChild);
2515
+ },
2516
+ bottom: function(element, node) {
2517
+ element.appendChild(node);
2518
+ },
2519
+ after: function(element, node) {
2520
+ element.parentNode.insertBefore(node, element.nextSibling);
2521
+ },
2522
+ tags: {
2523
+ TABLE: ['<table>', '</table>', 1],
2524
+ TBODY: ['<table><tbody>', '</tbody></table>', 2],
2525
+ TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
2526
+ TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
2527
+ SELECT: ['<select>', '</select>', 1]
2528
+ }
2529
+ };
2530
+
2531
+ (function() {
2532
+ Object.extend(this.tags, {
2533
+ THEAD: this.tags.TBODY,
2534
+ TFOOT: this.tags.TBODY,
2535
+ TH: this.tags.TD
2536
+ });
2537
+ }).call(Element._insertionTranslations);
2538
+
2539
+ Element.Methods.Simulated = {
2540
+ hasAttribute: function(element, attribute) {
2541
+ attribute = Element._attributeTranslations.has[attribute] || attribute;
2542
+ var node = $(element).getAttributeNode(attribute);
2543
+ return !!(node && node.specified);
2544
+ }
2545
+ };
2546
+
2547
+ Element.Methods.ByTag = { };
2548
+
2549
+ Object.extend(Element, Element.Methods);
2550
+
2551
+ if (!Prototype.BrowserFeatures.ElementExtensions &&
2552
+ document.createElement('div')['__proto__']) {
2553
+ window.HTMLElement = { };
2554
+ window.HTMLElement.prototype = document.createElement('div')['__proto__'];
2555
+ Prototype.BrowserFeatures.ElementExtensions = true;
2556
+ }
2557
+
2558
+ Element.extend = (function() {
2559
+ if (Prototype.BrowserFeatures.SpecificElementExtensions)
2560
+ return Prototype.K;
2561
+
2562
+ var Methods = { }, ByTag = Element.Methods.ByTag;
2563
+
2564
+ var extend = Object.extend(function(element) {
2565
+ if (!element || element._extendedByPrototype ||
2566
+ element.nodeType != 1 || element == window) return element;
2567
+
2568
+ var methods = Object.clone(Methods),
2569
+ tagName = element.tagName.toUpperCase(), property, value;
2570
+
2571
+ // extend methods for specific tags
2572
+ if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
2573
+
2574
+ for (property in methods) {
2575
+ value = methods[property];
2576
+ if (Object.isFunction(value) && !(property in element))
2577
+ element[property] = value.methodize();
2578
+ }
2579
+
2580
+ element._extendedByPrototype = Prototype.emptyFunction;
2581
+ return element;
2582
+
2583
+ }, {
2584
+ refresh: function() {
2585
+ // extend methods for all tags (Safari doesn't need this)
2586
+ if (!Prototype.BrowserFeatures.ElementExtensions) {
2587
+ Object.extend(Methods, Element.Methods);
2588
+ Object.extend(Methods, Element.Methods.Simulated);
2589
+ }
2590
+ }
2591
+ });
2592
+
2593
+ extend.refresh();
2594
+ return extend;
2595
+ })();
2596
+
2597
+ Element.hasAttribute = function(element, attribute) {
2598
+ if (element.hasAttribute) return element.hasAttribute(attribute);
2599
+ return Element.Methods.Simulated.hasAttribute(element, attribute);
2600
+ };
2601
+
2602
+ Element.addMethods = function(methods) {
2603
+ var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
2604
+
2605
+ if (!methods) {
2606
+ Object.extend(Form, Form.Methods);
2607
+ Object.extend(Form.Element, Form.Element.Methods);
2608
+ Object.extend(Element.Methods.ByTag, {
2609
+ "FORM": Object.clone(Form.Methods),
2610
+ "INPUT": Object.clone(Form.Element.Methods),
2611
+ "SELECT": Object.clone(Form.Element.Methods),
2612
+ "TEXTAREA": Object.clone(Form.Element.Methods)
2613
+ });
2614
+ }
2615
+
2616
+ if (arguments.length == 2) {
2617
+ var tagName = methods;
2618
+ methods = arguments[1];
2619
+ }
2620
+
2621
+ if (!tagName) Object.extend(Element.Methods, methods || { });
2622
+ else {
2623
+ if (Object.isArray(tagName)) tagName.each(extend);
2624
+ else extend(tagName);
2625
+ }
2626
+
2627
+ function extend(tagName) {
2628
+ tagName = tagName.toUpperCase();
2629
+ if (!Element.Methods.ByTag[tagName])
2630
+ Element.Methods.ByTag[tagName] = { };
2631
+ Object.extend(Element.Methods.ByTag[tagName], methods);
2632
+ }
2633
+
2634
+ function copy(methods, destination, onlyIfAbsent) {
2635
+ onlyIfAbsent = onlyIfAbsent || false;
2636
+ for (var property in methods) {
2637
+ var value = methods[property];
2638
+ if (!Object.isFunction(value)) continue;
2639
+ if (!onlyIfAbsent || !(property in destination))
2640
+ destination[property] = value.methodize();
2641
+ }
2642
+ }
2643
+
2644
+ function findDOMClass(tagName) {
2645
+ var klass;
2646
+ var trans = {
2647
+ "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
2648
+ "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
2649
+ "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
2650
+ "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
2651
+ "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
2652
+ "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
2653
+ "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
2654
+ "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
2655
+ "FrameSet", "IFRAME": "IFrame"
2656
+ };
2657
+ if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
2658
+ if (window[klass]) return window[klass];
2659
+ klass = 'HTML' + tagName + 'Element';
2660
+ if (window[klass]) return window[klass];
2661
+ klass = 'HTML' + tagName.capitalize() + 'Element';
2662
+ if (window[klass]) return window[klass];
2663
+
2664
+ window[klass] = { };
2665
+ window[klass].prototype = document.createElement(tagName)['__proto__'];
2666
+ return window[klass];
2667
+ }
2668
+
2669
+ if (F.ElementExtensions) {
2670
+ copy(Element.Methods, HTMLElement.prototype);
2671
+ copy(Element.Methods.Simulated, HTMLElement.prototype, true);
2672
+ }
2673
+
2674
+ if (F.SpecificElementExtensions) {
2675
+ for (var tag in Element.Methods.ByTag) {
2676
+ var klass = findDOMClass(tag);
2677
+ if (Object.isUndefined(klass)) continue;
2678
+ copy(T[tag], klass.prototype);
2679
+ }
2680
+ }
2681
+
2682
+ Object.extend(Element, Element.Methods);
2683
+ delete Element.ByTag;
2684
+
2685
+ if (Element.extend.refresh) Element.extend.refresh();
2686
+ Element.cache = { };
2687
+ };
2688
+
2689
+ document.viewport = {
2690
+ getDimensions: function() {
2691
+ var dimensions = { }, B = Prototype.Browser;
2692
+ $w('width height').each(function(d) {
2693
+ var D = d.capitalize();
2694
+ if (B.WebKit && !document.evaluate) {
2695
+ // Safari <3.0 needs self.innerWidth/Height
2696
+ dimensions[d] = self['inner' + D];
2697
+ } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {
2698
+ // Opera <9.5 needs document.body.clientWidth/Height
2699
+ dimensions[d] = document.body['client' + D]
2700
+ } else {
2701
+ dimensions[d] = document.documentElement['client' + D];
2702
+ }
2703
+ });
2704
+ return dimensions;
2705
+ },
2706
+
2707
+ getWidth: function() {
2708
+ return this.getDimensions().width;
2709
+ },
2710
+
2711
+ getHeight: function() {
2712
+ return this.getDimensions().height;
2713
+ },
2714
+
2715
+ getScrollOffsets: function() {
2716
+ return Element._returnOffset(
2717
+ window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
2718
+ window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
2719
+ }
2720
+ };
2721
+ /* Portions of the Selector class are derived from Jack Slocum's DomQuery,
2722
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
2723
+ * license. Please see http://www.yui-ext.com/ for more information. */
2724
+
2725
+ var Selector = Class.create({
2726
+ initialize: function(expression) {
2727
+ this.expression = expression.strip();
2728
+
2729
+ if (this.shouldUseSelectorsAPI()) {
2730
+ this.mode = 'selectorsAPI';
2731
+ } else if (this.shouldUseXPath()) {
2732
+ this.mode = 'xpath';
2733
+ this.compileXPathMatcher();
2734
+ } else {
2735
+ this.mode = "normal";
2736
+ this.compileMatcher();
2737
+ }
2738
+
2739
+ },
2740
+
2741
+ shouldUseXPath: function() {
2742
+ if (!Prototype.BrowserFeatures.XPath) return false;
2743
+
2744
+ var e = this.expression;
2745
+
2746
+ // Safari 3 chokes on :*-of-type and :empty
2747
+ if (Prototype.Browser.WebKit &&
2748
+ (e.include("-of-type") || e.include(":empty")))
2749
+ return false;
2750
+
2751
+ // XPath can't do namespaced attributes, nor can it read
2752
+ // the "checked" property from DOM nodes
2753
+ if ((/(\[[\w-]*?:|:checked)/).test(e))
2754
+ return false;
2755
+
2756
+ return true;
2757
+ },
2758
+
2759
+ shouldUseSelectorsAPI: function() {
2760
+ if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
2761
+
2762
+ if (!Selector._div) Selector._div = new Element('div');
2763
+
2764
+ // Make sure the browser treats the selector as valid. Test on an
2765
+ // isolated element to minimize cost of this check.
2766
+ try {
2767
+ Selector._div.querySelector(this.expression);
2768
+ } catch(e) {
2769
+ return false;
2770
+ }
2771
+
2772
+ return true;
2773
+ },
2774
+
2775
+ compileMatcher: function() {
2776
+ var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
2777
+ c = Selector.criteria, le, p, m;
2778
+
2779
+ if (Selector._cache[e]) {
2780
+ this.matcher = Selector._cache[e];
2781
+ return;
2782
+ }
2783
+
2784
+ this.matcher = ["this.matcher = function(root) {",
2785
+ "var r = root, h = Selector.handlers, c = false, n;"];
2786
+
2787
+ while (e && le != e && (/\S/).test(e)) {
2788
+ le = e;
2789
+ for (var i in ps) {
2790
+ p = ps[i];
2791
+ if (m = e.match(p)) {
2792
+ this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
2793
+ new Template(c[i]).evaluate(m));
2794
+ e = e.replace(m[0], '');
2795
+ break;
2796
+ }
2797
+ }
2798
+ }
2799
+
2800
+ this.matcher.push("return h.unique(n);\n}");
2801
+ eval(this.matcher.join('\n'));
2802
+ Selector._cache[this.expression] = this.matcher;
2803
+ },
2804
+
2805
+ compileXPathMatcher: function() {
2806
+ var e = this.expression, ps = Selector.patterns,
2807
+ x = Selector.xpath, le, m;
2808
+
2809
+ if (Selector._cache[e]) {
2810
+ this.xpath = Selector._cache[e]; return;
2811
+ }
2812
+
2813
+ this.matcher = ['.//*'];
2814
+ while (e && le != e && (/\S/).test(e)) {
2815
+ le = e;
2816
+ for (var i in ps) {
2817
+ if (m = e.match(ps[i])) {
2818
+ this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
2819
+ new Template(x[i]).evaluate(m));
2820
+ e = e.replace(m[0], '');
2821
+ break;
2822
+ }
2823
+ }
2824
+ }
2825
+
2826
+ this.xpath = this.matcher.join('');
2827
+ Selector._cache[this.expression] = this.xpath;
2828
+ },
2829
+
2830
+ findElements: function(root) {
2831
+ root = root || document;
2832
+ var e = this.expression, results;
2833
+
2834
+ switch (this.mode) {
2835
+ case 'selectorsAPI':
2836
+ // querySelectorAll queries document-wide, then filters to descendants
2837
+ // of the context element. That's not what we want.
2838
+ // Add an explicit context to the selector if necessary.
2839
+ if (root !== document) {
2840
+ var oldId = root.id, id = $(root).identify();
2841
+ e = "#" + id + " " + e;
2842
+ }
2843
+
2844
+ results = $A(root.querySelectorAll(e)).map(Element.extend);
2845
+ root.id = oldId;
2846
+
2847
+ return results;
2848
+ case 'xpath':
2849
+ return document._getElementsByXPath(this.xpath, root);
2850
+ default:
2851
+ return this.matcher(root);
2852
+ }
2853
+ },
2854
+
2855
+ match: function(element) {
2856
+ this.tokens = [];
2857
+
2858
+ var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
2859
+ var le, p, m;
2860
+
2861
+ while (e && le !== e && (/\S/).test(e)) {
2862
+ le = e;
2863
+ for (var i in ps) {
2864
+ p = ps[i];
2865
+ if (m = e.match(p)) {
2866
+ // use the Selector.assertions methods unless the selector
2867
+ // is too complex.
2868
+ if (as[i]) {
2869
+ this.tokens.push([i, Object.clone(m)]);
2870
+ e = e.replace(m[0], '');
2871
+ } else {
2872
+ // reluctantly do a document-wide search
2873
+ // and look for a match in the array
2874
+ return this.findElements(document).include(element);
2875
+ }
2876
+ }
2877
+ }
2878
+ }
2879
+
2880
+ var match = true, name, matches;
2881
+ for (var i = 0, token; token = this.tokens[i]; i++) {
2882
+ name = token[0], matches = token[1];
2883
+ if (!Selector.assertions[name](element, matches)) {
2884
+ match = false; break;
2885
+ }
2886
+ }
2887
+
2888
+ return match;
2889
+ },
2890
+
2891
+ toString: function() {
2892
+ return this.expression;
2893
+ },
2894
+
2895
+ inspect: function() {
2896
+ return "#<Selector:" + this.expression.inspect() + ">";
2897
+ }
2898
+ });
2899
+
2900
+ Object.extend(Selector, {
2901
+ _cache: { },
2902
+
2903
+ xpath: {
2904
+ descendant: "//*",
2905
+ child: "/*",
2906
+ adjacent: "/following-sibling::*[1]",
2907
+ laterSibling: '/following-sibling::*',
2908
+ tagName: function(m) {
2909
+ if (m[1] == '*') return '';
2910
+ return "[local-name()='" + m[1].toLowerCase() +
2911
+ "' or local-name()='" + m[1].toUpperCase() + "']";
2912
+ },
2913
+ className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
2914
+ id: "[@id='#{1}']",
2915
+ attrPresence: function(m) {
2916
+ m[1] = m[1].toLowerCase();
2917
+ return new Template("[@#{1}]").evaluate(m);
2918
+ },
2919
+ attr: function(m) {
2920
+ m[1] = m[1].toLowerCase();
2921
+ m[3] = m[5] || m[6];
2922
+ return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
2923
+ },
2924
+ pseudo: function(m) {
2925
+ var h = Selector.xpath.pseudos[m[1]];
2926
+ if (!h) return '';
2927
+ if (Object.isFunction(h)) return h(m);
2928
+ return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
2929
+ },
2930
+ operators: {
2931
+ '=': "[@#{1}='#{3}']",
2932
+ '!=': "[@#{1}!='#{3}']",
2933
+ '^=': "[starts-with(@#{1}, '#{3}')]",
2934
+ '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
2935
+ '*=': "[contains(@#{1}, '#{3}')]",
2936
+ '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
2937
+ '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
2938
+ },
2939
+ pseudos: {
2940
+ 'first-child': '[not(preceding-sibling::*)]',
2941
+ 'last-child': '[not(following-sibling::*)]',
2942
+ 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
2943
+ 'empty': "[count(*) = 0 and (count(text()) = 0)]",
2944
+ 'checked': "[@checked]",
2945
+ 'disabled': "[(@disabled) and (@type!='hidden')]",
2946
+ 'enabled': "[not(@disabled) and (@type!='hidden')]",
2947
+ 'not': function(m) {
2948
+ var e = m[6], p = Selector.patterns,
2949
+ x = Selector.xpath, le, v;
2950
+
2951
+ var exclusion = [];
2952
+ while (e && le != e && (/\S/).test(e)) {
2953
+ le = e;
2954
+ for (var i in p) {
2955
+ if (m = e.match(p[i])) {
2956
+ v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
2957
+ exclusion.push("(" + v.substring(1, v.length - 1) + ")");
2958
+ e = e.replace(m[0], '');
2959
+ break;
2960
+ }
2961
+ }
2962
+ }
2963
+ return "[not(" + exclusion.join(" and ") + ")]";
2964
+ },
2965
+ 'nth-child': function(m) {
2966
+ return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
2967
+ },
2968
+ 'nth-last-child': function(m) {
2969
+ return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
2970
+ },
2971
+ 'nth-of-type': function(m) {
2972
+ return Selector.xpath.pseudos.nth("position() ", m);
2973
+ },
2974
+ 'nth-last-of-type': function(m) {
2975
+ return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
2976
+ },
2977
+ 'first-of-type': function(m) {
2978
+ m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
2979
+ },
2980
+ 'last-of-type': function(m) {
2981
+ m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
2982
+ },
2983
+ 'only-of-type': function(m) {
2984
+ var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
2985
+ },
2986
+ nth: function(fragment, m) {
2987
+ var mm, formula = m[6], predicate;
2988
+ if (formula == 'even') formula = '2n+0';
2989
+ if (formula == 'odd') formula = '2n+1';
2990
+ if (mm = formula.match(/^(\d+)$/)) // digit only
2991
+ return '[' + fragment + "= " + mm[1] + ']';
2992
+ if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
2993
+ if (mm[1] == "-") mm[1] = -1;
2994
+ var a = mm[1] ? Number(mm[1]) : 1;
2995
+ var b = mm[2] ? Number(mm[2]) : 0;
2996
+ predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
2997
+ "((#{fragment} - #{b}) div #{a} >= 0)]";
2998
+ return new Template(predicate).evaluate({
2999
+ fragment: fragment, a: a, b: b });
3000
+ }
3001
+ }
3002
+ }
3003
+ },
3004
+
3005
+ criteria: {
3006
+ tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
3007
+ className: 'n = h.className(n, r, "#{1}", c); c = false;',
3008
+ id: 'n = h.id(n, r, "#{1}", c); c = false;',
3009
+ attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
3010
+ attr: function(m) {
3011
+ m[3] = (m[5] || m[6]);
3012
+ return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
3013
+ },
3014
+ pseudo: function(m) {
3015
+ if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
3016
+ return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
3017
+ },
3018
+ descendant: 'c = "descendant";',
3019
+ child: 'c = "child";',
3020
+ adjacent: 'c = "adjacent";',
3021
+ laterSibling: 'c = "laterSibling";'
3022
+ },
3023
+
3024
+ patterns: {
3025
+ // combinators must be listed first
3026
+ // (and descendant needs to be last combinator)
3027
+ laterSibling: /^\s*~\s*/,
3028
+ child: /^\s*>\s*/,
3029
+ adjacent: /^\s*\+\s*/,
3030
+ descendant: /^\s/,
3031
+
3032
+ // selectors follow
3033
+ tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
3034
+ id: /^#([\w\-\*]+)(\b|$)/,
3035
+ className: /^\.([\w\-\*]+)(\b|$)/,
3036
+ pseudo:
3037
+ /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
3038
+ attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
3039
+ attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
3040
+ },
3041
+
3042
+ // for Selector.match and Element#match
3043
+ assertions: {
3044
+ tagName: function(element, matches) {
3045
+ return matches[1].toUpperCase() == element.tagName.toUpperCase();
3046
+ },
3047
+
3048
+ className: function(element, matches) {
3049
+ return Element.hasClassName(element, matches[1]);
3050
+ },
3051
+
3052
+ id: function(element, matches) {
3053
+ return element.id === matches[1];
3054
+ },
3055
+
3056
+ attrPresence: function(element, matches) {
3057
+ return Element.hasAttribute(element, matches[1]);
3058
+ },
3059
+
3060
+ attr: function(element, matches) {
3061
+ var nodeValue = Element.readAttribute(element, matches[1]);
3062
+ return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
3063
+ }
3064
+ },
3065
+
3066
+ handlers: {
3067
+ // UTILITY FUNCTIONS
3068
+ // joins two collections
3069
+ concat: function(a, b) {
3070
+ for (var i = 0, node; node = b[i]; i++)
3071
+ a.push(node);
3072
+ return a;
3073
+ },
3074
+
3075
+ // marks an array of nodes for counting
3076
+ mark: function(nodes) {
3077
+ var _true = Prototype.emptyFunction;
3078
+ for (var i = 0, node; node = nodes[i]; i++)
3079
+ node._countedByPrototype = _true;
3080
+ return nodes;
3081
+ },
3082
+
3083
+ unmark: function(nodes) {
3084
+ for (var i = 0, node; node = nodes[i]; i++)
3085
+ node._countedByPrototype = undefined;
3086
+ return nodes;
3087
+ },
3088
+
3089
+ // mark each child node with its position (for nth calls)
3090
+ // "ofType" flag indicates whether we're indexing for nth-of-type
3091
+ // rather than nth-child
3092
+ index: function(parentNode, reverse, ofType) {
3093
+ parentNode._countedByPrototype = Prototype.emptyFunction;
3094
+ if (reverse) {
3095
+ for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
3096
+ var node = nodes[i];
3097
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
3098
+ }
3099
+ } else {
3100
+ for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
3101
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
3102
+ }
3103
+ },
3104
+
3105
+ // filters out duplicates and extends all nodes
3106
+ unique: function(nodes) {
3107
+ if (nodes.length == 0) return nodes;
3108
+ var results = [], n;
3109
+ for (var i = 0, l = nodes.length; i < l; i++)
3110
+ if (!(n = nodes[i])._countedByPrototype) {
3111
+ n._countedByPrototype = Prototype.emptyFunction;
3112
+ results.push(Element.extend(n));
3113
+ }
3114
+ return Selector.handlers.unmark(results);
3115
+ },
3116
+
3117
+ // COMBINATOR FUNCTIONS
3118
+ descendant: function(nodes) {
3119
+ var h = Selector.handlers;
3120
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3121
+ h.concat(results, node.getElementsByTagName('*'));
3122
+ return results;
3123
+ },
3124
+
3125
+ child: function(nodes) {
3126
+ var h = Selector.handlers;
3127
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3128
+ for (var j = 0, child; child = node.childNodes[j]; j++)
3129
+ if (child.nodeType == 1 && child.tagName != '!') results.push(child);
3130
+ }
3131
+ return results;
3132
+ },
3133
+
3134
+ adjacent: function(nodes) {
3135
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3136
+ var next = this.nextElementSibling(node);
3137
+ if (next) results.push(next);
3138
+ }
3139
+ return results;
3140
+ },
3141
+
3142
+ laterSibling: function(nodes) {
3143
+ var h = Selector.handlers;
3144
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3145
+ h.concat(results, Element.nextSiblings(node));
3146
+ return results;
3147
+ },
3148
+
3149
+ nextElementSibling: function(node) {
3150
+ while (node = node.nextSibling)
3151
+ if (node.nodeType == 1) return node;
3152
+ return null;
3153
+ },
3154
+
3155
+ previousElementSibling: function(node) {
3156
+ while (node = node.previousSibling)
3157
+ if (node.nodeType == 1) return node;
3158
+ return null;
3159
+ },
3160
+
3161
+ // TOKEN FUNCTIONS
3162
+ tagName: function(nodes, root, tagName, combinator) {
3163
+ var uTagName = tagName.toUpperCase();
3164
+ var results = [], h = Selector.handlers;
3165
+ if (nodes) {
3166
+ if (combinator) {
3167
+ // fastlane for ordinary descendant combinators
3168
+ if (combinator == "descendant") {
3169
+ for (var i = 0, node; node = nodes[i]; i++)
3170
+ h.concat(results, node.getElementsByTagName(tagName));
3171
+ return results;
3172
+ } else nodes = this[combinator](nodes);
3173
+ if (tagName == "*") return nodes;
3174
+ }
3175
+ for (var i = 0, node; node = nodes[i]; i++)
3176
+ if (node.tagName.toUpperCase() === uTagName) results.push(node);
3177
+ return results;
3178
+ } else return root.getElementsByTagName(tagName);
3179
+ },
3180
+
3181
+ id: function(nodes, root, id, combinator) {
3182
+ var targetNode = $(id), h = Selector.handlers;
3183
+ if (!targetNode) return [];
3184
+ if (!nodes && root == document) return [targetNode];
3185
+ if (nodes) {
3186
+ if (combinator) {
3187
+ if (combinator == 'child') {
3188
+ for (var i = 0, node; node = nodes[i]; i++)
3189
+ if (targetNode.parentNode == node) return [targetNode];
3190
+ } else if (combinator == 'descendant') {
3191
+ for (var i = 0, node; node = nodes[i]; i++)
3192
+ if (Element.descendantOf(targetNode, node)) return [targetNode];
3193
+ } else if (combinator == 'adjacent') {
3194
+ for (var i = 0, node; node = nodes[i]; i++)
3195
+ if (Selector.handlers.previousElementSibling(targetNode) == node)
3196
+ return [targetNode];
3197
+ } else nodes = h[combinator](nodes);
3198
+ }
3199
+ for (var i = 0, node; node = nodes[i]; i++)
3200
+ if (node == targetNode) return [targetNode];
3201
+ return [];
3202
+ }
3203
+ return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
3204
+ },
3205
+
3206
+ className: function(nodes, root, className, combinator) {
3207
+ if (nodes && combinator) nodes = this[combinator](nodes);
3208
+ return Selector.handlers.byClassName(nodes, root, className);
3209
+ },
3210
+
3211
+ byClassName: function(nodes, root, className) {
3212
+ if (!nodes) nodes = Selector.handlers.descendant([root]);
3213
+ var needle = ' ' + className + ' ';
3214
+ for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
3215
+ nodeClassName = node.className;
3216
+ if (nodeClassName.length == 0) continue;
3217
+ if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
3218
+ results.push(node);
3219
+ }
3220
+ return results;
3221
+ },
3222
+
3223
+ attrPresence: function(nodes, root, attr, combinator) {
3224
+ if (!nodes) nodes = root.getElementsByTagName("*");
3225
+ if (nodes && combinator) nodes = this[combinator](nodes);
3226
+ var results = [];
3227
+ for (var i = 0, node; node = nodes[i]; i++)
3228
+ if (Element.hasAttribute(node, attr)) results.push(node);
3229
+ return results;
3230
+ },
3231
+
3232
+ attr: function(nodes, root, attr, value, operator, combinator) {
3233
+ if (!nodes) nodes = root.getElementsByTagName("*");
3234
+ if (nodes && combinator) nodes = this[combinator](nodes);
3235
+ var handler = Selector.operators[operator], results = [];
3236
+ for (var i = 0, node; node = nodes[i]; i++) {
3237
+ var nodeValue = Element.readAttribute(node, attr);
3238
+ if (nodeValue === null) continue;
3239
+ if (handler(nodeValue, value)) results.push(node);
3240
+ }
3241
+ return results;
3242
+ },
3243
+
3244
+ pseudo: function(nodes, name, value, root, combinator) {
3245
+ if (nodes && combinator) nodes = this[combinator](nodes);
3246
+ if (!nodes) nodes = root.getElementsByTagName("*");
3247
+ return Selector.pseudos[name](nodes, value, root);
3248
+ }
3249
+ },
3250
+
3251
+ pseudos: {
3252
+ 'first-child': function(nodes, value, root) {
3253
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3254
+ if (Selector.handlers.previousElementSibling(node)) continue;
3255
+ results.push(node);
3256
+ }
3257
+ return results;
3258
+ },
3259
+ 'last-child': function(nodes, value, root) {
3260
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3261
+ if (Selector.handlers.nextElementSibling(node)) continue;
3262
+ results.push(node);
3263
+ }
3264
+ return results;
3265
+ },
3266
+ 'only-child': function(nodes, value, root) {
3267
+ var h = Selector.handlers;
3268
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3269
+ if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
3270
+ results.push(node);
3271
+ return results;
3272
+ },
3273
+ 'nth-child': function(nodes, formula, root) {
3274
+ return Selector.pseudos.nth(nodes, formula, root);
3275
+ },
3276
+ 'nth-last-child': function(nodes, formula, root) {
3277
+ return Selector.pseudos.nth(nodes, formula, root, true);
3278
+ },
3279
+ 'nth-of-type': function(nodes, formula, root) {
3280
+ return Selector.pseudos.nth(nodes, formula, root, false, true);
3281
+ },
3282
+ 'nth-last-of-type': function(nodes, formula, root) {
3283
+ return Selector.pseudos.nth(nodes, formula, root, true, true);
3284
+ },
3285
+ 'first-of-type': function(nodes, formula, root) {
3286
+ return Selector.pseudos.nth(nodes, "1", root, false, true);
3287
+ },
3288
+ 'last-of-type': function(nodes, formula, root) {
3289
+ return Selector.pseudos.nth(nodes, "1", root, true, true);
3290
+ },
3291
+ 'only-of-type': function(nodes, formula, root) {
3292
+ var p = Selector.pseudos;
3293
+ return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
3294
+ },
3295
+
3296
+ // handles the an+b logic
3297
+ getIndices: function(a, b, total) {
3298
+ if (a == 0) return b > 0 ? [b] : [];
3299
+ return $R(1, total).inject([], function(memo, i) {
3300
+ if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
3301
+ return memo;
3302
+ });
3303
+ },
3304
+
3305
+ // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
3306
+ nth: function(nodes, formula, root, reverse, ofType) {
3307
+ if (nodes.length == 0) return [];
3308
+ if (formula == 'even') formula = '2n+0';
3309
+ if (formula == 'odd') formula = '2n+1';
3310
+ var h = Selector.handlers, results = [], indexed = [], m;
3311
+ h.mark(nodes);
3312
+ for (var i = 0, node; node = nodes[i]; i++) {
3313
+ if (!node.parentNode._countedByPrototype) {
3314
+ h.index(node.parentNode, reverse, ofType);
3315
+ indexed.push(node.parentNode);
3316
+ }
3317
+ }
3318
+ if (formula.match(/^\d+$/)) { // just a number
3319
+ formula = Number(formula);
3320
+ for (var i = 0, node; node = nodes[i]; i++)
3321
+ if (node.nodeIndex == formula) results.push(node);
3322
+ } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
3323
+ if (m[1] == "-") m[1] = -1;
3324
+ var a = m[1] ? Number(m[1]) : 1;
3325
+ var b = m[2] ? Number(m[2]) : 0;
3326
+ var indices = Selector.pseudos.getIndices(a, b, nodes.length);
3327
+ for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
3328
+ for (var j = 0; j < l; j++)
3329
+ if (node.nodeIndex == indices[j]) results.push(node);
3330
+ }
3331
+ }
3332
+ h.unmark(nodes);
3333
+ h.unmark(indexed);
3334
+ return results;
3335
+ },
3336
+
3337
+ 'empty': function(nodes, value, root) {
3338
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3339
+ // IE treats comments as element nodes
3340
+ if (node.tagName == '!' || node.firstChild) continue;
3341
+ results.push(node);
3342
+ }
3343
+ return results;
3344
+ },
3345
+
3346
+ 'not': function(nodes, selector, root) {
3347
+ var h = Selector.handlers, selectorType, m;
3348
+ var exclusions = new Selector(selector).findElements(root);
3349
+ h.mark(exclusions);
3350
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3351
+ if (!node._countedByPrototype) results.push(node);
3352
+ h.unmark(exclusions);
3353
+ return results;
3354
+ },
3355
+
3356
+ 'enabled': function(nodes, value, root) {
3357
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3358
+ if (!node.disabled && (!node.type || node.type !== 'hidden'))
3359
+ results.push(node);
3360
+ return results;
3361
+ },
3362
+
3363
+ 'disabled': function(nodes, value, root) {
3364
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3365
+ if (node.disabled) results.push(node);
3366
+ return results;
3367
+ },
3368
+
3369
+ 'checked': function(nodes, value, root) {
3370
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3371
+ if (node.checked) results.push(node);
3372
+ return results;
3373
+ }
3374
+ },
3375
+
3376
+ operators: {
3377
+ '=': function(nv, v) { return nv == v; },
3378
+ '!=': function(nv, v) { return nv != v; },
3379
+ '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
3380
+ '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
3381
+ '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
3382
+ '$=': function(nv, v) { return nv.endsWith(v); },
3383
+ '*=': function(nv, v) { return nv.include(v); },
3384
+ '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
3385
+ '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
3386
+ '-').include('-' + (v || "").toUpperCase() + '-'); }
3387
+ },
3388
+
3389
+ split: function(expression) {
3390
+ var expressions = [];
3391
+ expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
3392
+ expressions.push(m[1].strip());
3393
+ });
3394
+ return expressions;
3395
+ },
3396
+
3397
+ matchElements: function(elements, expression) {
3398
+ var matches = $$(expression), h = Selector.handlers;
3399
+ h.mark(matches);
3400
+ for (var i = 0, results = [], element; element = elements[i]; i++)
3401
+ if (element._countedByPrototype) results.push(element);
3402
+ h.unmark(matches);
3403
+ return results;
3404
+ },
3405
+
3406
+ findElement: function(elements, expression, index) {
3407
+ if (Object.isNumber(expression)) {
3408
+ index = expression; expression = false;
3409
+ }
3410
+ return Selector.matchElements(elements, expression || '*')[index || 0];
3411
+ },
3412
+
3413
+ findChildElements: function(element, expressions) {
3414
+ expressions = Selector.split(expressions.join(','));
3415
+ var results = [], h = Selector.handlers;
3416
+ for (var i = 0, l = expressions.length, selector; i < l; i++) {
3417
+ selector = new Selector(expressions[i].strip());
3418
+ h.concat(results, selector.findElements(element));
3419
+ }
3420
+ return (l > 1) ? h.unique(results) : results;
3421
+ }
3422
+ });
3423
+
3424
+ if (Prototype.Browser.IE) {
3425
+ Object.extend(Selector.handlers, {
3426
+ // IE returns comment nodes on getElementsByTagName("*").
3427
+ // Filter them out.
3428
+ concat: function(a, b) {
3429
+ for (var i = 0, node; node = b[i]; i++)
3430
+ if (node.tagName !== "!") a.push(node);
3431
+ return a;
3432
+ },
3433
+
3434
+ // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
3435
+ unmark: function(nodes) {
3436
+ for (var i = 0, node; node = nodes[i]; i++)
3437
+ node.removeAttribute('_countedByPrototype');
3438
+ return nodes;
3439
+ }
3440
+ });
3441
+ }
3442
+
3443
+ function $$() {
3444
+ return Selector.findChildElements(document, $A(arguments));
3445
+ }
3446
+ var Form = {
3447
+ reset: function(form) {
3448
+ $(form).reset();
3449
+ return form;
3450
+ },
3451
+
3452
+ serializeElements: function(elements, options) {
3453
+ if (typeof options != 'object') options = { hash: !!options };
3454
+ else if (Object.isUndefined(options.hash)) options.hash = true;
3455
+ var key, value, submitted = false, submit = options.submit;
3456
+
3457
+ var data = elements.inject({ }, function(result, element) {
3458
+ if (!element.disabled && element.name) {
3459
+ key = element.name; value = $(element).getValue();
3460
+ if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
3461
+ submit !== false && (!submit || key == submit) && (submitted = true)))) {
3462
+ if (key in result) {
3463
+ // a key is already present; construct an array of values
3464
+ if (!Object.isArray(result[key])) result[key] = [result[key]];
3465
+ result[key].push(value);
3466
+ }
3467
+ else result[key] = value;
3468
+ }
3469
+ }
3470
+ return result;
3471
+ });
3472
+
3473
+ return options.hash ? data : Object.toQueryString(data);
3474
+ }
3475
+ };
3476
+
3477
+ Form.Methods = {
3478
+ serialize: function(form, options) {
3479
+ return Form.serializeElements(Form.getElements(form), options);
3480
+ },
3481
+
3482
+ getElements: function(form) {
3483
+ return $A($(form).getElementsByTagName('*')).inject([],
3484
+ function(elements, child) {
3485
+ if (Form.Element.Serializers[child.tagName.toLowerCase()])
3486
+ elements.push(Element.extend(child));
3487
+ return elements;
3488
+ }
3489
+ );
3490
+ },
3491
+
3492
+ getInputs: function(form, typeName, name) {
3493
+ form = $(form);
3494
+ var inputs = form.getElementsByTagName('input');
3495
+
3496
+ if (!typeName && !name) return $A(inputs).map(Element.extend);
3497
+
3498
+ for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
3499
+ var input = inputs[i];
3500
+ if ((typeName && input.type != typeName) || (name && input.name != name))
3501
+ continue;
3502
+ matchingInputs.push(Element.extend(input));
3503
+ }
3504
+
3505
+ return matchingInputs;
3506
+ },
3507
+
3508
+ disable: function(form) {
3509
+ form = $(form);
3510
+ Form.getElements(form).invoke('disable');
3511
+ return form;
3512
+ },
3513
+
3514
+ enable: function(form) {
3515
+ form = $(form);
3516
+ Form.getElements(form).invoke('enable');
3517
+ return form;
3518
+ },
3519
+
3520
+ findFirstElement: function(form) {
3521
+ var elements = $(form).getElements().findAll(function(element) {
3522
+ return 'hidden' != element.type && !element.disabled;
3523
+ });
3524
+ var firstByIndex = elements.findAll(function(element) {
3525
+ return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
3526
+ }).sortBy(function(element) { return element.tabIndex }).first();
3527
+
3528
+ return firstByIndex ? firstByIndex : elements.find(function(element) {
3529
+ return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
3530
+ });
3531
+ },
3532
+
3533
+ focusFirstElement: function(form) {
3534
+ form = $(form);
3535
+ form.findFirstElement().activate();
3536
+ return form;
3537
+ },
3538
+
3539
+ request: function(form, options) {
3540
+ form = $(form), options = Object.clone(options || { });
3541
+
3542
+ var params = options.parameters, action = form.readAttribute('action') || '';
3543
+ if (action.blank()) action = window.location.href;
3544
+ options.parameters = form.serialize(true);
3545
+
3546
+ if (params) {
3547
+ if (Object.isString(params)) params = params.toQueryParams();
3548
+ Object.extend(options.parameters, params);
3549
+ }
3550
+
3551
+ if (form.hasAttribute('method') && !options.method)
3552
+ options.method = form.method;
3553
+
3554
+ return new Ajax.Request(action, options);
3555
+ }
3556
+ };
3557
+
3558
+ /*--------------------------------------------------------------------------*/
3559
+
3560
+ Form.Element = {
3561
+ focus: function(element) {
3562
+ $(element).focus();
3563
+ return element;
3564
+ },
3565
+
3566
+ select: function(element) {
3567
+ $(element).select();
3568
+ return element;
3569
+ }
3570
+ };
3571
+
3572
+ Form.Element.Methods = {
3573
+ serialize: function(element) {
3574
+ element = $(element);
3575
+ if (!element.disabled && element.name) {
3576
+ var value = element.getValue();
3577
+ if (value != undefined) {
3578
+ var pair = { };
3579
+ pair[element.name] = value;
3580
+ return Object.toQueryString(pair);
3581
+ }
3582
+ }
3583
+ return '';
3584
+ },
3585
+
3586
+ getValue: function(element) {
3587
+ element = $(element);
3588
+ var method = element.tagName.toLowerCase();
3589
+ return Form.Element.Serializers[method](element);
3590
+ },
3591
+
3592
+ setValue: function(element, value) {
3593
+ element = $(element);
3594
+ var method = element.tagName.toLowerCase();
3595
+ Form.Element.Serializers[method](element, value);
3596
+ return element;
3597
+ },
3598
+
3599
+ clear: function(element) {
3600
+ $(element).value = '';
3601
+ return element;
3602
+ },
3603
+
3604
+ present: function(element) {
3605
+ return $(element).value != '';
3606
+ },
3607
+
3608
+ activate: function(element) {
3609
+ element = $(element);
3610
+ try {
3611
+ element.focus();
3612
+ if (element.select && (element.tagName.toLowerCase() != 'input' ||
3613
+ !['button', 'reset', 'submit'].include(element.type)))
3614
+ element.select();
3615
+ } catch (e) { }
3616
+ return element;
3617
+ },
3618
+
3619
+ disable: function(element) {
3620
+ element = $(element);
3621
+ element.disabled = true;
3622
+ return element;
3623
+ },
3624
+
3625
+ enable: function(element) {
3626
+ element = $(element);
3627
+ element.disabled = false;
3628
+ return element;
3629
+ }
3630
+ };
3631
+
3632
+ /*--------------------------------------------------------------------------*/
3633
+
3634
+ var Field = Form.Element;
3635
+ var $F = Form.Element.Methods.getValue;
3636
+
3637
+ /*--------------------------------------------------------------------------*/
3638
+
3639
+ Form.Element.Serializers = {
3640
+ input: function(element, value) {
3641
+ switch (element.type.toLowerCase()) {
3642
+ case 'checkbox':
3643
+ case 'radio':
3644
+ return Form.Element.Serializers.inputSelector(element, value);
3645
+ default:
3646
+ return Form.Element.Serializers.textarea(element, value);
3647
+ }
3648
+ },
3649
+
3650
+ inputSelector: function(element, value) {
3651
+ if (Object.isUndefined(value)) return element.checked ? element.value : null;
3652
+ else element.checked = !!value;
3653
+ },
3654
+
3655
+ textarea: function(element, value) {
3656
+ if (Object.isUndefined(value)) return element.value;
3657
+ else element.value = value;
3658
+ },
3659
+
3660
+ select: function(element, value) {
3661
+ if (Object.isUndefined(value))
3662
+ return this[element.type == 'select-one' ?
3663
+ 'selectOne' : 'selectMany'](element);
3664
+ else {
3665
+ var opt, currentValue, single = !Object.isArray(value);
3666
+ for (var i = 0, length = element.length; i < length; i++) {
3667
+ opt = element.options[i];
3668
+ currentValue = this.optionValue(opt);
3669
+ if (single) {
3670
+ if (currentValue == value) {
3671
+ opt.selected = true;
3672
+ return;
3673
+ }
3674
+ }
3675
+ else opt.selected = value.include(currentValue);
3676
+ }
3677
+ }
3678
+ },
3679
+
3680
+ selectOne: function(element) {
3681
+ var index = element.selectedIndex;
3682
+ return index >= 0 ? this.optionValue(element.options[index]) : null;
3683
+ },
3684
+
3685
+ selectMany: function(element) {
3686
+ var values, length = element.length;
3687
+ if (!length) return null;
3688
+
3689
+ for (var i = 0, values = []; i < length; i++) {
3690
+ var opt = element.options[i];
3691
+ if (opt.selected) values.push(this.optionValue(opt));
3692
+ }
3693
+ return values;
3694
+ },
3695
+
3696
+ optionValue: function(opt) {
3697
+ // extend element because hasAttribute may not be native
3698
+ return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
3699
+ }
3700
+ };
3701
+
3702
+ /*--------------------------------------------------------------------------*/
3703
+
3704
+ Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
3705
+ initialize: function($super, element, frequency, callback) {
3706
+ $super(callback, frequency);
3707
+ this.element = $(element);
3708
+ this.lastValue = this.getValue();
3709
+ },
3710
+
3711
+ execute: function() {
3712
+ var value = this.getValue();
3713
+ if (Object.isString(this.lastValue) && Object.isString(value) ?
3714
+ this.lastValue != value : String(this.lastValue) != String(value)) {
3715
+ this.callback(this.element, value);
3716
+ this.lastValue = value;
3717
+ }
3718
+ }
3719
+ });
3720
+
3721
+ Form.Element.Observer = Class.create(Abstract.TimedObserver, {
3722
+ getValue: function() {
3723
+ return Form.Element.getValue(this.element);
3724
+ }
3725
+ });
3726
+
3727
+ Form.Observer = Class.create(Abstract.TimedObserver, {
3728
+ getValue: function() {
3729
+ return Form.serialize(this.element);
3730
+ }
3731
+ });
3732
+
3733
+ /*--------------------------------------------------------------------------*/
3734
+
3735
+ Abstract.EventObserver = Class.create({
3736
+ initialize: function(element, callback) {
3737
+ this.element = $(element);
3738
+ this.callback = callback;
3739
+
3740
+ this.lastValue = this.getValue();
3741
+ if (this.element.tagName.toLowerCase() == 'form')
3742
+ this.registerFormCallbacks();
3743
+ else
3744
+ this.registerCallback(this.element);
3745
+ },
3746
+
3747
+ onElementEvent: function() {
3748
+ var value = this.getValue();
3749
+ if (this.lastValue != value) {
3750
+ this.callback(this.element, value);
3751
+ this.lastValue = value;
3752
+ }
3753
+ },
3754
+
3755
+ registerFormCallbacks: function() {
3756
+ Form.getElements(this.element).each(this.registerCallback, this);
3757
+ },
3758
+
3759
+ registerCallback: function(element) {
3760
+ if (element.type) {
3761
+ switch (element.type.toLowerCase()) {
3762
+ case 'checkbox':
3763
+ case 'radio':
3764
+ Event.observe(element, 'click', this.onElementEvent.bind(this));
3765
+ break;
3766
+ default:
3767
+ Event.observe(element, 'change', this.onElementEvent.bind(this));
3768
+ break;
3769
+ }
3770
+ }
3771
+ }
3772
+ });
3773
+
3774
+ Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
3775
+ getValue: function() {
3776
+ return Form.Element.getValue(this.element);
3777
+ }
3778
+ });
3779
+
3780
+ Form.EventObserver = Class.create(Abstract.EventObserver, {
3781
+ getValue: function() {
3782
+ return Form.serialize(this.element);
3783
+ }
3784
+ });
3785
+ if (!window.Event) var Event = { };
3786
+
3787
+ Object.extend(Event, {
3788
+ KEY_BACKSPACE: 8,
3789
+ KEY_TAB: 9,
3790
+ KEY_RETURN: 13,
3791
+ KEY_ESC: 27,
3792
+ KEY_LEFT: 37,
3793
+ KEY_UP: 38,
3794
+ KEY_RIGHT: 39,
3795
+ KEY_DOWN: 40,
3796
+ KEY_DELETE: 46,
3797
+ KEY_HOME: 36,
3798
+ KEY_END: 35,
3799
+ KEY_PAGEUP: 33,
3800
+ KEY_PAGEDOWN: 34,
3801
+ KEY_INSERT: 45,
3802
+
3803
+ cache: { },
3804
+
3805
+ relatedTarget: function(event) {
3806
+ var element;
3807
+ switch(event.type) {
3808
+ case 'mouseover': element = event.fromElement; break;
3809
+ case 'mouseout': element = event.toElement; break;
3810
+ default: return null;
3811
+ }
3812
+ return Element.extend(element);
3813
+ }
3814
+ });
3815
+
3816
+ Event.Methods = (function() {
3817
+ var isButton;
3818
+
3819
+ if (Prototype.Browser.IE) {
3820
+ var buttonMap = { 0: 1, 1: 4, 2: 2 };
3821
+ isButton = function(event, code) {
3822
+ return event.button == buttonMap[code];
3823
+ };
3824
+
3825
+ } else if (Prototype.Browser.WebKit) {
3826
+ isButton = function(event, code) {
3827
+ switch (code) {
3828
+ case 0: return event.which == 1 && !event.metaKey;
3829
+ case 1: return event.which == 1 && event.metaKey;
3830
+ default: return false;
3831
+ }
3832
+ };
3833
+
3834
+ } else {
3835
+ isButton = function(event, code) {
3836
+ return event.which ? (event.which === code + 1) : (event.button === code);
3837
+ };
3838
+ }
3839
+
3840
+ return {
3841
+ isLeftClick: function(event) { return isButton(event, 0) },
3842
+ isMiddleClick: function(event) { return isButton(event, 1) },
3843
+ isRightClick: function(event) { return isButton(event, 2) },
3844
+
3845
+ element: function(event) {
3846
+ event = Event.extend(event);
3847
+
3848
+ var node = event.target,
3849
+ type = event.type,
3850
+ currentTarget = event.currentTarget;
3851
+
3852
+ if (currentTarget && currentTarget.tagName) {
3853
+ // Firefox screws up the "click" event when moving between radio buttons
3854
+ // via arrow keys. It also screws up the "load" and "error" events on images,
3855
+ // reporting the document as the target instead of the original image.
3856
+ if (type === 'load' || type === 'error' ||
3857
+ (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
3858
+ && currentTarget.type === 'radio'))
3859
+ node = currentTarget;
3860
+ }
3861
+ if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;
3862
+ return Element.extend(node);
3863
+ },
3864
+
3865
+ findElement: function(event, expression) {
3866
+ var element = Event.element(event);
3867
+ if (!expression) return element;
3868
+ var elements = [element].concat(element.ancestors());
3869
+ return Selector.findElement(elements, expression, 0);
3870
+ },
3871
+
3872
+ pointer: function(event) {
3873
+ var docElement = document.documentElement,
3874
+ body = document.body || { scrollLeft: 0, scrollTop: 0 };
3875
+ return {
3876
+ x: event.pageX || (event.clientX +
3877
+ (docElement.scrollLeft || body.scrollLeft) -
3878
+ (docElement.clientLeft || 0)),
3879
+ y: event.pageY || (event.clientY +
3880
+ (docElement.scrollTop || body.scrollTop) -
3881
+ (docElement.clientTop || 0))
3882
+ };
3883
+ },
3884
+
3885
+ pointerX: function(event) { return Event.pointer(event).x },
3886
+ pointerY: function(event) { return Event.pointer(event).y },
3887
+
3888
+ stop: function(event) {
3889
+ Event.extend(event);
3890
+ event.preventDefault();
3891
+ event.stopPropagation();
3892
+ event.stopped = true;
3893
+ }
3894
+ };
3895
+ })();
3896
+
3897
+ Event.extend = (function() {
3898
+ var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
3899
+ m[name] = Event.Methods[name].methodize();
3900
+ return m;
3901
+ });
3902
+
3903
+ if (Prototype.Browser.IE) {
3904
+ Object.extend(methods, {
3905
+ stopPropagation: function() { this.cancelBubble = true },
3906
+ preventDefault: function() { this.returnValue = false },
3907
+ inspect: function() { return "[object Event]" }
3908
+ });
3909
+
3910
+ return function(event) {
3911
+ if (!event) return false;
3912
+ if (event._extendedByPrototype) return event;
3913
+
3914
+ event._extendedByPrototype = Prototype.emptyFunction;
3915
+ var pointer = Event.pointer(event);
3916
+ Object.extend(event, {
3917
+ target: event.srcElement,
3918
+ relatedTarget: Event.relatedTarget(event),
3919
+ pageX: pointer.x,
3920
+ pageY: pointer.y
3921
+ });
3922
+ return Object.extend(event, methods);
3923
+ };
3924
+
3925
+ } else {
3926
+ Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
3927
+ Object.extend(Event.prototype, methods);
3928
+ return Prototype.K;
3929
+ }
3930
+ })();
3931
+
3932
+ Object.extend(Event, (function() {
3933
+ var cache = Event.cache;
3934
+
3935
+ function getEventID(element) {
3936
+ if (element._prototypeEventID) return element._prototypeEventID[0];
3937
+ arguments.callee.id = arguments.callee.id || 1;
3938
+ return element._prototypeEventID = [++arguments.callee.id];
3939
+ }
3940
+
3941
+ function getDOMEventName(eventName) {
3942
+ if (eventName && eventName.include(':')) return "dataavailable";
3943
+ return eventName;
3944
+ }
3945
+
3946
+ function getCacheForID(id) {
3947
+ return cache[id] = cache[id] || { };
3948
+ }
3949
+
3950
+ function getWrappersForEventName(id, eventName) {
3951
+ var c = getCacheForID(id);
3952
+ return c[eventName] = c[eventName] || [];
3953
+ }
3954
+
3955
+ function createWrapper(element, eventName, handler) {
3956
+ var id = getEventID(element);
3957
+ var c = getWrappersForEventName(id, eventName);
3958
+ if (c.pluck("handler").include(handler)) return false;
3959
+
3960
+ var wrapper = function(event) {
3961
+ if (!Event || !Event.extend ||
3962
+ (event.eventName && event.eventName != eventName))
3963
+ return false;
3964
+
3965
+ Event.extend(event);
3966
+ handler.call(element, event);
3967
+ };
3968
+
3969
+ wrapper.handler = handler;
3970
+ c.push(wrapper);
3971
+ return wrapper;
3972
+ }
3973
+
3974
+ function findWrapper(id, eventName, handler) {
3975
+ var c = getWrappersForEventName(id, eventName);
3976
+ return c.find(function(wrapper) { return wrapper.handler == handler });
3977
+ }
3978
+
3979
+ function destroyWrapper(id, eventName, handler) {
3980
+ var c = getCacheForID(id);
3981
+ if (!c[eventName]) return false;
3982
+ c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
3983
+ }
3984
+
3985
+ function destroyCache() {
3986
+ for (var id in cache)
3987
+ for (var eventName in cache[id])
3988
+ cache[id][eventName] = null;
3989
+ }
3990
+
3991
+
3992
+ // Internet Explorer needs to remove event handlers on page unload
3993
+ // in order to avoid memory leaks.
3994
+ if (window.attachEvent) {
3995
+ window.attachEvent("onunload", destroyCache);
3996
+ }
3997
+
3998
+ // Safari has a dummy event handler on page unload so that it won't
3999
+ // use its bfcache. Safari <= 3.1 has an issue with restoring the "document"
4000
+ // object when page is returned to via the back button using its bfcache.
4001
+ if (Prototype.Browser.WebKit) {
4002
+ window.addEventListener('unload', Prototype.emptyFunction, false);
4003
+ }
4004
+
4005
+ return {
4006
+ observe: function(element, eventName, handler) {
4007
+ element = $(element);
4008
+ var name = getDOMEventName(eventName);
4009
+
4010
+ var wrapper = createWrapper(element, eventName, handler);
4011
+ if (!wrapper) return element;
4012
+
4013
+ if (element.addEventListener) {
4014
+ element.addEventListener(name, wrapper, false);
4015
+ } else {
4016
+ element.attachEvent("on" + name, wrapper);
4017
+ }
4018
+
4019
+ return element;
4020
+ },
4021
+
4022
+ stopObserving: function(element, eventName, handler) {
4023
+ element = $(element);
4024
+ var id = getEventID(element), name = getDOMEventName(eventName);
4025
+
4026
+ if (!handler && eventName) {
4027
+ getWrappersForEventName(id, eventName).each(function(wrapper) {
4028
+ element.stopObserving(eventName, wrapper.handler);
4029
+ });
4030
+ return element;
4031
+
4032
+ } else if (!eventName) {
4033
+ Object.keys(getCacheForID(id)).each(function(eventName) {
4034
+ element.stopObserving(eventName);
4035
+ });
4036
+ return element;
4037
+ }
4038
+
4039
+ var wrapper = findWrapper(id, eventName, handler);
4040
+ if (!wrapper) return element;
4041
+
4042
+ if (element.removeEventListener) {
4043
+ element.removeEventListener(name, wrapper, false);
4044
+ } else {
4045
+ element.detachEvent("on" + name, wrapper);
4046
+ }
4047
+
4048
+ destroyWrapper(id, eventName, handler);
4049
+
4050
+ return element;
4051
+ },
4052
+
4053
+ fire: function(element, eventName, memo) {
4054
+ element = $(element);
4055
+ if (element == document && document.createEvent && !element.dispatchEvent)
4056
+ element = document.documentElement;
4057
+
4058
+ var event;
4059
+ if (document.createEvent) {
4060
+ event = document.createEvent("HTMLEvents");
4061
+ event.initEvent("dataavailable", true, true);
4062
+ } else {
4063
+ event = document.createEventObject();
4064
+ event.eventType = "ondataavailable";
4065
+ }
4066
+
4067
+ event.eventName = eventName;
4068
+ event.memo = memo || { };
4069
+
4070
+ if (document.createEvent) {
4071
+ element.dispatchEvent(event);
4072
+ } else {
4073
+ element.fireEvent(event.eventType, event);
4074
+ }
4075
+
4076
+ return Event.extend(event);
4077
+ }
4078
+ };
4079
+ })());
4080
+
4081
+ Object.extend(Event, Event.Methods);
4082
+
4083
+ Element.addMethods({
4084
+ fire: Event.fire,
4085
+ observe: Event.observe,
4086
+ stopObserving: Event.stopObserving
4087
+ });
4088
+
4089
+ Object.extend(document, {
4090
+ fire: Element.Methods.fire.methodize(),
4091
+ observe: Element.Methods.observe.methodize(),
4092
+ stopObserving: Element.Methods.stopObserving.methodize(),
4093
+ loaded: false
4094
+ });
4095
+
4096
+ (function() {
4097
+ /* Support for the DOMContentLoaded event is based on work by Dan Webb,
4098
+ Matthias Miller, Dean Edwards and John Resig. */
4099
+
4100
+ var timer;
4101
+
4102
+ function fireContentLoadedEvent() {
4103
+ if (document.loaded) return;
4104
+ if (timer) window.clearInterval(timer);
4105
+ document.fire("dom:loaded");
4106
+ document.loaded = true;
4107
+ }
4108
+
4109
+ if (document.addEventListener) {
4110
+ if (Prototype.Browser.WebKit) {
4111
+ timer = window.setInterval(function() {
4112
+ if (/loaded|complete/.test(document.readyState))
4113
+ fireContentLoadedEvent();
4114
+ }, 0);
4115
+
4116
+ Event.observe(window, "load", fireContentLoadedEvent);
4117
+
4118
+ } else {
4119
+ document.addEventListener("DOMContentLoaded",
4120
+ fireContentLoadedEvent, false);
4121
+ }
4122
+
4123
+ } else {
4124
+ document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
4125
+ $("__onDOMContentLoaded").onreadystatechange = function() {
4126
+ if (this.readyState == "complete") {
4127
+ this.onreadystatechange = null;
4128
+ fireContentLoadedEvent();
4129
+ }
4130
+ };
4131
+ }
4132
+ })();
4133
+ /*------------------------------- DEPRECATED -------------------------------*/
4134
+
4135
+ Hash.toQueryString = Object.toQueryString;
4136
+
4137
+ var Toggle = { display: Element.toggle };
4138
+
4139
+ Element.Methods.childOf = Element.Methods.descendantOf;
4140
+
4141
+ var Insertion = {
4142
+ Before: function(element, content) {
4143
+ return Element.insert(element, {before:content});
4144
+ },
4145
+
4146
+ Top: function(element, content) {
4147
+ return Element.insert(element, {top:content});
4148
+ },
4149
+
4150
+ Bottom: function(element, content) {
4151
+ return Element.insert(element, {bottom:content});
4152
+ },
4153
+
4154
+ After: function(element, content) {
4155
+ return Element.insert(element, {after:content});
4156
+ }
4157
+ };
4158
+
4159
+ var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
4160
+
4161
+ // This should be moved to script.aculo.us; notice the deprecated methods
4162
+ // further below, that map to the newer Element methods.
4163
+ var Position = {
4164
+ // set to true if needed, warning: firefox performance problems
4165
+ // NOT neeeded for page scrolling, only if draggable contained in
4166
+ // scrollable elements
4167
+ includeScrollOffsets: false,
4168
+
4169
+ // must be called before calling withinIncludingScrolloffset, every time the
4170
+ // page is scrolled
4171
+ prepare: function() {
4172
+ this.deltaX = window.pageXOffset
4173
+ || document.documentElement.scrollLeft
4174
+ || document.body.scrollLeft
4175
+ || 0;
4176
+ this.deltaY = window.pageYOffset
4177
+ || document.documentElement.scrollTop
4178
+ || document.body.scrollTop
4179
+ || 0;
4180
+ },
4181
+
4182
+ // caches x/y coordinate pair to use with overlap
4183
+ within: function(element, x, y) {
4184
+ if (this.includeScrollOffsets)
4185
+ return this.withinIncludingScrolloffsets(element, x, y);
4186
+ this.xcomp = x;
4187
+ this.ycomp = y;
4188
+ this.offset = Element.cumulativeOffset(element);
4189
+
4190
+ return (y >= this.offset[1] &&
4191
+ y < this.offset[1] + element.offsetHeight &&
4192
+ x >= this.offset[0] &&
4193
+ x < this.offset[0] + element.offsetWidth);
4194
+ },
4195
+
4196
+ withinIncludingScrolloffsets: function(element, x, y) {
4197
+ var offsetcache = Element.cumulativeScrollOffset(element);
4198
+
4199
+ this.xcomp = x + offsetcache[0] - this.deltaX;
4200
+ this.ycomp = y + offsetcache[1] - this.deltaY;
4201
+ this.offset = Element.cumulativeOffset(element);
4202
+
4203
+ return (this.ycomp >= this.offset[1] &&
4204
+ this.ycomp < this.offset[1] + element.offsetHeight &&
4205
+ this.xcomp >= this.offset[0] &&
4206
+ this.xcomp < this.offset[0] + element.offsetWidth);
4207
+ },
4208
+
4209
+ // within must be called directly before
4210
+ overlap: function(mode, element) {
4211
+ if (!mode) return 0;
4212
+ if (mode == 'vertical')
4213
+ return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
4214
+ element.offsetHeight;
4215
+ if (mode == 'horizontal')
4216
+ return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
4217
+ element.offsetWidth;
4218
+ },
4219
+
4220
+ // Deprecation layer -- use newer Element methods now (1.5.2).
4221
+
4222
+ cumulativeOffset: Element.Methods.cumulativeOffset,
4223
+
4224
+ positionedOffset: Element.Methods.positionedOffset,
4225
+
4226
+ absolutize: function(element) {
4227
+ Position.prepare();
4228
+ return Element.absolutize(element);
4229
+ },
4230
+
4231
+ relativize: function(element) {
4232
+ Position.prepare();
4233
+ return Element.relativize(element);
4234
+ },
4235
+
4236
+ realOffset: Element.Methods.cumulativeScrollOffset,
4237
+
4238
+ offsetParent: Element.Methods.getOffsetParent,
4239
+
4240
+ page: Element.Methods.viewportOffset,
4241
+
4242
+ clone: function(source, target, options) {
4243
+ options = options || { };
4244
+ return Element.clonePosition(target, source, options);
4245
+ }
4246
+ };
4247
+
4248
+ /*--------------------------------------------------------------------------*/
4249
+
4250
+ if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
4251
+ function iter(name) {
4252
+ return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
4253
+ }
4254
+
4255
+ instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
4256
+ function(element, className) {
4257
+ className = className.toString().strip();
4258
+ var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
4259
+ return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
4260
+ } : function(element, className) {
4261
+ className = className.toString().strip();
4262
+ var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
4263
+ if (!classNames && !className) return elements;
4264
+
4265
+ var nodes = $(element).getElementsByTagName('*');
4266
+ className = ' ' + className + ' ';
4267
+
4268
+ for (var i = 0, child, cn; child = nodes[i]; i++) {
4269
+ if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
4270
+ (classNames && classNames.all(function(name) {
4271
+ return !name.toString().blank() && cn.include(' ' + name + ' ');
4272
+ }))))
4273
+ elements.push(Element.extend(child));
4274
+ }
4275
+ return elements;
4276
+ };
4277
+
4278
+ return function(className, parentElement) {
4279
+ return $(parentElement || document.body).getElementsByClassName(className);
4280
+ };
4281
+ }(Element.Methods);
4282
+
4283
+ /*--------------------------------------------------------------------------*/
4284
+
4285
+ Element.ClassNames = Class.create();
4286
+ Element.ClassNames.prototype = {
4287
+ initialize: function(element) {
4288
+ this.element = $(element);
4289
+ },
4290
+
4291
+ _each: function(iterator) {
4292
+ this.element.className.split(/\s+/).select(function(name) {
4293
+ return name.length > 0;
4294
+ })._each(iterator);
4295
+ },
4296
+
4297
+ set: function(className) {
4298
+ this.element.className = className;
4299
+ },
4300
+
4301
+ add: function(classNameToAdd) {
4302
+ if (this.include(classNameToAdd)) return;
4303
+ this.set($A(this).concat(classNameToAdd).join(' '));
4304
+ },
4305
+
4306
+ remove: function(classNameToRemove) {
4307
+ if (!this.include(classNameToRemove)) return;
4308
+ this.set($A(this).without(classNameToRemove).join(' '));
4309
+ },
4310
+
4311
+ toString: function() {
4312
+ return $A(this).join(' ');
4313
+ }
4314
+ };
4315
+
4316
+ Object.extend(Element.ClassNames.prototype, Enumerable);
4317
+
4318
+ /*--------------------------------------------------------------------------*/
4319
+
4320
+ Element.addMethods();