radiant 0.7.2 → 0.8.0

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

Potentially problematic release.


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

Files changed (2324) hide show
  1. data/CHANGELOG +295 -195
  2. data/CONTRIBUTORS +14 -2
  3. data/INSTALL +0 -0
  4. data/LICENSE +0 -0
  5. data/README +0 -0
  6. data/Rakefile +0 -0
  7. data/app/controllers/admin/export_controller.rb +0 -0
  8. data/app/controllers/admin/extensions_controller.rb +6 -0
  9. data/app/controllers/admin/layouts_controller.rb +4 -0
  10. data/app/controllers/admin/page_parts_controller.rb +1 -1
  11. data/app/controllers/admin/pages_controller.rb +13 -5
  12. data/app/controllers/admin/preferences_controller.rb +1 -1
  13. data/app/controllers/admin/references_controller.rb +0 -0
  14. data/app/controllers/admin/resource_controller.rb +12 -14
  15. data/app/controllers/admin/snippets_controller.rb +3 -0
  16. data/app/controllers/admin/users_controller.rb +4 -0
  17. data/app/controllers/admin/welcome_controller.rb +2 -2
  18. data/app/controllers/{application.rb → application_controller.rb} +13 -1
  19. data/app/controllers/site_controller.rb +21 -21
  20. data/app/helpers/admin/abstract_model_helper.rb +0 -0
  21. data/app/helpers/admin/export_helper.rb +0 -0
  22. data/app/helpers/admin/extensions_helper.rb +0 -0
  23. data/app/helpers/admin/layouts_helper.rb +0 -0
  24. data/app/helpers/admin/node_helper.rb +0 -0
  25. data/app/helpers/admin/pages_helper.rb +1 -1
  26. data/app/helpers/admin/preferences_helper.rb +0 -0
  27. data/app/helpers/admin/references_helper.rb +1 -1
  28. data/app/helpers/admin/regions_helper.rb +8 -8
  29. data/app/helpers/admin/snippets_helper.rb +0 -0
  30. data/app/helpers/admin/users_helper.rb +0 -0
  31. data/app/helpers/admin/welcome_helper.rb +0 -0
  32. data/app/helpers/application_helper.rb +1 -1
  33. data/app/helpers/site_helper.rb +0 -0
  34. data/app/models/env_dump_page.rb +0 -0
  35. data/app/models/file_not_found_page.rb +3 -3
  36. data/app/models/layout.rb +2 -2
  37. data/app/models/page.rb +59 -78
  38. data/app/models/page_context.rb +0 -0
  39. data/app/models/page_part.rb +3 -3
  40. data/app/models/radiant/config.rb +23 -23
  41. data/app/models/radiant/exporter.rb +0 -0
  42. data/app/models/snippet.rb +3 -3
  43. data/app/models/standard_tags.rb +11 -2
  44. data/app/models/status.rb +0 -0
  45. data/app/models/text_filter.rb +0 -0
  46. data/app/models/user.rb +14 -5
  47. data/app/models/user_action_observer.rb +0 -0
  48. data/app/views/admin/extensions/index.html.haml +0 -0
  49. data/app/views/admin/layouts/_form.html.haml +0 -0
  50. data/app/views/admin/layouts/edit.html.haml +0 -0
  51. data/app/views/admin/layouts/index.html.haml +0 -0
  52. data/app/views/admin/layouts/new.html.haml +0 -0
  53. data/app/views/admin/layouts/remove.html.haml +0 -0
  54. data/app/views/admin/page_parts/_page_part.html.haml +5 -3
  55. data/app/views/admin/pages/_edit_styles.html.haml +0 -0
  56. data/app/views/admin/pages/_fields.html.haml +0 -0
  57. data/app/views/admin/pages/_meta_row.html.haml +0 -0
  58. data/app/views/admin/pages/_node.html.haml +0 -0
  59. data/app/views/admin/pages/_popups.html.haml +2 -1
  60. data/app/views/admin/pages/children.html.haml +0 -0
  61. data/app/views/admin/pages/edit.html.haml +0 -0
  62. data/app/views/admin/pages/index.html.haml +0 -0
  63. data/app/views/admin/pages/new.html.haml +0 -0
  64. data/app/views/admin/pages/remove.html.haml +0 -0
  65. data/app/views/admin/preferences/edit.html.haml +0 -0
  66. data/app/views/admin/references/_tag_reference.haml +0 -0
  67. data/app/views/admin/references/filters.js.erb +0 -0
  68. data/app/views/admin/references/tags.js.erb +0 -0
  69. data/app/views/admin/snippets/_form.html.haml +0 -0
  70. data/app/views/admin/snippets/edit.html.haml +0 -0
  71. data/app/views/admin/snippets/index.html.haml +0 -0
  72. data/app/views/admin/snippets/new.html.haml +0 -0
  73. data/app/views/admin/snippets/remove.html.haml +0 -0
  74. data/app/views/admin/users/_form.html.haml +0 -0
  75. data/app/views/admin/users/edit.html.haml +0 -0
  76. data/app/views/admin/users/index.html.haml +0 -0
  77. data/app/views/admin/users/new.html.haml +0 -0
  78. data/app/views/admin/users/remove.html.haml +0 -0
  79. data/app/views/admin/welcome/login.html.haml +0 -0
  80. data/app/views/layouts/application.html.haml +0 -0
  81. data/app/views/site/not_found.html.haml +0 -0
  82. data/config/boot.rb +5 -4
  83. data/config/database.mysql.yml +0 -0
  84. data/config/database.postgresql.yml +0 -0
  85. data/config/database.sqlite.yml +1 -1
  86. data/config/database.sqlserver.yml +0 -0
  87. data/config/environment.rb +30 -43
  88. data/config/environments/development.rb +1 -2
  89. data/config/environments/production.rb +0 -1
  90. data/config/environments/test.rb +6 -2
  91. data/config/routes.rb +0 -0
  92. data/db/migrate/001_create_radiant_tables.rb +0 -0
  93. data/db/migrate/002_insert_initial_data.rb +0 -0
  94. data/db/migrate/003_rename_behavior_column.rb +0 -0
  95. data/db/migrate/004_rename_filter_column.rb +0 -0
  96. data/db/migrate/005_add_virtual_column_to_page.rb +0 -0
  97. data/db/migrate/006_integer_columns_to_boolean.rb +0 -0
  98. data/db/migrate/007_remove_virtual_column_from_page.rb +0 -0
  99. data/db/migrate/008_add_virtual_column_to_page_again.rb +0 -0
  100. data/db/migrate/009_add_content_type_field_to_layout.rb +0 -0
  101. data/db/migrate/010_merge_behaviors_and_pages.rb +0 -0
  102. data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +0 -0
  103. data/db/migrate/012_create_extension_meta.rb +0 -0
  104. data/db/migrate/013_add_notes_field_to_user.rb +0 -0
  105. data/db/migrate/014_rename_config_default_parts_key.rb +0 -0
  106. data/db/migrate/015_add_optimistic_locking.rb +0 -0
  107. data/db/migrate/016_add_sessions.rb +0 -0
  108. data/db/migrate/017_rename_created_by_updated_by_columns.rb +0 -0
  109. data/db/migrate/018_add_description_and_keywords_to_pages.rb +0 -0
  110. data/db/migrate/019_add_salt_to_users.rb +0 -0
  111. data/db/migrate/020_add_session_info_to_users.rb +0 -0
  112. data/db/migrate/021_remove_session_expire_from_users.rb +0 -0
  113. data/db/migrate/20081203140407_add_indexes.rb +0 -0
  114. data/db/schema.rb +1 -1
  115. data/db/templates/empty.yml +0 -0
  116. data/db/templates/roasters.yml +0 -0
  117. data/db/templates/simple-blog.yml +0 -0
  118. data/db/templates/styled-blog.yml +0 -0
  119. data/features/admin/content_negotiation.feature +24 -0
  120. data/features/admin/layouts_management.feature +10 -0
  121. data/features/admin/pages_management.feature +71 -0
  122. data/features/admin/snippets_management.feature +54 -0
  123. data/features/admin/user_permissions.feature +149 -0
  124. data/features/admin/user_preferences.feature +18 -0
  125. data/features/admin/users_management.feature +63 -0
  126. data/features/page_serving.feature +42 -0
  127. data/features/step_definitions/admin/admin_steps.rb +31 -0
  128. data/features/step_definitions/admin/content_negotiation_steps.rb +37 -0
  129. data/features/step_definitions/admin/pages_management_steps.rb +14 -0
  130. data/features/step_definitions/admin/users_management_steps.rb +12 -0
  131. data/features/step_definitions/page_serving_steps.rb +65 -0
  132. data/features/step_definitions/webrat_steps.rb +117 -0
  133. data/features/support/env.rb +23 -0
  134. data/features/support/paths.rb +14 -0
  135. data/lib/annotatable.rb +0 -0
  136. data/lib/autotest/discover.rb +0 -0
  137. data/lib/autotest/radiant_rails_rspec.rb +0 -0
  138. data/lib/generators/extension/USAGE +0 -0
  139. data/lib/generators/extension/extension_generator.rb +0 -0
  140. data/lib/generators/extension/templates/README +0 -0
  141. data/lib/generators/extension/templates/RSpecRakefile +0 -0
  142. data/lib/generators/extension/templates/extension.rb +0 -0
  143. data/lib/generators/extension/templates/functional_test.rb +0 -0
  144. data/lib/generators/extension/templates/migration.rb +0 -0
  145. data/lib/generators/extension/templates/spec.opts +0 -0
  146. data/lib/generators/extension/templates/spec_helper.rb +0 -0
  147. data/lib/generators/extension/templates/tasks.rake +2 -2
  148. data/lib/generators/extension/templates/test_helper.rb +0 -0
  149. data/lib/generators/extension_controller/USAGE +0 -0
  150. data/lib/generators/extension_controller/extension_controller_generator.rb +0 -0
  151. data/lib/generators/extension_controller/templates/controller.rb +0 -0
  152. data/lib/generators/extension_controller/templates/controller_spec.rb +0 -0
  153. data/lib/generators/extension_controller/templates/functional_test.rb +0 -0
  154. data/lib/generators/extension_controller/templates/helper.rb +0 -0
  155. data/lib/generators/extension_controller/templates/helper_spec.rb +0 -0
  156. data/lib/generators/extension_controller/templates/helper_test.rb +4 -0
  157. data/lib/generators/extension_controller/templates/view.html.erb +0 -0
  158. data/lib/generators/extension_controller/templates/view_spec.rb +0 -0
  159. data/lib/generators/extension_mailer/USAGE +0 -0
  160. data/lib/generators/extension_mailer/extension_mailer_generator.rb +0 -0
  161. data/lib/generators/extension_mailer/templates/fixture.erb +0 -0
  162. data/lib/generators/extension_mailer/templates/mailer.rb +0 -0
  163. data/lib/generators/extension_mailer/templates/unit_test.rb +0 -0
  164. data/lib/generators/extension_mailer/templates/view.erb +0 -0
  165. data/lib/generators/extension_migration/USAGE +0 -0
  166. data/lib/generators/extension_migration/extension_migration_generator.rb +0 -0
  167. data/lib/generators/extension_migration/templates/migration.rb +0 -0
  168. data/lib/generators/extension_model/USAGE +0 -0
  169. data/lib/generators/extension_model/extension_model_generator.rb +0 -0
  170. data/lib/generators/extension_model/templates/fixtures.yml +0 -0
  171. data/lib/generators/extension_model/templates/migration.rb +0 -0
  172. data/lib/generators/extension_model/templates/model.rb +0 -0
  173. data/lib/generators/extension_model/templates/model_spec.rb +0 -0
  174. data/lib/generators/extension_model/templates/unit_test.rb +0 -0
  175. data/lib/generators/generator_base_extension.rb +0 -0
  176. data/lib/generators/instance/instance_generator.rb +0 -0
  177. data/lib/generators/instance/templates/databases/mysql.yml +0 -0
  178. data/lib/generators/instance/templates/databases/postgresql.yml +0 -0
  179. data/lib/generators/instance/templates/databases/sqlite3.yml +0 -0
  180. data/lib/generators/instance/templates/databases/sqlserver.yml +0 -0
  181. data/lib/generators/instance/templates/instance_boot.rb +1 -4
  182. data/lib/generators/instance/templates/instance_environment.rb +36 -44
  183. data/lib/generators/instance/templates/instance_generate +0 -0
  184. data/lib/generators/instance/templates/instance_rakefile +0 -0
  185. data/lib/generators/instance/templates/instance_routes.rb +0 -0
  186. data/lib/inheritable_class_attributes.rb +0 -0
  187. data/lib/local_time.rb +0 -0
  188. data/lib/login_system.rb +59 -40
  189. data/lib/method_observer.rb +0 -0
  190. data/lib/plugins/active_record_extensions/init.rb +0 -0
  191. data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +0 -0
  192. data/lib/plugins/extension_patches/init.rb +1 -3
  193. data/lib/plugins/extension_patches/lib/routing_extension.rb +0 -0
  194. data/lib/plugins/object_extensions/init.rb +0 -0
  195. data/lib/plugins/object_extensions/lib/object_extensions.rb +0 -0
  196. data/lib/plugins/response_cache_timeout/init.rb +1 -1
  197. data/lib/plugins/string_extensions/init.rb +0 -0
  198. data/lib/plugins/string_extensions/lib/string_extensions.rb +10 -9
  199. data/lib/plugins/symbol_extensions/init.rb +0 -0
  200. data/lib/plugins/symbol_extensions/lib/symbol_extensions.rb +2 -4
  201. data/lib/radiant.rb +2 -2
  202. data/lib/radiant/admin_ui.rb +0 -0
  203. data/lib/radiant/admin_ui/region_partials.rb +0 -0
  204. data/lib/radiant/admin_ui/region_set.rb +0 -0
  205. data/lib/radiant/cache.rb +84 -0
  206. data/lib/radiant/extension.rb +0 -0
  207. data/lib/radiant/extension/script.rb +0 -0
  208. data/lib/radiant/extension_loader.rb +1 -1
  209. data/lib/radiant/extension_migrator.rb +0 -0
  210. data/lib/radiant/initializer.rb +33 -8
  211. data/lib/radiant/legacy_routes.rb +0 -0
  212. data/lib/radiant/resource_responses.rb +0 -0
  213. data/lib/radiant/setup.rb +1 -1
  214. data/lib/radiant/taggable.rb +0 -0
  215. data/lib/simpleton.rb +0 -0
  216. data/lib/tasks/cucumber.rake +17 -0
  217. data/lib/tasks/database.rake +0 -0
  218. data/lib/tasks/environments.rake +0 -0
  219. data/lib/tasks/extensions.rake +0 -0
  220. data/lib/tasks/framework.rake +49 -16
  221. data/lib/tasks/instance.rake +0 -0
  222. data/lib/tasks/release.rake +8 -3
  223. data/lib/tasks/rspec.rake +178 -130
  224. data/lib/tasks/undefine.rake +0 -0
  225. data/log/.keep +0 -0
  226. data/public/.htaccess +0 -0
  227. data/public/404.html +0 -0
  228. data/public/500.html +0 -0
  229. data/public/favicon.ico +0 -0
  230. data/public/images/admin/add-child.png +0 -0
  231. data/public/images/admin/clear-page-cache.png +0 -0
  232. data/public/images/admin/collapse.png +0 -0
  233. data/public/images/admin/expand.png +0 -0
  234. data/public/images/admin/layout.png +0 -0
  235. data/public/images/admin/minus.png +0 -0
  236. data/public/images/admin/new-homepage.png +0 -0
  237. data/public/images/admin/new-layout.png +0 -0
  238. data/public/images/admin/new-snippet.png +0 -0
  239. data/public/images/admin/new-user.png +0 -0
  240. data/public/images/admin/page.png +0 -0
  241. data/public/images/admin/plus.png +0 -0
  242. data/public/images/admin/remove-disabled.png +0 -0
  243. data/public/images/admin/remove.png +0 -0
  244. data/public/images/admin/snippet.png +0 -0
  245. data/public/images/admin/spinner.gif +0 -0
  246. data/public/images/admin/virtual-page.png +0 -0
  247. data/public/javascripts/admin/admin.js +1 -0
  248. data/public/javascripts/admin/ruledtable.js +0 -0
  249. data/public/javascripts/admin/sitemap.js +0 -0
  250. data/public/javascripts/admin/tabcontrol.js +6 -0
  251. data/public/javascripts/application.js +0 -0
  252. data/public/javascripts/controls.js +72 -72
  253. data/public/javascripts/dragdrop.js +165 -164
  254. data/public/javascripts/effects.js +173 -165
  255. data/public/javascripts/pngfix.js +0 -0
  256. data/public/javascripts/prototype.js +362 -267
  257. data/public/javascripts/string.js +0 -0
  258. data/public/robots.txt +0 -0
  259. data/public/stylesheets/admin/main.css +0 -0
  260. data/script/cucumber +8 -0
  261. data/spec/controllers/admin/export_controller_spec.rb +0 -0
  262. data/spec/controllers/admin/extensions_controller_spec.rb +23 -8
  263. data/spec/controllers/admin/layouts_controller_spec.rb +41 -1
  264. data/spec/controllers/admin/pages_controller_spec.rb +73 -25
  265. data/spec/controllers/admin/preferences_controller_spec.rb +6 -0
  266. data/spec/controllers/admin/references_controller_spec.rb +0 -0
  267. data/spec/controllers/admin/snippets_controller_spec.rb +71 -18
  268. data/spec/controllers/admin/users_controller_spec.rb +44 -0
  269. data/spec/controllers/admin/welcome_controller_spec.rb +10 -1
  270. data/spec/controllers/application_controller_spec.rb +25 -4
  271. data/spec/controllers/site_controller_spec.rb +49 -12
  272. data/spec/datasets/config_dataset.rb +11 -0
  273. data/spec/datasets/file_not_found_dataset.rb +0 -0
  274. data/spec/datasets/home_page_dataset.rb +0 -0
  275. data/spec/datasets/layouts_dataset.rb +0 -0
  276. data/spec/datasets/markup_pages_dataset.rb +0 -0
  277. data/spec/datasets/pages_dataset.rb +5 -0
  278. data/spec/datasets/pages_with_layouts_dataset.rb +0 -0
  279. data/spec/datasets/snippets_dataset.rb +0 -0
  280. data/spec/datasets/users_and_pages_dataset.rb +0 -0
  281. data/spec/datasets/users_dataset.rb +0 -0
  282. data/spec/fixtures/example_extension/README +0 -0
  283. data/spec/fixtures/example_extension/Rakefile +0 -0
  284. data/spec/fixtures/example_extension/example_extension.rb +0 -0
  285. data/spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake +0 -0
  286. data/spec/fixtures/example_extension/spec/spec.opts +0 -0
  287. data/spec/fixtures/example_extension/spec/spec_helper.rb +0 -0
  288. data/spec/fixtures/sample.txt +0 -0
  289. data/spec/generators/extension_controller_generator_spec.rb +0 -0
  290. data/spec/generators/extension_generator_spec.rb +0 -0
  291. data/spec/generators/extension_generators_spec_helper.rb +0 -0
  292. data/spec/generators/extension_mailer_generator_spec.rb +0 -0
  293. data/spec/generators/extension_migration_generator_spec.rb +0 -0
  294. data/spec/generators/extension_model_generator_spec.rb +0 -0
  295. data/spec/helpers/admin/abstract_model_helper_spec.rb +0 -0
  296. data/spec/helpers/admin/export_helper_spec.rb +0 -0
  297. data/spec/helpers/admin/extensions_helper_spec.rb +0 -0
  298. data/spec/helpers/admin/layouts_helper_spec.rb +0 -0
  299. data/spec/helpers/admin/node_helper_spec.rb +0 -0
  300. data/spec/helpers/admin/pages_helper_spec.rb +0 -0
  301. data/spec/helpers/admin/preferences_helper_spec.rb +0 -0
  302. data/spec/helpers/admin/references_helper_spec.rb +0 -0
  303. data/spec/helpers/admin/regions_helper_spec.rb +6 -9
  304. data/spec/helpers/admin/snippets_helper_spec.rb +0 -0
  305. data/spec/helpers/admin/users_helper_spec.rb +0 -0
  306. data/spec/helpers/admin/welcome_helper_spec.rb +0 -0
  307. data/spec/helpers/application_helper_spec.rb +0 -0
  308. data/spec/helpers/site_helper_spec.rb +0 -0
  309. data/spec/lib/annotatable_spec.rb +0 -0
  310. data/spec/lib/autotest_spec.rb +0 -0
  311. data/spec/lib/core_ext/string_ext_spec.rb +5 -4
  312. data/spec/lib/inheritable_class_attributes_spec.rb +0 -0
  313. data/spec/lib/local_time_spec.rb +0 -0
  314. data/spec/lib/login_system_spec.rb +29 -35
  315. data/spec/lib/method_observer_spec.rb +0 -0
  316. data/spec/lib/radiant/admin_ui/region_partials_spec.rb +0 -0
  317. data/spec/lib/radiant/admin_ui/region_set_spec.rb +0 -0
  318. data/spec/lib/radiant/admin_ui_spec.rb +0 -0
  319. data/spec/lib/radiant/extension/script_spec.rb +0 -0
  320. data/spec/lib/radiant/extension_loader_spec.rb +32 -23
  321. data/spec/lib/radiant/extension_migrator_spec.rb +0 -0
  322. data/spec/lib/radiant/extension_spec.rb +0 -0
  323. data/spec/lib/radiant/initializer_spec.rb +17 -0
  324. data/spec/lib/radiant/legacy_routes_spec.rb +0 -0
  325. data/spec/lib/radiant/resource_responses_spec.rb +0 -0
  326. data/spec/lib/radiant/taggable_spec.rb +0 -0
  327. data/spec/lib/radiant_spec.rb +0 -0
  328. data/spec/lib/simpleton_spec.rb +0 -0
  329. data/spec/matchers/autotest_matchers.rb +0 -0
  330. data/spec/matchers/generator_matchers.rb +0 -0
  331. data/spec/matchers/login_system_matcher.rb +0 -0
  332. data/spec/matchers/render_form_errors_matcher.rb +0 -0
  333. data/spec/matchers/render_matcher.rb +9 -4
  334. data/spec/models/env_dump_page_spec.rb +0 -0
  335. data/spec/models/file_not_found_page_spec.rb +2 -2
  336. data/spec/models/layout_spec.rb +0 -0
  337. data/spec/models/page_context_spec.rb +0 -0
  338. data/spec/models/page_part_spec.rb +0 -0
  339. data/spec/models/page_spec.rb +23 -30
  340. data/spec/models/radiant/config_spec.rb +17 -1
  341. data/spec/models/radiant/exporter_spec.rb +0 -0
  342. data/spec/models/snippet_spec.rb +0 -0
  343. data/spec/models/standard_tags_spec.rb +17 -3
  344. data/spec/models/status_spec.rb +0 -0
  345. data/spec/models/text_filter_spec.rb +0 -0
  346. data/spec/models/user_action_observer_spec.rb +0 -0
  347. data/spec/models/user_spec.rb +15 -0
  348. data/spec/rcov.opts +0 -0
  349. data/spec/spec.opts +1 -1
  350. data/spec/spec_helper.rb +12 -45
  351. data/test/fixtures/extensions/01_basic/app/controllers/basic_extension_controller.rb +0 -0
  352. data/test/fixtures/extensions/01_basic/app/models/basic_extension_mailer.rb +0 -0
  353. data/test/fixtures/extensions/01_basic/app/models/basic_extension_model.rb +0 -0
  354. data/test/fixtures/extensions/01_basic/app/views/basic_extension/index.html.erb +0 -0
  355. data/test/fixtures/extensions/01_basic/app/views/basic_extension/override.html.erb +0 -0
  356. data/test/fixtures/extensions/01_basic/app/views/basic_extension_mailer/message.text.html.erb +0 -0
  357. data/test/fixtures/extensions/01_basic/basic_extension.rb +0 -0
  358. data/test/fixtures/extensions/01_basic/db/migrate/200812131420_create_initial_schema.rb +0 -0
  359. data/test/fixtures/extensions/01_basic/db/migrate/200812131421_modify_initial_schema.rb +0 -0
  360. data/test/fixtures/extensions/01_basic/lib/new_module.rb +0 -0
  361. data/test/fixtures/extensions/01_basic/vendor/plugins/multiple/init.rb +0 -0
  362. data/test/fixtures/extensions/01_basic/vendor/plugins/multiple/lib/multiple.rb +0 -0
  363. data/test/fixtures/extensions/01_basic/vendor/plugins/plugin_normal/init.rb +0 -0
  364. data/test/fixtures/extensions/01_basic/vendor/plugins/plugin_normal/lib/normal_plugin.rb +0 -0
  365. data/test/fixtures/extensions/02_overriding/app/views/basic_extension/override.html.erb +0 -0
  366. data/test/fixtures/extensions/02_overriding/overriding_extension.rb +0 -0
  367. data/test/fixtures/extensions/02_overriding/vendor/plugins/multiple/init.rb +0 -0
  368. data/test/fixtures/extensions/02_overriding/vendor/plugins/multiple/lib/multiple.rb +0 -0
  369. data/test/fixtures/extensions/03_upgrading/db/migrate/01_first.rb +0 -0
  370. data/test/fixtures/extensions/03_upgrading/db/migrate/02_second.rb +0 -0
  371. data/test/fixtures/extensions/03_upgrading/db/migrate/03_pending.rb +0 -0
  372. data/test/fixtures/extensions/03_upgrading/db/migrate/04_dont_run.rb +0 -0
  373. data/test/fixtures/extensions/03_upgrading/upgrading_extension.rb +0 -0
  374. data/test/fixtures/extensions/load_order_blue/load_order_blue_extension.rb +0 -0
  375. data/test/fixtures/extensions/load_order_green/load_order_green_extension.rb +0 -0
  376. data/test/fixtures/extensions/load_order_red/load_order_red_extension.rb +0 -0
  377. data/test/fixtures/extensions/special_characters/db/migrate/001_create_initial_schema.rb +0 -0
  378. data/test/fixtures/extensions/special_characters/special_characters_extension.rb +0 -0
  379. data/test/helpers/page_test_helper.rb +0 -0
  380. data/test/helpers/render_test_helper.rb +0 -0
  381. data/test/helpers/user_test_helper.rb +0 -0
  382. data/test/test_helper.rb +0 -0
  383. data/vendor/extensions/archive/README +0 -0
  384. data/vendor/extensions/archive/Rakefile +0 -0
  385. data/vendor/extensions/archive/app/models/archive_finder.rb +0 -0
  386. data/vendor/extensions/archive/archive_extension.rb +0 -0
  387. data/vendor/extensions/archive/lib/tasks/archive_extension_tasks.rake +0 -0
  388. data/vendor/extensions/archive/spec/datasets/archive_dataset.rb +0 -0
  389. data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +0 -0
  390. data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +0 -0
  391. data/vendor/extensions/archive/spec/models/archive_page_spec.rb +0 -0
  392. data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +0 -0
  393. data/vendor/extensions/archive/spec/spec.opts +0 -0
  394. data/vendor/extensions/archive/spec/spec_helper.rb +0 -0
  395. data/vendor/extensions/archive/test/fixtures/pages.yml +0 -0
  396. data/vendor/extensions/archive/test/functional/archive_extension_test.rb +0 -0
  397. data/vendor/extensions/archive/test/test_helper.rb +0 -0
  398. data/vendor/extensions/markdown_filter/README +0 -0
  399. data/vendor/extensions/markdown_filter/Rakefile +0 -0
  400. data/vendor/extensions/markdown_filter/lib/markdown_filter.rb +0 -0
  401. data/vendor/extensions/markdown_filter/lib/markdown_tags.rb +0 -0
  402. data/vendor/extensions/markdown_filter/lib/smarty_pants_filter.rb +0 -0
  403. data/vendor/extensions/markdown_filter/lib/tasks/markdown_filter_extension_tasks.rake +0 -0
  404. data/vendor/extensions/markdown_filter/lib/tasks/textile_filter_extension_tasks.rake +0 -0
  405. data/vendor/extensions/markdown_filter/markdown.html +0 -0
  406. data/vendor/extensions/markdown_filter/markdown_filter_extension.rb +0 -0
  407. data/vendor/extensions/markdown_filter/smartypants.html +0 -0
  408. data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +0 -0
  409. data/vendor/extensions/markdown_filter/spec/models/smarty_pants_filter_spec.rb +0 -0
  410. data/vendor/extensions/markdown_filter/spec/spec.opts +0 -0
  411. data/vendor/extensions/markdown_filter/spec/spec_helper.rb +0 -0
  412. data/vendor/extensions/markdown_filter/test/test_helper.rb +0 -0
  413. data/vendor/extensions/markdown_filter/test/unit/markdown_filter_test.rb +0 -0
  414. data/vendor/extensions/markdown_filter/test/unit/smarty_pants_filter_test.rb +0 -0
  415. data/vendor/extensions/markdown_filter/vendor/bluecloth/CHANGES +0 -0
  416. data/vendor/extensions/markdown_filter/vendor/bluecloth/LICENSE +0 -0
  417. data/vendor/extensions/markdown_filter/vendor/bluecloth/README +0 -0
  418. data/vendor/extensions/markdown_filter/vendor/bluecloth/bin/bluecloth +0 -0
  419. data/vendor/extensions/markdown_filter/vendor/bluecloth/install.rb +0 -0
  420. data/vendor/extensions/markdown_filter/vendor/bluecloth/lib/bluecloth.rb +0 -0
  421. data/vendor/extensions/markdown_filter/vendor/bluecloth/test.rb +0 -0
  422. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb +0 -0
  423. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/05_Markdown.tests.rb +0 -0
  424. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb +0 -0
  425. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/15_Contrib.tests.rb +0 -0
  426. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/bctestcase.rb +0 -0
  427. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/antsugar.txt +0 -0
  428. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/ml-announce.txt +0 -0
  429. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow.txt +0 -0
  430. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow2.txt +0 -0
  431. data/vendor/extensions/markdown_filter/vendor/bluecloth/utils.rb +0 -0
  432. data/vendor/extensions/markdown_filter/vendor/rubypants/README +0 -0
  433. data/vendor/extensions/markdown_filter/vendor/rubypants/Rakefile +0 -0
  434. data/vendor/extensions/markdown_filter/vendor/rubypants/install.rb +0 -0
  435. data/vendor/extensions/markdown_filter/vendor/rubypants/rubypants.rb +0 -0
  436. data/vendor/extensions/markdown_filter/vendor/rubypants/test_rubypants.rb +0 -0
  437. data/vendor/extensions/textile_filter/README +0 -0
  438. data/vendor/extensions/textile_filter/Rakefile +0 -0
  439. data/vendor/extensions/textile_filter/lib/tasks/textile_filter_extension_tasks.rake +0 -0
  440. data/vendor/extensions/textile_filter/lib/textile_filter.rb +0 -0
  441. data/vendor/extensions/textile_filter/lib/textile_tags.rb +0 -0
  442. data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +0 -0
  443. data/vendor/extensions/textile_filter/spec/spec.opts +0 -0
  444. data/vendor/extensions/textile_filter/spec/spec_helper.rb +0 -0
  445. data/vendor/extensions/textile_filter/test/test_helper.rb +0 -0
  446. data/vendor/extensions/textile_filter/test/unit/textile_filter_test.rb +0 -0
  447. data/vendor/extensions/textile_filter/textile.html +0 -0
  448. data/vendor/extensions/textile_filter/textile_filter_extension.rb +0 -0
  449. data/vendor/highline/CHANGELOG +39 -0
  450. data/vendor/highline/INSTALL +0 -0
  451. data/vendor/highline/LICENSE +1 -1
  452. data/vendor/highline/README +0 -0
  453. data/vendor/highline/Rakefile +1 -1
  454. data/vendor/highline/TODO +0 -0
  455. data/vendor/highline/examples/ansi_colors.rb +0 -0
  456. data/vendor/highline/examples/asking_for_arrays.rb +0 -0
  457. data/vendor/highline/examples/basic_usage.rb +0 -0
  458. data/vendor/highline/examples/color_scheme.rb +0 -0
  459. data/vendor/highline/examples/limit.rb +12 -0
  460. data/vendor/highline/examples/menus.rb +0 -0
  461. data/vendor/highline/examples/overwrite.rb +0 -0
  462. data/vendor/highline/examples/page_and_wrap.rb +0 -0
  463. data/vendor/highline/examples/password.rb +0 -0
  464. data/vendor/highline/examples/trapping_eof.rb +0 -0
  465. data/vendor/highline/examples/using_readline.rb +1 -1
  466. data/vendor/highline/lib/highline.rb +86 -32
  467. data/vendor/highline/lib/highline/color_scheme.rb +0 -0
  468. data/vendor/highline/lib/highline/compatibility.rb +17 -0
  469. data/vendor/highline/lib/highline/import.rb +0 -0
  470. data/vendor/highline/lib/highline/menu.rb +0 -0
  471. data/vendor/highline/lib/highline/question.rb +3 -2
  472. data/vendor/highline/lib/highline/system_extensions.rb +93 -25
  473. data/vendor/highline/setup.rb +0 -0
  474. data/vendor/highline/test/tc_color_scheme.rb +0 -0
  475. data/vendor/highline/test/tc_highline.rb +46 -3
  476. data/vendor/highline/test/tc_import.rb +0 -0
  477. data/vendor/highline/test/tc_menu.rb +0 -0
  478. data/vendor/highline/test/ts_all.rb +0 -0
  479. data/vendor/plugins/acts_as_tree/README +0 -0
  480. data/vendor/plugins/acts_as_tree/Rakefile +0 -0
  481. data/vendor/plugins/acts_as_tree/init.rb +0 -0
  482. data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +0 -0
  483. data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
  484. data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +0 -0
  485. data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
  486. data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
  487. data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
  488. data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
  489. data/vendor/plugins/dataset/CHANGELOG +58 -0
  490. data/vendor/plugins/dataset/LICENSE +1 -1
  491. data/vendor/plugins/dataset/{README.txt → README} +0 -0
  492. data/vendor/plugins/dataset/Rakefile +16 -8
  493. data/vendor/plugins/dataset/TODO +2 -6
  494. data/vendor/plugins/dataset/VERSION.yml +4 -0
  495. data/vendor/plugins/dataset/dataset.gemspec +27 -0
  496. data/vendor/plugins/dataset/lib/dataset.rb +3 -1
  497. data/vendor/plugins/dataset/lib/dataset/base.rb +0 -0
  498. data/vendor/plugins/dataset/lib/dataset/collection.rb +0 -0
  499. data/vendor/plugins/dataset/lib/dataset/database/base.rb +1 -1
  500. data/vendor/plugins/dataset/lib/dataset/database/mysql.rb +0 -0
  501. data/vendor/plugins/dataset/lib/dataset/database/postgresql.rb +0 -0
  502. data/vendor/plugins/dataset/lib/dataset/database/sqlite3.rb +0 -0
  503. data/vendor/plugins/dataset/lib/dataset/extensions/cucumber.rb +20 -0
  504. data/vendor/plugins/dataset/lib/dataset/extensions/rspec.rb +0 -0
  505. data/vendor/plugins/dataset/lib/dataset/extensions/test_unit.rb +0 -0
  506. data/vendor/plugins/dataset/lib/dataset/instance_methods.rb +0 -0
  507. data/vendor/plugins/dataset/lib/dataset/load.rb +0 -0
  508. data/vendor/plugins/dataset/lib/dataset/record/fixture.rb +28 -9
  509. data/vendor/plugins/dataset/lib/dataset/record/meta.rb +31 -7
  510. data/vendor/plugins/dataset/lib/dataset/record/model.rb +15 -6
  511. data/vendor/plugins/dataset/lib/dataset/resolver.rb +0 -0
  512. data/vendor/plugins/dataset/lib/dataset/session.rb +0 -0
  513. data/vendor/plugins/dataset/lib/dataset/session_binding.rb +56 -38
  514. data/vendor/plugins/dataset/lib/dataset/version.rb +0 -0
  515. data/vendor/plugins/dataset/spec/dataset/cucumber_spec.rb +54 -0
  516. data/vendor/plugins/dataset/spec/dataset/database/base_spec.rb +3 -3
  517. data/vendor/plugins/dataset/spec/dataset/record/meta_spec.rb +14 -0
  518. data/vendor/plugins/dataset/spec/dataset/resolver_spec.rb +1 -1
  519. data/vendor/plugins/dataset/spec/dataset/rspec_spec.rb +107 -111
  520. data/vendor/plugins/dataset/spec/dataset/session_binding_spec.rb +42 -4
  521. data/vendor/plugins/dataset/spec/dataset/session_spec.rb +1 -1
  522. data/vendor/plugins/dataset/spec/dataset/test_unit_spec.rb +2 -1
  523. data/vendor/plugins/dataset/spec/fixtures/datasets/constant_not_defined.rb +0 -0
  524. data/vendor/plugins/dataset/spec/fixtures/datasets/ending_with_dataset.rb +0 -0
  525. data/vendor/plugins/dataset/spec/fixtures/datasets/exact_name.rb +0 -0
  526. data/vendor/plugins/dataset/spec/fixtures/datasets/not_a_dataset_base.rb +0 -0
  527. data/vendor/plugins/dataset/spec/fixtures/more_datasets/in_another_directory.rb +0 -0
  528. data/vendor/plugins/dataset/spec/models.rb +14 -2
  529. data/vendor/plugins/dataset/spec/schema.rb +3 -1
  530. data/vendor/plugins/dataset/spec/spec.opts +0 -0
  531. data/vendor/plugins/dataset/spec/spec_helper.rb +7 -9
  532. data/vendor/plugins/dataset/spec/stubs/mini_rails.rb +18 -0
  533. data/vendor/plugins/dataset/spec/stubs/test_help.rb +1 -0
  534. data/vendor/plugins/dataset/tasks/dataset.rake +0 -0
  535. data/vendor/plugins/haml/FAQ +0 -0
  536. data/vendor/plugins/haml/MIT-LICENSE +0 -0
  537. data/vendor/plugins/haml/README.rdoc +4 -4
  538. data/vendor/plugins/haml/REVISION +0 -0
  539. data/vendor/plugins/haml/Rakefile +35 -1
  540. data/vendor/plugins/haml/VERSION +1 -1
  541. data/vendor/plugins/haml/bin/haml +2 -1
  542. data/vendor/plugins/haml/extra/haml-mode.el +331 -0
  543. data/vendor/plugins/haml/extra/sass-mode.el +89 -0
  544. data/vendor/plugins/haml/init.rb +1 -0
  545. data/vendor/plugins/haml/lib/haml.rb +58 -77
  546. data/vendor/plugins/haml/lib/haml/buffer.rb +12 -8
  547. data/vendor/plugins/haml/lib/haml/engine.rb +3 -2
  548. data/vendor/plugins/haml/lib/haml/error.rb +1 -1
  549. data/vendor/plugins/haml/lib/haml/exec.rb +33 -8
  550. data/vendor/plugins/haml/lib/haml/filters.rb +41 -29
  551. data/vendor/plugins/haml/lib/haml/helpers.rb +69 -36
  552. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +0 -0
  553. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +30 -20
  554. data/vendor/plugins/haml/lib/haml/html.rb +53 -19
  555. data/vendor/plugins/haml/lib/haml/precompiler.rb +38 -25
  556. data/vendor/plugins/haml/lib/haml/template.rb +0 -0
  557. data/vendor/plugins/haml/lib/haml/template/patch.rb +0 -0
  558. data/vendor/plugins/haml/lib/haml/template/plugin.rb +0 -0
  559. data/vendor/plugins/haml/lib/haml/util.rb +23 -0
  560. data/vendor/plugins/haml/lib/haml/version.rb +47 -0
  561. data/vendor/plugins/haml/lib/sass.rb +25 -8
  562. data/vendor/plugins/haml/lib/sass/constant.rb +3 -1
  563. data/vendor/plugins/haml/lib/sass/constant/color.rb +0 -0
  564. data/vendor/plugins/haml/lib/sass/constant/literal.rb +0 -0
  565. data/vendor/plugins/haml/lib/sass/constant/nil.rb +0 -0
  566. data/vendor/plugins/haml/lib/sass/constant/number.rb +1 -1
  567. data/vendor/plugins/haml/lib/sass/constant/operation.rb +0 -0
  568. data/vendor/plugins/haml/lib/sass/constant/string.rb +0 -0
  569. data/vendor/plugins/haml/lib/sass/css.rb +31 -30
  570. data/vendor/plugins/haml/lib/sass/engine.rb +13 -12
  571. data/vendor/plugins/haml/lib/sass/error.rb +1 -1
  572. data/vendor/plugins/haml/lib/sass/plugin.rb +11 -7
  573. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +1 -1
  574. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +0 -0
  575. data/vendor/plugins/haml/lib/sass/tree/attr_node.rb +4 -0
  576. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +0 -0
  577. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +0 -0
  578. data/vendor/plugins/haml/lib/sass/tree/node.rb +4 -0
  579. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +4 -0
  580. data/vendor/plugins/haml/lib/sass/tree/value_node.rb +4 -0
  581. data/vendor/plugins/haml/rails/init.rb +1 -0
  582. data/vendor/plugins/haml/test/benchmark.rb +49 -32
  583. data/vendor/plugins/haml/test/haml/engine_test.rb +165 -113
  584. data/vendor/plugins/haml/test/haml/helper_test.rb +29 -8
  585. data/vendor/plugins/haml/test/haml/html2haml_test.rb +50 -16
  586. data/vendor/plugins/haml/test/haml/markaby/standard.mab +0 -0
  587. data/vendor/plugins/haml/test/haml/mocks/article.rb +0 -0
  588. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +0 -0
  589. data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +0 -0
  590. data/vendor/plugins/haml/test/haml/results/filters.xhtml +2 -28
  591. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +20 -18
  592. data/vendor/plugins/haml/test/haml/results/helpful.xhtml +0 -0
  593. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +6 -0
  594. data/vendor/plugins/haml/test/haml/results/list.xhtml +0 -0
  595. data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +0 -0
  596. data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +0 -0
  597. data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +0 -0
  598. data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +5 -0
  599. data/vendor/plugins/haml/test/haml/results/partials.xhtml +0 -0
  600. data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +3 -0
  601. data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +0 -0
  602. data/vendor/plugins/haml/test/haml/results/standard.xhtml +1 -1
  603. data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +0 -0
  604. data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +0 -0
  605. data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +4 -1
  606. data/vendor/plugins/haml/test/haml/rhtml/_av_partial_1.rhtml +0 -0
  607. data/vendor/plugins/haml/test/haml/rhtml/_av_partial_2.rhtml +0 -0
  608. data/vendor/plugins/haml/test/haml/rhtml/action_view.rhtml +0 -0
  609. data/vendor/plugins/haml/test/haml/rhtml/standard.rhtml +3 -3
  610. data/vendor/plugins/haml/test/haml/template_test.rb +58 -5
  611. data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +0 -0
  612. data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +9 -0
  613. data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +0 -0
  614. data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +5 -0
  615. data/vendor/plugins/haml/test/haml/templates/_layout.erb +3 -0
  616. data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +3 -0
  617. data/vendor/plugins/haml/test/haml/templates/_partial.haml +0 -0
  618. data/vendor/plugins/haml/test/haml/templates/_text_area.haml +0 -0
  619. data/vendor/plugins/haml/test/haml/templates/action_view.haml +0 -0
  620. data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +47 -0
  621. data/vendor/plugins/haml/test/haml/templates/breakage.haml +0 -0
  622. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +0 -0
  623. data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +1 -1
  624. data/vendor/plugins/haml/test/haml/templates/filters.haml +0 -28
  625. data/vendor/plugins/haml/test/haml/templates/helpers.haml +46 -20
  626. data/vendor/plugins/haml/test/haml/templates/helpful.haml +0 -0
  627. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +7 -0
  628. data/vendor/plugins/haml/test/haml/templates/list.haml +0 -0
  629. data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +0 -0
  630. data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +0 -0
  631. data/vendor/plugins/haml/test/haml/templates/original_engine.haml +0 -0
  632. data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +3 -0
  633. data/vendor/plugins/haml/test/haml/templates/partialize.haml +0 -0
  634. data/vendor/plugins/haml/test/haml/templates/partials.haml +0 -0
  635. data/vendor/plugins/haml/test/haml/templates/render_layout.haml +2 -0
  636. data/vendor/plugins/haml/test/haml/templates/silent_script.haml +0 -0
  637. data/vendor/plugins/haml/test/haml/templates/standard.haml +3 -3
  638. data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +42 -0
  639. data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +0 -0
  640. data/vendor/plugins/haml/test/haml/templates/very_basic.haml +0 -0
  641. data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +2 -2
  642. data/vendor/plugins/haml/test/linked_rails.rb +12 -0
  643. data/vendor/plugins/haml/test/sass/css2sass_test.rb +193 -0
  644. data/vendor/plugins/haml/test/sass/engine_test.rb +14 -2
  645. data/vendor/plugins/haml/test/sass/plugin_test.rb +12 -6
  646. data/vendor/plugins/haml/test/sass/results/alt.css +0 -0
  647. data/vendor/plugins/haml/test/sass/results/basic.css +0 -0
  648. data/vendor/plugins/haml/test/sass/results/compact.css +0 -0
  649. data/vendor/plugins/haml/test/sass/results/complex.css +0 -0
  650. data/vendor/plugins/haml/test/sass/results/compressed.css +0 -0
  651. data/vendor/plugins/haml/test/sass/results/constants.css +0 -0
  652. data/vendor/plugins/haml/test/sass/results/expanded.css +0 -0
  653. data/vendor/plugins/haml/test/sass/results/import.css +0 -0
  654. data/vendor/plugins/haml/test/sass/results/mixins.css +0 -0
  655. data/vendor/plugins/haml/test/sass/results/multiline.css +0 -0
  656. data/vendor/plugins/haml/test/sass/results/nested.css +0 -0
  657. data/vendor/plugins/haml/test/sass/results/parent_ref.css +0 -0
  658. data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -0
  659. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -0
  660. data/vendor/plugins/haml/test/sass/templates/_partial.sass +0 -0
  661. data/vendor/plugins/haml/test/sass/templates/alt.sass +0 -0
  662. data/vendor/plugins/haml/test/sass/templates/basic.sass +0 -0
  663. data/vendor/plugins/haml/test/sass/templates/bork.sass +0 -0
  664. data/vendor/plugins/haml/test/sass/templates/bork2.sass +0 -0
  665. data/vendor/plugins/haml/test/sass/templates/compact.sass +0 -0
  666. data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -0
  667. data/vendor/plugins/haml/test/sass/templates/compressed.sass +0 -0
  668. data/vendor/plugins/haml/test/sass/templates/constants.sass +0 -0
  669. data/vendor/plugins/haml/test/sass/templates/expanded.sass +0 -0
  670. data/vendor/plugins/haml/test/sass/templates/import.sass +0 -0
  671. data/vendor/plugins/haml/test/sass/templates/importee.sass +0 -0
  672. data/vendor/plugins/haml/test/sass/templates/mixins.sass +0 -0
  673. data/vendor/plugins/haml/test/sass/templates/multiline.sass +0 -0
  674. data/vendor/plugins/haml/test/sass/templates/nested.sass +0 -0
  675. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +0 -0
  676. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -0
  677. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +0 -0
  678. data/vendor/plugins/haml/test/test_helper.rb +11 -14
  679. data/vendor/rack-cache/CHANGES +128 -0
  680. data/vendor/rack-cache/COPYING +18 -0
  681. data/vendor/rack-cache/README +110 -0
  682. data/vendor/rack-cache/Rakefile +137 -0
  683. data/vendor/rack-cache/TODO +31 -0
  684. data/vendor/rack-cache/doc/configuration.markdown +86 -0
  685. data/vendor/rack-cache/doc/faq.markdown +141 -0
  686. data/vendor/rack-cache/doc/index.markdown +118 -0
  687. data/vendor/rack-cache/doc/layout.html.erb +34 -0
  688. data/vendor/rack-cache/doc/license.markdown +24 -0
  689. data/vendor/rack-cache/doc/rack-cache.css +362 -0
  690. data/vendor/rack-cache/doc/server.ru +34 -0
  691. data/vendor/rack-cache/doc/storage.markdown +162 -0
  692. data/vendor/rack-cache/example/sinatra/app.rb +25 -0
  693. data/vendor/rack-cache/example/sinatra/views/index.erb +44 -0
  694. data/vendor/rack-cache/lib/rack/cache.rb +45 -0
  695. data/vendor/rack-cache/lib/rack/cache/cachecontrol.rb +193 -0
  696. data/vendor/rack-cache/lib/rack/cache/context.rb +233 -0
  697. data/vendor/rack-cache/lib/rack/cache/entitystore.rb +253 -0
  698. data/vendor/rack-cache/lib/rack/cache/key.rb +52 -0
  699. data/vendor/rack-cache/lib/rack/cache/metastore.rb +328 -0
  700. data/vendor/rack-cache/lib/rack/cache/options.rb +150 -0
  701. data/vendor/rack-cache/lib/rack/cache/request.rb +33 -0
  702. data/vendor/rack-cache/lib/rack/cache/response.rb +267 -0
  703. data/vendor/rack-cache/lib/rack/cache/storage.rb +49 -0
  704. data/vendor/rack-cache/rack-cache.gemspec +69 -0
  705. data/vendor/rack-cache/test/cache_test.rb +38 -0
  706. data/vendor/rack-cache/test/cachecontrol_test.rb +139 -0
  707. data/vendor/rack-cache/test/context_test.rb +727 -0
  708. data/vendor/rack-cache/test/entitystore_test.rb +189 -0
  709. data/vendor/rack-cache/test/key_test.rb +50 -0
  710. data/vendor/rack-cache/test/metastore_test.rb +263 -0
  711. data/vendor/rack-cache/test/options_test.rb +78 -0
  712. data/vendor/rack-cache/test/pony.jpg +0 -0
  713. data/vendor/rack-cache/test/request_test.rb +19 -0
  714. data/vendor/rack-cache/test/response_test.rb +178 -0
  715. data/vendor/rack-cache/test/spec_setup.rb +202 -0
  716. data/vendor/rack-cache/test/storage_test.rb +94 -0
  717. data/vendor/radius/CHANGELOG +0 -0
  718. data/vendor/radius/QUICKSTART +0 -0
  719. data/vendor/radius/README +0 -0
  720. data/vendor/radius/ROADMAP +0 -0
  721. data/vendor/radius/Rakefile +0 -0
  722. data/vendor/radius/lib/radius.rb +0 -0
  723. data/vendor/radius/test/radius_test.rb +0 -0
  724. data/vendor/rails/actionmailer/CHANGELOG +23 -11
  725. data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
  726. data/vendor/rails/actionmailer/README +0 -0
  727. data/vendor/rails/actionmailer/Rakefile +3 -5
  728. data/vendor/rails/actionmailer/install.rb +0 -0
  729. data/vendor/rails/actionmailer/lib/action_mailer.rb +30 -20
  730. data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +0 -0
  731. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +118 -60
  732. data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +4 -2
  733. data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +0 -2
  734. data/vendor/rails/actionmailer/lib/action_mailer/part.rb +6 -9
  735. data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +5 -1
  736. data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +1 -1
  737. data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +1 -1
  738. data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +1 -0
  739. data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +0 -1
  740. data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1 -1
  741. data/vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb +10 -0
  742. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb +0 -0
  743. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb +2 -2
  744. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +0 -0
  745. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb +0 -0
  746. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb +0 -0
  747. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb +0 -0
  748. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb +0 -0
  749. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb +0 -0
  750. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb +1 -1
  751. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb +0 -0
  752. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb +1 -1
  753. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb +0 -0
  754. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb +2 -2
  755. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb +0 -0
  756. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb +0 -0
  757. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb +0 -0
  758. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb +0 -0
  759. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb +0 -0
  760. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +0 -0
  761. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb +0 -0
  762. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb +0 -0
  763. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb +0 -0
  764. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb +0 -0
  765. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb +0 -0
  766. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb +0 -0
  767. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb +0 -0
  768. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb +0 -0
  769. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +17 -0
  770. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
  771. data/vendor/rails/actionmailer/lib/actionmailer.rb +0 -0
  772. data/vendor/rails/actionmailer/test/abstract_unit.rb +20 -11
  773. data/vendor/rails/actionmailer/test/asset_host_test.rb +54 -0
  774. data/vendor/rails/actionmailer/test/delivery_method_test.rb +0 -0
  775. data/vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
  776. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
  777. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
  778. data/vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
  779. data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
  780. data/vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
  781. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +0 -0
  782. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +0 -0
  783. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +0 -0
  784. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +0 -0
  785. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +0 -0
  786. data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +0 -0
  787. data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
  788. data/vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
  789. data/vendor/rails/actionmailer/test/fixtures/layouts/spam.html.erb +1 -0
  790. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +0 -0
  791. data/vendor/rails/actionmailer/test/fixtures/raw_email +0 -0
  792. data/vendor/rails/actionmailer/test/fixtures/raw_email10 +0 -0
  793. data/vendor/rails/actionmailer/test/fixtures/raw_email12 +0 -0
  794. data/vendor/rails/actionmailer/test/fixtures/raw_email13 +0 -0
  795. data/vendor/rails/actionmailer/test/fixtures/raw_email2 +0 -0
  796. data/vendor/rails/actionmailer/test/fixtures/raw_email3 +0 -0
  797. data/vendor/rails/actionmailer/test/fixtures/raw_email4 +0 -0
  798. data/vendor/rails/actionmailer/test/fixtures/raw_email5 +0 -0
  799. data/vendor/rails/actionmailer/test/fixtures/raw_email6 +0 -0
  800. data/vendor/rails/actionmailer/test/fixtures/raw_email7 +0 -0
  801. data/vendor/rails/actionmailer/test/fixtures/raw_email8 +0 -0
  802. data/vendor/rails/actionmailer/test/fixtures/raw_email9 +0 -0
  803. data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +0 -0
  804. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +0 -0
  805. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +0 -0
  806. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +0 -0
  807. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +0 -0
  808. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +0 -0
  809. data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +0 -0
  810. data/vendor/rails/actionmailer/test/fixtures/test_mailer/body_ivar.erb +2 -0
  811. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +0 -0
  812. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +0 -0
  813. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +0 -0
  814. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +0 -0
  815. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +0 -0
  816. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +0 -0
  817. data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +0 -0
  818. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +0 -0
  819. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +0 -0
  820. data/vendor/rails/actionmailer/test/fixtures/test_mailer/{signed_up.erb → signed_up.html.erb} +0 -0
  821. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +0 -0
  822. data/vendor/rails/actionmailer/test/mail_helper_test.rb +0 -0
  823. data/vendor/rails/actionmailer/test/mail_layout_test.rb +123 -0
  824. data/vendor/rails/actionmailer/test/mail_render_test.rb +3 -9
  825. data/vendor/rails/actionmailer/test/mail_service_test.rb +126 -27
  826. data/vendor/rails/actionmailer/test/quoting_test.rb +4 -3
  827. data/vendor/rails/actionmailer/test/test_helper_test.rb +5 -5
  828. data/vendor/rails/actionmailer/test/tmail_test.rb +0 -0
  829. data/vendor/rails/actionmailer/test/url_test.rb +0 -0
  830. data/vendor/rails/actionpack/CHANGELOG +698 -364
  831. data/vendor/rails/actionpack/MIT-LICENSE +1 -1
  832. data/vendor/rails/actionpack/README +26 -86
  833. data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +0 -0
  834. data/vendor/rails/actionpack/Rakefile +11 -11
  835. data/vendor/rails/actionpack/install.rb +0 -0
  836. data/vendor/rails/actionpack/lib/action_controller.rb +86 -49
  837. data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +0 -0
  838. data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +1 -0
  839. data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +65 -87
  840. data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +34 -34
  841. data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +26 -17
  842. data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +1 -4
  843. data/vendor/rails/actionpack/lib/action_controller/base.rb +350 -210
  844. data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +39 -26
  845. data/vendor/rails/actionpack/lib/action_controller/caching.rb +9 -11
  846. data/vendor/rails/actionpack/lib/action_controller/caching/actions.rb +45 -20
  847. data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +38 -56
  848. data/vendor/rails/actionpack/lib/action_controller/caching/pages.rb +13 -15
  849. data/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb +4 -4
  850. data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +0 -1
  851. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +2 -0
  852. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +0 -0
  853. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +0 -0
  854. data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +54 -200
  855. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +23 -25
  856. data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +57 -101
  857. data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +52 -0
  858. data/vendor/rails/actionpack/lib/action_controller/filters.rb +48 -10
  859. data/vendor/rails/actionpack/lib/action_controller/flash.rb +38 -47
  860. data/vendor/rails/actionpack/lib/action_controller/headers.rb +16 -14
  861. data/vendor/rails/actionpack/lib/action_controller/helpers.rb +15 -11
  862. data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +204 -24
  863. data/vendor/rails/actionpack/lib/action_controller/integration.rb +150 -97
  864. data/vendor/rails/actionpack/lib/action_controller/layout.rb +52 -81
  865. data/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb +119 -0
  866. data/vendor/rails/actionpack/lib/action_controller/middlewares.rb +13 -0
  867. data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +24 -5
  868. data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +72 -42
  869. data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +2 -1
  870. data/vendor/rails/actionpack/lib/action_controller/params_parser.rb +71 -0
  871. data/vendor/rails/actionpack/lib/action_controller/performance_test.rb +15 -0
  872. data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +44 -31
  873. data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +0 -0
  874. data/vendor/rails/actionpack/lib/action_controller/reloader.rb +14 -0
  875. data/vendor/rails/actionpack/lib/action_controller/request.rb +237 -512
  876. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +9 -41
  877. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +72 -147
  878. data/vendor/rails/actionpack/lib/action_controller/resources.rb +196 -90
  879. data/vendor/rails/actionpack/lib/action_controller/response.rb +190 -34
  880. data/vendor/rails/actionpack/lib/action_controller/rewindable_input.rb +28 -0
  881. data/vendor/rails/actionpack/lib/action_controller/routing.rb +35 -37
  882. data/vendor/rails/actionpack/lib/action_controller/routing/builder.rb +49 -55
  883. data/vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb +32 -22
  884. data/vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb +34 -29
  885. data/vendor/rails/actionpack/lib/action_controller/routing/route.rb +171 -146
  886. data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +95 -43
  887. data/vendor/rails/actionpack/lib/action_controller/routing/routing_ext.rb +4 -1
  888. data/vendor/rails/actionpack/lib/action_controller/routing/segments.rb +91 -31
  889. data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +181 -0
  890. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +198 -143
  891. data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +36 -83
  892. data/vendor/rails/actionpack/lib/action_controller/session_management.rb +26 -130
  893. data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +0 -0
  894. data/vendor/rails/actionpack/lib/action_controller/streaming.rb +37 -13
  895. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +0 -0
  896. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +0 -0
  897. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +2 -2
  898. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +0 -0
  899. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +0 -0
  900. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +0 -0
  901. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +2 -2
  902. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +0 -0
  903. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +148 -27
  904. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +190 -144
  905. data/vendor/rails/actionpack/lib/action_controller/translation.rb +13 -0
  906. data/vendor/rails/actionpack/lib/action_controller/uploaded_file.rb +44 -0
  907. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +93 -19
  908. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner.rb +16 -0
  909. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +0 -0
  910. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +9 -2
  911. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +1 -1
  912. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +3 -3
  913. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +0 -0
  914. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +0 -0
  915. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack.rb +89 -0
  916. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/adapter/camping.rb +22 -0
  917. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/handler.rb +37 -0
  918. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/request.rb +37 -0
  919. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/basic.rb +58 -0
  920. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/md5.rb +124 -0
  921. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/nonce.rb +51 -0
  922. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/params.rb +55 -0
  923. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/request.rb +40 -0
  924. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/openid.rb +480 -0
  925. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/builder.rb +63 -0
  926. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/cascade.rb +36 -0
  927. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/chunked.rb +49 -0
  928. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/commonlogger.rb +61 -0
  929. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/conditionalget.rb +45 -0
  930. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_length.rb +29 -0
  931. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_type.rb +23 -0
  932. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/deflater.rb +85 -0
  933. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/directory.rb +153 -0
  934. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/file.rb +88 -0
  935. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler.rb +48 -0
  936. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/cgi.rb +61 -0
  937. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/evented_mongrel.rb +8 -0
  938. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/fastcgi.rb +89 -0
  939. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/lsws.rb +55 -0
  940. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb +84 -0
  941. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/scgi.rb +59 -0
  942. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/swiftiplied_mongrel.rb +8 -0
  943. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/thin.rb +18 -0
  944. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb +67 -0
  945. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb +19 -0
  946. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb +462 -0
  947. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lobster.rb +65 -0
  948. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb +16 -0
  949. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb +27 -0
  950. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/mime.rb +204 -0
  951. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/mock.rb +160 -0
  952. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/recursive.rb +57 -0
  953. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/reloader.rb +64 -0
  954. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/request.rb +241 -0
  955. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/response.rb +179 -0
  956. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/abstract/id.rb +142 -0
  957. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/cookie.rb +91 -0
  958. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/memcache.rb +109 -0
  959. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/pool.rb +100 -0
  960. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/showexceptions.rb +349 -0
  961. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/showstatus.rb +106 -0
  962. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/static.rb +38 -0
  963. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb +55 -0
  964. data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/utils.rb +392 -0
  965. data/vendor/rails/actionpack/lib/action_controller/verification.rb +3 -3
  966. data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
  967. data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
  968. data/vendor/rails/actionpack/lib/action_view.rb +32 -19
  969. data/vendor/rails/actionpack/lib/action_view/base.rb +164 -154
  970. data/vendor/rails/actionpack/lib/action_view/erb/util.rb +38 -0
  971. data/vendor/rails/actionpack/lib/action_view/helpers.rb +57 -0
  972. data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +56 -27
  973. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +194 -126
  974. data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +75 -20
  975. data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +27 -6
  976. data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +1 -2
  977. data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +19 -44
  978. data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +564 -299
  979. data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +20 -13
  980. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +365 -93
  981. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +168 -96
  982. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +63 -40
  983. data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +80 -89
  984. data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +192 -75
  985. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +218 -213
  986. data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +0 -0
  987. data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +4 -5
  988. data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +55 -33
  989. data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +3 -2
  990. data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +41 -25
  991. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +294 -223
  992. data/vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb +39 -0
  993. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +124 -59
  994. data/vendor/rails/actionpack/lib/action_view/inline_template.rb +13 -14
  995. data/vendor/rails/actionpack/lib/action_view/locale/en.yml +110 -0
  996. data/vendor/rails/actionpack/lib/action_view/partials.rb +137 -55
  997. data/vendor/rails/actionpack/lib/action_view/paths.rb +69 -0
  998. data/vendor/rails/actionpack/lib/action_view/reloadable_template.rb +117 -0
  999. data/vendor/rails/actionpack/lib/action_view/renderable.rb +95 -0
  1000. data/vendor/rails/actionpack/lib/action_view/renderable_partial.rb +47 -0
  1001. data/vendor/rails/actionpack/lib/action_view/template.rb +223 -93
  1002. data/vendor/rails/actionpack/lib/action_view/template_error.rb +18 -29
  1003. data/vendor/rails/actionpack/lib/action_view/template_handler.rb +23 -23
  1004. data/vendor/rails/actionpack/lib/action_view/template_handlers.rb +48 -0
  1005. data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +5 -15
  1006. data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +11 -45
  1007. data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +3 -17
  1008. data/vendor/rails/actionpack/lib/action_view/test_case.rb +34 -5
  1009. data/vendor/rails/actionpack/lib/actionpack.rb +0 -0
  1010. data/vendor/rails/actionpack/test/abstract_unit.rb +25 -16
  1011. data/vendor/rails/actionpack/test/active_record_unit.rb +32 -33
  1012. data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +139 -106
  1013. data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +27 -30
  1014. data/vendor/rails/actionpack/test/adv_attr_test.rb +0 -0
  1015. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +30 -57
  1016. data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +2 -8
  1017. data/vendor/rails/actionpack/test/controller/assert_select_test.rb +125 -85
  1018. data/vendor/rails/actionpack/test/controller/base_test.rb +15 -17
  1019. data/vendor/rails/actionpack/test/controller/benchmark_test.rb +3 -3
  1020. data/vendor/rails/actionpack/test/controller/caching_test.rb +161 -81
  1021. data/vendor/rails/actionpack/test/controller/capture_test.rb +3 -26
  1022. data/vendor/rails/actionpack/test/controller/content_type_test.rb +51 -22
  1023. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
  1024. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
  1025. data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
  1026. data/vendor/rails/actionpack/test/controller/cookie_test.rb +32 -67
  1027. data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +9 -14
  1028. data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +26 -28
  1029. data/vendor/rails/actionpack/test/controller/fake_controllers.rb +0 -0
  1030. data/vendor/rails/actionpack/test/controller/fake_models.rb +8 -0
  1031. data/vendor/rails/actionpack/test/controller/filter_params_test.rb +2 -2
  1032. data/vendor/rails/actionpack/test/controller/filters_test.rb +19 -15
  1033. data/vendor/rails/actionpack/test/controller/flash_test.rb +2 -6
  1034. data/vendor/rails/actionpack/test/controller/header_test.rb +0 -0
  1035. data/vendor/rails/actionpack/test/controller/helper_test.rb +15 -1
  1036. data/vendor/rails/actionpack/test/controller/html-scanner/cdata_node_test.rb +15 -0
  1037. data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +1 -1
  1038. data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +21 -0
  1039. data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +15 -1
  1040. data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +0 -0
  1041. data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +0 -0
  1042. data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +0 -0
  1043. data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +88 -0
  1044. data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +178 -0
  1045. data/vendor/rails/actionpack/test/controller/integration_test.rb +198 -33
  1046. data/vendor/rails/actionpack/test/controller/layout_test.rb +53 -108
  1047. data/vendor/rails/actionpack/test/controller/logging_test.rb +46 -0
  1048. data/vendor/rails/actionpack/test/controller/middleware_stack_test.rb +90 -0
  1049. data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +67 -69
  1050. data/vendor/rails/actionpack/test/controller/mime_type_test.rb +14 -5
  1051. data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +241 -122
  1052. data/vendor/rails/actionpack/test/controller/rack_test.rb +294 -0
  1053. data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +0 -0
  1054. data/vendor/rails/actionpack/test/controller/redirect_test.rb +78 -85
  1055. data/vendor/rails/actionpack/test/controller/render_test.rb +1459 -234
  1056. data/vendor/rails/actionpack/test/controller/request/json_params_parsing_test.rb +45 -0
  1057. data/vendor/rails/actionpack/test/controller/request/multipart_params_parsing_test.rb +223 -0
  1058. data/vendor/rails/actionpack/test/controller/request/query_string_parsing_test.rb +120 -0
  1059. data/vendor/rails/actionpack/test/controller/request/url_encoded_params_parsing_test.rb +184 -0
  1060. data/vendor/rails/actionpack/test/controller/request/xml_params_parsing_test.rb +88 -0
  1061. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +63 -130
  1062. data/vendor/rails/actionpack/test/controller/request_test.rb +65 -586
  1063. data/vendor/rails/actionpack/test/controller/rescue_test.rb +63 -44
  1064. data/vendor/rails/actionpack/test/controller/resources_test.rb +505 -37
  1065. data/vendor/rails/actionpack/test/controller/routing_test.rb +1570 -1477
  1066. data/vendor/rails/actionpack/test/controller/selector_test.rb +3 -3
  1067. data/vendor/rails/actionpack/test/controller/send_file_test.rb +30 -7
  1068. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +171 -190
  1069. data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +94 -148
  1070. data/vendor/rails/actionpack/test/controller/session/test_session_test.rb +58 -0
  1071. data/vendor/rails/actionpack/test/controller/test_test.rb +47 -50
  1072. data/vendor/rails/actionpack/test/controller/translation_test.rb +26 -0
  1073. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +80 -31
  1074. data/vendor/rails/actionpack/test/controller/verification_test.rb +1 -1
  1075. data/vendor/rails/actionpack/test/controller/view_paths_test.rb +49 -48
  1076. data/vendor/rails/actionpack/test/controller/webservice_test.rb +178 -147
  1077. data/vendor/rails/actionpack/test/fixtures/_top_level_partial.html.erb +1 -0
  1078. data/vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb +1 -0
  1079. data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +0 -0
  1080. data/vendor/rails/actionpack/test/fixtures/alternate_helpers/foo_helper.rb +3 -0
  1081. data/vendor/rails/actionpack/test/fixtures/bad_customers/_bad_customer.html.erb +0 -0
  1082. data/vendor/rails/actionpack/test/fixtures/companies.yml +0 -0
  1083. data/vendor/rails/actionpack/test/fixtures/company.rb +0 -0
  1084. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +0 -0
  1085. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +0 -0
  1086. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +0 -0
  1087. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +0 -0
  1088. data/vendor/rails/actionpack/test/fixtures/customers/_customer.html.erb +0 -0
  1089. data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +0 -0
  1090. data/vendor/rails/actionpack/test/fixtures/developer.rb +0 -0
  1091. data/vendor/rails/actionpack/test/fixtures/developers.yml +0 -0
  1092. data/vendor/rails/actionpack/test/fixtures/developers/_developer.erb +1 -0
  1093. data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +0 -0
  1094. data/vendor/rails/actionpack/test/fixtures/fun/games/_game.erb +1 -0
  1095. data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +0 -0
  1096. data/vendor/rails/actionpack/test/fixtures/fun/serious/games/_game.erb +1 -0
  1097. data/vendor/rails/actionpack/test/fixtures/functional_caching/_partial.erb +0 -0
  1098. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.html.erb +3 -0
  1099. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.js.rjs +6 -0
  1100. data/vendor/rails/actionpack/test/fixtures/functional_caching/formatted_fragment_cached.xml.builder +5 -0
  1101. data/vendor/rails/actionpack/test/fixtures/functional_caching/fragment_cached.html.erb +0 -0
  1102. data/vendor/rails/actionpack/test/fixtures/functional_caching/html_fragment_cached_with_partial.html.erb +0 -0
  1103. data/vendor/rails/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb +2 -0
  1104. data/vendor/rails/actionpack/test/fixtures/functional_caching/js_fragment_cached_with_partial.js.rjs +0 -0
  1105. data/vendor/rails/actionpack/test/fixtures/good_customers/_good_customer.html.erb +0 -0
  1106. data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +0 -0
  1107. data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +0 -0
  1108. data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +0 -0
  1109. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +0 -0
  1110. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/layouts/alt.rhtml +0 -0
  1111. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +0 -0
  1112. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +0 -0
  1113. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +0 -0
  1114. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +0 -0
  1115. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +0 -0
  1116. data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +0 -0
  1117. data/vendor/rails/actionpack/test/fixtures/layouts/_column.html.erb +2 -0
  1118. data/vendor/rails/actionpack/test/fixtures/layouts/block_with_layout.erb +0 -0
  1119. data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +0 -0
  1120. data/vendor/rails/actionpack/test/fixtures/layouts/default_html.html.erb +1 -0
  1121. data/vendor/rails/actionpack/test/fixtures/layouts/partial_with_layout.erb +0 -0
  1122. data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +0 -0
  1123. data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +0 -0
  1124. data/vendor/rails/actionpack/test/fixtures/layouts/xhr.html.erb +2 -0
  1125. data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +0 -0
  1126. data/vendor/rails/actionpack/test/fixtures/mascot.rb +0 -0
  1127. data/vendor/rails/actionpack/test/fixtures/mascots.yml +0 -0
  1128. data/vendor/rails/actionpack/test/fixtures/mascots/_mascot.html.erb +0 -0
  1129. data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
  1130. data/vendor/rails/actionpack/test/fixtures/multipart/boundary_problem_file +0 -0
  1131. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +0 -0
  1132. data/vendor/rails/actionpack/test/fixtures/multipart/empty +10 -0
  1133. data/vendor/rails/actionpack/test/fixtures/multipart/hello.txt +1 -0
  1134. data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +0 -0
  1135. data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
  1136. data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
  1137. data/vendor/rails/actionpack/test/fixtures/multipart/none +9 -0
  1138. data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +0 -0
  1139. data/vendor/rails/actionpack/test/fixtures/multipart/text_file +0 -0
  1140. data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +0 -0
  1141. data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +0 -0
  1142. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +0 -0
  1143. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +0 -0
  1144. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +0 -0
  1145. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +0 -0
  1146. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +0 -0
  1147. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +0 -0
  1148. data/vendor/rails/actionpack/test/fixtures/project.rb +0 -0
  1149. data/vendor/rails/actionpack/test/fixtures/projects.yml +0 -0
  1150. data/vendor/rails/actionpack/test/fixtures/projects/_project.erb +1 -0
  1151. data/vendor/rails/actionpack/test/fixtures/public/404.html +0 -0
  1152. data/vendor/rails/actionpack/test/fixtures/public/500.da.html +1 -0
  1153. data/vendor/rails/actionpack/test/fixtures/public/500.html +0 -0
  1154. data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
  1155. data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -0
  1156. data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +0 -0
  1157. data/vendor/rails/actionpack/test/fixtures/public/javascripts/controls.js +0 -0
  1158. data/vendor/rails/actionpack/test/fixtures/public/javascripts/dragdrop.js +0 -0
  1159. data/vendor/rails/actionpack/test/fixtures/public/javascripts/effects.js +0 -0
  1160. data/vendor/rails/actionpack/test/fixtures/public/javascripts/prototype.js +0 -0
  1161. data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +0 -0
  1162. data/vendor/rails/actionpack/test/fixtures/public/javascripts/subdir/subdir.js +1 -0
  1163. data/vendor/rails/actionpack/test/fixtures/public/javascripts/version.1.0.js +0 -0
  1164. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +0 -0
  1165. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +0 -0
  1166. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/subdir/subdir.css +1 -0
  1167. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/version.1.0.css +0 -0
  1168. data/vendor/rails/actionpack/test/fixtures/quiz/questions/_question.html.erb +1 -0
  1169. data/vendor/rails/actionpack/test/fixtures/replies.yml +1 -1
  1170. data/vendor/rails/actionpack/test/fixtures/replies/_reply.erb +1 -0
  1171. data/vendor/rails/actionpack/test/fixtures/reply.rb +0 -0
  1172. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +0 -0
  1173. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +0 -0
  1174. data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +0 -0
  1175. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +0 -0
  1176. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +0 -0
  1177. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +0 -0
  1178. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +0 -0
  1179. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +0 -0
  1180. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +0 -0
  1181. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +0 -0
  1182. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +0 -0
  1183. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +0 -0
  1184. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +0 -0
  1185. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +0 -0
  1186. data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +0 -0
  1187. data/vendor/rails/actionpack/test/fixtures/shared.html.erb +0 -0
  1188. data/vendor/rails/actionpack/test/fixtures/symlink_parent/symlinked_layout.erb +0 -0
  1189. data/vendor/rails/actionpack/test/fixtures/test/_counter.html.erb +1 -0
  1190. data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +1 -1
  1191. data/vendor/rails/actionpack/test/fixtures/test/_customer_counter.erb +0 -0
  1192. data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +0 -0
  1193. data/vendor/rails/actionpack/test/fixtures/test/_customer_with_var.erb +1 -0
  1194. data/vendor/rails/actionpack/test/fixtures/test/_form.erb +0 -0
  1195. data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +0 -0
  1196. data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +0 -0
  1197. data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +0 -0
  1198. data/vendor/rails/actionpack/test/fixtures/test/_labelling_form.erb +0 -0
  1199. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb +3 -0
  1200. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +0 -0
  1201. data/vendor/rails/actionpack/test/fixtures/test/_local_inspector.html.erb +1 -0
  1202. data/vendor/rails/actionpack/test/fixtures/test/_one.html.erb +1 -0
  1203. data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +0 -0
  1204. data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +0 -0
  1205. data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +0 -0
  1206. data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +0 -0
  1207. data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +0 -0
  1208. data/vendor/rails/actionpack/test/fixtures/test/_partial_with_only_html_version.html.erb +1 -0
  1209. data/vendor/rails/actionpack/test/fixtures/test/_person.erb +0 -0
  1210. data/vendor/rails/actionpack/test/fixtures/test/_raise.html.erb +0 -0
  1211. data/vendor/rails/actionpack/test/fixtures/test/_two.html.erb +1 -0
  1212. data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +0 -0
  1213. data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +0 -0
  1214. data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +0 -0
  1215. data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +0 -0
  1216. data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +0 -0
  1217. data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +0 -0
  1218. data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +0 -0
  1219. data/vendor/rails/actionpack/test/fixtures/test/dont_pick_me +1 -0
  1220. data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +0 -0
  1221. data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +0 -0
  1222. data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +0 -0
  1223. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +0 -0
  1224. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +0 -0
  1225. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +0 -0
  1226. data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +0 -0
  1227. data/vendor/rails/actionpack/test/fixtures/test/greeting.js.rjs +0 -0
  1228. data/vendor/rails/actionpack/test/fixtures/test/hello.builder +1 -1
  1229. data/vendor/rails/actionpack/test/fixtures/test/hello_world.da.html.erb +1 -0
  1230. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +0 -0
  1231. data/vendor/rails/actionpack/test/fixtures/test/hello_world.pt-BR.html.erb +1 -0
  1232. data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +0 -0
  1233. data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +0 -0
  1234. data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +0 -0
  1235. data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +0 -0
  1236. data/vendor/rails/actionpack/test/fixtures/test/hyphen-ated.erb +1 -0
  1237. data/vendor/rails/actionpack/test/fixtures/test/implicit_content_type.atom.builder +2 -0
  1238. data/vendor/rails/actionpack/test/fixtures/test/list.erb +0 -0
  1239. data/vendor/rails/actionpack/test/fixtures/test/nested_layout.erb +3 -0
  1240. data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +1 -1
  1241. data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +0 -0
  1242. data/vendor/rails/actionpack/test/fixtures/test/render_explicit_html_template.js.rjs +1 -0
  1243. data/vendor/rails/actionpack/test/fixtures/test/render_file_from_template.html.erb +0 -0
  1244. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +0 -0
  1245. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +0 -0
  1246. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template.js.rjs +1 -0
  1247. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.da.html.erb +1 -0
  1248. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_html_template_from_xhr_request.html.erb +1 -0
  1249. data/vendor/rails/actionpack/test/fixtures/test/render_implicit_js_template_without_layout.js.erb +1 -0
  1250. data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +0 -0
  1251. data/vendor/rails/actionpack/test/fixtures/test/sub_template_raise.html.erb +1 -0
  1252. data/vendor/rails/actionpack/test/fixtures/test/template.erb +1 -0
  1253. data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +0 -0
  1254. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +0 -0
  1255. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block_with_args.html.erb +1 -0
  1256. data/vendor/rails/actionpack/test/fixtures/test/utf8.html.erb +2 -0
  1257. data/vendor/rails/actionpack/test/fixtures/topic.rb +0 -0
  1258. data/vendor/rails/actionpack/test/fixtures/topics.yml +0 -0
  1259. data/vendor/rails/actionpack/test/fixtures/topics/_topic.html.erb +0 -0
  1260. data/vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb +44 -0
  1261. data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +58 -24
  1262. data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +217 -29
  1263. data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +117 -10
  1264. data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +50 -24
  1265. data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +203 -0
  1266. data/vendor/rails/actionpack/test/template/date_helper_i18n_test.rb +120 -0
  1267. data/vendor/rails/actionpack/test/template/date_helper_test.rb +822 -144
  1268. data/vendor/rails/actionpack/test/template/erb_util_test.rb +0 -0
  1269. data/vendor/rails/actionpack/test/template/form_helper_test.rb +454 -196
  1270. data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +653 -1235
  1271. data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +89 -34
  1272. data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +16 -22
  1273. data/vendor/rails/actionpack/test/template/number_helper_i18n_test.rb +69 -0
  1274. data/vendor/rails/actionpack/test/template/number_helper_test.rb +44 -13
  1275. data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +101 -84
  1276. data/vendor/rails/actionpack/test/template/record_tag_helper_test.rb +24 -20
  1277. data/vendor/rails/actionpack/test/template/render_test.rb +290 -0
  1278. data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +3 -3
  1279. data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +0 -0
  1280. data/vendor/rails/actionpack/test/template/tag_helper_test.rb +34 -14
  1281. data/vendor/rails/actionpack/test/template/test_test.rb +4 -6
  1282. data/vendor/rails/actionpack/test/template/text_helper_test.rb +210 -57
  1283. data/vendor/rails/actionpack/test/template/translation_helper_test.rb +32 -0
  1284. data/vendor/rails/actionpack/test/template/url_helper_test.rb +88 -18
  1285. data/vendor/rails/actionpack/test/testing_sandbox.rb +0 -0
  1286. data/vendor/rails/actionpack/test/view/test_case_test.rb +8 -0
  1287. data/vendor/rails/activerecord/CHANGELOG +466 -394
  1288. data/vendor/rails/activerecord/README +0 -0
  1289. data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +0 -0
  1290. data/vendor/rails/activerecord/Rakefile +12 -7
  1291. data/vendor/rails/activerecord/examples/associations.png +0 -0
  1292. data/vendor/rails/activerecord/install.rb +0 -0
  1293. data/vendor/rails/activerecord/lib/active_record.rb +56 -52
  1294. data/vendor/rails/activerecord/lib/active_record/aggregations.rb +110 -38
  1295. data/vendor/rails/activerecord/lib/active_record/association_preload.rb +135 -31
  1296. data/vendor/rails/activerecord/lib/active_record/associations.rb +578 -421
  1297. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +136 -34
  1298. data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +73 -14
  1299. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +2 -2
  1300. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +0 -0
  1301. data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +24 -8
  1302. data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +30 -30
  1303. data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +29 -27
  1304. data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +35 -9
  1305. data/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb +3 -4
  1306. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +14 -5
  1307. data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +349 -0
  1308. data/vendor/rails/activerecord/lib/active_record/base.rb +692 -281
  1309. data/vendor/rails/activerecord/lib/active_record/batches.rb +73 -0
  1310. data/vendor/rails/activerecord/lib/active_record/calculations.rb +46 -21
  1311. data/vendor/rails/activerecord/lib/active_record/callbacks.rb +65 -17
  1312. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +371 -0
  1313. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +45 -215
  1314. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +133 -20
  1315. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +8 -7
  1316. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +0 -0
  1317. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +75 -31
  1318. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +10 -4
  1319. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +94 -29
  1320. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +124 -66
  1321. data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +147 -91
  1322. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +1 -1
  1323. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +41 -21
  1324. data/vendor/rails/activerecord/lib/active_record/dirty.rb +28 -10
  1325. data/vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb +41 -0
  1326. data/vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb +25 -0
  1327. data/vendor/rails/activerecord/lib/active_record/fixtures.rb +196 -200
  1328. data/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
  1329. data/vendor/rails/activerecord/lib/active_record/locale/en.yml +54 -0
  1330. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +33 -0
  1331. data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +0 -0
  1332. data/vendor/rails/activerecord/lib/active_record/migration.rb +55 -12
  1333. data/vendor/rails/activerecord/lib/active_record/named_scope.rb +49 -20
  1334. data/vendor/rails/activerecord/lib/active_record/nested_attributes.rb +329 -0
  1335. data/vendor/rails/activerecord/lib/active_record/observer.rb +0 -0
  1336. data/vendor/rails/activerecord/lib/active_record/query_cache.rb +25 -13
  1337. data/vendor/rails/activerecord/lib/active_record/reflection.rb +132 -55
  1338. data/vendor/rails/activerecord/lib/active_record/schema.rb +0 -0
  1339. data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +15 -7
  1340. data/vendor/rails/activerecord/lib/active_record/serialization.rb +3 -1
  1341. data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +19 -0
  1342. data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +28 -13
  1343. data/vendor/rails/activerecord/lib/active_record/session_store.rb +318 -0
  1344. data/vendor/rails/activerecord/lib/active_record/test_case.rb +33 -14
  1345. data/vendor/rails/activerecord/lib/active_record/timestamp.rb +2 -2
  1346. data/vendor/rails/activerecord/lib/active_record/transactions.rb +145 -40
  1347. data/vendor/rails/activerecord/lib/active_record/validations.rb +290 -195
  1348. data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
  1349. data/vendor/rails/activerecord/lib/activerecord.rb +0 -0
  1350. data/vendor/rails/activerecord/test/assets/example.log +0 -0
  1351. data/vendor/rails/activerecord/test/assets/flowers.jpg +0 -0
  1352. data/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb +0 -0
  1353. data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +5 -0
  1354. data/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb +0 -0
  1355. data/vendor/rails/activerecord/test/cases/adapter_test.rb +6 -0
  1356. data/vendor/rails/activerecord/test/cases/aggregations_test.rb +39 -0
  1357. data/vendor/rails/activerecord/test/cases/ar_schema_test.rb +0 -1
  1358. data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +37 -123
  1359. data/vendor/rails/activerecord/test/cases/associations/callbacks_test.rb +0 -0
  1360. data/vendor/rails/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +8 -0
  1361. data/vendor/rails/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +0 -0
  1362. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +59 -12
  1363. data/vendor/rails/activerecord/test/cases/associations/eager_singularization_test.rb +0 -0
  1364. data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +190 -11
  1365. data/vendor/rails/activerecord/test/cases/associations/extension_test.rb +0 -0
  1366. data/vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +127 -11
  1367. data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +175 -147
  1368. data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +82 -3
  1369. data/vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb +54 -90
  1370. data/vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb +80 -1
  1371. data/vendor/rails/activerecord/test/cases/associations/inner_join_association_test.rb +0 -0
  1372. data/vendor/rails/activerecord/test/cases/associations/join_model_test.rb +5 -7
  1373. data/vendor/rails/activerecord/test/cases/associations_test.rb +0 -0
  1374. data/vendor/rails/activerecord/test/cases/attribute_methods_test.rb +72 -5
  1375. data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +901 -0
  1376. data/vendor/rails/activerecord/test/cases/base_test.rb +120 -28
  1377. data/vendor/rails/activerecord/test/cases/batches_test.rb +61 -0
  1378. data/vendor/rails/activerecord/test/cases/binary_test.rb +1 -5
  1379. data/vendor/rails/activerecord/test/cases/calculations_test.rb +42 -17
  1380. data/vendor/rails/activerecord/test/cases/callbacks_observers_test.rb +38 -0
  1381. data/vendor/rails/activerecord/test/cases/callbacks_test.rb +43 -5
  1382. data/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb +0 -0
  1383. data/vendor/rails/activerecord/test/cases/column_alias_test.rb +0 -0
  1384. data/vendor/rails/activerecord/test/cases/column_definition_test.rb +0 -0
  1385. data/vendor/rails/activerecord/test/cases/connection_pool_test.rb +25 -0
  1386. data/vendor/rails/activerecord/test/cases/connection_test_firebird.rb +0 -0
  1387. data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +27 -1
  1388. data/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb +11 -0
  1389. data/vendor/rails/activerecord/test/cases/database_statements_test.rb +0 -0
  1390. data/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb +1 -0
  1391. data/vendor/rails/activerecord/test/cases/date_time_test.rb +0 -0
  1392. data/vendor/rails/activerecord/test/cases/default_test_firebird.rb +0 -0
  1393. data/vendor/rails/activerecord/test/cases/defaults_test.rb +63 -21
  1394. data/vendor/rails/activerecord/test/cases/deprecated_finder_test.rb +0 -0
  1395. data/vendor/rails/activerecord/test/cases/dirty_test.rb +52 -3
  1396. data/vendor/rails/activerecord/test/cases/finder_respond_to_test.rb +0 -0
  1397. data/vendor/rails/activerecord/test/cases/finder_test.rb +224 -39
  1398. data/vendor/rails/activerecord/test/cases/fixtures_test.rb +47 -22
  1399. data/vendor/rails/activerecord/test/cases/helper.rb +32 -10
  1400. data/vendor/rails/activerecord/test/cases/i18n_test.rb +41 -0
  1401. data/vendor/rails/activerecord/test/cases/inheritance_test.rb +4 -4
  1402. data/vendor/rails/activerecord/test/cases/invalid_date_test.rb +0 -0
  1403. data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +1 -1
  1404. data/vendor/rails/activerecord/test/cases/lifecycle_test.rb +0 -0
  1405. data/vendor/rails/activerecord/test/cases/locking_test.rb +27 -14
  1406. data/vendor/rails/activerecord/test/cases/method_scoping_test.rb +239 -7
  1407. data/vendor/rails/activerecord/test/cases/migration_test.rb +294 -243
  1408. data/vendor/rails/activerecord/test/cases/migration_test_firebird.rb +0 -0
  1409. data/vendor/rails/activerecord/test/cases/mixin_test.rb +0 -0
  1410. data/vendor/rails/activerecord/test/cases/modules_test.rb +0 -0
  1411. data/vendor/rails/activerecord/test/cases/multiple_db_test.rb +25 -0
  1412. data/vendor/rails/activerecord/test/cases/named_scope_test.rb +155 -2
  1413. data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +509 -0
  1414. data/vendor/rails/activerecord/test/cases/pk_test.rb +0 -0
  1415. data/vendor/rails/activerecord/test/cases/pooled_connections_test.rb +103 -0
  1416. data/vendor/rails/activerecord/test/cases/query_cache_test.rb +0 -4
  1417. data/vendor/rails/activerecord/test/cases/readonly_test.rb +0 -0
  1418. data/vendor/rails/activerecord/test/cases/reflection_test.rb +21 -3
  1419. data/vendor/rails/activerecord/test/cases/reload_models_test.rb +22 -0
  1420. data/vendor/rails/activerecord/test/cases/repair_helper.rb +50 -0
  1421. data/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb +0 -0
  1422. data/vendor/rails/activerecord/test/cases/sanitize_test.rb +25 -0
  1423. data/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb +2 -2
  1424. data/vendor/rails/activerecord/test/cases/schema_dumper_test.rb +0 -1
  1425. data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +0 -0
  1426. data/vendor/rails/activerecord/test/cases/serialization_test.rb +0 -0
  1427. data/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb +0 -0
  1428. data/vendor/rails/activerecord/test/cases/transactions_test.rb +237 -22
  1429. data/vendor/rails/activerecord/test/cases/unconnected_test.rb +0 -0
  1430. data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +915 -0
  1431. data/vendor/rails/activerecord/test/cases/validations_test.rb +274 -213
  1432. data/vendor/rails/activerecord/test/cases/xml_serialization_test.rb +19 -1
  1433. data/vendor/rails/activerecord/test/config.rb +0 -0
  1434. data/vendor/rails/activerecord/test/connections/jdbc_jdbcderby/connection.rb +18 -0
  1435. data/vendor/rails/activerecord/test/connections/jdbc_jdbch2/connection.rb +18 -0
  1436. data/vendor/rails/activerecord/test/connections/jdbc_jdbchsqldb/connection.rb +18 -0
  1437. data/vendor/rails/activerecord/test/connections/jdbc_jdbcmysql/connection.rb +26 -0
  1438. data/vendor/rails/activerecord/test/connections/jdbc_jdbcpostgresql/connection.rb +26 -0
  1439. data/vendor/rails/activerecord/test/connections/jdbc_jdbcsqlite3/connection.rb +25 -0
  1440. data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +0 -0
  1441. data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +0 -0
  1442. data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +0 -0
  1443. data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +1 -3
  1444. data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +0 -0
  1445. data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +0 -0
  1446. data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +0 -0
  1447. data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +0 -0
  1448. data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +0 -0
  1449. data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +0 -0
  1450. data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +0 -0
  1451. data/vendor/rails/activerecord/test/fixtures/accounts.yml +0 -0
  1452. data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
  1453. data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
  1454. data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
  1455. data/vendor/rails/activerecord/test/fixtures/author_addresses.yml +0 -0
  1456. data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +0 -0
  1457. data/vendor/rails/activerecord/test/fixtures/authors.yml +0 -0
  1458. data/vendor/rails/activerecord/test/fixtures/binaries.yml +0 -0
  1459. data/vendor/rails/activerecord/test/fixtures/books.yml +0 -0
  1460. data/vendor/rails/activerecord/test/fixtures/categories.yml +0 -0
  1461. data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +0 -0
  1462. data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +0 -0
  1463. data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +0 -0
  1464. data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +0 -0
  1465. data/vendor/rails/activerecord/test/fixtures/categorizations.yml +0 -0
  1466. data/vendor/rails/activerecord/test/fixtures/clubs.yml +0 -0
  1467. data/vendor/rails/activerecord/test/fixtures/comments.yml +0 -0
  1468. data/vendor/rails/activerecord/test/fixtures/companies.yml +1 -0
  1469. data/vendor/rails/activerecord/test/fixtures/computers.yml +0 -0
  1470. data/vendor/rails/activerecord/test/fixtures/courses.yml +0 -0
  1471. data/vendor/rails/activerecord/test/fixtures/customers.yml +10 -1
  1472. data/vendor/rails/activerecord/test/fixtures/developers.yml +0 -0
  1473. data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +0 -0
  1474. data/vendor/rails/activerecord/test/fixtures/edges.yml +0 -0
  1475. data/vendor/rails/activerecord/test/fixtures/entrants.yml +0 -0
  1476. data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
  1477. data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
  1478. data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +0 -0
  1479. data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +0 -0
  1480. data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +0 -0
  1481. data/vendor/rails/activerecord/test/fixtures/items.yml +0 -0
  1482. data/vendor/rails/activerecord/test/fixtures/jobs.yml +0 -0
  1483. data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +0 -0
  1484. data/vendor/rails/activerecord/test/fixtures/mateys.yml +0 -0
  1485. data/vendor/rails/activerecord/test/fixtures/member_types.yml +6 -0
  1486. data/vendor/rails/activerecord/test/fixtures/members.yml +3 -1
  1487. data/vendor/rails/activerecord/test/fixtures/memberships.yml +0 -0
  1488. data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +0 -0
  1489. data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +0 -0
  1490. data/vendor/rails/activerecord/test/fixtures/mixins.yml +0 -0
  1491. data/vendor/rails/activerecord/test/fixtures/movies.yml +0 -0
  1492. data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +0 -0
  1493. data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +0 -0
  1494. data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +0 -0
  1495. data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +0 -0
  1496. data/vendor/rails/activerecord/test/fixtures/organizations.yml +5 -0
  1497. data/vendor/rails/activerecord/test/fixtures/owners.yml +0 -0
  1498. data/vendor/rails/activerecord/test/fixtures/parrots.yml +0 -0
  1499. data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +0 -0
  1500. data/vendor/rails/activerecord/test/fixtures/people.yml +10 -1
  1501. data/vendor/rails/activerecord/test/fixtures/pets.yml +0 -0
  1502. data/vendor/rails/activerecord/test/fixtures/pirates.yml +0 -0
  1503. data/vendor/rails/activerecord/test/fixtures/posts.yml +0 -0
  1504. data/vendor/rails/activerecord/test/fixtures/price_estimates.yml +0 -0
  1505. data/vendor/rails/activerecord/test/fixtures/projects.yml +0 -0
  1506. data/vendor/rails/activerecord/test/fixtures/readers.yml +0 -0
  1507. data/vendor/rails/activerecord/test/fixtures/references.yml +0 -0
  1508. data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +0 -0
  1509. data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +0 -0
  1510. data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +0 -0
  1511. data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +0 -0
  1512. data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +0 -0
  1513. data/vendor/rails/activerecord/test/fixtures/ships.yml +0 -0
  1514. data/vendor/rails/activerecord/test/fixtures/sponsors.yml +0 -0
  1515. data/vendor/rails/activerecord/test/fixtures/subscribers.yml +0 -0
  1516. data/vendor/rails/activerecord/test/fixtures/subscriptions.yml +0 -0
  1517. data/vendor/rails/activerecord/test/fixtures/taggings.yml +0 -0
  1518. data/vendor/rails/activerecord/test/fixtures/tags.yml +0 -0
  1519. data/vendor/rails/activerecord/test/fixtures/tasks.yml +0 -0
  1520. data/vendor/rails/activerecord/test/fixtures/topics.yml +0 -0
  1521. data/vendor/rails/activerecord/test/fixtures/toys.yml +4 -0
  1522. data/vendor/rails/activerecord/test/fixtures/treasures.yml +0 -0
  1523. data/vendor/rails/activerecord/test/fixtures/vertices.yml +0 -0
  1524. data/vendor/rails/activerecord/test/fixtures/warehouse-things.yml +0 -0
  1525. data/vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb +10 -0
  1526. data/vendor/rails/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +0 -0
  1527. data/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb +0 -0
  1528. data/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb +0 -0
  1529. data/vendor/rails/activerecord/test/migrations/duplicate/3_foo.rb +0 -0
  1530. data/vendor/rails/activerecord/test/migrations/duplicate/3_innocent_jointable.rb +0 -0
  1531. data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb +0 -0
  1532. data/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb +0 -0
  1533. data/vendor/rails/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb +0 -0
  1534. data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +0 -0
  1535. data/vendor/rails/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb +0 -0
  1536. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +0 -0
  1537. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +0 -0
  1538. data/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +0 -0
  1539. data/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +0 -0
  1540. data/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb +0 -0
  1541. data/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb +0 -0
  1542. data/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb +0 -0
  1543. data/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb +0 -0
  1544. data/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb +0 -0
  1545. data/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb +0 -0
  1546. data/vendor/rails/activerecord/test/models/author.rb +4 -0
  1547. data/vendor/rails/activerecord/test/models/auto_id.rb +0 -0
  1548. data/vendor/rails/activerecord/test/models/binary.rb +0 -0
  1549. data/vendor/rails/activerecord/test/models/bird.rb +3 -0
  1550. data/vendor/rails/activerecord/test/models/book.rb +0 -0
  1551. data/vendor/rails/activerecord/test/models/categorization.rb +0 -0
  1552. data/vendor/rails/activerecord/test/models/category.rb +4 -0
  1553. data/vendor/rails/activerecord/test/models/citation.rb +0 -0
  1554. data/vendor/rails/activerecord/test/models/club.rb +6 -0
  1555. data/vendor/rails/activerecord/test/models/column_name.rb +0 -0
  1556. data/vendor/rails/activerecord/test/models/comment.rb +0 -0
  1557. data/vendor/rails/activerecord/test/models/company.rb +28 -1
  1558. data/vendor/rails/activerecord/test/models/company_in_module.rb +0 -0
  1559. data/vendor/rails/activerecord/test/models/computer.rb +0 -0
  1560. data/vendor/rails/activerecord/test/models/contact.rb +0 -0
  1561. data/vendor/rails/activerecord/test/models/course.rb +0 -0
  1562. data/vendor/rails/activerecord/test/models/customer.rb +19 -1
  1563. data/vendor/rails/activerecord/test/models/default.rb +0 -0
  1564. data/vendor/rails/activerecord/test/models/developer.rb +12 -0
  1565. data/vendor/rails/activerecord/test/models/edge.rb +0 -0
  1566. data/vendor/rails/activerecord/test/models/entrant.rb +0 -0
  1567. data/vendor/rails/activerecord/test/models/event.rb +3 -0
  1568. data/vendor/rails/activerecord/test/models/guid.rb +0 -0
  1569. data/vendor/rails/activerecord/test/models/item.rb +0 -0
  1570. data/vendor/rails/activerecord/test/models/job.rb +0 -0
  1571. data/vendor/rails/activerecord/test/models/joke.rb +0 -0
  1572. data/vendor/rails/activerecord/test/models/keyboard.rb +0 -0
  1573. data/vendor/rails/activerecord/test/models/legacy_thing.rb +0 -0
  1574. data/vendor/rails/activerecord/test/models/matey.rb +0 -0
  1575. data/vendor/rails/activerecord/test/models/member.rb +3 -0
  1576. data/vendor/rails/activerecord/test/models/member_detail.rb +5 -0
  1577. data/vendor/rails/activerecord/test/models/member_type.rb +3 -0
  1578. data/vendor/rails/activerecord/test/models/membership.rb +0 -0
  1579. data/vendor/rails/activerecord/test/models/minimalistic.rb +0 -0
  1580. data/vendor/rails/activerecord/test/models/mixed_case_monkey.rb +0 -0
  1581. data/vendor/rails/activerecord/test/models/movie.rb +0 -0
  1582. data/vendor/rails/activerecord/test/models/order.rb +0 -0
  1583. data/vendor/rails/activerecord/test/models/organization.rb +4 -0
  1584. data/vendor/rails/activerecord/test/models/owner.rb +2 -1
  1585. data/vendor/rails/activerecord/test/models/parrot.rb +3 -0
  1586. data/vendor/rails/activerecord/test/models/person.rb +6 -0
  1587. data/vendor/rails/activerecord/test/models/pet.rb +2 -1
  1588. data/vendor/rails/activerecord/test/models/pirate.rb +55 -1
  1589. data/vendor/rails/activerecord/test/models/post.rb +15 -0
  1590. data/vendor/rails/activerecord/test/models/price_estimate.rb +0 -0
  1591. data/vendor/rails/activerecord/test/models/project.rb +1 -0
  1592. data/vendor/rails/activerecord/test/models/reader.rb +0 -0
  1593. data/vendor/rails/activerecord/test/models/reference.rb +0 -0
  1594. data/vendor/rails/activerecord/test/models/reply.rb +6 -0
  1595. data/vendor/rails/activerecord/test/models/ship.rb +8 -1
  1596. data/vendor/rails/activerecord/test/models/ship_part.rb +5 -0
  1597. data/vendor/rails/activerecord/test/models/sponsor.rb +0 -0
  1598. data/vendor/rails/activerecord/test/models/subject.rb +0 -0
  1599. data/vendor/rails/activerecord/test/models/subscriber.rb +0 -0
  1600. data/vendor/rails/activerecord/test/models/subscription.rb +0 -0
  1601. data/vendor/rails/activerecord/test/models/tag.rb +0 -0
  1602. data/vendor/rails/activerecord/test/models/tagging.rb +0 -0
  1603. data/vendor/rails/activerecord/test/models/task.rb +0 -0
  1604. data/vendor/rails/activerecord/test/models/topic.rb +16 -1
  1605. data/vendor/rails/activerecord/test/models/toy.rb +4 -0
  1606. data/vendor/rails/activerecord/test/models/treasure.rb +0 -0
  1607. data/vendor/rails/activerecord/test/models/vertex.rb +0 -0
  1608. data/vendor/rails/activerecord/test/models/warehouse_thing.rb +0 -0
  1609. data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +0 -0
  1610. data/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb +0 -0
  1611. data/vendor/rails/activerecord/test/schema/schema.rb +47 -3
  1612. data/vendor/rails/activerecord/test/schema/schema2.rb +0 -0
  1613. data/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb +0 -0
  1614. data/vendor/rails/activeresource/CHANGELOG +35 -24
  1615. data/vendor/rails/activeresource/README +1 -1
  1616. data/vendor/rails/activeresource/Rakefile +5 -4
  1617. data/vendor/rails/activeresource/lib/active_resource.rb +7 -10
  1618. data/vendor/rails/activeresource/lib/active_resource/base.rb +177 -121
  1619. data/vendor/rails/activeresource/lib/active_resource/connection.rb +28 -17
  1620. data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +14 -13
  1621. data/vendor/rails/activeresource/lib/active_resource/formats.rb +0 -0
  1622. data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +7 -7
  1623. data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +9 -9
  1624. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +29 -39
  1625. data/vendor/rails/activeresource/lib/active_resource/validations.rb +16 -30
  1626. data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
  1627. data/vendor/rails/activeresource/lib/activeresource.rb +0 -0
  1628. data/vendor/rails/activeresource/test/abstract_unit.rb +5 -8
  1629. data/vendor/rails/activeresource/test/authorization_test.rb +12 -12
  1630. data/vendor/rails/activeresource/test/base/custom_methods_test.rb +3 -2
  1631. data/vendor/rails/activeresource/test/base/equality_test.rb +9 -0
  1632. data/vendor/rails/activeresource/test/base/load_test.rb +2 -2
  1633. data/vendor/rails/activeresource/test/base_errors_test.rb +0 -0
  1634. data/vendor/rails/activeresource/test/base_test.rb +144 -101
  1635. data/vendor/rails/activeresource/test/connection_test.rb +14 -8
  1636. data/vendor/rails/activeresource/test/fixtures/beast.rb +0 -0
  1637. data/vendor/rails/activeresource/test/fixtures/customer.rb +0 -0
  1638. data/vendor/rails/activeresource/test/fixtures/person.rb +0 -0
  1639. data/vendor/rails/activeresource/test/fixtures/street_address.rb +0 -0
  1640. data/vendor/rails/activeresource/test/format_test.rb +40 -11
  1641. data/vendor/rails/activeresource/test/setter_trap.rb +2 -3
  1642. data/vendor/rails/activesupport/CHANGELOG +194 -83
  1643. data/vendor/rails/activesupport/README +0 -0
  1644. data/vendor/rails/activesupport/lib/active_support.rb +30 -32
  1645. data/vendor/rails/activesupport/lib/active_support/backtrace_cleaner.rb +72 -0
  1646. data/vendor/rails/activesupport/lib/active_support/base64.rb +13 -2
  1647. data/vendor/rails/activesupport/lib/active_support/basic_object.rb +1 -1
  1648. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +27 -21
  1649. data/vendor/rails/activesupport/lib/active_support/cache.rb +128 -47
  1650. data/vendor/rails/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +7 -2
  1651. data/vendor/rails/activesupport/lib/active_support/cache/drb_store.rb +2 -3
  1652. data/vendor/rails/activesupport/lib/active_support/cache/file_store.rb +7 -5
  1653. data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +53 -21
  1654. data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +16 -2
  1655. data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +104 -0
  1656. data/vendor/rails/activesupport/lib/active_support/cache/synchronized_memory_store.rb +47 -0
  1657. data/vendor/rails/activesupport/lib/active_support/callbacks.rb +34 -30
  1658. data/vendor/rails/activesupport/lib/active_support/core_ext.rb +1 -1
  1659. data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +2 -0
  1660. data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +27 -0
  1661. data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +30 -12
  1662. data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +0 -0
  1663. data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +53 -10
  1664. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +0 -0
  1665. data/vendor/rails/activesupport/lib/active_support/core_ext/array/wrapper.rb +24 -0
  1666. data/vendor/rails/activesupport/lib/active_support/core_ext/base64.rb +0 -0
  1667. data/vendor/rails/activesupport/lib/active_support/core_ext/base64/encoding.rb +3 -0
  1668. data/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb +13 -6
  1669. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +0 -0
  1670. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +18 -22
  1671. data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +5 -0
  1672. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +0 -0
  1673. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -5
  1674. data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +0 -0
  1675. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +24 -24
  1676. data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +20 -19
  1677. data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +39 -39
  1678. data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +0 -0
  1679. data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +0 -0
  1680. data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +3 -0
  1681. data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +24 -9
  1682. data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +3 -3
  1683. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +0 -0
  1684. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +19 -5
  1685. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +1 -1
  1686. data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +6 -0
  1687. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +51 -4
  1688. data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +12 -8
  1689. data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +4 -20
  1690. data/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +46 -0
  1691. data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +2 -0
  1692. data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +0 -0
  1693. data/vendor/rails/activesupport/lib/active_support/core_ext/float/time.rb +27 -0
  1694. data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +2 -1
  1695. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +33 -55
  1696. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
  1697. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +0 -0
  1698. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +1 -1
  1699. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +6 -0
  1700. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +1 -1
  1701. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +12 -5
  1702. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +15 -5
  1703. data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +2 -0
  1704. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +0 -0
  1705. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +0 -0
  1706. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/time.rb +45 -0
  1707. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +0 -0
  1708. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +0 -0
  1709. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +0 -0
  1710. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +4 -4
  1711. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +0 -0
  1712. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +0 -0
  1713. data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +0 -0
  1714. data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +136 -7
  1715. data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +11 -1
  1716. data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +71 -67
  1717. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +4 -4
  1718. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +0 -0
  1719. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +24 -24
  1720. data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +60 -3
  1721. data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +0 -0
  1722. data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +81 -66
  1723. data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +0 -0
  1724. data/vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb +8 -7
  1725. data/vendor/rails/activesupport/lib/active_support/core_ext/module/synchronization.rb +39 -0
  1726. data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +0 -0
  1727. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +0 -0
  1728. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +0 -0
  1729. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +0 -0
  1730. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +0 -10
  1731. data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +1 -0
  1732. data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +2 -1
  1733. data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +29 -7
  1734. data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +1 -1
  1735. data/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb +13 -0
  1736. data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +52 -21
  1737. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +0 -0
  1738. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +0 -0
  1739. data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +0 -0
  1740. data/vendor/rails/activesupport/lib/active_support/core_ext/process.rb +0 -0
  1741. data/vendor/rails/activesupport/lib/active_support/core_ext/process/daemon.rb +0 -0
  1742. data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +0 -0
  1743. data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +0 -0
  1744. data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +1 -1
  1745. data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +0 -0
  1746. data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +0 -0
  1747. data/vendor/rails/activesupport/lib/active_support/core_ext/rexml.rb +29 -24
  1748. data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +6 -2
  1749. data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +5 -5
  1750. data/vendor/rails/activesupport/lib/active_support/core_ext/string/behavior.rb +13 -0
  1751. data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +0 -0
  1752. data/vendor/rails/activesupport/lib/active_support/core_ext/string/filters.rb +0 -0
  1753. data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +22 -3
  1754. data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +3 -1
  1755. data/vendor/rails/activesupport/lib/active_support/core_ext/string/multibyte.rb +81 -0
  1756. data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +0 -0
  1757. data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +0 -0
  1758. data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +0 -0
  1759. data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +0 -0
  1760. data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +0 -0
  1761. data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +39 -12
  1762. data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +2 -1
  1763. data/vendor/rails/activesupport/lib/active_support/core_ext/time/zones.rb +1 -1
  1764. data/vendor/rails/activesupport/lib/active_support/core_ext/try.rb +36 -0
  1765. data/vendor/rails/activesupport/lib/active_support/core_ext/uri.rb +16 -0
  1766. data/vendor/rails/activesupport/lib/active_support/dependencies.rb +196 -124
  1767. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +33 -60
  1768. data/vendor/rails/activesupport/lib/active_support/duration.rb +3 -1
  1769. data/vendor/rails/activesupport/lib/active_support/gzip.rb +0 -0
  1770. data/vendor/rails/activesupport/lib/active_support/inflections.rb +1 -0
  1771. data/vendor/rails/activesupport/lib/active_support/inflector.rb +131 -38
  1772. data/vendor/rails/activesupport/lib/active_support/json.rb +1 -1
  1773. data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +23 -4
  1774. data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +9 -2
  1775. data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +9 -2
  1776. data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +0 -0
  1777. data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +0 -0
  1778. data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +10 -11
  1779. data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +0 -0
  1780. data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +0 -0
  1781. data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +0 -0
  1782. data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +0 -0
  1783. data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +0 -0
  1784. data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +0 -0
  1785. data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +10 -3
  1786. data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +0 -0
  1787. data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +23 -29
  1788. data/vendor/rails/activesupport/lib/active_support/json/variable.rb +0 -0
  1789. data/vendor/rails/activesupport/lib/active_support/locale/en.yml +33 -0
  1790. data/vendor/rails/activesupport/lib/active_support/memoizable.rb +100 -0
  1791. data/vendor/rails/activesupport/lib/active_support/message_encryptor.rb +70 -0
  1792. data/vendor/rails/activesupport/lib/active_support/message_verifier.rb +46 -0
  1793. data/vendor/rails/activesupport/lib/active_support/multibyte.rb +31 -7
  1794. data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +686 -122
  1795. data/vendor/rails/activesupport/lib/active_support/multibyte/exceptions.rb +8 -0
  1796. data/vendor/rails/activesupport/lib/active_support/multibyte/unicode_database.rb +71 -0
  1797. data/vendor/rails/activesupport/lib/active_support/option_merger.rb +6 -8
  1798. data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +81 -18
  1799. data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +0 -0
  1800. data/vendor/rails/activesupport/lib/active_support/rescuable.rb +108 -0
  1801. data/vendor/rails/activesupport/lib/active_support/secure_random.rb +199 -0
  1802. data/vendor/rails/activesupport/lib/active_support/string_inquirer.rb +11 -1
  1803. data/vendor/rails/activesupport/lib/active_support/test_case.rb +33 -7
  1804. data/vendor/rails/activesupport/lib/active_support/{core_ext/test/unit → testing}/assertions.rb +14 -13
  1805. data/vendor/rails/activesupport/lib/active_support/testing/declarative.rb +21 -0
  1806. data/vendor/rails/activesupport/lib/active_support/testing/default.rb +0 -0
  1807. data/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb +55 -0
  1808. data/vendor/rails/activesupport/lib/active_support/testing/performance.rb +452 -0
  1809. data/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb +66 -68
  1810. data/vendor/rails/activesupport/lib/active_support/time_with_zone.rb +80 -50
  1811. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +12 -4
  1812. data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
  1813. data/vendor/rails/activesupport/lib/active_support/vendor.rb +12 -9
  1814. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +0 -0
  1815. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +0 -0
  1816. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +0 -0
  1817. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +0 -0
  1818. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +0 -0
  1819. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +0 -0
  1820. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +1 -1
  1821. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +0 -0
  1822. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +20 -0
  1823. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/README.textile +20 -0
  1824. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/Rakefile +5 -0
  1825. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +27 -0
  1826. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb +199 -0
  1827. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +214 -0
  1828. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/exceptions.rb +53 -0
  1829. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/all.rb +5 -0
  1830. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +100 -0
  1831. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +125 -0
  1832. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +1 -0
  1833. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +3 -0
  1834. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +568 -0
  1835. data/vendor/rails/activesupport/lib/active_support/vendor/{memcache-client-1.5.0 → memcache-client-1.6.5}/memcache.rb +383 -297
  1836. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo.rb +0 -0
  1837. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/data_timezone.rb +0 -0
  1838. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/data_timezone_info.rb +0 -0
  1839. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Algiers.rb +0 -0
  1840. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Cairo.rb +0 -0
  1841. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Casablanca.rb +0 -0
  1842. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Harare.rb +0 -0
  1843. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Johannesburg.rb +0 -0
  1844. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Monrovia.rb +0 -0
  1845. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Africa/Nairobi.rb +0 -0
  1846. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +0 -0
  1847. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
  1848. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Bogota.rb +0 -0
  1849. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Caracas.rb +0 -0
  1850. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Chicago.rb +0 -0
  1851. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Chihuahua.rb +0 -0
  1852. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Denver.rb +0 -0
  1853. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Godthab.rb +0 -0
  1854. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Guatemala.rb +0 -0
  1855. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Halifax.rb +0 -0
  1856. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Indiana/Indianapolis.rb +0 -0
  1857. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Juneau.rb +0 -0
  1858. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/La_Paz.rb +0 -0
  1859. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Lima.rb +0 -0
  1860. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Los_Angeles.rb +0 -0
  1861. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Mazatlan.rb +0 -0
  1862. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Mexico_City.rb +0 -0
  1863. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Monterrey.rb +0 -0
  1864. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/New_York.rb +0 -0
  1865. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Phoenix.rb +0 -0
  1866. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Regina.rb +0 -0
  1867. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Santiago.rb +0 -0
  1868. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Sao_Paulo.rb +0 -0
  1869. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/St_Johns.rb +0 -0
  1870. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/America/Tijuana.rb +0 -0
  1871. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Almaty.rb +0 -0
  1872. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Baghdad.rb +0 -0
  1873. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Baku.rb +0 -0
  1874. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Bangkok.rb +0 -0
  1875. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Chongqing.rb +0 -0
  1876. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
  1877. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Dhaka.rb +0 -0
  1878. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Hong_Kong.rb +0 -0
  1879. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Irkutsk.rb +0 -0
  1880. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Jakarta.rb +0 -0
  1881. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Jerusalem.rb +0 -0
  1882. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Kabul.rb +0 -0
  1883. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Kamchatka.rb +0 -0
  1884. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Karachi.rb +0 -0
  1885. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Katmandu.rb +0 -0
  1886. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Kolkata.rb +0 -0
  1887. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Krasnoyarsk.rb +0 -0
  1888. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Kuala_Lumpur.rb +0 -0
  1889. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Kuwait.rb +0 -0
  1890. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Magadan.rb +0 -0
  1891. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Muscat.rb +0 -0
  1892. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Novosibirsk.rb +0 -0
  1893. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Rangoon.rb +0 -0
  1894. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Riyadh.rb +0 -0
  1895. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Seoul.rb +0 -0
  1896. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Shanghai.rb +0 -0
  1897. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Singapore.rb +0 -0
  1898. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Taipei.rb +0 -0
  1899. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Tashkent.rb +0 -0
  1900. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Tbilisi.rb +0 -0
  1901. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Tehran.rb +0 -0
  1902. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Tokyo.rb +0 -0
  1903. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Ulaanbaatar.rb +0 -0
  1904. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Urumqi.rb +0 -0
  1905. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Vladivostok.rb +0 -0
  1906. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Yakutsk.rb +0 -0
  1907. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Yekaterinburg.rb +0 -0
  1908. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Asia/Yerevan.rb +0 -0
  1909. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Atlantic/Azores.rb +0 -0
  1910. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Atlantic/Cape_Verde.rb +0 -0
  1911. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Atlantic/South_Georgia.rb +0 -0
  1912. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Adelaide.rb +0 -0
  1913. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Brisbane.rb +0 -0
  1914. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Darwin.rb +0 -0
  1915. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Hobart.rb +0 -0
  1916. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Melbourne.rb +0 -0
  1917. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Perth.rb +0 -0
  1918. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Australia/Sydney.rb +0 -0
  1919. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Etc/UTC.rb +0 -0
  1920. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Amsterdam.rb +0 -0
  1921. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Athens.rb +0 -0
  1922. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Belgrade.rb +0 -0
  1923. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Berlin.rb +0 -0
  1924. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Bratislava.rb +0 -0
  1925. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Brussels.rb +0 -0
  1926. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Bucharest.rb +0 -0
  1927. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Budapest.rb +0 -0
  1928. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Copenhagen.rb +0 -0
  1929. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Dublin.rb +0 -0
  1930. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Helsinki.rb +0 -0
  1931. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Istanbul.rb +0 -0
  1932. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Kiev.rb +0 -0
  1933. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Lisbon.rb +0 -0
  1934. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Ljubljana.rb +0 -0
  1935. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/London.rb +0 -0
  1936. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Madrid.rb +0 -0
  1937. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Minsk.rb +0 -0
  1938. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Moscow.rb +0 -0
  1939. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Paris.rb +0 -0
  1940. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Prague.rb +0 -0
  1941. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Riga.rb +0 -0
  1942. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Rome.rb +0 -0
  1943. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Sarajevo.rb +0 -0
  1944. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Skopje.rb +0 -0
  1945. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Sofia.rb +0 -0
  1946. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Stockholm.rb +0 -0
  1947. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Tallinn.rb +0 -0
  1948. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Vienna.rb +0 -0
  1949. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Vilnius.rb +0 -0
  1950. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Warsaw.rb +0 -0
  1951. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Europe/Zagreb.rb +0 -0
  1952. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Auckland.rb +0 -0
  1953. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Fiji.rb +0 -0
  1954. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Guam.rb +0 -0
  1955. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Honolulu.rb +0 -0
  1956. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Majuro.rb +0 -0
  1957. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Midway.rb +0 -0
  1958. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Noumea.rb +0 -0
  1959. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Pago_Pago.rb +0 -0
  1960. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Port_Moresby.rb +0 -0
  1961. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/definitions/Pacific/Tongatapu.rb +0 -0
  1962. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/info_timezone.rb +0 -0
  1963. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/linked_timezone.rb +0 -0
  1964. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/linked_timezone_info.rb +0 -0
  1965. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/offset_rationals.rb +0 -0
  1966. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/ruby_core_support.rb +0 -0
  1967. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/time_or_datetime.rb +0 -0
  1968. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone.rb +0 -0
  1969. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone_definition.rb +0 -0
  1970. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone_info.rb +0 -0
  1971. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone_offset_info.rb +0 -0
  1972. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone_period.rb +0 -0
  1973. data/vendor/rails/activesupport/lib/active_support/vendor/{tzinfo-0.3.11 → tzinfo-0.3.12}/tzinfo/timezone_transition_info.rb +0 -0
  1974. data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
  1975. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -0
  1976. data/vendor/rails/activesupport/lib/active_support/xml_mini.rb +31 -0
  1977. data/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb +133 -0
  1978. data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb +77 -0
  1979. data/vendor/rails/activesupport/lib/active_support/xml_mini/rexml.rb +108 -0
  1980. data/vendor/rails/activesupport/lib/activesupport.rb +0 -0
  1981. data/vendor/rails/railties/CHANGELOG +297 -188
  1982. data/vendor/rails/railties/MIT-LICENSE +1 -1
  1983. data/vendor/rails/railties/README +6 -19
  1984. data/vendor/rails/railties/Rakefile +33 -20
  1985. data/vendor/rails/railties/bin/rails +1 -0
  1986. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +12 -8
  1987. data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +0 -0
  1988. data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +0 -0
  1989. data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +0 -0
  1990. data/vendor/rails/railties/configs/databases/frontbase.yml +0 -0
  1991. data/vendor/rails/railties/configs/databases/ibm_db.yml +62 -0
  1992. data/vendor/rails/railties/configs/databases/mysql.yml +6 -0
  1993. data/vendor/rails/railties/configs/databases/oracle.yml +0 -0
  1994. data/vendor/rails/railties/configs/databases/postgresql.yml +3 -0
  1995. data/vendor/rails/railties/configs/databases/sqlite2.yml +3 -0
  1996. data/vendor/rails/railties/configs/databases/sqlite3.yml +3 -0
  1997. data/vendor/rails/railties/configs/empty.log +0 -0
  1998. data/vendor/rails/railties/configs/initializers/backtrace_silencers.rb +7 -0
  1999. data/vendor/rails/railties/configs/initializers/inflections.rb +0 -0
  2000. data/vendor/rails/railties/configs/initializers/mime_types.rb +0 -0
  2001. data/vendor/rails/railties/configs/initializers/new_rails_defaults.rb +2 -0
  2002. data/vendor/rails/railties/configs/initializers/session_store.rb +15 -0
  2003. data/vendor/rails/railties/configs/locales/en.yml +5 -0
  2004. data/vendor/rails/railties/configs/routes.rb +0 -0
  2005. data/vendor/rails/railties/dispatches/config.ru +7 -0
  2006. data/vendor/rails/railties/dispatches/dispatch.fcgi +1 -1
  2007. data/vendor/rails/railties/dispatches/dispatch.rb +2 -2
  2008. data/vendor/rails/railties/dispatches/gateway.cgi +2 -2
  2009. data/vendor/rails/railties/doc/README_FOR_APP +0 -0
  2010. data/vendor/rails/railties/environments/boot.rb +3 -2
  2011. data/vendor/rails/railties/environments/development.rb +0 -0
  2012. data/vendor/rails/railties/environments/environment.rb +16 -42
  2013. data/vendor/rails/railties/environments/production.rb +10 -4
  2014. data/vendor/rails/railties/environments/test.rb +6 -0
  2015. data/vendor/rails/railties/helpers/application_controller.rb +10 -0
  2016. data/vendor/rails/railties/helpers/application_helper.rb +0 -0
  2017. data/vendor/rails/railties/helpers/performance_test.rb +9 -0
  2018. data/vendor/rails/railties/helpers/test_helper.rb +1 -1
  2019. data/vendor/rails/railties/html/404.html +0 -0
  2020. data/vendor/rails/railties/html/422.html +0 -0
  2021. data/vendor/rails/railties/html/500.html +1 -1
  2022. data/vendor/rails/railties/html/favicon.ico +0 -0
  2023. data/vendor/rails/railties/html/images/rails.png +0 -0
  2024. data/vendor/rails/railties/html/index.html +1 -0
  2025. data/vendor/rails/railties/html/javascripts/application.js +0 -0
  2026. data/vendor/rails/railties/html/javascripts/controls.js +72 -72
  2027. data/vendor/rails/railties/html/javascripts/dragdrop.js +165 -164
  2028. data/vendor/rails/railties/html/javascripts/effects.js +173 -165
  2029. data/vendor/rails/railties/html/javascripts/prototype.js +362 -267
  2030. data/vendor/rails/railties/html/robots.txt +0 -0
  2031. data/vendor/rails/railties/lib/code_statistics.rb +0 -0
  2032. data/vendor/rails/railties/lib/commands.rb +0 -0
  2033. data/vendor/rails/railties/lib/commands/about.rb +1 -1
  2034. data/vendor/rails/railties/lib/commands/console.rb +13 -0
  2035. data/vendor/rails/railties/lib/commands/dbconsole.rb +20 -4
  2036. data/vendor/rails/railties/lib/commands/destroy.rb +0 -0
  2037. data/vendor/rails/railties/lib/commands/ncgi/listener +2 -2
  2038. data/vendor/rails/railties/lib/commands/ncgi/tracker +2 -2
  2039. data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +0 -0
  2040. data/vendor/rails/railties/lib/commands/performance/profiler.rb +0 -0
  2041. data/vendor/rails/railties/lib/commands/plugin.rb +43 -25
  2042. data/vendor/rails/railties/lib/commands/runner.rb +13 -7
  2043. data/vendor/rails/railties/lib/commands/server.rb +100 -25
  2044. data/vendor/rails/railties/lib/commands/update.rb +0 -0
  2045. data/vendor/rails/railties/lib/console_app.rb +4 -4
  2046. data/vendor/rails/railties/lib/console_sandbox.rb +0 -0
  2047. data/vendor/rails/railties/lib/console_with_helpers.rb +2 -23
  2048. data/vendor/rails/railties/lib/dispatcher.rb +1 -1
  2049. data/vendor/rails/railties/lib/fcgi_handler.rb +13 -13
  2050. data/vendor/rails/railties/lib/initializer.rb +256 -66
  2051. data/vendor/rails/railties/lib/performance_test_help.rb +5 -0
  2052. data/vendor/rails/railties/lib/rails/backtrace_cleaner.rb +54 -0
  2053. data/vendor/rails/railties/lib/rails/gem_builder.rb +3 -3
  2054. data/vendor/rails/railties/lib/rails/gem_dependency.rb +209 -56
  2055. data/vendor/rails/railties/lib/rails/plugin.rb +59 -8
  2056. data/vendor/rails/railties/lib/rails/plugin/loader.rb +66 -27
  2057. data/vendor/rails/railties/lib/rails/plugin/locator.rb +1 -1
  2058. data/vendor/rails/railties/lib/rails/rack.rb +8 -0
  2059. data/vendor/rails/railties/lib/rails/rack/debugger.rb +21 -0
  2060. data/vendor/rails/railties/lib/rails/rack/log_tailer.rb +35 -0
  2061. data/vendor/rails/railties/lib/rails/rack/metal.rb +51 -0
  2062. data/vendor/rails/railties/lib/rails/rack/static.rb +46 -0
  2063. data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +140 -0
  2064. data/vendor/rails/railties/lib/rails/version.rb +1 -1
  2065. data/vendor/rails/railties/lib/rails_generator.rb +0 -0
  2066. data/vendor/rails/railties/lib/rails_generator/base.rb +3 -0
  2067. data/vendor/rails/railties/lib/rails_generator/commands.rb +16 -17
  2068. data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +4 -0
  2069. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +0 -0
  2070. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +213 -133
  2071. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/scm.rb +8 -0
  2072. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/svn.rb +7 -0
  2073. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb +401 -0
  2074. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +12 -11
  2075. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +7 -1
  2076. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +0 -0
  2077. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +1 -1
  2078. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +0 -0
  2079. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper_test.rb +4 -0
  2080. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +0 -0
  2081. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/USAGE +24 -0
  2082. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/helper_generator.rb +25 -0
  2083. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper.rb +2 -0
  2084. data/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper_test.rb +4 -0
  2085. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +0 -0
  2086. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +1 -1
  2087. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +2 -2
  2088. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +0 -0
  2089. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +1 -1
  2090. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +0 -0
  2091. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
  2092. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +0 -0
  2093. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +2 -3
  2094. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +0 -0
  2095. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
  2096. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/USAGE +8 -0
  2097. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/metal_generator.rb +8 -0
  2098. data/vendor/rails/railties/lib/rails_generator/generators/components/metal/templates/metal.rb +12 -0
  2099. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +0 -0
  2100. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +0 -0
  2101. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +0 -0
  2102. data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +0 -0
  2103. data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +1 -1
  2104. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +0 -0
  2105. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +0 -0
  2106. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +3 -0
  2107. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +1 -1
  2108. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +0 -0
  2109. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +1 -1
  2110. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +0 -0
  2111. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +1 -1
  2112. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/USAGE +8 -0
  2113. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb +16 -0
  2114. data/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb +9 -0
  2115. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +0 -0
  2116. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +11 -11
  2117. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +0 -0
  2118. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +0 -0
  2119. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +1 -0
  2120. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +0 -0
  2121. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +0 -0
  2122. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +0 -0
  2123. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb +0 -0
  2124. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +0 -0
  2125. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +0 -0
  2126. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/test_helper.rb +3 -0
  2127. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +0 -0
  2128. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +4 -4
  2129. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +2 -2
  2130. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +4 -2
  2131. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +0 -0
  2132. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +1 -1
  2133. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +0 -0
  2134. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper_test.rb +4 -0
  2135. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +9 -5
  2136. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +12 -3
  2137. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +1 -1
  2138. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +11 -11
  2139. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +0 -0
  2140. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper_test.rb +4 -0
  2141. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +1 -1
  2142. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +0 -0
  2143. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +2 -2
  2144. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +2 -2
  2145. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +2 -2
  2146. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +1 -1
  2147. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +0 -0
  2148. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +0 -0
  2149. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +0 -0
  2150. data/vendor/rails/railties/lib/rails_generator/lookup.rb +0 -0
  2151. data/vendor/rails/railties/lib/rails_generator/manifest.rb +0 -0
  2152. data/vendor/rails/railties/lib/rails_generator/options.rb +0 -0
  2153. data/vendor/rails/railties/lib/rails_generator/scripts.rb +1 -1
  2154. data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +6 -7
  2155. data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +0 -0
  2156. data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +0 -0
  2157. data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +7 -147
  2158. data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +0 -0
  2159. data/vendor/rails/railties/lib/rails_generator/spec.rb +0 -0
  2160. data/vendor/rails/railties/lib/railties_path.rb +0 -0
  2161. data/vendor/rails/railties/lib/ruby_version_check.rb +0 -0
  2162. data/vendor/rails/railties/lib/rubyprof_ext.rb +0 -0
  2163. data/vendor/rails/railties/lib/source_annotation_extractor.rb +0 -0
  2164. data/vendor/rails/railties/lib/tasks/annotations.rake +8 -11
  2165. data/vendor/rails/railties/lib/tasks/databases.rake +55 -21
  2166. data/vendor/rails/railties/lib/tasks/documentation.rake +8 -0
  2167. data/vendor/rails/railties/lib/tasks/framework.rake +31 -2
  2168. data/vendor/rails/railties/lib/tasks/gems.rake +41 -40
  2169. data/vendor/rails/railties/lib/tasks/log.rake +0 -0
  2170. data/vendor/rails/railties/lib/tasks/middleware.rake +7 -0
  2171. data/vendor/rails/railties/lib/tasks/misc.rake +10 -4
  2172. data/vendor/rails/railties/lib/tasks/rails.rb +0 -0
  2173. data/vendor/rails/railties/lib/tasks/routes.rake +0 -0
  2174. data/vendor/rails/railties/lib/tasks/statistics.rake +0 -1
  2175. data/vendor/rails/railties/lib/tasks/testing.rake +30 -9
  2176. data/vendor/rails/railties/lib/test_help.rb +17 -10
  2177. data/vendor/rails/railties/lib/webrick_server.rb +2 -11
  2178. data/vendor/redcloth/Rakefile +0 -0
  2179. data/vendor/redcloth/bin/redcloth +0 -0
  2180. data/vendor/redcloth/doc/CHANGELOG +0 -0
  2181. data/vendor/redcloth/doc/COPYING +0 -0
  2182. data/vendor/redcloth/doc/README +0 -0
  2183. data/vendor/redcloth/doc/REFERENCE +0 -0
  2184. data/vendor/redcloth/doc/make.rb +0 -0
  2185. data/vendor/redcloth/lib/rctodb.rb +0 -0
  2186. data/vendor/redcloth/lib/redcloth.rb +0 -0
  2187. data/vendor/redcloth/run-tests.rb +0 -0
  2188. data/vendor/redcloth/setup.rb +0 -0
  2189. data/vendor/redcloth/tests/code.yml +0 -0
  2190. data/vendor/redcloth/tests/images.yml +0 -0
  2191. data/vendor/redcloth/tests/instiki.yml +0 -0
  2192. data/vendor/redcloth/tests/links.yml +0 -0
  2193. data/vendor/redcloth/tests/lists.yml +0 -0
  2194. data/vendor/redcloth/tests/markdown.yml +0 -0
  2195. data/vendor/redcloth/tests/poignant.yml +0 -0
  2196. data/vendor/redcloth/tests/table.yml +0 -0
  2197. data/vendor/redcloth/tests/textism.yml +0 -0
  2198. metadata +514 -315
  2199. data/app/controllers/admin/abstract_model_controller.rb +0 -134
  2200. data/app/models/response_cache.rb +0 -187
  2201. data/lib/plugins/extension_patches/lib/fixture_loading_extension.rb +0 -76
  2202. data/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb +0 -93
  2203. data/lib/radiant/compat.rb +0 -10
  2204. data/spec/integration/admin/content_negotiation_spec.rb +0 -27
  2205. data/spec/integration/admin/pages_integration_spec.rb +0 -124
  2206. data/spec/integration/admin/permission_integration_spec.rb +0 -24
  2207. data/spec/integration/admin/snippets_integration_spec.rb +0 -73
  2208. data/spec/integration/admin/user_management_integration_spec.rb +0 -80
  2209. data/spec/integration/admin/user_preferences_integration_spec.rb +0 -19
  2210. data/spec/integration/page_serving_spec.rb +0 -37
  2211. data/spec/models/response_cache_spec.rb +0 -286
  2212. data/stories/all.rb +0 -4
  2213. data/stories/helper.rb +0 -3
  2214. data/vendor/highline/AUTHORS +0 -2
  2215. data/vendor/highline/COPYING +0 -340
  2216. data/vendor/highline/site/highline.css +0 -65
  2217. data/vendor/highline/site/images/logo.png +0 -0
  2218. data/vendor/highline/site/index.html +0 -59
  2219. data/vendor/plugins/dataset/History.txt +0 -9
  2220. data/vendor/plugins/dataset/Manifest.txt +0 -21
  2221. data/vendor/plugins/default_order/README +0 -35
  2222. data/vendor/plugins/default_order/Rakefile +0 -22
  2223. data/vendor/plugins/default_order/init.rb +0 -1
  2224. data/vendor/plugins/default_order/lib/default_order.rb +0 -32
  2225. data/vendor/plugins/default_order/test/default_order_test.rb +0 -5
  2226. data/vendor/plugins/spec_integration/LICENSE +0 -19
  2227. data/vendor/plugins/spec_integration/README +0 -117
  2228. data/vendor/plugins/spec_integration/Rakefile +0 -10
  2229. data/vendor/plugins/spec_integration/lib/spec/integration.rb +0 -10
  2230. data/vendor/plugins/spec_integration/lib/spec/integration/dsl.rb +0 -11
  2231. data/vendor/plugins/spec_integration/lib/spec/integration/dsl/form.rb +0 -157
  2232. data/vendor/plugins/spec_integration/lib/spec/integration/dsl/integration_example_group.rb +0 -97
  2233. data/vendor/plugins/spec_integration/lib/spec/integration/dsl/navigation.rb +0 -102
  2234. data/vendor/plugins/spec_integration/lib/spec/integration/extensions.rb +0 -8
  2235. data/vendor/plugins/spec_integration/lib/spec/integration/extensions/action_controller.rb +0 -25
  2236. data/vendor/plugins/spec_integration/lib/spec/integration/extensions/hash.rb +0 -48
  2237. data/vendor/plugins/spec_integration/lib/spec/integration/matchers.rb +0 -1
  2238. data/vendor/plugins/spec_integration/lib/spec/integration/matchers/display_object.rb +0 -41
  2239. data/vendor/plugins/spec_integration/lib/spec/integration/matchers/have_link_to.rb +0 -35
  2240. data/vendor/plugins/spec_integration/lib/spec/integration/matchers/navigate_successfully.rb +0 -60
  2241. data/vendor/plugins/spec_integration/lib/spec/integration/matchers/showing.rb +0 -44
  2242. data/vendor/plugins/spec_integration/spec/application.rb +0 -3
  2243. data/vendor/plugins/spec_integration/spec/dispatcher.rb +0 -24
  2244. data/vendor/plugins/spec_integration/spec/dsl/form_spec.rb +0 -130
  2245. data/vendor/plugins/spec_integration/spec/dsl/integration_spec_spec.rb +0 -38
  2246. data/vendor/plugins/spec_integration/spec/dsl/navigation_spec.rb +0 -35
  2247. data/vendor/plugins/spec_integration/spec/integration_dsl_controller.rb +0 -5
  2248. data/vendor/plugins/spec_integration/spec/spec.opts +0 -7
  2249. data/vendor/plugins/spec_integration/spec/spec_helper.rb +0 -10
  2250. data/vendor/plugins/spec_integration/tasks/integration.rake +0 -14
  2251. data/vendor/plugins/vizres/CHANGELOG +0 -15
  2252. data/vendor/plugins/vizres/MIT-LICENSE +0 -16
  2253. data/vendor/plugins/vizres/README +0 -80
  2254. data/vendor/plugins/vizres/Rakefile +0 -22
  2255. data/vendor/plugins/vizres/init.rb +0 -1
  2256. data/vendor/plugins/vizres/lib/vizres.rb +0 -33
  2257. data/vendor/plugins/vizres/lib/vizres/browser.rb +0 -36
  2258. data/vendor/plugins/vizres/lib/vizres/scm.rb +0 -27
  2259. data/vendor/plugins/vizres/test/vizres/browser_test.rb +0 -76
  2260. data/vendor/plugins/vizres/test/vizres/scm_test.rb +0 -41
  2261. data/vendor/plugins/vizres/test/vizres_test.rb +0 -55
  2262. data/vendor/plugins/vizres/vizres.gemspec +0 -26
  2263. data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +0 -14
  2264. data/vendor/rails/actionpack/lib/action_controller/assertions.rb +0 -69
  2265. data/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb +0 -18
  2266. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +0 -73
  2267. data/vendor/rails/actionpack/lib/action_controller/components.rb +0 -166
  2268. data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +0 -169
  2269. data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +0 -340
  2270. data/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb +0 -32
  2271. data/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb +0 -35
  2272. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +0 -963
  2273. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +0 -972
  2274. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +0 -1120
  2275. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +0 -4225
  2276. data/vendor/rails/actionpack/lib/action_view/partial_template.rb +0 -70
  2277. data/vendor/rails/actionpack/lib/action_view/template_finder.rb +0 -177
  2278. data/vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb +0 -128
  2279. data/vendor/rails/actionpack/test/controller/cgi_test.rb +0 -116
  2280. data/vendor/rails/actionpack/test/controller/components_test.rb +0 -140
  2281. data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +0 -45
  2282. data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +0 -54
  2283. data/vendor/rails/actionpack/test/controller/integration_upload_test.rb +0 -43
  2284. data/vendor/rails/actionpack/test/controller/new_render_test.rb +0 -945
  2285. data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +0 -89
  2286. data/vendor/rails/actionpack/test/controller/session_management_test.rb +0 -178
  2287. data/vendor/rails/actionpack/test/fixtures/test/block_content_for.erb +0 -2
  2288. data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.erb +0 -2
  2289. data/vendor/rails/actionpack/test/template/deprecated_erb_variable_test.rb +0 -9
  2290. data/vendor/rails/actionpack/test/template/template_finder_test.rb +0 -73
  2291. data/vendor/rails/actionpack/test/template/template_object_test.rb +0 -95
  2292. data/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb +0 -1214
  2293. data/vendor/rails/activerecord/test/cases/adapter_test_sqlserver.rb +0 -95
  2294. data/vendor/rails/activerecord/test/cases/table_name_test_sqlserver.rb +0 -23
  2295. data/vendor/rails/activerecord/test/cases/threaded_connections_test.rb +0 -48
  2296. data/vendor/rails/activerecord/test/schema/sqlserver_specific_schema.rb +0 -5
  2297. data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +0 -127
  2298. data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +0 -66
  2299. data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +0 -1
  2300. data/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb +0 -149
  2301. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +0 -9
  2302. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +0 -564
  2303. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +0 -43
  2304. data/vendor/rails/activesupport/lib/active_support/vendor/tzinfo-0.3.11/tzinfo/definitions/America/Argentina/San_Juan.rb +0 -170
  2305. data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +0 -1021
  2306. data/vendor/rails/railties/bin/performance/request +0 -3
  2307. data/vendor/rails/railties/bin/process/inspector +0 -3
  2308. data/vendor/rails/railties/bin/process/reaper +0 -3
  2309. data/vendor/rails/railties/bin/process/spawner +0 -3
  2310. data/vendor/rails/railties/configs/apache.conf +0 -40
  2311. data/vendor/rails/railties/configs/lighttpd.conf +0 -54
  2312. data/vendor/rails/railties/helpers/application.rb +0 -15
  2313. data/vendor/rails/railties/lib/commands/performance/request.rb +0 -6
  2314. data/vendor/rails/railties/lib/commands/process/inspector.rb +0 -68
  2315. data/vendor/rails/railties/lib/commands/process/reaper.rb +0 -149
  2316. data/vendor/rails/railties/lib/commands/process/spawner.rb +0 -219
  2317. data/vendor/rails/railties/lib/commands/process/spinner.rb +0 -57
  2318. data/vendor/rails/railties/lib/commands/servers/base.rb +0 -31
  2319. data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +0 -94
  2320. data/vendor/rails/railties/lib/commands/servers/mongrel.rb +0 -69
  2321. data/vendor/rails/railties/lib/commands/servers/new_mongrel.rb +0 -16
  2322. data/vendor/rails/railties/lib/commands/servers/webrick.rb +0 -66
  2323. data/vendor/rails/railties/lib/rails/mongrel_server/commands.rb +0 -342
  2324. data/vendor/rails/railties/lib/rails/mongrel_server/handler.rb +0 -55
@@ -1,4225 +0,0 @@
1
- /* Prototype JavaScript framework, version 1.6.0.1
2
- * (c) 2005-2007 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.1',
11
-
12
- Browser: {
13
- IE: !!(window.attachEvent && !window.opera),
14
- Opera: !!window.opera,
15
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
16
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
17
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
18
- },
19
-
20
- BrowserFeatures: {
21
- XPath: !!document.evaluate,
22
- ElementExtensions: !!window.HTMLElement,
23
- SpecificElementExtensions:
24
- document.createElement('div').__proto__ &&
25
- document.createElement('div').__proto__ !==
26
- document.createElement('form').__proto__
27
- },
28
-
29
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
30
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
31
-
32
- emptyFunction: function() { },
33
- K: function(x) { return x }
34
- };
35
-
36
- if (Prototype.Browser.MobileSafari)
37
- Prototype.BrowserFeatures.SpecificElementExtensions = false;
38
-
39
-
40
- /* Based on Alex Arnell's inheritance implementation. */
41
- var Class = {
42
- create: function() {
43
- var parent = null, properties = $A(arguments);
44
- if (Object.isFunction(properties[0]))
45
- parent = properties.shift();
46
-
47
- function klass() {
48
- this.initialize.apply(this, arguments);
49
- }
50
-
51
- Object.extend(klass, Class.Methods);
52
- klass.superclass = parent;
53
- klass.subclasses = [];
54
-
55
- if (parent) {
56
- var subclass = function() { };
57
- subclass.prototype = parent.prototype;
58
- klass.prototype = new subclass;
59
- parent.subclasses.push(klass);
60
- }
61
-
62
- for (var i = 0; i < properties.length; i++)
63
- klass.addMethods(properties[i]);
64
-
65
- if (!klass.prototype.initialize)
66
- klass.prototype.initialize = Prototype.emptyFunction;
67
-
68
- klass.prototype.constructor = klass;
69
-
70
- return klass;
71
- }
72
- };
73
-
74
- Class.Methods = {
75
- addMethods: function(source) {
76
- var ancestor = this.superclass && this.superclass.prototype;
77
- var properties = Object.keys(source);
78
-
79
- if (!Object.keys({ toString: true }).length)
80
- properties.push("toString", "valueOf");
81
-
82
- for (var i = 0, length = properties.length; i < length; i++) {
83
- var property = properties[i], value = source[property];
84
- if (ancestor && Object.isFunction(value) &&
85
- value.argumentNames().first() == "$super") {
86
- var method = value, value = Object.extend((function(m) {
87
- return function() { return ancestor[m].apply(this, arguments) };
88
- })(property).wrap(method), {
89
- valueOf: function() { return method },
90
- toString: function() { return method.toString() }
91
- });
92
- }
93
- this.prototype[property] = value;
94
- }
95
-
96
- return this;
97
- }
98
- };
99
-
100
- var Abstract = { };
101
-
102
- Object.extend = function(destination, source) {
103
- for (var property in source)
104
- destination[property] = source[property];
105
- return destination;
106
- };
107
-
108
- Object.extend(Object, {
109
- inspect: function(object) {
110
- try {
111
- if (Object.isUndefined(object)) return 'undefined';
112
- if (object === null) return 'null';
113
- return object.inspect ? object.inspect() : object.toString();
114
- } catch (e) {
115
- if (e instanceof RangeError) return '...';
116
- throw e;
117
- }
118
- },
119
-
120
- toJSON: function(object) {
121
- var type = typeof object;
122
- switch (type) {
123
- case 'undefined':
124
- case 'function':
125
- case 'unknown': return;
126
- case 'boolean': return object.toString();
127
- }
128
-
129
- if (object === null) return 'null';
130
- if (object.toJSON) return object.toJSON();
131
- if (Object.isElement(object)) return;
132
-
133
- var results = [];
134
- for (var property in object) {
135
- var value = Object.toJSON(object[property]);
136
- if (!Object.isUndefined(value))
137
- results.push(property.toJSON() + ': ' + value);
138
- }
139
-
140
- return '{' + results.join(', ') + '}';
141
- },
142
-
143
- toQueryString: function(object) {
144
- return $H(object).toQueryString();
145
- },
146
-
147
- toHTML: function(object) {
148
- return object && object.toHTML ? object.toHTML() : String.interpret(object);
149
- },
150
-
151
- keys: function(object) {
152
- var keys = [];
153
- for (var property in object)
154
- keys.push(property);
155
- return keys;
156
- },
157
-
158
- values: function(object) {
159
- var values = [];
160
- for (var property in object)
161
- values.push(object[property]);
162
- return values;
163
- },
164
-
165
- clone: function(object) {
166
- return Object.extend({ }, object);
167
- },
168
-
169
- isElement: function(object) {
170
- return object && object.nodeType == 1;
171
- },
172
-
173
- isArray: function(object) {
174
- return object && object.constructor === Array;
175
- },
176
-
177
- isHash: function(object) {
178
- return object instanceof Hash;
179
- },
180
-
181
- isFunction: function(object) {
182
- return typeof object == "function";
183
- },
184
-
185
- isString: function(object) {
186
- return typeof object == "string";
187
- },
188
-
189
- isNumber: function(object) {
190
- return typeof object == "number";
191
- },
192
-
193
- isUndefined: function(object) {
194
- return typeof object == "undefined";
195
- }
196
- });
197
-
198
- Object.extend(Function.prototype, {
199
- argumentNames: function() {
200
- var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");
201
- return names.length == 1 && !names[0] ? [] : names;
202
- },
203
-
204
- bind: function() {
205
- if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
206
- var __method = this, args = $A(arguments), object = args.shift();
207
- return function() {
208
- return __method.apply(object, args.concat($A(arguments)));
209
- }
210
- },
211
-
212
- bindAsEventListener: function() {
213
- var __method = this, args = $A(arguments), object = args.shift();
214
- return function(event) {
215
- return __method.apply(object, [event || window.event].concat(args));
216
- }
217
- },
218
-
219
- curry: function() {
220
- if (!arguments.length) return this;
221
- var __method = this, args = $A(arguments);
222
- return function() {
223
- return __method.apply(this, args.concat($A(arguments)));
224
- }
225
- },
226
-
227
- delay: function() {
228
- var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
229
- return window.setTimeout(function() {
230
- return __method.apply(__method, args);
231
- }, timeout);
232
- },
233
-
234
- wrap: function(wrapper) {
235
- var __method = this;
236
- return function() {
237
- return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
238
- }
239
- },
240
-
241
- methodize: function() {
242
- if (this._methodized) return this._methodized;
243
- var __method = this;
244
- return this._methodized = function() {
245
- return __method.apply(null, [this].concat($A(arguments)));
246
- };
247
- }
248
- });
249
-
250
- Function.prototype.defer = Function.prototype.delay.curry(0.01);
251
-
252
- Date.prototype.toJSON = function() {
253
- return '"' + this.getUTCFullYear() + '-' +
254
- (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
255
- this.getUTCDate().toPaddedString(2) + 'T' +
256
- this.getUTCHours().toPaddedString(2) + ':' +
257
- this.getUTCMinutes().toPaddedString(2) + ':' +
258
- this.getUTCSeconds().toPaddedString(2) + 'Z"';
259
- };
260
-
261
- var Try = {
262
- these: function() {
263
- var returnValue;
264
-
265
- for (var i = 0, length = arguments.length; i < length; i++) {
266
- var lambda = arguments[i];
267
- try {
268
- returnValue = lambda();
269
- break;
270
- } catch (e) { }
271
- }
272
-
273
- return returnValue;
274
- }
275
- };
276
-
277
- RegExp.prototype.match = RegExp.prototype.test;
278
-
279
- RegExp.escape = function(str) {
280
- return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
281
- };
282
-
283
- /*--------------------------------------------------------------------------*/
284
-
285
- var PeriodicalExecuter = Class.create({
286
- initialize: function(callback, frequency) {
287
- this.callback = callback;
288
- this.frequency = frequency;
289
- this.currentlyExecuting = false;
290
-
291
- this.registerCallback();
292
- },
293
-
294
- registerCallback: function() {
295
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
296
- },
297
-
298
- execute: function() {
299
- this.callback(this);
300
- },
301
-
302
- stop: function() {
303
- if (!this.timer) return;
304
- clearInterval(this.timer);
305
- this.timer = null;
306
- },
307
-
308
- onTimerEvent: function() {
309
- if (!this.currentlyExecuting) {
310
- try {
311
- this.currentlyExecuting = true;
312
- this.execute();
313
- } finally {
314
- this.currentlyExecuting = false;
315
- }
316
- }
317
- }
318
- });
319
- Object.extend(String, {
320
- interpret: function(value) {
321
- return value == null ? '' : String(value);
322
- },
323
- specialChar: {
324
- '\b': '\\b',
325
- '\t': '\\t',
326
- '\n': '\\n',
327
- '\f': '\\f',
328
- '\r': '\\r',
329
- '\\': '\\\\'
330
- }
331
- });
332
-
333
- Object.extend(String.prototype, {
334
- gsub: function(pattern, replacement) {
335
- var result = '', source = this, match;
336
- replacement = arguments.callee.prepareReplacement(replacement);
337
-
338
- while (source.length > 0) {
339
- if (match = source.match(pattern)) {
340
- result += source.slice(0, match.index);
341
- result += String.interpret(replacement(match));
342
- source = source.slice(match.index + match[0].length);
343
- } else {
344
- result += source, source = '';
345
- }
346
- }
347
- return result;
348
- },
349
-
350
- sub: function(pattern, replacement, count) {
351
- replacement = this.gsub.prepareReplacement(replacement);
352
- count = Object.isUndefined(count) ? 1 : count;
353
-
354
- return this.gsub(pattern, function(match) {
355
- if (--count < 0) return match[0];
356
- return replacement(match);
357
- });
358
- },
359
-
360
- scan: function(pattern, iterator) {
361
- this.gsub(pattern, iterator);
362
- return String(this);
363
- },
364
-
365
- truncate: function(length, truncation) {
366
- length = length || 30;
367
- truncation = Object.isUndefined(truncation) ? '...' : truncation;
368
- return this.length > length ?
369
- this.slice(0, length - truncation.length) + truncation : String(this);
370
- },
371
-
372
- strip: function() {
373
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
374
- },
375
-
376
- stripTags: function() {
377
- return this.replace(/<\/?[^>]+>/gi, '');
378
- },
379
-
380
- stripScripts: function() {
381
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
382
- },
383
-
384
- extractScripts: function() {
385
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
386
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
387
- return (this.match(matchAll) || []).map(function(scriptTag) {
388
- return (scriptTag.match(matchOne) || ['', ''])[1];
389
- });
390
- },
391
-
392
- evalScripts: function() {
393
- return this.extractScripts().map(function(script) { return eval(script) });
394
- },
395
-
396
- escapeHTML: function() {
397
- var self = arguments.callee;
398
- self.text.data = this;
399
- return self.div.innerHTML;
400
- },
401
-
402
- unescapeHTML: function() {
403
- var div = new Element('div');
404
- div.innerHTML = this.stripTags();
405
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
406
- $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
407
- div.childNodes[0].nodeValue) : '';
408
- },
409
-
410
- toQueryParams: function(separator) {
411
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
412
- if (!match) return { };
413
-
414
- return match[1].split(separator || '&').inject({ }, function(hash, pair) {
415
- if ((pair = pair.split('='))[0]) {
416
- var key = decodeURIComponent(pair.shift());
417
- var value = pair.length > 1 ? pair.join('=') : pair[0];
418
- if (value != undefined) value = decodeURIComponent(value);
419
-
420
- if (key in hash) {
421
- if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
422
- hash[key].push(value);
423
- }
424
- else hash[key] = value;
425
- }
426
- return hash;
427
- });
428
- },
429
-
430
- toArray: function() {
431
- return this.split('');
432
- },
433
-
434
- succ: function() {
435
- return this.slice(0, this.length - 1) +
436
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
437
- },
438
-
439
- times: function(count) {
440
- return count < 1 ? '' : new Array(count + 1).join(this);
441
- },
442
-
443
- camelize: function() {
444
- var parts = this.split('-'), len = parts.length;
445
- if (len == 1) return parts[0];
446
-
447
- var camelized = this.charAt(0) == '-'
448
- ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
449
- : parts[0];
450
-
451
- for (var i = 1; i < len; i++)
452
- camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
453
-
454
- return camelized;
455
- },
456
-
457
- capitalize: function() {
458
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
459
- },
460
-
461
- underscore: function() {
462
- return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
463
- },
464
-
465
- dasherize: function() {
466
- return this.gsub(/_/,'-');
467
- },
468
-
469
- inspect: function(useDoubleQuotes) {
470
- var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
471
- var character = String.specialChar[match[0]];
472
- return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
473
- });
474
- if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
475
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
476
- },
477
-
478
- toJSON: function() {
479
- return this.inspect(true);
480
- },
481
-
482
- unfilterJSON: function(filter) {
483
- return this.sub(filter || Prototype.JSONFilter, '#{1}');
484
- },
485
-
486
- isJSON: function() {
487
- var str = this;
488
- if (str.blank()) return false;
489
- str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
490
- return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
491
- },
492
-
493
- evalJSON: function(sanitize) {
494
- var json = this.unfilterJSON();
495
- try {
496
- if (!sanitize || json.isJSON()) return eval('(' + json + ')');
497
- } catch (e) { }
498
- throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
499
- },
500
-
501
- include: function(pattern) {
502
- return this.indexOf(pattern) > -1;
503
- },
504
-
505
- startsWith: function(pattern) {
506
- return this.indexOf(pattern) === 0;
507
- },
508
-
509
- endsWith: function(pattern) {
510
- var d = this.length - pattern.length;
511
- return d >= 0 && this.lastIndexOf(pattern) === d;
512
- },
513
-
514
- empty: function() {
515
- return this == '';
516
- },
517
-
518
- blank: function() {
519
- return /^\s*$/.test(this);
520
- },
521
-
522
- interpolate: function(object, pattern) {
523
- return new Template(this, pattern).evaluate(object);
524
- }
525
- });
526
-
527
- if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
528
- escapeHTML: function() {
529
- return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
530
- },
531
- unescapeHTML: function() {
532
- return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
533
- }
534
- });
535
-
536
- String.prototype.gsub.prepareReplacement = function(replacement) {
537
- if (Object.isFunction(replacement)) return replacement;
538
- var template = new Template(replacement);
539
- return function(match) { return template.evaluate(match) };
540
- };
541
-
542
- String.prototype.parseQuery = String.prototype.toQueryParams;
543
-
544
- Object.extend(String.prototype.escapeHTML, {
545
- div: document.createElement('div'),
546
- text: document.createTextNode('')
547
- });
548
-
549
- with (String.prototype.escapeHTML) div.appendChild(text);
550
-
551
- var Template = Class.create({
552
- initialize: function(template, pattern) {
553
- this.template = template.toString();
554
- this.pattern = pattern || Template.Pattern;
555
- },
556
-
557
- evaluate: function(object) {
558
- if (Object.isFunction(object.toTemplateReplacements))
559
- object = object.toTemplateReplacements();
560
-
561
- return this.template.gsub(this.pattern, function(match) {
562
- if (object == null) return '';
563
-
564
- var before = match[1] || '';
565
- if (before == '\\') return match[2];
566
-
567
- var ctx = object, expr = match[3];
568
- var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
569
- match = pattern.exec(expr);
570
- if (match == null) return before;
571
-
572
- while (match != null) {
573
- var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
574
- ctx = ctx[comp];
575
- if (null == ctx || '' == match[3]) break;
576
- expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
577
- match = pattern.exec(expr);
578
- }
579
-
580
- return before + String.interpret(ctx);
581
- }.bind(this));
582
- }
583
- });
584
- Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
585
-
586
- var $break = { };
587
-
588
- var Enumerable = {
589
- each: function(iterator, context) {
590
- var index = 0;
591
- iterator = iterator.bind(context);
592
- try {
593
- this._each(function(value) {
594
- iterator(value, index++);
595
- });
596
- } catch (e) {
597
- if (e != $break) throw e;
598
- }
599
- return this;
600
- },
601
-
602
- eachSlice: function(number, iterator, context) {
603
- iterator = iterator ? iterator.bind(context) : Prototype.K;
604
- var index = -number, slices = [], array = this.toArray();
605
- while ((index += number) < array.length)
606
- slices.push(array.slice(index, index+number));
607
- return slices.collect(iterator, context);
608
- },
609
-
610
- all: function(iterator, context) {
611
- iterator = iterator ? iterator.bind(context) : Prototype.K;
612
- var result = true;
613
- this.each(function(value, index) {
614
- result = result && !!iterator(value, index);
615
- if (!result) throw $break;
616
- });
617
- return result;
618
- },
619
-
620
- any: function(iterator, context) {
621
- iterator = iterator ? iterator.bind(context) : Prototype.K;
622
- var result = false;
623
- this.each(function(value, index) {
624
- if (result = !!iterator(value, index))
625
- throw $break;
626
- });
627
- return result;
628
- },
629
-
630
- collect: function(iterator, context) {
631
- iterator = iterator ? iterator.bind(context) : Prototype.K;
632
- var results = [];
633
- this.each(function(value, index) {
634
- results.push(iterator(value, index));
635
- });
636
- return results;
637
- },
638
-
639
- detect: function(iterator, context) {
640
- iterator = iterator.bind(context);
641
- var result;
642
- this.each(function(value, index) {
643
- if (iterator(value, index)) {
644
- result = value;
645
- throw $break;
646
- }
647
- });
648
- return result;
649
- },
650
-
651
- findAll: function(iterator, context) {
652
- iterator = iterator.bind(context);
653
- var results = [];
654
- this.each(function(value, index) {
655
- if (iterator(value, index))
656
- results.push(value);
657
- });
658
- return results;
659
- },
660
-
661
- grep: function(filter, iterator, context) {
662
- iterator = iterator ? iterator.bind(context) : Prototype.K;
663
- var results = [];
664
-
665
- if (Object.isString(filter))
666
- filter = new RegExp(filter);
667
-
668
- this.each(function(value, index) {
669
- if (filter.match(value))
670
- results.push(iterator(value, index));
671
- });
672
- return results;
673
- },
674
-
675
- include: function(object) {
676
- if (Object.isFunction(this.indexOf))
677
- if (this.indexOf(object) != -1) return true;
678
-
679
- var found = false;
680
- this.each(function(value) {
681
- if (value == object) {
682
- found = true;
683
- throw $break;
684
- }
685
- });
686
- return found;
687
- },
688
-
689
- inGroupsOf: function(number, fillWith) {
690
- fillWith = Object.isUndefined(fillWith) ? null : fillWith;
691
- return this.eachSlice(number, function(slice) {
692
- while(slice.length < number) slice.push(fillWith);
693
- return slice;
694
- });
695
- },
696
-
697
- inject: function(memo, iterator, context) {
698
- iterator = iterator.bind(context);
699
- this.each(function(value, index) {
700
- memo = iterator(memo, value, index);
701
- });
702
- return memo;
703
- },
704
-
705
- invoke: function(method) {
706
- var args = $A(arguments).slice(1);
707
- return this.map(function(value) {
708
- return value[method].apply(value, args);
709
- });
710
- },
711
-
712
- max: function(iterator, context) {
713
- iterator = iterator ? iterator.bind(context) : Prototype.K;
714
- var result;
715
- this.each(function(value, index) {
716
- value = iterator(value, index);
717
- if (result == null || value >= result)
718
- result = value;
719
- });
720
- return result;
721
- },
722
-
723
- min: function(iterator, context) {
724
- iterator = iterator ? iterator.bind(context) : Prototype.K;
725
- var result;
726
- this.each(function(value, index) {
727
- value = iterator(value, index);
728
- if (result == null || value < result)
729
- result = value;
730
- });
731
- return result;
732
- },
733
-
734
- partition: function(iterator, context) {
735
- iterator = iterator ? iterator.bind(context) : Prototype.K;
736
- var trues = [], falses = [];
737
- this.each(function(value, index) {
738
- (iterator(value, index) ?
739
- trues : falses).push(value);
740
- });
741
- return [trues, falses];
742
- },
743
-
744
- pluck: function(property) {
745
- var results = [];
746
- this.each(function(value) {
747
- results.push(value[property]);
748
- });
749
- return results;
750
- },
751
-
752
- reject: function(iterator, context) {
753
- iterator = iterator.bind(context);
754
- var results = [];
755
- this.each(function(value, index) {
756
- if (!iterator(value, index))
757
- results.push(value);
758
- });
759
- return results;
760
- },
761
-
762
- sortBy: function(iterator, context) {
763
- iterator = iterator.bind(context);
764
- return this.map(function(value, index) {
765
- return {value: value, criteria: iterator(value, index)};
766
- }).sort(function(left, right) {
767
- var a = left.criteria, b = right.criteria;
768
- return a < b ? -1 : a > b ? 1 : 0;
769
- }).pluck('value');
770
- },
771
-
772
- toArray: function() {
773
- return this.map();
774
- },
775
-
776
- zip: function() {
777
- var iterator = Prototype.K, args = $A(arguments);
778
- if (Object.isFunction(args.last()))
779
- iterator = args.pop();
780
-
781
- var collections = [this].concat(args).map($A);
782
- return this.map(function(value, index) {
783
- return iterator(collections.pluck(index));
784
- });
785
- },
786
-
787
- size: function() {
788
- return this.toArray().length;
789
- },
790
-
791
- inspect: function() {
792
- return '#<Enumerable:' + this.toArray().inspect() + '>';
793
- }
794
- };
795
-
796
- Object.extend(Enumerable, {
797
- map: Enumerable.collect,
798
- find: Enumerable.detect,
799
- select: Enumerable.findAll,
800
- filter: Enumerable.findAll,
801
- member: Enumerable.include,
802
- entries: Enumerable.toArray,
803
- every: Enumerable.all,
804
- some: Enumerable.any
805
- });
806
- function $A(iterable) {
807
- if (!iterable) return [];
808
- if (iterable.toArray) return iterable.toArray();
809
- var length = iterable.length, results = new Array(length);
810
- while (length--) results[length] = iterable[length];
811
- return results;
812
- }
813
-
814
- if (Prototype.Browser.WebKit) {
815
- function $A(iterable) {
816
- if (!iterable) return [];
817
- if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
818
- iterable.toArray) return iterable.toArray();
819
- var length = iterable.length, results = new Array(length);
820
- while (length--) results[length] = iterable[length];
821
- return results;
822
- }
823
- }
824
-
825
- Array.from = $A;
826
-
827
- Object.extend(Array.prototype, Enumerable);
828
-
829
- if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
830
-
831
- Object.extend(Array.prototype, {
832
- _each: function(iterator) {
833
- for (var i = 0, length = this.length; i < length; i++)
834
- iterator(this[i]);
835
- },
836
-
837
- clear: function() {
838
- this.length = 0;
839
- return this;
840
- },
841
-
842
- first: function() {
843
- return this[0];
844
- },
845
-
846
- last: function() {
847
- return this[this.length - 1];
848
- },
849
-
850
- compact: function() {
851
- return this.select(function(value) {
852
- return value != null;
853
- });
854
- },
855
-
856
- flatten: function() {
857
- return this.inject([], function(array, value) {
858
- return array.concat(Object.isArray(value) ?
859
- value.flatten() : [value]);
860
- });
861
- },
862
-
863
- without: function() {
864
- var values = $A(arguments);
865
- return this.select(function(value) {
866
- return !values.include(value);
867
- });
868
- },
869
-
870
- reverse: function(inline) {
871
- return (inline !== false ? this : this.toArray())._reverse();
872
- },
873
-
874
- reduce: function() {
875
- return this.length > 1 ? this : this[0];
876
- },
877
-
878
- uniq: function(sorted) {
879
- return this.inject([], function(array, value, index) {
880
- if (0 == index || (sorted ? array.last() != value : !array.include(value)))
881
- array.push(value);
882
- return array;
883
- });
884
- },
885
-
886
- intersect: function(array) {
887
- return this.uniq().findAll(function(item) {
888
- return array.detect(function(value) { return item === value });
889
- });
890
- },
891
-
892
- clone: function() {
893
- return [].concat(this);
894
- },
895
-
896
- size: function() {
897
- return this.length;
898
- },
899
-
900
- inspect: function() {
901
- return '[' + this.map(Object.inspect).join(', ') + ']';
902
- },
903
-
904
- toJSON: function() {
905
- var results = [];
906
- this.each(function(object) {
907
- var value = Object.toJSON(object);
908
- if (!Object.isUndefined(value)) results.push(value);
909
- });
910
- return '[' + results.join(', ') + ']';
911
- }
912
- });
913
-
914
- // use native browser JS 1.6 implementation if available
915
- if (Object.isFunction(Array.prototype.forEach))
916
- Array.prototype._each = Array.prototype.forEach;
917
-
918
- if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
919
- i || (i = 0);
920
- var length = this.length;
921
- if (i < 0) i = length + i;
922
- for (; i < length; i++)
923
- if (this[i] === item) return i;
924
- return -1;
925
- };
926
-
927
- if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
928
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
929
- var n = this.slice(0, i).reverse().indexOf(item);
930
- return (n < 0) ? n : i - n - 1;
931
- };
932
-
933
- Array.prototype.toArray = Array.prototype.clone;
934
-
935
- function $w(string) {
936
- if (!Object.isString(string)) return [];
937
- string = string.strip();
938
- return string ? string.split(/\s+/) : [];
939
- }
940
-
941
- if (Prototype.Browser.Opera){
942
- Array.prototype.concat = function() {
943
- var array = [];
944
- for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
945
- for (var i = 0, length = arguments.length; i < length; i++) {
946
- if (Object.isArray(arguments[i])) {
947
- for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
948
- array.push(arguments[i][j]);
949
- } else {
950
- array.push(arguments[i]);
951
- }
952
- }
953
- return array;
954
- };
955
- }
956
- Object.extend(Number.prototype, {
957
- toColorPart: function() {
958
- return this.toPaddedString(2, 16);
959
- },
960
-
961
- succ: function() {
962
- return this + 1;
963
- },
964
-
965
- times: function(iterator) {
966
- $R(0, this, true).each(iterator);
967
- return this;
968
- },
969
-
970
- toPaddedString: function(length, radix) {
971
- var string = this.toString(radix || 10);
972
- return '0'.times(length - string.length) + string;
973
- },
974
-
975
- toJSON: function() {
976
- return isFinite(this) ? this.toString() : 'null';
977
- }
978
- });
979
-
980
- $w('abs round ceil floor').each(function(method){
981
- Number.prototype[method] = Math[method].methodize();
982
- });
983
- function $H(object) {
984
- return new Hash(object);
985
- };
986
-
987
- var Hash = Class.create(Enumerable, (function() {
988
-
989
- function toQueryPair(key, value) {
990
- if (Object.isUndefined(value)) return key;
991
- return key + '=' + encodeURIComponent(String.interpret(value));
992
- }
993
-
994
- return {
995
- initialize: function(object) {
996
- this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
997
- },
998
-
999
- _each: function(iterator) {
1000
- for (var key in this._object) {
1001
- var value = this._object[key], pair = [key, value];
1002
- pair.key = key;
1003
- pair.value = value;
1004
- iterator(pair);
1005
- }
1006
- },
1007
-
1008
- set: function(key, value) {
1009
- return this._object[key] = value;
1010
- },
1011
-
1012
- get: function(key) {
1013
- return this._object[key];
1014
- },
1015
-
1016
- unset: function(key) {
1017
- var value = this._object[key];
1018
- delete this._object[key];
1019
- return value;
1020
- },
1021
-
1022
- toObject: function() {
1023
- return Object.clone(this._object);
1024
- },
1025
-
1026
- keys: function() {
1027
- return this.pluck('key');
1028
- },
1029
-
1030
- values: function() {
1031
- return this.pluck('value');
1032
- },
1033
-
1034
- index: function(value) {
1035
- var match = this.detect(function(pair) {
1036
- return pair.value === value;
1037
- });
1038
- return match && match.key;
1039
- },
1040
-
1041
- merge: function(object) {
1042
- return this.clone().update(object);
1043
- },
1044
-
1045
- update: function(object) {
1046
- return new Hash(object).inject(this, function(result, pair) {
1047
- result.set(pair.key, pair.value);
1048
- return result;
1049
- });
1050
- },
1051
-
1052
- toQueryString: function() {
1053
- return this.map(function(pair) {
1054
- var key = encodeURIComponent(pair.key), values = pair.value;
1055
-
1056
- if (values && typeof values == 'object') {
1057
- if (Object.isArray(values))
1058
- return values.map(toQueryPair.curry(key)).join('&');
1059
- }
1060
- return toQueryPair(key, values);
1061
- }).join('&');
1062
- },
1063
-
1064
- inspect: function() {
1065
- return '#<Hash:{' + this.map(function(pair) {
1066
- return pair.map(Object.inspect).join(': ');
1067
- }).join(', ') + '}>';
1068
- },
1069
-
1070
- toJSON: function() {
1071
- return Object.toJSON(this.toObject());
1072
- },
1073
-
1074
- clone: function() {
1075
- return new Hash(this);
1076
- }
1077
- }
1078
- })());
1079
-
1080
- Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
1081
- Hash.from = $H;
1082
- var ObjectRange = Class.create(Enumerable, {
1083
- initialize: function(start, end, exclusive) {
1084
- this.start = start;
1085
- this.end = end;
1086
- this.exclusive = exclusive;
1087
- },
1088
-
1089
- _each: function(iterator) {
1090
- var value = this.start;
1091
- while (this.include(value)) {
1092
- iterator(value);
1093
- value = value.succ();
1094
- }
1095
- },
1096
-
1097
- include: function(value) {
1098
- if (value < this.start)
1099
- return false;
1100
- if (this.exclusive)
1101
- return value < this.end;
1102
- return value <= this.end;
1103
- }
1104
- });
1105
-
1106
- var $R = function(start, end, exclusive) {
1107
- return new ObjectRange(start, end, exclusive);
1108
- };
1109
-
1110
- var Ajax = {
1111
- getTransport: function() {
1112
- return Try.these(
1113
- function() {return new XMLHttpRequest()},
1114
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
1115
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
1116
- ) || false;
1117
- },
1118
-
1119
- activeRequestCount: 0
1120
- };
1121
-
1122
- Ajax.Responders = {
1123
- responders: [],
1124
-
1125
- _each: function(iterator) {
1126
- this.responders._each(iterator);
1127
- },
1128
-
1129
- register: function(responder) {
1130
- if (!this.include(responder))
1131
- this.responders.push(responder);
1132
- },
1133
-
1134
- unregister: function(responder) {
1135
- this.responders = this.responders.without(responder);
1136
- },
1137
-
1138
- dispatch: function(callback, request, transport, json) {
1139
- this.each(function(responder) {
1140
- if (Object.isFunction(responder[callback])) {
1141
- try {
1142
- responder[callback].apply(responder, [request, transport, json]);
1143
- } catch (e) { }
1144
- }
1145
- });
1146
- }
1147
- };
1148
-
1149
- Object.extend(Ajax.Responders, Enumerable);
1150
-
1151
- Ajax.Responders.register({
1152
- onCreate: function() { Ajax.activeRequestCount++ },
1153
- onComplete: function() { Ajax.activeRequestCount-- }
1154
- });
1155
-
1156
- Ajax.Base = Class.create({
1157
- initialize: function(options) {
1158
- this.options = {
1159
- method: 'post',
1160
- asynchronous: true,
1161
- contentType: 'application/x-www-form-urlencoded',
1162
- encoding: 'UTF-8',
1163
- parameters: '',
1164
- evalJSON: true,
1165
- evalJS: true
1166
- };
1167
- Object.extend(this.options, options || { });
1168
-
1169
- this.options.method = this.options.method.toLowerCase();
1170
-
1171
- if (Object.isString(this.options.parameters))
1172
- this.options.parameters = this.options.parameters.toQueryParams();
1173
- else if (Object.isHash(this.options.parameters))
1174
- this.options.parameters = this.options.parameters.toObject();
1175
- }
1176
- });
1177
-
1178
- Ajax.Request = Class.create(Ajax.Base, {
1179
- _complete: false,
1180
-
1181
- initialize: function($super, url, options) {
1182
- $super(options);
1183
- this.transport = Ajax.getTransport();
1184
- this.request(url);
1185
- },
1186
-
1187
- request: function(url) {
1188
- this.url = url;
1189
- this.method = this.options.method;
1190
- var params = Object.clone(this.options.parameters);
1191
-
1192
- if (!['get', 'post'].include(this.method)) {
1193
- // simulate other verbs over post
1194
- params['_method'] = this.method;
1195
- this.method = 'post';
1196
- }
1197
-
1198
- this.parameters = params;
1199
-
1200
- if (params = Object.toQueryString(params)) {
1201
- // when GET, append parameters to URL
1202
- if (this.method == 'get')
1203
- this.url += (this.url.include('?') ? '&' : '?') + params;
1204
- else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
1205
- params += '&_=';
1206
- }
1207
-
1208
- try {
1209
- var response = new Ajax.Response(this);
1210
- if (this.options.onCreate) this.options.onCreate(response);
1211
- Ajax.Responders.dispatch('onCreate', this, response);
1212
-
1213
- this.transport.open(this.method.toUpperCase(), this.url,
1214
- this.options.asynchronous);
1215
-
1216
- if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
1217
-
1218
- this.transport.onreadystatechange = this.onStateChange.bind(this);
1219
- this.setRequestHeaders();
1220
-
1221
- this.body = this.method == 'post' ? (this.options.postBody || params) : null;
1222
- this.transport.send(this.body);
1223
-
1224
- /* Force Firefox to handle ready state 4 for synchronous requests */
1225
- if (!this.options.asynchronous && this.transport.overrideMimeType)
1226
- this.onStateChange();
1227
-
1228
- }
1229
- catch (e) {
1230
- this.dispatchException(e);
1231
- }
1232
- },
1233
-
1234
- onStateChange: function() {
1235
- var readyState = this.transport.readyState;
1236
- if (readyState > 1 && !((readyState == 4) && this._complete))
1237
- this.respondToReadyState(this.transport.readyState);
1238
- },
1239
-
1240
- setRequestHeaders: function() {
1241
- var headers = {
1242
- 'X-Requested-With': 'XMLHttpRequest',
1243
- 'X-Prototype-Version': Prototype.Version,
1244
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
1245
- };
1246
-
1247
- if (this.method == 'post') {
1248
- headers['Content-type'] = this.options.contentType +
1249
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
1250
-
1251
- /* Force "Connection: close" for older Mozilla browsers to work
1252
- * around a bug where XMLHttpRequest sends an incorrect
1253
- * Content-length header. See Mozilla Bugzilla #246651.
1254
- */
1255
- if (this.transport.overrideMimeType &&
1256
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
1257
- headers['Connection'] = 'close';
1258
- }
1259
-
1260
- // user-defined headers
1261
- if (typeof this.options.requestHeaders == 'object') {
1262
- var extras = this.options.requestHeaders;
1263
-
1264
- if (Object.isFunction(extras.push))
1265
- for (var i = 0, length = extras.length; i < length; i += 2)
1266
- headers[extras[i]] = extras[i+1];
1267
- else
1268
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
1269
- }
1270
-
1271
- for (var name in headers)
1272
- this.transport.setRequestHeader(name, headers[name]);
1273
- },
1274
-
1275
- success: function() {
1276
- var status = this.getStatus();
1277
- return !status || (status >= 200 && status < 300);
1278
- },
1279
-
1280
- getStatus: function() {
1281
- try {
1282
- return this.transport.status || 0;
1283
- } catch (e) { return 0 }
1284
- },
1285
-
1286
- respondToReadyState: function(readyState) {
1287
- var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
1288
-
1289
- if (state == 'Complete') {
1290
- try {
1291
- this._complete = true;
1292
- (this.options['on' + response.status]
1293
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
1294
- || Prototype.emptyFunction)(response, response.headerJSON);
1295
- } catch (e) {
1296
- this.dispatchException(e);
1297
- }
1298
-
1299
- var contentType = response.getHeader('Content-type');
1300
- if (this.options.evalJS == 'force'
1301
- || (this.options.evalJS && contentType
1302
- && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
1303
- this.evalResponse();
1304
- }
1305
-
1306
- try {
1307
- (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
1308
- Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
1309
- } catch (e) {
1310
- this.dispatchException(e);
1311
- }
1312
-
1313
- if (state == 'Complete') {
1314
- // avoid memory leak in MSIE: clean up
1315
- this.transport.onreadystatechange = Prototype.emptyFunction;
1316
- }
1317
- },
1318
-
1319
- getHeader: function(name) {
1320
- try {
1321
- return this.transport.getResponseHeader(name);
1322
- } catch (e) { return null }
1323
- },
1324
-
1325
- evalResponse: function() {
1326
- try {
1327
- return eval((this.transport.responseText || '').unfilterJSON());
1328
- } catch (e) {
1329
- this.dispatchException(e);
1330
- }
1331
- },
1332
-
1333
- dispatchException: function(exception) {
1334
- (this.options.onException || Prototype.emptyFunction)(this, exception);
1335
- Ajax.Responders.dispatch('onException', this, exception);
1336
- }
1337
- });
1338
-
1339
- Ajax.Request.Events =
1340
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
1341
-
1342
- Ajax.Response = Class.create({
1343
- initialize: function(request){
1344
- this.request = request;
1345
- var transport = this.transport = request.transport,
1346
- readyState = this.readyState = transport.readyState;
1347
-
1348
- if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
1349
- this.status = this.getStatus();
1350
- this.statusText = this.getStatusText();
1351
- this.responseText = String.interpret(transport.responseText);
1352
- this.headerJSON = this._getHeaderJSON();
1353
- }
1354
-
1355
- if(readyState == 4) {
1356
- var xml = transport.responseXML;
1357
- this.responseXML = Object.isUndefined(xml) ? null : xml;
1358
- this.responseJSON = this._getResponseJSON();
1359
- }
1360
- },
1361
-
1362
- status: 0,
1363
- statusText: '',
1364
-
1365
- getStatus: Ajax.Request.prototype.getStatus,
1366
-
1367
- getStatusText: function() {
1368
- try {
1369
- return this.transport.statusText || '';
1370
- } catch (e) { return '' }
1371
- },
1372
-
1373
- getHeader: Ajax.Request.prototype.getHeader,
1374
-
1375
- getAllHeaders: function() {
1376
- try {
1377
- return this.getAllResponseHeaders();
1378
- } catch (e) { return null }
1379
- },
1380
-
1381
- getResponseHeader: function(name) {
1382
- return this.transport.getResponseHeader(name);
1383
- },
1384
-
1385
- getAllResponseHeaders: function() {
1386
- return this.transport.getAllResponseHeaders();
1387
- },
1388
-
1389
- _getHeaderJSON: function() {
1390
- var json = this.getHeader('X-JSON');
1391
- if (!json) return null;
1392
- json = decodeURIComponent(escape(json));
1393
- try {
1394
- return json.evalJSON(this.request.options.sanitizeJSON);
1395
- } catch (e) {
1396
- this.request.dispatchException(e);
1397
- }
1398
- },
1399
-
1400
- _getResponseJSON: function() {
1401
- var options = this.request.options;
1402
- if (!options.evalJSON || (options.evalJSON != 'force' &&
1403
- !(this.getHeader('Content-type') || '').include('application/json')) ||
1404
- this.responseText.blank())
1405
- return null;
1406
- try {
1407
- return this.responseText.evalJSON(options.sanitizeJSON);
1408
- } catch (e) {
1409
- this.request.dispatchException(e);
1410
- }
1411
- }
1412
- });
1413
-
1414
- Ajax.Updater = Class.create(Ajax.Request, {
1415
- initialize: function($super, container, url, options) {
1416
- this.container = {
1417
- success: (container.success || container),
1418
- failure: (container.failure || (container.success ? null : container))
1419
- };
1420
-
1421
- options = Object.clone(options);
1422
- var onComplete = options.onComplete;
1423
- options.onComplete = (function(response, json) {
1424
- this.updateContent(response.responseText);
1425
- if (Object.isFunction(onComplete)) onComplete(response, json);
1426
- }).bind(this);
1427
-
1428
- $super(url, options);
1429
- },
1430
-
1431
- updateContent: function(responseText) {
1432
- var receiver = this.container[this.success() ? 'success' : 'failure'],
1433
- options = this.options;
1434
-
1435
- if (!options.evalScripts) responseText = responseText.stripScripts();
1436
-
1437
- if (receiver = $(receiver)) {
1438
- if (options.insertion) {
1439
- if (Object.isString(options.insertion)) {
1440
- var insertion = { }; insertion[options.insertion] = responseText;
1441
- receiver.insert(insertion);
1442
- }
1443
- else options.insertion(receiver, responseText);
1444
- }
1445
- else receiver.update(responseText);
1446
- }
1447
- }
1448
- });
1449
-
1450
- Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
1451
- initialize: function($super, container, url, options) {
1452
- $super(options);
1453
- this.onComplete = this.options.onComplete;
1454
-
1455
- this.frequency = (this.options.frequency || 2);
1456
- this.decay = (this.options.decay || 1);
1457
-
1458
- this.updater = { };
1459
- this.container = container;
1460
- this.url = url;
1461
-
1462
- this.start();
1463
- },
1464
-
1465
- start: function() {
1466
- this.options.onComplete = this.updateComplete.bind(this);
1467
- this.onTimerEvent();
1468
- },
1469
-
1470
- stop: function() {
1471
- this.updater.options.onComplete = undefined;
1472
- clearTimeout(this.timer);
1473
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
1474
- },
1475
-
1476
- updateComplete: function(response) {
1477
- if (this.options.decay) {
1478
- this.decay = (response.responseText == this.lastText ?
1479
- this.decay * this.options.decay : 1);
1480
-
1481
- this.lastText = response.responseText;
1482
- }
1483
- this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
1484
- },
1485
-
1486
- onTimerEvent: function() {
1487
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
1488
- }
1489
- });
1490
- function $(element) {
1491
- if (arguments.length > 1) {
1492
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
1493
- elements.push($(arguments[i]));
1494
- return elements;
1495
- }
1496
- if (Object.isString(element))
1497
- element = document.getElementById(element);
1498
- return Element.extend(element);
1499
- }
1500
-
1501
- if (Prototype.BrowserFeatures.XPath) {
1502
- document._getElementsByXPath = function(expression, parentElement) {
1503
- var results = [];
1504
- var query = document.evaluate(expression, $(parentElement) || document,
1505
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
1506
- for (var i = 0, length = query.snapshotLength; i < length; i++)
1507
- results.push(Element.extend(query.snapshotItem(i)));
1508
- return results;
1509
- };
1510
- }
1511
-
1512
- /*--------------------------------------------------------------------------*/
1513
-
1514
- if (!window.Node) var Node = { };
1515
-
1516
- if (!Node.ELEMENT_NODE) {
1517
- // DOM level 2 ECMAScript Language Binding
1518
- Object.extend(Node, {
1519
- ELEMENT_NODE: 1,
1520
- ATTRIBUTE_NODE: 2,
1521
- TEXT_NODE: 3,
1522
- CDATA_SECTION_NODE: 4,
1523
- ENTITY_REFERENCE_NODE: 5,
1524
- ENTITY_NODE: 6,
1525
- PROCESSING_INSTRUCTION_NODE: 7,
1526
- COMMENT_NODE: 8,
1527
- DOCUMENT_NODE: 9,
1528
- DOCUMENT_TYPE_NODE: 10,
1529
- DOCUMENT_FRAGMENT_NODE: 11,
1530
- NOTATION_NODE: 12
1531
- });
1532
- }
1533
-
1534
- (function() {
1535
- var element = this.Element;
1536
- this.Element = function(tagName, attributes) {
1537
- attributes = attributes || { };
1538
- tagName = tagName.toLowerCase();
1539
- var cache = Element.cache;
1540
- if (Prototype.Browser.IE && attributes.name) {
1541
- tagName = '<' + tagName + ' name="' + attributes.name + '">';
1542
- delete attributes.name;
1543
- return Element.writeAttribute(document.createElement(tagName), attributes);
1544
- }
1545
- if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
1546
- return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
1547
- };
1548
- Object.extend(this.Element, element || { });
1549
- }).call(window);
1550
-
1551
- Element.cache = { };
1552
-
1553
- Element.Methods = {
1554
- visible: function(element) {
1555
- return $(element).style.display != 'none';
1556
- },
1557
-
1558
- toggle: function(element) {
1559
- element = $(element);
1560
- Element[Element.visible(element) ? 'hide' : 'show'](element);
1561
- return element;
1562
- },
1563
-
1564
- hide: function(element) {
1565
- $(element).style.display = 'none';
1566
- return element;
1567
- },
1568
-
1569
- show: function(element) {
1570
- $(element).style.display = '';
1571
- return element;
1572
- },
1573
-
1574
- remove: function(element) {
1575
- element = $(element);
1576
- element.parentNode.removeChild(element);
1577
- return element;
1578
- },
1579
-
1580
- update: function(element, content) {
1581
- element = $(element);
1582
- if (content && content.toElement) content = content.toElement();
1583
- if (Object.isElement(content)) return element.update().insert(content);
1584
- content = Object.toHTML(content);
1585
- element.innerHTML = content.stripScripts();
1586
- content.evalScripts.bind(content).defer();
1587
- return element;
1588
- },
1589
-
1590
- replace: function(element, content) {
1591
- element = $(element);
1592
- if (content && content.toElement) content = content.toElement();
1593
- else if (!Object.isElement(content)) {
1594
- content = Object.toHTML(content);
1595
- var range = element.ownerDocument.createRange();
1596
- range.selectNode(element);
1597
- content.evalScripts.bind(content).defer();
1598
- content = range.createContextualFragment(content.stripScripts());
1599
- }
1600
- element.parentNode.replaceChild(content, element);
1601
- return element;
1602
- },
1603
-
1604
- insert: function(element, insertions) {
1605
- element = $(element);
1606
-
1607
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
1608
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
1609
- insertions = {bottom:insertions};
1610
-
1611
- var content, t, range;
1612
-
1613
- for (position in insertions) {
1614
- content = insertions[position];
1615
- position = position.toLowerCase();
1616
- t = Element._insertionTranslations[position];
1617
-
1618
- if (content && content.toElement) content = content.toElement();
1619
- if (Object.isElement(content)) {
1620
- t.insert(element, content);
1621
- continue;
1622
- }
1623
-
1624
- content = Object.toHTML(content);
1625
-
1626
- range = element.ownerDocument.createRange();
1627
- t.initializeRange(element, range);
1628
- t.insert(element, range.createContextualFragment(content.stripScripts()));
1629
-
1630
- content.evalScripts.bind(content).defer();
1631
- }
1632
-
1633
- return element;
1634
- },
1635
-
1636
- wrap: function(element, wrapper, attributes) {
1637
- element = $(element);
1638
- if (Object.isElement(wrapper))
1639
- $(wrapper).writeAttribute(attributes || { });
1640
- else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
1641
- else wrapper = new Element('div', wrapper);
1642
- if (element.parentNode)
1643
- element.parentNode.replaceChild(wrapper, element);
1644
- wrapper.appendChild(element);
1645
- return wrapper;
1646
- },
1647
-
1648
- inspect: function(element) {
1649
- element = $(element);
1650
- var result = '<' + element.tagName.toLowerCase();
1651
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
1652
- var property = pair.first(), attribute = pair.last();
1653
- var value = (element[property] || '').toString();
1654
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
1655
- });
1656
- return result + '>';
1657
- },
1658
-
1659
- recursivelyCollect: function(element, property) {
1660
- element = $(element);
1661
- var elements = [];
1662
- while (element = element[property])
1663
- if (element.nodeType == 1)
1664
- elements.push(Element.extend(element));
1665
- return elements;
1666
- },
1667
-
1668
- ancestors: function(element) {
1669
- return $(element).recursivelyCollect('parentNode');
1670
- },
1671
-
1672
- descendants: function(element) {
1673
- return $(element).getElementsBySelector("*");
1674
- },
1675
-
1676
- firstDescendant: function(element) {
1677
- element = $(element).firstChild;
1678
- while (element && element.nodeType != 1) element = element.nextSibling;
1679
- return $(element);
1680
- },
1681
-
1682
- immediateDescendants: function(element) {
1683
- if (!(element = $(element).firstChild)) return [];
1684
- while (element && element.nodeType != 1) element = element.nextSibling;
1685
- if (element) return [element].concat($(element).nextSiblings());
1686
- return [];
1687
- },
1688
-
1689
- previousSiblings: function(element) {
1690
- return $(element).recursivelyCollect('previousSibling');
1691
- },
1692
-
1693
- nextSiblings: function(element) {
1694
- return $(element).recursivelyCollect('nextSibling');
1695
- },
1696
-
1697
- siblings: function(element) {
1698
- element = $(element);
1699
- return element.previousSiblings().reverse().concat(element.nextSiblings());
1700
- },
1701
-
1702
- match: function(element, selector) {
1703
- if (Object.isString(selector))
1704
- selector = new Selector(selector);
1705
- return selector.match($(element));
1706
- },
1707
-
1708
- up: function(element, expression, index) {
1709
- element = $(element);
1710
- if (arguments.length == 1) return $(element.parentNode);
1711
- var ancestors = element.ancestors();
1712
- return expression ? Selector.findElement(ancestors, expression, index) :
1713
- ancestors[index || 0];
1714
- },
1715
-
1716
- down: function(element, expression, index) {
1717
- element = $(element);
1718
- if (arguments.length == 1) return element.firstDescendant();
1719
- var descendants = element.descendants();
1720
- return expression ? Selector.findElement(descendants, expression, index) :
1721
- descendants[index || 0];
1722
- },
1723
-
1724
- previous: function(element, expression, index) {
1725
- element = $(element);
1726
- if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
1727
- var previousSiblings = element.previousSiblings();
1728
- return expression ? Selector.findElement(previousSiblings, expression, index) :
1729
- previousSiblings[index || 0];
1730
- },
1731
-
1732
- next: function(element, expression, index) {
1733
- element = $(element);
1734
- if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
1735
- var nextSiblings = element.nextSiblings();
1736
- return expression ? Selector.findElement(nextSiblings, expression, index) :
1737
- nextSiblings[index || 0];
1738
- },
1739
-
1740
- select: function() {
1741
- var args = $A(arguments), element = $(args.shift());
1742
- return Selector.findChildElements(element, args);
1743
- },
1744
-
1745
- adjacent: function() {
1746
- var args = $A(arguments), element = $(args.shift());
1747
- return Selector.findChildElements(element.parentNode, args).without(element);
1748
- },
1749
-
1750
- identify: function(element) {
1751
- element = $(element);
1752
- var id = element.readAttribute('id'), self = arguments.callee;
1753
- if (id) return id;
1754
- do { id = 'anonymous_element_' + self.counter++ } while ($(id));
1755
- element.writeAttribute('id', id);
1756
- return id;
1757
- },
1758
-
1759
- readAttribute: function(element, name) {
1760
- element = $(element);
1761
- if (Prototype.Browser.IE) {
1762
- var t = Element._attributeTranslations.read;
1763
- if (t.values[name]) return t.values[name](element, name);
1764
- if (t.names[name]) name = t.names[name];
1765
- if (name.include(':')) {
1766
- return (!element.attributes || !element.attributes[name]) ? null :
1767
- element.attributes[name].value;
1768
- }
1769
- }
1770
- return element.getAttribute(name);
1771
- },
1772
-
1773
- writeAttribute: function(element, name, value) {
1774
- element = $(element);
1775
- var attributes = { }, t = Element._attributeTranslations.write;
1776
-
1777
- if (typeof name == 'object') attributes = name;
1778
- else attributes[name] = Object.isUndefined(value) ? true : value;
1779
-
1780
- for (var attr in attributes) {
1781
- name = t.names[attr] || attr;
1782
- value = attributes[attr];
1783
- if (t.values[attr]) name = t.values[attr](element, value);
1784
- if (value === false || value === null)
1785
- element.removeAttribute(name);
1786
- else if (value === true)
1787
- element.setAttribute(name, name);
1788
- else element.setAttribute(name, value);
1789
- }
1790
- return element;
1791
- },
1792
-
1793
- getHeight: function(element) {
1794
- return $(element).getDimensions().height;
1795
- },
1796
-
1797
- getWidth: function(element) {
1798
- return $(element).getDimensions().width;
1799
- },
1800
-
1801
- classNames: function(element) {
1802
- return new Element.ClassNames(element);
1803
- },
1804
-
1805
- hasClassName: function(element, className) {
1806
- if (!(element = $(element))) return;
1807
- var elementClassName = element.className;
1808
- return (elementClassName.length > 0 && (elementClassName == className ||
1809
- new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
1810
- },
1811
-
1812
- addClassName: function(element, className) {
1813
- if (!(element = $(element))) return;
1814
- if (!element.hasClassName(className))
1815
- element.className += (element.className ? ' ' : '') + className;
1816
- return element;
1817
- },
1818
-
1819
- removeClassName: function(element, className) {
1820
- if (!(element = $(element))) return;
1821
- element.className = element.className.replace(
1822
- new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
1823
- return element;
1824
- },
1825
-
1826
- toggleClassName: function(element, className) {
1827
- if (!(element = $(element))) return;
1828
- return element[element.hasClassName(className) ?
1829
- 'removeClassName' : 'addClassName'](className);
1830
- },
1831
-
1832
- // removes whitespace-only text node children
1833
- cleanWhitespace: function(element) {
1834
- element = $(element);
1835
- var node = element.firstChild;
1836
- while (node) {
1837
- var nextNode = node.nextSibling;
1838
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
1839
- element.removeChild(node);
1840
- node = nextNode;
1841
- }
1842
- return element;
1843
- },
1844
-
1845
- empty: function(element) {
1846
- return $(element).innerHTML.blank();
1847
- },
1848
-
1849
- descendantOf: function(element, ancestor) {
1850
- element = $(element), ancestor = $(ancestor);
1851
- var originalAncestor = ancestor;
1852
-
1853
- if (element.compareDocumentPosition)
1854
- return (element.compareDocumentPosition(ancestor) & 8) === 8;
1855
-
1856
- if (element.sourceIndex && !Prototype.Browser.Opera) {
1857
- var e = element.sourceIndex, a = ancestor.sourceIndex,
1858
- nextAncestor = ancestor.nextSibling;
1859
- if (!nextAncestor) {
1860
- do { ancestor = ancestor.parentNode; }
1861
- while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode);
1862
- }
1863
- if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex);
1864
- }
1865
-
1866
- while (element = element.parentNode)
1867
- if (element == originalAncestor) return true;
1868
- return false;
1869
- },
1870
-
1871
- scrollTo: function(element) {
1872
- element = $(element);
1873
- var pos = element.cumulativeOffset();
1874
- window.scrollTo(pos[0], pos[1]);
1875
- return element;
1876
- },
1877
-
1878
- getStyle: function(element, style) {
1879
- element = $(element);
1880
- style = style == 'float' ? 'cssFloat' : style.camelize();
1881
- var value = element.style[style];
1882
- if (!value) {
1883
- var css = document.defaultView.getComputedStyle(element, null);
1884
- value = css ? css[style] : null;
1885
- }
1886
- if (style == 'opacity') return value ? parseFloat(value) : 1.0;
1887
- return value == 'auto' ? null : value;
1888
- },
1889
-
1890
- getOpacity: function(element) {
1891
- return $(element).getStyle('opacity');
1892
- },
1893
-
1894
- setStyle: function(element, styles) {
1895
- element = $(element);
1896
- var elementStyle = element.style, match;
1897
- if (Object.isString(styles)) {
1898
- element.style.cssText += ';' + styles;
1899
- return styles.include('opacity') ?
1900
- element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
1901
- }
1902
- for (var property in styles)
1903
- if (property == 'opacity') element.setOpacity(styles[property]);
1904
- else
1905
- elementStyle[(property == 'float' || property == 'cssFloat') ?
1906
- (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
1907
- property] = styles[property];
1908
-
1909
- return element;
1910
- },
1911
-
1912
- setOpacity: function(element, value) {
1913
- element = $(element);
1914
- element.style.opacity = (value == 1 || value === '') ? '' :
1915
- (value < 0.00001) ? 0 : value;
1916
- return element;
1917
- },
1918
-
1919
- getDimensions: function(element) {
1920
- element = $(element);
1921
- var display = $(element).getStyle('display');
1922
- if (display != 'none' && display != null) // Safari bug
1923
- return {width: element.offsetWidth, height: element.offsetHeight};
1924
-
1925
- // All *Width and *Height properties give 0 on elements with display none,
1926
- // so enable the element temporarily
1927
- var els = element.style;
1928
- var originalVisibility = els.visibility;
1929
- var originalPosition = els.position;
1930
- var originalDisplay = els.display;
1931
- els.visibility = 'hidden';
1932
- els.position = 'absolute';
1933
- els.display = 'block';
1934
- var originalWidth = element.clientWidth;
1935
- var originalHeight = element.clientHeight;
1936
- els.display = originalDisplay;
1937
- els.position = originalPosition;
1938
- els.visibility = originalVisibility;
1939
- return {width: originalWidth, height: originalHeight};
1940
- },
1941
-
1942
- makePositioned: function(element) {
1943
- element = $(element);
1944
- var pos = Element.getStyle(element, 'position');
1945
- if (pos == 'static' || !pos) {
1946
- element._madePositioned = true;
1947
- element.style.position = 'relative';
1948
- // Opera returns the offset relative to the positioning context, when an
1949
- // element is position relative but top and left have not been defined
1950
- if (window.opera) {
1951
- element.style.top = 0;
1952
- element.style.left = 0;
1953
- }
1954
- }
1955
- return element;
1956
- },
1957
-
1958
- undoPositioned: function(element) {
1959
- element = $(element);
1960
- if (element._madePositioned) {
1961
- element._madePositioned = undefined;
1962
- element.style.position =
1963
- element.style.top =
1964
- element.style.left =
1965
- element.style.bottom =
1966
- element.style.right = '';
1967
- }
1968
- return element;
1969
- },
1970
-
1971
- makeClipping: function(element) {
1972
- element = $(element);
1973
- if (element._overflow) return element;
1974
- element._overflow = Element.getStyle(element, 'overflow') || 'auto';
1975
- if (element._overflow !== 'hidden')
1976
- element.style.overflow = 'hidden';
1977
- return element;
1978
- },
1979
-
1980
- undoClipping: function(element) {
1981
- element = $(element);
1982
- if (!element._overflow) return element;
1983
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
1984
- element._overflow = null;
1985
- return element;
1986
- },
1987
-
1988
- cumulativeOffset: function(element) {
1989
- var valueT = 0, valueL = 0;
1990
- do {
1991
- valueT += element.offsetTop || 0;
1992
- valueL += element.offsetLeft || 0;
1993
- element = element.offsetParent;
1994
- } while (element);
1995
- return Element._returnOffset(valueL, valueT);
1996
- },
1997
-
1998
- positionedOffset: function(element) {
1999
- var valueT = 0, valueL = 0;
2000
- do {
2001
- valueT += element.offsetTop || 0;
2002
- valueL += element.offsetLeft || 0;
2003
- element = element.offsetParent;
2004
- if (element) {
2005
- if (element.tagName == 'BODY') break;
2006
- var p = Element.getStyle(element, 'position');
2007
- if (p == 'relative' || p == 'absolute') break;
2008
- }
2009
- } while (element);
2010
- return Element._returnOffset(valueL, valueT);
2011
- },
2012
-
2013
- absolutize: function(element) {
2014
- element = $(element);
2015
- if (element.getStyle('position') == 'absolute') return;
2016
- // Position.prepare(); // To be done manually by Scripty when it needs it.
2017
-
2018
- var offsets = element.positionedOffset();
2019
- var top = offsets[1];
2020
- var left = offsets[0];
2021
- var width = element.clientWidth;
2022
- var height = element.clientHeight;
2023
-
2024
- element._originalLeft = left - parseFloat(element.style.left || 0);
2025
- element._originalTop = top - parseFloat(element.style.top || 0);
2026
- element._originalWidth = element.style.width;
2027
- element._originalHeight = element.style.height;
2028
-
2029
- element.style.position = 'absolute';
2030
- element.style.top = top + 'px';
2031
- element.style.left = left + 'px';
2032
- element.style.width = width + 'px';
2033
- element.style.height = height + 'px';
2034
- return element;
2035
- },
2036
-
2037
- relativize: function(element) {
2038
- element = $(element);
2039
- if (element.getStyle('position') == 'relative') return;
2040
- // Position.prepare(); // To be done manually by Scripty when it needs it.
2041
-
2042
- element.style.position = 'relative';
2043
- var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
2044
- var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
2045
-
2046
- element.style.top = top + 'px';
2047
- element.style.left = left + 'px';
2048
- element.style.height = element._originalHeight;
2049
- element.style.width = element._originalWidth;
2050
- return element;
2051
- },
2052
-
2053
- cumulativeScrollOffset: function(element) {
2054
- var valueT = 0, valueL = 0;
2055
- do {
2056
- valueT += element.scrollTop || 0;
2057
- valueL += element.scrollLeft || 0;
2058
- element = element.parentNode;
2059
- } while (element);
2060
- return Element._returnOffset(valueL, valueT);
2061
- },
2062
-
2063
- getOffsetParent: function(element) {
2064
- if (element.offsetParent) return $(element.offsetParent);
2065
- if (element == document.body) return $(element);
2066
-
2067
- while ((element = element.parentNode) && element != document.body)
2068
- if (Element.getStyle(element, 'position') != 'static')
2069
- return $(element);
2070
-
2071
- return $(document.body);
2072
- },
2073
-
2074
- viewportOffset: function(forElement) {
2075
- var valueT = 0, valueL = 0;
2076
-
2077
- var element = forElement;
2078
- do {
2079
- valueT += element.offsetTop || 0;
2080
- valueL += element.offsetLeft || 0;
2081
-
2082
- // Safari fix
2083
- if (element.offsetParent == document.body &&
2084
- Element.getStyle(element, 'position') == 'absolute') break;
2085
-
2086
- } while (element = element.offsetParent);
2087
-
2088
- element = forElement;
2089
- do {
2090
- if (!Prototype.Browser.Opera || element.tagName == 'BODY') {
2091
- valueT -= element.scrollTop || 0;
2092
- valueL -= element.scrollLeft || 0;
2093
- }
2094
- } while (element = element.parentNode);
2095
-
2096
- return Element._returnOffset(valueL, valueT);
2097
- },
2098
-
2099
- clonePosition: function(element, source) {
2100
- var options = Object.extend({
2101
- setLeft: true,
2102
- setTop: true,
2103
- setWidth: true,
2104
- setHeight: true,
2105
- offsetTop: 0,
2106
- offsetLeft: 0
2107
- }, arguments[2] || { });
2108
-
2109
- // find page position of source
2110
- source = $(source);
2111
- var p = source.viewportOffset();
2112
-
2113
- // find coordinate system to use
2114
- element = $(element);
2115
- var delta = [0, 0];
2116
- var parent = null;
2117
- // delta [0,0] will do fine with position: fixed elements,
2118
- // position:absolute needs offsetParent deltas
2119
- if (Element.getStyle(element, 'position') == 'absolute') {
2120
- parent = element.getOffsetParent();
2121
- delta = parent.viewportOffset();
2122
- }
2123
-
2124
- // correct by body offsets (fixes Safari)
2125
- if (parent == document.body) {
2126
- delta[0] -= document.body.offsetLeft;
2127
- delta[1] -= document.body.offsetTop;
2128
- }
2129
-
2130
- // set position
2131
- if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
2132
- if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
2133
- if (options.setWidth) element.style.width = source.offsetWidth + 'px';
2134
- if (options.setHeight) element.style.height = source.offsetHeight + 'px';
2135
- return element;
2136
- }
2137
- };
2138
-
2139
- Element.Methods.identify.counter = 1;
2140
-
2141
- Object.extend(Element.Methods, {
2142
- getElementsBySelector: Element.Methods.select,
2143
- childElements: Element.Methods.immediateDescendants
2144
- });
2145
-
2146
- Element._attributeTranslations = {
2147
- write: {
2148
- names: {
2149
- className: 'class',
2150
- htmlFor: 'for'
2151
- },
2152
- values: { }
2153
- }
2154
- };
2155
-
2156
-
2157
- if (!document.createRange || Prototype.Browser.Opera) {
2158
- Element.Methods.insert = function(element, insertions) {
2159
- element = $(element);
2160
-
2161
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
2162
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
2163
- insertions = { bottom: insertions };
2164
-
2165
- var t = Element._insertionTranslations, content, position, pos, tagName;
2166
-
2167
- for (position in insertions) {
2168
- content = insertions[position];
2169
- position = position.toLowerCase();
2170
- pos = t[position];
2171
-
2172
- if (content && content.toElement) content = content.toElement();
2173
- if (Object.isElement(content)) {
2174
- pos.insert(element, content);
2175
- continue;
2176
- }
2177
-
2178
- content = Object.toHTML(content);
2179
- tagName = ((position == 'before' || position == 'after')
2180
- ? element.parentNode : element).tagName.toUpperCase();
2181
-
2182
- if (t.tags[tagName]) {
2183
- var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2184
- if (position == 'top' || position == 'after') fragments.reverse();
2185
- fragments.each(pos.insert.curry(element));
2186
- }
2187
- else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());
2188
-
2189
- content.evalScripts.bind(content).defer();
2190
- }
2191
-
2192
- return element;
2193
- };
2194
- }
2195
-
2196
- if (Prototype.Browser.Opera) {
2197
- Element.Methods.getStyle = Element.Methods.getStyle.wrap(
2198
- function(proceed, element, style) {
2199
- switch (style) {
2200
- case 'left': case 'top': case 'right': case 'bottom':
2201
- if (proceed(element, 'position') === 'static') return null;
2202
- case 'height': case 'width':
2203
- // returns '0px' for hidden elements; we want it to return null
2204
- if (!Element.visible(element)) return null;
2205
-
2206
- // returns the border-box dimensions rather than the content-box
2207
- // dimensions, so we subtract padding and borders from the value
2208
- var dim = parseInt(proceed(element, style), 10);
2209
-
2210
- if (dim !== element['offset' + style.capitalize()])
2211
- return dim + 'px';
2212
-
2213
- var properties;
2214
- if (style === 'height') {
2215
- properties = ['border-top-width', 'padding-top',
2216
- 'padding-bottom', 'border-bottom-width'];
2217
- }
2218
- else {
2219
- properties = ['border-left-width', 'padding-left',
2220
- 'padding-right', 'border-right-width'];
2221
- }
2222
- return properties.inject(dim, function(memo, property) {
2223
- var val = proceed(element, property);
2224
- return val === null ? memo : memo - parseInt(val, 10);
2225
- }) + 'px';
2226
- default: return proceed(element, style);
2227
- }
2228
- }
2229
- );
2230
-
2231
- Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
2232
- function(proceed, element, attribute) {
2233
- if (attribute === 'title') return element.title;
2234
- return proceed(element, attribute);
2235
- }
2236
- );
2237
- }
2238
-
2239
- else if (Prototype.Browser.IE) {
2240
- $w('positionedOffset getOffsetParent viewportOffset').each(function(method) {
2241
- Element.Methods[method] = Element.Methods[method].wrap(
2242
- function(proceed, element) {
2243
- element = $(element);
2244
- var position = element.getStyle('position');
2245
- if (position != 'static') return proceed(element);
2246
- element.setStyle({ position: 'relative' });
2247
- var value = proceed(element);
2248
- element.setStyle({ position: position });
2249
- return value;
2250
- }
2251
- );
2252
- });
2253
-
2254
- Element.Methods.getStyle = function(element, style) {
2255
- element = $(element);
2256
- style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
2257
- var value = element.style[style];
2258
- if (!value && element.currentStyle) value = element.currentStyle[style];
2259
-
2260
- if (style == 'opacity') {
2261
- if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
2262
- if (value[1]) return parseFloat(value[1]) / 100;
2263
- return 1.0;
2264
- }
2265
-
2266
- if (value == 'auto') {
2267
- if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
2268
- return element['offset' + style.capitalize()] + 'px';
2269
- return null;
2270
- }
2271
- return value;
2272
- };
2273
-
2274
- Element.Methods.setOpacity = function(element, value) {
2275
- function stripAlpha(filter){
2276
- return filter.replace(/alpha\([^\)]*\)/gi,'');
2277
- }
2278
- element = $(element);
2279
- var currentStyle = element.currentStyle;
2280
- if ((currentStyle && !currentStyle.hasLayout) ||
2281
- (!currentStyle && element.style.zoom == 'normal'))
2282
- element.style.zoom = 1;
2283
-
2284
- var filter = element.getStyle('filter'), style = element.style;
2285
- if (value == 1 || value === '') {
2286
- (filter = stripAlpha(filter)) ?
2287
- style.filter = filter : style.removeAttribute('filter');
2288
- return element;
2289
- } else if (value < 0.00001) value = 0;
2290
- style.filter = stripAlpha(filter) +
2291
- 'alpha(opacity=' + (value * 100) + ')';
2292
- return element;
2293
- };
2294
-
2295
- Element._attributeTranslations = {
2296
- read: {
2297
- names: {
2298
- 'class': 'className',
2299
- 'for': 'htmlFor'
2300
- },
2301
- values: {
2302
- _getAttr: function(element, attribute) {
2303
- return element.getAttribute(attribute, 2);
2304
- },
2305
- _getAttrNode: function(element, attribute) {
2306
- var node = element.getAttributeNode(attribute);
2307
- return node ? node.value : "";
2308
- },
2309
- _getEv: function(element, attribute) {
2310
- attribute = element.getAttribute(attribute);
2311
- return attribute ? attribute.toString().slice(23, -2) : null;
2312
- },
2313
- _flag: function(element, attribute) {
2314
- return $(element).hasAttribute(attribute) ? attribute : null;
2315
- },
2316
- style: function(element) {
2317
- return element.style.cssText.toLowerCase();
2318
- },
2319
- title: function(element) {
2320
- return element.title;
2321
- }
2322
- }
2323
- }
2324
- };
2325
-
2326
- Element._attributeTranslations.write = {
2327
- names: Object.clone(Element._attributeTranslations.read.names),
2328
- values: {
2329
- checked: function(element, value) {
2330
- element.checked = !!value;
2331
- },
2332
-
2333
- style: function(element, value) {
2334
- element.style.cssText = value ? value : '';
2335
- }
2336
- }
2337
- };
2338
-
2339
- Element._attributeTranslations.has = {};
2340
-
2341
- $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
2342
- 'encType maxLength readOnly longDesc').each(function(attr) {
2343
- Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
2344
- Element._attributeTranslations.has[attr.toLowerCase()] = attr;
2345
- });
2346
-
2347
- (function(v) {
2348
- Object.extend(v, {
2349
- href: v._getAttr,
2350
- src: v._getAttr,
2351
- type: v._getAttr,
2352
- action: v._getAttrNode,
2353
- disabled: v._flag,
2354
- checked: v._flag,
2355
- readonly: v._flag,
2356
- multiple: v._flag,
2357
- onload: v._getEv,
2358
- onunload: v._getEv,
2359
- onclick: v._getEv,
2360
- ondblclick: v._getEv,
2361
- onmousedown: v._getEv,
2362
- onmouseup: v._getEv,
2363
- onmouseover: v._getEv,
2364
- onmousemove: v._getEv,
2365
- onmouseout: v._getEv,
2366
- onfocus: v._getEv,
2367
- onblur: v._getEv,
2368
- onkeypress: v._getEv,
2369
- onkeydown: v._getEv,
2370
- onkeyup: v._getEv,
2371
- onsubmit: v._getEv,
2372
- onreset: v._getEv,
2373
- onselect: v._getEv,
2374
- onchange: v._getEv
2375
- });
2376
- })(Element._attributeTranslations.read.values);
2377
- }
2378
-
2379
- else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
2380
- Element.Methods.setOpacity = function(element, value) {
2381
- element = $(element);
2382
- element.style.opacity = (value == 1) ? 0.999999 :
2383
- (value === '') ? '' : (value < 0.00001) ? 0 : value;
2384
- return element;
2385
- };
2386
- }
2387
-
2388
- else if (Prototype.Browser.WebKit) {
2389
- Element.Methods.setOpacity = function(element, value) {
2390
- element = $(element);
2391
- element.style.opacity = (value == 1 || value === '') ? '' :
2392
- (value < 0.00001) ? 0 : value;
2393
-
2394
- if (value == 1)
2395
- if(element.tagName == 'IMG' && element.width) {
2396
- element.width++; element.width--;
2397
- } else try {
2398
- var n = document.createTextNode(' ');
2399
- element.appendChild(n);
2400
- element.removeChild(n);
2401
- } catch (e) { }
2402
-
2403
- return element;
2404
- };
2405
-
2406
- // Safari returns margins on body which is incorrect if the child is absolutely
2407
- // positioned. For performance reasons, redefine Element#cumulativeOffset for
2408
- // KHTML/WebKit only.
2409
- Element.Methods.cumulativeOffset = function(element) {
2410
- var valueT = 0, valueL = 0;
2411
- do {
2412
- valueT += element.offsetTop || 0;
2413
- valueL += element.offsetLeft || 0;
2414
- if (element.offsetParent == document.body)
2415
- if (Element.getStyle(element, 'position') == 'absolute') break;
2416
-
2417
- element = element.offsetParent;
2418
- } while (element);
2419
-
2420
- return Element._returnOffset(valueL, valueT);
2421
- };
2422
- }
2423
-
2424
- if (Prototype.Browser.IE || Prototype.Browser.Opera) {
2425
- // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
2426
- Element.Methods.update = function(element, content) {
2427
- element = $(element);
2428
-
2429
- if (content && content.toElement) content = content.toElement();
2430
- if (Object.isElement(content)) return element.update().insert(content);
2431
-
2432
- content = Object.toHTML(content);
2433
- var tagName = element.tagName.toUpperCase();
2434
-
2435
- if (tagName in Element._insertionTranslations.tags) {
2436
- $A(element.childNodes).each(function(node) { element.removeChild(node) });
2437
- Element._getContentFromAnonymousElement(tagName, content.stripScripts())
2438
- .each(function(node) { element.appendChild(node) });
2439
- }
2440
- else element.innerHTML = content.stripScripts();
2441
-
2442
- content.evalScripts.bind(content).defer();
2443
- return element;
2444
- };
2445
- }
2446
-
2447
- if (document.createElement('div').outerHTML) {
2448
- Element.Methods.replace = function(element, content) {
2449
- element = $(element);
2450
-
2451
- if (content && content.toElement) content = content.toElement();
2452
- if (Object.isElement(content)) {
2453
- element.parentNode.replaceChild(content, element);
2454
- return element;
2455
- }
2456
-
2457
- content = Object.toHTML(content);
2458
- var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
2459
-
2460
- if (Element._insertionTranslations.tags[tagName]) {
2461
- var nextSibling = element.next();
2462
- var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2463
- parent.removeChild(element);
2464
- if (nextSibling)
2465
- fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
2466
- else
2467
- fragments.each(function(node) { parent.appendChild(node) });
2468
- }
2469
- else element.outerHTML = content.stripScripts();
2470
-
2471
- content.evalScripts.bind(content).defer();
2472
- return element;
2473
- };
2474
- }
2475
-
2476
- Element._returnOffset = function(l, t) {
2477
- var result = [l, t];
2478
- result.left = l;
2479
- result.top = t;
2480
- return result;
2481
- };
2482
-
2483
- Element._getContentFromAnonymousElement = function(tagName, html) {
2484
- var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
2485
- div.innerHTML = t[0] + html + t[1];
2486
- t[2].times(function() { div = div.firstChild });
2487
- return $A(div.childNodes);
2488
- };
2489
-
2490
- Element._insertionTranslations = {
2491
- before: {
2492
- adjacency: 'beforeBegin',
2493
- insert: function(element, node) {
2494
- element.parentNode.insertBefore(node, element);
2495
- },
2496
- initializeRange: function(element, range) {
2497
- range.setStartBefore(element);
2498
- }
2499
- },
2500
- top: {
2501
- adjacency: 'afterBegin',
2502
- insert: function(element, node) {
2503
- element.insertBefore(node, element.firstChild);
2504
- },
2505
- initializeRange: function(element, range) {
2506
- range.selectNodeContents(element);
2507
- range.collapse(true);
2508
- }
2509
- },
2510
- bottom: {
2511
- adjacency: 'beforeEnd',
2512
- insert: function(element, node) {
2513
- element.appendChild(node);
2514
- }
2515
- },
2516
- after: {
2517
- adjacency: 'afterEnd',
2518
- insert: function(element, node) {
2519
- element.parentNode.insertBefore(node, element.nextSibling);
2520
- },
2521
- initializeRange: function(element, range) {
2522
- range.setStartAfter(element);
2523
- }
2524
- },
2525
- tags: {
2526
- TABLE: ['<table>', '</table>', 1],
2527
- TBODY: ['<table><tbody>', '</tbody></table>', 2],
2528
- TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
2529
- TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
2530
- SELECT: ['<select>', '</select>', 1]
2531
- }
2532
- };
2533
-
2534
- (function() {
2535
- this.bottom.initializeRange = this.top.initializeRange;
2536
- Object.extend(this.tags, {
2537
- THEAD: this.tags.TBODY,
2538
- TFOOT: this.tags.TBODY,
2539
- TH: this.tags.TD
2540
- });
2541
- }).call(Element._insertionTranslations);
2542
-
2543
- Element.Methods.Simulated = {
2544
- hasAttribute: function(element, attribute) {
2545
- attribute = Element._attributeTranslations.has[attribute] || attribute;
2546
- var node = $(element).getAttributeNode(attribute);
2547
- return node && node.specified;
2548
- }
2549
- };
2550
-
2551
- Element.Methods.ByTag = { };
2552
-
2553
- Object.extend(Element, Element.Methods);
2554
-
2555
- if (!Prototype.BrowserFeatures.ElementExtensions &&
2556
- document.createElement('div').__proto__) {
2557
- window.HTMLElement = { };
2558
- window.HTMLElement.prototype = document.createElement('div').__proto__;
2559
- Prototype.BrowserFeatures.ElementExtensions = true;
2560
- }
2561
-
2562
- Element.extend = (function() {
2563
- if (Prototype.BrowserFeatures.SpecificElementExtensions)
2564
- return Prototype.K;
2565
-
2566
- var Methods = { }, ByTag = Element.Methods.ByTag;
2567
-
2568
- var extend = Object.extend(function(element) {
2569
- if (!element || element._extendedByPrototype ||
2570
- element.nodeType != 1 || element == window) return element;
2571
-
2572
- var methods = Object.clone(Methods),
2573
- tagName = element.tagName, property, value;
2574
-
2575
- // extend methods for specific tags
2576
- if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
2577
-
2578
- for (property in methods) {
2579
- value = methods[property];
2580
- if (Object.isFunction(value) && !(property in element))
2581
- element[property] = value.methodize();
2582
- }
2583
-
2584
- element._extendedByPrototype = Prototype.emptyFunction;
2585
- return element;
2586
-
2587
- }, {
2588
- refresh: function() {
2589
- // extend methods for all tags (Safari doesn't need this)
2590
- if (!Prototype.BrowserFeatures.ElementExtensions) {
2591
- Object.extend(Methods, Element.Methods);
2592
- Object.extend(Methods, Element.Methods.Simulated);
2593
- }
2594
- }
2595
- });
2596
-
2597
- extend.refresh();
2598
- return extend;
2599
- })();
2600
-
2601
- Element.hasAttribute = function(element, attribute) {
2602
- if (element.hasAttribute) return element.hasAttribute(attribute);
2603
- return Element.Methods.Simulated.hasAttribute(element, attribute);
2604
- };
2605
-
2606
- Element.addMethods = function(methods) {
2607
- var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
2608
-
2609
- if (!methods) {
2610
- Object.extend(Form, Form.Methods);
2611
- Object.extend(Form.Element, Form.Element.Methods);
2612
- Object.extend(Element.Methods.ByTag, {
2613
- "FORM": Object.clone(Form.Methods),
2614
- "INPUT": Object.clone(Form.Element.Methods),
2615
- "SELECT": Object.clone(Form.Element.Methods),
2616
- "TEXTAREA": Object.clone(Form.Element.Methods)
2617
- });
2618
- }
2619
-
2620
- if (arguments.length == 2) {
2621
- var tagName = methods;
2622
- methods = arguments[1];
2623
- }
2624
-
2625
- if (!tagName) Object.extend(Element.Methods, methods || { });
2626
- else {
2627
- if (Object.isArray(tagName)) tagName.each(extend);
2628
- else extend(tagName);
2629
- }
2630
-
2631
- function extend(tagName) {
2632
- tagName = tagName.toUpperCase();
2633
- if (!Element.Methods.ByTag[tagName])
2634
- Element.Methods.ByTag[tagName] = { };
2635
- Object.extend(Element.Methods.ByTag[tagName], methods);
2636
- }
2637
-
2638
- function copy(methods, destination, onlyIfAbsent) {
2639
- onlyIfAbsent = onlyIfAbsent || false;
2640
- for (var property in methods) {
2641
- var value = methods[property];
2642
- if (!Object.isFunction(value)) continue;
2643
- if (!onlyIfAbsent || !(property in destination))
2644
- destination[property] = value.methodize();
2645
- }
2646
- }
2647
-
2648
- function findDOMClass(tagName) {
2649
- var klass;
2650
- var trans = {
2651
- "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
2652
- "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
2653
- "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
2654
- "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
2655
- "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
2656
- "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
2657
- "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
2658
- "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
2659
- "FrameSet", "IFRAME": "IFrame"
2660
- };
2661
- if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
2662
- if (window[klass]) return window[klass];
2663
- klass = 'HTML' + tagName + 'Element';
2664
- if (window[klass]) return window[klass];
2665
- klass = 'HTML' + tagName.capitalize() + 'Element';
2666
- if (window[klass]) return window[klass];
2667
-
2668
- window[klass] = { };
2669
- window[klass].prototype = document.createElement(tagName).__proto__;
2670
- return window[klass];
2671
- }
2672
-
2673
- if (F.ElementExtensions) {
2674
- copy(Element.Methods, HTMLElement.prototype);
2675
- copy(Element.Methods.Simulated, HTMLElement.prototype, true);
2676
- }
2677
-
2678
- if (F.SpecificElementExtensions) {
2679
- for (var tag in Element.Methods.ByTag) {
2680
- var klass = findDOMClass(tag);
2681
- if (Object.isUndefined(klass)) continue;
2682
- copy(T[tag], klass.prototype);
2683
- }
2684
- }
2685
-
2686
- Object.extend(Element, Element.Methods);
2687
- delete Element.ByTag;
2688
-
2689
- if (Element.extend.refresh) Element.extend.refresh();
2690
- Element.cache = { };
2691
- };
2692
-
2693
- document.viewport = {
2694
- getDimensions: function() {
2695
- var dimensions = { };
2696
- var B = Prototype.Browser;
2697
- $w('width height').each(function(d) {
2698
- var D = d.capitalize();
2699
- dimensions[d] = (B.WebKit && !document.evaluate) ? self['inner' + D] :
2700
- (B.Opera) ? document.body['client' + D] : document.documentElement['client' + D];
2701
- });
2702
- return dimensions;
2703
- },
2704
-
2705
- getWidth: function() {
2706
- return this.getDimensions().width;
2707
- },
2708
-
2709
- getHeight: function() {
2710
- return this.getDimensions().height;
2711
- },
2712
-
2713
- getScrollOffsets: function() {
2714
- return Element._returnOffset(
2715
- window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
2716
- window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
2717
- }
2718
- };
2719
- /* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
2720
- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
2721
- * license. Please see http://www.yui-ext.com/ for more information. */
2722
-
2723
- var Selector = Class.create({
2724
- initialize: function(expression) {
2725
- this.expression = expression.strip();
2726
- this.compileMatcher();
2727
- },
2728
-
2729
- shouldUseXPath: function() {
2730
- if (!Prototype.BrowserFeatures.XPath) return false;
2731
-
2732
- var e = this.expression;
2733
-
2734
- // Safari 3 chokes on :*-of-type and :empty
2735
- if (Prototype.Browser.WebKit &&
2736
- (e.include("-of-type") || e.include(":empty")))
2737
- return false;
2738
-
2739
- // XPath can't do namespaced attributes, nor can it read
2740
- // the "checked" property from DOM nodes
2741
- if ((/(\[[\w-]*?:|:checked)/).test(this.expression))
2742
- return false;
2743
-
2744
- return true;
2745
- },
2746
-
2747
- compileMatcher: function() {
2748
- if (this.shouldUseXPath())
2749
- return this.compileXPathMatcher();
2750
-
2751
- var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
2752
- c = Selector.criteria, le, p, m;
2753
-
2754
- if (Selector._cache[e]) {
2755
- this.matcher = Selector._cache[e];
2756
- return;
2757
- }
2758
-
2759
- this.matcher = ["this.matcher = function(root) {",
2760
- "var r = root, h = Selector.handlers, c = false, n;"];
2761
-
2762
- while (e && le != e && (/\S/).test(e)) {
2763
- le = e;
2764
- for (var i in ps) {
2765
- p = ps[i];
2766
- if (m = e.match(p)) {
2767
- this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
2768
- new Template(c[i]).evaluate(m));
2769
- e = e.replace(m[0], '');
2770
- break;
2771
- }
2772
- }
2773
- }
2774
-
2775
- this.matcher.push("return h.unique(n);\n}");
2776
- eval(this.matcher.join('\n'));
2777
- Selector._cache[this.expression] = this.matcher;
2778
- },
2779
-
2780
- compileXPathMatcher: function() {
2781
- var e = this.expression, ps = Selector.patterns,
2782
- x = Selector.xpath, le, m;
2783
-
2784
- if (Selector._cache[e]) {
2785
- this.xpath = Selector._cache[e]; return;
2786
- }
2787
-
2788
- this.matcher = ['.//*'];
2789
- while (e && le != e && (/\S/).test(e)) {
2790
- le = e;
2791
- for (var i in ps) {
2792
- if (m = e.match(ps[i])) {
2793
- this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
2794
- new Template(x[i]).evaluate(m));
2795
- e = e.replace(m[0], '');
2796
- break;
2797
- }
2798
- }
2799
- }
2800
-
2801
- this.xpath = this.matcher.join('');
2802
- Selector._cache[this.expression] = this.xpath;
2803
- },
2804
-
2805
- findElements: function(root) {
2806
- root = root || document;
2807
- if (this.xpath) return document._getElementsByXPath(this.xpath, root);
2808
- return this.matcher(root);
2809
- },
2810
-
2811
- match: function(element) {
2812
- this.tokens = [];
2813
-
2814
- var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
2815
- var le, p, m;
2816
-
2817
- while (e && le !== e && (/\S/).test(e)) {
2818
- le = e;
2819
- for (var i in ps) {
2820
- p = ps[i];
2821
- if (m = e.match(p)) {
2822
- // use the Selector.assertions methods unless the selector
2823
- // is too complex.
2824
- if (as[i]) {
2825
- this.tokens.push([i, Object.clone(m)]);
2826
- e = e.replace(m[0], '');
2827
- } else {
2828
- // reluctantly do a document-wide search
2829
- // and look for a match in the array
2830
- return this.findElements(document).include(element);
2831
- }
2832
- }
2833
- }
2834
- }
2835
-
2836
- var match = true, name, matches;
2837
- for (var i = 0, token; token = this.tokens[i]; i++) {
2838
- name = token[0], matches = token[1];
2839
- if (!Selector.assertions[name](element, matches)) {
2840
- match = false; break;
2841
- }
2842
- }
2843
-
2844
- return match;
2845
- },
2846
-
2847
- toString: function() {
2848
- return this.expression;
2849
- },
2850
-
2851
- inspect: function() {
2852
- return "#<Selector:" + this.expression.inspect() + ">";
2853
- }
2854
- });
2855
-
2856
- Object.extend(Selector, {
2857
- _cache: { },
2858
-
2859
- xpath: {
2860
- descendant: "//*",
2861
- child: "/*",
2862
- adjacent: "/following-sibling::*[1]",
2863
- laterSibling: '/following-sibling::*',
2864
- tagName: function(m) {
2865
- if (m[1] == '*') return '';
2866
- return "[local-name()='" + m[1].toLowerCase() +
2867
- "' or local-name()='" + m[1].toUpperCase() + "']";
2868
- },
2869
- className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
2870
- id: "[@id='#{1}']",
2871
- attrPresence: function(m) {
2872
- m[1] = m[1].toLowerCase();
2873
- return new Template("[@#{1}]").evaluate(m);
2874
- },
2875
- attr: function(m) {
2876
- m[1] = m[1].toLowerCase();
2877
- m[3] = m[5] || m[6];
2878
- return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
2879
- },
2880
- pseudo: function(m) {
2881
- var h = Selector.xpath.pseudos[m[1]];
2882
- if (!h) return '';
2883
- if (Object.isFunction(h)) return h(m);
2884
- return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
2885
- },
2886
- operators: {
2887
- '=': "[@#{1}='#{3}']",
2888
- '!=': "[@#{1}!='#{3}']",
2889
- '^=': "[starts-with(@#{1}, '#{3}')]",
2890
- '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
2891
- '*=': "[contains(@#{1}, '#{3}')]",
2892
- '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
2893
- '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
2894
- },
2895
- pseudos: {
2896
- 'first-child': '[not(preceding-sibling::*)]',
2897
- 'last-child': '[not(following-sibling::*)]',
2898
- 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
2899
- 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",
2900
- 'checked': "[@checked]",
2901
- 'disabled': "[@disabled]",
2902
- 'enabled': "[not(@disabled)]",
2903
- 'not': function(m) {
2904
- var e = m[6], p = Selector.patterns,
2905
- x = Selector.xpath, le, v;
2906
-
2907
- var exclusion = [];
2908
- while (e && le != e && (/\S/).test(e)) {
2909
- le = e;
2910
- for (var i in p) {
2911
- if (m = e.match(p[i])) {
2912
- v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
2913
- exclusion.push("(" + v.substring(1, v.length - 1) + ")");
2914
- e = e.replace(m[0], '');
2915
- break;
2916
- }
2917
- }
2918
- }
2919
- return "[not(" + exclusion.join(" and ") + ")]";
2920
- },
2921
- 'nth-child': function(m) {
2922
- return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
2923
- },
2924
- 'nth-last-child': function(m) {
2925
- return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
2926
- },
2927
- 'nth-of-type': function(m) {
2928
- return Selector.xpath.pseudos.nth("position() ", m);
2929
- },
2930
- 'nth-last-of-type': function(m) {
2931
- return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
2932
- },
2933
- 'first-of-type': function(m) {
2934
- m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
2935
- },
2936
- 'last-of-type': function(m) {
2937
- m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
2938
- },
2939
- 'only-of-type': function(m) {
2940
- var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
2941
- },
2942
- nth: function(fragment, m) {
2943
- var mm, formula = m[6], predicate;
2944
- if (formula == 'even') formula = '2n+0';
2945
- if (formula == 'odd') formula = '2n+1';
2946
- if (mm = formula.match(/^(\d+)$/)) // digit only
2947
- return '[' + fragment + "= " + mm[1] + ']';
2948
- if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
2949
- if (mm[1] == "-") mm[1] = -1;
2950
- var a = mm[1] ? Number(mm[1]) : 1;
2951
- var b = mm[2] ? Number(mm[2]) : 0;
2952
- predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
2953
- "((#{fragment} - #{b}) div #{a} >= 0)]";
2954
- return new Template(predicate).evaluate({
2955
- fragment: fragment, a: a, b: b });
2956
- }
2957
- }
2958
- }
2959
- },
2960
-
2961
- criteria: {
2962
- tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
2963
- className: 'n = h.className(n, r, "#{1}", c); c = false;',
2964
- id: 'n = h.id(n, r, "#{1}", c); c = false;',
2965
- attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
2966
- attr: function(m) {
2967
- m[3] = (m[5] || m[6]);
2968
- return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
2969
- },
2970
- pseudo: function(m) {
2971
- if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
2972
- return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
2973
- },
2974
- descendant: 'c = "descendant";',
2975
- child: 'c = "child";',
2976
- adjacent: 'c = "adjacent";',
2977
- laterSibling: 'c = "laterSibling";'
2978
- },
2979
-
2980
- patterns: {
2981
- // combinators must be listed first
2982
- // (and descendant needs to be last combinator)
2983
- laterSibling: /^\s*~\s*/,
2984
- child: /^\s*>\s*/,
2985
- adjacent: /^\s*\+\s*/,
2986
- descendant: /^\s/,
2987
-
2988
- // selectors follow
2989
- tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
2990
- id: /^#([\w\-\*]+)(\b|$)/,
2991
- className: /^\.([\w\-\*]+)(\b|$)/,
2992
- pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,
2993
- attrPresence: /^\[([\w]+)\]/,
2994
- attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
2995
- },
2996
-
2997
- // for Selector.match and Element#match
2998
- assertions: {
2999
- tagName: function(element, matches) {
3000
- return matches[1].toUpperCase() == element.tagName.toUpperCase();
3001
- },
3002
-
3003
- className: function(element, matches) {
3004
- return Element.hasClassName(element, matches[1]);
3005
- },
3006
-
3007
- id: function(element, matches) {
3008
- return element.id === matches[1];
3009
- },
3010
-
3011
- attrPresence: function(element, matches) {
3012
- return Element.hasAttribute(element, matches[1]);
3013
- },
3014
-
3015
- attr: function(element, matches) {
3016
- var nodeValue = Element.readAttribute(element, matches[1]);
3017
- return Selector.operators[matches[2]](nodeValue, matches[3]);
3018
- }
3019
- },
3020
-
3021
- handlers: {
3022
- // UTILITY FUNCTIONS
3023
- // joins two collections
3024
- concat: function(a, b) {
3025
- for (var i = 0, node; node = b[i]; i++)
3026
- a.push(node);
3027
- return a;
3028
- },
3029
-
3030
- // marks an array of nodes for counting
3031
- mark: function(nodes) {
3032
- for (var i = 0, node; node = nodes[i]; i++)
3033
- node._counted = true;
3034
- return nodes;
3035
- },
3036
-
3037
- unmark: function(nodes) {
3038
- for (var i = 0, node; node = nodes[i]; i++)
3039
- node._counted = undefined;
3040
- return nodes;
3041
- },
3042
-
3043
- // mark each child node with its position (for nth calls)
3044
- // "ofType" flag indicates whether we're indexing for nth-of-type
3045
- // rather than nth-child
3046
- index: function(parentNode, reverse, ofType) {
3047
- parentNode._counted = true;
3048
- if (reverse) {
3049
- for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
3050
- var node = nodes[i];
3051
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
3052
- }
3053
- } else {
3054
- for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
3055
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
3056
- }
3057
- },
3058
-
3059
- // filters out duplicates and extends all nodes
3060
- unique: function(nodes) {
3061
- if (nodes.length == 0) return nodes;
3062
- var results = [], n;
3063
- for (var i = 0, l = nodes.length; i < l; i++)
3064
- if (!(n = nodes[i])._counted) {
3065
- n._counted = true;
3066
- results.push(Element.extend(n));
3067
- }
3068
- return Selector.handlers.unmark(results);
3069
- },
3070
-
3071
- // COMBINATOR FUNCTIONS
3072
- descendant: function(nodes) {
3073
- var h = Selector.handlers;
3074
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3075
- h.concat(results, node.getElementsByTagName('*'));
3076
- return results;
3077
- },
3078
-
3079
- child: function(nodes) {
3080
- var h = Selector.handlers;
3081
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
3082
- for (var j = 0, child; child = node.childNodes[j]; j++)
3083
- if (child.nodeType == 1 && child.tagName != '!') results.push(child);
3084
- }
3085
- return results;
3086
- },
3087
-
3088
- adjacent: function(nodes) {
3089
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
3090
- var next = this.nextElementSibling(node);
3091
- if (next) results.push(next);
3092
- }
3093
- return results;
3094
- },
3095
-
3096
- laterSibling: function(nodes) {
3097
- var h = Selector.handlers;
3098
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3099
- h.concat(results, Element.nextSiblings(node));
3100
- return results;
3101
- },
3102
-
3103
- nextElementSibling: function(node) {
3104
- while (node = node.nextSibling)
3105
- if (node.nodeType == 1) return node;
3106
- return null;
3107
- },
3108
-
3109
- previousElementSibling: function(node) {
3110
- while (node = node.previousSibling)
3111
- if (node.nodeType == 1) return node;
3112
- return null;
3113
- },
3114
-
3115
- // TOKEN FUNCTIONS
3116
- tagName: function(nodes, root, tagName, combinator) {
3117
- tagName = tagName.toUpperCase();
3118
- var results = [], h = Selector.handlers;
3119
- if (nodes) {
3120
- if (combinator) {
3121
- // fastlane for ordinary descendant combinators
3122
- if (combinator == "descendant") {
3123
- for (var i = 0, node; node = nodes[i]; i++)
3124
- h.concat(results, node.getElementsByTagName(tagName));
3125
- return results;
3126
- } else nodes = this[combinator](nodes);
3127
- if (tagName == "*") return nodes;
3128
- }
3129
- for (var i = 0, node; node = nodes[i]; i++)
3130
- if (node.tagName.toUpperCase() == tagName) results.push(node);
3131
- return results;
3132
- } else return root.getElementsByTagName(tagName);
3133
- },
3134
-
3135
- id: function(nodes, root, id, combinator) {
3136
- var targetNode = $(id), h = Selector.handlers;
3137
- if (!targetNode) return [];
3138
- if (!nodes && root == document) return [targetNode];
3139
- if (nodes) {
3140
- if (combinator) {
3141
- if (combinator == 'child') {
3142
- for (var i = 0, node; node = nodes[i]; i++)
3143
- if (targetNode.parentNode == node) return [targetNode];
3144
- } else if (combinator == 'descendant') {
3145
- for (var i = 0, node; node = nodes[i]; i++)
3146
- if (Element.descendantOf(targetNode, node)) return [targetNode];
3147
- } else if (combinator == 'adjacent') {
3148
- for (var i = 0, node; node = nodes[i]; i++)
3149
- if (Selector.handlers.previousElementSibling(targetNode) == node)
3150
- return [targetNode];
3151
- } else nodes = h[combinator](nodes);
3152
- }
3153
- for (var i = 0, node; node = nodes[i]; i++)
3154
- if (node == targetNode) return [targetNode];
3155
- return [];
3156
- }
3157
- return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
3158
- },
3159
-
3160
- className: function(nodes, root, className, combinator) {
3161
- if (nodes && combinator) nodes = this[combinator](nodes);
3162
- return Selector.handlers.byClassName(nodes, root, className);
3163
- },
3164
-
3165
- byClassName: function(nodes, root, className) {
3166
- if (!nodes) nodes = Selector.handlers.descendant([root]);
3167
- var needle = ' ' + className + ' ';
3168
- for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
3169
- nodeClassName = node.className;
3170
- if (nodeClassName.length == 0) continue;
3171
- if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
3172
- results.push(node);
3173
- }
3174
- return results;
3175
- },
3176
-
3177
- attrPresence: function(nodes, root, attr) {
3178
- if (!nodes) nodes = root.getElementsByTagName("*");
3179
- var results = [];
3180
- for (var i = 0, node; node = nodes[i]; i++)
3181
- if (Element.hasAttribute(node, attr)) results.push(node);
3182
- return results;
3183
- },
3184
-
3185
- attr: function(nodes, root, attr, value, operator) {
3186
- if (!nodes) nodes = root.getElementsByTagName("*");
3187
- var handler = Selector.operators[operator], results = [];
3188
- for (var i = 0, node; node = nodes[i]; i++) {
3189
- var nodeValue = Element.readAttribute(node, attr);
3190
- if (nodeValue === null) continue;
3191
- if (handler(nodeValue, value)) results.push(node);
3192
- }
3193
- return results;
3194
- },
3195
-
3196
- pseudo: function(nodes, name, value, root, combinator) {
3197
- if (nodes && combinator) nodes = this[combinator](nodes);
3198
- if (!nodes) nodes = root.getElementsByTagName("*");
3199
- return Selector.pseudos[name](nodes, value, root);
3200
- }
3201
- },
3202
-
3203
- pseudos: {
3204
- 'first-child': function(nodes, value, root) {
3205
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
3206
- if (Selector.handlers.previousElementSibling(node)) continue;
3207
- results.push(node);
3208
- }
3209
- return results;
3210
- },
3211
- 'last-child': function(nodes, value, root) {
3212
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
3213
- if (Selector.handlers.nextElementSibling(node)) continue;
3214
- results.push(node);
3215
- }
3216
- return results;
3217
- },
3218
- 'only-child': function(nodes, value, root) {
3219
- var h = Selector.handlers;
3220
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3221
- if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
3222
- results.push(node);
3223
- return results;
3224
- },
3225
- 'nth-child': function(nodes, formula, root) {
3226
- return Selector.pseudos.nth(nodes, formula, root);
3227
- },
3228
- 'nth-last-child': function(nodes, formula, root) {
3229
- return Selector.pseudos.nth(nodes, formula, root, true);
3230
- },
3231
- 'nth-of-type': function(nodes, formula, root) {
3232
- return Selector.pseudos.nth(nodes, formula, root, false, true);
3233
- },
3234
- 'nth-last-of-type': function(nodes, formula, root) {
3235
- return Selector.pseudos.nth(nodes, formula, root, true, true);
3236
- },
3237
- 'first-of-type': function(nodes, formula, root) {
3238
- return Selector.pseudos.nth(nodes, "1", root, false, true);
3239
- },
3240
- 'last-of-type': function(nodes, formula, root) {
3241
- return Selector.pseudos.nth(nodes, "1", root, true, true);
3242
- },
3243
- 'only-of-type': function(nodes, formula, root) {
3244
- var p = Selector.pseudos;
3245
- return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
3246
- },
3247
-
3248
- // handles the an+b logic
3249
- getIndices: function(a, b, total) {
3250
- if (a == 0) return b > 0 ? [b] : [];
3251
- return $R(1, total).inject([], function(memo, i) {
3252
- if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
3253
- return memo;
3254
- });
3255
- },
3256
-
3257
- // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
3258
- nth: function(nodes, formula, root, reverse, ofType) {
3259
- if (nodes.length == 0) return [];
3260
- if (formula == 'even') formula = '2n+0';
3261
- if (formula == 'odd') formula = '2n+1';
3262
- var h = Selector.handlers, results = [], indexed = [], m;
3263
- h.mark(nodes);
3264
- for (var i = 0, node; node = nodes[i]; i++) {
3265
- if (!node.parentNode._counted) {
3266
- h.index(node.parentNode, reverse, ofType);
3267
- indexed.push(node.parentNode);
3268
- }
3269
- }
3270
- if (formula.match(/^\d+$/)) { // just a number
3271
- formula = Number(formula);
3272
- for (var i = 0, node; node = nodes[i]; i++)
3273
- if (node.nodeIndex == formula) results.push(node);
3274
- } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
3275
- if (m[1] == "-") m[1] = -1;
3276
- var a = m[1] ? Number(m[1]) : 1;
3277
- var b = m[2] ? Number(m[2]) : 0;
3278
- var indices = Selector.pseudos.getIndices(a, b, nodes.length);
3279
- for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
3280
- for (var j = 0; j < l; j++)
3281
- if (node.nodeIndex == indices[j]) results.push(node);
3282
- }
3283
- }
3284
- h.unmark(nodes);
3285
- h.unmark(indexed);
3286
- return results;
3287
- },
3288
-
3289
- 'empty': function(nodes, value, root) {
3290
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
3291
- // IE treats comments as element nodes
3292
- if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue;
3293
- results.push(node);
3294
- }
3295
- return results;
3296
- },
3297
-
3298
- 'not': function(nodes, selector, root) {
3299
- var h = Selector.handlers, selectorType, m;
3300
- var exclusions = new Selector(selector).findElements(root);
3301
- h.mark(exclusions);
3302
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3303
- if (!node._counted) results.push(node);
3304
- h.unmark(exclusions);
3305
- return results;
3306
- },
3307
-
3308
- 'enabled': function(nodes, value, root) {
3309
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3310
- if (!node.disabled) results.push(node);
3311
- return results;
3312
- },
3313
-
3314
- 'disabled': function(nodes, value, root) {
3315
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3316
- if (node.disabled) results.push(node);
3317
- return results;
3318
- },
3319
-
3320
- 'checked': function(nodes, value, root) {
3321
- for (var i = 0, results = [], node; node = nodes[i]; i++)
3322
- if (node.checked) results.push(node);
3323
- return results;
3324
- }
3325
- },
3326
-
3327
- operators: {
3328
- '=': function(nv, v) { return nv == v; },
3329
- '!=': function(nv, v) { return nv != v; },
3330
- '^=': function(nv, v) { return nv.startsWith(v); },
3331
- '$=': function(nv, v) { return nv.endsWith(v); },
3332
- '*=': function(nv, v) { return nv.include(v); },
3333
- '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
3334
- '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
3335
- },
3336
-
3337
- matchElements: function(elements, expression) {
3338
- var matches = new Selector(expression).findElements(), h = Selector.handlers;
3339
- h.mark(matches);
3340
- for (var i = 0, results = [], element; element = elements[i]; i++)
3341
- if (element._counted) results.push(element);
3342
- h.unmark(matches);
3343
- return results;
3344
- },
3345
-
3346
- findElement: function(elements, expression, index) {
3347
- if (Object.isNumber(expression)) {
3348
- index = expression; expression = false;
3349
- }
3350
- return Selector.matchElements(elements, expression || '*')[index || 0];
3351
- },
3352
-
3353
- findChildElements: function(element, expressions) {
3354
- var exprs = expressions.join(',');
3355
- expressions = [];
3356
- exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
3357
- expressions.push(m[1].strip());
3358
- });
3359
- var results = [], h = Selector.handlers;
3360
- for (var i = 0, l = expressions.length, selector; i < l; i++) {
3361
- selector = new Selector(expressions[i].strip());
3362
- h.concat(results, selector.findElements(element));
3363
- }
3364
- return (l > 1) ? h.unique(results) : results;
3365
- }
3366
- });
3367
-
3368
- if (Prototype.Browser.IE) {
3369
- // IE returns comment nodes on getElementsByTagName("*").
3370
- // Filter them out.
3371
- Selector.handlers.concat = function(a, b) {
3372
- for (var i = 0, node; node = b[i]; i++)
3373
- if (node.tagName !== "!") a.push(node);
3374
- return a;
3375
- };
3376
- }
3377
-
3378
- function $$() {
3379
- return Selector.findChildElements(document, $A(arguments));
3380
- }
3381
- var Form = {
3382
- reset: function(form) {
3383
- $(form).reset();
3384
- return form;
3385
- },
3386
-
3387
- serializeElements: function(elements, options) {
3388
- if (typeof options != 'object') options = { hash: !!options };
3389
- else if (Object.isUndefined(options.hash)) options.hash = true;
3390
- var key, value, submitted = false, submit = options.submit;
3391
-
3392
- var data = elements.inject({ }, function(result, element) {
3393
- if (!element.disabled && element.name) {
3394
- key = element.name; value = $(element).getValue();
3395
- if (value != null && (element.type != 'submit' || (!submitted &&
3396
- submit !== false && (!submit || key == submit) && (submitted = true)))) {
3397
- if (key in result) {
3398
- // a key is already present; construct an array of values
3399
- if (!Object.isArray(result[key])) result[key] = [result[key]];
3400
- result[key].push(value);
3401
- }
3402
- else result[key] = value;
3403
- }
3404
- }
3405
- return result;
3406
- });
3407
-
3408
- return options.hash ? data : Object.toQueryString(data);
3409
- }
3410
- };
3411
-
3412
- Form.Methods = {
3413
- serialize: function(form, options) {
3414
- return Form.serializeElements(Form.getElements(form), options);
3415
- },
3416
-
3417
- getElements: function(form) {
3418
- return $A($(form).getElementsByTagName('*')).inject([],
3419
- function(elements, child) {
3420
- if (Form.Element.Serializers[child.tagName.toLowerCase()])
3421
- elements.push(Element.extend(child));
3422
- return elements;
3423
- }
3424
- );
3425
- },
3426
-
3427
- getInputs: function(form, typeName, name) {
3428
- form = $(form);
3429
- var inputs = form.getElementsByTagName('input');
3430
-
3431
- if (!typeName && !name) return $A(inputs).map(Element.extend);
3432
-
3433
- for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
3434
- var input = inputs[i];
3435
- if ((typeName && input.type != typeName) || (name && input.name != name))
3436
- continue;
3437
- matchingInputs.push(Element.extend(input));
3438
- }
3439
-
3440
- return matchingInputs;
3441
- },
3442
-
3443
- disable: function(form) {
3444
- form = $(form);
3445
- Form.getElements(form).invoke('disable');
3446
- return form;
3447
- },
3448
-
3449
- enable: function(form) {
3450
- form = $(form);
3451
- Form.getElements(form).invoke('enable');
3452
- return form;
3453
- },
3454
-
3455
- findFirstElement: function(form) {
3456
- var elements = $(form).getElements().findAll(function(element) {
3457
- return 'hidden' != element.type && !element.disabled;
3458
- });
3459
- var firstByIndex = elements.findAll(function(element) {
3460
- return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
3461
- }).sortBy(function(element) { return element.tabIndex }).first();
3462
-
3463
- return firstByIndex ? firstByIndex : elements.find(function(element) {
3464
- return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
3465
- });
3466
- },
3467
-
3468
- focusFirstElement: function(form) {
3469
- form = $(form);
3470
- form.findFirstElement().activate();
3471
- return form;
3472
- },
3473
-
3474
- request: function(form, options) {
3475
- form = $(form), options = Object.clone(options || { });
3476
-
3477
- var params = options.parameters, action = form.readAttribute('action') || '';
3478
- if (action.blank()) action = window.location.href;
3479
- options.parameters = form.serialize(true);
3480
-
3481
- if (params) {
3482
- if (Object.isString(params)) params = params.toQueryParams();
3483
- Object.extend(options.parameters, params);
3484
- }
3485
-
3486
- if (form.hasAttribute('method') && !options.method)
3487
- options.method = form.method;
3488
-
3489
- return new Ajax.Request(action, options);
3490
- }
3491
- };
3492
-
3493
- /*--------------------------------------------------------------------------*/
3494
-
3495
- Form.Element = {
3496
- focus: function(element) {
3497
- $(element).focus();
3498
- return element;
3499
- },
3500
-
3501
- select: function(element) {
3502
- $(element).select();
3503
- return element;
3504
- }
3505
- };
3506
-
3507
- Form.Element.Methods = {
3508
- serialize: function(element) {
3509
- element = $(element);
3510
- if (!element.disabled && element.name) {
3511
- var value = element.getValue();
3512
- if (value != undefined) {
3513
- var pair = { };
3514
- pair[element.name] = value;
3515
- return Object.toQueryString(pair);
3516
- }
3517
- }
3518
- return '';
3519
- },
3520
-
3521
- getValue: function(element) {
3522
- element = $(element);
3523
- var method = element.tagName.toLowerCase();
3524
- return Form.Element.Serializers[method](element);
3525
- },
3526
-
3527
- setValue: function(element, value) {
3528
- element = $(element);
3529
- var method = element.tagName.toLowerCase();
3530
- Form.Element.Serializers[method](element, value);
3531
- return element;
3532
- },
3533
-
3534
- clear: function(element) {
3535
- $(element).value = '';
3536
- return element;
3537
- },
3538
-
3539
- present: function(element) {
3540
- return $(element).value != '';
3541
- },
3542
-
3543
- activate: function(element) {
3544
- element = $(element);
3545
- try {
3546
- element.focus();
3547
- if (element.select && (element.tagName.toLowerCase() != 'input' ||
3548
- !['button', 'reset', 'submit'].include(element.type)))
3549
- element.select();
3550
- } catch (e) { }
3551
- return element;
3552
- },
3553
-
3554
- disable: function(element) {
3555
- element = $(element);
3556
- element.blur();
3557
- element.disabled = true;
3558
- return element;
3559
- },
3560
-
3561
- enable: function(element) {
3562
- element = $(element);
3563
- element.disabled = false;
3564
- return element;
3565
- }
3566
- };
3567
-
3568
- /*--------------------------------------------------------------------------*/
3569
-
3570
- var Field = Form.Element;
3571
- var $F = Form.Element.Methods.getValue;
3572
-
3573
- /*--------------------------------------------------------------------------*/
3574
-
3575
- Form.Element.Serializers = {
3576
- input: function(element, value) {
3577
- switch (element.type.toLowerCase()) {
3578
- case 'checkbox':
3579
- case 'radio':
3580
- return Form.Element.Serializers.inputSelector(element, value);
3581
- default:
3582
- return Form.Element.Serializers.textarea(element, value);
3583
- }
3584
- },
3585
-
3586
- inputSelector: function(element, value) {
3587
- if (Object.isUndefined(value)) return element.checked ? element.value : null;
3588
- else element.checked = !!value;
3589
- },
3590
-
3591
- textarea: function(element, value) {
3592
- if (Object.isUndefined(value)) return element.value;
3593
- else element.value = value;
3594
- },
3595
-
3596
- select: function(element, index) {
3597
- if (Object.isUndefined(index))
3598
- return this[element.type == 'select-one' ?
3599
- 'selectOne' : 'selectMany'](element);
3600
- else {
3601
- var opt, value, single = !Object.isArray(index);
3602
- for (var i = 0, length = element.length; i < length; i++) {
3603
- opt = element.options[i];
3604
- value = this.optionValue(opt);
3605
- if (single) {
3606
- if (value == index) {
3607
- opt.selected = true;
3608
- return;
3609
- }
3610
- }
3611
- else opt.selected = index.include(value);
3612
- }
3613
- }
3614
- },
3615
-
3616
- selectOne: function(element) {
3617
- var index = element.selectedIndex;
3618
- return index >= 0 ? this.optionValue(element.options[index]) : null;
3619
- },
3620
-
3621
- selectMany: function(element) {
3622
- var values, length = element.length;
3623
- if (!length) return null;
3624
-
3625
- for (var i = 0, values = []; i < length; i++) {
3626
- var opt = element.options[i];
3627
- if (opt.selected) values.push(this.optionValue(opt));
3628
- }
3629
- return values;
3630
- },
3631
-
3632
- optionValue: function(opt) {
3633
- // extend element because hasAttribute may not be native
3634
- return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
3635
- }
3636
- };
3637
-
3638
- /*--------------------------------------------------------------------------*/
3639
-
3640
- Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
3641
- initialize: function($super, element, frequency, callback) {
3642
- $super(callback, frequency);
3643
- this.element = $(element);
3644
- this.lastValue = this.getValue();
3645
- },
3646
-
3647
- execute: function() {
3648
- var value = this.getValue();
3649
- if (Object.isString(this.lastValue) && Object.isString(value) ?
3650
- this.lastValue != value : String(this.lastValue) != String(value)) {
3651
- this.callback(this.element, value);
3652
- this.lastValue = value;
3653
- }
3654
- }
3655
- });
3656
-
3657
- Form.Element.Observer = Class.create(Abstract.TimedObserver, {
3658
- getValue: function() {
3659
- return Form.Element.getValue(this.element);
3660
- }
3661
- });
3662
-
3663
- Form.Observer = Class.create(Abstract.TimedObserver, {
3664
- getValue: function() {
3665
- return Form.serialize(this.element);
3666
- }
3667
- });
3668
-
3669
- /*--------------------------------------------------------------------------*/
3670
-
3671
- Abstract.EventObserver = Class.create({
3672
- initialize: function(element, callback) {
3673
- this.element = $(element);
3674
- this.callback = callback;
3675
-
3676
- this.lastValue = this.getValue();
3677
- if (this.element.tagName.toLowerCase() == 'form')
3678
- this.registerFormCallbacks();
3679
- else
3680
- this.registerCallback(this.element);
3681
- },
3682
-
3683
- onElementEvent: function() {
3684
- var value = this.getValue();
3685
- if (this.lastValue != value) {
3686
- this.callback(this.element, value);
3687
- this.lastValue = value;
3688
- }
3689
- },
3690
-
3691
- registerFormCallbacks: function() {
3692
- Form.getElements(this.element).each(this.registerCallback, this);
3693
- },
3694
-
3695
- registerCallback: function(element) {
3696
- if (element.type) {
3697
- switch (element.type.toLowerCase()) {
3698
- case 'checkbox':
3699
- case 'radio':
3700
- Event.observe(element, 'click', this.onElementEvent.bind(this));
3701
- break;
3702
- default:
3703
- Event.observe(element, 'change', this.onElementEvent.bind(this));
3704
- break;
3705
- }
3706
- }
3707
- }
3708
- });
3709
-
3710
- Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
3711
- getValue: function() {
3712
- return Form.Element.getValue(this.element);
3713
- }
3714
- });
3715
-
3716
- Form.EventObserver = Class.create(Abstract.EventObserver, {
3717
- getValue: function() {
3718
- return Form.serialize(this.element);
3719
- }
3720
- });
3721
- if (!window.Event) var Event = { };
3722
-
3723
- Object.extend(Event, {
3724
- KEY_BACKSPACE: 8,
3725
- KEY_TAB: 9,
3726
- KEY_RETURN: 13,
3727
- KEY_ESC: 27,
3728
- KEY_LEFT: 37,
3729
- KEY_UP: 38,
3730
- KEY_RIGHT: 39,
3731
- KEY_DOWN: 40,
3732
- KEY_DELETE: 46,
3733
- KEY_HOME: 36,
3734
- KEY_END: 35,
3735
- KEY_PAGEUP: 33,
3736
- KEY_PAGEDOWN: 34,
3737
- KEY_INSERT: 45,
3738
-
3739
- cache: { },
3740
-
3741
- relatedTarget: function(event) {
3742
- var element;
3743
- switch(event.type) {
3744
- case 'mouseover': element = event.fromElement; break;
3745
- case 'mouseout': element = event.toElement; break;
3746
- default: return null;
3747
- }
3748
- return Element.extend(element);
3749
- }
3750
- });
3751
-
3752
- Event.Methods = (function() {
3753
- var isButton;
3754
-
3755
- if (Prototype.Browser.IE) {
3756
- var buttonMap = { 0: 1, 1: 4, 2: 2 };
3757
- isButton = function(event, code) {
3758
- return event.button == buttonMap[code];
3759
- };
3760
-
3761
- } else if (Prototype.Browser.WebKit) {
3762
- isButton = function(event, code) {
3763
- switch (code) {
3764
- case 0: return event.which == 1 && !event.metaKey;
3765
- case 1: return event.which == 1 && event.metaKey;
3766
- default: return false;
3767
- }
3768
- };
3769
-
3770
- } else {
3771
- isButton = function(event, code) {
3772
- return event.which ? (event.which === code + 1) : (event.button === code);
3773
- };
3774
- }
3775
-
3776
- return {
3777
- isLeftClick: function(event) { return isButton(event, 0) },
3778
- isMiddleClick: function(event) { return isButton(event, 1) },
3779
- isRightClick: function(event) { return isButton(event, 2) },
3780
-
3781
- element: function(event) {
3782
- var node = Event.extend(event).target;
3783
- return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node);
3784
- },
3785
-
3786
- findElement: function(event, expression) {
3787
- var element = Event.element(event);
3788
- if (!expression) return element;
3789
- var elements = [element].concat(element.ancestors());
3790
- return Selector.findElement(elements, expression, 0);
3791
- },
3792
-
3793
- pointer: function(event) {
3794
- return {
3795
- x: event.pageX || (event.clientX +
3796
- (document.documentElement.scrollLeft || document.body.scrollLeft)),
3797
- y: event.pageY || (event.clientY +
3798
- (document.documentElement.scrollTop || document.body.scrollTop))
3799
- };
3800
- },
3801
-
3802
- pointerX: function(event) { return Event.pointer(event).x },
3803
- pointerY: function(event) { return Event.pointer(event).y },
3804
-
3805
- stop: function(event) {
3806
- Event.extend(event);
3807
- event.preventDefault();
3808
- event.stopPropagation();
3809
- event.stopped = true;
3810
- }
3811
- };
3812
- })();
3813
-
3814
- Event.extend = (function() {
3815
- var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
3816
- m[name] = Event.Methods[name].methodize();
3817
- return m;
3818
- });
3819
-
3820
- if (Prototype.Browser.IE) {
3821
- Object.extend(methods, {
3822
- stopPropagation: function() { this.cancelBubble = true },
3823
- preventDefault: function() { this.returnValue = false },
3824
- inspect: function() { return "[object Event]" }
3825
- });
3826
-
3827
- return function(event) {
3828
- if (!event) return false;
3829
- if (event._extendedByPrototype) return event;
3830
-
3831
- event._extendedByPrototype = Prototype.emptyFunction;
3832
- var pointer = Event.pointer(event);
3833
- Object.extend(event, {
3834
- target: event.srcElement,
3835
- relatedTarget: Event.relatedTarget(event),
3836
- pageX: pointer.x,
3837
- pageY: pointer.y
3838
- });
3839
- return Object.extend(event, methods);
3840
- };
3841
-
3842
- } else {
3843
- Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__;
3844
- Object.extend(Event.prototype, methods);
3845
- return Prototype.K;
3846
- }
3847
- })();
3848
-
3849
- Object.extend(Event, (function() {
3850
- var cache = Event.cache;
3851
-
3852
- function getEventID(element) {
3853
- if (element._eventID) return element._eventID;
3854
- arguments.callee.id = arguments.callee.id || 1;
3855
- return element._eventID = ++arguments.callee.id;
3856
- }
3857
-
3858
- function getDOMEventName(eventName) {
3859
- if (eventName && eventName.include(':')) return "dataavailable";
3860
- return eventName;
3861
- }
3862
-
3863
- function getCacheForID(id) {
3864
- return cache[id] = cache[id] || { };
3865
- }
3866
-
3867
- function getWrappersForEventName(id, eventName) {
3868
- var c = getCacheForID(id);
3869
- return c[eventName] = c[eventName] || [];
3870
- }
3871
-
3872
- function createWrapper(element, eventName, handler) {
3873
- var id = getEventID(element);
3874
- var c = getWrappersForEventName(id, eventName);
3875
- if (c.pluck("handler").include(handler)) return false;
3876
-
3877
- var wrapper = function(event) {
3878
- if (!Event || !Event.extend ||
3879
- (event.eventName && event.eventName != eventName))
3880
- return false;
3881
-
3882
- Event.extend(event);
3883
- handler.call(element, event)
3884
- };
3885
-
3886
- wrapper.handler = handler;
3887
- c.push(wrapper);
3888
- return wrapper;
3889
- }
3890
-
3891
- function findWrapper(id, eventName, handler) {
3892
- var c = getWrappersForEventName(id, eventName);
3893
- return c.find(function(wrapper) { return wrapper.handler == handler });
3894
- }
3895
-
3896
- function destroyWrapper(id, eventName, handler) {
3897
- var c = getCacheForID(id);
3898
- if (!c[eventName]) return false;
3899
- c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
3900
- }
3901
-
3902
- function destroyCache() {
3903
- for (var id in cache)
3904
- for (var eventName in cache[id])
3905
- cache[id][eventName] = null;
3906
- }
3907
-
3908
- if (window.attachEvent) {
3909
- window.attachEvent("onunload", destroyCache);
3910
- }
3911
-
3912
- return {
3913
- observe: function(element, eventName, handler) {
3914
- element = $(element);
3915
- var name = getDOMEventName(eventName);
3916
-
3917
- var wrapper = createWrapper(element, eventName, handler);
3918
- if (!wrapper) return element;
3919
-
3920
- if (element.addEventListener) {
3921
- element.addEventListener(name, wrapper, false);
3922
- } else {
3923
- element.attachEvent("on" + name, wrapper);
3924
- }
3925
-
3926
- return element;
3927
- },
3928
-
3929
- stopObserving: function(element, eventName, handler) {
3930
- element = $(element);
3931
- var id = getEventID(element), name = getDOMEventName(eventName);
3932
-
3933
- if (!handler && eventName) {
3934
- getWrappersForEventName(id, eventName).each(function(wrapper) {
3935
- element.stopObserving(eventName, wrapper.handler);
3936
- });
3937
- return element;
3938
-
3939
- } else if (!eventName) {
3940
- Object.keys(getCacheForID(id)).each(function(eventName) {
3941
- element.stopObserving(eventName);
3942
- });
3943
- return element;
3944
- }
3945
-
3946
- var wrapper = findWrapper(id, eventName, handler);
3947
- if (!wrapper) return element;
3948
-
3949
- if (element.removeEventListener) {
3950
- element.removeEventListener(name, wrapper, false);
3951
- } else {
3952
- element.detachEvent("on" + name, wrapper);
3953
- }
3954
-
3955
- destroyWrapper(id, eventName, handler);
3956
-
3957
- return element;
3958
- },
3959
-
3960
- fire: function(element, eventName, memo) {
3961
- element = $(element);
3962
- if (element == document && document.createEvent && !element.dispatchEvent)
3963
- element = document.documentElement;
3964
-
3965
- if (document.createEvent) {
3966
- var event = document.createEvent("HTMLEvents");
3967
- event.initEvent("dataavailable", true, true);
3968
- } else {
3969
- var event = document.createEventObject();
3970
- event.eventType = "ondataavailable";
3971
- }
3972
-
3973
- event.eventName = eventName;
3974
- event.memo = memo || { };
3975
-
3976
- if (document.createEvent) {
3977
- element.dispatchEvent(event);
3978
- } else {
3979
- element.fireEvent(event.eventType, event);
3980
- }
3981
-
3982
- return Event.extend(event);
3983
- }
3984
- };
3985
- })());
3986
-
3987
- Object.extend(Event, Event.Methods);
3988
-
3989
- Element.addMethods({
3990
- fire: Event.fire,
3991
- observe: Event.observe,
3992
- stopObserving: Event.stopObserving
3993
- });
3994
-
3995
- Object.extend(document, {
3996
- fire: Element.Methods.fire.methodize(),
3997
- observe: Element.Methods.observe.methodize(),
3998
- stopObserving: Element.Methods.stopObserving.methodize()
3999
- });
4000
-
4001
- (function() {
4002
- /* Support for the DOMContentLoaded event is based on work by Dan Webb,
4003
- Matthias Miller, Dean Edwards and John Resig. */
4004
-
4005
- var timer, fired = false;
4006
-
4007
- function fireContentLoadedEvent() {
4008
- if (fired) return;
4009
- if (timer) window.clearInterval(timer);
4010
- document.fire("dom:loaded");
4011
- fired = true;
4012
- }
4013
-
4014
- if (document.addEventListener) {
4015
- if (Prototype.Browser.WebKit) {
4016
- timer = window.setInterval(function() {
4017
- if (/loaded|complete/.test(document.readyState))
4018
- fireContentLoadedEvent();
4019
- }, 0);
4020
-
4021
- Event.observe(window, "load", fireContentLoadedEvent);
4022
-
4023
- } else {
4024
- document.addEventListener("DOMContentLoaded",
4025
- fireContentLoadedEvent, false);
4026
- }
4027
-
4028
- } else {
4029
- document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
4030
- $("__onDOMContentLoaded").onreadystatechange = function() {
4031
- if (this.readyState == "complete") {
4032
- this.onreadystatechange = null;
4033
- fireContentLoadedEvent();
4034
- }
4035
- };
4036
- }
4037
- })();
4038
- /*------------------------------- DEPRECATED -------------------------------*/
4039
-
4040
- Hash.toQueryString = Object.toQueryString;
4041
-
4042
- var Toggle = { display: Element.toggle };
4043
-
4044
- Element.Methods.childOf = Element.Methods.descendantOf;
4045
-
4046
- var Insertion = {
4047
- Before: function(element, content) {
4048
- return Element.insert(element, {before:content});
4049
- },
4050
-
4051
- Top: function(element, content) {
4052
- return Element.insert(element, {top:content});
4053
- },
4054
-
4055
- Bottom: function(element, content) {
4056
- return Element.insert(element, {bottom:content});
4057
- },
4058
-
4059
- After: function(element, content) {
4060
- return Element.insert(element, {after:content});
4061
- }
4062
- };
4063
-
4064
- var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
4065
-
4066
- // This should be moved to script.aculo.us; notice the deprecated methods
4067
- // further below, that map to the newer Element methods.
4068
- var Position = {
4069
- // set to true if needed, warning: firefox performance problems
4070
- // NOT neeeded for page scrolling, only if draggable contained in
4071
- // scrollable elements
4072
- includeScrollOffsets: false,
4073
-
4074
- // must be called before calling withinIncludingScrolloffset, every time the
4075
- // page is scrolled
4076
- prepare: function() {
4077
- this.deltaX = window.pageXOffset
4078
- || document.documentElement.scrollLeft
4079
- || document.body.scrollLeft
4080
- || 0;
4081
- this.deltaY = window.pageYOffset
4082
- || document.documentElement.scrollTop
4083
- || document.body.scrollTop
4084
- || 0;
4085
- },
4086
-
4087
- // caches x/y coordinate pair to use with overlap
4088
- within: function(element, x, y) {
4089
- if (this.includeScrollOffsets)
4090
- return this.withinIncludingScrolloffsets(element, x, y);
4091
- this.xcomp = x;
4092
- this.ycomp = y;
4093
- this.offset = Element.cumulativeOffset(element);
4094
-
4095
- return (y >= this.offset[1] &&
4096
- y < this.offset[1] + element.offsetHeight &&
4097
- x >= this.offset[0] &&
4098
- x < this.offset[0] + element.offsetWidth);
4099
- },
4100
-
4101
- withinIncludingScrolloffsets: function(element, x, y) {
4102
- var offsetcache = Element.cumulativeScrollOffset(element);
4103
-
4104
- this.xcomp = x + offsetcache[0] - this.deltaX;
4105
- this.ycomp = y + offsetcache[1] - this.deltaY;
4106
- this.offset = Element.cumulativeOffset(element);
4107
-
4108
- return (this.ycomp >= this.offset[1] &&
4109
- this.ycomp < this.offset[1] + element.offsetHeight &&
4110
- this.xcomp >= this.offset[0] &&
4111
- this.xcomp < this.offset[0] + element.offsetWidth);
4112
- },
4113
-
4114
- // within must be called directly before
4115
- overlap: function(mode, element) {
4116
- if (!mode) return 0;
4117
- if (mode == 'vertical')
4118
- return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
4119
- element.offsetHeight;
4120
- if (mode == 'horizontal')
4121
- return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
4122
- element.offsetWidth;
4123
- },
4124
-
4125
- // Deprecation layer -- use newer Element methods now (1.5.2).
4126
-
4127
- cumulativeOffset: Element.Methods.cumulativeOffset,
4128
-
4129
- positionedOffset: Element.Methods.positionedOffset,
4130
-
4131
- absolutize: function(element) {
4132
- Position.prepare();
4133
- return Element.absolutize(element);
4134
- },
4135
-
4136
- relativize: function(element) {
4137
- Position.prepare();
4138
- return Element.relativize(element);
4139
- },
4140
-
4141
- realOffset: Element.Methods.cumulativeScrollOffset,
4142
-
4143
- offsetParent: Element.Methods.getOffsetParent,
4144
-
4145
- page: Element.Methods.viewportOffset,
4146
-
4147
- clone: function(source, target, options) {
4148
- options = options || { };
4149
- return Element.clonePosition(target, source, options);
4150
- }
4151
- };
4152
-
4153
- /*--------------------------------------------------------------------------*/
4154
-
4155
- if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
4156
- function iter(name) {
4157
- return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
4158
- }
4159
-
4160
- instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
4161
- function(element, className) {
4162
- className = className.toString().strip();
4163
- var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
4164
- return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
4165
- } : function(element, className) {
4166
- className = className.toString().strip();
4167
- var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
4168
- if (!classNames && !className) return elements;
4169
-
4170
- var nodes = $(element).getElementsByTagName('*');
4171
- className = ' ' + className + ' ';
4172
-
4173
- for (var i = 0, child, cn; child = nodes[i]; i++) {
4174
- if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
4175
- (classNames && classNames.all(function(name) {
4176
- return !name.toString().blank() && cn.include(' ' + name + ' ');
4177
- }))))
4178
- elements.push(Element.extend(child));
4179
- }
4180
- return elements;
4181
- };
4182
-
4183
- return function(className, parentElement) {
4184
- return $(parentElement || document.body).getElementsByClassName(className);
4185
- };
4186
- }(Element.Methods);
4187
-
4188
- /*--------------------------------------------------------------------------*/
4189
-
4190
- Element.ClassNames = Class.create();
4191
- Element.ClassNames.prototype = {
4192
- initialize: function(element) {
4193
- this.element = $(element);
4194
- },
4195
-
4196
- _each: function(iterator) {
4197
- this.element.className.split(/\s+/).select(function(name) {
4198
- return name.length > 0;
4199
- })._each(iterator);
4200
- },
4201
-
4202
- set: function(className) {
4203
- this.element.className = className;
4204
- },
4205
-
4206
- add: function(classNameToAdd) {
4207
- if (this.include(classNameToAdd)) return;
4208
- this.set($A(this).concat(classNameToAdd).join(' '));
4209
- },
4210
-
4211
- remove: function(classNameToRemove) {
4212
- if (!this.include(classNameToRemove)) return;
4213
- this.set($A(this).without(classNameToRemove).join(' '));
4214
- },
4215
-
4216
- toString: function() {
4217
- return $A(this).join(' ');
4218
- }
4219
- };
4220
-
4221
- Object.extend(Element.ClassNames.prototype, Enumerable);
4222
-
4223
- /*--------------------------------------------------------------------------*/
4224
-
4225
- Element.addMethods();