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,13 +1,3 @@
1
- require 'active_record/associations/association_proxy'
2
- require 'active_record/associations/association_collection'
3
- require 'active_record/associations/belongs_to_association'
4
- require 'active_record/associations/belongs_to_polymorphic_association'
5
- require 'active_record/associations/has_one_association'
6
- require 'active_record/associations/has_many_association'
7
- require 'active_record/associations/has_many_through_association'
8
- require 'active_record/associations/has_and_belongs_to_many_association'
9
- require 'active_record/associations/has_one_through_association'
10
-
11
1
  module ActiveRecord
12
2
  class HasManyThroughAssociationNotFoundError < ActiveRecordError #:nodoc:
13
3
  def initialize(owner_class_name, reflection)
@@ -32,7 +22,7 @@ module ActiveRecord
32
22
  through_reflection = reflection.through_reflection
33
23
  source_reflection_names = reflection.source_reflection_names
34
24
  source_associations = reflection.through_reflection.klass.reflect_on_all_associations.collect { |a| a.name.inspect }
35
- super("Could not find the source association(s) #{source_reflection_names.collect(&:inspect).to_sentence :connector => 'or'} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence :connector => 'or'}?")
25
+ super("Could not find the source association(s) #{source_reflection_names.collect(&:inspect).to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)}?")
36
26
  end
37
27
  end
38
28
 
@@ -61,6 +51,12 @@ module ActiveRecord
61
51
  end
62
52
  end
63
53
 
54
+ class HasAndBelongsToManyAssociationForeignKeyNeeded < ActiveRecordError #:nodoc:
55
+ def initialize(reflection)
56
+ super("Cannot create self referential has_and_belongs_to_many association on '#{reflection.class_name rescue nil}##{reflection.name rescue nil}'. :association_foreign_key cannot be the same as the :foreign_key.")
57
+ end
58
+ end
59
+
64
60
  class EagerLoadPolymorphicError < ActiveRecordError #:nodoc:
65
61
  def initialize(reflection)
66
62
  super("Can not eagerly load the polymorphic association #{reflection.name.inspect}")
@@ -73,7 +69,20 @@ module ActiveRecord
73
69
  end
74
70
  end
75
71
 
72
+ # See ActiveRecord::Associations::ClassMethods for documentation.
76
73
  module Associations # :nodoc:
74
+ # These classes will be loaded when associations are created.
75
+ # So there is no need to eager load them.
76
+ autoload :AssociationCollection, 'active_record/associations/association_collection'
77
+ autoload :AssociationProxy, 'active_record/associations/association_proxy'
78
+ autoload :BelongsToAssociation, 'active_record/associations/belongs_to_association'
79
+ autoload :BelongsToPolymorphicAssociation, 'active_record/associations/belongs_to_polymorphic_association'
80
+ autoload :HasAndBelongsToManyAssociation, 'active_record/associations/has_and_belongs_to_many_association'
81
+ autoload :HasManyAssociation, 'active_record/associations/has_many_association'
82
+ autoload :HasManyThroughAssociation, 'active_record/associations/has_many_through_association'
83
+ autoload :HasOneAssociation, 'active_record/associations/has_one_association'
84
+ autoload :HasOneThroughAssociation, 'active_record/associations/has_one_through_association'
85
+
77
86
  def self.included(base)
78
87
  base.extend(ClassMethods)
79
88
  end
@@ -85,6 +94,18 @@ module ActiveRecord
85
94
  end unless self.new_record?
86
95
  end
87
96
 
97
+ private
98
+ # Gets the specified association instance if it responds to :loaded?, nil otherwise.
99
+ def association_instance_get(name)
100
+ association = instance_variable_get("@#{name}")
101
+ association if association.respond_to?(:loaded?)
102
+ end
103
+
104
+ # Set the specified association instance.
105
+ def association_instance_set(name, association)
106
+ instance_variable_set("@#{name}", association)
107
+ end
108
+
88
109
  # Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like
89
110
  # "Project has one Project Manager" or "Project belongs to a Portfolio". Each macro adds a number of methods to the class which are
90
111
  # specialized according to the collection or association symbol and the options hash. It works much the same way as Ruby's own <tt>attr*</tt>
@@ -118,40 +139,40 @@ module ActiveRecord
118
139
  # | | belongs_to |
119
140
  # generated methods | belongs_to | :polymorphic | has_one
120
141
  # ----------------------------------+------------+--------------+---------
121
- # #other | X | X | X
122
- # #other=(other) | X | X | X
123
- # #build_other(attributes={}) | X | | X
124
- # #create_other(attributes={}) | X | | X
125
- # #other.create!(attributes={}) | | | X
126
- # #other.nil? | X | X |
142
+ # other | X | X | X
143
+ # other=(other) | X | X | X
144
+ # build_other(attributes={}) | X | | X
145
+ # create_other(attributes={}) | X | | X
146
+ # other.create!(attributes={}) | | | X
127
147
  #
128
148
  # ===Collection associations (one-to-many / many-to-many)
129
149
  # | | | has_many
130
150
  # generated methods | habtm | has_many | :through
131
151
  # ----------------------------------+-------+----------+----------
132
- # #others | X | X | X
133
- # #others=(other,other,...) | X | X | X
134
- # #other_ids | X | X | X
135
- # #other_ids=(id,id,...) | X | X | X
136
- # #others<< | X | X | X
137
- # #others.push | X | X | X
138
- # #others.concat | X | X | X
139
- # #others.build(attributes={}) | X | X | X
140
- # #others.create(attributes={}) | X | X | X
141
- # #others.create!(attributes={}) | X | X | X
142
- # #others.size | X | X | X
143
- # #others.length | X | X | X
144
- # #others.count | X | X | X
145
- # #others.sum(args*,&block) | X | X | X
146
- # #others.empty? | X | X | X
147
- # #others.clear | X | X | X
148
- # #others.delete(other,other,...) | X | X | X
149
- # #others.delete_all | X | X |
150
- # #others.destroy_all | X | X | X
151
- # #others.find(*args) | X | X | X
152
- # #others.find_first | X | |
153
- # #others.uniq | X | X | X
154
- # #others.reset | X | X | X
152
+ # others | X | X | X
153
+ # others=(other,other,...) | X | X | X
154
+ # other_ids | X | X | X
155
+ # other_ids=(id,id,...) | X | X | X
156
+ # others<< | X | X | X
157
+ # others.push | X | X | X
158
+ # others.concat | X | X | X
159
+ # others.build(attributes={}) | X | X | X
160
+ # others.create(attributes={}) | X | X | X
161
+ # others.create!(attributes={}) | X | X | X
162
+ # others.size | X | X | X
163
+ # others.length | X | X | X
164
+ # others.count | X | X | X
165
+ # others.sum(args*,&block) | X | X | X
166
+ # others.empty? | X | X | X
167
+ # others.clear | X | X | X
168
+ # others.delete(other,other,...) | X | X | X
169
+ # others.delete_all | X | X |
170
+ # others.destroy_all | X | X | X
171
+ # others.find(*args) | X | X | X
172
+ # others.find_first | X | |
173
+ # others.exists? | X | X | X
174
+ # others.uniq | X | X | X
175
+ # others.reset | X | X | X
155
176
  #
156
177
  # == Cardinality and associations
157
178
  #
@@ -252,6 +273,10 @@ module ActiveRecord
252
273
  # You can manipulate objects and associations before they are saved to the database, but there is some special behavior you should be
253
274
  # aware of, mostly involving the saving of associated objects.
254
275
  #
276
+ # Unless you enable the :autosave option on a <tt>has_one</tt>, <tt>belongs_to</tt>,
277
+ # <tt>has_many</tt>, or <tt>has_and_belongs_to_many</tt> association,
278
+ # in which case the members are always saved.
279
+ #
255
280
  # === One-to-one associations
256
281
  #
257
282
  # * Assigning an object to a +has_one+ association automatically saves that object and the object being replaced (if there is one), in
@@ -505,6 +530,14 @@ module ActiveRecord
505
530
  #
506
531
  # will load posts and eager load the +approved_comments+ association, which contains only those comments that have been approved.
507
532
  #
533
+ # If you eager load an association with a specified <tt>:limit</tt> option, it will be ignored, returning all the associated objects:
534
+ #
535
+ # class Picture < ActiveRecord::Base
536
+ # has_many :most_recent_comments, :class_name => 'Comment', :order => 'id DESC', :limit => 10
537
+ # end
538
+ #
539
+ # Picture.find(:first, :include => :most_recent_comments).most_recent_comments # => returns all associated comments.
540
+ #
508
541
  # When eager loaded, conditions are interpolated in the context of the model class, not the model instance. Conditions are lazily interpolated
509
542
  # before the actual model exists.
510
543
  #
@@ -582,12 +615,13 @@ module ActiveRecord
582
615
  # has_many :clients
583
616
  # end
584
617
  #
585
- # class Company < ActiveRecord::Base; end
618
+ # class Client < ActiveRecord::Base; end
586
619
  # end
587
620
  # end
588
621
  #
589
- # When Firm#clients is called, it will in turn call <tt>MyApplication::Business::Company.find(firm.id)</tt>. If you want to associate
590
- # with a class in another module scope, this can be done by specifying the complete class name. Example:
622
+ # When <tt>Firm#clients</tt> is called, it will in turn call <tt>MyApplication::Business::Client.find_all_by_firm_id(firm.id)</tt>.
623
+ # If you want to associate with a class in another module scope, this can be done by specifying the complete class name.
624
+ # Example:
591
625
  #
592
626
  # module MyApplication
593
627
  # module Business
@@ -611,32 +645,55 @@ module ActiveRecord
611
645
  # All of the association macros can be specialized through options. This makes cases more complex than the simple and guessable ones
612
646
  # possible.
613
647
  module ClassMethods
614
- # Adds the following methods for retrieval and query of collections of associated objects:
615
- # +collection+ is replaced with the symbol passed as the first argument, so
616
- # <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.
617
- # * <tt>collection(force_reload = false)</tt> - Returns an array of all the associated objects.
648
+ # Specifies a one-to-many association. The following methods for retrieval and query of
649
+ # collections of associated objects will be added:
650
+ #
651
+ # [collection(force_reload = false)]
652
+ # Returns an array of all the associated objects.
618
653
  # An empty array is returned if none are found.
619
- # * <tt>collection<<(object, ...)</tt> - Adds one or more objects to the collection by setting their foreign keys to the collection's primary key.
620
- # * <tt>collection.delete(object, ...)</tt> - Removes one or more objects from the collection by setting their foreign keys to +NULL+.
621
- # This will also destroy the objects if they're declared as +belongs_to+ and dependent on this model.
622
- # * <tt>collection=objects</tt> - Replaces the collections content by deleting and adding objects as appropriate.
623
- # * <tt>collection_singular_ids</tt> - Returns an array of the associated objects' ids
624
- # * <tt>collection_singular_ids=ids</tt> - Replace the collection with the objects identified by the primary keys in +ids+
625
- # * <tt>collection.clear</tt> - Removes every object from the collection. This destroys the associated objects if they
626
- # are associated with <tt>:dependent => :destroy</tt>, deletes them directly from the database if <tt>:dependent => :delete_all</tt>,
627
- # otherwise sets their foreign keys to +NULL+.
628
- # * <tt>collection.empty?</tt> - Returns +true+ if there are no associated objects.
629
- # * <tt>collection.size</tt> - Returns the number of associated objects.
630
- # * <tt>collection.find</tt> - Finds an associated object according to the same rules as Base.find.
631
- # * <tt>collection.build(attributes = {}, ...)</tt> - Returns one or more new objects of the collection type that have been instantiated
632
- # with +attributes+ and linked to this object through a foreign key, but have not yet been saved. *Note:* This only works if an
633
- # associated object already exists, not if it's +nil+!
634
- # * <tt>collection.create(attributes = {})</tt> - Returns a new object of the collection type that has been instantiated
635
- # with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
636
- # *Note:* This only works if an associated object already exists, not if it's +nil+!
654
+ # [collection<<(object, ...)]
655
+ # Adds one or more objects to the collection by setting their foreign keys to the collection's primary key.
656
+ # [collection.delete(object, ...)]
657
+ # Removes one or more objects from the collection by setting their foreign keys to +NULL+.
658
+ # Objects will be in addition destroyed if they're associated with <tt>:dependent => :destroy</tt>,
659
+ # and deleted if they're associated with <tt>:dependent => :delete_all</tt>.
660
+ # [collection=objects]
661
+ # Replaces the collections content by deleting and adding objects as appropriate.
662
+ # [collection_singular_ids]
663
+ # Returns an array of the associated objects' ids
664
+ # [collection_singular_ids=ids]
665
+ # Replace the collection with the objects identified by the primary keys in +ids+
666
+ # [collection.clear]
667
+ # Removes every object from the collection. This destroys the associated objects if they
668
+ # are associated with <tt>:dependent => :destroy</tt>, deletes them directly from the
669
+ # database if <tt>:dependent => :delete_all</tt>, otherwise sets their foreign keys to +NULL+.
670
+ # [collection.empty?]
671
+ # Returns +true+ if there are no associated objects.
672
+ # [collection.size]
673
+ # Returns the number of associated objects.
674
+ # [collection.find(...)]
675
+ # Finds an associated object according to the same rules as ActiveRecord::Base.find.
676
+ # [collection.exists?(...)]
677
+ # Checks whether an associated object with the given conditions exists.
678
+ # Uses the same rules as ActiveRecord::Base.exists?.
679
+ # [collection.build(attributes = {}, ...)]
680
+ # Returns one or more new objects of the collection type that have been instantiated
681
+ # with +attributes+ and linked to this object through a foreign key, but have not yet
682
+ # been saved. <b>Note:</b> This only works if an associated object already exists, not if
683
+ # it's +nil+!
684
+ # [collection.create(attributes = {})]
685
+ # Returns a new object of the collection type that has been instantiated
686
+ # with +attributes+, linked to this object through a foreign key, and that has already
687
+ # been saved (if it passed the validation). <b>Note:</b> This only works if an associated
688
+ # object already exists, not if it's +nil+!
689
+ #
690
+ # (*Note*: +collection+ is replaced with the symbol passed as the first argument, so
691
+ # <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.)
692
+ #
693
+ # === Example
637
694
  #
638
695
  # Example: A Firm class declares <tt>has_many :clients</tt>, which will add:
639
- # * <tt>Firm#clients</tt> (similar to <tt>Clients.find :all, :conditions => "firm_id = #{id}"</tt>)
696
+ # * <tt>Firm#clients</tt> (similar to <tt>Clients.find :all, :conditions => ["firm_id = ?", id]</tt>)
640
697
  # * <tt>Firm#clients<<</tt>
641
698
  # * <tt>Firm#clients.delete</tt>
642
699
  # * <tt>Firm#clients=</tt>
@@ -646,51 +703,78 @@ module ActiveRecord
646
703
  # * <tt>Firm#clients.empty?</tt> (similar to <tt>firm.clients.size == 0</tt>)
647
704
  # * <tt>Firm#clients.size</tt> (similar to <tt>Client.count "firm_id = #{id}"</tt>)
648
705
  # * <tt>Firm#clients.find</tt> (similar to <tt>Client.find(id, :conditions => "firm_id = #{id}")</tt>)
706
+ # * <tt>Firm#clients.exists?(:name => 'ACME')</tt> (similar to <tt>Client.exists?(:name => 'ACME', :firm_id => firm.id)</tt>)
649
707
  # * <tt>Firm#clients.build</tt> (similar to <tt>Client.new("firm_id" => id)</tt>)
650
708
  # * <tt>Firm#clients.create</tt> (similar to <tt>c = Client.new("firm_id" => id); c.save; c</tt>)
651
709
  # The declaration can also include an options hash to specialize the behavior of the association.
652
710
  #
653
- # Options are:
654
- # * <tt>:class_name</tt> - Specify the class name of the association. Use it only if that name can't be inferred
711
+ # === Supported options
712
+ # [:class_name]
713
+ # Specify the class name of the association. Use it only if that name can't be inferred
655
714
  # from the association name. So <tt>has_many :products</tt> will by default be linked to the Product class, but
656
715
  # if the real class name is SpecialProduct, you'll have to specify it with this option.
657
- # * <tt>:conditions</tt> - Specify the conditions that the associated objects must meet in order to be included as a +WHERE+
716
+ # [:conditions]
717
+ # Specify the conditions that the associated objects must meet in order to be included as a +WHERE+
658
718
  # SQL fragment, such as <tt>price > 5 AND name LIKE 'B%'</tt>. Record creations from the association are scoped if a hash
659
719
  # is used. <tt>has_many :posts, :conditions => {:published => true}</tt> will create published posts with <tt>@blog.posts.create</tt>
660
720
  # or <tt>@blog.posts.build</tt>.
661
- # * <tt>:order</tt> - Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
721
+ # [:order]
722
+ # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
662
723
  # such as <tt>last_name, first_name DESC</tt>.
663
- # * <tt>:foreign_key</tt> - Specify the foreign key used for the association. By default this is guessed to be the name
724
+ # [:foreign_key]
725
+ # Specify the foreign key used for the association. By default this is guessed to be the name
664
726
  # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_many+ association will use "person_id"
665
727
  # as the default <tt>:foreign_key</tt>.
666
- # * <tt>:dependent</tt> - If set to <tt>:destroy</tt> all the associated objects are destroyed
728
+ # [:primary_key]
729
+ # Specify the method that returns the primary key used for the association. By default this is +id+.
730
+ # [:dependent]
731
+ # If set to <tt>:destroy</tt> all the associated objects are destroyed
667
732
  # alongside this object by calling their +destroy+ method. If set to <tt>:delete_all</tt> all associated
668
733
  # objects are deleted *without* calling their +destroy+ method. If set to <tt>:nullify</tt> all associated
669
734
  # objects' foreign keys are set to +NULL+ *without* calling their +save+ callbacks. *Warning:* This option is ignored when also using
670
735
  # the <tt>:through</tt> option.
671
- # * <tt>:finder_sql</tt> - Specify a complete SQL statement to fetch the association. This is a good way to go for complex
736
+ # [:finder_sql]
737
+ # Specify a complete SQL statement to fetch the association. This is a good way to go for complex
672
738
  # associations that depend on multiple tables. Note: When this option is used, +find_in_collection+ is _not_ added.
673
- # * <tt>:counter_sql</tt> - Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is
739
+ # [:counter_sql]
740
+ # Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is
674
741
  # specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>.
675
- # * <tt>:extend</tt> - Specify a named module for extending the proxy. See "Association extensions".
676
- # * <tt>:include</tt> - Specify second-order associations that should be eager loaded when the collection is loaded.
677
- # * <tt>:group</tt> - An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
678
- # * <tt>:limit</tt> - An integer determining the limit on the number of rows that should be returned.
679
- # * <tt>:offset</tt> - An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
680
- # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if you, for example, want to do a join
681
- # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will rise an error.
682
- # * <tt>:as</tt> - Specifies a polymorphic interface (See <tt>belongs_to</tt>).
683
- # * <tt>:through</tt> - Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
742
+ # [:extend]
743
+ # Specify a named module for extending the proxy. See "Association extensions".
744
+ # [:include]
745
+ # Specify second-order associations that should be eager loaded when the collection is loaded.
746
+ # [:group]
747
+ # An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
748
+ # [:having]
749
+ # Combined with +:group+ this can be used to filter the records that a <tt>GROUP BY</tt> returns. Uses the <tt>HAVING</tt> SQL-clause.
750
+ # [:limit]
751
+ # An integer determining the limit on the number of rows that should be returned.
752
+ # [:offset]
753
+ # An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
754
+ # [:select]
755
+ # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if you, for example, want to do a join
756
+ # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
757
+ # [:as]
758
+ # Specifies a polymorphic interface (See <tt>belongs_to</tt>).
759
+ # [:through]
760
+ # Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
684
761
  # are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a <tt>belongs_to</tt>
685
762
  # or <tt>has_many</tt> association on the join model.
686
- # * <tt>:source</tt> - Specifies the source association name used by <tt>has_many :through</tt> queries. Only use it if the name cannot be
763
+ # [:source]
764
+ # Specifies the source association name used by <tt>has_many :through</tt> queries. Only use it if the name cannot be
687
765
  # inferred from the association. <tt>has_many :subscribers, :through => :subscriptions</tt> will look for either <tt>:subscribers</tt> or
688
766
  # <tt>:subscriber</tt> on Subscription, unless a <tt>:source</tt> is given.
689
- # * <tt>:source_type</tt> - Specifies type of the source association used by <tt>has_many :through</tt> queries where the source
767
+ # [:source_type]
768
+ # Specifies type of the source association used by <tt>has_many :through</tt> queries where the source
690
769
  # association is a polymorphic +belongs_to+.
691
- # * <tt>:uniq</tt> - If true, duplicates will be omitted from the collection. Useful in conjunction with <tt>:through</tt>.
692
- # * <tt>:readonly</tt> - If true, all the associated objects are readonly through the association.
693
- # * <tt>:validate</tt> - If false, don't validate the associated objects when saving the parent object. true by default.
770
+ # [:uniq]
771
+ # If true, duplicates will be omitted from the collection. Useful in conjunction with <tt>:through</tt>.
772
+ # [:readonly]
773
+ # If true, all the associated objects are readonly through the association.
774
+ # [:validate]
775
+ # If false, don't validate the associated objects when saving the parent object. true by default.
776
+ # [:autosave]
777
+ # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default.
694
778
  #
695
779
  # Option examples:
696
780
  # has_many :comments, :order => "posted_on"
@@ -708,11 +792,7 @@ module ActiveRecord
708
792
  # 'ORDER BY p.first_name'
709
793
  def has_many(association_id, options = {}, &extension)
710
794
  reflection = create_has_many_reflection(association_id, options, &extension)
711
-
712
795
  configure_dependency_for_has_many(reflection)
713
-
714
- add_multiple_associated_validation_callbacks(reflection.name) unless options[:validate] == false
715
- add_multiple_associated_save_callbacks(reflection.name)
716
796
  add_association_callbacks(reflection.name, reflection.options)
717
797
 
718
798
  if options[:through]
@@ -722,56 +802,88 @@ module ActiveRecord
722
802
  end
723
803
  end
724
804
 
725
- # Adds the following methods for retrieval and query of a single associated object:
726
- # +association+ is replaced with the symbol passed as the first argument, so
727
- # <tt>has_one :manager</tt> would add among others <tt>manager.nil?</tt>.
728
- # * <tt>association(force_reload = false)</tt> - Returns the associated object. +nil+ is returned if none is found.
729
- # * <tt>association=(associate)</tt> - Assigns the associate object, extracts the primary key, sets it as the foreign key,
805
+ # Specifies a one-to-one association with another class. This method should only be used
806
+ # if the other class contains the foreign key. If the current class contains the foreign key,
807
+ # then you should use +belongs_to+ instead. See also ActiveRecord::Associations::ClassMethods's overview
808
+ # on when to use has_one and when to use belongs_to.
809
+ #
810
+ # The following methods for retrieval and query of a single associated object will be added:
811
+ #
812
+ # [association(force_reload = false)]
813
+ # Returns the associated object. +nil+ is returned if none is found.
814
+ # [association=(associate)]
815
+ # Assigns the associate object, extracts the primary key, sets it as the foreign key,
730
816
  # and saves the associate object.
731
- # * <tt>association.nil?</tt> - Returns +true+ if there is no associated object.
732
- # * <tt>build_association(attributes = {})</tt> - Returns a new object of the associated type that has been instantiated
733
- # with +attributes+ and linked to this object through a foreign key, but has not yet been saved. Note: This ONLY works if
734
- # an association already exists. It will NOT work if the association is +nil+.
735
- # * <tt>create_association(attributes = {})</tt> - Returns a new object of the associated type that has been instantiated
736
- # with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
817
+ # [build_association(attributes = {})]
818
+ # Returns a new object of the associated type that has been instantiated
819
+ # with +attributes+ and linked to this object through a foreign key, but has not
820
+ # yet been saved. <b>Note:</b> This ONLY works if an association already exists.
821
+ # It will NOT work if the association is +nil+.
822
+ # [create_association(attributes = {})]
823
+ # Returns a new object of the associated type that has been instantiated
824
+ # with +attributes+, linked to this object through a foreign key, and that
825
+ # has already been saved (if it passed the validation).
826
+ #
827
+ # (+association+ is replaced with the symbol passed as the first argument, so
828
+ # <tt>has_one :manager</tt> would add among others <tt>manager.nil?</tt>.)
737
829
  #
738
- # Example: An Account class declares <tt>has_one :beneficiary</tt>, which will add:
830
+ # === Example
831
+ #
832
+ # An Account class declares <tt>has_one :beneficiary</tt>, which will add:
739
833
  # * <tt>Account#beneficiary</tt> (similar to <tt>Beneficiary.find(:first, :conditions => "account_id = #{id}")</tt>)
740
834
  # * <tt>Account#beneficiary=(beneficiary)</tt> (similar to <tt>beneficiary.account_id = account.id; beneficiary.save</tt>)
741
- # * <tt>Account#beneficiary.nil?</tt>
742
835
  # * <tt>Account#build_beneficiary</tt> (similar to <tt>Beneficiary.new("account_id" => id)</tt>)
743
836
  # * <tt>Account#create_beneficiary</tt> (similar to <tt>b = Beneficiary.new("account_id" => id); b.save; b</tt>)
744
837
  #
838
+ # === Options
839
+ #
745
840
  # The declaration can also include an options hash to specialize the behavior of the association.
746
841
  #
747
842
  # Options are:
748
- # * <tt>:class_name</tt> - Specify the class name of the association. Use it only if that name can't be inferred
843
+ # [:class_name]
844
+ # Specify the class name of the association. Use it only if that name can't be inferred
749
845
  # from the association name. So <tt>has_one :manager</tt> will by default be linked to the Manager class, but
750
846
  # if the real class name is Person, you'll have to specify it with this option.
751
- # * <tt>:conditions</tt> - Specify the conditions that the associated object must meet in order to be included as a +WHERE+
847
+ # [:conditions]
848
+ # Specify the conditions that the associated object must meet in order to be included as a +WHERE+
752
849
  # SQL fragment, such as <tt>rank = 5</tt>.
753
- # * <tt>:order</tt> - Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
850
+ # [:order]
851
+ # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
754
852
  # such as <tt>last_name, first_name DESC</tt>.
755
- # * <tt>:dependent</tt> - If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to
853
+ # [:dependent]
854
+ # If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to
756
855
  # <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. If set to <tt>:nullify</tt>, the associated
757
856
  # object's foreign key is set to +NULL+. Also, association is assigned.
758
- # * <tt>:foreign_key</tt> - Specify the foreign key used for the association. By default this is guessed to be the name
857
+ # [:foreign_key]
858
+ # Specify the foreign key used for the association. By default this is guessed to be the name
759
859
  # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_one+ association will use "person_id"
760
860
  # as the default <tt>:foreign_key</tt>.
761
- # * <tt>:include</tt> - Specify second-order associations that should be eager loaded when this object is loaded.
762
- # * <tt>:as</tt> - Specifies a polymorphic interface (See <tt>belongs_to</tt>).
763
- # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
861
+ # [:primary_key]
862
+ # Specify the method that returns the primary key used for the association. By default this is +id+.
863
+ # [:include]
864
+ # Specify second-order associations that should be eager loaded when this object is loaded.
865
+ # [:as]
866
+ # Specifies a polymorphic interface (See <tt>belongs_to</tt>).
867
+ # [:select]
868
+ # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
764
869
  # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
765
- # * <tt>:through</tt>: Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
870
+ # [:through]
871
+ # Specifies a Join Model through which to perform the query. Options for <tt>:class_name</tt> and <tt>:foreign_key</tt>
766
872
  # are ignored, as the association uses the source reflection. You can only use a <tt>:through</tt> query through a
767
873
  # <tt>has_one</tt> or <tt>belongs_to</tt> association on the join model.
768
- # * <tt>:source</tt> - Specifies the source association name used by <tt>has_one :through</tt> queries. Only use it if the name cannot be
874
+ # [:source]
875
+ # Specifies the source association name used by <tt>has_one :through</tt> queries. Only use it if the name cannot be
769
876
  # inferred from the association. <tt>has_one :favorite, :through => :favorites</tt> will look for a
770
- # <tt>:favorite</tt> on Favorite, unless a <tt>:source</tt> is given.
771
- # * <tt>:source_type</tt> - Specifies type of the source association used by <tt>has_one :through</tt> queries where the source
772
- # association is a polymorphic +belongs_to+.
773
- # * <tt>:readonly</tt> - If true, the associated object is readonly through the association.
774
- # * <tt>:validate</tt> - If false, don't validate the associated object when saving the parent object. +false+ by default.
877
+ # <tt>:favorite</tt> on Favorite, unless a <tt>:source</tt> is given.
878
+ # [:source_type]
879
+ # Specifies type of the source association used by <tt>has_one :through</tt> queries where the source
880
+ # association is a polymorphic +belongs_to+.
881
+ # [:readonly]
882
+ # If true, the associated object is readonly through the association.
883
+ # [:validate]
884
+ # If false, don't validate the associated object when saving the parent object. +false+ by default.
885
+ # [:autosave]
886
+ # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default.
775
887
  #
776
888
  # Option examples:
777
889
  # has_one :credit_card, :dependent => :destroy # destroys the associated credit card
@@ -788,79 +900,87 @@ module ActiveRecord
788
900
  association_accessor_methods(reflection, ActiveRecord::Associations::HasOneThroughAssociation)
789
901
  else
790
902
  reflection = create_has_one_reflection(association_id, options)
791
-
792
- ivar = "@#{reflection.name}"
793
-
794
- method_name = "has_one_after_save_for_#{reflection.name}".to_sym
795
- define_method(method_name) do
796
- association = instance_variable_get("#{ivar}") if instance_variable_defined?("#{ivar}")
797
-
798
- if !association.nil? && (new_record? || association.new_record? || association["#{reflection.primary_key_name}"] != id)
799
- association["#{reflection.primary_key_name}"] = id
800
- association.save(true)
801
- end
802
- end
803
- after_save method_name
804
-
805
- add_single_associated_validation_callbacks(reflection.name) if options[:validate] == true
806
903
  association_accessor_methods(reflection, HasOneAssociation)
807
904
  association_constructor_method(:build, reflection, HasOneAssociation)
808
905
  association_constructor_method(:create, reflection, HasOneAssociation)
809
-
810
906
  configure_dependency_for_has_one(reflection)
811
907
  end
812
908
  end
813
909
 
814
- # Adds the following methods for retrieval and query for a single associated object for which this object holds an id:
815
- # +association+ is replaced with the symbol passed as the first argument, so
816
- # <tt>belongs_to :author</tt> would add among others <tt>author.nil?</tt>.
817
- # * <tt>association(force_reload = false)</tt> - Returns the associated object. +nil+ is returned if none is found.
818
- # * <tt>association=(associate)</tt> - Assigns the associate object, extracts the primary key, and sets it as the foreign key.
819
- # * <tt>association.nil?</tt> - Returns +true+ if there is no associated object.
820
- # * <tt>build_association(attributes = {})</tt> - Returns a new object of the associated type that has been instantiated
910
+ # Specifies a one-to-one association with another class. This method should only be used
911
+ # if this class contains the foreign key. If the other class contains the foreign key,
912
+ # then you should use +has_one+ instead. See also ActiveRecord::Associations::ClassMethods's overview
913
+ # on when to use +has_one+ and when to use +belongs_to+.
914
+ #
915
+ # Methods will be added for retrieval and query for a single associated object, for which
916
+ # this object holds an id:
917
+ #
918
+ # [association(force_reload = false)]
919
+ # Returns the associated object. +nil+ is returned if none is found.
920
+ # [association=(associate)]
921
+ # Assigns the associate object, extracts the primary key, and sets it as the foreign key.
922
+ # [build_association(attributes = {})]
923
+ # Returns a new object of the associated type that has been instantiated
821
924
  # with +attributes+ and linked to this object through a foreign key, but has not yet been saved.
822
- # * <tt>create_association(attributes = {})</tt> - Returns a new object of the associated type that has been instantiated
823
- # with +attributes+, linked to this object through a foreign key, and that has already been saved (if it passed the validation).
925
+ # [create_association(attributes = {})]
926
+ # Returns a new object of the associated type that has been instantiated
927
+ # with +attributes+, linked to this object through a foreign key, and that
928
+ # has already been saved (if it passed the validation).
929
+ #
930
+ # (+association+ is replaced with the symbol passed as the first argument, so
931
+ # <tt>belongs_to :author</tt> would add among others <tt>author.nil?</tt>.)
824
932
  #
825
- # Example: A Post class declares <tt>belongs_to :author</tt>, which will add:
933
+ # === Example
934
+ #
935
+ # A Post class declares <tt>belongs_to :author</tt>, which will add:
826
936
  # * <tt>Post#author</tt> (similar to <tt>Author.find(author_id)</tt>)
827
937
  # * <tt>Post#author=(author)</tt> (similar to <tt>post.author_id = author.id</tt>)
828
938
  # * <tt>Post#author?</tt> (similar to <tt>post.author == some_author</tt>)
829
- # * <tt>Post#author.nil?</tt>
830
939
  # * <tt>Post#build_author</tt> (similar to <tt>post.author = Author.new</tt>)
831
940
  # * <tt>Post#create_author</tt> (similar to <tt>post.author = Author.new; post.author.save; post.author</tt>)
832
941
  # The declaration can also include an options hash to specialize the behavior of the association.
833
942
  #
834
- # Options are:
835
- # * <tt>:class_name</tt> - Specify the class name of the association. Use it only if that name can't be inferred
943
+ # === Options
944
+ #
945
+ # [:class_name]
946
+ # Specify the class name of the association. Use it only if that name can't be inferred
836
947
  # from the association name. So <tt>has_one :author</tt> will by default be linked to the Author class, but
837
948
  # if the real class name is Person, you'll have to specify it with this option.
838
- # * <tt>:conditions</tt> - Specify the conditions that the associated object must meet in order to be included as a +WHERE+
949
+ # [:conditions]
950
+ # Specify the conditions that the associated object must meet in order to be included as a +WHERE+
839
951
  # SQL fragment, such as <tt>authorized = 1</tt>.
840
- # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
952
+ # [:select]
953
+ # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
841
954
  # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
842
- # * <tt>:foreign_key</tt> - Specify the foreign key used for the association. By default this is guessed to be the name
955
+ # [:foreign_key]
956
+ # Specify the foreign key used for the association. By default this is guessed to be the name
843
957
  # of the association with an "_id" suffix. So a class that defines a <tt>belongs_to :person</tt> association will use
844
958
  # "person_id" as the default <tt>:foreign_key</tt>. Similarly, <tt>belongs_to :favorite_person, :class_name => "Person"</tt>
845
959
  # will use a foreign key of "favorite_person_id".
846
- # * <tt>:dependent</tt> - If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to
960
+ # [:dependent]
961
+ # If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to
847
962
  # <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. This option should not be specified when
848
963
  # <tt>belongs_to</tt> is used in conjunction with a <tt>has_many</tt> relationship on another class because of the potential to leave
849
964
  # orphaned records behind.
850
- # * <tt>:counter_cache</tt> - Caches the number of belonging objects on the associate class through the use of +increment_counter+
965
+ # [:counter_cache]
966
+ # Caches the number of belonging objects on the associate class through the use of +increment_counter+
851
967
  # and +decrement_counter+. The counter cache is incremented when an object of this class is created and decremented when it's
852
968
  # destroyed. This requires that a column named <tt>#{table_name}_count</tt> (such as +comments_count+ for a belonging Comment class)
853
969
  # is used on the associate class (such as a Post class). You can also specify a custom counter cache column by providing
854
970
  # a column name instead of a +true+/+false+ value to this option (e.g., <tt>:counter_cache => :my_custom_counter</tt>.)
855
- # When creating a counter cache column, the database statement or migration must specify a default value of <tt>0</tt>, failing to do
856
- # this results in a counter with +NULL+ value, which will never increment.
857
971
  # Note: Specifying a counter cache will add it to that model's list of readonly attributes using +attr_readonly+.
858
- # * <tt>:include</tt> - Specify second-order associations that should be eager loaded when this object is loaded.
859
- # * <tt>:polymorphic</tt> - Specify this association is a polymorphic association by passing +true+.
972
+ # [:include]
973
+ # Specify second-order associations that should be eager loaded when this object is loaded.
974
+ # [:polymorphic]
975
+ # Specify this association is a polymorphic association by passing +true+.
860
976
  # Note: If you've enabled the counter cache, then you may want to add the counter cache attribute
861
977
  # to the +attr_readonly+ list in the associated classes (e.g. <tt>class Post; attr_readonly :comments_count; end</tt>).
862
- # * <tt>:readonly</tt> - If true, the associated object is readonly through the association.
863
- # * <tt>:validate</tt> - If false, don't validate the associated objects when saving the parent object. +false+ by default.
978
+ # [:readonly]
979
+ # If true, the associated object is readonly through the association.
980
+ # [:validate]
981
+ # If false, don't validate the associated objects when saving the parent object. +false+ by default.
982
+ # [:autosave]
983
+ # If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default.
864
984
  #
865
985
  # Option examples:
866
986
  # belongs_to :firm, :foreign_key => "client_of"
@@ -873,66 +993,29 @@ module ActiveRecord
873
993
  def belongs_to(association_id, options = {})
874
994
  reflection = create_belongs_to_reflection(association_id, options)
875
995
 
876
- ivar = "@#{reflection.name}"
877
-
878
996
  if reflection.options[:polymorphic]
879
997
  association_accessor_methods(reflection, BelongsToPolymorphicAssociation)
880
-
881
- method_name = "polymorphic_belongs_to_before_save_for_#{reflection.name}".to_sym
882
- define_method(method_name) do
883
- association = instance_variable_get("#{ivar}") if instance_variable_defined?("#{ivar}")
884
-
885
- if association && association.target
886
- if association.new_record?
887
- association.save(true)
888
- end
889
-
890
- if association.updated?
891
- self["#{reflection.primary_key_name}"] = association.id
892
- self["#{reflection.options[:foreign_type]}"] = association.class.base_class.name.to_s
893
- end
894
- end
895
- end
896
- before_save method_name
897
998
  else
898
999
  association_accessor_methods(reflection, BelongsToAssociation)
899
1000
  association_constructor_method(:build, reflection, BelongsToAssociation)
900
1001
  association_constructor_method(:create, reflection, BelongsToAssociation)
901
-
902
- method_name = "belongs_to_before_save_for_#{reflection.name}".to_sym
903
- define_method(method_name) do
904
- association = instance_variable_get("#{ivar}") if instance_variable_defined?("#{ivar}")
905
-
906
- if !association.nil?
907
- if association.new_record?
908
- association.save(true)
909
- end
910
-
911
- if association.updated?
912
- self["#{reflection.primary_key_name}"] = association.id
913
- end
914
- end
915
- end
916
- before_save method_name
917
1002
  end
918
1003
 
919
1004
  # Create the callbacks to update counter cache
920
1005
  if options[:counter_cache]
921
- cache_column = options[:counter_cache] == true ?
922
- "#{self.to_s.demodulize.underscore.pluralize}_count" :
923
- options[:counter_cache]
1006
+ cache_column = reflection.counter_cache_column
924
1007
 
925
1008
  method_name = "belongs_to_counter_cache_after_create_for_#{reflection.name}".to_sym
926
1009
  define_method(method_name) do
927
- association = send("#{reflection.name}")
928
- association.class.increment_counter("#{cache_column}", send("#{reflection.primary_key_name}")) unless association.nil?
1010
+ association = send(reflection.name)
1011
+ association.class.increment_counter(cache_column, send(reflection.primary_key_name)) unless association.nil?
929
1012
  end
930
1013
  after_create method_name
931
1014
 
932
1015
  method_name = "belongs_to_counter_cache_before_destroy_for_#{reflection.name}".to_sym
933
1016
  define_method(method_name) do
934
- association = send("#{reflection.name}")
935
- association.class.decrement_counter("#{cache_column}", send("#{reflection.primary_key_name}")) unless association.nil?
1017
+ association = send(reflection.name)
1018
+ association.class.decrement_counter(cache_column, send(reflection.primary_key_name)) unless association.nil?
936
1019
  end
937
1020
  before_destroy method_name
938
1021
 
@@ -941,13 +1024,12 @@ module ActiveRecord
941
1024
  )
942
1025
  end
943
1026
 
944
- add_single_associated_validation_callbacks(reflection.name) if options[:validate] == true
945
-
946
1027
  configure_dependency_for_belongs_to(reflection)
947
1028
  end
948
1029
 
949
- # Associates two classes via an intermediate join table. Unless the join table is explicitly specified as
950
- # an option, it is guessed using the lexical order of the class names. So a join between Developer and Project
1030
+ # Specifies a many-to-many relationship with another class. This associates two classes via an
1031
+ # intermediate join table. Unless the join table is explicitly specified as an option, it is
1032
+ # guessed using the lexical order of the class names. So a join between Developer and Project
951
1033
  # will give the default join table name of "developers_projects" because "D" outranks "P". Note that this precedence
952
1034
  # is calculated using the <tt><</tt> operator for String. This means that if the strings are of different lengths,
953
1035
  # and the strings are equal when compared up to the shortest length, then the longer string is considered of higher
@@ -956,34 +1038,70 @@ module ActiveRecord
956
1038
  # but it in fact generates a join table name of "paper_boxes_papers". Be aware of this caveat, and use the
957
1039
  # custom <tt>:join_table</tt> option if you need to.
958
1040
  #
1041
+ # The join table should not have a primary key or a model associated with it. You must manually generate the
1042
+ # join table with a migration such as this:
1043
+ #
1044
+ # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration
1045
+ # def self.up
1046
+ # create_table :developers_projects, :id => false do |t|
1047
+ # t.integer :developer_id
1048
+ # t.integer :project_id
1049
+ # end
1050
+ # end
1051
+ #
1052
+ # def self.down
1053
+ # drop_table :developers_projects
1054
+ # end
1055
+ # end
1056
+ #
959
1057
  # Deprecated: Any additional fields added to the join table will be placed as attributes when pulling records out through
960
1058
  # +has_and_belongs_to_many+ associations. Records returned from join tables with additional attributes will be marked as
961
1059
  # readonly (because we can't save changes to the additional attributes). It's strongly recommended that you upgrade any
962
1060
  # associations with attributes to a real join model (see introduction).
963
1061
  #
964
1062
  # Adds the following methods for retrieval and query:
965
- # +collection+ is replaced with the symbol passed as the first argument, so
966
- # <tt>has_and_belongs_to_many :categories</tt> would add among others <tt>categories.empty?</tt>.
967
- # * <tt>collection(force_reload = false)</tt> - Returns an array of all the associated objects.
1063
+ #
1064
+ # [collection(force_reload = false)]
1065
+ # Returns an array of all the associated objects.
968
1066
  # An empty array is returned if none are found.
969
- # * <tt>collection<<(object, ...)</tt> - Adds one or more objects to the collection by creating associations in the join table
1067
+ # [collection<<(object, ...)]
1068
+ # Adds one or more objects to the collection by creating associations in the join table
970
1069
  # (<tt>collection.push</tt> and <tt>collection.concat</tt> are aliases to this method).
971
- # * <tt>collection.delete(object, ...)</tt> - Removes one or more objects from the collection by removing their associations from the join table.
1070
+ # [collection.delete(object, ...)]
1071
+ # Removes one or more objects from the collection by removing their associations from the join table.
972
1072
  # This does not destroy the objects.
973
- # * <tt>collection=objects</tt> - Replaces the collection's content by deleting and adding objects as appropriate.
974
- # * <tt>collection_singular_ids</tt> - Returns an array of the associated objects' ids.
975
- # * <tt>collection_singular_ids=ids</tt> - Replace the collection by the objects identified by the primary keys in +ids+.
976
- # * <tt>collection.clear</tt> - Removes every object from the collection. This does not destroy the objects.
977
- # * <tt>collection.empty?</tt> - Returns +true+ if there are no associated objects.
978
- # * <tt>collection.size</tt> - Returns the number of associated objects.
979
- # * <tt>collection.find(id)</tt> - Finds an associated object responding to the +id+ and that
1073
+ # [collection=objects]
1074
+ # Replaces the collection's content by deleting and adding objects as appropriate.
1075
+ # [collection_singular_ids]
1076
+ # Returns an array of the associated objects' ids.
1077
+ # [collection_singular_ids=ids]
1078
+ # Replace the collection by the objects identified by the primary keys in +ids+.
1079
+ # [collection.clear]
1080
+ # Removes every object from the collection. This does not destroy the objects.
1081
+ # [collection.empty?]
1082
+ # Returns +true+ if there are no associated objects.
1083
+ # [collection.size]
1084
+ # Returns the number of associated objects.
1085
+ # [collection.find(id)]
1086
+ # Finds an associated object responding to the +id+ and that
980
1087
  # meets the condition that it has to be associated with this object.
981
- # * <tt>collection.build(attributes = {})</tt> - Returns a new object of the collection type that has been instantiated
1088
+ # Uses the same rules as ActiveRecord::Base.find.
1089
+ # [collection.exists?(...)]
1090
+ # Checks whether an associated object with the given conditions exists.
1091
+ # Uses the same rules as ActiveRecord::Base.exists?.
1092
+ # [collection.build(attributes = {})]
1093
+ # Returns a new object of the collection type that has been instantiated
982
1094
  # with +attributes+ and linked to this object through the join table, but has not yet been saved.
983
- # * <tt>collection.create(attributes = {})</tt> - Returns a new object of the collection type that has been instantiated
1095
+ # [collection.create(attributes = {})]
1096
+ # Returns a new object of the collection type that has been instantiated
984
1097
  # with +attributes+, linked to this object through the join table, and that has already been saved (if it passed the validation).
985
1098
  #
986
- # Example: A Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add:
1099
+ # (+collection+ is replaced with the symbol passed as the first argument, so
1100
+ # <tt>has_and_belongs_to_many :categories</tt> would add among others <tt>categories.empty?</tt>.)
1101
+ #
1102
+ # === Example
1103
+ #
1104
+ # A Developer class declares <tt>has_and_belongs_to_many :projects</tt>, which will add:
987
1105
  # * <tt>Developer#projects</tt>
988
1106
  # * <tt>Developer#projects<<</tt>
989
1107
  # * <tt>Developer#projects.delete</tt>
@@ -994,44 +1112,72 @@ module ActiveRecord
994
1112
  # * <tt>Developer#projects.empty?</tt>
995
1113
  # * <tt>Developer#projects.size</tt>
996
1114
  # * <tt>Developer#projects.find(id)</tt>
1115
+ # * <tt>Developer#clients.exists?(...)</tt>
997
1116
  # * <tt>Developer#projects.build</tt> (similar to <tt>Project.new("project_id" => id)</tt>)
998
1117
  # * <tt>Developer#projects.create</tt> (similar to <tt>c = Project.new("project_id" => id); c.save; c</tt>)
999
1118
  # The declaration may include an options hash to specialize the behavior of the association.
1000
1119
  #
1001
- # Options are:
1002
- # * <tt>:class_name</tt> - Specify the class name of the association. Use it only if that name can't be inferred
1120
+ # === Options
1121
+ #
1122
+ # [:class_name]
1123
+ # Specify the class name of the association. Use it only if that name can't be inferred
1003
1124
  # from the association name. So <tt>has_and_belongs_to_many :projects</tt> will by default be linked to the
1004
1125
  # Project class, but if the real class name is SuperProject, you'll have to specify it with this option.
1005
- # * <tt>:join_table</tt> - Specify the name of the join table if the default based on lexical order isn't what you want.
1006
- # WARNING: If you're overwriting the table name of either class, the +table_name+ method MUST be declared underneath any
1007
- # +has_and_belongs_to_many+ declaration in order to work.
1008
- # * <tt>:foreign_key</tt> - Specify the foreign key used for the association. By default this is guessed to be the name
1126
+ # [:join_table]
1127
+ # Specify the name of the join table if the default based on lexical order isn't what you want.
1128
+ # <b>WARNING:</b> If you're overwriting the table name of either class, the +table_name+ method
1129
+ # MUST be declared underneath any +has_and_belongs_to_many+ declaration in order to work.
1130
+ # [:foreign_key]
1131
+ # Specify the foreign key used for the association. By default this is guessed to be the name
1009
1132
  # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_and_belongs_to_many+ association
1010
- # will use "person_id" as the default <tt>:foreign_key</tt>.
1011
- # * <tt>:association_foreign_key</tt> - Specify the association foreign key used for the association. By default this is
1012
- # guessed to be the name of the associated class in lower-case and "_id" suffixed. So if the associated class is Project,
1013
- # the +has_and_belongs_to_many+ association will use "project_id" as the default <tt>:association_foreign_key</tt>.
1014
- # * <tt>:conditions</tt> - Specify the conditions that the associated object must meet in order to be included as a +WHERE+
1133
+ # to Project will use "person_id" as the default <tt>:foreign_key</tt>.
1134
+ # [:association_foreign_key]
1135
+ # Specify the foreign key used for the association on the receiving side of the association.
1136
+ # By default this is guessed to be the name of the associated class in lower-case and "_id" suffixed.
1137
+ # So if a Person class makes a +has_and_belongs_to_many+ association to Project,
1138
+ # the association will use "project_id" as the default <tt>:association_foreign_key</tt>.
1139
+ # [:conditions]
1140
+ # Specify the conditions that the associated object must meet in order to be included as a +WHERE+
1015
1141
  # SQL fragment, such as <tt>authorized = 1</tt>. Record creations from the association are scoped if a hash is used.
1016
1142
  # <tt>has_many :posts, :conditions => {:published => true}</tt> will create published posts with <tt>@blog.posts.create</tt>
1017
1143
  # or <tt>@blog.posts.build</tt>.
1018
- # * <tt>:order</tt> - Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
1144
+ # [:order]
1145
+ # Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
1019
1146
  # such as <tt>last_name, first_name DESC</tt>
1020
- # * <tt>:uniq</tt> - If true, duplicate associated objects will be ignored by accessors and query methods.
1021
- # * <tt>:finder_sql</tt> - Overwrite the default generated SQL statement used to fetch the association with a manual statement
1022
- # * <tt>:delete_sql</tt> - Overwrite the default generated SQL statement used to remove links between the associated
1147
+ # [:uniq]
1148
+ # If true, duplicate associated objects will be ignored by accessors and query methods.
1149
+ # [:finder_sql]
1150
+ # Overwrite the default generated SQL statement used to fetch the association with a manual statement
1151
+ # [:counter_sql]
1152
+ # Specify a complete SQL statement to fetch the size of the association. If <tt>:finder_sql</tt> is
1153
+ # specified but not <tt>:counter_sql</tt>, <tt>:counter_sql</tt> will be generated by replacing <tt>SELECT ... FROM</tt> with <tt>SELECT COUNT(*) FROM</tt>.
1154
+ # [:delete_sql]
1155
+ # Overwrite the default generated SQL statement used to remove links between the associated
1023
1156
  # classes with a manual statement.
1024
- # * <tt>:insert_sql</tt> - Overwrite the default generated SQL statement used to add links between the associated classes
1157
+ # [:insert_sql]
1158
+ # Overwrite the default generated SQL statement used to add links between the associated classes
1025
1159
  # with a manual statement.
1026
- # * <tt>:extend</tt> - Anonymous module for extending the proxy, see "Association extensions".
1027
- # * <tt>:include</tt> - Specify second-order associations that should be eager loaded when the collection is loaded.
1028
- # * <tt>:group</tt> - An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
1029
- # * <tt>:limit</tt> - An integer determining the limit on the number of rows that should be returned.
1030
- # * <tt>:offset</tt> - An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
1031
- # * <tt>:select</tt> - By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
1160
+ # [:extend]
1161
+ # Anonymous module for extending the proxy, see "Association extensions".
1162
+ # [:include]
1163
+ # Specify second-order associations that should be eager loaded when the collection is loaded.
1164
+ # [:group]
1165
+ # An attribute name by which the result should be grouped. Uses the <tt>GROUP BY</tt> SQL-clause.
1166
+ # [:having]
1167
+ # Combined with +:group+ this can be used to filter the records that a <tt>GROUP BY</tt> returns. Uses the <tt>HAVING</tt> SQL-clause.
1168
+ # [:limit]
1169
+ # An integer determining the limit on the number of rows that should be returned.
1170
+ # [:offset]
1171
+ # An integer determining the offset from where the rows should be fetched. So at 5, it would skip the first 4 rows.
1172
+ # [:select]
1173
+ # By default, this is <tt>*</tt> as in <tt>SELECT * FROM</tt>, but can be changed if, for example, you want to do a join
1032
1174
  # but not include the joined columns. Do not forget to include the primary and foreign keys, otherwise it will raise an error.
1033
- # * <tt>:readonly</tt> - If true, all the associated objects are readonly through the association.
1034
- # * <tt>:validate</tt> - If false, don't validate the associated objects when saving the parent object. +true+ by default.
1175
+ # [:readonly]
1176
+ # If true, all the associated objects are readonly through the association.
1177
+ # [:validate]
1178
+ # If false, don't validate the associated objects when saving the parent object. +true+ by default.
1179
+ # [:autosave]
1180
+ # If true, always save any loaded members and destroy members marked for destruction, when saving the parent object. Off by default.
1035
1181
  #
1036
1182
  # Option examples:
1037
1183
  # has_and_belongs_to_many :projects
@@ -1043,32 +1189,28 @@ module ActiveRecord
1043
1189
  # 'DELETE FROM developers_projects WHERE active=1 AND developer_id = #{id} AND project_id = #{record.id}'
1044
1190
  def has_and_belongs_to_many(association_id, options = {}, &extension)
1045
1191
  reflection = create_has_and_belongs_to_many_reflection(association_id, options, &extension)
1046
-
1047
- add_multiple_associated_validation_callbacks(reflection.name) unless options[:validate] == false
1048
- add_multiple_associated_save_callbacks(reflection.name)
1049
1192
  collection_accessor_methods(reflection, HasAndBelongsToManyAssociation)
1050
1193
 
1051
1194
  # Don't use a before_destroy callback since users' before_destroy
1052
1195
  # callbacks will be executed after the association is wiped out.
1053
1196
  old_method = "destroy_without_habtm_shim_for_#{reflection.name}"
1054
1197
  class_eval <<-end_eval unless method_defined?(old_method)
1055
- alias_method :#{old_method}, :destroy_without_callbacks
1056
- def destroy_without_callbacks
1057
- #{reflection.name}.clear
1058
- #{old_method}
1059
- end
1198
+ alias_method :#{old_method}, :destroy_without_callbacks # alias_method :destroy_without_habtm_shim_for_posts, :destroy_without_callbacks
1199
+ def destroy_without_callbacks # def destroy_without_callbacks
1200
+ #{reflection.name}.clear # posts.clear
1201
+ #{old_method} # destroy_without_habtm_shim_for_posts
1202
+ end # end
1060
1203
  end_eval
1061
1204
 
1062
1205
  add_association_callbacks(reflection.name, options)
1063
1206
  end
1064
1207
 
1065
1208
  private
1066
- # Generate a join table name from two provided tables names.
1067
- # The order of names in join name is determined by lexical precedence.
1068
- # join_table_name("members", "clubs")
1069
- # => "clubs_members"
1070
- # join_table_name("members", "special_clubs")
1071
- # => "members_special_clubs"
1209
+ # Generates a join table name from two provided table names.
1210
+ # The names in the join table namesme end up in lexicographic order.
1211
+ #
1212
+ # join_table_name("members", "clubs") # => "clubs_members"
1213
+ # join_table_name("members", "special_clubs") # => "members_special_clubs"
1072
1214
  def join_table_name(first_table_name, second_table_name)
1073
1215
  if first_table_name < second_table_name
1074
1216
  join_table = "#{first_table_name}_#{second_table_name}"
@@ -1080,28 +1222,30 @@ module ActiveRecord
1080
1222
  end
1081
1223
 
1082
1224
  def association_accessor_methods(reflection, association_proxy_class)
1083
- ivar = "@#{reflection.name}"
1084
-
1085
1225
  define_method(reflection.name) do |*params|
1086
1226
  force_reload = params.first unless params.empty?
1087
-
1088
- association = instance_variable_get(ivar) if instance_variable_defined?(ivar)
1227
+ association = association_instance_get(reflection.name)
1089
1228
 
1090
1229
  if association.nil? || force_reload
1091
1230
  association = association_proxy_class.new(self, reflection)
1092
1231
  retval = association.reload
1093
1232
  if retval.nil? and association_proxy_class == BelongsToAssociation
1094
- instance_variable_set(ivar, nil)
1233
+ association_instance_set(reflection.name, nil)
1095
1234
  return nil
1096
1235
  end
1097
- instance_variable_set(ivar, association)
1236
+ association_instance_set(reflection.name, association)
1098
1237
  end
1099
1238
 
1100
1239
  association.target.nil? ? nil : association
1101
1240
  end
1102
1241
 
1242
+ define_method("loaded_#{reflection.name}?") do
1243
+ association = association_instance_get(reflection.name)
1244
+ association && association.loaded?
1245
+ end
1246
+
1103
1247
  define_method("#{reflection.name}=") do |new_value|
1104
- association = instance_variable_get(ivar) if instance_variable_defined?(ivar)
1248
+ association = association_instance_get(reflection.name)
1105
1249
 
1106
1250
  if association.nil? || association.target != new_value
1107
1251
  association = association_proxy_class.new(self, reflection)
@@ -1112,7 +1256,7 @@ module ActiveRecord
1112
1256
  self.send(reflection.name, new_value)
1113
1257
  else
1114
1258
  association.replace(new_value)
1115
- instance_variable_set(ivar, new_value.nil? ? nil : association)
1259
+ association_instance_set(reflection.name, new_value.nil? ? nil : association)
1116
1260
  end
1117
1261
  end
1118
1262
 
@@ -1120,20 +1264,18 @@ module ActiveRecord
1120
1264
  return if target.nil? and association_proxy_class == BelongsToAssociation
1121
1265
  association = association_proxy_class.new(self, reflection)
1122
1266
  association.target = target
1123
- instance_variable_set(ivar, association)
1267
+ association_instance_set(reflection.name, association)
1124
1268
  end
1125
1269
  end
1126
1270
 
1127
1271
  def collection_reader_method(reflection, association_proxy_class)
1128
1272
  define_method(reflection.name) do |*params|
1129
- ivar = "@#{reflection.name}"
1130
-
1131
1273
  force_reload = params.first unless params.empty?
1132
- association = instance_variable_get(ivar) if instance_variable_defined?(ivar)
1274
+ association = association_instance_get(reflection.name)
1133
1275
 
1134
- unless association.respond_to?(:loaded?)
1276
+ unless association
1135
1277
  association = association_proxy_class.new(self, reflection)
1136
- instance_variable_set(ivar, association)
1278
+ association_instance_set(reflection.name, association)
1137
1279
  end
1138
1280
 
1139
1281
  association.reload if force_reload
@@ -1142,7 +1284,11 @@ module ActiveRecord
1142
1284
  end
1143
1285
 
1144
1286
  define_method("#{reflection.name.to_s.singularize}_ids") do
1145
- send(reflection.name).map(&:id)
1287
+ if send(reflection.name).loaded? || reflection.options[:finder_sql]
1288
+ send(reflection.name).map(&:id)
1289
+ else
1290
+ send(reflection.name).all(:select => "#{reflection.quoted_table_name}.#{reflection.klass.primary_key}").map(&:id)
1291
+ end
1146
1292
  end
1147
1293
  end
1148
1294
 
@@ -1163,87 +1309,16 @@ module ActiveRecord
1163
1309
  end
1164
1310
  end
1165
1311
  end
1166
-
1167
- def add_single_associated_validation_callbacks(association_name)
1168
- method_name = "validate_associated_records_for_#{association_name}".to_sym
1169
- define_method(method_name) do
1170
- association = instance_variable_get("@#{association_name}")
1171
- if !association.nil?
1172
- errors.add "#{association_name}" unless association.target.nil? || association.valid?
1173
- end
1174
- end
1175
-
1176
- validate method_name
1177
- end
1178
-
1179
- def add_multiple_associated_validation_callbacks(association_name)
1180
- method_name = "validate_associated_records_for_#{association_name}".to_sym
1181
- ivar = "@#{association_name}"
1182
-
1183
- define_method(method_name) do
1184
- association = instance_variable_get(ivar) if instance_variable_defined?(ivar)
1185
-
1186
- if association.respond_to?(:loaded?)
1187
- if new_record?
1188
- association
1189
- elsif association.loaded?
1190
- association.select { |record| record.new_record? }
1191
- else
1192
- association.target.select { |record| record.new_record? }
1193
- end.each do |record|
1194
- errors.add "#{association_name}" unless record.valid?
1195
- end
1196
- end
1197
- end
1198
-
1199
- validate method_name
1200
- end
1201
-
1202
- def add_multiple_associated_save_callbacks(association_name)
1203
- ivar = "@#{association_name}"
1204
-
1205
- method_name = "before_save_associated_records_for_#{association_name}".to_sym
1206
- define_method(method_name) do
1207
- @new_record_before_save = new_record?
1208
- true
1209
- end
1210
- before_save method_name
1211
-
1212
- method_name = "after_create_or_update_associated_records_for_#{association_name}".to_sym
1213
- define_method(method_name) do
1214
- association = instance_variable_get("#{ivar}") if instance_variable_defined?("#{ivar}")
1215
-
1216
- records_to_save = if @new_record_before_save
1217
- association
1218
- elsif association.respond_to?(:loaded?) && association.loaded?
1219
- association.select { |record| record.new_record? }
1220
- elsif association.respond_to?(:loaded?) && !association.loaded?
1221
- association.target.select { |record| record.new_record? }
1222
- else
1223
- []
1224
- end
1225
- records_to_save.each { |record| association.send(:insert_record, record) } unless records_to_save.blank?
1226
-
1227
- # reconstruct the SQL queries now that we know the owner's id
1228
- association.send(:construct_sql) if association.respond_to?(:construct_sql)
1229
- end
1230
-
1231
- # Doesn't use after_save as that would save associations added in after_create/after_update twice
1232
- after_create method_name
1233
- after_update method_name
1234
- end
1235
1312
 
1236
1313
  def association_constructor_method(constructor, reflection, association_proxy_class)
1237
1314
  define_method("#{constructor}_#{reflection.name}") do |*params|
1238
- ivar = "@#{reflection.name}"
1239
-
1240
1315
  attributees = params.first unless params.empty?
1241
1316
  replace_existing = params[1].nil? ? true : params[1]
1242
- association = instance_variable_get(ivar) if instance_variable_defined?(ivar)
1317
+ association = association_instance_get(reflection.name)
1243
1318
 
1244
- if association.nil?
1319
+ unless association
1245
1320
  association = association_proxy_class.new(self, reflection)
1246
- instance_variable_set(ivar, association)
1321
+ association_instance_set(reflection.name, association)
1247
1322
  end
1248
1323
 
1249
1324
  if association_proxy_class == HasOneAssociation
@@ -1263,56 +1338,85 @@ module ActiveRecord
1263
1338
  []
1264
1339
  end
1265
1340
 
1341
+ # Creates before_destroy callback methods that nullify, delete or destroy
1342
+ # has_many associated objects, according to the defined :dependent rule.
1343
+ #
1266
1344
  # See HasManyAssociation#delete_records. Dependent associations
1267
1345
  # delete children, otherwise foreign key is set to NULL.
1268
- def configure_dependency_for_has_many(reflection)
1346
+ #
1347
+ # The +extra_conditions+ parameter, which is not used within the main
1348
+ # Active Record codebase, is meant to allow plugins to define extra
1349
+ # finder conditions.
1350
+ def configure_dependency_for_has_many(reflection, extra_conditions = nil)
1269
1351
  if reflection.options.include?(:dependent)
1270
1352
  # Add polymorphic type if the :as option is present
1271
1353
  dependent_conditions = []
1272
1354
  dependent_conditions << "#{reflection.primary_key_name} = \#{record.quoted_id}"
1273
1355
  dependent_conditions << "#{reflection.options[:as]}_type = '#{base_class.name}'" if reflection.options[:as]
1274
1356
  dependent_conditions << sanitize_sql(reflection.options[:conditions]) if reflection.options[:conditions]
1357
+ dependent_conditions << extra_conditions if extra_conditions
1275
1358
  dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ")
1276
-
1359
+ dependent_conditions = dependent_conditions.gsub('@', '\@')
1277
1360
  case reflection.options[:dependent]
1278
1361
  when :destroy
1279
1362
  method_name = "has_many_dependent_destroy_for_#{reflection.name}".to_sym
1280
1363
  define_method(method_name) do
1281
- send("#{reflection.name}").each { |o| o.destroy }
1364
+ send(reflection.name).each { |o| o.destroy }
1282
1365
  end
1283
1366
  before_destroy method_name
1284
1367
  when :delete_all
1285
- module_eval "before_destroy { |record| #{reflection.class_name}.delete_all(%(#{dependent_conditions})) }"
1368
+ module_eval %Q{
1369
+ before_destroy do |record| # before_destroy do |record|
1370
+ delete_all_has_many_dependencies(record, # delete_all_has_many_dependencies(record,
1371
+ "#{reflection.name}", # "posts",
1372
+ #{reflection.class_name}, # Post,
1373
+ %@#{dependent_conditions}@) # %@...@) # this is a string literal like %(...)
1374
+ end # end
1375
+ }
1286
1376
  when :nullify
1287
- module_eval "before_destroy { |record| #{reflection.class_name}.update_all(%(#{reflection.primary_key_name} = NULL), %(#{dependent_conditions})) }"
1377
+ module_eval %Q{
1378
+ before_destroy do |record| # before_destroy do |record|
1379
+ nullify_has_many_dependencies(record, # nullify_has_many_dependencies(record,
1380
+ "#{reflection.name}", # "posts",
1381
+ #{reflection.class_name}, # Post,
1382
+ "#{reflection.primary_key_name}", # "user_id",
1383
+ %@#{dependent_conditions}@) # %@...@) # this is a string literal like %(...)
1384
+ end # end
1385
+ }
1288
1386
  else
1289
1387
  raise ArgumentError, "The :dependent option expects either :destroy, :delete_all, or :nullify (#{reflection.options[:dependent].inspect})"
1290
1388
  end
1291
1389
  end
1292
1390
  end
1293
1391
 
1392
+ # Creates before_destroy callback methods that nullify, delete or destroy
1393
+ # has_one associated objects, according to the defined :dependent rule.
1294
1394
  def configure_dependency_for_has_one(reflection)
1295
1395
  if reflection.options.include?(:dependent)
1296
1396
  case reflection.options[:dependent]
1297
1397
  when :destroy
1298
1398
  method_name = "has_one_dependent_destroy_for_#{reflection.name}".to_sym
1299
1399
  define_method(method_name) do
1300
- association = send("#{reflection.name}")
1400
+ association = send(reflection.name)
1301
1401
  association.destroy unless association.nil?
1302
1402
  end
1303
1403
  before_destroy method_name
1304
1404
  when :delete
1305
1405
  method_name = "has_one_dependent_delete_for_#{reflection.name}".to_sym
1306
1406
  define_method(method_name) do
1307
- association = send("#{reflection.name}")
1308
- association.class.delete(association.id) unless association.nil?
1407
+ # Retrieve the associated object and delete it. The retrieval
1408
+ # is necessary because there may be multiple associated objects
1409
+ # with foreign keys pointing to this object, and we only want
1410
+ # to delete the correct one, not all of them.
1411
+ association = send(reflection.name)
1412
+ association.delete unless association.nil?
1309
1413
  end
1310
1414
  before_destroy method_name
1311
1415
  when :nullify
1312
1416
  method_name = "has_one_dependent_nullify_for_#{reflection.name}".to_sym
1313
1417
  define_method(method_name) do
1314
- association = send("#{reflection.name}")
1315
- association.update_attribute("#{reflection.primary_key_name}", nil) unless association.nil?
1418
+ association = send(reflection.name)
1419
+ association.update_attribute(reflection.primary_key_name, nil) unless association.nil?
1316
1420
  end
1317
1421
  before_destroy method_name
1318
1422
  else
@@ -1327,49 +1431,63 @@ module ActiveRecord
1327
1431
  when :destroy
1328
1432
  method_name = "belongs_to_dependent_destroy_for_#{reflection.name}".to_sym
1329
1433
  define_method(method_name) do
1330
- association = send("#{reflection.name}")
1434
+ association = send(reflection.name)
1331
1435
  association.destroy unless association.nil?
1332
1436
  end
1333
- before_destroy method_name
1437
+ after_destroy method_name
1334
1438
  when :delete
1335
1439
  method_name = "belongs_to_dependent_delete_for_#{reflection.name}".to_sym
1336
1440
  define_method(method_name) do
1337
- association = send("#{reflection.name}")
1338
- association.class.delete(association.id) unless association.nil?
1441
+ association = send(reflection.name)
1442
+ association.delete unless association.nil?
1339
1443
  end
1340
- before_destroy method_name
1444
+ after_destroy method_name
1341
1445
  else
1342
1446
  raise ArgumentError, "The :dependent option expects either :destroy or :delete (#{reflection.options[:dependent].inspect})"
1343
1447
  end
1344
1448
  end
1345
1449
  end
1346
1450
 
1347
- def create_has_many_reflection(association_id, options, &extension)
1348
- options.assert_valid_keys(
1349
- :class_name, :table_name, :foreign_key,
1350
- :dependent,
1351
- :select, :conditions, :include, :order, :group, :limit, :offset,
1352
- :as, :through, :source, :source_type,
1353
- :uniq,
1354
- :finder_sql, :counter_sql,
1355
- :before_add, :after_add, :before_remove, :after_remove,
1356
- :extend, :readonly,
1357
- :validate
1358
- )
1451
+ def delete_all_has_many_dependencies(record, reflection_name, association_class, dependent_conditions)
1452
+ association_class.delete_all(dependent_conditions)
1453
+ end
1454
+
1455
+ def nullify_has_many_dependencies(record, reflection_name, association_class, primary_key_name, dependent_conditions)
1456
+ association_class.update_all("#{primary_key_name} = NULL", dependent_conditions)
1457
+ end
1458
+
1459
+ mattr_accessor :valid_keys_for_has_many_association
1460
+ @@valid_keys_for_has_many_association = [
1461
+ :class_name, :table_name, :foreign_key, :primary_key,
1462
+ :dependent,
1463
+ :select, :conditions, :include, :order, :group, :having, :limit, :offset,
1464
+ :as, :through, :source, :source_type,
1465
+ :uniq,
1466
+ :finder_sql, :counter_sql,
1467
+ :before_add, :after_add, :before_remove, :after_remove,
1468
+ :extend, :readonly,
1469
+ :validate
1470
+ ]
1359
1471
 
1472
+ def create_has_many_reflection(association_id, options, &extension)
1473
+ options.assert_valid_keys(valid_keys_for_has_many_association)
1360
1474
  options[:extend] = create_extension_modules(association_id, extension, options[:extend])
1361
1475
 
1362
1476
  create_reflection(:has_many, association_id, options, self)
1363
1477
  end
1364
1478
 
1365
- def create_has_one_reflection(association_id, options)
1366
- options.assert_valid_keys(
1367
- :class_name, :foreign_key, :remote, :select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :readonly, :validate
1368
- )
1479
+ mattr_accessor :valid_keys_for_has_one_association
1480
+ @@valid_keys_for_has_one_association = [
1481
+ :class_name, :foreign_key, :remote, :select, :conditions, :order,
1482
+ :include, :dependent, :counter_cache, :extend, :as, :readonly,
1483
+ :validate, :primary_key
1484
+ ]
1369
1485
 
1486
+ def create_has_one_reflection(association_id, options)
1487
+ options.assert_valid_keys(valid_keys_for_has_one_association)
1370
1488
  create_reflection(:has_one, association_id, options, self)
1371
1489
  end
1372
-
1490
+
1373
1491
  def create_has_one_through_reflection(association_id, options)
1374
1492
  options.assert_valid_keys(
1375
1493
  :class_name, :foreign_key, :remote, :select, :conditions, :order, :include, :dependent, :counter_cache, :extend, :as, :through, :source, :source_type, :validate
@@ -1377,12 +1495,15 @@ module ActiveRecord
1377
1495
  create_reflection(:has_one, association_id, options, self)
1378
1496
  end
1379
1497
 
1380
- def create_belongs_to_reflection(association_id, options)
1381
- options.assert_valid_keys(
1382
- :class_name, :foreign_key, :foreign_type, :remote, :select, :conditions, :include, :dependent,
1383
- :counter_cache, :extend, :polymorphic, :readonly, :validate
1384
- )
1498
+ mattr_accessor :valid_keys_for_belongs_to_association
1499
+ @@valid_keys_for_belongs_to_association = [
1500
+ :class_name, :foreign_key, :foreign_type, :remote, :select, :conditions,
1501
+ :include, :dependent, :counter_cache, :extend, :polymorphic, :readonly,
1502
+ :validate
1503
+ ]
1385
1504
 
1505
+ def create_belongs_to_reflection(association_id, options)
1506
+ options.assert_valid_keys(valid_keys_for_belongs_to_association)
1386
1507
  reflection = create_reflection(:belongs_to, association_id, options, self)
1387
1508
 
1388
1509
  if options[:polymorphic]
@@ -1392,20 +1513,27 @@ module ActiveRecord
1392
1513
  reflection
1393
1514
  end
1394
1515
 
1516
+ mattr_accessor :valid_keys_for_has_and_belongs_to_many_association
1517
+ @@valid_keys_for_has_and_belongs_to_many_association = [
1518
+ :class_name, :table_name, :join_table, :foreign_key, :association_foreign_key,
1519
+ :select, :conditions, :include, :order, :group, :having, :limit, :offset,
1520
+ :uniq,
1521
+ :finder_sql, :counter_sql, :delete_sql, :insert_sql,
1522
+ :before_add, :after_add, :before_remove, :after_remove,
1523
+ :extend, :readonly,
1524
+ :validate
1525
+ ]
1526
+
1395
1527
  def create_has_and_belongs_to_many_reflection(association_id, options, &extension)
1396
- options.assert_valid_keys(
1397
- :class_name, :table_name, :join_table, :foreign_key, :association_foreign_key,
1398
- :select, :conditions, :include, :order, :group, :limit, :offset,
1399
- :uniq,
1400
- :finder_sql, :delete_sql, :insert_sql,
1401
- :before_add, :after_add, :before_remove, :after_remove,
1402
- :extend, :readonly,
1403
- :validate
1404
- )
1528
+ options.assert_valid_keys(valid_keys_for_has_and_belongs_to_many_association)
1405
1529
 
1406
1530
  options[:extend] = create_extension_modules(association_id, extension, options[:extend])
1407
1531
 
1408
1532
  reflection = create_reflection(:has_and_belongs_to_many, association_id, options, self)
1533
+
1534
+ if reflection.association_foreign_key == reflection.primary_key_name
1535
+ raise HasAndBelongsToManyAssociationForeignKeyNeeded.new(reflection)
1536
+ end
1409
1537
 
1410
1538
  reflection.options[:join_table] ||= join_table_name(undecorated_table_name(self.to_s), undecorated_table_name(reflection.class_name))
1411
1539
 
@@ -1437,11 +1565,11 @@ module ActiveRecord
1437
1565
  sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} "
1438
1566
  sql << join_dependency.join_associations.collect{|join| join.association_join }.join
1439
1567
 
1440
- add_joins!(sql, options, scope)
1568
+ add_joins!(sql, options[:joins], scope)
1441
1569
  add_conditions!(sql, options[:conditions], scope)
1442
1570
  add_limited_ids_condition!(sql, options, join_dependency) if !using_limitable_reflections?(join_dependency.reflections) && ((scope && scope[:limit]) || options[:limit])
1443
1571
 
1444
- add_group!(sql, options[:group], scope)
1572
+ add_group!(sql, options[:group], options[:having], scope)
1445
1573
  add_order!(sql, options[:order], scope)
1446
1574
  add_limit!(sql, options, scope) if using_limitable_reflections?(join_dependency.reflections)
1447
1575
  add_lock!(sql, options, scope)
@@ -1492,12 +1620,12 @@ module ActiveRecord
1492
1620
  sql << " FROM #{connection.quote_table_name table_name} "
1493
1621
 
1494
1622
  if is_distinct
1495
- sql << distinct_join_associations.collect(&:association_join).join
1496
- add_joins!(sql, options, scope)
1623
+ sql << distinct_join_associations.collect { |assoc| assoc.association_join }.join
1624
+ add_joins!(sql, options[:joins], scope)
1497
1625
  end
1498
1626
 
1499
1627
  add_conditions!(sql, options[:conditions], scope)
1500
- add_group!(sql, options[:group], scope)
1628
+ add_group!(sql, options[:group], options[:having], scope)
1501
1629
 
1502
1630
  if order && is_distinct
1503
1631
  connection.add_order_by_for_association_limiting!(sql, :order => order)
@@ -1510,46 +1638,70 @@ module ActiveRecord
1510
1638
  return sanitize_sql(sql)
1511
1639
  end
1512
1640
 
1641
+ def tables_in_string(string)
1642
+ return [] if string.blank?
1643
+ string.scan(/([\.a-zA-Z_]+).?\./).flatten
1644
+ end
1645
+
1513
1646
  def conditions_tables(options)
1514
1647
  # look in both sets of conditions
1515
1648
  conditions = [scope(:find, :conditions), options[:conditions]].inject([]) do |all, cond|
1516
1649
  case cond
1517
1650
  when nil then all
1518
1651
  when Array then all << cond.first
1652
+ when Hash then all << cond.keys
1519
1653
  else all << cond
1520
1654
  end
1521
1655
  end
1522
- conditions.join(' ').scan(/([\.a-zA-Z_]+).?\./).flatten
1656
+ tables_in_string(conditions.join(' '))
1523
1657
  end
1524
1658
 
1525
1659
  def order_tables(options)
1526
1660
  order = [options[:order], scope(:find, :order) ].join(", ")
1527
1661
  return [] unless order && order.is_a?(String)
1528
- order.scan(/([\.a-zA-Z_]+).?\./).flatten
1662
+ tables_in_string(order)
1529
1663
  end
1530
1664
 
1531
1665
  def selects_tables(options)
1532
1666
  select = options[:select]
1533
1667
  return [] unless select && select.is_a?(String)
1534
- select.scan(/"?([\.a-zA-Z_]+)"?.?\./).flatten
1668
+ tables_in_string(select)
1669
+ end
1670
+
1671
+ def joined_tables(options)
1672
+ scope = scope(:find)
1673
+ joins = options[:joins]
1674
+ merged_joins = scope && scope[:joins] && joins ? merge_joins(scope[:joins], joins) : (joins || scope && scope[:joins])
1675
+ [table_name] + case merged_joins
1676
+ when Symbol, Hash, Array
1677
+ if array_of_strings?(merged_joins)
1678
+ tables_in_string(merged_joins.join(' '))
1679
+ else
1680
+ join_dependency = ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, merged_joins, nil)
1681
+ join_dependency.join_associations.collect {|join_association| [join_association.aliased_join_table_name, join_association.aliased_table_name]}.flatten.compact
1682
+ end
1683
+ else
1684
+ tables_in_string(merged_joins)
1685
+ end
1535
1686
  end
1536
1687
 
1537
1688
  # Checks if the conditions reference a table other than the current model table
1538
- def include_eager_conditions?(options, tables = nil)
1539
- ((tables || conditions_tables(options)) - [table_name]).any?
1689
+ def include_eager_conditions?(options, tables = nil, joined_tables = nil)
1690
+ ((tables || conditions_tables(options)) - (joined_tables || joined_tables(options))).any?
1540
1691
  end
1541
1692
 
1542
1693
  # Checks if the query order references a table other than the current model's table.
1543
- def include_eager_order?(options, tables = nil)
1544
- ((tables || order_tables(options)) - [table_name]).any?
1694
+ def include_eager_order?(options, tables = nil, joined_tables = nil)
1695
+ ((tables || order_tables(options)) - (joined_tables || joined_tables(options))).any?
1545
1696
  end
1546
1697
 
1547
- def include_eager_select?(options)
1548
- (selects_tables(options) - [table_name]).any?
1698
+ def include_eager_select?(options, joined_tables = nil)
1699
+ (selects_tables(options) - (joined_tables || joined_tables(options))).any?
1549
1700
  end
1550
1701
 
1551
1702
  def references_eager_loaded_tables?(options)
1552
- include_eager_order?(options) || include_eager_conditions?(options) || include_eager_select?(options)
1703
+ joined_tables = joined_tables(options)
1704
+ include_eager_order?(options, nil, joined_tables) || include_eager_conditions?(options, nil, joined_tables) || include_eager_select?(options, joined_tables)
1553
1705
  end
1554
1706
 
1555
1707
  def using_limitable_reflections?(reflections)
@@ -1704,9 +1856,10 @@ module ActiveRecord
1704
1856
  def construct(parent, associations, joins, row)
1705
1857
  case associations
1706
1858
  when Symbol, String
1707
- while (join = joins.shift).reflection.name.to_s != associations.to_s
1708
- raise ConfigurationError, "Not Enough Associations" if joins.empty?
1709
- end
1859
+ join = joins.detect{|j| j.reflection.name.to_s == associations.to_s && j.parent_table_name == parent.class.table_name }
1860
+ raise(ConfigurationError, "No such association") if join.nil?
1861
+
1862
+ joins.delete(join)
1710
1863
  construct_association(parent, join, row)
1711
1864
  when Array
1712
1865
  associations.each do |association|
@@ -1714,7 +1867,11 @@ module ActiveRecord
1714
1867
  end
1715
1868
  when Hash
1716
1869
  associations.keys.sort{|a,b|a.to_s<=>b.to_s}.each do |name|
1717
- association = construct_association(parent, joins.shift, row)
1870
+ join = joins.detect{|j| j.reflection.name.to_s == name.to_s && j.parent_table_name == parent.class.table_name }
1871
+ raise(ConfigurationError, "No such association") if join.nil?
1872
+
1873
+ association = construct_association(parent, join, row)
1874
+ joins.delete(join)
1718
1875
  construct(association, associations[name], joins, row) if association
1719
1876
  end
1720
1877
  else
@@ -1761,7 +1918,7 @@ module ActiveRecord
1761
1918
  end
1762
1919
 
1763
1920
  def aliased_primary_key
1764
- "#{ aliased_prefix }_r0"
1921
+ "#{aliased_prefix}_r0"
1765
1922
  end
1766
1923
 
1767
1924
  def aliased_table_name
@@ -1773,7 +1930,7 @@ module ActiveRecord
1773
1930
  @column_names_with_alias = []
1774
1931
 
1775
1932
  ([primary_key] + (column_names - [primary_key])).each_with_index do |column_name, i|
1776
- @column_names_with_alias << [column_name, "#{ aliased_prefix }_r#{ i }"]
1933
+ @column_names_with_alias << [column_name, "#{aliased_prefix}_r#{i}"]
1777
1934
  end
1778
1935
  end
1779
1936
 
@@ -1810,11 +1967,11 @@ module ActiveRecord
1810
1967
  @aliased_prefix = "t#{ join_dependency.joins.size }"
1811
1968
  @parent_table_name = parent.active_record.table_name
1812
1969
  @aliased_table_name = aliased_table_name_for(table_name)
1813
-
1970
+
1814
1971
  if reflection.macro == :has_and_belongs_to_many
1815
1972
  @aliased_join_table_name = aliased_table_name_for(reflection.options[:join_table], "_join")
1816
1973
  end
1817
-
1974
+
1818
1975
  if [:has_many, :has_one].include?(reflection.macro) && reflection.options[:through]
1819
1976
  @aliased_join_table_name = aliased_table_name_for(reflection.through_reflection.klass.table_name, "_join")
1820
1977
  end
@@ -1926,7 +2083,7 @@ module ActiveRecord
1926
2083
  aliased_table_name,
1927
2084
  foreign_key,
1928
2085
  parent.aliased_table_name,
1929
- parent.primary_key
2086
+ reflection.options[:primary_key] || parent.primary_key
1930
2087
  ]
1931
2088
  end
1932
2089
  when :belongs_to
@@ -1951,9 +2108,9 @@ module ActiveRecord
1951
2108
  end
1952
2109
 
1953
2110
  protected
1954
-
2111
+
1955
2112
  def aliased_table_name_for(name, suffix = nil)
1956
- if !parent.table_joins.blank? && parent.table_joins.to_s.downcase =~ %r{join(\s+\w+)?\s+#{name.downcase}\son}
2113
+ if !parent.table_joins.blank? && parent.table_joins.to_s.downcase =~ %r{join(\s+\w+)?\s+#{active_record.connection.quote_table_name name.downcase}\son}
1957
2114
  @join_dependency.table_aliases[name] += 1
1958
2115
  end
1959
2116
 
@@ -1969,7 +2126,7 @@ module ActiveRecord
1969
2126
 
1970
2127
  name
1971
2128
  end
1972
-
2129
+
1973
2130
  def pluralize(table_name)
1974
2131
  ActiveRecord::Base.pluralize_table_names ? table_name.to_s.pluralize : table_name
1975
2132
  end