Permalink
Browse files

Merge commit 'rails/master'

  • Loading branch information...
2 parents fd3c55f + a94e7d7 commit 103b282130dd340143654801430aed787da4c9c6 @miloops miloops committed Jun 9, 2009
Showing with 1,118 additions and 881 deletions.
  1. +2 −1 actionmailer/Rakefile
  2. +3 −10 actionmailer/lib/action_mailer.rb
  3. +1 −1 actionmailer/lib/action_mailer/base.rb
  4. +1 −0 actionpack/Rakefile
  5. +10 −8 actionpack/lib/action_controller/abstract.rb
  6. +85 −34 actionpack/lib/action_controller/abstract/base.rb
  7. +10 −0 actionpack/lib/action_controller/abstract/benchmarker.rb
  8. +62 −18 actionpack/lib/action_controller/abstract/callbacks.rb
  9. +9 −0 actionpack/lib/action_controller/abstract/exceptions.rb
  10. +61 −8 actionpack/lib/action_controller/abstract/renderer.rb
  11. +3 −1 actionpack/lib/action_controller/base/http_authentication.rb
  12. +1 −1 actionpack/lib/action_controller/new_base/base.rb
  13. +2 −2 actionpack/lib/action_controller/routing/resources.rb
  14. +1 −0 actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
  15. +2 −0 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
  16. +1 −1 actionpack/lib/action_view/helpers.rb
  17. +2 −0 actionpack/lib/action_view/helpers/active_record_helper.rb
  18. +1 −1 actionpack/lib/action_view/helpers/benchmark_helper.rb
  19. +20 −7 actionpack/lib/action_view/helpers/form_helper.rb
  20. +2 −1 actionpack/lib/action_view/helpers/form_tag_helper.rb
  21. +3 −2 actionpack/lib/action_view/helpers/prototype_helper.rb
  22. +4 −3 actionpack/lib/action_view/helpers/url_helper.rb
  23. +2 −0 actionpack/lib/action_view/template/error.rb
  24. +12 −12 actionpack/test/abstract_controller/abstract_controller_test.rb
  25. +16 −16 actionpack/test/abstract_controller/callbacks_test.rb
  26. +1 −1 actionpack/test/abstract_controller/helper_test.rb
  27. +15 −15 actionpack/test/abstract_controller/layouts_test.rb
  28. +6 −4 actionpack/test/controller/filters_test.rb
  29. +3 −3 actionpack/test/controller/helper_test.rb
  30. +14 −0 actionpack/test/controller/http_digest_authentication_test.rb
  31. +4 −4 actionpack/test/controller/routing_test.rb
  32. +2 −2 actionpack/test/dispatch/mime_type_test.rb
  33. +1 −1 actionpack/test/fixtures/test/_local_inspector.html.erb
  34. +10 −3 actionpack/test/new_base/abstract_unit.rb
  35. +1 −1 actionpack/test/template/erb_util_test.rb
  36. +19 −0 actionpack/test/template/form_helper_test.rb
  37. +5 −0 actionpack/test/template/form_tag_helper_test.rb
  38. +29 −13 actionpack/test/template/number_helper_test.rb
  39. +1 −1 actionpack/test/template/render_test.rb
  40. +1 −3 activemodel/lib/active_model.rb
  41. +2 −2 activemodel/lib/active_model/deprecated_error_methods.rb
  42. +10 −7 activemodel/lib/active_model/errors.rb
  43. +6 −4 activemodel/lib/active_model/validations.rb
  44. +2 −2 activemodel/lib/active_model/validations/acceptance.rb
  45. +2 −2 activemodel/lib/active_model/validations/confirmation.rb
  46. +2 −2 activemodel/lib/active_model/validations/exclusion.rb
  47. +2 −2 activemodel/lib/active_model/validations/format.rb
  48. +2 −2 activemodel/lib/active_model/validations/inclusion.rb
  49. +2 −2 activemodel/lib/active_model/validations/length.rb
  50. +2 −2 activemodel/lib/active_model/validations/numericality.rb
  51. +4 −2 activemodel/lib/active_model/validations/presence.rb
  52. +14 −2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  53. +3 −2 activerecord/lib/active_record/serialization.rb
  54. +7 −25 activerecord/lib/active_record/serializers/json_serializer.rb
  55. +1 −0 activerecord/lib/active_record/validations.rb
  56. +41 −30 activerecord/test/cases/base_test.rb
  57. +4 −4 activerecord/test/cases/json_serialization_test.rb
  58. +19 −0 activerecord/test/schema/oracle_specific_schema.rb
  59. +0 −1 activeresource/examples/simple.rb
  60. +8 −11 activeresource/lib/active_resource.rb
  61. +9 −14 activeresource/lib/active_resource/base.rb
  62. +0 −2 activeresource/lib/active_resource/connection.rb
  63. +33 −40 activeresource/lib/active_resource/custom_methods.rb
  64. +2 −2 activeresource/lib/active_resource/formats/json_format.rb
  65. +0 −1 activeresource/lib/active_resource/http_mock.rb
  66. +4 −9 activeresource/lib/active_resource/validations.rb
  67. +0 −1 activeresource/test/abstract_unit.rb
  68. +6 −0 activesupport/CHANGELOG
  69. +10 −0 activesupport/Rakefile
  70. +4 −2 activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  71. +4 −2 activesupport/lib/active_support/core_ext/kernel/debugger.rb
  72. +5 −3 activesupport/lib/active_support/core_ext/module/model_naming.rb
  73. +6 −2 activesupport/lib/active_support/core_ext/string/conversions.rb
  74. +1 −86 activesupport/lib/active_support/json.rb
  75. +33 −0 activesupport/lib/active_support/json/decoding.rb
  76. +0 −22 activesupport/lib/active_support/json/encoders/date.rb
  77. +0 −22 activesupport/lib/active_support/json/encoders/date_time.rb
  78. +0 −13 activesupport/lib/active_support/json/encoders/enumerable.rb
  79. +0 −6 activesupport/lib/active_support/json/encoders/false_class.rb
  80. +0 −51 activesupport/lib/active_support/json/encoders/hash.rb
  81. +0 −6 activesupport/lib/active_support/json/encoders/nil_class.rb
  82. +0 −6 activesupport/lib/active_support/json/encoders/numeric.rb
  83. +0 −13 activesupport/lib/active_support/json/encoders/object.rb
  84. +0 −6 activesupport/lib/active_support/json/encoders/regexp.rb
  85. +0 −6 activesupport/lib/active_support/json/encoders/string.rb
  86. +0 −6 activesupport/lib/active_support/json/encoders/symbol.rb
  87. +0 −24 activesupport/lib/active_support/json/encoders/time.rb
  88. +0 −6 activesupport/lib/active_support/json/encoders/true_class.rb
  89. +206 −24 activesupport/lib/active_support/json/encoding.rb
  90. +96 −133 activesupport/lib/active_support/new_callbacks.rb
  91. +21 −20 activesupport/lib/active_support/time_with_zone.rb
  92. +1 −1 activesupport/lib/active_support/values/time_zone.rb
  93. +2 −2 activesupport/lib/active_support/vendor.rb
  94. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo.rb
  95. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/data_timezone.rb
  96. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/data_timezone_info.rb
  97. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Algiers.rb
  98. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Cairo.rb
  99. +2 −0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Casablanca.rb
  100. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Harare.rb
  101. 0 ...b/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Johannesburg.rb
  102. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Monrovia.rb
  103. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Africa/Nairobi.rb
  104. 0 ...pport/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Argentina/Buenos_Aires.rb
  105. 0 ...e_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Argentina/San_Juan.rb
  106. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Bogota.rb
  107. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Caracas.rb
  108. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Chicago.rb
  109. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Chihuahua.rb
  110. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Denver.rb
  111. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Godthab.rb
  112. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Guatemala.rb
  113. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Halifax.rb
  114. 0 ...support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Indiana/Indianapolis.rb
  115. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Juneau.rb
  116. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/La_Paz.rb
  117. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Lima.rb
  118. 0 ...b/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Los_Angeles.rb
  119. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Mazatlan.rb
  120. 0 ...b/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Mexico_City.rb
  121. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Monterrey.rb
  122. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/New_York.rb
  123. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Phoenix.rb
  124. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Regina.rb
  125. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Santiago.rb
  126. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Sao_Paulo.rb
  127. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/St_Johns.rb
  128. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/America/Tijuana.rb
  129. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Almaty.rb
  130. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Baghdad.rb
  131. 0 ...support/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Baku.rb
  132. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Bangkok.rb
  133. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Chongqing.rb
  134. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Colombo.rb
  135. 0 ...upport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Dhaka.rb
  136. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Hong_Kong.rb
  137. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Irkutsk.rb
  138. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Jakarta.rb
  139. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Jerusalem.rb
  140. 0 ...upport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Kabul.rb
  141. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Kamchatka.rb
  142. +2 −0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Karachi.rb
  143. +2 −2 ...-0.3.12/tzinfo/definitions/Asia/Katmandu.rb → tzinfo-0.3.13/tzinfo/definitions/Asia/Kathmandu.rb}
  144. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Kolkata.rb
  145. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Krasnoyarsk.rb
  146. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Kuala_Lumpur.rb
  147. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Kuwait.rb
  148. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Magadan.rb
  149. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Muscat.rb
  150. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Novosibirsk.rb
  151. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Rangoon.rb
  152. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Riyadh.rb
  153. 0 ...upport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Seoul.rb
  154. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Shanghai.rb
  155. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Singapore.rb
  156. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Taipei.rb
  157. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Tashkent.rb
  158. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Tbilisi.rb
  159. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Tehran.rb
  160. 0 ...upport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Tokyo.rb
  161. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Ulaanbaatar.rb
  162. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Urumqi.rb
  163. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Vladivostok.rb
  164. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Yakutsk.rb
  165. 0 ...ib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Yekaterinburg.rb
  166. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Asia/Yerevan.rb
  167. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Atlantic/Azores.rb
  168. 0 ...b/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Atlantic/Cape_Verde.rb
  169. 0 ...ctive_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Atlantic/South_Georgia.rb
  170. 0 ...ib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Adelaide.rb
  171. 0 ...ib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Brisbane.rb
  172. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Darwin.rb
  173. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Hobart.rb
  174. 0 ...b/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Melbourne.rb
  175. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Perth.rb
  176. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Australia/Sydney.rb
  177. 0 ...vesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Etc/UTC.rb
  178. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Amsterdam.rb
  179. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Athens.rb
  180. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Belgrade.rb
  181. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Berlin.rb
  182. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Bratislava.rb
  183. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Brussels.rb
  184. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Bucharest.rb
  185. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Budapest.rb
  186. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Copenhagen.rb
  187. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Dublin.rb
  188. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Helsinki.rb
  189. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Istanbul.rb
  190. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Kiev.rb
  191. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Lisbon.rb
  192. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Ljubljana.rb
  193. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/London.rb
  194. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Madrid.rb
  195. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Minsk.rb
  196. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Moscow.rb
  197. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Paris.rb
  198. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Prague.rb
  199. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Riga.rb
  200. 0 ...pport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Rome.rb
  201. 0 ...t/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Sarajevo.rb
  202. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Skopje.rb
  203. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Sofia.rb
  204. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Stockholm.rb
  205. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Tallinn.rb
  206. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Vienna.rb
  207. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Vilnius.rb
  208. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Warsaw.rb
  209. 0 ...ort/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Europe/Zagreb.rb
  210. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Auckland.rb
  211. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Fiji.rb
  212. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Guam.rb
  213. 0 .../lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Honolulu.rb
  214. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Majuro.rb
  215. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Midway.rb
  216. 0 ...rt/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Noumea.rb
  217. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Pago_Pago.rb
  218. 0 .../active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Port_Moresby.rb
  219. 0 ...lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/definitions/Pacific/Tongatapu.rb
  220. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/info_timezone.rb
  221. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/linked_timezone.rb
  222. 0 ...esupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/linked_timezone_info.rb
  223. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/offset_rationals.rb
  224. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/ruby_core_support.rb
  225. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/time_or_datetime.rb
  226. +1 −1 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone.rb
  227. 0 ...vesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone_definition.rb
  228. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone_info.rb
  229. 0 ...esupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone_offset_info.rb
  230. 0 activesupport/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone_period.rb
  231. 0 ...port/lib/active_support/vendor/{tzinfo-0.3.12 → tzinfo-0.3.13}/tzinfo/timezone_transition_info.rb
  232. +8 −0 activesupport/test/core_ext/module/model_naming_test.rb
  233. +3 −0 activesupport/test/core_ext/string_ext_test.rb
  234. +1 −1 activesupport/test/core_ext/time_with_zone_test.rb
  235. +12 −7 activesupport/test/json/encoding_test.rb
  236. +5 −5 activesupport/test/new_callback_inheritance_test.rb
  237. +39 −39 activesupport/test/new_callbacks_test.rb
  238. +1 −1 railties/lib/initializer.rb
  239. +16 −4 railties/lib/rails/gem_dependency.rb
  240. +7 −7 railties/lib/tasks/gems.rake
  241. +15 −1 railties/test/gem_dependency_test.rb
View
@@ -4,7 +4,6 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
-require 'rake/contrib/sshpublisher'
require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
@@ -82,12 +81,14 @@ end
desc "Publish the API documentation"
task :pgem => [:package] do
+ require 'rake/contrib/sshpublisher'
Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
`ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
+ require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
end
@@ -21,16 +21,9 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-begin
- require 'action_controller'
-rescue LoadError
- actionpack_path = "#{File.dirname(__FILE__)}/../../actionpack/lib"
- if File.directory?(actionpack_path)
- $:.unshift actionpack_path
- require 'action_controller'
- end
-end
-
+actionpack_path = "#{File.dirname(__FILE__)}/../../actionpack/lib"
+$:.unshift(actionpack_path) if File.directory?(actionpack_path)
+require 'action_controller'
require 'action_view'
module ActionMailer
@@ -697,7 +697,7 @@ def create_mail
def perform_delivery_smtp(mail)
destinations = mail.destinations
mail.ready_to_send
- sender = (mail['return-path'] && mail['return-path'].spec) || mail.from
+ sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']
smtp = Net::SMTP.new(smtp_settings[:address], smtp_settings[:port])
smtp.enable_starttls_auto if smtp_settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto)
View
@@ -35,6 +35,7 @@ Rake::TestTask.new(:test_action_pack) do |t|
t.verbose = true
#t.warning = true
end
+
task :isolated_test do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("test/{controller,dispatch,template}/**/*_test.rb").all? do |file|
@@ -2,13 +2,15 @@
require "active_support/core_ext/module/delegation"
module AbstractController
- autoload :Base, "action_controller/abstract/base"
- autoload :Benchmarker, "action_controller/abstract/benchmarker"
- autoload :Callbacks, "action_controller/abstract/callbacks"
- autoload :Helpers, "action_controller/abstract/helpers"
- autoload :Layouts, "action_controller/abstract/layouts"
- autoload :Logger, "action_controller/abstract/logger"
- autoload :Renderer, "action_controller/abstract/renderer"
+ autoload :Base, "action_controller/abstract/base"
+ autoload :Benchmarker, "action_controller/abstract/benchmarker"
+ autoload :Callbacks, "action_controller/abstract/callbacks"
+ autoload :Helpers, "action_controller/abstract/helpers"
+ autoload :Layouts, "action_controller/abstract/layouts"
+ autoload :Logger, "action_controller/abstract/logger"
+ autoload :Renderer, "action_controller/abstract/renderer"
# === Exceptions
- autoload :ActionNotFound, "action_controller/abstract/exceptions"
+ autoload :ActionNotFound, "action_controller/abstract/exceptions"
+ autoload :DoubleRenderError, "action_controller/abstract/exceptions"
+ autoload :Error, "action_controller/abstract/exceptions"
end
@@ -1,53 +1,65 @@
require 'active_support/core_ext/module/attr_internal'
module AbstractController
- class Error < StandardError; end
-
- class DoubleRenderError < Error
- DEFAULT_MESSAGE = "Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like \"redirect_to(...) and return\"."
-
- def initialize(message = nil)
- super(message || DEFAULT_MESSAGE)
- end
- end
class Base
attr_internal :response_body
- attr_internal :response_obj
attr_internal :action_name
class << self
attr_reader :abstract
+ alias_method :abstract?, :abstract
+ # Define a controller as abstract. See internal_methods for more
+ # details.
def abstract!
@abstract = true
end
- alias_method :abstract?, :abstract
-
def inherited(klass)
- ::AbstractController::Base.subclasses << klass.to_s
+ ::AbstractController::Base.descendants << klass.to_s
super
end
- def subclasses
- @subclasses ||= []
+ # A list of all descendents of AbstractController::Base. This is
+ # useful for initializers which need to add behavior to all controllers.
+ def descendants
+ @descendants ||= []
end
+ # A list of all internal methods for a controller. This finds the first
+ # abstract superclass of a controller, and gets a list of all public
+ # instance methods on that abstract class. Public instance methods of
+ # a controller would normally be considered action methods, so we
+ # are removing those methods on classes declared as abstract
+ # (ActionController::Http and ActionController::Base are defined
+ # as abstract)
def internal_methods
controller = self
controller = controller.superclass until controller.abstract?
controller.public_instance_methods(true)
end
- def process(action)
- new.process(action.to_s)
- end
-
+ # The list of hidden actions to an empty Array. Defaults to an
+ # empty Array. This can be modified by other modules or subclasses
+ # to specify particular actions as hidden.
+ #
+ # ==== Returns
+ # Array[String]:: An array of method names that should not be
+ # considered actions.
def hidden_actions
[]
end
+ # A list of method names that should be considered actions. This
+ # includes all public instance methods on a controller, less
+ # any internal methods (see #internal_methods), adding back in
+ # any methods that are internal, but still exist on the class
+ # itself. Finally, #hidden_actions are removed.
+ #
+ # ==== Returns
+ # Array[String]:: A list of all methods that should be considered
+ # actions.
def action_methods
@action_methods ||=
# All public instance methods of this class, including ancestors
@@ -63,10 +75,14 @@ def action_methods
abstract!
- def initialize
- self.response_obj = {}
- end
-
+ # Calls the action going through the entire action dispatch stack.
+ #
+ # The actual method that is called is determined by calling
+ # #method_for_action. If no method can handle the action, then an
+ # ActionNotFound error is raised.
+ #
+ # ==== Returns
+ # self
def process(action)
@_action_name = action_name = action.to_s
@@ -79,33 +95,68 @@ def process(action)
end
private
+ # See AbstractController::Base.action_methods
def action_methods
self.class.action_methods
end
- def action_method?(action)
- action_methods.include?(action)
+ # Returns true if the name can be considered an action. This can
+ # be overridden in subclasses to modify the semantics of what
+ # can be considered an action.
+ #
+ # ==== Parameters
+ # name<String>:: The name of an action to be tested
+ #
+ # ==== Returns
+ # TrueClass, FalseClass
+ def action_method?(name)
+ action_methods.include?(name)
end
- # It is possible for respond_to?(action_name) to be false and
- # respond_to?(:action_missing) to be false if respond_to_action?
- # is overridden in a subclass. For instance, ActionController::Base
- # overrides it to include the case where a template matching the
- # action_name is found.
+ # Call the action. Override this in a subclass to modify the
+ # behavior around processing an action. This, and not #process,
+ # is the intended way to override action dispatching.
def process_action(method_name)
send_action(method_name)
end
+ # Actually call the method associated with the action. Override
+ # this method if you wish to change how action methods are called,
+ # not to add additional behavior around it. For example, you would
+ # override #send_action if you want to inject arguments into the
+ # method.
alias send_action send
+ # If the action name was not found, but a method called "action_missing"
+ # was found, #method_for_action will return "_handle_action_missing".
+ # This method calls #action_missing with the current action name.
def _handle_action_missing
action_missing(@_action_name)
end
- # Override this to change the conditions that will raise an
- # ActionNotFound error. If you accept a difference case,
- # you must handle it by also overriding process_action and
- # handling the case.
+ # Takes an action name and returns the name of the method that will
+ # handle the action. In normal cases, this method returns the same
+ # name as it receives. By default, if #method_for_action receives
+ # a name that is not an action, it will look for an #action_missing
+ # method and return "_handle_action_missing" if one is found.
+ #
+ # Subclasses may override this method to add additional conditions
+ # that should be considered an action. For instance, an HTTP controller
+ # with a template matching the action name is considered to exist.
+ #
+ # If you override this method to handle additional cases, you may
+ # also provide a method (like _handle_method_missing) to handle
+ # the case.
+ #
+ # If none of these conditions are true, and method_for_action
+ # returns nil, an ActionNotFound exception will be raised.
+ #
+ # ==== Parameters
+ # action_name<String>:: An action name to find a method name for
+ #
+ # ==== Returns
+ # String:: The name of the method that handles the action
+ # nil:: No method name could be found. Raise ActionNotFound.
def method_for_action(action_name)
if action_method?(action_name) then action_name
elsif respond_to?(:action_missing, true) then "_handle_action_missing"
@@ -5,6 +5,16 @@ module Benchmarker
include Logger
module ClassMethods
+ # Execute the passed in block, timing the duration of the block in ms.
+ #
+ # ==== Parameters
+ # title<#to_s>:: The title of block to benchmark
+ # log_level<Integer>:: A valid log level. Defaults to Logger::DEBUG
+ # use_silence<TrueClass, FalseClass>:: Whether or not to silence the
+ # logger for the duration of the block.
+ #
+ # ==== Returns
+ # Object:: The result of the block
def benchmark(title, log_level = ::Logger::DEBUG, use_silence = true)
if logger && logger.level >= log_level
result = nil
Oops, something went wrong.

0 comments on commit 103b282

Please sign in to comment.