radiant 0.6.4 → 0.6.5

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 (1961) hide show
  1. data/CHANGELOG +188 -35
  2. data/CONTRIBUTORS +25 -2
  3. data/INSTALL +1 -1
  4. data/app/controllers/admin/abstract_model_controller.rb +13 -13
  5. data/app/controllers/admin/export_controller.rb +1 -2
  6. data/app/controllers/admin/extension_controller.rb +0 -5
  7. data/app/controllers/admin/page_controller.rb +2 -0
  8. data/app/controllers/application.rb +1 -1
  9. data/app/controllers/site_controller.rb +8 -1
  10. data/app/helpers/admin/node_helper.rb +21 -18
  11. data/app/helpers/application_helper.rb +4 -13
  12. data/app/models/layout.rb +2 -2
  13. data/app/models/page.rb +25 -21
  14. data/app/models/page_context.rb +3 -5
  15. data/app/models/response_cache.rb +19 -27
  16. data/app/models/snippet.rb +2 -2
  17. data/app/models/standard_tags.rb +148 -26
  18. data/app/models/user.rb +2 -2
  19. data/app/views/admin/extension/index.html.erb +40 -0
  20. data/app/views/admin/layout/edit.html.erb +39 -0
  21. data/app/views/admin/layout/{index.rhtml → index.html.erb} +0 -0
  22. data/app/views/admin/layout/{remove.rhtml → remove.html.erb} +0 -0
  23. data/app/views/admin/page/_meta_row.html.erb +4 -0
  24. data/app/views/admin/page/{_node.rhtml → _node.html.erb} +0 -0
  25. data/app/views/admin/page/{_part.rhtml → _part.html.erb} +0 -0
  26. data/app/views/admin/page/_tag_reference.html.erb +4 -0
  27. data/app/views/admin/page/{children.rhtml → children.html.erb} +0 -0
  28. data/app/views/admin/page/edit.html.erb +140 -0
  29. data/app/views/admin/page/index.html.erb +31 -0
  30. data/app/views/admin/page/{remove.rhtml → remove.html.erb} +0 -0
  31. data/app/views/admin/snippet/{edit.rhtml → edit.html.erb} +0 -0
  32. data/app/views/admin/snippet/{index.rhtml → index.html.erb} +0 -0
  33. data/app/views/admin/snippet/{remove.rhtml → remove.html.erb} +0 -0
  34. data/app/views/admin/user/edit.html.erb +54 -0
  35. data/app/views/admin/user/{index.rhtml → index.html.erb} +0 -0
  36. data/app/views/admin/user/preferences.html.erb +29 -0
  37. data/app/views/admin/user/{remove.rhtml → remove.html.erb} +0 -0
  38. data/app/views/admin/welcome/{login.rhtml → login.html.erb} +0 -0
  39. data/app/views/layouts/{application.rhtml → application.html.erb} +0 -0
  40. data/app/views/site/{not_found.rhtml → not_found.html.erb} +0 -0
  41. data/bin/radiant +0 -0
  42. data/config/boot.rb +136 -26
  43. data/config/environment.rb +61 -53
  44. data/config/environments/development.rb +2 -3
  45. data/config/environments/test.rb +14 -7
  46. data/db/migrate/015_add_optimistic_locking.rb +6 -6
  47. data/db/migrate/017_rename_created_by_updated_by_columns.rb +15 -0
  48. data/db/migrate/018_add_description_and_keywords_to_pages.rb +11 -0
  49. data/db/schema.rb +66 -59
  50. data/db/templates/styled-blog.yml +3 -3
  51. data/lib/annotatable.rb +16 -0
  52. data/lib/autotest/discover.rb +3 -0
  53. data/lib/autotest/radiant_rails_rspec.rb +111 -0
  54. data/lib/generators/extension/USAGE +16 -14
  55. data/lib/generators/extension/extension_generator.rb +29 -7
  56. data/lib/generators/extension/templates/RSpecRakefile +120 -0
  57. data/lib/generators/extension/templates/Rakefile +0 -0
  58. data/lib/generators/extension/templates/spec.opts +6 -0
  59. data/lib/generators/extension/templates/spec_helper.rb +37 -0
  60. data/lib/generators/extension/templates/test_helper.rb +9 -2
  61. data/lib/generators/extension_controller/USAGE +4 -2
  62. data/lib/generators/extension_controller/extension_controller_generator.rb +50 -0
  63. data/lib/generators/extension_controller/templates/controller_spec.rb +23 -0
  64. data/lib/generators/extension_controller/templates/helper_spec.rb +11 -0
  65. data/lib/generators/extension_controller/templates/view_spec.rb +12 -0
  66. data/lib/generators/extension_model/USAGE +3 -2
  67. data/lib/generators/extension_model/extension_model_generator.rb +34 -0
  68. data/lib/generators/extension_model/templates/model_spec.rb +11 -0
  69. data/lib/generators/instance/templates/instance_boot.rb +136 -33
  70. data/lib/generators/instance/templates/instance_environment.rb +85 -4
  71. data/lib/login_system.rb +16 -0
  72. data/lib/plugins/dependencies_fix/init.rb +5 -5
  73. data/lib/plugins/extension_patches/init.rb +0 -1
  74. data/lib/plugins/extension_patches/lib/fixture_loading_extension.rb +76 -75
  75. data/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb +19 -14
  76. data/lib/plugins/string_extensions/lib/string_extensions.rb +4 -0
  77. data/lib/plugins/symbol_extensions/init.rb +1 -0
  78. data/lib/plugins/symbol_extensions/lib/symbol_extensions.rb +7 -0
  79. data/lib/radiant.rb +2 -8
  80. data/lib/radiant/extension.rb +11 -43
  81. data/lib/radiant/extension_loader.rb +144 -135
  82. data/lib/radiant/initializer.rb +126 -33
  83. data/lib/radiant/setup.rb +1 -0
  84. data/lib/tasks/database.rake +44 -3
  85. data/lib/tasks/extensions.rake +29 -11
  86. data/lib/tasks/framework.rake +20 -6
  87. data/lib/tasks/instance.rake +5 -2
  88. data/lib/tasks/release.rake +1 -0
  89. data/public/dispatch.cgi +0 -0
  90. data/public/dispatch.fcgi +0 -0
  91. data/public/dispatch.rb +0 -0
  92. data/public/images/admin/brown-bottom-line.gif +0 -0
  93. data/public/images/admin/view-site.gif +0 -0
  94. data/public/javascripts/admin/admin.js +142 -0
  95. data/public/javascripts/{ruledtable.js → admin/ruledtable.js} +0 -0
  96. data/public/javascripts/admin/sitemap.js +131 -0
  97. data/public/javascripts/admin/tabcontrol.js +127 -0
  98. data/public/javascripts/pngfix.js +1 -1
  99. data/public/stylesheets/admin/main.css +11 -6
  100. data/script/about +0 -0
  101. data/script/breakpointer +0 -0
  102. data/script/console +0 -0
  103. data/script/destroy +0 -0
  104. data/script/generate +0 -0
  105. data/script/performance/benchmarker +0 -0
  106. data/script/performance/profiler +0 -0
  107. data/script/plugin +0 -0
  108. data/script/process/inspector +0 -0
  109. data/script/process/reaper +0 -0
  110. data/script/process/spawner +0 -0
  111. data/script/process/spinner +0 -0
  112. data/script/runner +0 -0
  113. data/script/server +0 -0
  114. data/script/spec +12 -0
  115. data/script/spec_server +99 -0
  116. data/script/version +0 -0
  117. data/spec/controllers/admin/abstract_model_controller_spec.rb +263 -0
  118. data/spec/controllers/admin/export_controller_spec.rb +16 -0
  119. data/spec/controllers/admin/extension_controller_spec.rb +21 -0
  120. data/spec/controllers/admin/layout_controller_spec.rb +42 -0
  121. data/spec/controllers/admin/page_controller_spec.rb +312 -0
  122. data/spec/controllers/admin/snippet_controller_spec.rb +27 -0
  123. data/spec/controllers/admin/user_controller_spec.rb +72 -0
  124. data/spec/controllers/admin/welcome_controller_spec.rb +37 -0
  125. data/spec/controllers/application_controller_spec.rb +41 -0
  126. data/spec/controllers/site_controller_spec.rb +109 -0
  127. data/spec/fixtures/sample.txt +1 -0
  128. data/spec/helpers/admin/abstract_model_helper_spec.rb +4 -0
  129. data/spec/helpers/admin/export_helper_spec.rb +4 -0
  130. data/spec/helpers/admin/extension_helper_spec.rb +4 -0
  131. data/spec/helpers/admin/layout_helper_spec.rb +4 -0
  132. data/spec/helpers/admin/node_helper_spec.rb +97 -0
  133. data/spec/helpers/admin/page_helper_spec.rb +41 -0
  134. data/spec/helpers/admin/snippet_helper_spec.rb +4 -0
  135. data/spec/helpers/admin/user_helper_spec.rb +4 -0
  136. data/spec/helpers/admin/welcome_helper_spec.rb +4 -0
  137. data/spec/helpers/application_helper_spec.rb +166 -0
  138. data/spec/helpers/site_helper_spec.rb +4 -0
  139. data/spec/lib/annotatable_spec.rb +86 -0
  140. data/spec/lib/autotest_spec.rb +81 -0
  141. data/spec/lib/inheritable_class_attributes_spec.rb +90 -0
  142. data/spec/lib/local_time_spec.rb +40 -0
  143. data/spec/lib/login_system_spec.rb +142 -0
  144. data/spec/lib/method_observer_spec.rb +48 -0
  145. data/spec/lib/radiant/admin_ui_spec.rb +133 -0
  146. data/spec/lib/radiant/extension_loader_spec.rb +179 -0
  147. data/spec/lib/radiant/extension_migrator_spec.rb +17 -0
  148. data/spec/lib/radiant/extension_spec.rb +69 -0
  149. data/spec/lib/radiant/initializer_spec.rb +80 -0
  150. data/spec/lib/radiant/taggable_spec.rb +150 -0
  151. data/spec/lib/radiant_spec.rb +26 -0
  152. data/spec/lib/simpleton_spec.rb +45 -0
  153. data/spec/matchers/login_system_matcher.rb +79 -0
  154. data/spec/matchers/render_matcher.rb +115 -0
  155. data/spec/models/env_dump_page_spec.rb +18 -0
  156. data/spec/models/file_not_found_page_spec.rb +31 -0
  157. data/spec/models/layout_spec.rb +29 -0
  158. data/spec/models/page_context_spec.rb +68 -0
  159. data/spec/models/page_part_spec.rb +47 -0
  160. data/spec/models/page_spec.rb +500 -0
  161. data/spec/models/radiant/config_spec.rb +57 -0
  162. data/spec/models/radiant/exporter_spec.rb +25 -0
  163. data/spec/models/response_cache_spec.rb +259 -0
  164. data/spec/models/snippet_spec.rb +41 -0
  165. data/spec/models/standard_tags_spec.rb +774 -0
  166. data/spec/models/status_spec.rb +53 -0
  167. data/spec/models/text_filter_spec.rb +40 -0
  168. data/spec/models/user_action_observer_spec.rb +34 -0
  169. data/spec/models/user_spec.rb +135 -0
  170. data/spec/rcov.opts +2 -0
  171. data/spec/scenarios/file_not_found_scenario.rb +13 -0
  172. data/spec/scenarios/home_page_scenario.rb +64 -0
  173. data/spec/scenarios/layouts_scenario.rb +58 -0
  174. data/spec/scenarios/markup_pages_scenario.rb +13 -0
  175. data/spec/scenarios/pages_scenario.rb +50 -0
  176. data/spec/scenarios/pages_with_layouts_scenario.rb +10 -0
  177. data/spec/scenarios/snippets_scenario.rb +34 -0
  178. data/spec/scenarios/users_and_pages_scenario.rb +9 -0
  179. data/spec/scenarios/users_scenario.rb +43 -0
  180. data/spec/spec.opts +3 -0
  181. data/spec/spec_helper.rb +64 -0
  182. data/stories/all.rb +4 -0
  183. data/stories/helper.rb +3 -0
  184. data/test/fixtures/extensions/01_basic/app/views/basic_extension/{index.rhtml → index.html.erb} +0 -0
  185. data/test/fixtures/extensions/01_basic/app/views/basic_extension/{override.rhtml → override.html.erb} +0 -0
  186. data/test/fixtures/extensions/01_basic/app/views/basic_extension_mailer/{message.rhtml → message.text.html.erb} +0 -0
  187. data/test/fixtures/extensions/02_overriding/app/views/basic_extension/{override.rhtml → override.html.erb} +0 -0
  188. data/test/fixtures/page_parts.yml +6 -1
  189. data/test/fixtures/pages.yml +33 -19
  190. data/test/helpers/caching_test_helper.rb +39 -38
  191. data/test/helpers/extension_fixture_test_helper.rb +39 -39
  192. data/test/helpers/extension_tag_test_helper.rb +16 -16
  193. data/test/helpers/logging_test_helper.rb +10 -0
  194. data/test/helpers/render_test_helper.rb +3 -3
  195. data/test/helpers/validation_test_helper.rb +42 -42
  196. data/test/test_helper.rb +6 -4
  197. data/vendor/extensions/archive/Rakefile +105 -10
  198. data/vendor/extensions/archive/app/models/archive_day_index_page.rb +0 -0
  199. data/vendor/extensions/archive/app/models/archive_month_index_page.rb +0 -0
  200. data/vendor/extensions/archive/app/models/archive_page.rb +0 -0
  201. data/vendor/extensions/archive/app/models/archive_year_index_page.rb +0 -0
  202. data/vendor/extensions/archive/lib/archive_index_tags_and_methods.rb +0 -0
  203. data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +20 -0
  204. data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +20 -0
  205. data/vendor/extensions/archive/spec/models/archive_page_spec.rb +33 -0
  206. data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +20 -0
  207. data/vendor/extensions/archive/spec/scenarios/archive_scenario.rb +51 -0
  208. data/vendor/extensions/archive/spec/spec.opts +6 -0
  209. data/vendor/extensions/archive/spec/spec_helper.rb +37 -0
  210. data/vendor/extensions/archive/test/functional/archive_extension_test.rb +1 -1
  211. data/vendor/extensions/archive/test/helpers/archive_index_test_helper.rb +0 -0
  212. data/vendor/extensions/archive/test/test_helper.rb +11 -4
  213. data/vendor/extensions/archive/test/unit/archive_day_index_page_test.rb +0 -0
  214. data/vendor/extensions/archive/test/unit/archive_month_index_page_test.rb +0 -0
  215. data/vendor/extensions/archive/test/unit/archive_page_test.rb +0 -0
  216. data/vendor/extensions/archive/test/unit/archive_year_index_page_test.rb +0 -0
  217. data/vendor/extensions/markdown_filter/Rakefile +105 -10
  218. data/vendor/extensions/markdown_filter/lib/tasks/markdown_filter_extension_tasks.rake +28 -0
  219. data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +15 -0
  220. data/vendor/extensions/markdown_filter/spec/models/smarty_pants_filter_spec.rb +12 -0
  221. data/vendor/extensions/markdown_filter/spec/spec.opts +6 -0
  222. data/vendor/extensions/markdown_filter/spec/spec_helper.rb +37 -0
  223. data/vendor/extensions/markdown_filter/test/test_helper.rb +11 -2
  224. data/vendor/extensions/textile_filter/Rakefile +105 -10
  225. data/vendor/extensions/textile_filter/spec/models/textile_filter_spec.rb +11 -0
  226. data/vendor/extensions/textile_filter/spec/spec.opts +6 -0
  227. data/vendor/extensions/textile_filter/spec/spec_helper.rb +37 -0
  228. data/vendor/extensions/textile_filter/test/test_helper.rb +11 -2
  229. data/vendor/plugins/acts_as_tree/README +26 -0
  230. data/vendor/plugins/acts_as_tree/Rakefile +22 -0
  231. data/vendor/plugins/acts_as_tree/init.rb +1 -0
  232. data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
  233. data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
  234. data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
  235. data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
  236. data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
  237. data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
  238. data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
  239. data/vendor/plugins/rspec/CHANGES +1079 -0
  240. data/vendor/plugins/rspec/MIT-LICENSE +20 -0
  241. data/vendor/plugins/rspec/README +71 -0
  242. data/vendor/plugins/rspec/Rakefile +279 -0
  243. data/vendor/plugins/rspec/TODO +2 -0
  244. data/vendor/plugins/rspec/UPGRADE +31 -0
  245. data/vendor/plugins/rspec/bin/spec +4 -0
  246. data/vendor/plugins/rspec/bin/spec_translator +8 -0
  247. data/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +19 -0
  248. data/vendor/plugins/rspec/examples/pure/before_and_after_example.rb +40 -0
  249. data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +45 -0
  250. data/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb +54 -0
  251. data/vendor/plugins/rspec/examples/pure/custom_formatter.rb +12 -0
  252. data/vendor/plugins/rspec/examples/pure/dynamic_spec.rb +9 -0
  253. data/vendor/plugins/rspec/examples/pure/file_accessor.rb +19 -0
  254. data/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb +38 -0
  255. data/vendor/plugins/rspec/examples/pure/greeter_spec.rb +31 -0
  256. data/vendor/plugins/rspec/examples/pure/helper_method_example.rb +14 -0
  257. data/vendor/plugins/rspec/examples/pure/io_processor.rb +8 -0
  258. data/vendor/plugins/rspec/examples/pure/io_processor_spec.rb +21 -0
  259. data/vendor/plugins/rspec/examples/pure/legacy_spec.rb +11 -0
  260. data/vendor/plugins/rspec/examples/pure/mocking_example.rb +27 -0
  261. data/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb +28 -0
  262. data/vendor/plugins/rspec/examples/pure/nested_classes_example.rb +36 -0
  263. data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +28 -0
  264. data/vendor/plugins/rspec/examples/pure/pending_example.rb +20 -0
  265. data/vendor/plugins/rspec/examples/pure/predicate_example.rb +27 -0
  266. data/vendor/plugins/rspec/examples/pure/priority.txt +1 -0
  267. data/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb +81 -0
  268. data/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb +38 -0
  269. data/vendor/plugins/rspec/examples/pure/spec_helper.rb +3 -0
  270. data/vendor/plugins/rspec/examples/pure/stack.rb +36 -0
  271. data/vendor/plugins/rspec/examples/pure/stack_spec.rb +63 -0
  272. data/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +67 -0
  273. data/vendor/plugins/rspec/examples/pure/stubbing_example.rb +69 -0
  274. data/vendor/plugins/rspec/examples/stories/adder.rb +13 -0
  275. data/vendor/plugins/rspec/examples/stories/addition +34 -0
  276. data/vendor/plugins/rspec/examples/stories/addition.rb +9 -0
  277. data/vendor/plugins/rspec/examples/stories/calculator.rb +65 -0
  278. data/vendor/plugins/rspec/examples/stories/game-of-life/README.txt +21 -0
  279. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +6 -0
  280. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/examples.rb +3 -0
  281. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +35 -0
  282. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +66 -0
  283. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +21 -0
  284. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +21 -0
  285. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +42 -0
  286. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story +42 -0
  287. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/ICanKillACell.story +17 -0
  288. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/TheGridWraps.story +53 -0
  289. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +52 -0
  290. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/helper.rb +6 -0
  291. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +26 -0
  292. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/steps.rb +5 -0
  293. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.rb +3 -0
  294. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/stories.txt +22 -0
  295. data/vendor/plugins/rspec/examples/stories/game-of-life/life.rb +3 -0
  296. data/vendor/plugins/rspec/examples/stories/game-of-life/life/game.rb +23 -0
  297. data/vendor/plugins/rspec/examples/stories/game-of-life/life/grid.rb +43 -0
  298. data/vendor/plugins/rspec/examples/stories/helper.rb +9 -0
  299. data/vendor/plugins/rspec/examples/stories/steps/addition_steps.rb +18 -0
  300. data/vendor/plugins/rspec/failing_examples/README.txt +7 -0
  301. data/vendor/plugins/rspec/failing_examples/diffing_spec.rb +36 -0
  302. data/vendor/plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
  303. data/vendor/plugins/rspec/failing_examples/failure_in_setup.rb +10 -0
  304. data/vendor/plugins/rspec/failing_examples/failure_in_teardown.rb +10 -0
  305. data/vendor/plugins/rspec/failing_examples/mocking_example.rb +40 -0
  306. data/vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb +26 -0
  307. data/vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb +25 -0
  308. data/vendor/plugins/rspec/failing_examples/mocking_with_rr.rb +27 -0
  309. data/vendor/plugins/rspec/failing_examples/partial_mock_example.rb +20 -0
  310. data/vendor/plugins/rspec/failing_examples/predicate_example.rb +29 -0
  311. data/vendor/plugins/rspec/failing_examples/raising_example.rb +47 -0
  312. data/vendor/plugins/rspec/failing_examples/spec_helper.rb +3 -0
  313. data/vendor/plugins/rspec/failing_examples/syntax_error_example.rb +7 -0
  314. data/vendor/plugins/rspec/failing_examples/team_spec.rb +44 -0
  315. data/vendor/plugins/rspec/failing_examples/timeout_behaviour.rb +7 -0
  316. data/vendor/plugins/rspec/init.rb +9 -0
  317. data/vendor/plugins/rspec/lib/autotest/discover.rb +3 -0
  318. data/vendor/plugins/rspec/lib/autotest/rspec.rb +72 -0
  319. data/vendor/plugins/rspec/lib/spec.rb +30 -0
  320. data/vendor/plugins/rspec/lib/spec/example.rb +12 -0
  321. data/vendor/plugins/rspec/lib/spec/example/configuration.rb +144 -0
  322. data/vendor/plugins/rspec/lib/spec/example/errors.rb +9 -0
  323. data/vendor/plugins/rspec/lib/spec/example/example_group.rb +16 -0
  324. data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +58 -0
  325. data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +433 -0
  326. data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +42 -0
  327. data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +110 -0
  328. data/vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb +21 -0
  329. data/vendor/plugins/rspec/lib/spec/example/pending.rb +18 -0
  330. data/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb +58 -0
  331. data/vendor/plugins/rspec/lib/spec/expectations.rb +56 -0
  332. data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +66 -0
  333. data/vendor/plugins/rspec/lib/spec/expectations/errors.rb +12 -0
  334. data/vendor/plugins/rspec/lib/spec/expectations/extensions.rb +2 -0
  335. data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +71 -0
  336. data/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
  337. data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +52 -0
  338. data/vendor/plugins/rspec/lib/spec/extensions.rb +4 -0
  339. data/vendor/plugins/rspec/lib/spec/extensions/class.rb +24 -0
  340. data/vendor/plugins/rspec/lib/spec/extensions/main.rb +102 -0
  341. data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +7 -0
  342. data/vendor/plugins/rspec/lib/spec/extensions/object.rb +6 -0
  343. data/vendor/plugins/rspec/lib/spec/interop/test.rb +12 -0
  344. data/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb +6 -0
  345. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb +61 -0
  346. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb +6 -0
  347. data/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb +34 -0
  348. data/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +61 -0
  349. data/vendor/plugins/rspec/lib/spec/matchers.rb +156 -0
  350. data/vendor/plugins/rspec/lib/spec/matchers/be.rb +224 -0
  351. data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +37 -0
  352. data/vendor/plugins/rspec/lib/spec/matchers/change.rb +144 -0
  353. data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +43 -0
  354. data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +43 -0
  355. data/vendor/plugins/rspec/lib/spec/matchers/exist.rb +17 -0
  356. data/vendor/plugins/rspec/lib/spec/matchers/has.rb +34 -0
  357. data/vendor/plugins/rspec/lib/spec/matchers/have.rb +145 -0
  358. data/vendor/plugins/rspec/lib/spec/matchers/include.rb +70 -0
  359. data/vendor/plugins/rspec/lib/spec/matchers/match.rb +41 -0
  360. data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +73 -0
  361. data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +132 -0
  362. data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +45 -0
  363. data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +47 -0
  364. data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +29 -0
  365. data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +74 -0
  366. data/vendor/plugins/rspec/lib/spec/mocks.rb +211 -0
  367. data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +31 -0
  368. data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb.orig +27 -0
  369. data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +209 -0
  370. data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +84 -0
  371. data/vendor/plugins/rspec/lib/spec/mocks/errors.rb +10 -0
  372. data/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb +3 -0
  373. data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +269 -0
  374. data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +39 -0
  375. data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +50 -0
  376. data/vendor/plugins/rspec/lib/spec/mocks/order_group.rb +29 -0
  377. data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +166 -0
  378. data/vendor/plugins/rspec/lib/spec/mocks/space.rb +28 -0
  379. data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +38 -0
  380. data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +235 -0
  381. data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +52 -0
  382. data/vendor/plugins/rspec/lib/spec/runner.rb +202 -0
  383. data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +57 -0
  384. data/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb +16 -0
  385. data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +28 -0
  386. data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +20 -0
  387. data/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb +59 -0
  388. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +77 -0
  389. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +130 -0
  390. data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +33 -0
  391. data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +20 -0
  392. data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +333 -0
  393. data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +47 -0
  394. data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +30 -0
  395. data/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +52 -0
  396. data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +39 -0
  397. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +128 -0
  398. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +131 -0
  399. data/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb +16 -0
  400. data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +72 -0
  401. data/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb +10 -0
  402. data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +205 -0
  403. data/vendor/plugins/rspec/lib/spec/runner/options.rb +288 -0
  404. data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +147 -0
  405. data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +71 -0
  406. data/vendor/plugins/rspec/lib/spec/story.rb +10 -0
  407. data/vendor/plugins/rspec/lib/spec/story/extensions.rb +3 -0
  408. data/vendor/plugins/rspec/lib/spec/story/extensions/main.rb +86 -0
  409. data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +9 -0
  410. data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +9 -0
  411. data/vendor/plugins/rspec/lib/spec/story/given_scenario.rb +14 -0
  412. data/vendor/plugins/rspec/lib/spec/story/runner.rb +56 -0
  413. data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +48 -0
  414. data/vendor/plugins/rspec/lib/spec/story/runner/scenario_collector.rb +18 -0
  415. data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +48 -0
  416. data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +123 -0
  417. data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +227 -0
  418. data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +70 -0
  419. data/vendor/plugins/rspec/lib/spec/story/scenario.rb +14 -0
  420. data/vendor/plugins/rspec/lib/spec/story/step.rb +58 -0
  421. data/vendor/plugins/rspec/lib/spec/story/step_group.rb +89 -0
  422. data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +37 -0
  423. data/vendor/plugins/rspec/lib/spec/story/story.rb +39 -0
  424. data/vendor/plugins/rspec/lib/spec/story/world.rb +124 -0
  425. data/vendor/plugins/rspec/lib/spec/translator.rb +114 -0
  426. data/vendor/plugins/rspec/lib/spec/version.rb +22 -0
  427. data/vendor/plugins/rspec/plugins/mock_frameworks/flexmock.rb +23 -0
  428. data/vendor/plugins/rspec/plugins/mock_frameworks/mocha.rb +19 -0
  429. data/vendor/plugins/rspec/plugins/mock_frameworks/rr.rb +21 -0
  430. data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +18 -0
  431. data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +4 -0
  432. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +50 -0
  433. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
  434. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +111 -0
  435. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +314 -0
  436. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
  437. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +51 -0
  438. data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +3 -0
  439. data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +11 -0
  440. data/vendor/plugins/rspec/rake_tasks/examples.rake +7 -0
  441. data/vendor/plugins/rspec/rake_tasks/examples_with_rcov.rake +9 -0
  442. data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +9 -0
  443. data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +7 -0
  444. data/vendor/plugins/rspec/spec/README.jruby +15 -0
  445. data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +19 -0
  446. data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +197 -0
  447. data/vendor/plugins/rspec/spec/autotest_helper.rb +6 -0
  448. data/vendor/plugins/rspec/spec/autotest_matchers.rb +47 -0
  449. data/vendor/plugins/rspec/spec/rspec_suite.rb +7 -0
  450. data/vendor/plugins/rspec/spec/ruby_forker.rb +13 -0
  451. data/vendor/plugins/rspec/spec/spec.opts +6 -0
  452. data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +282 -0
  453. data/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb +48 -0
  454. data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +135 -0
  455. data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +523 -0
  456. data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +711 -0
  457. data/vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb +96 -0
  458. data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +115 -0
  459. data/vendor/plugins/rspec/spec/spec/example/example_runner_spec.rb +194 -0
  460. data/vendor/plugins/rspec/spec/spec/example/example_spec.rb +53 -0
  461. data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +71 -0
  462. data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +31 -0
  463. data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +21 -0
  464. data/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb +265 -0
  465. data/vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb +25 -0
  466. data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +127 -0
  467. data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +107 -0
  468. data/vendor/plugins/rspec/spec/spec/expectations/fail_with_spec.rb +71 -0
  469. data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +76 -0
  470. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
  471. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
  472. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
  473. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
  474. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
  475. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
  476. data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
  477. data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +45 -0
  478. data/vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +14 -0
  479. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +45 -0
  480. data/vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +9 -0
  481. data/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb +39 -0
  482. data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +248 -0
  483. data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +319 -0
  484. data/vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb +153 -0
  485. data/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb +28 -0
  486. data/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb +28 -0
  487. data/vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb +57 -0
  488. data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +129 -0
  489. data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +53 -0
  490. data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +291 -0
  491. data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +45 -0
  492. data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +37 -0
  493. data/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +78 -0
  494. data/vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb +24 -0
  495. data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +158 -0
  496. data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +315 -0
  497. data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +54 -0
  498. data/vendor/plugins/rspec/spec/spec/matchers/satisfy_spec.rb +36 -0
  499. data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +31 -0
  500. data/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +54 -0
  501. data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +29 -0
  502. data/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb +23 -0
  503. data/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb +97 -0
  504. data/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb +93 -0
  505. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10260_spec.rb +8 -0
  506. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10263_spec.rb +24 -0
  507. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +33 -0
  508. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +30 -0
  509. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
  510. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
  511. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
  512. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
  513. data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +123 -0
  514. data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +32 -0
  515. data/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +84 -0
  516. data/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb +54 -0
  517. data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +481 -0
  518. data/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
  519. data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +40 -0
  520. data/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb +53 -0
  521. data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +45 -0
  522. data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +106 -0
  523. data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +66 -0
  524. data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +160 -0
  525. data/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb +52 -0
  526. data/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb +26 -0
  527. data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +181 -0
  528. data/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +67 -0
  529. data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +14 -0
  530. data/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +23 -0
  531. data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +147 -0
  532. data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +92 -0
  533. data/vendor/plugins/rspec/spec/spec/runner/empty_file.txt +0 -0
  534. data/vendor/plugins/rspec/spec/spec/runner/examples.txt +2 -0
  535. data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +37 -0
  536. data/vendor/plugins/rspec/spec/spec/runner/failed.txt +3 -0
  537. data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +45 -0
  538. data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +33 -0
  539. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
  540. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +387 -0
  541. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
  542. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
  543. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +371 -0
  544. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +66 -0
  545. data/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +65 -0
  546. data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +137 -0
  547. data/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb +18 -0
  548. data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +103 -0
  549. data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +129 -0
  550. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +61 -0
  551. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +335 -0
  552. data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +365 -0
  553. data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +371 -0
  554. data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +78 -0
  555. data/vendor/plugins/rspec/spec/spec/runner/heckler_spec.rb +13 -0
  556. data/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
  557. data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +384 -0
  558. data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +386 -0
  559. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture.rb +7 -0
  560. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb +8 -0
  561. data/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb +16 -0
  562. data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +56 -0
  563. data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +192 -0
  564. data/vendor/plugins/rspec/spec/spec/runner/resources/a_bar.rb +0 -0
  565. data/vendor/plugins/rspec/spec/spec/runner/resources/a_foo.rb +0 -0
  566. data/vendor/plugins/rspec/spec/spec/runner/resources/a_spec.rb +1 -0
  567. data/vendor/plugins/rspec/spec/spec/runner/spec.opts +2 -0
  568. data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +1 -0
  569. data/vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
  570. data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +79 -0
  571. data/vendor/plugins/rspec/spec/spec/runner/spec_spaced.opts +2 -0
  572. data/vendor/plugins/rspec/spec/spec/runner_spec.rb +11 -0
  573. data/vendor/plugins/rspec/spec/spec/spec_classes.rb +133 -0
  574. data/vendor/plugins/rspec/spec/spec/story/builders.rb +46 -0
  575. data/vendor/plugins/rspec/spec/spec/story/extensions/main_spec.rb +161 -0
  576. data/vendor/plugins/rspec/spec/spec/story/extensions_spec.rb +14 -0
  577. data/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb +27 -0
  578. data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +92 -0
  579. data/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +27 -0
  580. data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +191 -0
  581. data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +133 -0
  582. data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +384 -0
  583. data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +294 -0
  584. data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +106 -0
  585. data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +20 -0
  586. data/vendor/plugins/rspec/spec/spec/story/step_group_spec.rb +157 -0
  587. data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +72 -0
  588. data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +200 -0
  589. data/vendor/plugins/rspec/spec/spec/story/story_helper.rb +2 -0
  590. data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +86 -0
  591. data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +423 -0
  592. data/vendor/plugins/rspec/spec/spec/translator_spec.rb +265 -0
  593. data/vendor/plugins/rspec/spec/spec_helper.rb +103 -0
  594. data/vendor/plugins/rspec/stories/all.rb +5 -0
  595. data/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings +45 -0
  596. data/vendor/plugins/rspec/stories/example_groups/example_group_with_should_methods +17 -0
  597. data/vendor/plugins/rspec/stories/example_groups/nested_groups +17 -0
  598. data/vendor/plugins/rspec/stories/example_groups/output +25 -0
  599. data/vendor/plugins/rspec/stories/example_groups/stories.rb +7 -0
  600. data/vendor/plugins/rspec/stories/helper.rb +6 -0
  601. data/vendor/plugins/rspec/stories/interop/examples_and_tests_together +30 -0
  602. data/vendor/plugins/rspec/stories/interop/stories.rb +7 -0
  603. data/vendor/plugins/rspec/stories/interop/test_case_with_should_methods +17 -0
  604. data/vendor/plugins/rspec/stories/pending_stories/README +3 -0
  605. data/vendor/plugins/rspec/stories/resources/helpers/cmdline.rb +9 -0
  606. data/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb +16 -0
  607. data/vendor/plugins/rspec/stories/resources/matchers/smart_match.rb +37 -0
  608. data/vendor/plugins/rspec/stories/resources/spec/example_group_with_should_methods.rb +12 -0
  609. data/vendor/plugins/rspec/stories/resources/spec/simple_spec.rb +8 -0
  610. data/vendor/plugins/rspec/stories/resources/steps/running_rspec.rb +50 -0
  611. data/vendor/plugins/rspec/stories/resources/stories/failing_story.rb +15 -0
  612. data/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb +57 -0
  613. data/vendor/plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +30 -0
  614. data/vendor/plugins/rspec/story_server/prototype/javascripts/builder.js +136 -0
  615. data/vendor/plugins/rspec/story_server/prototype/javascripts/controls.js +972 -0
  616. data/vendor/plugins/rspec/story_server/prototype/javascripts/dragdrop.js +976 -0
  617. data/vendor/plugins/rspec/story_server/prototype/javascripts/effects.js +1117 -0
  618. data/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js +4140 -0
  619. data/vendor/plugins/rspec/story_server/prototype/javascripts/rspec.js +149 -0
  620. data/vendor/plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +58 -0
  621. data/vendor/plugins/rspec/story_server/prototype/javascripts/slider.js +276 -0
  622. data/vendor/plugins/rspec/story_server/prototype/javascripts/sound.js +55 -0
  623. data/vendor/plugins/rspec/story_server/prototype/javascripts/unittest.js +568 -0
  624. data/vendor/plugins/rspec/story_server/prototype/lib/server.rb +24 -0
  625. data/vendor/plugins/rspec/story_server/prototype/stories.html +176 -0
  626. data/vendor/plugins/rspec/story_server/prototype/stylesheets/rspec.css +136 -0
  627. data/vendor/plugins/rspec/story_server/prototype/stylesheets/test.css +90 -0
  628. data/vendor/plugins/rspec_on_rails/MIT-LICENSE +31 -0
  629. data/vendor/plugins/rspec_on_rails/README +3 -0
  630. data/vendor/plugins/rspec_on_rails/Rakefile +9 -0
  631. data/vendor/plugins/rspec_on_rails/generators/rspec/CHANGES +1 -0
  632. data/vendor/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +35 -0
  633. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +4 -0
  634. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt +0 -0
  635. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +2 -0
  636. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +4 -0
  637. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +102 -0
  638. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +4 -0
  639. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +39 -0
  640. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +3 -0
  641. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/USAGE +33 -0
  642. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +49 -0
  643. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +25 -0
  644. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
  645. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +12 -0
  646. data/vendor/plugins/rspec_on_rails/generators/rspec_model/USAGE +18 -0
  647. data/vendor/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +30 -0
  648. data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +11 -0
  649. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +167 -0
  650. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +313 -0
  651. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +25 -0
  652. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
  653. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +22 -0
  654. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
  655. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +61 -0
  656. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +22 -0
  657. data/vendor/plugins/rspec_on_rails/init.rb +9 -0
  658. data/vendor/plugins/rspec_on_rails/lib/autotest/discover.rb +1 -0
  659. data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +81 -0
  660. data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +51 -0
  661. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +46 -0
  662. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +43 -0
  663. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +269 -0
  664. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +59 -0
  665. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +130 -0
  666. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/model_example_group.rb +14 -0
  667. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +98 -0
  668. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +90 -0
  669. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +178 -0
  670. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +12 -0
  671. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +14 -0
  672. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +21 -0
  673. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +11 -0
  674. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +27 -0
  675. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +30 -0
  676. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +5 -0
  677. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +66 -0
  678. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +21 -0
  679. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +29 -0
  680. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +130 -0
  681. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +55 -0
  682. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +113 -0
  683. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +70 -0
  684. data/vendor/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +71 -0
  685. data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +23 -0
  686. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +36 -0
  687. data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +8 -0
  688. data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +60 -0
  689. data/vendor/plugins/rspec_on_rails/spec/rails/example/configuration_spec.rb +83 -0
  690. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +43 -0
  691. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +195 -0
  692. data/vendor/plugins/rspec_on_rails/spec/rails/example/example_group_factory_spec.rb +112 -0
  693. data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +133 -0
  694. data/vendor/plugins/rspec_on_rails/spec/rails/example/model_spec_spec.rb +18 -0
  695. data/vendor/plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +16 -0
  696. data/vendor/plugins/rspec_on_rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb +33 -0
  697. data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +264 -0
  698. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +54 -0
  699. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +48 -0
  700. data/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +14 -0
  701. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +783 -0
  702. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +37 -0
  703. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +13 -0
  704. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +62 -0
  705. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +209 -0
  706. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +169 -0
  707. data/vendor/plugins/rspec_on_rails/spec/rails/mocks/ar_classes.rb +10 -0
  708. data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +55 -0
  709. data/vendor/plugins/rspec_on_rails/spec/rails/mocks/stub_model_spec.rb +54 -0
  710. data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +7 -0
  711. data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +89 -0
  712. data/vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb +11 -0
  713. data/vendor/plugins/rspec_on_rails/spec/rails_suite.rb +7 -0
  714. data/vendor/plugins/rspec_on_rails/spec/spec_helper.rb +46 -0
  715. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +2 -0
  716. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +68 -0
  717. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +59 -0
  718. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +26 -0
  719. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +58 -0
  720. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +10 -0
  721. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +5 -0
  722. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +6 -0
  723. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +13 -0
  724. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml +0 -0
  725. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +1 -0
  726. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +1 -0
  727. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
  728. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +1 -0
  729. data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +1 -0
  730. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
  731. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.js.rjs +1 -0
  732. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml +0 -0
  733. data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rjs +1 -0
  734. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +1 -0
  735. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +1 -0
  736. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +1 -0
  737. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +1 -0
  738. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +1 -0
  739. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +1 -0
  740. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +1 -0
  741. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +1 -0
  742. data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +1 -0
  743. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +1 -0
  744. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +1 -0
  745. data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +1 -0
  746. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +2 -0
  747. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
  748. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +1 -0
  749. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +1 -0
  750. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +1 -0
  751. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +3 -0
  752. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +2 -0
  753. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +2 -0
  754. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +1 -0
  755. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +2 -0
  756. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +3 -0
  757. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +5 -0
  758. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +3 -0
  759. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +1 -0
  760. data/vendor/plugins/rspec_on_rails/stories/all.rb +10 -0
  761. data/vendor/plugins/rspec_on_rails/stories/helper.rb +5 -0
  762. data/vendor/plugins/rspec_on_rails/stories/steps/people.rb +8 -0
  763. data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback +15 -0
  764. data/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb +25 -0
  765. data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +137 -0
  766. data/vendor/plugins/scenarios/LICENSE +19 -0
  767. data/vendor/plugins/scenarios/README +262 -0
  768. data/vendor/plugins/scenarios/Rakefile +66 -0
  769. data/vendor/plugins/scenarios/TODO +1 -0
  770. data/vendor/plugins/scenarios/lib/scenarios.rb +34 -0
  771. data/vendor/plugins/scenarios/lib/scenarios/base.rb +73 -0
  772. data/vendor/plugins/scenarios/lib/scenarios/builtin/blank_scenario.rb +18 -0
  773. data/vendor/plugins/scenarios/lib/scenarios/configuration.rb +55 -0
  774. data/vendor/plugins/scenarios/lib/scenarios/extensions.rb +5 -0
  775. data/vendor/plugins/scenarios/lib/scenarios/extensions/active_record.rb +14 -0
  776. data/vendor/plugins/scenarios/lib/scenarios/extensions/delegating_attributes.rb +40 -0
  777. data/vendor/plugins/scenarios/lib/scenarios/extensions/object.rb +5 -0
  778. data/vendor/plugins/scenarios/lib/scenarios/extensions/string.rb +22 -0
  779. data/vendor/plugins/scenarios/lib/scenarios/extensions/symbol.rb +14 -0
  780. data/vendor/plugins/scenarios/lib/scenarios/extensions/test_case.rb +76 -0
  781. data/vendor/plugins/scenarios/lib/scenarios/loading.rb +51 -0
  782. data/vendor/plugins/scenarios/lib/scenarios/table_blasting.rb +20 -0
  783. data/vendor/plugins/scenarios/lib/scenarios/table_methods.rb +205 -0
  784. data/vendor/plugins/scenarios/spec/scenarios/complex_composite_scenario.rb +9 -0
  785. data/vendor/plugins/scenarios/spec/scenarios/composite_scenario.rb +9 -0
  786. data/vendor/plugins/scenarios/spec/scenarios/empty_scenario.rb +4 -0
  787. data/vendor/plugins/scenarios/spec/scenarios/people_scenario.rb +26 -0
  788. data/vendor/plugins/scenarios/spec/scenarios/places_scenario.rb +22 -0
  789. data/vendor/plugins/scenarios/spec/scenarios/things_scenario.rb +22 -0
  790. data/vendor/plugins/scenarios/spec/scenarios_spec.rb +189 -0
  791. data/vendor/plugins/scenarios/spec/spec.opts +7 -0
  792. data/vendor/plugins/scenarios/spec/spec_helper.rb +6 -0
  793. data/vendor/plugins/scenarios/tasks/scenario.rake +21 -0
  794. data/vendor/plugins/scenarios/test/scenarios_test.rb +39 -0
  795. data/vendor/plugins/scenarios/test/test_helper.rb +5 -0
  796. data/vendor/plugins/scenarios/testing/application.rb +2 -0
  797. data/vendor/plugins/scenarios/testing/database.yml +9 -0
  798. data/vendor/plugins/scenarios/testing/environment.rb +68 -0
  799. data/vendor/plugins/scenarios/testing/library.rb +128 -0
  800. data/vendor/plugins/scenarios/testing/models.rb +14 -0
  801. data/vendor/plugins/scenarios/testing/rspec_on_rails_3014.patch +52 -0
  802. data/vendor/plugins/scenarios/testing/rspec_on_rails_3119.patch +53 -0
  803. data/vendor/plugins/scenarios/testing/schema.rb +31 -0
  804. data/vendor/rails/Rakefile +21 -0
  805. data/vendor/rails/actionmailer/CHANGELOG +44 -26
  806. data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
  807. data/vendor/rails/actionmailer/README +2 -2
  808. data/vendor/rails/actionmailer/Rakefile +4 -3
  809. data/vendor/rails/actionmailer/install.rb +1 -1
  810. data/vendor/rails/actionmailer/lib/action_mailer.rb +5 -3
  811. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +57 -36
  812. data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +4 -4
  813. data/vendor/rails/actionmailer/lib/action_mailer/part.rb +2 -5
  814. data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +59 -0
  815. data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +67 -0
  816. data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +14 -0
  817. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{text → text-format-0.6.3/text}/format.rb +0 -0
  818. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +4 -0
  819. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +19 -0
  820. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +245 -0
  821. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +47 -0
  822. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +52 -0
  823. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +39 -0
  824. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +71 -0
  825. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +67 -0
  826. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +481 -0
  827. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/facade.rb +0 -0
  828. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +931 -0
  829. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/info.rb +0 -0
  830. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +540 -0
  831. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/loader.rb +0 -0
  832. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +462 -0
  833. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +435 -0
  834. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/mbox.rb +0 -0
  835. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +282 -0
  836. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +137 -0
  837. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +1475 -0
  838. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +381 -0
  839. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/port.rb +379 -0
  840. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +142 -0
  841. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +43 -0
  842. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +263 -0
  843. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +279 -0
  844. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail → tmail-1.1.0/tmail}/tmail.rb +0 -0
  845. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +281 -0
  846. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +38 -0
  847. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +3 -3
  848. data/vendor/rails/actionmailer/lib/actionmailer.rb +1 -0
  849. data/vendor/rails/actionmailer/test/abstract_unit.rb +19 -0
  850. data/vendor/rails/actionmailer/test/delivery_method_test.rb +51 -0
  851. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +1 -0
  852. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -1
  853. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
  854. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml +0 -0
  855. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +1 -0
  856. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml +0 -1
  857. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
  858. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml +0 -1
  859. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
  860. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -5
  861. data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +5 -0
  862. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
  863. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml +0 -1
  864. data/vendor/rails/actionmailer/test/fixtures/raw_base64_decoded_string +0 -0
  865. data/vendor/rails/actionmailer/test/fixtures/raw_base64_encoded_string +1 -0
  866. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
  867. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +100 -0
  868. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +1 -0
  869. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -1
  870. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +3 -0
  871. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -3
  872. data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
  873. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
  874. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
  875. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
  876. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml +0 -1
  877. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
  878. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml +0 -10
  879. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
  880. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml +0 -2
  881. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
  882. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml +0 -1
  883. data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
  884. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +2 -0
  885. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +2 -0
  886. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +3 -0
  887. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml +0 -3
  888. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
  889. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -3
  890. data/vendor/rails/actionmailer/test/mail_helper_test.rb +10 -6
  891. data/vendor/rails/actionmailer/test/mail_render_test.rb +45 -2
  892. data/vendor/rails/actionmailer/test/mail_service_test.rb +150 -27
  893. data/vendor/rails/actionmailer/test/quoting_test.rb +57 -3
  894. data/vendor/rails/actionmailer/test/test_helper_test.rb +117 -0
  895. data/vendor/rails/actionmailer/test/tmail_test.rb +9 -0
  896. data/vendor/rails/actionmailer/test/url_test.rb +10 -2
  897. data/vendor/rails/actionpack/CHANGELOG +1439 -20
  898. data/vendor/rails/actionpack/MIT-LICENSE +1 -1
  899. data/vendor/rails/actionpack/README +5 -5
  900. data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +4 -5
  901. data/vendor/rails/actionpack/Rakefile +5 -6
  902. data/vendor/rails/actionpack/install.rb +2 -2
  903. data/vendor/rails/actionpack/lib/action_controller.rb +11 -15
  904. data/vendor/rails/actionpack/lib/action_controller/assertions.rb +12 -25
  905. data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +18 -4
  906. data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +8 -1
  907. data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +35 -12
  908. data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +56 -12
  909. data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +105 -38
  910. data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +28 -15
  911. data/vendor/rails/actionpack/lib/action_controller/base.rb +320 -262
  912. data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +36 -31
  913. data/vendor/rails/actionpack/lib/action_controller/caching.rb +132 -66
  914. data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +16 -0
  915. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +106 -0
  916. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +22 -0
  917. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +73 -0
  918. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +23 -0
  919. data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +36 -55
  920. data/vendor/rails/actionpack/lib/action_controller/components.rb +19 -36
  921. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +13 -9
  922. data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +195 -0
  923. data/vendor/rails/actionpack/lib/action_controller/filters.rb +35 -34
  924. data/vendor/rails/actionpack/lib/action_controller/flash.rb +30 -35
  925. data/vendor/rails/actionpack/lib/action_controller/helpers.rb +123 -50
  926. data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +126 -0
  927. data/vendor/rails/actionpack/lib/action_controller/integration.rb +127 -108
  928. data/vendor/rails/actionpack/lib/action_controller/layout.rb +61 -48
  929. data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +57 -68
  930. data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +43 -80
  931. data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +20 -0
  932. data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +88 -0
  933. data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +91 -0
  934. data/vendor/rails/actionpack/lib/action_controller/request.rb +553 -88
  935. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +132 -0
  936. data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +138 -0
  937. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +185 -69
  938. data/vendor/rails/actionpack/lib/action_controller/resources.rb +211 -172
  939. data/vendor/rails/actionpack/lib/action_controller/response.rb +49 -8
  940. data/vendor/rails/actionpack/lib/action_controller/routing.rb +368 -242
  941. data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +119 -0
  942. data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +3 -2
  943. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +164 -0
  944. data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +9 -16
  945. data/vendor/rails/actionpack/lib/action_controller/session_management.rb +17 -8
  946. data/vendor/rails/actionpack/lib/action_controller/streaming.rb +6 -3
  947. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
  948. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{_trace.rhtml → _trace.erb} +0 -0
  949. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +11 -0
  950. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{layout.rhtml → layout.erb} +0 -0
  951. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{missing_template.rhtml → missing_template.erb} +0 -0
  952. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{routing_error.rhtml → routing_error.erb} +0 -0
  953. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +21 -0
  954. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/{unknown_action.rhtml → unknown_action.erb} +0 -0
  955. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +53 -0
  956. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +59 -46
  957. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +48 -24
  958. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +7 -4
  959. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -0
  960. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +11 -6
  961. data/vendor/rails/actionpack/lib/action_controller/verification.rb +27 -21
  962. data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
  963. data/vendor/rails/actionpack/lib/action_pack/version.rb +4 -4
  964. data/vendor/rails/actionpack/lib/action_view.rb +8 -3
  965. data/vendor/rails/actionpack/lib/action_view/base.rb +238 -140
  966. data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +1 -2
  967. data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +35 -17
  968. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +417 -87
  969. data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +111 -0
  970. data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +12 -5
  971. data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +29 -0
  972. data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +97 -63
  973. data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +295 -35
  974. data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +6 -2
  975. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +354 -111
  976. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +171 -109
  977. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +332 -76
  978. data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +35 -11
  979. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +484 -354
  980. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +88 -58
  981. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +396 -364
  982. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +2817 -1107
  983. data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +84 -60
  984. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +419 -43
  985. data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +20 -0
  986. data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +59 -0
  987. data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +223 -0
  988. data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +63 -4
  989. data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +69 -39
  990. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +221 -148
  991. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +283 -165
  992. data/vendor/rails/actionpack/lib/action_view/partials.rb +134 -62
  993. data/vendor/rails/actionpack/lib/action_view/template_error.rb +4 -12
  994. data/vendor/rails/actionpack/lib/action_view/template_handler.rb +17 -0
  995. data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +19 -0
  996. data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +21 -0
  997. data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +14 -0
  998. data/vendor/rails/actionpack/lib/actionpack.rb +1 -0
  999. data/vendor/rails/actionpack/test/abstract_unit.rb +21 -1
  1000. data/vendor/rails/actionpack/test/action_view_test.rb +44 -0
  1001. data/vendor/rails/actionpack/test/active_record_unit.rb +12 -20
  1002. data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +2 -2
  1003. data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +74 -0
  1004. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +21 -152
  1005. data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +2 -7
  1006. data/vendor/rails/actionpack/test/controller/assert_select_test.rb +120 -14
  1007. data/vendor/rails/actionpack/test/controller/base_test.rb +11 -13
  1008. data/vendor/rails/actionpack/test/controller/caching_test.rb +125 -5
  1009. data/vendor/rails/actionpack/test/controller/capture_test.rb +23 -16
  1010. data/vendor/rails/actionpack/test/controller/cgi_test.rb +70 -395
  1011. data/vendor/rails/actionpack/test/controller/components_test.rb +31 -42
  1012. data/vendor/rails/actionpack/test/controller/content_type_test.rb +1 -1
  1013. data/vendor/rails/actionpack/test/controller/cookie_test.rb +51 -15
  1014. data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +1 -42
  1015. data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +123 -0
  1016. data/vendor/rails/actionpack/test/controller/fake_models.rb +5 -0
  1017. data/vendor/rails/actionpack/test/controller/filters_test.rb +45 -7
  1018. data/vendor/rails/actionpack/test/controller/flash_test.rb +46 -2
  1019. data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +10 -8
  1020. data/vendor/rails/actionpack/test/controller/helper_test.rb +23 -4
  1021. data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +124 -0
  1022. data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +69 -0
  1023. data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +250 -0
  1024. data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +239 -0
  1025. data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +51 -0
  1026. data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +125 -0
  1027. data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +54 -0
  1028. data/vendor/rails/actionpack/test/controller/integration_test.rb +47 -31
  1029. data/vendor/rails/actionpack/test/controller/layout_test.rb +64 -12
  1030. data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +193 -38
  1031. data/vendor/rails/actionpack/test/controller/mime_type_test.rb +30 -8
  1032. data/vendor/rails/actionpack/test/controller/new_render_test.rb +104 -22
  1033. data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +98 -0
  1034. data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +103 -0
  1035. data/vendor/rails/actionpack/test/controller/redirect_test.rb +120 -18
  1036. data/vendor/rails/actionpack/test/controller/render_test.rb +226 -55
  1037. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +217 -0
  1038. data/vendor/rails/actionpack/test/controller/request_test.rb +546 -27
  1039. data/vendor/rails/actionpack/test/controller/rescue_test.rb +501 -0
  1040. data/vendor/rails/actionpack/test/controller/resources_test.rb +258 -132
  1041. data/vendor/rails/actionpack/test/controller/routing_test.rb +508 -106
  1042. data/vendor/rails/actionpack/test/controller/selector_test.rb +5 -5
  1043. data/vendor/rails/actionpack/test/controller/send_file_test.rb +17 -7
  1044. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +246 -0
  1045. data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +182 -0
  1046. data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +89 -0
  1047. data/vendor/rails/actionpack/test/controller/session_management_test.rb +7 -7
  1048. data/vendor/rails/actionpack/test/controller/test_test.rb +150 -38
  1049. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +87 -12
  1050. data/vendor/rails/actionpack/test/controller/verification_test.rb +11 -0
  1051. data/vendor/rails/actionpack/test/controller/view_paths_test.rb +137 -0
  1052. data/vendor/rails/actionpack/test/controller/webservice_test.rb +11 -75
  1053. data/vendor/rails/actionpack/test/fixtures/addresses/{list.rhtml → list.erb} +0 -0
  1054. data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +2 -1
  1055. data/vendor/rails/actionpack/test/fixtures/developer.rb +2 -0
  1056. data/vendor/rails/actionpack/test/fixtures/fun/games/{hello_world.rhtml → hello_world.erb} +0 -0
  1057. data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +1 -1
  1058. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +1 -0
  1059. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
  1060. data/vendor/rails/actionpack/test/fixtures/layouts/{builder.rxml → builder.builder} +0 -0
  1061. data/vendor/rails/actionpack/test/fixtures/layouts/{standard.rhtml → standard.erb} +0 -0
  1062. data/vendor/rails/actionpack/test/fixtures/layouts/{talk_from_action.rhtml → talk_from_action.erb} +0 -0
  1063. data/vendor/rails/actionpack/test/fixtures/layouts/{yield.rhtml → yield.erb} +0 -0
  1064. data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
  1065. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +5 -0
  1066. data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +1 -0
  1067. data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +1 -0
  1068. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +1 -0
  1069. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
  1070. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +1 -0
  1071. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +1 -0
  1072. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +1 -0
  1073. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
  1074. data/vendor/rails/actionpack/test/fixtures/public/404.html +1 -0
  1075. data/vendor/rails/actionpack/test/fixtures/public/500.html +1 -0
  1076. data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -1
  1077. data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +1 -0
  1078. data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +1 -0
  1079. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +1 -0
  1080. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +1 -0
  1081. data/vendor/rails/actionpack/test/fixtures/replies.yml +2 -0
  1082. data/vendor/rails/actionpack/test/fixtures/reply.rb +2 -1
  1083. data/vendor/rails/actionpack/test/fixtures/respond_to/{all_types_with_layout.rhtml → all_types_with_layout.html.erb} +0 -0
  1084. data/vendor/rails/actionpack/test/fixtures/respond_to/{all_types_with_layout.rjs → all_types_with_layout.js.rjs} +0 -0
  1085. data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
  1086. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
  1087. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
  1088. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
  1089. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
  1090. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
  1091. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rhtml → using_defaults.html.erb} +0 -0
  1092. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rjs → using_defaults.js.rjs} +0 -0
  1093. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults.rxml → using_defaults.xml.builder} +0 -0
  1094. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rhtml → using_defaults_with_type_list.html.erb} +0 -0
  1095. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rjs → using_defaults_with_type_list.js.rjs} +0 -0
  1096. data/vendor/rails/actionpack/test/fixtures/respond_to/{using_defaults_with_type_list.rxml → using_defaults_with_type_list.xml.builder} +0 -0
  1097. data/vendor/rails/actionpack/test/fixtures/scope/test/{modgreet.rhtml → modgreet.erb} +0 -0
  1098. data/vendor/rails/actionpack/test/fixtures/test/{_customer.rhtml → _customer.erb} +0 -0
  1099. data/vendor/rails/actionpack/test/fixtures/test/{_customer_greeting.rhtml → _customer_greeting.erb} +0 -0
  1100. data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +1 -0
  1101. data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +2 -0
  1102. data/vendor/rails/actionpack/test/fixtures/test/{_hello.rxml → _hello.builder} +0 -0
  1103. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +3 -0
  1104. data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +1 -0
  1105. data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +1 -0
  1106. data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +1 -0
  1107. data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
  1108. data/vendor/rails/actionpack/test/fixtures/test/{_partial_only.rhtml → _partial_only.erb} +0 -0
  1109. data/vendor/rails/actionpack/test/fixtures/test/{_person.rhtml → _person.erb} +0 -0
  1110. data/vendor/rails/actionpack/test/fixtures/test/{action_talk_to_layout.rhtml → action_talk_to_layout.erb} +0 -0
  1111. data/vendor/rails/actionpack/test/fixtures/test/{block_content_for.rhtml → block_content_for.erb} +0 -0
  1112. data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
  1113. data/vendor/rails/actionpack/test/fixtures/test/{capturing.rhtml → capturing.erb} +0 -0
  1114. data/vendor/rails/actionpack/test/fixtures/test/{content_for.rhtml → content_for.erb} +0 -0
  1115. data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +3 -0
  1116. data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +2 -0
  1117. data/vendor/rails/actionpack/test/fixtures/test/dot.directory/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
  1118. data/vendor/rails/actionpack/test/fixtures/test/{erb_content_for.rhtml → erb_content_for.erb} +0 -0
  1119. data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +1 -0
  1120. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +1 -0
  1121. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
  1122. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
  1123. data/vendor/rails/actionpack/test/fixtures/test/{greeting.rhtml → greeting.erb} +0 -0
  1124. data/vendor/rails/actionpack/test/fixtures/test/{hello.rxml → hello.builder} +0 -0
  1125. data/vendor/rails/actionpack/test/fixtures/test/{hello_world.rhtml → hello_world.erb} +0 -0
  1126. data/vendor/rails/actionpack/test/fixtures/test/{hello_world_container.rxml → hello_world_container.builder} +0 -0
  1127. data/vendor/rails/actionpack/test/fixtures/test/{hello_world.rxml → hello_world_from_rxml.builder} +0 -0
  1128. data/vendor/rails/actionpack/test/fixtures/test/{hello_world_with_layout_false.rhtml → hello_world_with_layout_false.erb} +0 -0
  1129. data/vendor/rails/actionpack/test/fixtures/test/{hello_xml_world.rxml → hello_xml_world.builder} +0 -0
  1130. data/vendor/rails/actionpack/test/fixtures/test/list.erb +1 -0
  1131. data/vendor/rails/actionpack/test/fixtures/test/{non_erb_block_content_for.rxml → non_erb_block_content_for.builder} +0 -0
  1132. data/vendor/rails/actionpack/test/fixtures/test/{potential_conflicts.rhtml → potential_conflicts.erb} +0 -0
  1133. data/vendor/rails/actionpack/test/fixtures/test/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
  1134. data/vendor/rails/actionpack/test/fixtures/test/{render_file_with_locals.rhtml → render_file_with_locals.erb} +0 -0
  1135. data/vendor/rails/actionpack/test/fixtures/test/{render_to_string_test.rhtml → render_to_string_test.erb} +0 -0
  1136. data/vendor/rails/actionpack/test/fixtures/test/{update_element_with_capture.rhtml → update_element_with_capture.erb} +0 -0
  1137. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +1 -0
  1138. data/vendor/rails/actionpack/test/fixtures/topic.rb +1 -1
  1139. data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +67 -20
  1140. data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +255 -54
  1141. data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +101 -0
  1142. data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +2 -2
  1143. data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +88 -42
  1144. data/vendor/rails/actionpack/test/template/date_helper_test.rb +125 -9
  1145. data/vendor/rails/actionpack/test/template/erb_util_test.rb +56 -0
  1146. data/vendor/rails/actionpack/test/template/form_helper_test.rb +326 -33
  1147. data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +822 -15
  1148. data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +96 -30
  1149. data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +61 -13
  1150. data/vendor/rails/actionpack/test/template/number_helper_test.rb +12 -11
  1151. data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +185 -24
  1152. data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +49 -0
  1153. data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +9 -3
  1154. data/vendor/rails/actionpack/test/template/tag_helper_test.rb +13 -2
  1155. data/vendor/rails/actionpack/test/template/text_helper_test.rb +38 -52
  1156. data/vendor/rails/actionpack/test/template/url_helper_test.rb +216 -46
  1157. data/vendor/rails/activemodel/CHANGES +12 -0
  1158. data/vendor/rails/activemodel/README +21 -0
  1159. data/vendor/rails/activemodel/Rakefile +4 -0
  1160. data/vendor/rails/activemodel/lib/active_model.rb +17 -0
  1161. data/vendor/rails/activemodel/lib/active_model/base.rb +4 -0
  1162. data/vendor/rails/activemodel/lib/active_model/callbacks.rb +5 -0
  1163. data/vendor/rails/activemodel/lib/active_model/observing.rb +100 -0
  1164. data/vendor/rails/activemodel/lib/active_model/validations.rb +4 -0
  1165. data/vendor/rails/activemodel/spec/observing_spec.rb +120 -0
  1166. data/vendor/rails/activemodel/spec/spec_helper.rb +17 -0
  1167. data/vendor/rails/activerecord/CHANGELOG +2484 -34
  1168. data/vendor/rails/activerecord/MIT-LICENSE +1 -1
  1169. data/vendor/rails/activerecord/README +1 -15
  1170. data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +3 -34
  1171. data/vendor/rails/activerecord/Rakefile +98 -77
  1172. data/vendor/rails/activerecord/install.rb +1 -1
  1173. data/vendor/rails/activerecord/lib/active_record.rb +13 -22
  1174. data/vendor/rails/activerecord/lib/active_record/aggregations.rb +38 -49
  1175. data/vendor/rails/activerecord/lib/active_record/associations.rb +465 -338
  1176. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +66 -20
  1177. data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +24 -22
  1178. data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +46 -51
  1179. data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +21 -57
  1180. data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +52 -25
  1181. data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +30 -14
  1182. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +253 -0
  1183. data/vendor/rails/activerecord/lib/active_record/base.rb +830 -532
  1184. data/vendor/rails/activerecord/lib/active_record/calculations.rb +60 -63
  1185. data/vendor/rails/activerecord/lib/active_record/callbacks.rb +57 -83
  1186. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +38 -9
  1187. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +56 -15
  1188. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +87 -0
  1189. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +23 -12
  1190. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +191 -62
  1191. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +37 -34
  1192. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +28 -17
  1193. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +119 -37
  1194. data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +473 -210
  1195. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
  1196. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +91 -107
  1197. data/vendor/rails/activerecord/lib/active_record/fixtures.rb +522 -116
  1198. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +72 -34
  1199. data/vendor/rails/activerecord/lib/active_record/migration.rb +80 -57
  1200. data/vendor/rails/activerecord/lib/active_record/observer.rb +13 -10
  1201. data/vendor/rails/activerecord/lib/active_record/query_cache.rb +14 -57
  1202. data/vendor/rails/activerecord/lib/active_record/reflection.rb +35 -38
  1203. data/vendor/rails/activerecord/lib/active_record/schema.rb +5 -5
  1204. data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +35 -13
  1205. data/vendor/rails/activerecord/lib/active_record/serialization.rb +98 -0
  1206. data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +71 -0
  1207. data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +315 -0
  1208. data/vendor/rails/activerecord/lib/active_record/timestamp.rb +20 -21
  1209. data/vendor/rails/activerecord/lib/active_record/transactions.rb +39 -43
  1210. data/vendor/rails/activerecord/lib/active_record/validations.rb +290 -108
  1211. data/vendor/rails/activerecord/lib/active_record/version.rb +3 -3
  1212. data/vendor/rails/activerecord/lib/activerecord.rb +1 -0
  1213. data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +15 -2
  1214. data/vendor/rails/activerecord/test/abstract_unit.rb +24 -17
  1215. data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +20 -8
  1216. data/vendor/rails/activerecord/test/adapter_test.rb +23 -5
  1217. data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +15 -1
  1218. data/vendor/rails/activerecord/test/aggregations_test.rb +34 -1
  1219. data/vendor/rails/activerecord/test/all.sh +2 -2
  1220. data/vendor/rails/activerecord/test/associations/callbacks_test.rb +51 -30
  1221. data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +1 -29
  1222. data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +145 -0
  1223. data/vendor/rails/activerecord/test/associations/eager_test.rb +42 -6
  1224. data/vendor/rails/activerecord/test/associations/extension_test.rb +6 -1
  1225. data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +88 -0
  1226. data/vendor/rails/activerecord/test/associations/join_model_test.rb +66 -13
  1227. data/vendor/rails/activerecord/test/associations_test.rb +531 -226
  1228. data/vendor/rails/activerecord/test/attribute_methods_test.rb +97 -0
  1229. data/vendor/rails/activerecord/test/base_test.rb +251 -105
  1230. data/vendor/rails/activerecord/test/binary_test.rb +22 -27
  1231. data/vendor/rails/activerecord/test/calculations_test.rb +37 -5
  1232. data/vendor/rails/activerecord/test/callbacks_test.rb +23 -0
  1233. data/vendor/rails/activerecord/test/connection_test_firebird.rb +2 -2
  1234. data/vendor/rails/activerecord/test/connection_test_mysql.rb +30 -0
  1235. data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +3 -0
  1236. data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +5 -14
  1237. data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +5 -14
  1238. data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +1 -1
  1239. data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +69 -0
  1240. data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +178 -27
  1241. data/vendor/rails/activerecord/test/date_time_test.rb +37 -0
  1242. data/vendor/rails/activerecord/test/defaults_test.rb +6 -14
  1243. data/vendor/rails/activerecord/test/deprecated_finder_test.rb +7 -128
  1244. data/vendor/rails/activerecord/test/finder_test.rb +201 -55
  1245. data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
  1246. data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
  1247. data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
  1248. data/vendor/rails/activerecord/test/fixtures/author.rb +14 -5
  1249. data/vendor/rails/activerecord/test/fixtures/binaries.yml +130 -435
  1250. data/vendor/rails/activerecord/test/fixtures/book.rb +4 -0
  1251. data/vendor/rails/activerecord/test/fixtures/books.yml +7 -0
  1252. data/vendor/rails/activerecord/test/fixtures/category.rb +6 -0
  1253. data/vendor/rails/activerecord/test/fixtures/citation.rb +6 -0
  1254. data/vendor/rails/activerecord/test/fixtures/company.rb +8 -1
  1255. data/vendor/rails/activerecord/test/fixtures/computer.rb +1 -0
  1256. data/vendor/rails/activerecord/test/fixtures/contact.rb +16 -0
  1257. data/vendor/rails/activerecord/test/fixtures/customer.rb +2 -2
  1258. data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +1 -0
  1259. data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +4 -0
  1260. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +3 -1
  1261. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +6 -0
  1262. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +1 -0
  1263. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +5 -0
  1264. data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +41 -25
  1265. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +2 -0
  1266. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +5 -0
  1267. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +7 -0
  1268. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +87 -58
  1269. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +1 -2
  1270. data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +289 -8
  1271. data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +11 -0
  1272. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +1 -0
  1273. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +4 -0
  1274. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +1 -0
  1275. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +4 -0
  1276. data/vendor/rails/activerecord/test/fixtures/developer.rb +10 -0
  1277. data/vendor/rails/activerecord/test/fixtures/example.log +1 -0
  1278. data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
  1279. data/vendor/rails/activerecord/test/fixtures/item.rb +7 -0
  1280. data/vendor/rails/activerecord/test/fixtures/items.yml +4 -0
  1281. data/vendor/rails/activerecord/test/fixtures/joke.rb +0 -3
  1282. data/vendor/rails/activerecord/test/fixtures/matey.rb +4 -0
  1283. data/vendor/rails/activerecord/test/fixtures/mateys.yml +4 -0
  1284. data/vendor/rails/activerecord/test/fixtures/minimalistic.rb +2 -0
  1285. data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +2 -0
  1286. data/vendor/rails/activerecord/test/fixtures/mixins.yml +2 -100
  1287. data/vendor/rails/activerecord/test/fixtures/parrot.rb +13 -0
  1288. data/vendor/rails/activerecord/test/fixtures/parrots.yml +27 -0
  1289. data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +7 -0
  1290. data/vendor/rails/activerecord/test/fixtures/pirate.rb +5 -0
  1291. data/vendor/rails/activerecord/test/fixtures/pirates.yml +9 -0
  1292. data/vendor/rails/activerecord/test/fixtures/post.rb +1 -0
  1293. data/vendor/rails/activerecord/test/fixtures/project.rb +3 -2
  1294. data/vendor/rails/activerecord/test/fixtures/reply.rb +0 -0
  1295. data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
  1296. data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
  1297. data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +14 -0
  1298. data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +8 -0
  1299. data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +7 -0
  1300. data/vendor/rails/activerecord/test/fixtures/ship.rb +3 -0
  1301. data/vendor/rails/activerecord/test/fixtures/ships.yml +5 -0
  1302. data/vendor/rails/activerecord/test/fixtures/tagging.rb +4 -0
  1303. data/vendor/rails/activerecord/test/fixtures/taggings.yml +8 -1
  1304. data/vendor/rails/activerecord/test/fixtures/topic.rb +13 -1
  1305. data/vendor/rails/activerecord/test/fixtures/treasure.rb +4 -0
  1306. data/vendor/rails/activerecord/test/fixtures/treasures.yml +10 -0
  1307. data/vendor/rails/activerecord/test/fixtures_test.rb +220 -23
  1308. data/vendor/rails/activerecord/test/inheritance_test.rb +7 -1
  1309. data/vendor/rails/activerecord/test/json_serialization_test.rb +180 -0
  1310. data/vendor/rails/activerecord/test/lifecycle_test.rb +1 -1
  1311. data/vendor/rails/activerecord/test/locking_test.rb +94 -2
  1312. data/vendor/rails/activerecord/test/migration_test.rb +206 -40
  1313. data/vendor/rails/activerecord/test/mixin_test.rb +13 -515
  1314. data/vendor/rails/activerecord/test/pk_test.rb +3 -6
  1315. data/vendor/rails/activerecord/test/query_cache_test.rb +104 -0
  1316. data/vendor/rails/activerecord/test/readonly_test.rb +0 -0
  1317. data/vendor/rails/activerecord/test/reflection_test.rb +16 -0
  1318. data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +177 -0
  1319. data/vendor/rails/activerecord/test/schema_dumper_test.rb +38 -3
  1320. data/vendor/rails/activerecord/test/serialization_test.rb +47 -0
  1321. data/vendor/rails/activerecord/test/transactions_test.rb +74 -23
  1322. data/vendor/rails/activerecord/test/unconnected_test.rb +1 -1
  1323. data/vendor/rails/activerecord/test/validations_test.rb +330 -32
  1324. data/vendor/rails/activerecord/test/xml_serialization_test.rb +121 -44
  1325. data/vendor/rails/activeresource/CHANGELOG +223 -0
  1326. data/vendor/rails/activeresource/MIT-LICENSE +20 -0
  1327. data/vendor/rails/activeresource/README +165 -0
  1328. data/vendor/rails/activeresource/Rakefile +133 -0
  1329. data/vendor/rails/activeresource/lib/active_resource.rb +47 -0
  1330. data/vendor/rails/activeresource/lib/active_resource/base.rb +872 -0
  1331. data/vendor/rails/activeresource/lib/active_resource/connection.rb +172 -0
  1332. data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +105 -0
  1333. data/vendor/rails/activeresource/lib/active_resource/formats.rb +14 -0
  1334. data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +23 -0
  1335. data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +34 -0
  1336. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +147 -0
  1337. data/vendor/rails/activeresource/lib/active_resource/validations.rb +288 -0
  1338. data/vendor/rails/activeresource/lib/active_resource/version.rb +9 -0
  1339. data/vendor/rails/activeresource/lib/activeresource.rb +1 -0
  1340. data/vendor/rails/activeresource/test/abstract_unit.rb +10 -0
  1341. data/vendor/rails/activeresource/test/authorization_test.rb +82 -0
  1342. data/vendor/rails/activeresource/test/base/custom_methods_test.rb +96 -0
  1343. data/vendor/rails/activeresource/test/base/equality_test.rb +43 -0
  1344. data/vendor/rails/activeresource/test/base/load_test.rb +111 -0
  1345. data/vendor/rails/activeresource/test/base_errors_test.rb +48 -0
  1346. data/vendor/rails/activeresource/test/base_test.rb +454 -0
  1347. data/vendor/rails/activeresource/test/connection_test.rb +170 -0
  1348. data/vendor/rails/activeresource/test/fixtures/beast.rb +14 -0
  1349. data/vendor/rails/activeresource/test/fixtures/person.rb +3 -0
  1350. data/vendor/rails/activeresource/test/fixtures/street_address.rb +4 -0
  1351. data/vendor/rails/activeresource/test/format_test.rb +42 -0
  1352. data/vendor/rails/activeresource/test/setter_trap.rb +27 -0
  1353. data/vendor/rails/activesupport/CHANGELOG +274 -7
  1354. data/vendor/rails/activesupport/MIT-LICENSE +1 -1
  1355. data/vendor/rails/activesupport/Rakefile +2 -1
  1356. data/vendor/rails/activesupport/install.rb +1 -1
  1357. data/vendor/rails/activesupport/lib/active_support.rb +9 -4
  1358. data/vendor/rails/activesupport/lib/active_support/basic_object.rb +5 -0
  1359. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +107 -0
  1360. data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +94 -5
  1361. data/vendor/rails/activesupport/lib/active_support/core_ext.rb +4 -1
  1362. data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +8 -2
  1363. data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +28 -0
  1364. data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +40 -18
  1365. data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +19 -0
  1366. data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +20 -7
  1367. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +12 -0
  1368. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +1 -2
  1369. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +6 -0
  1370. data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +2 -8
  1371. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +2 -2
  1372. data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +4 -3
  1373. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +1 -1
  1374. data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +40 -0
  1375. data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +3 -3
  1376. data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +2 -2
  1377. data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +5 -1
  1378. data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +13 -0
  1379. data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +188 -0
  1380. data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +72 -13
  1381. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +10 -0
  1382. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +77 -0
  1383. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +74 -0
  1384. data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +37 -0
  1385. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +1 -0
  1386. data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +2 -2
  1387. data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +21 -0
  1388. data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +5 -0
  1389. data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
  1390. data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +5 -5
  1391. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +91 -49
  1392. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +8 -0
  1393. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +24 -0
  1394. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +16 -2
  1395. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +9 -8
  1396. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +2 -2
  1397. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +28 -0
  1398. data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +2 -2
  1399. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +4 -4
  1400. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +5 -4
  1401. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +13 -0
  1402. data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +8 -7
  1403. data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +17 -5
  1404. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
  1405. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +1 -1
  1406. data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +21 -0
  1407. data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +2 -2
  1408. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +2 -2
  1409. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +30 -11
  1410. data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +4 -2
  1411. data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +14 -0
  1412. data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +40 -29
  1413. data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +22 -0
  1414. data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +29 -4
  1415. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +1 -1
  1416. data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +7 -1
  1417. data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +22 -0
  1418. data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +11 -9
  1419. data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +22 -0
  1420. data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +12 -0
  1421. data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +16 -8
  1422. data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +11 -2
  1423. data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +7 -0
  1424. data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +2 -2
  1425. data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
  1426. data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +12 -10
  1427. data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +1 -0
  1428. data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +62 -0
  1429. data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +4 -2
  1430. data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
  1431. data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +87 -54
  1432. data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +71 -10
  1433. data/vendor/rails/activesupport/lib/active_support/dependencies.rb +32 -31
  1434. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +4 -2
  1435. data/vendor/rails/activesupport/lib/active_support/duration.rb +96 -0
  1436. data/vendor/rails/activesupport/lib/active_support/inflections.rb +2 -1
  1437. data/vendor/rails/activesupport/lib/active_support/inflector.rb +13 -6
  1438. data/vendor/rails/activesupport/lib/active_support/json.rb +22 -39
  1439. data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +60 -0
  1440. data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +5 -0
  1441. data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +5 -0
  1442. data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +12 -0
  1443. data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +5 -0
  1444. data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +50 -0
  1445. data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +5 -0
  1446. data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +5 -0
  1447. data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +6 -0
  1448. data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +5 -0
  1449. data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +30 -0
  1450. data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
  1451. data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +5 -0
  1452. data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +5 -0
  1453. data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +38 -0
  1454. data/vendor/rails/activesupport/lib/active_support/json/variable.rb +10 -0
  1455. data/vendor/rails/activesupport/lib/active_support/multibyte.rb +7 -5
  1456. data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +14 -2
  1457. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +115 -5
  1458. data/vendor/rails/activesupport/lib/active_support/option_merger.rb +7 -7
  1459. data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +22 -17
  1460. data/vendor/rails/activesupport/lib/active_support/test_case.rb +5 -0
  1461. data/vendor/rails/activesupport/lib/active_support/testing.rb +1 -0
  1462. data/vendor/rails/activesupport/lib/active_support/testing/default.rb +12 -0
  1463. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +8 -7
  1464. data/vendor/rails/activesupport/lib/active_support/vendor.rb +14 -0
  1465. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
  1466. data/vendor/rails/activesupport/lib/active_support/vendor/{builder.rb → builder-2.1.2/builder.rb} +0 -0
  1467. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
  1468. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
  1469. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
  1470. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
  1471. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
  1472. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
  1473. data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
  1474. data/vendor/rails/activesupport/lib/active_support/version.rb +3 -3
  1475. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +12 -12
  1476. data/vendor/rails/activesupport/lib/activesupport.rb +1 -0
  1477. data/vendor/rails/activesupport/test/abstract_unit.rb +13 -0
  1478. data/vendor/rails/activesupport/test/buffered_logger_test.rb +107 -0
  1479. data/vendor/rails/activesupport/test/clean_logger_test.rb +12 -35
  1480. data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +74 -6
  1481. data/vendor/rails/activesupport/test/core_ext/blank_test.rb +12 -4
  1482. data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +16 -0
  1483. data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +105 -0
  1484. data/vendor/rails/activesupport/test/core_ext/class_test.rb +10 -0
  1485. data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +180 -4
  1486. data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +230 -0
  1487. data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +22 -0
  1488. data/vendor/rails/activesupport/test/core_ext/duration_test.rb +21 -0
  1489. data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +10 -10
  1490. data/vendor/rails/activesupport/test/core_ext/file_test.rb +29 -0
  1491. data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +25 -0
  1492. data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +262 -28
  1493. data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
  1494. data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +11 -11
  1495. data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +7 -7
  1496. data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +29 -2
  1497. data/vendor/rails/activesupport/test/core_ext/module_test.rb +92 -28
  1498. data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +91 -1
  1499. data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +98 -7
  1500. data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +50 -0
  1501. data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +40 -12
  1502. data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +107 -22
  1503. data/vendor/rails/activesupport/test/dependencies_test.rb +30 -31
  1504. data/vendor/rails/activesupport/test/inflector_test.rb +49 -205
  1505. data/vendor/rails/activesupport/test/inflector_test_cases.rb +208 -0
  1506. data/vendor/rails/activesupport/test/json/decoding_test.rb +41 -0
  1507. data/vendor/rails/activesupport/test/json/encoding_test.rb +111 -0
  1508. data/vendor/rails/activesupport/test/multibyte_chars_test.rb +10 -1
  1509. data/vendor/rails/activesupport/test/multibyte_conformance.rb +2 -2
  1510. data/vendor/rails/activesupport/test/multibyte_handler_test.rb +95 -2
  1511. data/vendor/rails/activesupport/test/ordered_options_test.rb +5 -1
  1512. data/vendor/rails/activesupport/test/test_test.rb +73 -0
  1513. data/vendor/rails/activesupport/test/time_zone_test.rb +10 -3
  1514. data/vendor/rails/cleanlogs.sh +0 -0
  1515. data/vendor/rails/pushgems.rb +2 -2
  1516. data/vendor/rails/railties/CHANGELOG +518 -9
  1517. data/vendor/rails/railties/MIT-LICENSE +1 -1
  1518. data/vendor/rails/railties/README +17 -25
  1519. data/vendor/rails/railties/Rakefile +41 -18
  1520. data/vendor/rails/railties/bin/about +1 -1
  1521. data/vendor/rails/railties/bin/console +1 -1
  1522. data/vendor/rails/railties/bin/destroy +1 -1
  1523. data/vendor/rails/railties/bin/generate +1 -1
  1524. data/vendor/rails/railties/bin/performance/request +3 -0
  1525. data/vendor/rails/railties/bin/plugin +1 -1
  1526. data/vendor/rails/railties/bin/rails +0 -0
  1527. data/vendor/rails/railties/bin/runner +1 -1
  1528. data/vendor/rails/railties/bin/server +1 -1
  1529. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +3 -3
  1530. data/vendor/rails/railties/configs/apache.conf +1 -1
  1531. data/vendor/rails/railties/configs/databases/mysql.yml +10 -4
  1532. data/vendor/rails/railties/configs/databases/postgresql.yml +16 -12
  1533. data/vendor/rails/railties/configs/databases/sqlite3.yml +1 -1
  1534. data/vendor/rails/railties/configs/initializers/inflections.rb +10 -0
  1535. data/vendor/rails/railties/configs/initializers/mime_types.rb +5 -0
  1536. data/vendor/rails/railties/configs/routes.rb +23 -11
  1537. data/vendor/rails/railties/dispatches/dispatch.fcgi +0 -0
  1538. data/vendor/rails/railties/dispatches/dispatch.rb +0 -0
  1539. data/vendor/rails/railties/doc/README_FOR_APP +1 -1
  1540. data/vendor/rails/railties/environments/boot.rb +96 -26
  1541. data/vendor/rails/railties/environments/development.rb +2 -5
  1542. data/vendor/rails/railties/environments/environment.rb +24 -25
  1543. data/vendor/rails/railties/environments/production.rb +1 -0
  1544. data/vendor/rails/railties/environments/test.rb +4 -1
  1545. data/vendor/rails/railties/fresh_rakefile +0 -0
  1546. data/vendor/rails/railties/helpers/application.rb +5 -2
  1547. data/vendor/rails/railties/helpers/test_helper.rb +10 -0
  1548. data/vendor/rails/railties/html/422.html +30 -0
  1549. data/vendor/rails/railties/html/500.html +1 -1
  1550. data/vendor/rails/railties/html/index.html +2 -2
  1551. data/vendor/rails/railties/html/javascripts/controls.js +484 -354
  1552. data/vendor/rails/railties/html/javascripts/dragdrop.js +88 -58
  1553. data/vendor/rails/railties/html/javascripts/effects.js +396 -364
  1554. data/vendor/rails/railties/html/javascripts/prototype.js +2817 -1107
  1555. data/vendor/rails/railties/html/robots.txt +5 -1
  1556. data/vendor/rails/railties/lib/commands/console.rb +12 -5
  1557. data/vendor/rails/railties/lib/commands/generate.rb +0 -0
  1558. data/vendor/rails/railties/lib/commands/performance/request.rb +6 -0
  1559. data/vendor/rails/railties/lib/commands/plugin.rb +17 -12
  1560. data/vendor/rails/railties/lib/commands/process/spawner.rb +14 -4
  1561. data/vendor/rails/railties/lib/commands/runner.rb +1 -1
  1562. data/vendor/rails/railties/lib/commands/servers/base.rb +12 -0
  1563. data/vendor/rails/railties/lib/commands/servers/mongrel.rb +5 -1
  1564. data/vendor/rails/railties/lib/commands/servers/webrick.rb +14 -7
  1565. data/vendor/rails/railties/lib/console_app.rb +5 -2
  1566. data/vendor/rails/railties/lib/console_with_helpers.rb +5 -2
  1567. data/vendor/rails/railties/lib/dispatcher.rb +3 -151
  1568. data/vendor/rails/railties/lib/fcgi_handler.rb +79 -81
  1569. data/vendor/rails/railties/lib/initializer.rb +125 -169
  1570. data/vendor/rails/railties/lib/rails/plugin.rb +84 -0
  1571. data/vendor/rails/railties/lib/rails/plugin/loader.rb +150 -0
  1572. data/vendor/rails/railties/lib/rails/plugin/locator.rb +78 -0
  1573. data/vendor/rails/railties/lib/rails/version.rb +3 -3
  1574. data/vendor/rails/railties/lib/rails_generator/base.rb +11 -9
  1575. data/vendor/rails/railties/lib/rails_generator/commands.rb +24 -14
  1576. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +0 -7
  1577. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +26 -7
  1578. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +11 -12
  1579. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +2 -2
  1580. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +1 -11
  1581. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/{view.rhtml → view.html.erb} +0 -0
  1582. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +5 -11
  1583. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +8 -10
  1584. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +3 -3
  1585. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
  1586. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -3
  1587. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +8 -24
  1588. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
  1589. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -3
  1590. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +23 -8
  1591. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +15 -2
  1592. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +6 -2
  1593. data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +15 -14
  1594. data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +10 -3
  1595. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +11 -3
  1596. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +4 -1
  1597. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +1 -3
  1598. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +5 -7
  1599. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -2
  1600. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +8 -18
  1601. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +1 -0
  1602. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
  1603. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +10 -1
  1604. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +0 -0
  1605. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +1 -1
  1606. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -1
  1607. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -1
  1608. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +1 -1
  1609. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +23 -0
  1610. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +13 -15
  1611. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +1 -1
  1612. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +2 -14
  1613. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +24 -31
  1614. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +45 -146
  1615. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +64 -37
  1616. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +23 -80
  1617. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/{layout.rhtml → layout.html.erb} +0 -0
  1618. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +1 -1
  1619. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +19 -0
  1620. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +24 -0
  1621. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +18 -0
  1622. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +10 -0
  1623. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +6 -11
  1624. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +3 -3
  1625. data/vendor/rails/railties/lib/rails_generator/lookup.rb +45 -10
  1626. data/vendor/rails/railties/lib/rails_generator/scripts.rb +6 -3
  1627. data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +23 -0
  1628. data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +160 -0
  1629. data/vendor/rails/railties/lib/rails_generator/spec.rb +1 -1
  1630. data/vendor/rails/railties/lib/source_annotation_extractor.rb +62 -0
  1631. data/vendor/rails/railties/lib/tasks/annotations.rake +23 -0
  1632. data/vendor/rails/railties/lib/tasks/databases.rake +260 -84
  1633. data/vendor/rails/railties/lib/tasks/documentation.rake +11 -13
  1634. data/vendor/rails/railties/lib/tasks/framework.rake +14 -8
  1635. data/vendor/rails/railties/lib/tasks/misc.rake +7 -1
  1636. data/vendor/rails/railties/lib/tasks/rails.rb +1 -1
  1637. data/vendor/rails/railties/lib/tasks/testing.rake +5 -7
  1638. data/vendor/rails/railties/lib/test_help.rb +4 -3
  1639. data/vendor/rails/railties/lib/webrick_server.rb +3 -4
  1640. data/vendor/rails/railties/test/abstract_unit.rb +11 -7
  1641. data/vendor/rails/railties/test/boot_test.rb +179 -0
  1642. data/vendor/rails/railties/test/console_app_test.rb +29 -0
  1643. data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +147 -176
  1644. data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -1
  1645. data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
  1646. data/vendor/rails/railties/test/generators/generator_test_helper.rb +195 -0
  1647. data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +109 -0
  1648. data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +106 -0
  1649. data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +185 -0
  1650. data/vendor/rails/railties/test/initializer_test.rb +204 -19
  1651. data/vendor/rails/railties/test/plugin_loader_test.rb +140 -0
  1652. data/vendor/rails/railties/test/plugin_locator_test.rb +69 -0
  1653. data/vendor/rails/railties/test/plugin_test.rb +130 -100
  1654. data/vendor/rails/railties/test/plugin_test_helper.rb +29 -0
  1655. data/vendor/rails/railties/test/rails_generator_test.rb +25 -15
  1656. data/vendor/rails/railties/test/rails_info_test.rb +7 -0
  1657. data/vendor/rails/railties/test/secret_key_generation_test.rb +35 -0
  1658. data/vendor/rails/release.rb +4 -4
  1659. metadata +1355 -486
  1660. data/app/views/admin/extension/index.rhtml +0 -45
  1661. data/app/views/admin/layout/edit.rhtml +0 -39
  1662. data/app/views/admin/page/_meta_row.rhtml +0 -4
  1663. data/app/views/admin/page/_tag_reference.rhtml +0 -4
  1664. data/app/views/admin/page/edit.rhtml +0 -140
  1665. data/app/views/admin/page/index.rhtml +0 -31
  1666. data/app/views/admin/user/edit.rhtml +0 -54
  1667. data/app/views/admin/user/preferences.rhtml +0 -29
  1668. data/lib/console_utils.rb +0 -167
  1669. data/lib/plugins/extension_patches/lib/view_paths_extension.rb +0 -23
  1670. data/public/javascripts/admin.js +0 -89
  1671. data/public/javascripts/sitemap.js +0 -131
  1672. data/public/javascripts/tabcontrol.js +0 -125
  1673. data/public/javascripts/tag_reference_search.js +0 -23
  1674. data/test/functional/admin/abstract_model_controller_test.rb +0 -125
  1675. data/test/functional/admin/export_controller_test.rb +0 -23
  1676. data/test/functional/admin/extension_controller_test.rb +0 -41
  1677. data/test/functional/admin/layout_controller_test.rb +0 -42
  1678. data/test/functional/admin/page_controller_test.rb +0 -300
  1679. data/test/functional/admin/snippet_controller_test.rb +0 -11
  1680. data/test/functional/admin/user_controller_test.rb +0 -90
  1681. data/test/functional/admin/welcome_controller_test.rb +0 -51
  1682. data/test/functional/application_controller_test.rb +0 -45
  1683. data/test/functional/extension_initialization_test.rb +0 -131
  1684. data/test/functional/extension_load_order_test.rb +0 -49
  1685. data/test/functional/login_system_test.rb +0 -138
  1686. data/test/functional/site_controller_test.rb +0 -203
  1687. data/test/unit/admin_ui_test.rb +0 -93
  1688. data/test/unit/annotatable_test.rb +0 -76
  1689. data/test/unit/extension_migrator_test.rb +0 -17
  1690. data/test/unit/extension_test.rb +0 -42
  1691. data/test/unit/file_not_found_page_test.rb +0 -31
  1692. data/test/unit/inheritable_class_attributes_test.rb +0 -47
  1693. data/test/unit/layout_test.rb +0 -29
  1694. data/test/unit/local_time_test.rb +0 -45
  1695. data/test/unit/method_observer_test.rb +0 -53
  1696. data/test/unit/page_context_test.rb +0 -60
  1697. data/test/unit/page_part_test.rb +0 -44
  1698. data/test/unit/page_test.rb +0 -449
  1699. data/test/unit/radiant/config_test.rb +0 -57
  1700. data/test/unit/radiant/exporter_test.rb +0 -26
  1701. data/test/unit/radiant/taggable_test.rb +0 -105
  1702. data/test/unit/response_cache_test.rb +0 -233
  1703. data/test/unit/simpleton_test.rb +0 -42
  1704. data/test/unit/snippet_test.rb +0 -47
  1705. data/test/unit/standard_tags_test.rb +0 -472
  1706. data/test/unit/status_test.rb +0 -43
  1707. data/test/unit/text_filter_test.rb +0 -42
  1708. data/test/unit/user_action_observer_test.rb +0 -40
  1709. data/test/unit/user_test.rb +0 -137
  1710. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +0 -3
  1711. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb +0 -242
  1712. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb +0 -39
  1713. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/base64.rb +0 -71
  1714. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/config.rb +0 -69
  1715. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/encode.rb +0 -467
  1716. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/header.rb +0 -914
  1717. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mail.rb +0 -447
  1718. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb +0 -433
  1719. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/net.rb +0 -280
  1720. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb +0 -135
  1721. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/parser.rb +0 -1522
  1722. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/port.rb +0 -377
  1723. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +0 -131
  1724. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb +0 -41
  1725. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb +0 -263
  1726. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb +0 -277
  1727. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail/utils.rb +0 -238
  1728. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_test_helper.rhtml +0 -1
  1729. data/vendor/rails/actionmailer/test/fixtures/helpers/test_helper.rb +0 -5
  1730. data/vendor/rails/actionmailer/test/fixtures/raw_email11 +0 -34
  1731. data/vendor/rails/actionpack/examples/address_book/index.rhtml +0 -33
  1732. data/vendor/rails/actionpack/examples/address_book/layout.rhtml +0 -8
  1733. data/vendor/rails/actionpack/examples/address_book_controller.cgi +0 -9
  1734. data/vendor/rails/actionpack/examples/address_book_controller.fcgi +0 -6
  1735. data/vendor/rails/actionpack/examples/address_book_controller.rb +0 -52
  1736. data/vendor/rails/actionpack/examples/address_book_controller.rbx +0 -4
  1737. data/vendor/rails/actionpack/examples/benchmark.rb +0 -52
  1738. data/vendor/rails/actionpack/examples/benchmark_with_ar.fcgi +0 -89
  1739. data/vendor/rails/actionpack/examples/blog_controller.cgi +0 -53
  1740. data/vendor/rails/actionpack/examples/debate/index.rhtml +0 -14
  1741. data/vendor/rails/actionpack/examples/debate/new_topic.rhtml +0 -22
  1742. data/vendor/rails/actionpack/examples/debate/topic.rhtml +0 -32
  1743. data/vendor/rails/actionpack/examples/debate_controller.cgi +0 -57
  1744. data/vendor/rails/actionpack/lib/action_controller/assertions/deprecated_assertions.rb +0 -228
  1745. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext.rb +0 -36
  1746. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb +0 -211
  1747. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb +0 -125
  1748. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb +0 -30
  1749. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb +0 -95
  1750. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session_performance_fix.rb +0 -30
  1751. data/vendor/rails/actionpack/lib/action_controller/deprecated_dependencies.rb +0 -65
  1752. data/vendor/rails/actionpack/lib/action_controller/deprecated_redirects.rb +0 -17
  1753. data/vendor/rails/actionpack/lib/action_controller/deprecated_request_methods.rb +0 -34
  1754. data/vendor/rails/actionpack/lib/action_controller/macros/auto_complete.rb +0 -53
  1755. data/vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb +0 -33
  1756. data/vendor/rails/actionpack/lib/action_controller/pagination.rb +0 -408
  1757. data/vendor/rails/actionpack/lib/action_controller/scaffolding.rb +0 -189
  1758. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml +0 -44
  1759. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml +0 -11
  1760. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.rhtml +0 -21
  1761. data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml +0 -7
  1762. data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml +0 -69
  1763. data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/list.rhtml +0 -27
  1764. data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/new.rhtml +0 -6
  1765. data/vendor/rails/actionpack/lib/action_controller/templates/scaffolds/show.rhtml +0 -9
  1766. data/vendor/rails/actionpack/lib/action_controller/vendor/xml_node.rb +0 -97
  1767. data/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb +0 -37
  1768. data/vendor/rails/actionpack/lib/action_view/helpers/java_script_macros_helper.rb +0 -233
  1769. data/vendor/rails/actionpack/lib/action_view/helpers/pagination_helper.rb +0 -86
  1770. data/vendor/rails/actionpack/test/activerecord/active_record_assertions_test.rb +0 -92
  1771. data/vendor/rails/actionpack/test/activerecord/pagination_test.rb +0 -165
  1772. data/vendor/rails/actionpack/test/controller/deprecated_instance_variables_test.rb +0 -48
  1773. data/vendor/rails/actionpack/test/controller/raw_post_test.rb +0 -68
  1774. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml +0 -1
  1775. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml +0 -1
  1776. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml +0 -1
  1777. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml +0 -1
  1778. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml +0 -1
  1779. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_headers_method.rhtml +0 -1
  1780. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml +0 -1
  1781. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml +0 -1
  1782. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml +0 -1
  1783. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_request_method.rhtml +0 -1
  1784. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml +0 -1
  1785. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_response_method.rhtml +0 -1
  1786. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml +0 -1
  1787. data/vendor/rails/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml +0 -1
  1788. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.rhtml +0 -1
  1789. data/vendor/rails/actionpack/test/fixtures/test/_hash_object.rhtml +0 -1
  1790. data/vendor/rails/actionpack/test/fixtures/test/list.rhtml +0 -1
  1791. data/vendor/rails/actionpack/test/template/deprecated_helper_test.rb +0 -36
  1792. data/vendor/rails/actionpack/test/template/deprecated_instance_variables_test.rb +0 -43
  1793. data/vendor/rails/actionpack/test/template/java_script_macros_helper_test.rb +0 -109
  1794. data/vendor/rails/actionwebservice/CHANGELOG +0 -293
  1795. data/vendor/rails/actionwebservice/MIT-LICENSE +0 -21
  1796. data/vendor/rails/actionwebservice/README +0 -364
  1797. data/vendor/rails/actionwebservice/Rakefile +0 -171
  1798. data/vendor/rails/actionwebservice/TODO +0 -32
  1799. data/vendor/rails/actionwebservice/examples/googlesearch/README +0 -143
  1800. data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +0 -50
  1801. data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +0 -57
  1802. data/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +0 -108
  1803. data/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb +0 -7
  1804. data/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb +0 -50
  1805. data/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb +0 -58
  1806. data/vendor/rails/actionwebservice/examples/metaWeblog/README +0 -17
  1807. data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +0 -60
  1808. data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +0 -34
  1809. data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +0 -67
  1810. data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +0 -48
  1811. data/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +0 -16
  1812. data/vendor/rails/actionwebservice/install.rb +0 -30
  1813. data/vendor/rails/actionwebservice/lib/action_web_service.rb +0 -66
  1814. data/vendor/rails/actionwebservice/lib/action_web_service/api.rb +0 -249
  1815. data/vendor/rails/actionwebservice/lib/action_web_service/base.rb +0 -42
  1816. data/vendor/rails/actionwebservice/lib/action_web_service/casting.rb +0 -136
  1817. data/vendor/rails/actionwebservice/lib/action_web_service/client.rb +0 -3
  1818. data/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb +0 -28
  1819. data/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb +0 -113
  1820. data/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +0 -58
  1821. data/vendor/rails/actionwebservice/lib/action_web_service/container.rb +0 -3
  1822. data/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb +0 -93
  1823. data/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb +0 -86
  1824. data/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb +0 -69
  1825. data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb +0 -2
  1826. data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +0 -203
  1827. data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +0 -376
  1828. data/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb +0 -202
  1829. data/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb +0 -4
  1830. data/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb +0 -112
  1831. data/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb +0 -37
  1832. data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +0 -176
  1833. data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +0 -241
  1834. data/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +0 -110
  1835. data/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb +0 -283
  1836. data/vendor/rails/actionwebservice/lib/action_web_service/struct.rb +0 -68
  1837. data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +0 -26
  1838. data/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb +0 -222
  1839. data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml +0 -65
  1840. data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -6
  1841. data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -29
  1842. data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -30
  1843. data/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb +0 -110
  1844. data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +0 -9
  1845. data/vendor/rails/actionwebservice/setup.rb +0 -1379
  1846. data/vendor/rails/actionwebservice/test/abstract_client.rb +0 -183
  1847. data/vendor/rails/actionwebservice/test/abstract_dispatcher.rb +0 -505
  1848. data/vendor/rails/actionwebservice/test/abstract_unit.rb +0 -45
  1849. data/vendor/rails/actionwebservice/test/api_test.rb +0 -102
  1850. data/vendor/rails/actionwebservice/test/apis/auto_load_api.rb +0 -3
  1851. data/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb +0 -2
  1852. data/vendor/rails/actionwebservice/test/base_test.rb +0 -42
  1853. data/vendor/rails/actionwebservice/test/casting_test.rb +0 -86
  1854. data/vendor/rails/actionwebservice/test/client_soap_test.rb +0 -152
  1855. data/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb +0 -151
  1856. data/vendor/rails/actionwebservice/test/container_test.rb +0 -73
  1857. data/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb +0 -137
  1858. data/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +0 -59
  1859. data/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql +0 -7
  1860. data/vendor/rails/actionwebservice/test/fixtures/users.yml +0 -10
  1861. data/vendor/rails/actionwebservice/test/gencov +0 -3
  1862. data/vendor/rails/actionwebservice/test/invocation_test.rb +0 -185
  1863. data/vendor/rails/actionwebservice/test/run +0 -6
  1864. data/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb +0 -146
  1865. data/vendor/rails/actionwebservice/test/struct_test.rb +0 -52
  1866. data/vendor/rails/actionwebservice/test/test_invoke_test.rb +0 -112
  1867. data/vendor/rails/activerecord/benchmarks/benchmark.rb +0 -26
  1868. data/vendor/rails/activerecord/benchmarks/mysql_benchmark.rb +0 -19
  1869. data/vendor/rails/activerecord/examples/associations.rb +0 -87
  1870. data/vendor/rails/activerecord/examples/shared_setup.rb +0 -15
  1871. data/vendor/rails/activerecord/examples/validation.rb +0 -85
  1872. data/vendor/rails/activerecord/lib/active_record/acts/list.rb +0 -256
  1873. data/vendor/rails/activerecord/lib/active_record/acts/nested_set.rb +0 -211
  1874. data/vendor/rails/activerecord/lib/active_record/acts/tree.rb +0 -96
  1875. data/vendor/rails/activerecord/lib/active_record/connection_adapters/db2_adapter.rb +0 -228
  1876. data/vendor/rails/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb +0 -728
  1877. data/vendor/rails/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb +0 -861
  1878. data/vendor/rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb +0 -350
  1879. data/vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +0 -690
  1880. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +0 -607
  1881. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb +0 -662
  1882. data/vendor/rails/activerecord/lib/active_record/deprecated_associations.rb +0 -104
  1883. data/vendor/rails/activerecord/lib/active_record/deprecated_finders.rb +0 -44
  1884. data/vendor/rails/activerecord/lib/active_record/vendor/simple.rb +0 -693
  1885. data/vendor/rails/activerecord/lib/active_record/wrappers/yaml_wrapper.rb +0 -15
  1886. data/vendor/rails/activerecord/lib/active_record/wrappings.rb +0 -58
  1887. data/vendor/rails/activerecord/lib/active_record/xml_serialization.rb +0 -308
  1888. data/vendor/rails/activerecord/test/connections/native_sqlserver/connection.rb +0 -23
  1889. data/vendor/rails/activerecord/test/connections/native_sqlserver_odbc/connection.rb +0 -25
  1890. data/vendor/rails/activerecord/test/copy_table_sqlite.rb +0 -64
  1891. data/vendor/rails/activerecord/test/deprecated_associations_test.rb +0 -396
  1892. data/vendor/rails/activerecord/test/empty_date_time_test.rb +0 -25
  1893. data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.drop.sql +0 -32
  1894. data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql.sql +0 -234
  1895. data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.drop.sql +0 -2
  1896. data/vendor/rails/activerecord/test/fixtures/db_definitions/mysql2.sql +0 -5
  1897. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +0 -34
  1898. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver.sql +0 -243
  1899. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql +0 -2
  1900. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlserver2.sql +0 -5
  1901. data/vendor/rails/activerecord/test/fixtures/mixin.rb +0 -63
  1902. data/vendor/rails/activerecord/test/mixin_nested_set_test.rb +0 -196
  1903. data/vendor/rails/activesupport/lib/active_support/binding_of_caller.rb +0 -84
  1904. data/vendor/rails/activesupport/lib/active_support/breakpoint.rb +0 -528
  1905. data/vendor/rails/activesupport/lib/active_support/caching_tools.rb +0 -62
  1906. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/formatting.rb +0 -7
  1907. data/vendor/rails/activesupport/lib/active_support/json/encoders.rb +0 -25
  1908. data/vendor/rails/activesupport/lib/active_support/json/encoders/core.rb +0 -70
  1909. data/vendor/rails/activesupport/lib/active_support/reloadable.rb +0 -60
  1910. data/vendor/rails/activesupport/lib/active_support/vendor/builder/blankslate.rb +0 -63
  1911. data/vendor/rails/activesupport/lib/active_support/vendor/builder/xchar.rb +0 -112
  1912. data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlbase.rb +0 -145
  1913. data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlevents.rb +0 -63
  1914. data/vendor/rails/activesupport/lib/active_support/vendor/builder/xmlmarkup.rb +0 -327
  1915. data/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb +0 -1021
  1916. data/vendor/rails/activesupport/test/caching_tools_test.rb +0 -79
  1917. data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default.rb +0 -30
  1918. data/vendor/rails/activesupport/test/json_test.rb +0 -97
  1919. data/vendor/rails/activesupport/test/reloadable_test.rb +0 -123
  1920. data/vendor/rails/railties/bin/breakpointer +0 -3
  1921. data/vendor/rails/railties/lib/binding_of_caller.rb +0 -85
  1922. data/vendor/rails/railties/lib/breakpoint.rb +0 -553
  1923. data/vendor/rails/railties/lib/breakpoint_client.rb +0 -196
  1924. data/vendor/rails/railties/lib/commands/breakpointer.rb +0 -1
  1925. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/USAGE +0 -18
  1926. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/fixtures.yml +0 -11
  1927. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/migration.rb +0 -13
  1928. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/model.rb +0 -2
  1929. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/unit_test.rb +0 -10
  1930. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form.rhtml +0 -3
  1931. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/form_scaffolding.rhtml +0 -1
  1932. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +0 -9
  1933. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +0 -27
  1934. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +0 -8
  1935. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml +0 -8
  1936. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/USAGE +0 -29
  1937. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +0 -93
  1938. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +0 -79
  1939. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +0 -11
  1940. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +0 -57
  1941. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +0 -2
  1942. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +0 -17
  1943. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +0 -13
  1944. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +0 -2
  1945. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +0 -74
  1946. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +0 -10
  1947. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +0 -19
  1948. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml +0 -24
  1949. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml +0 -18
  1950. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +0 -10
  1951. data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/USAGE +0 -28
  1952. data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/api_definition.rb +0 -5
  1953. data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/controller.rb +0 -8
  1954. data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/templates/functional_test.rb +0 -19
  1955. data/vendor/rails/railties/lib/rails_generator/generators/components/web_service/web_service_generator.rb +0 -29
  1956. data/vendor/rails/railties/lib/tasks/pre_namespace_aliases.rake +0 -53
  1957. data/vendor/rails/railties/test/dispatcher_test.rb +0 -141
  1958. data/vendor/rails/railties/test/mocks/dispatcher.rb +0 -13
  1959. data/vendor/rails/railties/test/mocks/fcgi.rb +0 -15
  1960. data/vendor/rails/railties/test/mocks/stubbed_breakpoint.rb +0 -2
  1961. data/vendor/rails/railties/test/mocks/stubbed_kernel.rb +0 -5
@@ -0,0 +1,12 @@
1
+ Changes from extracting bits to ActiveModel
2
+
3
+ * ActiveModel::Observer#add_observer!
4
+
5
+ It has a custom hook to define after_find that should really be in a
6
+ ActiveRecord::Observer subclass:
7
+
8
+ def add_observer!(klass)
9
+ klass.add_observer(self)
10
+ klass.class_eval 'def after_find() end' unless
11
+ klass.respond_to?(:after_find)
12
+ end
@@ -0,0 +1,21 @@
1
+ Active Model
2
+ ==============
3
+
4
+ Totally experimental library that aims to extract common model mixins from
5
+ ActiveRecord for use in ActiveResource (and other similar libraries).
6
+ This is in a very rough state (no autotest or spec rake tasks set up yet),
7
+ so please excuse the mess.
8
+
9
+ Here's what I plan to extract:
10
+ * ActiveModel::Observing
11
+ * ActiveModel::Callbacks
12
+ * ActiveModel::Validations
13
+
14
+ # for ActiveResource params and ActiveRecord options
15
+ * ActiveModel::Scoping
16
+
17
+ # to_json, to_xml, etc
18
+ * ActiveModel::Serialization
19
+
20
+ I'm trying to keep ActiveRecord compatibility where possible, but I'm
21
+ annotating the spots where I'm diverging a bit.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH << File.join(File.dirname(__FILE__), 'vendor', 'rspec', 'lib')
3
+ require 'rake'
4
+ require 'spec/rake/spectask'
@@ -0,0 +1,17 @@
1
+ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', '..', 'activesupport', 'lib')
2
+
3
+ # premature optimization?
4
+ require 'active_support/inflector'
5
+ require 'active_support/core_ext/string/inflections'
6
+ String.send :include, ActiveSupport::CoreExtensions::String::Inflections
7
+
8
+ require 'active_model/base'
9
+ require 'active_model/observing'
10
+ require 'active_model/callbacks'
11
+ require 'active_model/validations'
12
+
13
+ ActiveModel::Base.class_eval do
14
+ include ActiveModel::Observing
15
+ include ActiveModel::Callbacks
16
+ include ActiveModel::Validations
17
+ end
@@ -0,0 +1,4 @@
1
+ module ActiveModel
2
+ class Base
3
+ end
4
+ end
@@ -0,0 +1,5 @@
1
+ module ActiveModel
2
+ module Callbacks
3
+
4
+ end
5
+ end
@@ -0,0 +1,100 @@
1
+ require 'observer'
2
+
3
+ module ActiveModel
4
+ module Observing
5
+ module ClassMethods
6
+ def observers
7
+ @observers ||= []
8
+ end
9
+
10
+ def observers=(*values)
11
+ @observers = values.flatten
12
+ end
13
+
14
+ def instantiate_observers
15
+ observers.each { |o| instantiate_observer(o) }
16
+ end
17
+
18
+ protected
19
+ def instantiate_observer(observer)
20
+ # string/symbol
21
+ if observer.respond_to?(:to_sym)
22
+ observer = observer.to_s.camelize.constantize.instance
23
+ elsif observer.respond_to?(:instance)
24
+ observer.instance
25
+ else
26
+ raise ArgumentError, "#{observer} must be a lowercase, underscored class name (or an instance of the class itself) responding to the instance method. Example: Person.observers = :big_brother # calls BigBrother.instance"
27
+ end
28
+ end
29
+
30
+ # Notify observers when the observed class is subclassed.
31
+ def inherited(subclass)
32
+ super
33
+ changed
34
+ notify_observers :observed_class_inherited, subclass
35
+ end
36
+ end
37
+
38
+ def self.included(receiver)
39
+ receiver.extend Observable, ClassMethods
40
+ end
41
+ end
42
+
43
+ class Observer
44
+ include Singleton
45
+ attr_writer :observed_classes
46
+
47
+ class << self
48
+ attr_accessor :models
49
+ # Attaches the observer to the supplied model classes.
50
+ def observe(*models)
51
+ @models = models.flatten
52
+ @models.collect! { |model| model.respond_to?(:to_sym) ? model.to_s.camelize.constantize : model }
53
+ end
54
+
55
+ def observed_class_name
56
+ @observed_class_name ||=
57
+ if guessed_name = name.scan(/(.*)Observer/)[0]
58
+ @observed_class_name = guessed_name[0]
59
+ end
60
+ end
61
+
62
+ # The class observed by default is inferred from the observer's class name:
63
+ # assert_equal [Person], PersonObserver.observed_class
64
+ def observed_class
65
+ if observed_class_name
66
+ observed_class_name.constantize
67
+ else
68
+ nil
69
+ end
70
+ end
71
+ end
72
+
73
+ # Start observing the declared classes and their subclasses.
74
+ def initialize
75
+ self.observed_classes = self.class.models if self.class.models
76
+ observed_classes.each { |klass| add_observer! klass }
77
+ end
78
+
79
+ # Send observed_method(object) if the method exists.
80
+ def update(observed_method, object) #:nodoc:
81
+ send(observed_method, object) if respond_to?(observed_method)
82
+ end
83
+
84
+ # Special method sent by the observed class when it is inherited.
85
+ # Passes the new subclass.
86
+ def observed_class_inherited(subclass) #:nodoc:
87
+ self.class.observe(observed_classes + [subclass])
88
+ add_observer!(subclass)
89
+ end
90
+
91
+ protected
92
+ def observed_classes
93
+ @observed_classes ||= [self.class.observed_class]
94
+ end
95
+
96
+ def add_observer!(klass)
97
+ klass.add_observer(self)
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,4 @@
1
+ module ActiveModel
2
+ module Validations
3
+ end
4
+ end
@@ -0,0 +1,120 @@
1
+ require File.join(File.dirname(__FILE__), 'spec_helper')
2
+
3
+ class ObservedModel < ActiveModel::Base
4
+ class Observer
5
+ end
6
+ end
7
+
8
+ class FooObserver < ActiveModel::Observer
9
+ class << self
10
+ public :new
11
+ end
12
+
13
+ attr_accessor :stub
14
+
15
+ def on_spec(record)
16
+ stub.event_with(record) if stub
17
+ end
18
+ end
19
+
20
+ class Foo < ActiveModel::Base
21
+ end
22
+
23
+ module ActiveModel
24
+ describe Observing do
25
+ before do
26
+ ObservedModel.observers.clear
27
+ end
28
+
29
+ it "initializes model with no cached observers" do
30
+ ObservedModel.observers.should be_empty
31
+ end
32
+
33
+ it "stores cached observers in an array" do
34
+ ObservedModel.observers << :foo
35
+ ObservedModel.observers.should include(:foo)
36
+ end
37
+
38
+ it "flattens array of assigned cached observers" do
39
+ ObservedModel.observers = [[:foo], :bar]
40
+ ObservedModel.observers.should include(:foo)
41
+ ObservedModel.observers.should include(:bar)
42
+ end
43
+
44
+ it "instantiates observer names passed as strings" do
45
+ ObservedModel.observers << 'foo_observer'
46
+ FooObserver.should_receive(:instance)
47
+ ObservedModel.instantiate_observers
48
+ end
49
+
50
+ it "instantiates observer names passed as symbols" do
51
+ ObservedModel.observers << :foo_observer
52
+ FooObserver.should_receive(:instance)
53
+ ObservedModel.instantiate_observers
54
+ end
55
+
56
+ it "instantiates observer classes" do
57
+ ObservedModel.observers << ObservedModel::Observer
58
+ ObservedModel::Observer.should_receive(:instance)
59
+ ObservedModel.instantiate_observers
60
+ end
61
+
62
+ it "should pass observers to subclasses" do
63
+ FooObserver.instance
64
+ bar = Class.new(Foo)
65
+ bar.count_observers.should == 1
66
+ end
67
+ end
68
+
69
+ describe Observer do
70
+ before do
71
+ ObservedModel.observers = :foo_observer
72
+ FooObserver.models = nil
73
+ end
74
+
75
+ it "guesses implicit observable model name" do
76
+ FooObserver.observed_class_name.should == 'Foo'
77
+ end
78
+
79
+ it "tracks implicit observable models" do
80
+ instance = FooObserver.new
81
+ instance.send(:observed_classes).should include(Foo)
82
+ instance.send(:observed_classes).should_not include(ObservedModel)
83
+ end
84
+
85
+ it "tracks explicit observed model class" do
86
+ FooObserver.new.send(:observed_classes).should_not include(ObservedModel)
87
+ FooObserver.observe ObservedModel
88
+ instance = FooObserver.new
89
+ instance.send(:observed_classes).should include(ObservedModel)
90
+ end
91
+
92
+ it "tracks explicit observed model as string" do
93
+ FooObserver.new.send(:observed_classes).should_not include(ObservedModel)
94
+ FooObserver.observe 'observed_model'
95
+ instance = FooObserver.new
96
+ instance.send(:observed_classes).should include(ObservedModel)
97
+ end
98
+
99
+ it "tracks explicit observed model as symbol" do
100
+ FooObserver.new.send(:observed_classes).should_not include(ObservedModel)
101
+ FooObserver.observe :observed_model
102
+ instance = FooObserver.new
103
+ instance.send(:observed_classes).should include(ObservedModel)
104
+ end
105
+
106
+ it "calls existing observer event" do
107
+ foo = Foo.new
108
+ FooObserver.instance.stub = stub!(:stub)
109
+ FooObserver.instance.stub.should_receive(:event_with).with(foo)
110
+ Foo.send(:changed)
111
+ Foo.send(:notify_observers, :on_spec, foo)
112
+ end
113
+
114
+ it "skips nonexistent observer event" do
115
+ foo = Foo.new
116
+ Foo.send(:changed)
117
+ Foo.send(:notify_observers, :whatever, foo)
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,17 @@
1
+ ENV['LOG_NAME'] = 'spec'
2
+ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'vendor', 'rspec', 'lib')
3
+ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
4
+ require 'active_model'
5
+ begin
6
+ require 'spec'
7
+ rescue LoadError
8
+ require 'rubygems'
9
+ require 'spec'
10
+ end
11
+
12
+ begin
13
+ require 'ruby-debug'
14
+ Debugger.start
15
+ rescue LoadError
16
+ # you do not know the ways of ruby-debug yet, what a shame
17
+ end
@@ -1,21 +1,352 @@
1
- *1.15.5* (October 12th, 2007)
1
+ *2.0.2* (December 16th, 2007)
2
2
 
3
- * Depend on Action Pack 1.4.4
3
+ * Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick]
4
4
 
5
+ * Make the Fixtures Test::Unit enhancements more supporting for double-loaded test cases. Closes #10379 [brynary]
5
6
 
6
- *1.15.4* (October 4th, 2007)
7
+ * Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh]
7
8
 
8
- * Fix #count on a has_many :through association so that it recognizes the :uniq option. Closes #8801 [lifofifo]
9
+ * Ensure that the :uniq option for has_many :through associations retains the order. #10463 [remvee]
10
+
11
+ * Base.exists? doesn't rescue exceptions to avoid hiding SQL errors. #10458 [Michael Klishin]
12
+
13
+ * Documentation: Active Record exceptions, destroy_all and delete_all. #10444, #10447 [Michael Klishin]
14
+
15
+
16
+ *2.0.1* (December 7th, 2007)
17
+
18
+ * Removed query cache rescue as it could cause code to be run twice (closes #10408) [DHH]
19
+
20
+
21
+ *2.0.0* (December 6th, 2007)
22
+
23
+ * Anchor DateTimeTest to fixed DateTime instead of a variable value based on Time.now#advance#to_datetime, so that this test passes on 64-bit platforms running Ruby 1.8.6+ [Geoff Buesing]
24
+
25
+ * Fixed that the Query Cache should just be ignored if the database is misconfigured (so that the "About your applications environment" works even before the database has been created) [DHH]
26
+
27
+ * Fixed that the truncation of strings longer than 50 chars should use inspect
28
+ so newlines etc are escaped #10385 [Norbert Crombach]
29
+
30
+ * Fixed that habtm associations should be able to set :select as part of their definition and have that honored [DHH]
31
+
32
+ * Document how the :include option can be used in Calculations::calculate. Closes #7446 [adamwiggins, ultimoamore]
33
+
34
+ * Fix typo in documentation for polymorphic associations w/STI. Closes #7461 [johnjosephbachir]
35
+
36
+ * Reveal that the type option in migrations can be any supported column type for your database but also include caveat about agnosticism. Closes #7531 [adamwiggins, mikong]
37
+
38
+ * More complete documentation for find_by_sql. Closes #7912 [fearoffish]
39
+
40
+ * Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [DHH]. Example:
41
+
42
+ render :partial => @client.becomes(Company) # renders companies/company instead of clients/client
43
+
44
+ * Fixed that to_xml should not automatically pass :procs to associations included with :include #10162 [Cheah Chu Yeow]
45
+
46
+ * Fix documentation typo introduced in [8250]. Closes #10339 [Henrik N]
47
+
48
+ * Foxy fixtures: support single-table inheritance. #10234 [tom]
49
+
50
+ * Foxy fixtures: allow mixed usage to make migration easier and more attractive. #10004 [lotswholetime]
51
+
52
+ * Make the record_timestamps class-inheritable so it can be set per model. #10004 [tmacedo]
53
+
54
+ * Allow validates_acceptance_of to use a real attribute instead of only virtual (so you can record that the acceptance occured) #7457 [ambethia]
55
+
56
+ * DateTimes use Ruby's default calendar reform setting. #10201 [Geoff Buesing]
57
+
58
+ * Dynamic finders on association collections respect association :order and :limit. #10211, #10227 [Patrick Joyce, Rick Olson, Jack Danger Canty]
59
+
60
+ * Add 'foxy' support for fixtures of polymorphic associations. #10183 [jbarnette, David Lowenfels]
61
+
62
+ * validates_inclusion_of and validates_exclusion_of allow formatted :message strings. #8132 [devrieda, Mike Naberezny]
63
+
64
+ * attr_readonly behaves well with optimistic locking. #10188 [Nick Bugajski]
65
+
66
+ * Base#to_xml supports the nil="true" attribute like Hash#to_xml. #8268 [Catfish]
67
+
68
+ * Change plings to the more conventional quotes in the documentation. Closes #10104 [danger]
69
+
70
+ * Fix HasManyThrough Association so it uses :conditions on the HasMany Association. Closes #9729 [danger]
71
+
72
+ * Ensure that column names are quoted. Closes #10134 [wesley.moxam]
73
+
74
+ * Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]
75
+
76
+ * Enhance explanation with more examples for attr_accessible macro. Closes #8095 [fearoffish, Marcel Molina]
77
+
78
+ * Update association/method mapping table to refected latest collection methods for has_many :through. Closes #8772 [Pratik Naik]
79
+
80
+ * Explain semantics of having several different AR instances in a transaction block. Closes #9036 [jacobat, Marcel Molina]
81
+
82
+ * Update Schema documentation to use updated sexy migration notation. Closes #10086 [sjgman9]
83
+
84
+ * Make fixtures work with the new test subclasses. [Tarmo Tänav, Koz]
85
+
86
+ * Introduce finder :joins with associations. Same :include syntax but with inner rather than outer joins. #10012 [RubyRedRick]
87
+ # Find users with an avatar
88
+ User.find(:all, :joins => :avatar)
89
+
90
+ # Find posts with a high-rated comment.
91
+ Post.find(:all, :joins => :comments, :conditions => 'comments.rating > 3')
92
+
93
+ * Associations: speedup duplicate record check. #10011 [Pratik Naik]
94
+
95
+ * Make sure that << works on has_many associations on unsaved records. Closes #9989 [hasmanyjosh]
96
+
97
+ * Allow association redefinition in subclasses. #9346 [wildchild]
98
+
99
+ * Fix has_many :through delete with custom foreign keys. #6466 [naffis]
100
+
101
+ * Foxy fixtures, from rathole (http://svn.geeksomnia.com/rathole/trunk/README)
102
+ - stable, autogenerated IDs
103
+ - specify associations (belongs_to, has_one, has_many) by label, not ID
104
+ - specify HABTM associations as inline lists
105
+ - autofill timestamp columns
106
+ - support YAML defaults
107
+ - fixture label interpolation
108
+ Enabled for fixtures that correspond to a model class and don't specify a primary key value. #9981 [jbarnette]
109
+
110
+ * Add docs explaining how to protect all attributes using attr_accessible with no arguments. Closes #9631 [boone, rmm5t]
111
+
112
+ * Update add_index documentation to use new options api. Closes #9787 [Kamal Fariz Mahyuddin]
113
+
114
+ * Allow find on a has_many association defined with :finder_sql to accept id arguments as strings like regular find does. Closes #9916 [krishna]
115
+
116
+ * Use VALID_FIND_OPTIONS when resolving :find scoping rather than hard coding the list of valid find options. Closes #9443 [sur]
117
+
118
+ * Limited eager loading no longer ignores scoped :order. Closes #9561 [danger, Josh Peek]
119
+
120
+ * Assigning an instance of a foreign class to a composed_of aggregate calls an optional conversion block. Refactor and simplify composed_of implementation. #6322 [brandon, Chris Cruft]
121
+
122
+ * Assigning nil to a composed_of aggregate also sets its immediate value to nil. #9843 [Chris Cruft]
123
+
124
+ * Ensure that mysql quotes table names with database names correctly. Closes #9911 [crayz]
125
+
126
+ "foo.bar" => "`foo`.`bar`"
127
+
128
+ * Complete the assimilation of Sexy Migrations from ErrFree [Chris Wanstrath, PJ Hyett]
129
+ http://errtheblog.com/post/2381
130
+
131
+ * Qualified column names work in hash conditions, like :conditions => { 'comments.created_at' => ... }. #9733 [danger]
132
+
133
+ * Fix regression where the association would not construct new finder SQL on save causing bogus queries for "WHERE owner_id = NULL" even after owner was saved. #8713 [Bryan Helmkamp]
134
+
135
+ * Refactor association create and build so before & after callbacks behave consistently. #8854 [Pratik Naik, mortent]
136
+
137
+ * Quote table names. Defaults to column quoting. #4593 [Justin Lynn, gwcoffey, eadz, Dmitry V. Sabanin, Jeremy Kemper]
138
+
139
+ * Alias association #build to #new so it behaves predictably. #8787 [Pratik Naik]
140
+
141
+ * Add notes to documentation regarding attr_readonly behavior with counter caches and polymorphic associations. Closes #9835 [saimonmoore, rick]
142
+
143
+ * Observers can observe model names as symbols properly now. Closes #9869 [queso]
144
+
145
+ * find_and_(initialize|create)_by methods can now properly initialize protected attributes [Tobias Luetke]
146
+
147
+ * belongs_to infers the foreign key from the association name instead of from the class name. [Jeremy Kemper]
148
+
149
+ * PostgreSQL: support multiline default values. #7533 [Carl Lerche, aguynamedryan, Rein Henrichs, Tarmo Tänav]
150
+
151
+ * MySQL: fix change_column on not-null columns that don't accept dfeault values of ''. #6663 [Jonathan Viney, Tarmo Tänav]
152
+
153
+ * validates_uniqueness_of behaves well with abstract superclasses and
154
+ single-table inheritance. #3833, #9886 [Gabriel Gironda, rramdas, François Beausoleil, Josh Peek, Tarmo Tänav, pat]
155
+
156
+ * Warn about protected attribute assigments in development and test environments when mass-assigning to an attr_protected attribute. #9802 [Henrik N]
157
+
158
+ * Speedup database date/time parsing. [Jeremy Kemper, Tarmo Tänav]
159
+
160
+ * Fix calling .clear on a has_many :dependent=>:delete_all association. [Tarmo Tänav]
161
+
162
+ * Allow change_column to set NOT NULL in the PostgreSQL adapter [Tarmo Tänav]
163
+
164
+ * Fix that ActiveRecord would create attribute methods and override custom attribute getters if the method is also defined in Kernel.methods. [Rick]
165
+
166
+ * Don't call attr_readonly on polymorphic belongs_to associations, in case it matches the name of some other non-ActiveRecord class/module. [Rick]
167
+
168
+ * Try loading activerecord-<adaptername>-adapter gem before trying a plain require so you can use custom gems for the bundled adapters. Also stops gems from requiring an adapter from an old Active Record gem. [Jeremy Kemper, Derrick Spell]
169
+
170
+
171
+ *2.0.0 [Preview Release]* (September 29th, 2007) [Includes duplicates of changes from 1.14.2 - 1.15.3]
172
+
173
+ * Add attr_readonly to specify columns that are skipped during a normal ActiveRecord #save operation. Closes #6896 [dcmanges]
174
+
175
+ class Comment < ActiveRecord::Base
176
+ # Automatically sets Article#comments_count as readonly.
177
+ belongs_to :article, :counter_cache => :comments_count
178
+ end
179
+
180
+ class Article < ActiveRecord::Base
181
+ attr_readonly :approved_comments_count
182
+ end
183
+
184
+ * Make size for has_many :through use counter cache if it exists. Closes #9734 [xaviershay]
185
+
186
+ * Remove DB2 adapter since IBM chooses to maintain their own adapter instead. [Jeremy Kemper]
187
+
188
+ * Extract Oracle, SQLServer, and Sybase adapters into gems. [Jeremy Kemper]
189
+
190
+ * Added fixture caching that'll speed up a normal fixture-powered test suite between 50% and 100% #9682 [Frederick Cheung]
191
+
192
+ * Correctly quote id list for limited eager loading. #7482 [tmacedo]
193
+
194
+ * Fixed that using version-targetted migrates would fail on loggers other than the default one #7430 [valeksenko]
195
+
196
+ * Fixed rename_column for SQLite when using symbols for the column names #8616 [drodriguez]
197
+
198
+ * Added the possibility of using symbols in addition to concrete classes with ActiveRecord::Observer#observe. #3998 [Robby Russell, Tarmo Tänav]
199
+
200
+ * Added ActiveRecord::Base#to_json/from_json [DHH, Cheah Chu Yeow]
201
+
202
+ * Added ActiveRecord::Base#from_xml [DHH]. Example:
203
+
204
+ xml = "<person><name>David</name></person>"
205
+ Person.new.from_xml(xml).name # => "David"
206
+
207
+ * Define dynamic finders as real methods after first usage. [bscofield]
208
+
209
+ * Deprecation: remove deprecated threaded_connections methods. Use allow_concurrency instead. [Jeremy Kemper]
210
+
211
+ * Associations macros accept extension blocks alongside modules. #9346 [Josh Peek]
212
+
213
+ * Speed up and simplify query caching. [Jeremy Kemper]
214
+
215
+ * connection.select_rows 'sql' returns an array (rows) of arrays (field values). #2329 [Michael Schuerig]
216
+
217
+ * Eager loading respects explicit :joins. #9496 [dasil003]
218
+
219
+ * Extract Firebird, FrontBase, and OpenBase adapters into gems. #9508, #9509, #9510 [Jeremy Kemper]
220
+
221
+ * RubyGem database adapters: expects a gem named activerecord-<database>-adapter with active_record/connection_adapters/<database>_adapter.rb in its load path. [Jeremy Kemper]
222
+
223
+ * Fixed that altering join tables in migrations would fail w/ sqlite3 #7453 [TimoMihaljov/brandon]
224
+
225
+ * Fix association writer with :dependent => :nullify. #7314 [Jonathan Viney]
226
+
227
+ * OpenBase: update for new lib and latest Rails. Support migrations. #8748 [dcsesq]
228
+
229
+ * Moved acts_as_tree into a plugin of the same name on the official Rails svn. #9514 [Pratik Naik]
230
+
231
+ * Moved acts_as_nested_set into a plugin of the same name on the official Rails svn. #9516 [Josh Peek]
232
+
233
+ * Moved acts_as_list into a plugin of the same name on the official Rails svn. [Josh Peek]
234
+
235
+ * Explicitly require active_record/query_cache before using it. [Jeremy Kemper]
236
+
237
+ * Fix bug where unserializing an attribute attempts to modify a frozen @attributes hash for a deleted record. [Rick, marclove]
238
+
239
+ * Performance: absorb instantiate and initialize_with_callbacks into the Base methods. [Jeremy Kemper]
240
+
241
+ * Fixed that eager loading queries and with_scope should respect the :group option [DHH]
242
+
243
+ * Improve performance and functionality of the postgresql adapter. Closes #8049 [roderickvd]
244
+
245
+ For more information see: http://dev.rubyonrails.org/ticket/8049
9
246
 
10
247
  * Don't clobber includes passed to has_many.count [danger]
11
248
 
12
249
  * Make sure has_many uses :include when counting [danger]
13
250
 
251
+ * Change the implementation of ActiveRecord's attribute reader and writer methods [nzkoz]
252
+ - Generate Reader and Writer methods which cache attribute values in hashes. This is to avoid repeatedly parsing the same date or integer columns.
253
+ - Change exception raised when users use find with :select then try to access a skipped column. Plugins could override missing_attribute() to lazily load the columns.
254
+ - Move method definition to the class, instead of the instance
255
+ - Always generate the readers, writers and predicate methods.
256
+
257
+ * Perform a deep #dup on query cache results so that modifying activerecord attributes does not modify the cached attributes. [Rick]
258
+
259
+ # Ensure that has_many :through associations use a count query instead of loading the target when #size is called. Closes #8800 [Pratik Naik]
260
+
261
+ * Added :unless clause to validations #8003 [monki]. Example:
262
+
263
+ def using_open_id?
264
+ !identity_url.blank?
265
+ end
266
+
267
+ validates_presence_of :identity_url, :if => using_open_id?
268
+ validates_presence_of :username, :unless => using_open_id?
269
+ validates_presence_of :password, :unless => using_open_id?
270
+
271
+ * Fix #count on a has_many :through association so that it recognizes the :uniq option. Closes #8801 [Pratik Naik]
272
+
273
+ * Fix and properly document/test count(column_name) usage. Closes #8999 [Pratik Naik]
274
+
275
+ * Remove deprecated count(conditions=nil, joins=nil) usage. Closes #8993 [Pratik Naik]
276
+
277
+ * Change belongs_to so that the foreign_key assumption is taken from the association name, not the class name. Closes #8992 [hasmanyjosh]
278
+
279
+ OLD
280
+ belongs_to :visitor, :class_name => 'User' # => inferred foreign_key is user_id
281
+
282
+ NEW
283
+ belongs_to :visitor, :class_name => 'User' # => inferred foreign_key is visitor_id
284
+
285
+ * Remove spurious tests from deprecated_associations_test, most of these aren't deprecated, and are duplicated in associations_test. Closes #8987 [Pratik Naik]
286
+
287
+ * Make create! on a has_many :through association return the association object. Not the collection. Closes #8786 [Pratik Naik]
288
+
289
+ * Move from select * to select tablename.* to avoid clobbering IDs. Closes #8889 [dasil003]
290
+
291
+ * Don't call unsupported methods on associated objects when using :include, :method with to_xml #7307, [manfred, jwilger]
292
+
293
+ * Define collection singular ids method for has_many :through associations. #8763 [Pratik Naik]
294
+
295
+ * Array attribute conditions work with proxied association collections. #8318 [Kamal Fariz Mahyuddin, theamazingrando]
296
+
297
+ * Fix polymorphic has_one associations declared in an abstract class. #8638 [Pratik Naik, Dax Huiberts]
298
+
299
+ * Fixed validates_associated should not stop on the first error. #4276 [mrj, Manfred Stienstra, Josh Peek]
300
+
301
+ * Rollback if commit raises an exception. #8642 [kik, Jeremy Kemper]
302
+
303
+ * Update tests' use of fixtures for the new collections api. #8726 [Kamal Fariz Mahyuddin]
304
+
14
305
  * Save associated records only if the association is already loaded. #8713 [blaine]
15
306
 
16
- * Changing the :default Date format doesn't break date quoting. #6312 [bshand, Elias]
307
+ * MySQL: fix show_variable. #8448 [matt, Jeremy Kemper]
308
+
309
+ * Fixtures: correctly delete and insert fixtures in a single transaction. #8553 [Michael Schuerig]
310
+
311
+ * Fixtures: people(:technomancy, :josh) returns both fixtures. #7880 [technomancy, Josh Peek]
312
+
313
+ * Calculations support non-numeric foreign keys. #8154 [Kamal Fariz Mahyuddin]
314
+
315
+ * with_scope is protected. #8524 [Josh Peek]
316
+
317
+ * Quickref for association methods. #7723 [marclove, Mindsweeper]
318
+
319
+ * Calculations: return nil average instead of 0 when there are no rows to average. #8298 [davidw]
320
+
321
+ * acts_as_nested_set: direct_children is sorted correctly. #4761 [Josh Peek, rails@33lc0.net]
322
+
323
+ * Raise an exception if both attr_protected and attr_accessible are declared. #8507 [stellsmi]
324
+
325
+ * SQLite, MySQL, PostgreSQL, Oracle: quote column names in column migration SQL statements. #8466 [marclove, lorenjohnson]
326
+
327
+ * Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
328
+
329
+ * Oracle: support binary fixtures. #7987 [Michael Schoen]
17
330
 
18
- * Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
331
+ * Fixtures: pull fixture insertion into the database adapters. #7987 [Michael Schoen]
332
+
333
+ * Announce migration versions as they're performed. [Jeremy Kemper]
334
+
335
+ * find gracefully copes with blank :conditions. #7599 [Dan Manges, johnnyb]
336
+
337
+ * validates_numericality_of takes :greater_than, :greater_than_or_equal_to, :equal_to, :less_than, :less_than_or_equal_to, :odd, and :even options. #3952 [Bob Silva, Dan Kubb, Josh Peek]
338
+
339
+ * MySQL: create_database takes :charset and :collation options. Charset defaults to utf8. #8448 [matt]
340
+
341
+ * Find with a list of ids supports limit/offset. #8437 [hrudududu]
342
+
343
+ * Optimistic locking: revert the lock version when an update fails. #7840 [plang]
344
+
345
+ * Migrations: add_column supports custom column types. #7742 [jsgarvin, Theory]
346
+
347
+ * Load database adapters on demand. Eliminates config.connection_adapters and RAILS_CONNECTION_ADAPTERS. Add your lib directory to the $LOAD_PATH and put your custom adapter in lib/active_record/connection_adapters/adaptername_adapter.rb. This way you can provide custom adapters as plugins or gems without modifying Rails. [Jeremy Kemper]
348
+
349
+ * Ensure that associations with :dependent => :delete_all respect :conditions option. Closes #8034 [danger, Josh Peek, Rick]
19
350
 
20
351
  * belongs_to assignment creates a new proxy rather than modifying its target in-place. #8412 [mmangino@elevatedrails.com]
21
352
 
@@ -23,56 +354,152 @@
23
354
 
24
355
  * Document deep eager includes. #6267 [Josh Susser, Dan Manges]
25
356
 
357
+ * Document warning that associations names shouldn't be reserved words. #4378 [murphy@cYcnus.de, Josh Susser]
358
+
359
+ * Sanitize Base#inspect. #8392, #8623 [Nik Wakelin, jnoon]
360
+
361
+ * Replace the transaction {|transaction|..} semantics with a new Exception ActiveRecord::Rollback. [Koz]
362
+
26
363
  * Oracle: extract column length for CHAR also. #7866 [ymendel]
27
364
 
365
+ * Document :allow_nil option for validates_acceptance_of since it defaults to true. [tzaharia]
366
+
367
+ * Update documentation for :dependent declaration so that it explicitly uses the non-deprecated API. [danger]
368
+
369
+ * Add documentation caveat about when to use count_by_sql. [fearoffish]
370
+
371
+ * Enhance documentation for increment_counter and decrement_counter. [fearoffish]
372
+
373
+ * Provide brief introduction to what optimistic locking is. [fearoffish]
374
+
375
+ * Add documentation for :encoding option to mysql adapter. [marclove]
376
+
377
+ * Added short-hand declaration style to migrations (inspiration from Sexy Migrations, http://errtheblog.com/post/2381) [DHH]. Example:
378
+
379
+ create_table "products" do |t|
380
+ t.column "shop_id", :integer
381
+ t.column "creator_id", :integer
382
+ t.column "name", :string, :default => "Untitled"
383
+ t.column "value", :string, :default => "Untitled"
384
+ t.column "created_at", :datetime
385
+ t.column "updated_at", :datetime
386
+ end
387
+
388
+ ...can now be written as:
389
+
390
+ create_table :products do |t|
391
+ t.integer :shop_id, :creator_id
392
+ t.string :name, :value, :default => "Untitled"
393
+ t.timestamps
394
+ end
395
+
396
+ * Use association name for the wrapper element when using .to_xml. Previous behavior lead to non-deterministic situations with STI and polymorphic associations. [Koz, jstrachan]
397
+
398
+ * Improve performance of calling .create on has_many :through associations. [evan]
399
+
400
+ * Improved cloning performance by relying less on exception raising #8159 [Blaine]
401
+
402
+ * Added ActiveRecord::Base.inspect to return a column-view like #<Post id:integer, title:string, body:text> [DHH]
403
+
404
+ * Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH]
405
+
28
406
  * Small additions and fixes for ActiveRecord documentation. Closes #7342 [jeremymcanally]
29
407
 
408
+ * Add helpful debugging info to the ActiveRecord::StatementInvalid exception in ActiveRecord::ConnectionAdapters::SqliteAdapter#table_structure. Closes #7925. [court3nay]
409
+
30
410
  * SQLite: binary escaping works with $KCODE='u'. #7862 [tsuka]
31
411
 
32
- * Improved cloning performance by relying less on exception raising #8159 [Blaine]
412
+ * Base#to_xml supports serialized attributes. #7502 [jonathan]
33
413
 
414
+ * Base.update_all :order and :limit options. Useful for MySQL updates that must be ordered to avoid violating unique constraints. [Jeremy Kemper]
34
415
 
35
- *1.15.3* (March 12th, 2007)
416
+ * Remove deprecated object transactions. People relying on this functionality should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper]
36
417
 
37
- * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
418
+ * PostgreSQL: remove DateTime -> Time downcast. Warning: do not enable translate_results for the C bindings if you have timestamps outside Time's domain. [Jeremy Kemper]
419
+
420
+ * find_or_create_by_* takes a hash so you can create with more attributes than are in the method name. For example, Person.find_or_create_by_name(:name => 'Henry', :comments => 'Hi new user!') is equivalent to Person.find_by_name('Henry') || Person.create(:name => 'Henry', :comments => 'Hi new user!'). #7368 [Josh Susser]
421
+
422
+ * Make sure with_scope takes both :select and :joins into account when setting :readonly. Allows you to save records you retrieve using method_missing on a has_many :through associations. [Koz]
423
+
424
+ * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
425
+
426
+ * Consistent public/protected/private visibility for chained methods. #7813 [Dan Manges]
427
+
428
+ * Oracle: fix quoted primary keys and datetime overflow. #7798 [Michael Schoen]
38
429
 
39
430
  * Consistently quote primary key column names. #7763 [toolmantim]
40
431
 
41
432
  * Fixtures: fix YAML ordered map support. #2665 [Manuel Holtgrewe, nfbuckley]
42
433
 
434
+ * DateTimes assume the default timezone. #7764 [Geoff Buesing]
435
+
436
+ * Sybase: hide timestamp columns since they're inherently read-only. #7716 [Mike Joyce]
437
+
438
+ * Oracle: overflow Time to DateTime. #7718 [Michael Schoen]
439
+
440
+ * PostgreSQL: don't use async_exec and async_query with postgres-pr. #7727, #7762 [flowdelic, toolmantim]
441
+
43
442
  * Fix has_many :through << with custom foreign keys. #6466, #7153 [naffis, Rich Collins]
44
443
 
444
+ * Test DateTime native type in migrations, including an edge case with dates
445
+ during calendar reform. #7649, #7724 [fedot, Geoff Buesing]
45
446
 
46
- *1.15.2* (February 5th, 2007)
447
+ * SQLServer: correctly schema-dump tables with no indexes or descending indexes. #7333, #7703 [Jakob S, Tom Ward]
47
448
 
48
- * Pass a range in :conditions to use the SQL BETWEEN operator. #6974 [dcmanges]
49
- Student.find(:all, :conditions => { :grade => 9..12 })
449
+ * SQLServer: recognize real column type as Ruby float. #7057 [sethladd, Tom Ward]
50
450
 
51
- * Don't create instance writer methods for class attributes. [Rick]
451
+ * Added fixtures :all as a way of loading all fixtures in the fixture directory at once #7214 [manfred]
452
+
453
+ * Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [DHH]. Example:
454
+
455
+ transaction do |transaction|
456
+ david.withdrawal(100)
457
+ mary.deposit(100)
458
+ transaction.rollback! # rolls back the transaction that was otherwise going to be successful
459
+ end
52
460
 
461
+ * Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method [Jamis Buck]
462
+
463
+ * Reworked David's query cache to be available as Model.cache {...}. For the duration of the block no select query should be run more then once. Any inserts/deletes/executes will flush the whole cache however [Tobias Luetke]
464
+ Task.cache { Task.find(1); Task.find(1) } #=> 1 query
465
+
53
466
  * When dealing with SQLite3, use the table_info pragma helper, so that the bindings can do some translation for when sqlite3 breaks incompatibly between point releases. [Jamis Buck]
54
467
 
468
+ * Oracle: fix lob and text default handling. #7344 [gfriedrich, Michael Schoen]
469
+
55
470
  * SQLServer: don't choke on strings containing 'null'. #7083 [Jakob S]
56
471
 
57
- * Consistently use LOWER() for uniqueness validations (rather than mixing with UPPER()) so the database can always use a functional index on the lowercased column. #6495 [Si]
472
+ * MySQL: blob and text columns may not have defaults in 5.x. Update fixtures schema for strict mode. #6695 [Dan Kubb]
473
+
474
+ * update_all can take a Hash argument. sanitize_sql splits into two methods for conditions and assignment since NULL values and delimiters are handled differently. #6583, #7365 [sandofsky, Assaf]
58
475
 
59
476
  * MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last inserted id. #6778 [Jonathan Viney, timc]
60
477
 
478
+ * Use Date#to_s(:db) for quoted dates. #7411 [Michael Schoen]
479
+
480
+ * Don't create instance writer methods for class attributes. Closes #7401 [Rick]
481
+
482
+ * Docs: validations examples. #7343 [zackchandler]
483
+
484
+ * Add missing tests ensuring callbacks work with class inheritance. Closes #7339 [sandofsky]
485
+
61
486
  * Fixtures use the table name and connection from set_fixture_class. #7330 [Anthony Eden]
62
487
 
63
- * SQLServer: quote table name in indexes query. #2928 [keithm@infused.org]
488
+ * Remove useless code in #attribute_present? since 0 != blank?. Closes #7249 [Josh Susser]
64
489
 
490
+ * Fix minor doc typos. Closes #7157 [Josh Susser]
65
491
 
66
- *1.15.1* (January 17th, 2007)
492
+ * Fix incorrect usage of #classify when creating the eager loading join statement. Closes #7044 [Josh Susser]
67
493
 
68
- * Fix nodoc breaking of adapters
494
+ * SQLServer: quote table name in indexes query. #2928 [keithm@infused.org]
69
495
 
496
+ * Subclasses of an abstract class work with single-table inheritance. #5704, #7284 [BertG, nick+rails@ag.arizona.edu]
70
497
 
71
- *1.15.0* (January 16th, 2007)
498
+ * Make sure sqlite3 driver closes open connections on disconnect [Rob Rasmussen]
72
499
 
73
500
  * [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [jeremymcanally]
74
501
 
75
- * change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [dcmanges, Jeremy Kemper]
502
+ * change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [Dan Manges, Jeremy Kemper]
76
503
 
77
504
  * MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, manfred, altano@bigfoot.com]
78
505
 
@@ -80,12 +507,17 @@
80
507
 
81
508
  * MySQL: retain SSL settings on reconnect. #6976 [randyv2]
82
509
 
510
+ * Apply scoping during initialize instead of create. Fixes setting of foreign key when using find_or_initialize_by with scoping. [Cody Fauser]
511
+
83
512
  * SQLServer: handle [quoted] table names. #6635 [rrich]
84
513
 
85
514
  * acts_as_nested_set works with single-table inheritance. #6030 [Josh Susser]
86
515
 
87
516
  * PostgreSQL, Oracle: correctly perform eager finds with :limit and :order. #4668, #7021 [eventualbuddha, Michael Schoen]
88
517
 
518
+ * Pass a range in :conditions to use the SQL BETWEEN operator. #6974 [Dan Manges]
519
+ Student.find(:all, :conditions => { :grade => 9..12 })
520
+
89
521
  * Fix the Oracle adapter for serialized attributes stored in CLOBs. Closes #6825 [mschoen, tdfowler]
90
522
 
91
523
  * [DOCS] Apply more documentation for ActiveRecord Reflection. Closes #4055 [Robby Russell]
@@ -94,36 +526,68 @@
94
526
 
95
527
  * Bring the sybase adapter up to scratch for 1.2 release. [jsheets]
96
528
 
529
+ * Rollback new_record? and id when an exception is raised in a save callback. #6910 [Ben Curren, outerim]
530
+
531
+ * Pushing a record on an association collection doesn't unnecessarily load all the associated records. [Obie Fernandez, Jeremy Kemper]
532
+
97
533
  * Oracle: fix connection reset failure. #6846 [leonlleslie]
98
534
 
99
535
  * Subclass instantiation doesn't try to explicitly require the corresponding subclass. #6840 [leei, Jeremy Kemper]
100
536
 
101
537
  * fix faulty inheritance tests and that eager loading grabs the wrong inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool]
102
538
 
539
+ * Consolidated different create and create! versions to call through to the base class with scope. This fixes inconsistencies, especially related to protected attribtues. Closes #5847 [Alexander Dymo, Tobias Luetke]
540
+
103
541
  * find supports :lock with :include. Check whether your database allows SELECT ... FOR UPDATE with outer joins before using. #6764 [vitaly, Jeremy Kemper]
104
542
 
105
- * Support nil and Array in :conditions => { attr => value } hashes. #6548 [Assaf, Jeremy Kemper]
106
- find(:all, :conditions => { :topic_id => [1, 2, 3], :last_read => nil }
543
+ * Add AssociationCollection#create! to be consistent with AssociationCollection#create when dealing with a foreign key that is a protected attribute [Cody Fauser]
544
+
545
+ * Added counter optimization for AssociationCollection#any? so person.friends.any? won't actually load the full association if we have the count in a cheaper form [DHH]
546
+
547
+ * Change fixture_path to a class inheritable accessor allowing test cases to have their own custom set of fixtures. #6672 [zdennis]
107
548
 
108
549
  * Quote ActiveSupport::Multibyte::Chars. #6653 [Julian Tarkhanov]
109
550
 
110
- * MySQL: detect when a NOT NULL column without a default value is misreported as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. #6156 [simon@redhillconsulting.com.au, obrie, Jonathan Viney, Jeremy Kemper]
551
+ * Simplify query_attribute by typecasting the attribute value and checking whether it's nil, false, zero or blank. #6659 [Jonathan Viney]
111
552
 
112
553
  * validates_numericality_of uses \A \Z to ensure the entire string matches rather than ^ $ which may match one valid line of a multiline string. #5716 [Andreas Schwarz]
113
554
 
555
+ * Run validations in the order they were declared. #6657 [obrie]
556
+
557
+ * MySQL: detect when a NOT NULL column without a default value is misreported as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. #6156 [simon@redhillconsulting.com.au, obrie, Jonathan Viney, Jeremy Kemper]
558
+
559
+ * Simplify association proxy implementation by factoring construct_scope out of method_missing. #6643 [martin]
560
+
114
561
  * Oracle: automatically detect the primary key. #6594 [vesaria, Michael Schoen]
115
562
 
116
563
  * Oracle: to increase performance, prefetch 100 rows and enable similar cursor sharing. Both are configurable in database.yml. #6607 [philbogle@gmail.com, ray.fortna@jobster.com, Michael Schoen]
117
564
 
565
+ * Don't inspect unloaded associations. #2905 [lmarlow]
566
+
567
+ * SQLite: use AUTOINCREMENT primary key in >= 3.1.0. #6588, #6616 [careo, lukfugl]
568
+
569
+ * Cache inheritance_column. #6592 [Stefan Kaes]
570
+
118
571
  * Firebird: decimal/numeric support. #6408 [macrnic]
119
572
 
573
+ * make add_order a tad faster. #6567 [Stefan Kaes]
574
+
120
575
  * Find with :include respects scoped :order. #5850
121
576
 
577
+ * Support nil and Array in :conditions => { attr => value } hashes. #6548 [Assaf, Jeremy Kemper]
578
+ find(:all, :conditions => { :topic_id => [1, 2, 3], :last_read => nil }
579
+
580
+ * Consistently use LOWER() for uniqueness validations (rather than mixing with UPPER()) so the database can always use a functional index on the lowercased column. #6495 [Si]
581
+
582
+ * SQLite: fix calculations workaround, remove count(distinct) query rewrite, cleanup test connection scripts. [Jeremy Kemper]
583
+
584
+ * SQLite: count(distinct) queries supported in >= 3.2.6. #6544 [Bob Silva]
585
+
122
586
  * Dynamically generate reader methods for serialized attributes. #6362 [Stefan Kaes]
123
587
 
124
588
  * Deprecation: object transactions warning. [Jeremy Kemper]
125
589
 
126
- * has_one :dependent => :nullify ignores nil associates. #6528 [janovetz, Jeremy Kemper]
590
+ * has_one :dependent => :nullify ignores nil associates. #4848, #6528 [bellis@deepthought.org, janovetz, Jeremy Kemper]
127
591
 
128
592
  * Oracle: resolve test failures, use prefetched primary key for inserts, check for null defaults, fix limited id selection for eager loading. Factor out some common methods from all adapters. #6515 [Michael Schoen]
129
593
 
@@ -185,12 +649,20 @@
185
649
 
186
650
  * Deprecation: use :dependent => :delete_all rather than :exclusively_dependent => true. #6024 [Josh Susser]
187
651
 
652
+ * Document validates_presences_of behavior with booleans: you probably want validates_inclusion_of :attr, :in => [true, false]. #2253 [Bob Silva]
653
+
188
654
  * Optimistic locking: gracefully handle nil versions, treat as zero. #5908 [Tom Ward]
189
655
 
190
656
  * to_xml: the :methods option works on arrays of records. #5845 [Josh Starcher]
191
657
 
658
+ * Deprecation: update docs. #5998 [jakob@mentalized.net, Kevin Clark]
659
+
660
+ * Add some XmlSerialization tests for ActiveRecord [Rick Olson]
661
+
192
662
  * has_many :through conditions are sanitized by the associating class. #5971 [martin.emde@gmail.com]
193
663
 
664
+ * Tighten rescue clauses. #5985 [james@grayproductions.net]
665
+
194
666
  * Fix spurious newlines and spaces in AR::Base#to_xml output [Jamis Buck]
195
667
 
196
668
  * has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database. #5927 [Chris Mear, Jonathan Viney]
@@ -199,6 +671,8 @@
199
671
 
200
672
  * SQLServer: work around bug where some unambiguous date formats are not correctly identified if the session language is set to german. #5894 [Tom Ward, kruth@bfpi]
201
673
 
674
+ * SQLServer: fix eager association test. #5901 [Tom Ward]
675
+
202
676
  * Clashing type columns due to a sloppy join shouldn't wreck single-table inheritance. #5838 [Kevin Clark]
203
677
 
204
678
  * Fixtures: correct escaping of \n and \r. #5859 [evgeny.zislis@gmail.com]
@@ -249,12 +723,16 @@
249
723
 
250
724
  * Remove ActiveRecord::Base.reset since Dispatcher doesn't use it anymore. [Rick Olson]
251
725
 
726
+ * Document find's :from option. Closes #5762. [andrew@redlinesoftware.com]
727
+
252
728
  * PostgreSQL: autodetected sequences work correctly with multiple schemas. Rely on the schema search_path instead of explicitly qualifying the sequence name with its schema. #5280 [guy.naor@famundo.com]
253
729
 
254
730
  * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
255
731
 
256
732
  * Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael A. Schoen]
257
733
 
734
+ * Add documentation for how to disable timestamps on a per model basis. Closes #5684. [matt@mattmargolis.net Marcel Molina Jr.]
735
+
258
736
  * Don't save has_one associations unnecessarily. #5735 [Jonathan Viney]
259
737
 
260
738
  * Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global observer resetting. [Rick Olson]
@@ -271,7 +749,7 @@
271
749
 
272
750
  * Fixed to_xml with :include misbehaviors when invoked on array of model instances #5690 [alexkwolfe@gmail.com]
273
751
 
274
- * Added support for conditions on Base.exists? #5689 [josh@joshpeek.com]. Examples:
752
+ * Added support for conditions on Base.exists? #5689 [Josh Peek]. Examples:
275
753
 
276
754
  assert (Topic.exists?(:author_name => "David"))
277
755
  assert (Topic.exists?(:author_name => "Mary", :approved => true))
@@ -303,6 +781,8 @@
303
781
 
304
782
  * PostgreSQL: create/drop as postgres user. #4790 [mail@matthewpainter.co.uk, mlaster@metavillage.com]
305
783
 
784
+ * Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
785
+
306
786
  * PostgreSQL: correctly quote the ' in pk_and_sequence_for. #5462 [tietew@tietew.net]
307
787
 
308
788
  * PostgreSQL: correctly quote microseconds in timestamps. #5641 [rick@rickbradley.com]
@@ -315,6 +795,8 @@
315
795
 
316
796
  * Added :group to available options for finds done on associations #5516 [mike@michaeldewey.org]
317
797
 
798
+ * Minor tweak to improve performance of ActiveRecord::Base#to_param.
799
+
318
800
  * Observers also watch subclasses created after they are declared. #5535 [daniels@pronto.com.au]
319
801
 
320
802
  * Removed deprecated timestamps_gmt class methods. [Jeremy Kemper]
@@ -414,10 +896,22 @@
414
896
 
415
897
  * Allow AR::Base#to_xml to include methods too. Closes #4921. [johan@textdrive.com]
416
898
 
899
+ * Replace superfluous name_to_class_name variant with camelize. [Marcel Molina Jr.]
900
+
901
+ * Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
902
+
903
+ * Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
904
+
417
905
  * Remove duplicate fixture entry in comments.yml. Closes #4923. [Blair Zajac <blair@orcaware.com>]
418
906
 
907
+ * Update FrontBase adapter to check binding version. Closes #4920. [mlaster@metavillage.com]
908
+
909
+ * New Frontbase connections don't start in auto-commit mode. Closes #4922. [mlaster@metavillage.com]
910
+
419
911
  * When grouping, use the appropriate option key. [Marcel Molina Jr.]
420
912
 
913
+ * Only modify the sequence name in the FrontBase adapter if the FrontBase adapter is actually being used. [Marcel Molina Jr.]
914
+
421
915
  * Add support for FrontBase (http://www.frontbase.com/) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com]
422
916
 
423
917
  * Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>]
@@ -445,6 +939,8 @@
445
939
 
446
940
  * Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick]
447
941
 
942
+ * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com]
943
+
448
944
  * Add ActiveRecord::Errors#to_xml [Jamis Buck]
449
945
 
450
946
  * Properly quote index names in migrations (closes #4764) [John Long]
@@ -455,6 +951,10 @@
455
951
 
456
952
  * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
457
953
 
954
+ * DRY up association collection reader method generation. [Marcel Molina Jr.]
955
+
956
+ * DRY up and tweak style of the validation error object. [Marcel Molina Jr.]
957
+
458
958
  * Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick]
459
959
 
460
960
  class Account < ActiveRecord::Base
@@ -467,30 +967,1980 @@
467
967
  has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension]
468
968
  end
469
969
 
970
+ *1.15.3* (March 12th, 2007)
470
971
 
471
- *1.14.4* (August 8th, 2006)
972
+ * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
472
973
 
473
- * Add warning about the proper way to validate the presence of a foreign key. #4147 [Francois Beausoleil <francois.beausoleil@gmail.com>]
974
+ * Consistently quote primary key column names. #7763 [toolmantim]
474
975
 
475
- * Fix syntax error in documentation. #4679 [mislav@nippur.irb.hr]
976
+ * Fixtures: fix YAML ordered map support. #2665 [Manuel Holtgrewe, nfbuckley]
476
977
 
477
- * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com]
978
+ * Fix has_many :through << with custom foreign keys. #6466, #7153 [naffis, Rich Collins]
478
979
 
479
980
 
480
- *1.14.3* (June 27th, 2006)
981
+ *1.15.2* (February 5th, 2007)
982
+
983
+ * Pass a range in :conditions to use the SQL BETWEEN operator. #6974 [dcmanges]
984
+ Student.find(:all, :conditions => { :grade => 9..12 })
985
+
986
+ * Don't create instance writer methods for class attributes. [Rick]
987
+
988
+ * When dealing with SQLite3, use the table_info pragma helper, so that the bindings can do some translation for when sqlite3 breaks incompatibly between point releases. [Jamis Buck]
989
+
990
+ * SQLServer: don't choke on strings containing 'null'. #7083 [Jakob S]
991
+
992
+ * Consistently use LOWER() for uniqueness validations (rather than mixing with UPPER()) so the database can always use a functional index on the lowercased column. #6495 [Si]
993
+
994
+ * MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last inserted id. #6778 [Jonathan Viney, timc]
995
+
996
+ * Fixtures use the table name and connection from set_fixture_class. #7330 [Anthony Eden]
997
+
998
+ * SQLServer: quote table name in indexes query. #2928 [keithm@infused.org]
999
+
1000
+
1001
+ *1.15.1* (January 17th, 2007)
1002
+
1003
+ * Fix nodoc breaking of adapters
1004
+
1005
+
1006
+ *1.15.0* (January 16th, 2007)
1007
+
1008
+ * [DOC] clear up some ambiguity with the way has_and_belongs_to_many creates the default join table name. #7072 [jeremymcanally]
1009
+
1010
+ * change_column accepts :default => nil. Skip column options for primary keys. #6956, #7048 [dcmanges, Jeremy Kemper]
1011
+
1012
+ * MySQL, PostgreSQL: change_column_default quotes the default value and doesn't lose column type information. #3987, #6664 [Jonathan Viney, manfred, altano@bigfoot.com]
1013
+
1014
+ * Oracle: create_table takes a :sequence_name option to override the 'tablename_seq' default. #7000 [Michael Schoen]
1015
+
1016
+ * MySQL: retain SSL settings on reconnect. #6976 [randyv2]
1017
+
1018
+ * SQLServer: handle [quoted] table names. #6635 [rrich]
1019
+
1020
+ * acts_as_nested_set works with single-table inheritance. #6030 [Josh Susser]
1021
+
1022
+ * PostgreSQL, Oracle: correctly perform eager finds with :limit and :order. #4668, #7021 [eventualbuddha, Michael Schoen]
1023
+
1024
+ * Fix the Oracle adapter for serialized attributes stored in CLOBs. Closes #6825 [mschoen, tdfowler]
1025
+
1026
+ * [DOCS] Apply more documentation for ActiveRecord Reflection. Closes #4055 [Robby Russell]
1027
+
1028
+ * [DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 [Caio Chassot]
1029
+
1030
+ * Bring the sybase adapter up to scratch for 1.2 release. [jsheets]
1031
+
1032
+ * Oracle: fix connection reset failure. #6846 [leonlleslie]
1033
+
1034
+ * Subclass instantiation doesn't try to explicitly require the corresponding subclass. #6840 [leei, Jeremy Kemper]
1035
+
1036
+ * fix faulty inheritance tests and that eager loading grabs the wrong inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool]
1037
+
1038
+ * find supports :lock with :include. Check whether your database allows SELECT ... FOR UPDATE with outer joins before using. #6764 [vitaly, Jeremy Kemper]
1039
+
1040
+ * Support nil and Array in :conditions => { attr => value } hashes. #6548 [Assaf, Jeremy Kemper]
1041
+ find(:all, :conditions => { :topic_id => [1, 2, 3], :last_read => nil }
1042
+
1043
+ * Quote ActiveSupport::Multibyte::Chars. #6653 [Julian Tarkhanov]
1044
+
1045
+ * MySQL: detect when a NOT NULL column without a default value is misreported as default ''. Can't detect for string, text, and binary columns since '' is a legitimate default. #6156 [simon@redhillconsulting.com.au, obrie, Jonathan Viney, Jeremy Kemper]
1046
+
1047
+ * validates_numericality_of uses \A \Z to ensure the entire string matches rather than ^ $ which may match one valid line of a multiline string. #5716 [Andreas Schwarz]
1048
+
1049
+ * Oracle: automatically detect the primary key. #6594 [vesaria, Michael Schoen]
1050
+
1051
+ * Oracle: to increase performance, prefetch 100 rows and enable similar cursor sharing. Both are configurable in database.yml. #6607 [philbogle@gmail.com, ray.fortna@jobster.com, Michael Schoen]
1052
+
1053
+ * Firebird: decimal/numeric support. #6408 [macrnic]
1054
+
1055
+ * Find with :include respects scoped :order. #5850
1056
+
1057
+ * Dynamically generate reader methods for serialized attributes. #6362 [Stefan Kaes]
1058
+
1059
+ * Deprecation: object transactions warning. [Jeremy Kemper]
1060
+
1061
+ * has_one :dependent => :nullify ignores nil associates. #6528 [janovetz, Jeremy Kemper]
1062
+
1063
+ * Oracle: resolve test failures, use prefetched primary key for inserts, check for null defaults, fix limited id selection for eager loading. Factor out some common methods from all adapters. #6515 [Michael Schoen]
1064
+
1065
+ * Make add_column use the options hash with the Sqlite Adapter. Closes #6464 [obrie]
1066
+
1067
+ * Document other options available to migration's add_column. #6419 [grg]
1068
+
1069
+ * MySQL: all_hashes compatibility with old MysqlRes class. #6429, #6601 [Jeremy Kemper]
1070
+
1071
+ * Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney]
1072
+
1073
+ * fix select_limited_ids_list issues in postgresql, retain current behavior in other adapters [Rick]
1074
+
1075
+ * Restore eager condition interpolation, document it's differences [Rick]
1076
+
1077
+ * Don't rollback in teardown unless a transaction was started. Don't start a transaction in create_fixtures if a transaction is started. #6282 [Jacob Fugal, Jeremy Kemper]
1078
+
1079
+ * Add #delete support to has_many :through associations. Closes #6049 [Martin Landers]
1080
+
1081
+ * Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick]
1082
+
1083
+ * Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com]
1084
+
1085
+ * Added timeout option to SQLite3 configurations to deal more gracefully with SQLite3::BusyException, now the connection can instead retry for x seconds to see if the db clears up before throwing that exception #6126 [wreese@gmail.com]
1086
+
1087
+ * Added update_attributes! which uses save! to raise an exception if a validation error prevents saving #6192 [jonathan]
1088
+
1089
+ * Deprecated add_on_boundary_breaking (use validates_length_of instead) #6292 [BobSilva]
1090
+
1091
+ * The has_many create method works with polymorphic associations. #6361 [Dan Peterson]
1092
+
1093
+ * MySQL: introduce Mysql::Result#all_hashes to support further optimization. #5581 [Stefan Kaes]
1094
+
1095
+ * save! shouldn't validate twice. #6324 [maiha, Bob Silva]
1096
+
1097
+ * Association collections have an _ids reader method to match the existing writer for collection_select convenience (e.g. employee.task_ids). The writer method skips blank ids so you can safely do @employee.task_ids = params[:tasks] without checking every time for an empty list or blank values. #1887, #5780 [Michael Schuerig]
1098
+
1099
+ * Add an attribute reader method for ActiveRecord::Base.observers [Rick Olson]
1100
+
1101
+ * Deprecation: count class method should be called with an options hash rather than two args for conditions and joins. #6287 [Bob Silva]
1102
+
1103
+ * has_one associations with a nil target may be safely marshaled. #6279 [norbauer, Jeremy Kemper]
1104
+
1105
+ * Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side effects [Koz]
1106
+
1107
+ * Add a :namespace option to AR::Base#to_xml [Koz]
1108
+
1109
+ * Deprecation tests. Remove warnings for dynamic finders and for the foo_count method if it's also an attribute. [Jeremy Kemper]
1110
+
1111
+ * Mock Time.now for more accurate Touch mixin tests. #6213 [Dan Peterson]
1112
+
1113
+ * Improve yaml fixtures error reporting. #6205 [Bruce Williams]
1114
+
1115
+ * Rename AR::Base#quote so people can use that name in their models. #3628 [Koz]
1116
+
1117
+ * Add deprecation warning for inferred foreign key. #6029 [Josh Susser]
1118
+
1119
+ * Fixed the Ruby/MySQL adapter we ship with Active Record to work with the new authentication handshake that was introduced in MySQL 4.1, along with the other protocol changes made at that time #5723 [jimw@mysql.com]
1120
+
1121
+ * Deprecation: use :dependent => :delete_all rather than :exclusively_dependent => true. #6024 [Josh Susser]
1122
+
1123
+ * Optimistic locking: gracefully handle nil versions, treat as zero. #5908 [Tom Ward]
1124
+
1125
+ * to_xml: the :methods option works on arrays of records. #5845 [Josh Starcher]
1126
+
1127
+ * has_many :through conditions are sanitized by the associating class. #5971 [martin.emde@gmail.com]
1128
+
1129
+ * Fix spurious newlines and spaces in AR::Base#to_xml output [Jamis Buck]
1130
+
1131
+ * has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database. #5927 [Chris Mear, Jonathan Viney]
1132
+
1133
+ * Nested subclasses are not prefixed with the parent class' table_name since they should always use the base class' table_name. #5911 [Jonathan Viney]
1134
+
1135
+ * SQLServer: work around bug where some unambiguous date formats are not correctly identified if the session language is set to german. #5894 [Tom Ward, kruth@bfpi]
1136
+
1137
+ * Clashing type columns due to a sloppy join shouldn't wreck single-table inheritance. #5838 [Kevin Clark]
1138
+
1139
+ * Fixtures: correct escaping of \n and \r. #5859 [evgeny.zislis@gmail.com]
1140
+
1141
+ * Migrations: gracefully handle missing migration files. #5857 [eli.gordon@gmail.com]
1142
+
1143
+ * MySQL: update test schema for MySQL 5 strict mode. #5861 [Tom Ward]
1144
+
1145
+ * to_xml: correct naming of included associations. #5831 [josh.starcher@gmail.com]
1146
+
1147
+ * Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [josh@hasmanythrough.com]
1148
+
1149
+ * Add records to has_many :through using <<, push, and concat by creating the association record. Raise if base or associate are new records since both ids are required to create the association. #build raises since you can't associate an unsaved record. #create! takes an attributes hash and creates the associated record and its association in a transaction. [Jeremy Kemper]
1150
+
1151
+ # Create a tagging to associate the post and tag.
1152
+ post.tags << Tag.find_by_name('old')
1153
+ post.tags.create! :name => 'general'
1154
+
1155
+ # Would have been:
1156
+ post.taggings.create!(:tag => Tag.find_by_name('finally')
1157
+ transaction do
1158
+ post.taggings.create!(:tag => Tag.create!(:name => 'general'))
1159
+ end
1160
+
1161
+ * Cache nil results for :included has_one associations also. #5787 [Michael Schoen]
1162
+
1163
+ * Fixed a bug which would cause .save to fail after trying to access a empty has_one association on a unsaved record. [Tobias Luetke]
1164
+
1165
+ * Nested classes are given table names prefixed by the singular form of the parent's table name. [Jeremy Kemper]
1166
+ Example: Invoice::Lineitem is given table name invoice_lineitems
1167
+
1168
+ * Migrations: uniquely name multicolumn indexes so you don't have to. [Jeremy Kemper]
1169
+ # people_active_last_name_index, people_active_deactivated_at_index
1170
+ add_index :people, [:active, :last_name]
1171
+ add_index :people, [:active, :deactivated_at]
1172
+ remove_index :people, [:active, :last_name]
1173
+ remove_index :people, [:active, :deactivated_at]
1174
+
1175
+ WARNING: backward-incompatibility. Multicolumn indexes created before this
1176
+ revision were named using the first column name only. Now they're uniquely
1177
+ named using all indexed columns.
1178
+
1179
+ To remove an old multicolumn index, remove_index :table_name, :first_column
1180
+
1181
+ * Fix for deep includes on the same association. [richcollins@gmail.com]
1182
+
1183
+ * Tweak fixtures so they don't try to use a non-ActiveRecord class. [Kevin Clark]
1184
+
1185
+ * Remove ActiveRecord::Base.reset since Dispatcher doesn't use it anymore. [Rick Olson]
1186
+
1187
+ * PostgreSQL: autodetected sequences work correctly with multiple schemas. Rely on the schema search_path instead of explicitly qualifying the sequence name with its schema. #5280 [guy.naor@famundo.com]
1188
+
1189
+ * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
1190
+
1191
+ * Cache nil results for has_one associations so multiple calls don't call the database. Closes #5757. [Michael A. Schoen]
1192
+
1193
+ * Don't save has_one associations unnecessarily. #5735 [Jonathan Viney]
1194
+
1195
+ * Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global observer resetting. [Rick Olson]
1196
+
1197
+ * Formally deprecate the deprecated finders. [Koz]
1198
+
1199
+ * Formally deprecate rich associations. [Koz]
1200
+
1201
+ * Fixed that default timezones for new / initialize should uphold utc setting #5709 [daniluk@yahoo.com]
481
1202
 
482
1203
  * Fix announcement of very long migration names. #5722 [blake@near-time.com]
483
1204
 
484
- * Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
1205
+ * The exists? class method should treat a string argument as an id rather than as conditions. #5698 [jeremy@planetargon.com]
485
1206
 
486
- * Properly quote index names in migrations (closes #4764) [John Long]
1207
+ * Fixed to_xml with :include misbehaviors when invoked on array of model instances #5690 [alexkwolfe@gmail.com]
487
1208
 
488
- * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
1209
+ * Added support for conditions on Base.exists? #5689 [Josh Peek]. Examples:
489
1210
 
490
- * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
1211
+ assert (Topic.exists?(:author_name => "David"))
1212
+ assert (Topic.exists?(:author_name => "Mary", :approved => true))
1213
+ assert (Topic.exists?(["parent_id = ?", 1]))
491
1214
 
1215
+ * Schema dumper quotes date :default values. [Dave Thomas]
492
1216
 
493
- *1.14.2* (April 9th, 2006)
1217
+ * Calculate sum with SQL, not Enumerable on HasManyThrough Associations. [Dan Peterson]
1218
+
1219
+ * Factor the attribute#{suffix} methods out of method_missing for easier extension. [Jeremy Kemper]
1220
+
1221
+ * Patch sql injection vulnerability when using integer or float columns. [Jamis Buck]
1222
+
1223
+ * Allow #count through a has_many association to accept :include. [Dan Peterson]
1224
+
1225
+ * create_table rdoc: suggest :id => false for habtm join tables. [Zed Shaw]
1226
+
1227
+ * PostgreSQL: return array fields as strings. #4664 [Robby Russell]
1228
+
1229
+ * SQLServer: added tests to ensure all database statements are closed, refactored identity_insert management code to use blocks, removed update/delete rowcount code out of execute and into update/delete, changed insert to go through execute method, removed unused quoting methods, disabled pessimistic locking tests as feature is currently unsupported, fixed RakeFile to load sqlserver specific tests whether running in ado or odbc mode, fixed support for recently added decimal types, added support for limits on integer types. #5670 [Tom Ward]
1230
+
1231
+ * SQLServer: fix db:schema:dump case-sensitivity. #4684 [Will Rogers]
1232
+
1233
+ * Oracle: BigDecimal support. #5667 [schoenm@earthlink.net]
1234
+
1235
+ * Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. #5454 [robbat2@gentoo.org, work@ashleymoran.me.uk]
1236
+
1237
+ * Firebird migrations support. #5337 [Ken Kunz <kennethkunz@gmail.com>]
1238
+
1239
+ * PostgreSQL: create/drop as postgres user. #4790 [mail@matthewpainter.co.uk, mlaster@metavillage.com]
1240
+
1241
+ * PostgreSQL: correctly quote the ' in pk_and_sequence_for. #5462 [tietew@tietew.net]
1242
+
1243
+ * PostgreSQL: correctly quote microseconds in timestamps. #5641 [rick@rickbradley.com]
1244
+
1245
+ * Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net]
1246
+
1247
+ * Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [schoenm@earthlink.net]
1248
+
1249
+ * Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net]
1250
+
1251
+ * Added :group to available options for finds done on associations #5516 [mike@michaeldewey.org]
1252
+
1253
+ * Observers also watch subclasses created after they are declared. #5535 [daniels@pronto.com.au]
1254
+
1255
+ * Removed deprecated timestamps_gmt class methods. [Jeremy Kemper]
1256
+
1257
+ * rake build_mysql_database grants permissions to rails@localhost. #5501 [brianegge@yahoo.com]
1258
+
1259
+ * PostgreSQL: support microsecond time resolution. #5492 [alex@msgpad.com]
1260
+
1261
+ * Add AssociationCollection#sum since the method_missing invokation has been shadowed by Enumerable#sum.
1262
+
1263
+ * Added find_or_initialize_by_X which works like find_or_create_by_X but doesn't save the newly instantiated record. [Sam Stephenson]
1264
+
1265
+ * Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". Use the #lock! method to obtain a row lock on a single record (reloads the record with :lock => true). [Shugo Maeda]
1266
+ # Obtain an exclusive lock on person 1 so we can safely increment visits.
1267
+ Person.transaction do
1268
+ # select * from people where id=1 for update
1269
+ person = Person.find(1, :lock => true)
1270
+ person.visits += 1
1271
+ person.save!
1272
+ end
1273
+
1274
+ * PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. [Jeremy Kemper]
1275
+
1276
+ * Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. [Jeremy Kemper]
1277
+
1278
+ * Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320. [Nicholas Seckar]
1279
+
1280
+ * Use explicit delegation instead of method aliasing for AR::Base.to_param -> AR::Base.id. #5299 (skaes@web.de)
1281
+
1282
+ * Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH]
1283
+
1284
+ * Added simple hash conditions to find that'll just convert hash to an AND-based condition string #5143 [hcatlin@gmail.com]. Example:
1285
+
1286
+ Person.find(:all, :conditions => { :last_name => "Catlin", :status => 1 }, :limit => 2)
1287
+
1288
+ ...is the same as:
1289
+
1290
+ Person.find(:all, :conditions => [ "last_name = ? and status = ?", "Catlin", 1 ], :limit => 2)
1291
+
1292
+ This makes it easier to pass in the options from a form or otherwise outside.
1293
+
1294
+
1295
+ * Fixed issues with BLOB limits, charsets, and booleans for Firebird #5194, #5191, #5189 [kennethkunz@gmail.com]
1296
+
1297
+ * Fixed usage of :limit and with_scope when the association in scope is a 1:m #5208 [alex@purefiction.net]
1298
+
1299
+ * Fixed migration trouble with SQLite when NOT NULL is used in the new definition #5215 [greg@lapcominc.com]
1300
+
1301
+ * Fixed problems with eager loading and counting on SQL Server #5212 [kajism@yahoo.com]
1302
+
1303
+ * Fixed that count distinct should use the selected column even when using :include #5251 [anna@wota.jp]
1304
+
1305
+ * Fixed that :includes merged from with_scope won't cause the same association to be loaded more than once if repetition occurs in the clauses #5253 [alex@purefiction.net]
1306
+
1307
+ * Allow models to override to_xml. #4989 [Blair Zajac <blair@orcaware.com>]
1308
+
1309
+ * PostgreSQL: don't ignore port when host is nil since it's often used to label the domain socket. #5247 [shimbo@is.naist.jp]
1310
+
1311
+ * Records and arrays of records are bound as quoted ids. [Jeremy Kemper]
1312
+ Foo.find(:all, :conditions => ['bar_id IN (?)', bars])
1313
+ Foo.find(:first, :conditions => ['bar_id = ?', bar])
1314
+
1315
+ * Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH]
1316
+
1317
+ * Add a list of regexes assert_queries skips in the ActiveRecord test suite. [Rick]
1318
+
1319
+ * Fix the has_and_belongs_to_many #create doesn't populate the join for new records. Closes #3692 [josh@hasmanythrough.com]
1320
+
1321
+ * Provide Association Extensions access to the instance that the association is being accessed from.
1322
+ Closes #4433 [josh@hasmanythrough.com]
1323
+
1324
+ * Update OpenBase adaterp's maintainer's email address. Closes #5176. [Derrick Spell]
1325
+
1326
+ * Add a quick note about :select and eagerly included associations. [Rick]
1327
+
1328
+ * Add docs for the :as option in has_one associations. Closes #5144 [cdcarter@gmail.com]
1329
+
1330
+ * Fixed that has_many collections shouldn't load the entire association to do build or create [DHH]
1331
+
1332
+ * Added :allow_nil option for aggregations #5091 [ian.w.white@gmail.com]
1333
+
1334
+ * Fix Oracle boolean support and tests. Closes #5139. [schoenm@earthlink.net]
1335
+
1336
+ * create! no longer blows up when no attributes are passed and a :create scope is in effect (e.g. foo.bars.create! failed whereas foo.bars.create!({}) didn't.) [Jeremy Kemper]
1337
+
1338
+ * Call Inflector#demodulize on the class name when eagerly including an STI model. Closes #5077 [info@loobmedia.com]
1339
+
1340
+ * Preserve MySQL boolean column defaults when changing a column in a migration. Closes #5015. [pdcawley@bofh.org.uk]
1341
+
1342
+ * PostgreSQL: migrations support :limit with :integer columns by mapping limit < 4 to smallint, > 4 to bigint, and anything else to integer. #2900 [keegan@thebasement.org]
1343
+
1344
+ * Dates and times interpret empty strings as nil rather than 2000-01-01. #4830 [kajism@yahoo.com]
1345
+
1346
+ * Allow :uniq => true with has_many :through associations. [Jeremy Kemper]
1347
+
1348
+ * Ensure that StringIO is always available for the Schema dumper. [Marcel Molina Jr.]
1349
+
1350
+ * Allow AR::Base#to_xml to include methods too. Closes #4921. [johan@textdrive.com]
1351
+
1352
+ * Remove duplicate fixture entry in comments.yml. Closes #4923. [Blair Zajac <blair@orcaware.com>]
1353
+
1354
+ * When grouping, use the appropriate option key. [Marcel Molina Jr.]
1355
+
1356
+ * Add support for FrontBase (http://www.frontbase.com/) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com]
1357
+
1358
+ * Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>]
1359
+
1360
+ * Fix syntax error in documentation. Closes #4679. [mislav@nippur.irb.hr]
1361
+
1362
+ * Add Oracle support for CLOB inserts. Closes #4748. [schoenm@earthlink.net sandra.metz@duke.edu]
1363
+
1364
+ * Various fixes for sqlserver_adapter (odbc statement finishing, ado schema dumper, drop index). Closes #4831. [kajism@yahoo.com]
1365
+
1366
+ * Add support for :order option to with_scope. Closes #3887. [eric.daspet@survol.net]
1367
+
1368
+ * Prettify output of schema_dumper by making things line up. Closes #4241 [Caio Chassot <caio@v2studio.com>]
1369
+
1370
+ * Make build_postgresql_databases task make databases owned by the postgres user. Closes #4790. [mlaster@metavillage.com]
1371
+
1372
+ * Sybase Adapter type conversion cleanup. Closes #4736. [dev@metacasa.net]
1373
+
1374
+ * Fix bug where calculations with long alias names return null. [Rick]
1375
+
1376
+ * Raise error when trying to add to a has_many :through association. Use the Join Model instead. [Rick]
1377
+
1378
+ @post.tags << @tag # BAD
1379
+ @post.taggings.create(:tag => @tag) # GOOD
1380
+
1381
+ * Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick]
1382
+
1383
+ * Add ActiveRecord::Errors#to_xml [Jamis Buck]
1384
+
1385
+ * Properly quote index names in migrations (closes #4764) [John Long]
1386
+
1387
+ * Fix the HasManyAssociation#count method so it uses the new ActiveRecord::Base#count syntax, while maintaining backwards compatibility. [Rick]
1388
+
1389
+ * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
1390
+
1391
+ * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
1392
+
1393
+ * Add :case_sensitive option to validates_uniqueness_of (closes #3090) [Rick]
1394
+
1395
+ class Account < ActiveRecord::Base
1396
+ validates_uniqueness_of :email, :case_sensitive => false
1397
+ end
1398
+
1399
+ * Allow multiple association extensions with :extend option (closes #4666) [Josh Susser]
1400
+
1401
+ class Account < ActiveRecord::Base
1402
+ has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension]
1403
+ end
1404
+
1405
+
1406
+ *1.14.4* (August 8th, 2006)
1407
+
1408
+ * Add warning about the proper way to validate the presence of a foreign key. #4147 [Francois Beausoleil <francois.beausoleil@gmail.com>]
1409
+
1410
+ * Fix syntax error in documentation. #4679 [mislav@nippur.irb.hr]
1411
+
1412
+ * Update inconsistent migrations documentation. #4683 [machomagna@gmail.com]
1413
+
1414
+
1415
+ *1.14.3* (June 27th, 2006)
1416
+
1417
+ * Fix announcement of very long migration names. #5722 [blake@near-time.com]
1418
+
1419
+ * Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
1420
+
1421
+ * Properly quote index names in migrations (closes #4764) [John Long]
1422
+
1423
+ * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
1424
+
1425
+ * Associations#select_limited_ids_list adds the ORDER BY columns to the SELECT DISTINCT List for postgresql. [Rick]
1426
+
1427
+
1428
+ *1.14.2* (April 9th, 2006)
1429
+
1430
+ * Fixed calculations for the Oracle Adapter (closes #4626) [Michael Schoen]
1431
+
1432
+
1433
+ *1.14.1* (April 6th, 2006)
1434
+
1435
+ * Fix type_name_with_module to handle type names that begin with '::'. Closes #4614. [Nicholas Seckar]
1436
+
1437
+ * Fixed that that multiparameter assignment doesn't work with aggregations (closes #4620) [Lars Pind]
1438
+
1439
+ * Enable Limit/Offset in Calculations (closes #4558) [lmarlow@yahoo.com]
1440
+
1441
+ * Fixed that loading including associations returns all results if Load IDs For Limited Eager Loading returns none (closes #4528) [Rick]
1442
+
1443
+ * Fixed HasManyAssociation#find bugs when :finder_sql is set #4600 [lagroue@free.fr]
1444
+
1445
+ * Allow AR::Base#respond_to? to behave when @attributes is nil [zenspider]
1446
+
1447
+ * Support eager includes when going through a polymorphic has_many association. [Rick]
1448
+
1449
+ * Added support for eagerly including polymorphic has_one associations. (closes #4525) [Rick]
1450
+
1451
+ class Post < ActiveRecord::Base
1452
+ has_one :tagging, :as => :taggable
1453
+ end
1454
+
1455
+ Post.find :all, :include => :tagging
1456
+
1457
+ * Added descriptive error messages for invalid has_many :through associations: going through :has_one or :has_and_belongs_to_many [Rick]
1458
+
1459
+ * Added support for going through a polymorphic has_many association: (closes #4401) [Rick]
1460
+
1461
+ class PhotoCollection < ActiveRecord::Base
1462
+ has_many :photos, :as => :photographic
1463
+ belongs_to :firm
1464
+ end
1465
+
1466
+ class Firm < ActiveRecord::Base
1467
+ has_many :photo_collections
1468
+ has_many :photos, :through => :photo_collections
1469
+ end
1470
+
1471
+ * Multiple fixes and optimizations in PostgreSQL adapter, allowing ruby-postgres gem to work properly. [ruben.nine@gmail.com]
1472
+
1473
+ * Fixed that AssociationCollection#delete_all should work even if the records of the association are not loaded yet. [Florian Weber]
1474
+
1475
+ * Changed those private ActiveRecord methods to take optional third argument :auto instead of nil for performance optimizations. (closes #4456) [Stefan]
1476
+
1477
+ * Private ActiveRecord methods add_limit!, add_joins!, and add_conditions! take an OPTIONAL third argument 'scope' (closes #4456) [Rick]
1478
+
1479
+ * DEPRECATED: Using additional attributes on has_and_belongs_to_many associations. Instead upgrade your association to be a real join model [DHH]
1480
+
1481
+ * Fixed that records returned from has_and_belongs_to_many associations with additional attributes should be marked as read only (fixes #4512) [DHH]
1482
+
1483
+ * Do not implicitly mark recordss of has_many :through as readonly but do mark habtm records as readonly (eventually only on join tables without rich attributes). [Marcel Mollina Jr.]
1484
+
1485
+ * Fixed broken OCIAdapter #4457 [schoenm@earthlink.net]
1486
+
1487
+
1488
+ *1.14.0* (March 27th, 2006)
1489
+
1490
+ * Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar]
1491
+
1492
+ * Fixed eager loading so that an aliased table cannot clash with a has_and_belongs_to_many join table [Rick]
1493
+
1494
+ * Add support for :include to with_scope [andrew@redlinesoftware.com]
1495
+
1496
+ * Support the use of public synonyms with the Oracle adapter; required ruby-oci8 v0.1.14 #4390 [schoenm@earthlink.net]
1497
+
1498
+ * Change periods (.) in table aliases to _'s. Closes #4251 [jeff@ministrycentered.com]
1499
+
1500
+ * Changed has_and_belongs_to_many join to INNER JOIN for Mysql 3.23.x. Closes #4348 [Rick]
1501
+
1502
+ * Fixed issue that kept :select options from being scoped [Rick]
1503
+
1504
+ * Fixed db_schema_import when binary types are present #3101 [DHH]
1505
+
1506
+ * Fixed that MySQL enums should always be returned as strings #3501 [DHH]
1507
+
1508
+ * Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson]
1509
+
1510
+ class Connection < ActiveRecord::Base
1511
+ belongs_to :user
1512
+ belongs_to :channel
1513
+ end
1514
+
1515
+ class Channel < ActiveRecord::Base
1516
+ has_many :connections
1517
+ has_many :contacts, :through => :connections, :class_name => 'User' # OLD
1518
+ has_many :contacts, :through => :connections, :source => :user # NEW
1519
+ end
1520
+
1521
+ * Fixed DB2 adapter so nullable columns will be determines correctly now and quotes from column default values will be removed #4350 [contact@maik-schmidt.de]
1522
+
1523
+ * Allow overriding of find parameters in scoped has_many :through calls [Rick Olson]
1524
+
1525
+ In this example, :include => false disables the default eager association from loading. :select changes the standard
1526
+ select clause. :joins specifies a join that is added to the end of the has_many :through query.
1527
+
1528
+ class Post < ActiveRecord::Base
1529
+ has_many :tags, :through => :taggings, :include => :tagging do
1530
+ def add_joins_and_select
1531
+ find :all, :select => 'tags.*, authors.id as author_id', :include => false,
1532
+ :joins => 'left outer join posts on taggings.taggable_id = posts.id left outer join authors on posts.author_id = authors.id'
1533
+ end
1534
+ end
1535
+ end
1536
+
1537
+ * Fixed that schema changes while the database was open would break any connections to a SQLite database (now we reconnect if that error is throw) [DHH]
1538
+
1539
+ * Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [jonathan@bluewire.net.nz]
1540
+
1541
+ * Quit ignoring default :include options in has_many :through calls [Mark James]
1542
+
1543
+ * Allow has_many :through associations to find the source association by setting a custom class (closes #4307) [jonathan@bluewire.net.nz]
1544
+
1545
+ * Eager Loading support added for has_many :through => :has_many associations (see below). [Rick Olson]
1546
+
1547
+ * Allow has_many :through to work on has_many associations (closes #3864) [sco@scottraymond.net] Example:
1548
+
1549
+ class Firm < ActiveRecord::Base
1550
+ has_many :clients
1551
+ has_many :invoices, :through => :clients
1552
+ end
1553
+
1554
+ class Client < ActiveRecord::Base
1555
+ belongs_to :firm
1556
+ has_many :invoices
1557
+ end
1558
+
1559
+ class Invoice < ActiveRecord::Base
1560
+ belongs_to :client
1561
+ end
1562
+
1563
+ * Raise error when trying to select many polymorphic objects with has_many :through or :include (closes #4226) [josh@hasmanythrough.com]
1564
+
1565
+ * Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
1566
+
1567
+ * Fix that has_many :through honors the foreign key set by the belongs_to association in the join model (closes #4259) [andylien@gmail.com / Rick]
1568
+
1569
+ * SQL Server adapter gets some love #4298 [rtomayko@gmail.com]
1570
+
1571
+ * Added OpenBase database adapter that builds on top of the http://www.spice-of-life.net/ruby-openbase/ driver. All functionality except LIMIT/OFFSET is supported #3528 [derrickspell@cdmplus.com]
1572
+
1573
+ * Rework table aliasing to account for truncated table aliases. Add smarter table aliasing when doing eager loading of STI associations. This allows you to use the association name in the order/where clause. [Jonathan Viney / Rick Olson] #4108 Example (SpecialComment is using STI):
1574
+
1575
+ Author.find(:all, :include => { :posts => :special_comments }, :order => 'special_comments.body')
1576
+
1577
+ * Add AbstractAdapter#table_alias_for to create table aliases according to the rules of the current adapter. [Rick]
1578
+
1579
+ * Provide access to the underlying database connection through Adapter#raw_connection. Enables the use of db-specific methods without complicating the adapters. #2090 [Koz]
1580
+
1581
+ * Remove broken attempts at handling columns with a default of 'now()' in the postgresql adapter. #2257 [Koz]
1582
+
1583
+ * Added connection#current_database that'll return of the current database (only works in MySQL, SQL Server, and Oracle so far -- please help implement for the rest of the adapters) #3663 [Tom ward]
1584
+
1585
+ * Fixed that Migration#execute would have the table name prefix appended to its query #4110 [mark.imbriaco@pobox.com]
1586
+
1587
+ * Make all tinyint(1) variants act like boolean in mysql (tinyint(1) unsigned, etc.) [Jamis Buck]
1588
+
1589
+ * Use association's :conditions when eager loading. [jeremyevans0@gmail.com] #4144
1590
+
1591
+ * Alias the has_and_belongs_to_many join table on eager includes. #4106 [jeremyevans0@gmail.com]
1592
+
1593
+ This statement would normally error because the projects_developers table is joined twice, and therefore joined_on would be ambiguous.
1594
+
1595
+ Developer.find(:all, :include => {:projects => :developers}, :conditions => 'join_project_developers.joined_on IS NOT NULL')
1596
+
1597
+ * Oracle adapter gets some love #4230 [schoenm@earthlink.net]
1598
+
1599
+ * Changes :text to CLOB rather than BLOB [Moses Hohman]
1600
+ * Fixes an issue with nil numeric length/scales (several)
1601
+ * Implements support for XMLTYPE columns [wilig / Kubo Takehiro]
1602
+ * Tweaks a unit test to get it all green again
1603
+ * Adds support for #current_database
1604
+
1605
+ * Added Base.abstract_class? that marks which classes are not part of the Active Record hierarchy #3704 [Rick Olson]
1606
+
1607
+ class CachedModel < ActiveRecord::Base
1608
+ self.abstract_class = true
1609
+ end
1610
+
1611
+ class Post < CachedModel
1612
+ end
1613
+
1614
+ CachedModel.abstract_class?
1615
+ => true
1616
+
1617
+ Post.abstract_class?
1618
+ => false
1619
+
1620
+ Post.base_class
1621
+ => Post
1622
+
1623
+ Post.table_name
1624
+ => 'posts'
1625
+
1626
+ * Allow :dependent options to be used with polymorphic joins. #3820 [Rick Olson]
1627
+
1628
+ class Foo < ActiveRecord::Base
1629
+ has_many :attachments, :as => :attachable, :dependent => :delete_all
1630
+ end
1631
+
1632
+ * Nicer error message on has_many :through when :through reflection can not be found. #4042 [court3nay@gmail.com]
1633
+
1634
+ * Upgrade to Transaction::Simple 1.3 [Jamis Buck]
1635
+
1636
+ * Catch FixtureClassNotFound when using instantiated fixtures on a fixture that has no ActiveRecord model [Rick Olson]
1637
+
1638
+ * Allow ordering of calculated results and/or grouped fields in calculations [solo@gatelys.com]
1639
+
1640
+ * Make ActiveRecord::Base#save! return true instead of nil on success. #4173 [johan@johansorensen.com]
1641
+
1642
+ * Dynamically set allow_concurrency. #4044 [Stefan Kaes]
1643
+
1644
+ * Added Base#to_xml that'll turn the current record into a XML representation [DHH]. Example:
1645
+
1646
+ topic.to_xml
1647
+
1648
+ ...returns:
1649
+
1650
+ <?xml version="1.0" encoding="UTF-8"?>
1651
+ <topic>
1652
+ <title>The First Topic</title>
1653
+ <author-name>David</author-name>
1654
+ <id type="integer">1</id>
1655
+ <approved type="boolean">false</approved>
1656
+ <replies-count type="integer">0</replies-count>
1657
+ <bonus-time type="datetime">2000-01-01 08:28:00</bonus-time>
1658
+ <written-on type="datetime">2003-07-16 09:28:00</written-on>
1659
+ <content>Have a nice day</content>
1660
+ <author-email-address>david@loudthinking.com</author-email-address>
1661
+ <parent-id></parent-id>
1662
+ <last-read type="date">2004-04-15</last-read>
1663
+ </topic>
1664
+
1665
+ ...and you can configure with:
1666
+
1667
+ topic.to_xml(:skip_instruct => true, :except => [ :id, bonus_time, :written_on, replies_count ])
1668
+
1669
+ ...that'll return:
1670
+
1671
+ <topic>
1672
+ <title>The First Topic</title>
1673
+ <author-name>David</author-name>
1674
+ <approved type="boolean">false</approved>
1675
+ <content>Have a nice day</content>
1676
+ <author-email-address>david@loudthinking.com</author-email-address>
1677
+ <parent-id></parent-id>
1678
+ <last-read type="date">2004-04-15</last-read>
1679
+ </topic>
1680
+
1681
+ You can even do load first-level associations as part of the document:
1682
+
1683
+ firm.to_xml :include => [ :account, :clients ]
1684
+
1685
+ ...that'll return something like:
1686
+
1687
+ <?xml version="1.0" encoding="UTF-8"?>
1688
+ <firm>
1689
+ <id type="integer">1</id>
1690
+ <rating type="integer">1</rating>
1691
+ <name>37signals</name>
1692
+ <clients>
1693
+ <client>
1694
+ <rating type="integer">1</rating>
1695
+ <name>Summit</name>
1696
+ </client>
1697
+ <client>
1698
+ <rating type="integer">1</rating>
1699
+ <name>Microsoft</name>
1700
+ </client>
1701
+ </clients>
1702
+ <account>
1703
+ <id type="integer">1</id>
1704
+ <credit-limit type="integer">50</credit-limit>
1705
+ </account>
1706
+ </firm>
1707
+
1708
+ * Allow :counter_cache to take a column name for custom counter cache columns [Jamis Buck]
1709
+
1710
+ * Documentation fixes for :dependent [robby@planetargon.com]
1711
+
1712
+ * Stop the MySQL adapter crashing when views are present. #3782 [Jonathan Viney]
1713
+
1714
+ * Don't classify the belongs_to class, it is already singular #4117 [keithm@infused.org]
1715
+
1716
+ * Allow set_fixture_class to take Classes instead of strings for a class in a module. Raise FixtureClassNotFound if a fixture can't load. [Rick Olson]
1717
+
1718
+ * Fix quoting of inheritance column for STI eager loading #4098 [Jonathan Viney <jonathan@bluewire.net.nz>]
1719
+
1720
+ * Added smarter table aliasing for eager associations for multiple self joins #3580 [Rick Olson]
1721
+
1722
+ * The first time a table is referenced in a join, no alias is used.
1723
+ * After that, the parent class name and the reflection name are used.
1724
+
1725
+ Tree.find(:all, :include => :children) # LEFT OUTER JOIN trees AS tree_children ...
1726
+
1727
+ * Any additional join references get a numerical suffix like '_2', '_3', etc.
1728
+
1729
+ * Fixed eager loading problems with single-table inheritance #3580 [Rick Olson]. Post.find(:all, :include => :special_comments) now returns all posts, and any special comments that the posts may have. And made STI work with has_many :through and polymorphic belongs_to.
1730
+
1731
+ * Added cascading eager loading that allows for queries like Author.find(:all, :include=> { :posts=> :comments }), which will fetch all authors, their posts, and the comments belonging to those posts in a single query (using LEFT OUTER JOIN) #3913 [anna@wota.jp]. Examples:
1732
+
1733
+ # cascaded in two levels
1734
+ >> Author.find(:all, :include=>{:posts=>:comments})
1735
+ => authors
1736
+ +- posts
1737
+ +- comments
1738
+
1739
+ # cascaded in two levels and normal association
1740
+ >> Author.find(:all, :include=>[{:posts=>:comments}, :categorizations])
1741
+ => authors
1742
+ +- posts
1743
+ +- comments
1744
+ +- categorizations
1745
+
1746
+ # cascaded in two levels with two has_many associations
1747
+ >> Author.find(:all, :include=>{:posts=>[:comments, :categorizations]})
1748
+ => authors
1749
+ +- posts
1750
+ +- comments
1751
+ +- categorizations
1752
+
1753
+ # cascaded in three levels
1754
+ >> Company.find(:all, :include=>{:groups=>{:members=>{:favorites}}})
1755
+ => companies
1756
+ +- groups
1757
+ +- members
1758
+ +- favorites
1759
+
1760
+ * Make counter cache work when replacing an association #3245 [eugenol@gmail.com]
1761
+
1762
+ * Make migrations verbose [Jamis Buck]
1763
+
1764
+ * Make counter_cache work with polymorphic belongs_to [Jamis Buck]
1765
+
1766
+ * Fixed that calling HasOneProxy#build_model repeatedly would cause saving to happen #4058 [anna@wota.jp]
1767
+
1768
+ * Added Sybase database adapter that relies on the Sybase Open Client bindings (see http://raa.ruby-lang.org/project/sybase-ctlib) #3765 [John Sheets]. It's almost completely Active Record compliant (including migrations), but has the following caveats:
1769
+
1770
+ * Does not support DATE SQL column types; use DATETIME instead.
1771
+ * Date columns on HABTM join tables are returned as String, not Time.
1772
+ * Insertions are potentially broken for :polymorphic join tables
1773
+ * BLOB column access not yet fully supported
1774
+
1775
+ * Clear stale, cached connections left behind by defunct threads. [Jeremy Kemper]
1776
+
1777
+ * CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications. [Jeremy Kemper]
1778
+
1779
+ * Renamed the "oci" adapter to "oracle", but kept the old name as an alias #4017 [schoenm@earthlink.net]
1780
+
1781
+ * Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's #1861, #2477 [DHH]
1782
+
1783
+ * Speed up class -> connection caching and stale connection verification. #3979 [Stefan Kaes]
1784
+
1785
+ * Add set_fixture_class to allow the use of table name accessors with models which use set_table_name. [Kevin Clark]
1786
+
1787
+ * Added that fixtures to placed in subdirectories of the main fixture files are also loaded #3937 [dblack@wobblini.net]
1788
+
1789
+ * Define attribute query methods to avoid method_missing calls. #3677 [jonathan@bluewire.net.nz]
1790
+
1791
+ * ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. #3591 [Simon Stapleton, Tom Ward]
1792
+
1793
+ * Added support for nested scopes #3407 [anna@wota.jp]. Examples:
1794
+
1795
+ Developer.with_scope(:find => { :conditions => "salary > 10000", :limit => 10 }) do
1796
+ Developer.find(:all) # => SELECT * FROM developers WHERE (salary > 10000) LIMIT 10
1797
+
1798
+ # inner rule is used. (all previous parameters are ignored)
1799
+ Developer.with_exclusive_scope(:find => { :conditions => "name = 'Jamis'" }) do
1800
+ Developer.find(:all) # => SELECT * FROM developers WHERE (name = 'Jamis')
1801
+ end
1802
+
1803
+ # parameters are merged
1804
+ Developer.with_scope(:find => { :conditions => "name = 'Jamis'" }) do
1805
+ Developer.find(:all) # => SELECT * FROM developers WHERE (( salary > 10000 ) AND ( name = 'Jamis' )) LIMIT 10
1806
+ end
1807
+ end
1808
+
1809
+ * Fixed db2 connection with empty user_name and auth options #3622 [phurley@gmail.com]
1810
+
1811
+ * Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes #3699 [Masao Mutoh]
1812
+
1813
+ * Fixed that reflections would bleed across class boundaries in single-table inheritance setups #3796 [lars@pind.com]
1814
+
1815
+ * Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]. Examples:
1816
+
1817
+ Person.average :age
1818
+ Person.minimum :age
1819
+ Person.maximum :age
1820
+ Person.sum :salary, :group => :last_name
1821
+
1822
+ * Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) #3920 [contact@lukeredpath.co.uk]
1823
+
1824
+ * Reflections don't attempt to resolve module nesting of association classes. Simplify type computation. [Jeremy Kemper]
1825
+
1826
+ * Improved the Oracle OCI Adapter with better performance for column reflection (from #3210), fixes to migrations (from #3476 and #3742), tweaks to unit tests (from #3610), and improved documentation (from #2446) #3879 [Aggregated by schoenm@earthlink.net]
1827
+
1828
+ * Fixed that the schema_info table used by ActiveRecord::Schema.define should respect table pre- and suffixes #3834 [rubyonrails@atyp.de]
1829
+
1830
+ * Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT #3839 [skaes]
1831
+
1832
+ * Correct syntax error in mysql DDL, and make AAACreateTablesTest run first [Bob Silva]
1833
+
1834
+ * Allow :include to be used with has_many :through associations #3611 [Michael Schoen]
1835
+
1836
+ * PostgreSQL: smarter schema dumps using pk_and_sequence_for(table). #2920 [Blair Zajac]
1837
+
1838
+ * SQLServer: more compatible limit/offset emulation. #3779 [Tom Ward]
1839
+
1840
+ * Polymorphic join support for has_one associations (has_one :foo, :as => :bar) #3785 [Rick Olson]
1841
+
1842
+ * PostgreSQL: correctly parse negative integer column defaults. #3776 [bellis@deepthought.org]
1843
+
1844
+ * Fix problems with count when used with :include [Jeremy Hopple and Kevin Clark]
1845
+
1846
+ * ActiveRecord::RecordInvalid now states which validations failed in its default error message [Tobias Luetke]
1847
+
1848
+ * Using AssociationCollection#build with arrays of hashes should call build, not create [DHH]
1849
+
1850
+ * Remove definition of reloadable? from ActiveRecord::Base to make way for new Reloadable code. [Nicholas Seckar]
1851
+
1852
+ * Fixed schema handling for DB2 adapter that didn't work: an initial schema could be set, but it wasn't used when getting tables and indexes #3678 [Maik Schmidt]
1853
+
1854
+ * Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org]
1855
+
1856
+ * Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>]
1857
+
1858
+ * If the OCI library is not available, raise an exception indicating as much. #3593 [schoenm@earthlink.net]
1859
+
1860
+ * Add explicit :order in finder tests as postgresql orders results differently by default. #3577. [Rick Olson]
1861
+
1862
+ * Make dynamic finders honor additional passed in :conditions. #3569 [Oleg Pudeyev <pudeyo@rpi.edu>, Marcel Molina Jr.]
1863
+
1864
+ * Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies. [Nicholas Seckar]
1865
+
1866
+ * Make .count work for has_many associations with multi line finder sql [schoenm@earthlink.net]
1867
+
1868
+ * Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck]
1869
+
1870
+ * Allow configuration of the column used for optimistic locking [wilsonb@gmail.com]
1871
+
1872
+ * Don't hardcode 'id' in acts as list. [ror@philippeapril.com]
1873
+
1874
+ * Fix date errors for SQLServer in association tests. #3406 [kevin.clark@gmal.com]
1875
+
1876
+ * Escape database name in MySQL adapter when creating and dropping databases. #3409 [anna@wota.jp]
1877
+
1878
+ * Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com]
1879
+
1880
+ * .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke]
1881
+
1882
+ * Don't raise an exception when there are more keys than there are named bind variables when sanitizing conditions. [Marcel Molina Jr.]
1883
+
1884
+ * Multiple enhancements and adjustments to DB2 adaptor. #3377 [contact@maik-schmidt.de]
1885
+
1886
+ * Sanitize scoped conditions. [Marcel Molina Jr.]
1887
+
1888
+ * Added option to Base.reflection_of_all_associations to specify a specific association to scope the call. For example Base.reflection_of_all_associations(:has_many) [DHH]
1889
+
1890
+ * Added ActiveRecord::SchemaDumper.ignore_tables which tells SchemaDumper which tables to ignore. Useful for tables with funky column like the ones required for tsearch2. [TobiasLuetke]
1891
+
1892
+ * SchemaDumper now doesn't fail anymore when there are unknown column types in the schema. Instead the table is ignored and a Comment is left in the schema.rb. [TobiasLuetke]
1893
+
1894
+ * Fixed that saving a model with multiple habtm associations would only save the first one. #3244 [yanowitz-rubyonrails@quantumfoam.org, Florian Weber]
1895
+
1896
+ * Fix change_column to work with PostgreSQL 7.x and 8.x. #3141 [wejn@box.cz, Rick Olson, Scott Barron]
1897
+
1898
+ * removed :piggyback in favor of just allowing :select on :through associations. [Tobias Luetke]
1899
+
1900
+ * made method missing delegation to class methods on relation target work on :through associations. [Tobias Luetke]
1901
+
1902
+ * made .find() work on :through relations. [Tobias Luetke]
1903
+
1904
+ * Fix typo in association docs. #3296. [Blair Zajac]
1905
+
1906
+ * Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model [Tobias Luetke]
1907
+
1908
+ *1.13.2* (December 13th, 2005)
1909
+
1910
+ * Become part of Rails 1.0
1911
+
1912
+ * MySQL: allow encoding option for mysql.rb driver. [Jeremy Kemper]
1913
+
1914
+ * Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH]. Example:
1915
+
1916
+ class Post
1917
+ has_many :recent_comments, :class_name => "Comment", :limit => 10, :include => :author
1918
+ end
1919
+
1920
+ post.recent_comments.find(:all) # Uses LIMIT 10 and includes authors
1921
+ post.recent_comments.find(:all, :limit => nil) # Uses no limit but include authors
1922
+ post.recent_comments.find(:all, :limit => nil, :include => nil) # Uses no limit and doesn't include authors
1923
+
1924
+ * Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH]
1925
+
1926
+ * MySQL: fixes for the bundled mysql.rb driver. #3160 [Justin Forder]
1927
+
1928
+ * SQLServer: fix obscure optimistic locking bug. #3068 [kajism@yahoo.com]
1929
+
1930
+ * SQLServer: support uniqueidentifier columns. #2930 [keithm@infused.org]
1931
+
1932
+ * SQLServer: cope with tables names qualified by owner. #3067 [jeff@ministrycentered.com]
1933
+
1934
+ * SQLServer: cope with columns with "desc" in the name. #1950 [Ron Lusk, Ryan Tomayko]
1935
+
1936
+ * SQLServer: cope with primary keys with "select" in the name. #3057 [rdifrango@captechventures.com]
1937
+
1938
+ * Oracle: active? performs a select instead of a commit. #3133 [Michael Schoen]
1939
+
1940
+ * MySQL: more robust test for nullified result hashes. #3124 [Stefan Kaes]
1941
+
1942
+ * Reloading an instance refreshes its aggregations as well as its associations. #3024 [François Beausoleil]
1943
+
1944
+ * Fixed that using :include together with :conditions array in Base.find would cause NoMethodError #2887 [Paul Hammmond]
1945
+
1946
+ * PostgreSQL: more robust sequence name discovery. #3087 [Rick Olson]
1947
+
1948
+ * Oracle: use syntax compatible with Oracle 8. #3131 [Michael Schoen]
1949
+
1950
+ * MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat. Eliminate usage of mysql.ping because it doesn't guarantee reconnect. Explicitly close and reopen the connection instead. [Jeremy Kemper]
1951
+
1952
+ * Added preliminary support for polymorphic associations [DHH]
1953
+
1954
+ * Added preliminary support for join models [DHH]
1955
+
1956
+ * Allow validate_uniqueness_of to be scoped by more than just one column. #1559. [jeremy@jthopple.com, Marcel Molina Jr.]
1957
+
1958
+ * Firebird: active? and reconnect! methods for handling stale connections. #428 [Ken Kunz <kennethkunz@gmail.com>]
1959
+
1960
+ * Firebird: updated for FireRuby 0.4.0. #3009 [Ken Kunz <kennethkunz@gmail.com>]
1961
+
1962
+ * MySQL and PostgreSQL: active? compatibility with the pure-Ruby driver. #428 [Jeremy Kemper]
1963
+
1964
+ * Oracle: active? check pings the database rather than testing the last command status. #428 [Michael Schoen]
1965
+
1966
+ * SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find. #2974 [kajism@yahoo.com]
1967
+
1968
+ * Reloading a model doesn't lose track of its connection. #2996 [junk@miriamtech.com, Jeremy Kemper]
1969
+
1970
+ * Fixed bug where using update_attribute after pushing a record to a habtm association of the object caused duplicate rows in the join table. #2888 [colman@rominato.com, Florian Weber, Michael Schoen]
1971
+
1972
+ * MySQL, PostgreSQL: reconnect! also reconfigures the connection. Otherwise, the connection 'loses' its settings if it times out and is reconnected. #2978 [Shugo Maeda]
1973
+
1974
+ * has_and_belongs_to_many: use JOIN instead of LEFT JOIN. [Jeremy Kemper]
1975
+
1976
+ * MySQL: introduce :encoding option to specify the character set for client, connection, and results. Only available for MySQL 4.1 and later with the mysql-ruby driver. Do SHOW CHARACTER SET in mysql client to see available encodings. #2975 [Shugo Maeda]
1977
+
1978
+ * Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases. [Marcel Molina Jr.]
1979
+
1980
+ * Correct boolean handling in generated reader methods. #2945 [don.park@gmail.com, Stefan Kaes]
1981
+
1982
+ * Don't generate read methods for columns whose names are not valid ruby method names. #2946 [Stefan Kaes]
1983
+
1984
+ * Document :force option to create_table. #2921 [Blair Zajac <blair@orcaware.com>]
1985
+
1986
+ * Don't add the same conditions twice in has_one finder sql. #2916 [Jeremy Evans]
1987
+
1988
+ * Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
1989
+
1990
+ * Introducing the Firebird adapter. Quote columns and use attribute_condition more consistently. Setup guide: http://wiki.rubyonrails.com/rails/pages/Firebird+Adapter #1874 [Ken Kunz <kennethkunz@gmail.com>]
1991
+
1992
+ * SQLServer: active? and reconnect! methods for handling stale connections. #428 [kajism@yahoo.com, Tom Ward <tom@popdog.net>]
1993
+
1994
+ * Associations handle case-equality more consistently: item.parts.is_a?(Array) and item.parts === Array. #1345 [MarkusQ@reality.com]
1995
+
1996
+ * SQLServer: insert uses given primary key value if not nil rather than SELECT @@IDENTITY. #2866 [kajism@yahoo.com, Tom Ward <tom@popdog.net>]
1997
+
1998
+ * Oracle: active? and reconnect! methods for handling stale connections. Optionally retry queries after reconnect. #428 [Michael Schoen <schoenm@earthlink.net>]
1999
+
2000
+ * Correct documentation for Base.delete_all. #1568 [Newhydra]
2001
+
2002
+ * Oracle: test case for column default parsing. #2788 [Michael Schoen <schoenm@earthlink.net>]
2003
+
2004
+ * Update documentation for Migrations. #2861 [Tom Werner <tom@cube6media.com>]
2005
+
2006
+ * When AbstractAdapter#log rescues an exception, attempt to detect and reconnect to an inactive database connection. Connection adapter must respond to the active? and reconnect! instance methods. Initial support for PostgreSQL, MySQL, and SQLite. Make certain that all statements which may need reconnection are performed within a logged block: for example, this means no avoiding log(sql, name) { } if @logger.nil? #428 [Jeremy Kemper]
2007
+
2008
+ * Oracle: Much faster column reflection. #2848 [Michael Schoen <schoenm@earthlink.net>]
2009
+
2010
+ * Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing). Base.define_attr_method allows nil values. [Jeremy Kemper]
2011
+
2012
+ * PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence. [Jeremy Kemper]
2013
+
2014
+ * PostgreSQL: correctly discover custom primary key sequences. #2594 [Blair Zajac <blair@orcaware.com>, meadow.nnick@gmail.com, Jeremy Kemper]
2015
+
2016
+ * SQLServer: don't report limits for unsupported field types. #2835 [Ryan Tomayko]
2017
+
2018
+ * Include the Enumerable module in ActiveRecord::Errors. [Rick Bradley <rick@rickbradley.com>]
2019
+
2020
+ * Add :group option, correspond to GROUP BY, to the find method and to the has_many association. #2818 [rubyonrails@atyp.de]
2021
+
2022
+ * Don't cast nil or empty strings to a dummy date. #2789 [Rick Bradley <rick@rickbradley.com>]
2023
+
2024
+ * acts_as_list plays nicely with inheritance by remembering the class which declared it. #2811 [rephorm@rephorm.com]
2025
+
2026
+ * Fix sqlite adaptor's detection of missing dbfile or database declaration. [Nicholas Seckar]
2027
+
2028
+ * Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz]
2029
+
2030
+ * Upgrade bundled ruby-mysql 0.2.4 with mysql411 shim (see #440) to ruby-mysql 0.2.6 with a patchset for 4.1 protocol support. Local change [301] is now a part of the main driver; reapplied local change [2182]. Removed GC.start from Result.free. [tommy@tmtm.org, akuroda@gmail.com, Doug Fales <doug.fales@gmail.com>, Jeremy Kemper]
2031
+
2032
+ * Correct handling of complex order clauses with SQL Server limit emulation. #2770 [Tom Ward <tom@popdog.net>, Matt B.]
2033
+
2034
+ * Correct whitespace problem in Oracle default column value parsing. #2788 [rick@rickbradley.com]
2035
+
2036
+ * Destroy associated has_and_belongs_to_many records after all before_destroy callbacks but before destroy. This allows you to act on the habtm association as you please while preserving referential integrity. #2065 [larrywilliams1@gmail.com, sam.kirchmeier@gmail.com, elliot@townx.org, Jeremy Kemper]
2037
+
2038
+ * Deprecate the old, confusing :exclusively_dependent option in favor of :dependent => :delete_all. [Jeremy Kemper]
2039
+
2040
+ * More compatible Oracle column reflection. #2771 [Ryan Davis <ryand-ruby@zenspider.com>, Michael Schoen <schoenm@earthlink.net>]
2041
+
2042
+
2043
+ *1.13.0* (November 7th, 2005)
2044
+
2045
+ * Fixed faulty regex in get_table_name method (SQLServerAdapter) #2639 [Ryan Tomayko]
2046
+
2047
+ * Added :include as an option for association declarations [DHH]. Example:
2048
+
2049
+ has_many :posts, :include => [ :author, :comments ]
2050
+
2051
+ * Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints. Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes. [Jeremy Kemper] Example:
2052
+
2053
+ Comment.with_scope(:find => { :conditions => 'active=true' }, :create => { :post_id => 5 }) do
2054
+ # Find where name = ? and active=true
2055
+ Comment.find :all, :conditions => ['name = ?', name]
2056
+ # Create comment associated with :post_id
2057
+ Comment.create :body => "Hello world"
2058
+ end
2059
+
2060
+ * Fixed that SQL Server should ignore :size declarations on anything but integer and string in the agnostic schema representation #2756 [Ryan Tomayko]
2061
+
2062
+ * Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]. Example:
2063
+
2064
+ Comment.constrain(:creation => { :post_id => 5 }) do
2065
+ # Associated with :post_id
2066
+ Comment.create :body => "Hello world"
2067
+ end
2068
+
2069
+ This is rarely used directly, but allows for find_or_create on associations. So you can do:
2070
+
2071
+ # If the tag doesn't exist, a new one is created that's associated with the person
2072
+ person.tags.find_or_create_by_name("Summer")
2073
+
2074
+ * Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH]. Example:
2075
+
2076
+ # No 'Summer' tag exists
2077
+ Tag.find_or_create_by_name("Summer") # equal to Tag.create(:name => "Summer")
2078
+
2079
+ # Now the 'Summer' tag does exist
2080
+ Tag.find_or_create_by_name("Summer") # equal to Tag.find_by_name("Summer")
2081
+
2082
+ * Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH]. Example:
2083
+
2084
+ class Account < ActiveRecord::Base
2085
+ has_many :people do
2086
+ def find_or_create_by_name(name)
2087
+ first_name, *last_name = name.split
2088
+ last_name = last_name.join " "
2089
+
2090
+ find_or_create_by_first_name_and_last_name(first_name, last_name)
2091
+ end
2092
+ end
2093
+ end
2094
+
2095
+ person = Account.find(:first).people.find_or_create_by_name("David Heinemeier Hansson")
2096
+ person.first_name # => "David"
2097
+ person.last_name # => "Heinemeier Hansson"
2098
+
2099
+ Note that the anoymous module must be declared using brackets, not do/end (due to order of evaluation).
2100
+
2101
+ * Omit internal dtproperties table from SQLServer table list. #2729 [rtomayko@gmail.com]
2102
+
2103
+ * Quote column names in generated SQL. #2728 [rtomayko@gmail.com]
2104
+
2105
+ * Correct the pure-Ruby MySQL 4.1.1 shim's version test. #2718 [Jeremy Kemper]
2106
+
2107
+ * Add Model.create! to match existing model.save! method. When save! raises RecordInvalid, you can catch the exception, retrieve the invalid record (invalid_exception.record), and see its errors (invalid_exception.record.errors). [Jeremy Kemper]
2108
+
2109
+ * Correct fixture behavior when table name pluralization is off. #2719 [Rick Bradley <rick@rickbradley.com>]
2110
+
2111
+ * Changed :dbfile to :database for SQLite adapter for consistency (old key still works as an alias) #2644 [Dan Peterson]
2112
+
2113
+ * Added migration support for Oracle #2647 [Michael Schoen]
2114
+
2115
+ * Worked around that connection can't be reset if allow_concurrency is off. #2648 [Michael Schoen <schoenm@earthlink.net>]
2116
+
2117
+ * Fixed SQL Server adapter to pass even more tests and do even better #2634 [rtomayko@gmail.com]
2118
+
2119
+ * Fixed SQL Server adapter so it honors options[:conditions] when applying :limits #1978 [Tom Ward]
2120
+
2121
+ * Added migration support to SQL Server adapter (please someone do the same for Oracle and DB2) #2625 [Tom Ward]
2122
+
2123
+ * Use AR::Base.silence rather than AR::Base.logger.silence in fixtures to preserve Log4r compatibility. #2618 [dansketcher@gmail.com]
2124
+
2125
+ * Constraints are cloned so they can't be inadvertently modified while they're
2126
+ in effect. Added :readonly finder constraint. Calling an association collection's class method (Part.foobar via item.parts.foobar) constrains :readonly => false since the collection's :joins constraint would otherwise force it to true. [Jeremy Kemper <rails@bitsweat.net>]
2127
+
2128
+ * Added :offset and :limit to the kinds of options that Base.constrain can use #2466 [duane.johnson@gmail.com]
2129
+
2130
+ * Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net]
2131
+
2132
+ * Added quoted_true and quoted_false methods and tables to db2_adapter and cleaned up tests for DB2 #2493, #2624 [maik schmidt]
2133
+
2134
+
2135
+ *1.12.2* (October 26th, 2005)
2136
+
2137
+ * Allow symbols to rename columns when using SQLite adapter. #2531 [kevin.clark@gmail.com]
2138
+
2139
+ * Map Active Record time to SQL TIME. #2575, #2576 [Robby Russell <robby@planetargon.com>]
2140
+
2141
+ * Clarify semantics of ActiveRecord::Base#respond_to? #2560 [skaes@web.de]
2142
+
2143
+ * Fixed Association#clear for associations which have not yet been accessed. #2524 [Patrick Lenz <patrick@lenz.sh>]
2144
+
2145
+ * HABTM finders shouldn't return readonly records. #2525 [Patrick Lenz <patrick@lenz.sh>]
2146
+
2147
+ * Make all tests runnable on their own. #2521. [Blair Zajac <blair@orcaware.com>]
2148
+
2149
+
2150
+ *1.12.1* (October 19th, 2005)
2151
+
2152
+ * Always parenthesize :conditions options so they may be safely combined with STI and constraints.
2153
+
2154
+ * Correct PostgreSQL primary key sequence detection. #2507 [tmornini@infomania.com]
2155
+
2156
+ * Added support for using limits in eager loads that involve has_many and has_and_belongs_to_many associations
2157
+
2158
+
2159
+ *1.12.0* (October 16th, 2005)
2160
+
2161
+ * Update/clean up documentation (rdoc)
2162
+
2163
+ * PostgreSQL sequence support. Use set_sequence_name in your model class to specify its primary key sequence. #2292 [Rick Olson <technoweenie@gmail.com>, Robby Russell <robby@planetargon.com>]
2164
+
2165
+ * Change default logging colors to work on both white and black backgrounds. [Sam Stephenson]
2166
+
2167
+ * YAML fixtures support ordered hashes for fixtures with foreign key dependencies in the same table. #1896 [purestorm@ggnore.net]
2168
+
2169
+ * :dependent now accepts :nullify option. Sets the foreign key of the related objects to NULL instead of deleting them. #2015 [Robby Russell <robby@planetargon.com>]
2170
+
2171
+ * Introduce read-only records. If you call object.readonly! then it will mark the object as read-only and raise ReadOnlyRecord if you call object.save. object.readonly? reports whether the object is read-only. Passing :readonly => true to any finder method will mark returned records as read-only. The :joins option now implies :readonly, so if you use this option, saving the same record will now fail. Use find_by_sql to work around.
2172
+
2173
+ * Avoid memleak in dev mode when using fcgi
2174
+
2175
+ * Simplified .clear on active record associations by using the existing delete_records method. #1906 [Caleb <me@cpb.ca>]
2176
+
2177
+ * Delegate access to a customized primary key to the conventional id method. #2444. [Blair Zajac <blair@orcaware.com>]
2178
+
2179
+ * Fix errors caused by assigning a has-one or belongs-to property to itself
2180
+
2181
+ * Add ActiveRecord::Base.schema_format setting which specifies how databases should be dumped [Sam Stephenson]
2182
+
2183
+ * Update DB2 adapter. #2206. [contact@maik-schmidt.de]
2184
+
2185
+ * Corrections to SQLServer native data types. #2267. [rails.20.clarry@spamgourmet.com]
2186
+
2187
+ * Deprecated ActiveRecord::Base.threaded_connection in favor of ActiveRecord::Base.allow_concurrency.
2188
+
2189
+ * Protect id attribute from mass assigment even when the primary key is set to something else. #2438. [Blair Zajac <blair@orcaware.com>]
2190
+
2191
+ * Misc doc fixes (typos/grammar/etc.). #2430. [coffee2code]
2192
+
2193
+ * Add test coverage for content_columns. #2432. [coffee2code]
2194
+
2195
+ * Speed up for unthreaded environments. #2431. [skaes@web.de]
2196
+
2197
+ * Optimization for Mysql selects using mysql-ruby extension greater than 2.6.3. #2426. [skaes@web.de]
2198
+
2199
+ * Speed up the setting of table_name. #2428. [skaes@web.de]
2200
+
2201
+ * Optimize instantiation of STI subclass records. In partial fullfilment of #1236. [skaes@web.de]
2202
+
2203
+ * Fix typo of 'constrains' to 'contraints'. #2069. [Michael Schuerig <michael@schuerig.de>]
2204
+
2205
+ * Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236. [skaes@web.de]
2206
+
2207
+ * Add ability to get all siblings, including the current child, with acts_as_tree. Recloses #2140. [Michael Schuerig <michael@schuerig.de>]
2208
+
2209
+ * Add geometric type for postgresql adapter. #2233 [akaspick@gmail.com]
2210
+
2211
+ * Add option (true by default) to generate reader methods for each attribute of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. [skaes@web.de]
2212
+
2213
+ * Add convenience predicate methods on Column class. In partial fullfilment of #1236. [skaes@web.de]
2214
+
2215
+ * Raise errors when invalid hash keys are passed to ActiveRecord::Base.find. #2363 [Chad Fowler <chad@chadfowler.com>, Nicholas Seckar]
2216
+
2217
+ * Added :force option to create_table that'll try to drop the table if it already exists before creating
2218
+
2219
+ * Fix transactions so that calling return while inside a transaction will not leave an open transaction on the connection. [Nicholas Seckar]
2220
+
2221
+ * Use foreign_key inflection uniformly. #2156 [Blair Zajac <blair@orcaware.com>]
2222
+
2223
+ * model.association.clear should destroy associated objects if :dependent => true instead of nullifying their foreign keys. #2221 [joergd@pobox.com, ObieFernandez <obiefernandez@gmail.com>]
2224
+
2225
+ * Returning false from before_destroy should cancel the action. #1829 [Jeremy Huffman]
2226
+
2227
+ * Recognize PostgreSQL NOW() default as equivalent to CURRENT_TIMESTAMP or CURRENT_DATE, depending on the column's type. #2256 [mat <mat@absolight.fr>]
2228
+
2229
+ * Extensive documentation for the abstract database adapter. #2250 [François Beausoleil <fbeausoleil@ftml.net>]
2230
+
2231
+ * Clean up Fixtures.reset_sequences for PostgreSQL. Handle tables with no rows and models with custom primary keys. #2174, #2183 [jay@jay.fm, Blair Zajac <blair@orcaware.com>]
2232
+
2233
+ * Improve error message when nil is assigned to an attr which validates_size_of within a range. #2022 [Manuel Holtgrewe <purestorm@ggnore.net>]
2234
+
2235
+ * Make update_attribute use the same writer method that update_attributes uses.
2236
+ #2237 [trevor@protocool.com]
2237
+
2238
+ * Make migrations honor table name prefixes and suffixes. #2298 [Jakob S, Marcel Molina]
2239
+
2240
+ * Correct and optimize PostgreSQL bytea escaping. #1745, #1837 [dave@cherryville.org, ken@miriamtech.com, bellis@deepthought.org]
2241
+
2242
+ * Fixtures should only reset a PostgreSQL sequence if it corresponds to an integer primary key named id. #1749 [chris@chrisbrinker.com]
2243
+
2244
+ * Standardize the interpretation of boolean columns in the Mysql and Sqlite adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior)
2245
+
2246
+ * Added new symbol-driven approach to activating observers with Base#observers= [DHH]. Example:
2247
+
2248
+ ActiveRecord::Base.observers = :cacher, :garbage_collector
2249
+
2250
+ * Added AbstractAdapter#select_value and AbstractAdapter#select_values as convenience methods for selecting single values, instead of hashes, of the first column in a SELECT #2283 [solo@gatelys.com]
2251
+
2252
+ * Wrap :conditions in parentheses to prevent problems with OR's #1871 [Jamis Buck]
2253
+
2254
+ * Allow the postgresql adapter to work with the SchemaDumper. [Jamis Buck]
2255
+
2256
+ * Add ActiveRecord::SchemaDumper for dumping a DB schema to a pure-ruby file, making it easier to consolidate large migration lists and port database schemas between databases. [Jamis Buck]
2257
+
2258
+ * Fixed migrations for Windows when using more than 10 [David Naseby]
2259
+
2260
+ * Fixed that the create_x method from belongs_to wouldn't save the association properly #2042 [Florian Weber]
2261
+
2262
+ * Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Luetke]
2263
+
2264
+ * Improved migrations' behavior when the schema_info table is empty. [Nicholas Seckar]
2265
+
2266
+ * Fixed that Observers didn't observe sub-classes #627 [Florian Weber]
2267
+
2268
+ * Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina]
2269
+
2270
+ * Added check for RAILS_CONNECTION_ADAPTERS on startup and only load the connection adapters specified within if its present (available in Rails through config.connection_adapters using the new config) #1958 [skae]
2271
+
2272
+ * Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber]
2273
+
2274
+ * Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net]
2275
+
2276
+ * Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com]
2277
+
2278
+ * Fixed comparison of Active Record objects so two new objects are not equal #2099 [deberg]
2279
+
2280
+ * Fixed that the SQL Server adapter would sometimes return DBI::Timestamp objects instead of Time #2127 [Tom Ward]
2281
+
2282
+ * Added the instance methods #root and #ancestors on acts_as_tree and fixed siblings to not include the current node #2142, #2140 [coffee2code]
2283
+
2284
+ * Fixed that Active Record would call SHOW FIELDS twice (or more) for the same model when the cached results were available #1947 [sd@notso.net]
2285
+
2286
+ * Added log_level and use_silence parameter to ActiveRecord::Base.benchmark. The first controls at what level the benchmark statement will be logged (now as debug, instead of info) and the second that can be passed false to include all logging statements during the benchmark block/
2287
+
2288
+ * Make sure the schema_info table is created before querying the current version #1903
2289
+
2290
+ * Fixtures ignore table name prefix and suffix #1987 [Jakob S]
2291
+
2292
+ * Add documentation for index_type argument to add_index method for migrations #2005 [blaine@odeo.com]
2293
+
2294
+ * Modify read_attribute to allow a symbol argument #2024 [Ken Kunz]
2295
+
2296
+ * Make destroy return self #1913 [sebastian.kanthak@muehlheim.de]
2297
+
2298
+ * Fix typo in validations documentation #1938 [court3nay]
2299
+
2300
+ * Make acts_as_list work for insert_at(1) #1966 [hensleyl@papermountain.org]
2301
+
2302
+ * Fix typo in count_by_sql documentation #1969 [Alexey Verkhovsky]
2303
+
2304
+ * Allow add_column and create_table to specify NOT NULL #1712 [emptysands@gmail.com]
2305
+
2306
+ * Fix create_table so that id column is implicitly added [Rick Olson]
2307
+
2308
+ * Default sequence names for Oracle changed to #{table_name}_seq, which is the most commonly used standard. In addition, a new method ActiveRecord::Base#set_sequence_name allows the developer to set the sequence name per model. This is a non-backwards-compatible change -- anyone using the old-style "rails_sequence" will need to either create new sequences, or set: ActiveRecord::Base.set_sequence_name = "rails_sequence" #1798
2309
+
2310
+ * OCIAdapter now properly handles synonyms, which are commonly used to separate out the schema owner from the application user #1798
2311
+
2312
+ * Fixed the handling of camelCase columns names in Oracle #1798
2313
+
2314
+ * Implemented for OCI the Rakefile tasks of :clone_structure_to_test, :db_structure_dump, and :purge_test_database, which enable Oracle folks to enjoy all the agile goodness of Rails for testing. Note that the current implementation is fairly limited -- only tables and sequences are cloned, not constraints or indexes. A full clone in Oracle generally requires some manual effort, and is version-specific. Post 9i, Oracle recommends the use of the DBMS_METADATA package, though that approach requires editing of the physical characteristics generated #1798
2315
+
2316
+ * Fixed the handling of multiple blob columns in Oracle if one or more of them are null #1798
2317
+
2318
+ * Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke]
2319
+
2320
+ class Comment < AR:B
2321
+ def self.search(q)
2322
+ find(:all, :conditions => ["body = ?", q])
2323
+ end
2324
+ end
2325
+
2326
+ class Post < AR:B
2327
+ has_many :comments
2328
+ end
2329
+
2330
+ Post.find(1).comments.search('hi') # => SELECT * from comments WHERE post_id = 1 AND body = 'hi'
2331
+
2332
+ NOTICE: This patch changes the underlying SQL generated by has_and_belongs_to_many queries. If your relying on that, such as
2333
+ by explicitly referencing the old t and j aliases, you'll need to update your code. Of course, you _shouldn't_ be relying on
2334
+ details like that no less than you should be diving in to touch private variables. But just in case you do, consider yourself
2335
+ noticed :)
2336
+
2337
+ * Added migration support for SQLite (using temporary tables to simulate ALTER TABLE) #1771 [Sam Stephenson]
2338
+
2339
+ * Remove extra definition of supports_migrations? from abstract_adaptor.rb [Nicholas Seckar]
2340
+
2341
+ * Fix acts_as_list so that moving next-to-last item to the bottom does not result in duplicate item positions
2342
+
2343
+ * Fixed incompatibility in DB2 adapter with the new limit/offset approach #1718 [Maik Schmidt]
2344
+
2345
+ * Added :select option to find which can specify a different value than the default *, like find(:all, :select => "first_name, last_name"), if you either only want to select part of the columns or exclude columns otherwise included from a join #1338 [Stefan Kaes]
2346
+
2347
+
2348
+ *1.11.1* (11 July, 2005)
2349
+
2350
+ * Added support for limit and offset with eager loading of has_one and belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen]
2351
+
2352
+ * Fixed that assume_bottom_position (in acts_as_list) could be called on items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com]
2353
+
2354
+ * Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson]
2355
+
2356
+ * Correct reflected table name for singular associations. #1688 [court3nay@gmail.com]
2357
+
2358
+ * Fixed optimistic locking with SQL Server #1660 [tom@popdog.net]
2359
+
2360
+ * Added ActiveRecord::Migrator.migrate that can figure out whether to go up or down based on the target version and the current
2361
+
2362
+ * Added better error message for "packets out of order" #1630 [courtenay]
2363
+
2364
+ * Fixed first run of "rake migrate" on PostgreSQL by not expecting a return value on the id #1640
2365
+
2366
+
2367
+ *1.11.0* (6 July, 2005)
2368
+
2369
+ * Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas Seckar]
2370
+
2371
+ * Changed logging of SQL statements to use the DEBUG level instead of INFO
2372
+
2373
+ * Added new Migrations framework for describing schema transformations in a way that can be easily applied across multiple databases #1604 [Tobias Luetke] See documentation under ActiveRecord::Migration and the additional support in the Rails rakefile/generator.
2374
+
2375
+ * Added callback hooks to association collections #1549 [Florian Weber]. Example:
2376
+
2377
+ class Project
2378
+ has_and_belongs_to_many :developers, :before_add => :evaluate_velocity
2379
+
2380
+ def evaluate_velocity(developer)
2381
+ ...
2382
+ end
2383
+ end
2384
+
2385
+ ..raising an exception will cause the object not to be added (or removed, with before_remove).
2386
+
2387
+
2388
+ * Fixed Base.content_columns call for SQL Server adapter #1450 [DeLynn Berry]
2389
+
2390
+ * Fixed Base#write_attribute to work with both symbols and strings #1190 [Paul Legato]
2391
+
2392
+ * Fixed that has_and_belongs_to_many didn't respect single table inheritance types #1081 [Florian Weber]
2393
+
2394
+ * Speed up ActiveRecord#method_missing for the common case (read_attribute).
2395
+
2396
+ * Only notify observers on after_find and after_initialize if these methods are defined on the model. #1235 [skaes@web.de]
2397
+
2398
+ * Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath]
2399
+
2400
+ * Fixed validates_numericality_of to work with overrided getter-method when :allow_nil is on #1316 [raidel@onemail.at]
2401
+
2402
+ * Added roots, root, and siblings to the batch of methods added by acts_as_tree #1541 [michael@schuerig.de]
2403
+
2404
+ * Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry]
2405
+
2406
+ * Added support for ODBC connections to MS SQL Server so you can connect from a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry]
2407
+
2408
+ * Fixed that multiparameter posts ignored attr_protected #1532 [alec+rails@veryclever.net]
2409
+
2410
+ * Fixed problem with eager loading when using a has_and_belongs_to_many association using :association_foreign_key #1504 [flash@vanklinkenbergsoftware.nl]
2411
+
2412
+ * Fixed Base#find to honor the documentation on how :joins work and make them consistent with Base#count #1405 [pritchie@gmail.com]. What used to be:
2413
+
2414
+ Developer.find :all, :joins => 'developers_projects', :conditions => 'id=developer_id AND project_id=1'
2415
+
2416
+ ...should instead be:
2417
+
2418
+ Developer.find(
2419
+ :all,
2420
+ :joins => 'LEFT JOIN developers_projects ON developers.id = developers_projects.developer_id',
2421
+ :conditions => 'project_id=1'
2422
+ )
2423
+
2424
+ * Fixed that validations didn't respecting custom setting for too_short, too_long messages #1437 [Marcel Molina]
2425
+
2426
+ * Fixed that clear_association_cache doesn't delete new associations on new records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon]
2427
+
2428
+ * Fixed that calling Model.find([]) returns [] and doesn't throw an exception #1379
2429
+
2430
+ * Fixed that adding a record to a has_and_belongs_to collection would always save it -- now it only saves if its a new record #1203 [Alisdair McDiarmid]
2431
+
2432
+ * Fixed saving of in-memory association structures to happen as a after_create/after_update callback instead of after_save -- that way you can add new associations in after_create/after_update callbacks without getting them saved twice
2433
+
2434
+ * Allow any Enumerable, not just Array, to work as bind variables #1344 [Jeremy Kemper]
2435
+
2436
+ * Added actual database-changing behavior to collection assigment for has_many and has_and_belongs_to_many #1425 [Sebastian Kanthak].
2437
+ Example:
2438
+
2439
+ david.projects = [Project.find(1), Project.new("name" => "ActionWebSearch")]
2440
+ david.save
2441
+
2442
+ If david.projects already contain the project with ID 1, this is left unchanged. Any other projects are dropped. And the new
2443
+ project is saved when david.save is called.
2444
+
2445
+ Also included is a way to do assignments through IDs, which is perfect for checkbox updating, so you get to do:
2446
+
2447
+ david.project_ids = [1, 5, 7]
2448
+
2449
+ * Corrected typo in find SQL for has_and_belongs_to_many. #1312 [ben@bensinclair.com]
2450
+
2451
+ * Fixed sanitized conditions for has_many finder method. #1281 [jackc@hylesanderson.com, pragdave, Tobias Luetke]
2452
+
2453
+ * Comprehensive PostgreSQL schema support. Use the optional schema_search_path directive in database.yml to give a comma-separated list of schemas to search for your tables. This allows you, for example, to have tables in a shared schema without having to use a custom table name. See http://www.postgresql.org/docs/8.0/interactive/ddl-schemas.html to learn more. #827 [dave@cherryville.org]
2454
+
2455
+ * Corrected @@configurations typo #1410 [david@ruppconsulting.com]
2456
+
2457
+ * Return PostgreSQL columns in the order they were declared #1374 [perlguy@gmail.com]
2458
+
2459
+ * Allow before/after update hooks to work on models using optimistic locking
2460
+
2461
+ * Eager loading of dependent has_one associations won't delete the association #1212
2462
+
2463
+ * Added a second parameter to the build and create method for has_one that controls whether the existing association should be replaced (which means nullifying its foreign key as well). By default this is true, but false can be passed to prevent it.
2464
+
2465
+ * Using transactional fixtures now causes the data to be loaded only once.
2466
+
2467
+ * Added fixture accessor methods that can be used when instantiated fixtures are disabled.
2468
+
2469
+ fixtures :web_sites
2470
+
2471
+ def test_something
2472
+ assert_equal "Ruby on Rails", web_sites(:rubyonrails).name
2473
+ end
2474
+
2475
+ * Added DoubleRenderError exception that'll be raised if render* is called twice #518 [Nicholas Seckar]
2476
+
2477
+ * Fixed exceptions occuring after render has been called #1096 [Nicholas Seckar]
2478
+
2479
+ * CHANGED: validates_presence_of now uses Errors#add_on_blank, which will make " " fail the validation where it didn't before #1309
2480
+
2481
+ * Added Errors#add_on_blank which works like Errors#add_on_empty, but uses Object#blank? instead
2482
+
2483
+ * Added the :if option to all validations that can either use a block or a method pointer to determine whether the validation should be run or not. #1324 [Duane Johnson/jhosteny]. Examples:
2484
+
2485
+ Conditional validations such as the following are made possible:
2486
+ validates_numericality_of :income, :if => :employed?
2487
+
2488
+ Conditional validations can also solve the salted login generator problem:
2489
+ validates_confirmation_of :password, :if => :new_password?
2490
+
2491
+ Using blocks:
2492
+ validates_presence_of :username, :if => Proc.new { |user| user.signup_step > 1 }
2493
+
2494
+ * Fixed use of construct_finder_sql when using :join #1288 [dwlt@dwlt.net]
2495
+
2496
+ * Fixed that :delete_sql in has_and_belongs_to_many associations couldn't access record properties #1299 [Rick Olson]
2497
+
2498
+ * Fixed that clone would break when an aggregate had the same name as one of its attributes #1307 [Jeremy Kemper]
2499
+
2500
+ * Changed that destroying an object will only freeze the attributes hash, which keeps the object from having attributes changed (as that wouldn't make sense), but allows for the querying of associations after it has been destroyed.
2501
+
2502
+ * Changed the callbacks such that observers are notified before the in-object callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first.
2503
+
2504
+ * Added option for passing an array to the find_all version of the dynamic finders and have it evaluated as an IN fragment. Example:
2505
+
2506
+ # SELECT * FROM topics WHERE title IN ('First', 'Second')
2507
+ Topic.find_all_by_title(["First", "Second"])
2508
+
2509
+ * Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor]
2510
+
2511
+ * Fixed extraneous comma in count() function that made it not work with joins #1156 [jarkko/Dee.Zsombor]
2512
+
2513
+ * Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid]
2514
+
2515
+ * Fixed that validate_length_of lost :on option when :within was specified #1195 [jhosteny@mac.com]
2516
+
2517
+ * Added encoding and min_messages options for PostgreSQL #1205 [shugo]. Configuration example:
2518
+
2519
+ development:
2520
+ adapter: postgresql
2521
+ database: rails_development
2522
+ host: localhost
2523
+ username: postgres
2524
+ password:
2525
+ encoding: UTF8
2526
+ min_messages: ERROR
2527
+
2528
+ * Fixed acts_as_list where deleting an item that was removed from the list would ruin the positioning of other list items #1197 [Jamis Buck]
2529
+
2530
+ * Added validates_exclusion_of as a negative of validates_inclusion_of
2531
+
2532
+ * Optimized counting of has_many associations by setting the association to empty if the count is 0 so repeated calls doesn't trigger database calls
2533
+
2534
+
2535
+ *1.10.1* (20th April, 2005)
2536
+
2537
+ * Fixed frivilous database queries being triggered with eager loading on empty associations and other things
2538
+
2539
+ * Fixed order of loading in eager associations
2540
+
2541
+ * Fixed stray comma when using eager loading and ordering together from has_many associations #1143
2542
+
2543
+
2544
+ *1.10.0* (19th April, 2005)
2545
+
2546
+ * Added eager loading of associations as a way to solve the N+1 problem more gracefully without piggy-back queries. Example:
2547
+
2548
+ for post in Post.find(:all, :limit => 100)
2549
+ puts "Post: " + post.title
2550
+ puts "Written by: " + post.author.name
2551
+ puts "Last comment on: " + post.comments.first.created_on
2552
+ end
2553
+
2554
+ This used to generate 301 database queries if all 100 posts had both author and comments. It can now be written as:
2555
+
2556
+ for post in Post.find(:all, :limit => 100, :include => [ :author, :comments ])
2557
+
2558
+ ...and the number of database queries needed is now 1.
2559
+
2560
+ * Added new unified Base.find API and deprecated the use of find_first and find_all. See the documentation for Base.find. Examples:
2561
+
2562
+ Person.find(1, :conditions => "administrator = 1", :order => "created_on DESC")
2563
+ Person.find(1, 5, 6, :conditions => "administrator = 1", :order => "created_on DESC")
2564
+ Person.find(:first, :order => "created_on DESC", :offset => 5)
2565
+ Person.find(:all, :conditions => [ "category IN (?)", categories], :limit => 50)
2566
+ Person.find(:all, :offset => 10, :limit => 10)
2567
+
2568
+ * Added acts_as_nested_set #1000 [wschenk]. Introduction:
2569
+
2570
+ This acts provides Nested Set functionality. Nested Set is similiar to Tree, but with
2571
+ the added feature that you can select the children and all of it's descendants with
2572
+ a single query. A good use case for this is a threaded post system, where you want
2573
+ to display every reply to a comment without multiple selects.
2574
+
2575
+ * Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [After much pestering from Dave Thomas]
2576
+
2577
+ * Fixed PostgreSQL usage of fixtures with regards to public schemas and table names with dots #962 [gnuman1@gmail.com]
2578
+
2579
+ * Fixed that fixtures were being deleted in the same order as inserts causing FK errors #890 [andrew.john.peters@gmail.com]
2580
+
2581
+ * Fixed loading of fixtures in to be in the right order (or PostgreSQL would bark) #1047 [stephenh@chase3000.com]
2582
+
2583
+ * Fixed page caching for non-vhost applications living underneath the root #1004 [Ben Schumacher]
2584
+
2585
+ * Fixes a problem with the SQL Adapter which was resulting in IDENTITY_INSERT not being set to ON when it should be #1104 [adelle]
2586
+
2587
+ * Added the option to specify the acceptance string in validates_acceptance_of #1106 [caleb@aei-tech.com]
2588
+
2589
+ * Added insert_at(position) to acts_as_list #1083 [DeLynnB]
2590
+
2591
+ * Removed the default order by id on has_and_belongs_to_many queries as it could kill performance on large sets (you can still specify by hand with :order)
2592
+
2593
+ * Fixed that Base.silence should restore the old logger level when done, not just set it to DEBUG #1084 [yon@milliped.com]
2594
+
2595
+ * Fixed boolean saving on Oracle #1093 [mparrish@pearware.org]
2596
+
2597
+ * Moved build_association and create_association for has_one and belongs_to out of deprecation as they work when the association is nil unlike association.build and association.create, which require the association to be already in place #864
2598
+
2599
+ * Added rollbacks of transactions if they're active as the dispatcher is killed gracefully (TERM signal) #1054 [Leon Bredt]
2600
+
2601
+ * Added quoting of column names for fixtures #997 [jcfischer@gmail.com]
2602
+
2603
+ * Fixed counter_sql when no records exist in database for PostgreSQL (would give error, not 0) #1039 [Caleb Tennis]
2604
+
2605
+ * Fixed that benchmarking times for rendering included db runtimes #987 [skaes@web.de]
2606
+
2607
+ * Fixed boolean queries for t/f fields in PostgreSQL #995 [dave@cherryville.org]
2608
+
2609
+ * Added that model.items.delete(child) will delete the child, not just set the foreign key to nil, if the child is dependent on the model #978 [Jeremy Kemper]
2610
+
2611
+ * Fixed auto-stamping of dates (created_on/updated_on) for PostgreSQL #985 [dave@cherryville.org]
2612
+
2613
+ * Fixed Base.silence/benchmark to only log if a logger has been configured #986 [skaes@web.de]
2614
+
2615
+ * Added a join parameter as the third argument to Base.find_first and as the second to Base.count #426, #988 [skaes@web.de]
2616
+
2617
+ * Fixed bug in Base#hash method that would treat records with the same string-based id as different [Dave Thomas]
2618
+
2619
+ * Renamed DateHelper#distance_of_time_in_words_to_now to DateHelper#time_ago_in_words (old method name is still available as a deprecated alias)
2620
+
2621
+
2622
+ *1.9.1* (27th March, 2005)
2623
+
2624
+ * Fixed that Active Record objects with float attribute could not be cloned #808
2625
+
2626
+ * Fixed that MissingSourceFile's wasn't properly detected in production mode #925 [Nicholas Seckar]
2627
+
2628
+ * Fixed that :counter_cache option would look for a line_items_count column for a LineItem object instead of lineitems_count
2629
+
2630
+ * Fixed that AR exists?() would explode on postgresql if the passed id did not match the PK type #900 [Scott Barron]
2631
+
2632
+ * Fixed the MS SQL adapter to work with the new limit/offset approach and with binary data (still suffering from 7KB limit, though) #901 [delynnb]
2633
+
2634
+
2635
+ *1.9.0* (22th March, 2005)
2636
+
2637
+ * Added adapter independent limit clause as a two-element array with the first being the limit, the second being the offset #795 [Sam Stephenson]. Example:
2638
+
2639
+ Developer.find_all nil, 'id ASC', 5 # return the first five developers
2640
+ Developer.find_all nil, 'id ASC', [3, 8] # return three developers, starting from #8 and forward
2641
+
2642
+ This doesn't yet work with the DB2 or MS SQL adapters. Patches to make that happen are encouraged.
2643
+
2644
+ * Added alias_method :to_param, :id to Base, such that Active Record objects to be used as URL parameters in Action Pack automatically #812 [Nicholas Seckar/Sam Stephenson]
2645
+
2646
+ * Improved the performance of the OCI8 adapter for Oracle #723 [pilx/gjenkins]
2647
+
2648
+ * Added type conversion before saving a record, so string-based values like "10.0" aren't left for the database to convert #820 [dave@cherryville.org]
2649
+
2650
+ * Added with additional settings for working with transactional fixtures and pre-loaded test databases #865 [mindel]
2651
+
2652
+ * Fixed acts_as_list to trigger remove_from_list on destroy after the fact, not before, so a unique position can be maintained #871 [Alisdair McDiarmid]
2653
+
2654
+ * Added the possibility of specifying fixtures in multiple calls #816 [kim@tinker.com]
2655
+
2656
+ * Added Base.exists?(id) that'll return true if an object of the class with the given id exists #854 [stian@grytoyr.net]
2657
+
2658
+ * Added optionally allow for nil or empty strings with validates_numericality_of #801 [Sebastian Kanthak]
2659
+
2660
+ * Fixed problem with using slashes in validates_format_of regular expressions #801 [Sebastian Kanthak]
2661
+
2662
+ * Fixed that SQLite3 exceptions are caught and reported properly #823 [yerejm]
2663
+
2664
+ * Added that all types of after_find/after_initialized callbacks are triggered if the explicit implementation is present, not only the explicit implementation itself
2665
+
2666
+ * Fixed that symbols can be used on attribute assignment, like page.emails.create(:subject => data.subject, :body => data.body)
2667
+
2668
+
2669
+ *1.8.0* (7th March, 2005)
2670
+
2671
+ * Added ActiveRecord::Base.colorize_logging to control whether to use colors in logs or not (on by default)
2672
+
2673
+ * Added support for timestamp with time zone in PostgreSQL #560 [Scott Barron]
2674
+
2675
+ * Added MultiparameterAssignmentErrors and AttributeAssignmentError exceptions #777 [demetrius]. Documentation:
2676
+
2677
+ * +MultiparameterAssignmentErrors+ -- collection of errors that occurred during a mass assignment using the
2678
+ +attributes=+ method. The +errors+ property of this exception contains an array of +AttributeAssignmentError+
2679
+ objects that should be inspected to determine which attributes triggered the errors.
2680
+ * +AttributeAssignmentError+ -- an error occurred while doing a mass assignment through the +attributes=+ method.
2681
+ You can inspect the +attribute+ property of the exception object to determine which attribute triggered the error.
2682
+
2683
+ * Fixed that postgresql adapter would fails when reading bytea fields with null value #771 [rodrigo k]
2684
+
2685
+ * Added transactional fixtures that uses rollback to undo changes to fixtures instead of DELETE/INSERT -- it's much faster. See documentation under Fixtures #760 [Jeremy Kemper]
2686
+
2687
+ * Added destruction of dependent objects in has_one associations when a new assignment happens #742 [mindel]. Example:
2688
+
2689
+ class Account < ActiveRecord::Base
2690
+ has_one :credit_card, :dependent => true
2691
+ end
2692
+ class CreditCard < ActiveRecord::Base
2693
+ belongs_to :account
2694
+ end
2695
+
2696
+ account.credit_card # => returns existing credit card, lets say id = 12
2697
+ account.credit_card = CreditCard.create("number" => "123")
2698
+ account.save # => CC with id = 12 is destroyed
2699
+
2700
+
2701
+ * Added validates_numericality_of #716 [skanthak/c.r.mcgrath]. Docuemntation:
2702
+
2703
+ Validates whether the value of the specified attribute is numeric by trying to convert it to
2704
+ a float with Kernel.Float (if <tt>integer</tt> is false) or applying it to the regular expression
2705
+ <tt>/^[\+\-]?\d+$/</tt> (if <tt>integer</tt> is set to true).
2706
+
2707
+ class Person < ActiveRecord::Base
2708
+ validates_numericality_of :value, :on => :create
2709
+ end
2710
+
2711
+ Configuration options:
2712
+ * <tt>message</tt> - A custom error message (default is: "is not a number")
2713
+ * <tt>on</tt> Specifies when this validation is active (default is :save, other options :create, :update)
2714
+ * <tt>only_integer</tt> Specifies whether the value has to be an integer, e.g. an integral value (default is false)
2715
+
2716
+
2717
+ * Fixed that HasManyAssociation#count was using :finder_sql rather than :counter_sql if it was available #445 [Scott Barron]
2718
+
2719
+ * Added better defaults for composed_of, so statements like composed_of :time_zone, :mapping => %w( time_zone time_zone ) can be written without the mapping part (it's now assumed)
2720
+
2721
+ * Added MacroReflection#macro which will return a symbol describing the macro used (like :composed_of or :has_many) #718, #248 [james@slashetc.com]
2722
+
2723
+
2724
+ *1.7.0* (24th February, 2005)
2725
+
2726
+ * Changed the auto-timestamping feature to use ActiveRecord::Base.default_timezone instead of entertaining the parallel ActiveRecord::Base.timestamps_gmt method. The latter is now deprecated and will throw a warning on use (but still work) #710 [Jamis Buck]
2727
+
2728
+ * Added a OCI8-based Oracle adapter that has been verified to work with Oracle 8 and 9 #629 [Graham Jenkins]. Usage notes:
2729
+
2730
+ 1. Key generation uses a sequence "rails_sequence" for all tables. (I couldn't find a simple
2731
+ and safe way of passing table-specific sequence information to the adapter.)
2732
+ 2. Oracle uses DATE or TIMESTAMP datatypes for both dates and times. Consequently I have had to
2733
+ resort to some hacks to get data converted to Date or Time in Ruby.
2734
+ If the column_name ends in _at (like created_at, updated_at) it's created as a Ruby Time. Else if the
2735
+ hours/minutes/seconds are 0, I make it a Ruby Date. Else it's a Ruby Time.
2736
+ This is nasty - but if you use Duck Typing you'll probably not care very much.
2737
+ In 9i it's tempting to map DATE to Date and TIMESTAMP to Time but I don't think that is
2738
+ valid - too many databases use DATE for both.
2739
+ Timezones and sub-second precision on timestamps are not supported.
2740
+ 3. Default values that are functions (such as "SYSDATE") are not supported. This is a
2741
+ restriction of the way active record supports default values.
2742
+ 4. Referential integrity constraints are not fully supported. Under at least
2743
+ some circumstances, active record appears to delete parent and child records out of
2744
+ sequence and out of transaction scope. (Or this may just be a problem of test setup.)
2745
+
2746
+ The OCI8 driver can be retrieved from http://rubyforge.org/projects/ruby-oci8/
2747
+
2748
+ * Added option :schema_order to the PostgreSQL adapter to support the use of multiple schemas per database #697 [YuriSchimke]
2749
+
2750
+ * Optimized the SQL used to generate has_and_belongs_to_many queries by listing the join table first #693 [yerejm]
2751
+
2752
+ * Fixed that when using validation macros with a custom message, if you happened to use single quotes in the message string you would get a parsing error #657 [tonka]
2753
+
2754
+ * Fixed that Active Record would throw Broken Pipe errors with FCGI when the MySQL connection timed out instead of reconnecting #428 [Nicholas Seckar]
2755
+
2756
+ * Added options to specify an SSL connection for MySQL. Define the following attributes in the connection config (config/database.yml in Rails) to use it: sslkey, sslcert, sslca, sslcapath, sslcipher. To use SSL with no client certs, just set :sslca = '/dev/null'. http://dev.mysql.com/doc/mysql/en/secure-connections.html #604 [daniel@nightrunner.com]
2757
+
2758
+ * Added automatic dropping/creating of test tables for running the unit tests on all databases #587 [adelle@bullet.net.au]
2759
+
2760
+ * Fixed that find_by_* would fail when column names had numbers #670 [demetrius]
2761
+
2762
+ * Fixed the SQL Server adapter on a bunch of issues #667 [DeLynn]
2763
+
2764
+ 1. Created a new columns method that is much cleaner.
2765
+ 2. Corrected a problem with the select and select_all methods
2766
+ that didn't account for the LIMIT clause being passed into raw SQL statements.
2767
+ 3. Implemented the string_to_time method in order to create proper instances of the time class.
2768
+ 4. Added logic to the simplified_type method that allows the database to specify the scale of float data.
2769
+ 5. Adjusted the quote_column_name to account for the fact that MS SQL is bothered by a forward slash in the data string.
2770
+
2771
+ * Fixed that the dynamic finder like find_all_by_something_boolean(false) didn't work #649 [lmarlow@yahoo.com]
2772
+
2773
+ * Added validates_each that validates each specified attribute against a block #610 [Jeremy Kemper]. Example:
2774
+
2775
+ class Person < ActiveRecord::Base
2776
+ validates_each :first_name, :last_name do |record, attr|
2777
+ record.errors.add attr, 'starts with z.' if attr[0] == ?z
2778
+ end
2779
+ end
2780
+
2781
+ * Added :allow_nil as an explicit option for validates_length_of, so unless that's set to true having the attribute as nil will also return an error if a range is specified as :within #610 [Jeremy Kemper]
2782
+
2783
+ * Added that validates_* now accept blocks to perform validations #618 [Tim Bates]. Example:
2784
+
2785
+ class Person < ActiveRecord::Base
2786
+ validate { |person| person.errors.add("title", "will never be valid") if SHOULD_NEVER_BE_VALID }
2787
+ end
2788
+
2789
+ * Addded validation for validate all the associated objects before declaring failure with validates_associated #618 [Tim Bates]
2790
+
2791
+ * Added keyword-style approach to defining the custom relational bindings #545 [Jamis Buck]. Example:
2792
+
2793
+ class Project < ActiveRecord::Base
2794
+ primary_key "sysid"
2795
+ table_name "XYZ_PROJECT"
2796
+ inheritance_column { original_inheritance_column + "_id" }
2797
+ end
2798
+
2799
+ * Fixed Base#clone for use with PostgreSQL #565 [hanson@surgery.wisc.edu]
2800
+
2801
+
2802
+ *1.6.0* (January 25th, 2005)
2803
+
2804
+ * Added that has_many association build and create methods can take arrays of record data like Base#create and Base#build to build/create multiple records at once.
2805
+
2806
+ * Added that Base#delete and Base#destroy both can take an array of ids to delete/destroy #336
2807
+
2808
+ * Added the option of supplying an array of attributes to Base#create, so that multiple records can be created at once.
2809
+
2810
+ * Added the option of supplying an array of ids and attributes to Base#update, so that multiple records can be updated at once (inspired by #526/Duane Johnson). Example
2811
+
2812
+ people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy"} }
2813
+ Person.update(people.keys, people.values)
2814
+
2815
+ * Added ActiveRecord::Base.timestamps_gmt that can be set to true to make the automated timestamping use GMT instead of local time #520 [Scott Baron]
2816
+
2817
+ * Added that update_all calls sanitize_sql on its updates argument, so stuff like MyRecord.update_all(['time = ?', Time.now]) works #519 [notahat]
2818
+
2819
+ * Fixed that the dynamic finders didn't treat nil as a "IS NULL" but rather "= NULL" case #515 [Demetrius]
2820
+
2821
+ * Added bind-named arrays for interpolating a group of ids or strings in conditions #528 [Jeremy Kemper]
2822
+
2823
+ * Added that has_and_belongs_to_many associations with additional attributes also can be created between unsaved objects and only committed to the database when Base#save is called on the associator #524 [Eric Anderson]
2824
+
2825
+ * Fixed that records fetched with piggy-back attributes or through rich has_and_belongs_to_many associations couldn't be saved due to the extra attributes not part of the table #522 [Eric Anderson]
2826
+
2827
+ * Added mass-assignment protection for the inheritance column -- regardless of a custom column is used or not
2828
+
2829
+ * Fixed that association proxies would fail === tests like PremiumSubscription === @account.subscription
2830
+
2831
+ * Fixed that column aliases didn't work as expected with the new MySql411 driver #507 [Demetrius]
2832
+
2833
+ * Fixed that find_all would produce invalid sql when called sequentialy #490 [Scott Baron]
2834
+
2835
+
2836
+ *1.5.1* (January 18th, 2005)
2837
+
2838
+ * Fixed that the belongs_to and has_one proxy would fail a test like 'if project.manager' -- this unfortunately also means that you can't call methods like project.manager.build unless there already is a manager on the project #492 [Tim Bates]
2839
+
2840
+ * Fixed that the Ruby/MySQL adapter wouldn't connect if the password was empty #503 [Pelle]
2841
+
2842
+
2843
+ *1.5.0* (January 17th, 2005)
2844
+
2845
+ * Fixed that unit tests for MySQL are now run as the "rails" user instead of root #455 [Eric Hodel]
2846
+
2847
+ * Added validates_associated that enables validation of objects in an unsaved association #398 [Tim Bates]. Example:
2848
+
2849
+ class Book < ActiveRecord::Base
2850
+ has_many :pages
2851
+ belongs_to :library
2852
+
2853
+ validates_associated :pages, :library
2854
+ end
2855
+
2856
+ * Added support for associating unsaved objects #402 [Tim Bates]. Rules that govern this addition:
2857
+
2858
+ == Unsaved objects and associations
2859
+
2860
+ You can manipulate objects and associations before they are saved to the database, but there is some special behaviour you should be
2861
+ aware of, mostly involving the saving of associated objects.
2862
+
2863
+ === One-to-one associations
2864
+
2865
+ * Assigning an object to a has_one association automatically saves that object, and the object being replaced (if there is one), in
2866
+ order to update their primary keys - except if the parent object is unsaved (new_record? == true).
2867
+ * If either of these saves fail (due to one of the objects being invalid) the assignment statement returns false and the assignment
2868
+ is cancelled.
2869
+ * If you wish to assign an object to a has_one association without saving it, use the #association.build method (documented below).
2870
+ * Assigning an object to a belongs_to association does not save the object, since the foreign key field belongs on the parent. It does
2871
+ not save the parent either.
2872
+
2873
+ === Collections
2874
+
2875
+ * Adding an object to a collection (has_many or has_and_belongs_to_many) automatically saves that object, except if the parent object
2876
+ (the owner of the collection) is not yet stored in the database.
2877
+ * If saving any of the objects being added to a collection (via #push or similar) fails, then #push returns false.
2878
+ * You can add an object to a collection without automatically saving it by using the #collection.build method (documented below).
2879
+ * All unsaved (new_record? == true) members of the collection are automatically saved when the parent is saved.
2880
+
2881
+ * Added replace to associations, so you can do project.manager.replace(new_manager) or project.milestones.replace(new_milestones) #402 [Tim Bates]
2882
+
2883
+ * Added build and create methods to has_one and belongs_to associations, so you can now do project.manager.build(attributes) #402 [Tim Bates]
2884
+
2885
+ * Added that if a before_* callback returns false, all the later callbacks and the associated action are cancelled. If an after_* callback returns false, all the later callbacks are cancelled. Callbacks are generally run in the order they are defined, with the exception of callbacks defined as methods on the model, which are called last. #402 [Tim Bates]
2886
+
2887
+ * Fixed that Base#== wouldn't work for multiple references to the same unsaved object #402 [Tim Bates]
2888
+
2889
+ * Fixed binary support for PostgreSQL #444 [alex@byzantine.no]
2890
+
2891
+ * Added a differenciation between AssociationCollection#size and -length. Now AssociationCollection#size returns the size of the
2892
+ collection by executing a SELECT COUNT(*) query if the collection hasn't been loaded and calling collection.size if it has. If
2893
+ it's more likely than not that the collection does have a size larger than zero and you need to fetch that collection afterwards,
2894
+ it'll take one less SELECT query if you use length.
2895
+
2896
+ * Added Base#attributes that returns a hash of all the attributes with their names as keys and clones of their objects as values #433 [atyp.de]
2897
+
2898
+ * Fixed that foreign keys named the same as the association would cause stack overflow #437 [Eric Anderson]
2899
+
2900
+ * Fixed default scope of acts_as_list from "1" to "1 = 1", so it'll work in PostgreSQL (among other places) #427 [Alexey]
2901
+
2902
+ * Added Base#reload that reloads the attributes of an object from the database #422 [Andreas Schwarz]
2903
+
2904
+ * Added SQLite3 compatibility through the sqlite3-ruby adapter by Jamis Buck #381 [Jeremy Kemper]
2905
+
2906
+ * Added support for the new protocol spoken by MySQL 4.1.1+ servers for the Ruby/MySQL adapter that ships with Rails #440 [Matt Mower]
2907
+
2908
+ * Added that Observers can use the observes class method instead of overwriting self.observed_class().
2909
+
2910
+ Before:
2911
+ class ListSweeper < ActiveRecord::Base
2912
+ def self.observed_class() [ List, Item ]
2913
+ end
2914
+
2915
+ After:
2916
+ class ListSweeper < ActiveRecord::Base
2917
+ observes List, Item
2918
+ end
2919
+
2920
+ * Fixed that conditions in has_many and has_and_belongs_to_many should be interpolated just like the finder_sql is
2921
+
2922
+ * Fixed Base#update_attribute to be indifferent to whether a string or symbol is used to describe the name
2923
+
2924
+ * Added Base#toggle(attribute) and Base#toggle!(attribute) that makes it easier to flip a switch or flag.
2925
+
2926
+ Before: topic.update_attribute(:approved, !approved?)
2927
+ After : topic.toggle!(:approved)
2928
+
2929
+ * Added Base#increment!(attribute) and Base#decrement!(attribute) that also saves the records. Example:
2930
+
2931
+ page.views # => 1
2932
+ page.increment!(:views) # executes an UPDATE statement
2933
+ page.views # => 2
2934
+
2935
+ page.increment(:views).increment!(:views)
2936
+ page.views # => 4
2937
+
2938
+ * Added Base#increment(attribute) and Base#decrement(attribute) that encapsulates the += 1 and -= 1 patterns.
2939
+
2940
+
2941
+
2942
+
2943
+ *1.14.2* (April 9th, 2005)
494
2944
 
495
2945
  * Fixed calculations for the Oracle Adapter (closes #4626) [Michael Schoen]
496
2946