Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/rails/rails

  • Loading branch information...
commit dc6c674327b7bf2a9216a725b1f68a7882607e8b 2 parents 4e47df7 + f4ce002
Dmitrii Samoilov authored
Showing with 20,270 additions and 16,509 deletions.
  1. +23 −23 .gitignore
  2. +4 −1 .travis.yml
  3. +23 −19 Gemfile
  4. +5 −4 README.rdoc
  5. +52 −0 RELEASING_RAILS.rdoc
  6. +15 −8 Rakefile
  7. +0 −449 actionmailer/CHANGELOG
  8. +449 −0 actionmailer/CHANGELOG.md
  9. +2 −0  actionmailer/README.rdoc
  10. +1 −1  actionmailer/actionmailer.gemspec
  11. +3 −3 actionmailer/lib/action_mailer/base.rb
  12. +8 −1 actionmailer/lib/action_mailer/test_case.rb
  13. +1 −1  actionmailer/test/mailers/base_mailer.rb
  14. +28 −0 actionmailer/test/test_test.rb
  15. +0 −5,587 actionpack/CHANGELOG
  16. +5,724 −0 actionpack/CHANGELOG.md
  17. +1 −1  actionpack/RUNNING_UNIT_TESTS
  18. +5 −0 actionpack/Rakefile
  19. +12 −12 actionpack/actionpack.gemspec
  20. +2 −1  actionpack/lib/abstract_controller/asset_paths.rb
  21. +2 −2 actionpack/lib/abstract_controller/callbacks.rb
  22. +5 −12 actionpack/lib/abstract_controller/layouts.rb
  23. +2 −2 actionpack/lib/abstract_controller/railties/routes_helpers.rb
  24. +2 −2 actionpack/lib/abstract_controller/rendering.rb
  25. +2 −2 actionpack/lib/action_controller/base.rb
  26. +0 −1  actionpack/lib/action_controller/caching.rb
  27. +1 −1  actionpack/lib/action_controller/caching/actions.rb
  28. +1 −1  actionpack/lib/action_controller/caching/pages.rb
  29. +1 −1  actionpack/lib/action_controller/caching/sweeping.rb
  30. +7 −1 actionpack/lib/action_controller/metal.rb
  31. +2 −2 actionpack/lib/action_controller/metal/data_streaming.rb
  32. +5 −2 actionpack/lib/action_controller/metal/force_ssl.rb
  33. +2 −0  actionpack/lib/action_controller/metal/head.rb
  34. +6 −3 actionpack/lib/action_controller/metal/helpers.rb
  35. +1 −1  actionpack/lib/action_controller/metal/http_authentication.rb
  36. +4 −4 actionpack/lib/action_controller/metal/mime_responds.rb
  37. +13 −17 actionpack/lib/action_controller/metal/params_wrapper.rb
  38. +4 −4 actionpack/lib/action_controller/metal/redirecting.rb
  39. +9 −11 actionpack/lib/action_controller/metal/renderers.rb
  40. +1 −1  actionpack/lib/action_controller/metal/request_forgery_protection.rb
  41. +10 −0 actionpack/lib/action_controller/metal/rescue.rb
  42. +10 −22 actionpack/lib/action_controller/metal/responder.rb
  43. +1 −1  actionpack/lib/action_controller/metal/url_for.rb
  44. +2 −0  actionpack/lib/action_controller/railtie.rb
  45. +4 −3 actionpack/lib/action_controller/railties/paths.rb
  46. +3 −3 actionpack/lib/action_controller/record_identifier.rb
  47. +22 −14 actionpack/lib/action_controller/test_case.rb
  48. +1 −1  actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
  49. +1 −0  actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb
  50. +2 −0  actionpack/lib/action_dispatch.rb
  51. +0 −2  actionpack/lib/action_dispatch/http/headers.rb
  52. +4 −0 actionpack/lib/action_dispatch/http/mime_type.rb
  53. +11 −18 actionpack/lib/action_dispatch/http/request.rb
  54. +3 −14 actionpack/lib/action_dispatch/http/upload.rb
  55. +7 −5 actionpack/lib/action_dispatch/http/url.rb
  56. +10 −2 actionpack/lib/action_dispatch/middleware/cookies.rb
  57. +4 −0 actionpack/lib/action_dispatch/middleware/flash.rb
  58. +4 −9 actionpack/lib/action_dispatch/middleware/params_parser.rb
  59. +66 −36 actionpack/lib/action_dispatch/middleware/remote_ip.rb
  60. +39 −0 actionpack/lib/action_dispatch/middleware/request_id.rb
  61. +4 −1 actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
  62. +50 −0 actionpack/lib/action_dispatch/middleware/session/cache_store.rb
  63. +21 −17 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
  64. +1 −0  actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb
  65. +3 −2 actionpack/lib/action_dispatch/railtie.rb
  66. +75 −74 actionpack/lib/action_dispatch/routing/mapper.rb
  67. +63 −59 actionpack/lib/action_dispatch/routing/redirection.rb
  68. +0 −60 actionpack/lib/action_dispatch/routing/route.rb
  69. +75 −37 actionpack/lib/action_dispatch/routing/route_set.rb
  70. +13 −8 actionpack/lib/action_dispatch/routing/url_for.rb
  71. +2 −2 actionpack/lib/action_dispatch/testing/assertions/selector.rb
  72. +4 −4 actionpack/lib/action_dispatch/testing/integration.rb
  73. +1 −6 actionpack/lib/action_dispatch/testing/test_process.rb
  74. +8 −19 actionpack/lib/action_view/asset_paths.rb
  75. +1 −1  actionpack/lib/action_view/base.rb
  76. +88 −0 actionpack/lib/action_view/data/encoding_conversions.txt
  77. +2 −2 actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb
  78. +1 −1  actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb
  79. +3 −3 actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb
  80. +5 −2 actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
  81. +1 −1  actionpack/lib/action_view/helpers/atom_feed_helper.rb
  82. +1 −1  actionpack/lib/action_view/helpers/cache_helper.rb
  83. +3 −3 actionpack/lib/action_view/helpers/capture_helper.rb
  84. +10 −5 actionpack/lib/action_view/helpers/date_helper.rb
  85. +24 −7 actionpack/lib/action_view/helpers/form_helper.rb
  86. +6 −1 actionpack/lib/action_view/helpers/form_options_helper.rb
  87. +8 −5 actionpack/lib/action_view/helpers/form_tag_helper.rb
  88. +13 −4 actionpack/lib/action_view/helpers/javascript_helper.rb
  89. +5 −4 actionpack/lib/action_view/helpers/number_helper.rb
  90. +51 −5 actionpack/lib/action_view/helpers/record_tag_helper.rb
  91. +2 −2 actionpack/lib/action_view/helpers/rendering_helper.rb
  92. +1 −1  actionpack/lib/action_view/helpers/text_helper.rb
  93. +11 −4 actionpack/lib/action_view/helpers/translation_helper.rb
  94. +27 −9 actionpack/lib/action_view/helpers/url_helper.rb
  95. +111 −116 actionpack/lib/action_view/lookup_context.rb
  96. +16 −11 actionpack/lib/action_view/renderer/abstract_renderer.rb
  97. +19 −15 actionpack/lib/action_view/renderer/partial_renderer.rb
  98. +11 −13 actionpack/lib/action_view/renderer/template_renderer.rb
  99. +27 −0 actionpack/lib/action_view/template.rb
  100. +1 −1  actionpack/lib/action_view/template/resolver.rb
  101. +8 −5 actionpack/lib/action_view/test_case.rb
  102. +84 −18 actionpack/lib/sprockets/assets.rake
  103. +37 −0 actionpack/lib/sprockets/bootstrap.rb
  104. +69 −7 actionpack/lib/sprockets/compressors.rb
  105. +2 −1  actionpack/lib/sprockets/helpers.rb
  106. +13 −0 actionpack/lib/sprockets/helpers/isolated_helper.rb
  107. +69 −41 actionpack/lib/sprockets/helpers/rails_helper.rb
  108. +22 −58 actionpack/lib/sprockets/railtie.rb
  109. +61 −0 actionpack/lib/sprockets/static_compiler.rb
  110. +3 −3 actionpack/test/abstract/abstract_controller_test.rb
  111. +2 −2 actionpack/test/abstract_unit.rb
  112. +2 −4 actionpack/test/activerecord/polymorphic_routes_test.rb
  113. +19 −0 actionpack/test/controller/assert_select_test.rb
  114. +63 −1 actionpack/test/controller/caching_test.rb
  115. +21 −1 actionpack/test/controller/force_ssl_test.rb
  116. +8 −0 actionpack/test/controller/http_basic_authentication_test.rb
  117. +5 −6 actionpack/test/controller/integration_test.rb
  118. +2 −2 actionpack/test/controller/layout_test.rb
  119. +40 −12 actionpack/test/controller/mime_responds_test.rb
  120. +6 −0 actionpack/test/controller/new_base/bare_metal_test.rb
  121. +5 −5 actionpack/test/controller/new_base/render_file_test.rb
  122. +5 −5 actionpack/test/controller/new_base/render_partial_test.rb
  123. +3 −3 actionpack/test/controller/new_base/render_template_test.rb
  124. +16 −18 actionpack/test/controller/render_test.rb
  125. +16 −0 actionpack/test/controller/request_forgery_protection_test.rb
  126. +1 −10 actionpack/test/controller/resources_test.rb
  127. +59 −0 actionpack/test/controller/show_exceptions_test.rb
  128. +59 −0 actionpack/test/controller/test_test.rb
  129. +25 −0 actionpack/test/controller/url_for_test.rb
  130. +2 −2 actionpack/test/controller/url_rewriter_test.rb
  131. +18 −2 actionpack/test/dispatch/cookies_test.rb
  132. +1 −0  actionpack/test/dispatch/mapper_test.rb
  133. +2 −0  actionpack/test/dispatch/mime_type_test.rb
  134. +13 −5 actionpack/test/dispatch/request/json_params_parsing_test.rb
  135. +14 −6 actionpack/test/dispatch/request/xml_params_parsing_test.rb
  136. +65 −0 actionpack/test/dispatch/request_id_test.rb
  137. +8 −2 actionpack/test/dispatch/request_test.rb
  138. +65 −34 actionpack/test/dispatch/routing_test.rb
  139. +181 −0 actionpack/test/dispatch/session/cache_store_test.rb
  140. +1 −1  actionpack/test/dispatch/session/cookie_store_test.rb
  141. +49 −58 actionpack/test/dispatch/show_exceptions_test.rb
  142. +1 −0  actionpack/test/fixtures/comments/empty.de.html.erb
  143. +1 −0  actionpack/test/fixtures/comments/empty.html.builder
  144. +1 −0  actionpack/test/fixtures/comments/empty.html.erb
  145. +1 −0  actionpack/test/fixtures/comments/empty.xml.erb
  146. +1 −0  actionpack/test/fixtures/functional_caching/fragment_cached.html.erb
  147. +4 −0 actionpack/test/fixtures/test/_label_with_block.erb
  148. +1 −1  actionpack/test/fixtures/test/_layout_with_partial_and_yield.html.erb
  149. 0  actionpack/test/fixtures/test/{hello_w*rld.erb → hello,world.erb}
  150. +4 −11 actionpack/test/lib/controller/fake_models.rb
  151. +4 −0 actionpack/test/template/asset_tag_helper_test.rb
  152. +36 −0 actionpack/test/template/capture_helper_test.rb
  153. +8 −8 actionpack/test/template/compiled_templates_test.rb
  154. +28 −0 actionpack/test/template/compressors_test.rb
  155. +9 −0 actionpack/test/template/date_helper_test.rb
  156. +137 −5 actionpack/test/template/form_helper_test.rb
  157. +18 −0 actionpack/test/template/form_options_helper_test.rb
  158. +6 −0 actionpack/test/template/form_tag_helper_test.rb
  159. +6 −1 actionpack/test/template/html-scanner/tag_node_test.rb
  160. +6 −0 actionpack/test/template/javascript_helper_test.rb
  161. +1 −1  actionpack/test/template/log_subscriber_test.rb
  162. +0 −10 actionpack/test/template/lookup_context_test.rb
  163. +1 −0  actionpack/test/template/number_helper_test.rb
  164. +39 −2 actionpack/test/template/record_tag_helper_test.rb
  165. +65 −21 actionpack/test/template/render_test.rb
  166. +122 −29 actionpack/test/template/sprockets_helper_test.rb
  167. +8 −8 actionpack/test/template/streaming_render_test.rb
  168. +3 −0  actionpack/test/template/template_test.rb
  169. +16 −0 actionpack/test/template/test_test.rb
  170. +4 −0 actionpack/test/template/text_helper_test.rb
  171. +17 −1 actionpack/test/template/translation_helper_test.rb
  172. +12 −2 actionpack/test/template/url_helper_test.rb
  173. +0 −105 activemodel/CHANGELOG
  174. +119 −0 activemodel/CHANGELOG.md
  175. +1 −2  activemodel/activemodel.gemspec
  176. +1 −0  activemodel/lib/active_model.rb
  177. +80 −65 activemodel/lib/active_model/attribute_methods.rb
  178. +1 −1  activemodel/lib/active_model/callbacks.rb
  179. +2 −2 activemodel/lib/active_model/dirty.rb
  180. +57 −28 activemodel/lib/active_model/errors.rb
  181. +16 −11 activemodel/lib/active_model/naming.rb
  182. +1 −2  activemodel/lib/active_model/observing.rb
  183. +9 −2 activemodel/lib/active_model/secure_password.rb
  184. +144 −0 activemodel/lib/active_model/serializable.rb
  185. +108 −0 activemodel/lib/active_model/serializable/json.rb
  186. +195 −0 activemodel/lib/active_model/serializable/xml.rb
  187. +5 −109 activemodel/lib/active_model/serialization.rb
  188. +253 −0 activemodel/lib/active_model/serializer.rb
  189. +3 −105 activemodel/lib/active_model/serializers/json.rb
  190. +5 −202 activemodel/lib/active_model/serializers/xml.rb
  191. +2 −0  activemodel/lib/active_model/validations/acceptance.rb
  192. +2 −0  activemodel/lib/active_model/validations/confirmation.rb
  193. +2 −0  activemodel/lib/active_model/validations/exclusion.rb
  194. +2 −0  activemodel/lib/active_model/validations/format.rb
  195. +2 −0  activemodel/lib/active_model/validations/inclusion.rb
  196. +2 −0  activemodel/lib/active_model/validations/length.rb
  197. +2 −0  activemodel/lib/active_model/validations/numericality.rb
  198. +2 −0  activemodel/lib/active_model/validations/presence.rb
  199. +18 −6 activemodel/lib/active_model/validations/validates.rb
  200. +5 −3 activemodel/lib/active_model/validations/with.rb
  201. +4 −4 activemodel/lib/active_model/validator.rb
  202. +102 −6 activemodel/test/cases/attribute_methods_test.rb
  203. +99 −2 activemodel/test/cases/errors_test.rb
  204. +48 −5 activemodel/test/cases/naming_test.rb
  205. +4 −6 activemodel/test/cases/secure_password_test.rb
  206. +21 −1 activemodel/test/cases/{serializers/json_serialization_test.rb → serializable/json_test.rb}
  207. +19 −2 activemodel/test/cases/{serializers/xml_serialization_test.rb → serializable/xml_test.rb}
  208. +33 −3 activemodel/test/cases/{serialization_test.rb → serializable_test.rb}
  209. +6 −6 activemodel/test/cases/validations/exclusion_validation_test.rb
  210. +12 −12 activemodel/test/cases/validations/format_validation_test.rb
  211. +6 −6 activemodel/test/cases/validations/inclusion_validation_test.rb
  212. +33 −0 activemodel/test/cases/validations_test.rb
  213. +2 −6 activemodel/test/models/blog_post.rb
  214. +0 −6,500 activerecord/CHANGELOG
  215. +6,622 −0 activerecord/CHANGELOG.md
  216. +2 −2 activerecord/README.rdoc
  217. +2 −2 activerecord/activerecord.gemspec
  218. +1 −7 activerecord/lib/active_record.rb
  219. +4 −3 activerecord/lib/active_record/aggregations.rb
  220. +17 −13 activerecord/lib/active_record/associations.rb
  221. +12 −6 activerecord/lib/active_record/associations/alias_tracker.rb
  222. +8 −19 activerecord/lib/active_record/associations/association_scope.rb
  223. +9 −1 activerecord/lib/active_record/associations/belongs_to_association.rb
  224. +7 −3 activerecord/lib/active_record/associations/collection_association.rb
  225. +1 −1  activerecord/lib/active_record/associations/collection_proxy.rb
  226. +10 −2 activerecord/lib/active_record/associations/has_many_association.rb
  227. +49 −24 activerecord/lib/active_record/associations/has_many_through_association.rb
  228. +2 −2 activerecord/lib/active_record/associations/through_association.rb
  229. +56 −28 activerecord/lib/active_record/attribute_methods.rb
  230. +0 −1  activerecord/lib/active_record/attribute_methods/primary_key.rb
  231. +1 −3 activerecord/lib/active_record/attribute_methods/read.rb
  232. +12 −4 activerecord/lib/active_record/attribute_methods/write.rb
  233. +4 −1 activerecord/lib/active_record/autosave_association.rb
  234. +27 −25 activerecord/lib/active_record/base.rb
  235. +32 −79 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
  236. +9 −1 activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
  237. +7 −4 activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
  238. +4 −5 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
  239. +34 −4 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  240. +13 −18 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
  241. +719 −0 activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
  242. +55 −539 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
  243. +110 −601 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  244. +168 −33 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  245. +72 −0 activerecord/lib/active_record/connection_adapters/schema_cache.rb
  246. +84 −12 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  247. +40 −0 activerecord/lib/active_record/connection_adapters/statement_pool.rb
  248. +23 −0 activerecord/lib/active_record/errors.rb
  249. +379 −374 activerecord/lib/active_record/fixtures.rb
  250. +11 −1 activerecord/lib/active_record/fixtures/file.rb
  251. +5 −2 activerecord/lib/active_record/locking/optimistic.rb
  252. +5 −4 activerecord/lib/active_record/migration.rb
  253. +1 −1  activerecord/lib/active_record/migration/command_recorder.rb
  254. +3 −2 activerecord/lib/active_record/nested_attributes.rb
  255. +2 −1  activerecord/lib/active_record/persistence.rb
  256. +10 −2 activerecord/lib/active_record/query_cache.rb
  257. +119 −77 activerecord/lib/active_record/railties/databases.rake
  258. +19 −19 activerecord/lib/active_record/reflection.rb
  259. +60 −1 activerecord/lib/active_record/relation.rb
  260. +1 −1  activerecord/lib/active_record/relation/batches.rb
  261. +10 −4 activerecord/lib/active_record/relation/finder_methods.rb
  262. +9 −7 activerecord/lib/active_record/relation/predicate_builder.rb
  263. +86 −8 activerecord/lib/active_record/relation/query_methods.rb
  264. +3 −0  activerecord/lib/active_record/schema_dumper.rb
  265. +1 −1  activerecord/lib/active_record/serialization.rb
  266. +4 −4 activerecord/lib/active_record/serializers/xml_serializer.rb
  267. +2 −2 activerecord/lib/active_record/session_store.rb
  268. +50 −0 activerecord/lib/active_record/store.rb
  269. +16 −3 activerecord/lib/active_record/timestamp.rb
  270. +2 −2 activerecord/lib/active_record/validations/uniqueness.rb
  271. +6 −1 activerecord/test/active_record/connection_adapters/fake_adapter.rb
  272. +0 −10 activerecord/test/cases/adapter_test.rb
  273. +4 −4 activerecord/test/cases/adapters/mysql/active_schema_test.rb
  274. +35 −0 activerecord/test/cases/adapters/mysql/case_sensitivity_test.rb
  275. +5 −1 activerecord/test/cases/adapters/mysql/schema_test.rb
  276. +23 −0 activerecord/test/cases/adapters/mysql/statement_pool_test.rb
  277. +35 −0 activerecord/test/cases/adapters/mysql2/case_sensitivity_test.rb
  278. +26 −0 activerecord/test/cases/adapters/mysql2/explain_test.rb
  279. +5 −1 activerecord/test/cases/adapters/mysql2/schema_test.rb
  280. +28 −0 activerecord/test/cases/adapters/postgresql/explain_test.rb
  281. +49 −19 activerecord/test/cases/adapters/postgresql/schema_test.rb
  282. +39 −0 activerecord/test/cases/adapters/postgresql/statement_pool_test.rb
  283. +18 −0 activerecord/test/cases/adapters/postgresql/utils_test.rb
  284. +26 −0 activerecord/test/cases/adapters/sqlite3/explain_test.rb
  285. +23 −0 activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
  286. +24 −0 activerecord/test/cases/adapters/sqlite3/statement_pool_test.rb
  287. +14 −0 activerecord/test/cases/associations/belongs_to_associations_test.rb
  288. +10 −0 activerecord/test/cases/associations/extension_test.rb
  289. +8 −0 activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
  290. +72 −1 activerecord/test/cases/associations/has_many_associations_test.rb
  291. +34 −0 activerecord/test/cases/associations/has_many_through_associations_test.rb
  292. +11 −0 activerecord/test/cases/associations/nested_through_associations_test.rb
  293. +1 −0  activerecord/test/cases/attribute_methods/read_test.rb
  294. +52 −27 activerecord/test/cases/attribute_methods_test.rb
  295. +65 −1 activerecord/test/cases/base_test.rb
  296. +20 −0 activerecord/test/cases/batches_test.rb
  297. +16 −16 activerecord/test/cases/column_definition_test.rb
  298. +20 −1 activerecord/test/cases/connection_adapters/connection_handler_test.rb
  299. +55 −0 activerecord/test/cases/connection_adapters/schema_cache_test.rb
  300. +0 −37 activerecord/test/cases/connection_pool_test.rb
Sorry, we could not display the entire diff because too many files (635) changed.
View
46 .gitignore
@@ -1,24 +1,24 @@
-pkg
-.bundle
-Gemfile.lock
+# Don't put *.swp, *.bak, etc here; those belong in a global ~/.gitignore.
+# Check out http://help.github.com/ignore-files/ for how to set that up.
+
debug.log
-doc/rdoc
-activemodel/doc
-activeresource/doc
-activerecord/doc
-actionpack/doc
-actionmailer/doc
-activesupport/doc
-activesupport/test/tmp
-activemodel/test/fixtures/fixture_database.sqlite3
-actionpack/test/tmp
-activesupport/test/fixtures/isolation_test
-dist
-railties/test/500.html
-railties/test/fixtures/tmp
-railties/test/initializer/root/log
-railties/doc
-railties/guides/output
-railties/tmp
-.rvmrc
-RDOC_MAIN.rdoc
+.Gemfile
+/.bundle
+/.rbenv-version
+/.rvmrc
+/Gemfile.lock
+/pkg
+/dist
+/doc/rdoc
+/*/doc
+/*/test/tmp
+/activerecord/sqlnet.log
+/activemodel/test/fixtures/fixture_database.sqlite3
+/activesupport/test/fixtures/isolation_test
+/railties/test/500.html
+/railties/test/fixtures/tmp
+/railties/test/initializer/root/log
+/railties/doc
+/railties/guides/output
+/railties/tmp
+/RDOC_MAIN.rdoc
View
5 .travis.yml
@@ -12,5 +12,8 @@ env:
notifications:
email: false
irc:
- - "irc.freenode.org#rails-contrib"
+ on_success: change
+ on_failure: always
+ channels:
+ - "irc.freenode.org#rails-contrib"
bundler_args: --path vendor/bundle
View
42 Gemfile
@@ -4,24 +4,29 @@ gemspec
if ENV['AREL']
gem "arel", :path => ENV['AREL']
+else
+ gem "arel", :git => "git://github.com/rails/arel"
end
+gem "bcrypt-ruby", "~> 3.0.0"
gem "jquery-rails"
-# This needs to be with require false to avoid
-# it being automatically loaded by sprockets
-gem "uglifier", ">= 1.0.0", :require => false
-# Temp fix until rake 0.9.3 is out
-if RUBY_VERSION >= "1.9.3"
- gem "rake", "0.9.3.beta.1"
+if ENV['JOURNEY']
+ gem "journey", :path => ENV['JOURNEY']
else
- gem "rake", ">= 0.8.7"
+ gem "journey", :git => "git://github.com/rails/journey"
end
+
+# This needs to be with require false to avoid
+# it being automatically loaded by sprockets
+gem "uglifier", ">= 1.0.3", :require => false
+
+gem "rake", ">= 0.8.7"
gem "mocha", ">= 0.9.8"
group :doc do
gem "rdoc", "~> 3.4"
- gem "horo", "= 1.0.3"
+ gem "sdoc", "~> 0.3"
gem "RedCloth", "~> 4.2" if RUBY_VERSION < "1.9.3"
gem "w3c_validators"
end
@@ -31,14 +36,11 @@ gem "memcache-client", ">= 1.8.5"
platforms :mri_18 do
gem "system_timer"
- gem "ruby-debug", ">= 0.10.3" unless ENV['TRAVIS']
gem "json"
end
-platforms :mri_19 do
- # TODO: Remove the conditional when ruby-debug19 supports Ruby >= 1.9.3
- gem "ruby-debug19", :require => "ruby-debug" unless RUBY_VERSION > "1.9.2" || ENV['TRAVIS']
-end
+# Add your own local bundler stuff
+instance_eval File.read ".Gemfile" if File.exists? ".Gemfile"
platforms :mri do
group :test do
@@ -55,19 +57,18 @@ platforms :ruby do
gem "nokogiri", ">= 1.4.5"
# AR
- gem "sqlite3", "~> 1.3.3"
+ gem "sqlite3", "~> 1.3.4"
group :db do
gem "pg", ">= 0.11.0" unless ENV['TRAVIS'] # once pg is on travis this can be removed
gem "mysql", ">= 2.8.1"
- gem "mysql2", ">= 0.3.6"
+ gem "mysql2", ">= 0.3.10"
end
end
platforms :jruby do
- gem "ruby-debug", ">= 0.10.3"
gem "json"
- gem "activerecord-jdbcsqlite3-adapter"
+ gem "activerecord-jdbcsqlite3-adapter", ">= 1.2.0"
# This is needed by now to let tests work on JRuby
# TODO: When the JRuby guys merge jruby-openssl in
@@ -75,8 +76,8 @@ platforms :jruby do
gem "jruby-openssl"
group :db do
- gem "activerecord-jdbcmysql-adapter"
- gem "activerecord-jdbcpostgresql-adapter"
+ gem "activerecord-jdbcmysql-adapter", ">= 1.2.0"
+ gem "activerecord-jdbcpostgresql-adapter", ">= 1.2.0"
end
end
@@ -91,3 +92,6 @@ if ENV['ORACLE_ENHANCED_PATH'] || ENV['ORACLE_ENHANCED']
gem "activerecord-oracle_enhanced-adapter", :git => "git://github.com/rsim/oracle-enhanced.git"
end
end
+
+# A gem necessary for ActiveRecord tests with IBM DB
+gem "ibm_db" if ENV['IBM_DB']
View
9 README.rdoc
@@ -8,12 +8,12 @@ into three layers, each with a specific responsibility.
The View layer is composed of "templates" that are responsible for providing
appropriate representations of your application's resources. Templates
-can come in a variety of formats, but most view templates are HTML with embedded Ruby
+can come in a variety of formats, but most view templates are \HTML with embedded Ruby
code (.erb files).
The Model layer represents your domain model (such as Account, Product, Person, Post)
and encapsulates the business logic that is specific to your application. In Rails,
-database-backed model classes are derived from ActiveRecord::Base. ActiveRecord allows
+database-backed model classes are derived from ActiveRecord::Base. Active Record allows
you to present the data from database rows as objects and embellish these data objects
with business logic methods. Although most Rails models are backed by a database, models
can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as
@@ -21,7 +21,7 @@ provided by the ActiveModel module. You can read more about Active Record in its
{README}[link:/rails/rails/blob/master/activerecord/README.rdoc].
The Controller layer is responsible for handling incoming HTTP requests and providing a
-suitable response. Usually this means returning HTML, but Rails controllers can also
+suitable response. Usually this means returning \HTML, but Rails controllers can also
generate XML, JSON, PDFs, mobile-specific views, and more. Controllers manipulate models
and render view templates in order to generate the appropriate HTTP response.
@@ -61,13 +61,14 @@ can read more about Action Pack in its {README}[link:/rails/rails/blob/master/ac
* The {Ruby on Rails Guides}[http://guides.rubyonrails.org].
* The {API Documentation}[http://api.rubyonrails.org].
-
== Contributing
We encourage you to contribute to Ruby on Rails! Please check out the {Contributing to Rails
guide}[http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html] for guidelines about how
to proceed. {Join us}[http://contributors.rubyonrails.org]!
+== Travis Build Status {<img src="https://secure.travis-ci.org/rails/rails.png"/>}[http://travis-ci.org/rails/rails]
+
== License
Ruby on Rails is released under the MIT license.
View
52 RELEASING_RAILS.rdoc
@@ -25,6 +25,12 @@ for Rails. You can check the status of his tests here:
Do not release with Red AWDwR tests.
+=== Are the postgres tests green? If not, make them green
+
+Currently Travis CI doesn't run the Active Record postgres tests. They are
+working to resolve this, but in the mean time, it is crucial to ensure that
+the tests are still green before release.
+
=== Do we have any git dependencies? If so, contact those authors.
Having git dependencies indicates that we depend on unreleased code.
@@ -60,6 +66,8 @@ for today:
=== Is Sam Ruby happy? If not, make him happy.
+=== Are the postgres tests green? If not, make them green
+
=== Contact the security team. CVE emails must be sent on this day.
=== Create a release branch.
@@ -81,8 +89,20 @@ You can review the commits for the 3.0.10 release like this:
[aaron@higgins rails (3-0-10)]$ git log v3.0.9..
+If you're doing a stable branch release, you should also ensure that all of
+the CHANGELOG entries in the stable branch are also synced to the master
+branch.
+
=== Update the RAILS_VERSION file to include the RC.
+=== Build and test the gem.
+
+Run `rake install` to generate the gems and install them locally. Then try
+generating a new app and ensure that nothing explodes.
+
+This will stop you from looking silly when you push an RC to rubygems.org and
+then realise it is broken.
+
=== Release the gem.
IMPORTANT: Due to YAML parse problems on the rubygems.org server, it is safest
@@ -150,6 +170,7 @@ Today, do this stuff in this order:
* Apply security patches to the release branch
* Update CHANGELOG with security fixes.
* Update RAILS_VERSION to remove the rc
+* Build and test the gem
* Release the gems
* Email security lists
* Email general announcement lists
@@ -184,3 +205,34 @@ There are two simple steps for fixing the CI:
2. Fix it
Repeat these steps until the CI is green.
+
+=== Manually trigger docs generation
+
+We have a post-receive hook in GitHub that calls the docs server on pushes.
+It triggers generation and publication of edge docs, updates the contrib app,
+and generates and publishes stable docs if a new stable tag is detected.
+
+The hook unfortunately is not invoked by tag pushing, so once the new stable
+tag has been pushed to origin, please run
+
+ curl -X POST -d '' http://rails-hooks.hashref.com/rails-master-hook
+
+You should see something like this:
+
+ Rails master hook tasks scheduled:
+
+ * updates the local checkout
+ * updates Rails Contributors
+ * generates and publishes edge docs
+
+ If a new stable tag is detected it also
+
+ * generates and publishes stable docs
+
+ This needs typically a few minutes.
+
+Note you do not need to specify the tag, the docs server figures it out.
+
+Also, don't worry if you call that multiple times or the hook is triggered
+again by some immediate regular push, if the scripts are running new calls
+are just queued (in a queue of size 1).
View
23 Rakefile
@@ -1,6 +1,7 @@
#!/usr/bin/env rake
require 'rdoc/task'
+require 'sdoc'
require 'net/http'
$:.unshift File.expand_path('..', __FILE__)
@@ -76,6 +77,10 @@ RDoc::Task.new do |rdoc|
rdoc_main.gsub!(/^(?=\S).*?\b(?=Rails)\b/) { "#$&\\" }
rdoc_main.gsub!(%r{link:/rails/rails/blob/master/(\w+)/README\.rdoc}, "link:files/\\1/README_rdoc.html")
+ # Remove Travis build status image from API pages. Only GitHub README page gets this image
+ # https build image is used to avoid GitHub caching: http://about.travis-ci.org/docs/user/status-images
+ rdoc_main.gsub!(%r{^== Travis.*}, '')
+
File.open(RDOC_MAIN, 'w') do |f|
f.write(rdoc_main)
end
@@ -86,28 +91,30 @@ RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.title = "Ruby on Rails Documentation"
- rdoc.options << '-f' << 'horo'
+ rdoc.options << '-f' << 'sdoc'
+ rdoc.options << '-T' << 'rails'
rdoc.options << '-c' << 'utf-8'
+ rdoc.options << '-g' # SDoc flag, link methods to GitHub
rdoc.options << '-m' << RDOC_MAIN
- rdoc.rdoc_files.include('railties/CHANGELOG')
+ rdoc.rdoc_files.include('railties/CHANGELOG.md')
rdoc.rdoc_files.include('railties/MIT-LICENSE')
rdoc.rdoc_files.include('railties/README.rdoc')
rdoc.rdoc_files.include('railties/lib/**/*.rb')
rdoc.rdoc_files.exclude('railties/lib/rails/generators/**/templates/**/*.rb')
rdoc.rdoc_files.include('activerecord/README.rdoc')
- rdoc.rdoc_files.include('activerecord/CHANGELOG')
+ rdoc.rdoc_files.include('activerecord/CHANGELOG.md')
rdoc.rdoc_files.include('activerecord/lib/active_record/**/*.rb')
rdoc.rdoc_files.exclude('activerecord/lib/active_record/vendor/*')
rdoc.rdoc_files.include('activeresource/README.rdoc')
- rdoc.rdoc_files.include('activeresource/CHANGELOG')
+ rdoc.rdoc_files.include('activeresource/CHANGELOG.md')
rdoc.rdoc_files.include('activeresource/lib/active_resource.rb')
rdoc.rdoc_files.include('activeresource/lib/active_resource/*')
rdoc.rdoc_files.include('actionpack/README.rdoc')
- rdoc.rdoc_files.include('actionpack/CHANGELOG')
+ rdoc.rdoc_files.include('actionpack/CHANGELOG.md')
rdoc.rdoc_files.include('actionpack/lib/abstract_controller/**/*.rb')
rdoc.rdoc_files.include('actionpack/lib/action_controller/**/*.rb')
rdoc.rdoc_files.include('actionpack/lib/action_dispatch/**/*.rb')
@@ -115,18 +122,18 @@ RDoc::Task.new do |rdoc|
rdoc.rdoc_files.exclude('actionpack/lib/action_controller/vendor/*')
rdoc.rdoc_files.include('actionmailer/README.rdoc')
- rdoc.rdoc_files.include('actionmailer/CHANGELOG')
+ rdoc.rdoc_files.include('actionmailer/CHANGELOG.md')
rdoc.rdoc_files.include('actionmailer/lib/action_mailer/base.rb')
rdoc.rdoc_files.include('actionmailer/lib/action_mailer/mail_helper.rb')
rdoc.rdoc_files.exclude('actionmailer/lib/action_mailer/vendor/*')
rdoc.rdoc_files.include('activesupport/README.rdoc')
- rdoc.rdoc_files.include('activesupport/CHANGELOG')
+ rdoc.rdoc_files.include('activesupport/CHANGELOG.md')
rdoc.rdoc_files.include('activesupport/lib/active_support/**/*.rb')
rdoc.rdoc_files.exclude('activesupport/lib/active_support/vendor/*')
rdoc.rdoc_files.include('activemodel/README.rdoc')
- rdoc.rdoc_files.include('activemodel/CHANGELOG')
+ rdoc.rdoc_files.include('activemodel/CHANGELOG.md')
rdoc.rdoc_files.include('activemodel/lib/active_model/**/*.rb')
end
View
449 actionmailer/CHANGELOG
@@ -1,449 +0,0 @@
-*Rails 3.1.0 (unreleased)*
-
-* No changes
-
-
-*Rails 3.0.7 (April 18, 2011)*
-
-* remove AM delegating register_observer and register_interceptor to Mail [Josh Kalderimis]
-
-
-*Rails 3.0.6 (April 5, 2011)
-
-* Don't allow i18n to change the minor version, version now set to ~> 0.5.0 [Santiago Pastorino]
-
-
-*Rails 3.0.5 (February 26, 2011)*
-
-* No changes.
-
-
-*Rails 3.0.4 (February 8, 2011)*
-
-* No changes.
-
-
-*Rails 3.0.3 (November 16, 2010)*
-
-* No changes.
-
-
-*Rails 3.0.2 (November 15, 2010)*
-
-* No changes
-
-
-*Rails 3.0.1 (October 15, 2010)*
-
-* No Changes, just a version bump.
-
-
-*Rails 3.0.0 (August 29, 2010)*
-
-* subject is automatically looked up on I18n using mailer_name and action_name as scope as in t(".subject") [JK]
-
-* Changed encoding behaviour of mail, so updated tests in actionmailer and bumped mail version to 2.2.1 [ML]
-
-* Added ability to pass Proc objects to the defaults hash [ML]
-
-* Removed all quoting.rb type files from ActionMailer and put Mail 2.2.0 in instead [ML]
-
-* Lot of updates to various test cases that now work better with the new Mail and so have different expectations
-
-* Added interceptors and observers from Mail [ML]
-
- ActionMailer::Base.register_interceptor calls Mail.register_interceptor
- ActionMailer::Base.register_observer calls Mail.register_observer
-
-* Mail::Part now no longer has nil as a default charset, it is always set to something, and defaults to UTF-8
-
-* Added explict setting of charset in set_fields! method to make sure Mail has the user defined default
-
-* Removed quoting.rb and refactored for Mail to take responsibility of all quoting and auto encoding requirements for the header.
-
-* Fixed several tests which had incorrect encoding.
-
-* Changed all utf-8 to UTF-8 for consistency
-
-* Whole new API added with tests. See base.rb for full details. Old API is deprecated.
-
-* The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted
-
-* Mail#content_type now returns the content_type field as a string. If you want the mime type of a mail, then you call Mail#mime_type (eg, text/plain), if you want the parameters of the content type field, you call Mail#content_type_parameters which gives you a hash, eg {'format' => 'flowed', 'charset' => 'utf-8'}
-
-* ActionMailer::Base :default_implicit_parts_order now is in the sequence of the order you want, no reversing of ordering takes place. The default order now is text/plain, then text/enriched, then text/html and then any other part that is not one of these three.
-
-* Mail does not have "quoted_body", "quoted_subject" etc. All of these are accessed via body.encoded, subject.encoded etc
-
-* Every object in a Mail object returns an object, never a string. So Mail.body returns a Mail::Body class object, need to call #encoded or #decoded to get the string you want.
-* Mail::Message#set_content_type does not exist, it is simply Mail::Message#content_type
-
-* Every mail message gets a unique message_id unless you specify one, had to change all the tests that check for equality with expected.encoded == actual.encoded to first replace their message_ids with control values
-
-* Mail now has a proper concept of parts, remove the ActionMailer::Part and ActionMailer::PartContainer classes
-
-* Calling #encoded on any object returns it as a string ready to go into the output stream of an email, this means it includes the \r\n at the end of the lines and the object is pre-wrapped with \r\n\t if it is a header field. Also, the "encoded" value includes the field name if it is a header field.
-
-* Attachments are only the actual attachment, with filename etc. A part contains an attachment. The part has the content_type etc. So attachments.last.content_type is invalid. But parts.last.content_type
-
-* There is no idea of a "sub_head" in Mail. A part is just a Message with some extra functionality, so it just has a "header" like a normal mail message
-
-
-*2.3.2 [Final] (March 15, 2009)*
-
-* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones]
-
-* Fixed RFC-2045 quoted-printable bug #1421 [squadette]
-
-* Fixed that no body charset would be set when there are attachments present #740 [Paweł Kondzior]
-
-
-*2.2.1 [RC2] (November 14th, 2008)*
-
-* Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it (This is required for Gmail's SMTP server) #1336 [Grant Hollingworth]
-
-
-*2.2.0 [RC1] (October 24th, 2008)*
-
-* Add layout functionality to mailers [Pratik Naik]
-
- Mailer layouts behaves just like controller layouts, except layout names need to
- have '_mailer' postfix for them to be automatically picked up.
-
-
-*2.1.0 (May 31st, 2008)*
-
-* Fixed that a return-path header would be ignored #7572 [joost]
-
-* Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. #8000 [iaddict, Tarmo Tänav]
-
-* Updated TMail to version 1.2.1 [Mikel Lindsaar]
-
-* Fixed that you don't have to call super in ActionMailer::TestCase#setup #10406 [jamesgolick]
-
-
-*2.0.2* (December 16th, 2007)
-
-* Included in Rails 2.0.2
-
-
-*2.0.1* (December 7th, 2007)
-
-* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [Rick Olson]
-
- * Pass the template_root as an array as ActionView's view_path
- * Request templates with the "#{mailer_name}/#{action}" as opposed to just "#{action}"
-
-* Fixed that partials would be broken when using text.plain.erb as the extension #10130 [java]
-
-* Update README to use new smtp settings configuration API. Closes #10060 [psq]
-
-* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [Zach Dennis]
-
-* Update TMail to v1.1.0. Use an updated version of TMail if available. [Mikel Lindsaar]
-
-* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Michael Koziarski]
-
-* Fix silent failure of rxml templates. #9879 [jstewart]
-
-* Fix attachment decoding when using the TMail C extension. #7861 [orangechicken]
-
-* Increase mail delivery test coverage. #8692 [Kamal Fariz Mahyuddin]
-
-* Register alternative template engines using ActionMailer::Base.register_template_extension('haml'). #7534 [cwd, Josh Peek]
-
-* Only load ActionController::UrlWriter if ActionController is present [Rick Olson]
-
-* Make sure parsed emails recognized attachments nested inside multipart parts. #6714 [Jamis Buck]
-
-* Allow mailer actions named send by using __send__ internally. #6467 [iGEL]
-
-* Add assert_emails and assert_no_emails to test the number of emails delivered. #6479 [Jonathan Viney]
- # Assert total number of emails delivered:
- assert_emails 0
- ContactMailer.deliver_contact
- assert_emails 1
-
- # Assert number of emails delivered within a block:
- assert_emails 1 do
- post :signup, :name => 'Jonathan'
- end
-
-
-*1.3.3* (March 12th, 2007)
-
-* Depend on Action Pack 1.13.3
-
-
-*1.3.2* (February 5th, 2007)
-
-* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Michael Koziarski]
-
-
-*1.3.1* (January 16th, 2007)
-
-* Depend on Action Pack 1.13.1
-
-
-*1.3.0* (January 16th, 2007)
-
-* Make mime version default to 1.0. closes #2323 [ror@andreas-s.net]
-
-* Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154. [jon@siliconcircus.com]
-
-* Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes #4166 and #4452. [Jamis Buck]
-
-* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com]
-
-* Tighten rescue clauses. #5985 [james@grayproductions.net]
-
-* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [David Heinemeier Hansson]
-
-* Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
-
-* Mailer template root applies to a class and its subclasses rather than acting globally. #5555 [somekool@gmail.com]
-
-* Resolve action naming collision. #5520 [ssinghi@kreeti.com]
-
-* ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, Marcel Molina Jr.]
-
-* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
-
-* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
-
-* Correct spurious documentation example code which results in a SyntaxError. [Marcel Molina Jr.]
-
-
-*1.2.1* (April 6th, 2006)
-
-* Be part of Rails 1.1.1
-
-
-*1.2.0* (March 27th, 2006)
-
-* Nil charset caused subject line to be improperly quoted in implicitly multipart messages #2662 [ehalvorsen+rails@runbox.com]
-
-* Parse content-type apart before using it so that sub-parts of the header can be set correctly #2918 [Jamis Buck]
-
-* Make custom headers work in subparts #4034 [elan@bluemandrill.com]
-
-* Template paths with dot chars in them no longer mess up implicit template selection for multipart messages #3332 [Chad Fowler]
-
-* Make sure anything with content-disposition of "attachment" is passed to the attachment presenter when parsing an email body [Jamis Buck]
-
-* Make sure TMail#attachments includes anything with content-disposition of "attachment", regardless of content-type [Jamis Buck]
-
-
-*1.1.5* (December 13th, 2005)
-
-* Become part of Rails 1.0
-
-
-*1.1.4* (December 7th, 2005)
-
-* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
-
-* Stricter matching for implicitly multipart filenames excludes files ending in unsupported extensions (such as foo.rhtml.bak) and without a two-part content type (such as foo.text.rhtml or foo.text.really.plain.rhtml). #2398 [Dave Burt <dave@burt.id.au>, Jeremy Kemper]
-
-
-*1.1.3* (November 7th, 2005)
-
-* Allow Mailers to have custom initialize methods that set default instance variables for all mail actions #2563 [mrj@bigpond.net.au]
-
-
-*1.1.2* (October 26th, 2005)
-
-* Upgraded to Action Pack 1.10.2
-
-
-*1.1.1* (October 19th, 2005)
-
-* Upgraded to Action Pack 1.10.1
-
-
-*1.1.0* (October 16th, 2005)
-
-* Update and extend documentation (rdoc)
-
-* Minero Aoki made TMail available to Rails/ActionMailer under the MIT license (instead of LGPL) [RubyConf '05]
-
-* Austin Ziegler made Text::Simple available to Rails/ActionMailer under a MIT-like licens [See rails ML, subject "Text::Format Licence Exception" on Oct 15, 2005]
-
-* Fix vendor require paths to prevent files being required twice
-
-* Don't add charset to content-type header for a part that contains subparts (for AOL compatibility) #2013 [John Long]
-
-* Preserve underscores when unquoting message bodies #1930
-
-* Encode multibyte characters correctly #1894
-
-* Multipart messages specify a MIME-Version header automatically #2003 [John Long]
-
-* Add a unified render method to ActionMailer (delegates to ActionView::Base#render)
-
-* Move mailer initialization to a separate (overridable) method, so that subclasses may alter the various defaults #1727
-
-* Look at content-location header (if available) to determine filename of attachments #1670
-
-* ActionMailer::Base.deliver(email) had been accidentally removed, but was documented in the Rails book #1849
-
-* Fix problem with sendmail delivery where headers should be delimited by \n characters instead of \r\n, which confuses some mail readers #1742 [Kent Sibilev]
-
-
-*1.0.1* (11 July, 2005)
-
-* Bind to Action Pack 1.9.1
-
-
-*1.0.0* (6 July, 2005)
-
-* Avoid adding nil header values #1392
-
-* Better multipart support with implicit multipart/alternative and sorting of subparts [John Long]
-
-* Allow for nested parts in multipart mails #1570 [Flurin Egger]
-
-* Normalize line endings in outgoing mail bodies to "\n" #1536 [John Long]
-
-* Allow template to be explicitly specified #1448 [tuxie@dekadance.se]
-
-* Allow specific "multipart/xxx" content-type to be set on multipart messages #1412 [Flurin Egger]
-
-* Unquoted @ characters in headers are now accepted in spite of RFC 822 #1206
-
-* Helper support (borrowed from ActionPack)
-
-* Silently ignore Errno::EINVAL errors when converting text.
-
-* Don't cause an error when parsing an encoded attachment name #1340 [lon@speedymac.com]
-
-* Nested multipart message parts are correctly processed in TMail::Mail#body
-
-* BCC headers are removed when sending via SMTP #1402
-
-* Added 'content_type' accessor, to allow content type to be set on a per-message basis. content_type defaults to "text/plain".
-
-* Silently ignore Iconv::IllegalSequence errors when converting text #1341 [lon@speedymac.com]
-
-* Support attachments and multipart messages.
-
-* Added new accessors for the various mail properties.
-
-* Fix to only perform the charset conversion if a 'from' and a 'to' charset are given (make no assumptions about what the charset was) #1276 [Jamis Buck]
-
-* Fix attachments and content-type problems #1276 [Jamis Buck]
-
-* Fixed the TMail#body method to look at the content-transfer-encoding header and unquote the body according to the rules it specifies #1265 [Jamis Buck]
-
-* Added unquoting even if the iconv lib can't be loaded--in that case, only the charset conversion is skipped #1265 [Jamis Buck]
-
-* Added automatic decoding of base64 bodies #1214 [Jamis Buck]
-
-* Added that delivery errors are caught in a way so the mail is still returned whether the delivery was successful or not
-
-* Fixed that email address like "Jamis Buck, M.D." <wild.medicine@example.net> would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 [Jamis Buck]
-
-
-*0.9.1* (20th April, 2005)
-
-* Depend on Action Pack 1.8.1
-
-
-*0.9.0* (19th April, 2005)
-
-* Added that deliver_* will now return the email that was sent
-
-* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
-
-* Fixed quoting for all address headers, not just to #955 [Jamis Buck]
-
-* Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
-
-
-*0.8.1* (27th March, 2005)
-
-* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
-
-* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com]
-
-* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com]
-
-* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
-
-
-*0.8.0* (22th March, 2005)
-
-* Added framework support for processing incoming emails with an Action Mailer class. See example in README.
-
-
-*0.7.1* (7th March, 2005)
-
-* Bind to newest Action Pack (1.5.1)
-
-
-*0.7.0* (24th February, 2005)
-
-* Added support for charsets for both subject and body. The default charset is now UTF-8 #673 [Jamis Buck]. Examples:
-
- def iso_charset(recipient)
- @recipients = recipient
- @subject = "testing iso charsets"
- @from = "system@loudthinking.com"
- @body = "Nothing to see here."
- @charset = "iso-8859-1"
- end
-
- def unencoded_subject(recipient)
- @recipients = recipient
- @subject = "testing unencoded subject"
- @from = "system@loudthinking.com"
- @body = "Nothing to see here."
- @encode_subject = false
- @charset = "iso-8859-1"
- end
-
-
-*0.6.1* (January 18th, 2005)
-
-* Fixed sending of emails to use Tmail#from not the deprecated Tmail#from_address
-
-
-*0.6* (January 17th, 2005)
-
-* Fixed that bcc and cc should be settable through @bcc and @cc -- not just @headers["Bcc"] and @headers["Cc"] #453 [Eric Hodel]
-
-* Fixed Action Mailer to be "warnings safe" so you can run with ruby -w and not get framework warnings #453 [Eric Hodel]
-
-
-*0.5*
-
-* Added access to custom headers, like cc, bcc, and reply-to #268 [Andreas Schwarz]. Example:
-
- def post_notification(recipients, post)
- @recipients = recipients
- @from = post.author.email_address_with_name
- @headers["bcc"] = SYSTEM_ADMINISTRATOR_EMAIL
- @headers["reply-to"] = "notifications@example.com"
- @subject = "[#{post.account.name} #{post.title}]"
- @body["post"] = post
- end
-
-*0.4* (5)
-
-* Consolidated the server configuration options into Base#server_settings= and expanded that with controls for authentication and more [Marten]
- NOTE: This is an API change that could potentially break your application if you used the old application form. Please do change!
-
-* Added Base#deliveries as an accessor for an array of emails sent out through that ActionMailer class when using the :test delivery option. [Jeremy Kemper]
-
-* Added Base#perform_deliveries= which can be set to false to turn off the actual delivery of the email through smtp or sendmail.
- This is especially useful for functional testing that shouldn't send off real emails, but still trigger delivery_* methods.
-
-* Added option to specify delivery method with Base#delivery_method=. Default is :smtp and :sendmail is currently the only other option.
- Sendmail is assumed to be present at "/usr/sbin/sendmail" if that option is used. [Kent Sibilev]
-
-* Dropped "include TMail" as it added to much baggage into the default namespace (like Version) [Chad Fowler]
-
-
-*0.3*
-
-* First release
View
449 actionmailer/CHANGELOG.md
@@ -0,0 +1,449 @@
+## Rails 3.1.0 (August 30, 2011) ##
+
+* No changes
+
+
+## Rails 3.0.7 (April 18, 2011) ##
+
+* remove AM delegating register_observer and register_interceptor to Mail *Josh Kalderimis*
+
+
+* Rails 3.0.6 (April 5, 2011)
+
+* Don't allow i18n to change the minor version, version now set to ~> 0.5.0 *Santiago Pastorino*
+
+
+## Rails 3.0.5 (February 26, 2011) ##
+
+* No changes.
+
+
+## Rails 3.0.4 (February 8, 2011) ##
+
+* No changes.
+
+
+## Rails 3.0.3 (November 16, 2010) ##
+
+* No changes.
+
+
+## Rails 3.0.2 (November 15, 2010) ##
+
+* No changes
+
+
+## Rails 3.0.1 (October 15, 2010) ##
+
+* No Changes, just a version bump.
+
+
+## Rails 3.0.0 (August 29, 2010) ##
+
+* subject is automatically looked up on I18n using mailer_name and action_name as scope as in t(".subject") *JK*
+
+* Changed encoding behaviour of mail, so updated tests in actionmailer and bumped mail version to 2.2.1 *ML*
+
+* Added ability to pass Proc objects to the defaults hash *ML*
+
+* Removed all quoting.rb type files from ActionMailer and put Mail 2.2.0 in instead *ML*
+
+* Lot of updates to various test cases that now work better with the new Mail and so have different expectations
+
+* Added interceptors and observers from Mail *ML*
+
+ ActionMailer::Base.register_interceptor calls Mail.register_interceptor
+ ActionMailer::Base.register_observer calls Mail.register_observer
+
+* Mail::Part now no longer has nil as a default charset, it is always set to something, and defaults to UTF-8
+
+* Added explict setting of charset in set_fields! method to make sure Mail has the user defined default
+
+* Removed quoting.rb and refactored for Mail to take responsibility of all quoting and auto encoding requirements for the header.
+
+* Fixed several tests which had incorrect encoding.
+
+* Changed all utf-8 to UTF-8 for consistency
+
+* Whole new API added with tests. See base.rb for full details. Old API is deprecated.
+
+* The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted
+
+* Mail#content_type now returns the content_type field as a string. If you want the mime type of a mail, then you call Mail#mime_type (eg, text/plain), if you want the parameters of the content type field, you call Mail#content_type_parameters which gives you a hash, eg {'format' => 'flowed', 'charset' => 'utf-8'}
+
+* ActionMailer::Base :default_implicit_parts_order now is in the sequence of the order you want, no reversing of ordering takes place. The default order now is text/plain, then text/enriched, then text/html and then any other part that is not one of these three.
+
+* Mail does not have "quoted_body", "quoted_subject" etc. All of these are accessed via body.encoded, subject.encoded etc
+
+* Every object in a Mail object returns an object, never a string. So Mail.body returns a Mail::Body class object, need to call #encoded or #decoded to get the string you want.
+* Mail::Message#set_content_type does not exist, it is simply Mail::Message#content_type
+
+* Every mail message gets a unique message_id unless you specify one, had to change all the tests that check for equality with expected.encoded == actual.encoded to first replace their message_ids with control values
+
+* Mail now has a proper concept of parts, remove the ActionMailer::Part and ActionMailer::PartContainer classes
+
+* Calling #encoded on any object returns it as a string ready to go into the output stream of an email, this means it includes the \r\n at the end of the lines and the object is pre-wrapped with \r\n\t if it is a header field. Also, the "encoded" value includes the field name if it is a header field.
+
+* Attachments are only the actual attachment, with filename etc. A part contains an attachment. The part has the content_type etc. So attachments.last.content_type is invalid. But parts.last.content_type
+
+* There is no idea of a "sub_head" in Mail. A part is just a Message with some extra functionality, so it just has a "header" like a normal mail message
+
+
+## 2.3.2 Final (March 15, 2009) ##
+
+* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 *Matt Jones*
+
+* Fixed RFC-2045 quoted-printable bug #1421 *squadette*
+
+* Fixed that no body charset would be set when there are attachments present #740 *Paweł Kondzior*
+
+
+## 2.2.1 RC2 (November 14th, 2008) ##
+
+* Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it (This is required for Gmail's SMTP server) #1336 *Grant Hollingworth*
+
+
+## 2.2.0 RC1 (October 24th, 2008) ##
+
+* Add layout functionality to mailers *Pratik Naik*
+
+ Mailer layouts behaves just like controller layouts, except layout names need to
+ have '_mailer' postfix for them to be automatically picked up.
+
+
+## 2.1.0 (May 31st, 2008) ##
+
+* Fixed that a return-path header would be ignored #7572 *joost*
+
+* Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. #8000 *iaddict, Tarmo Tänav*
+
+* Updated TMail to version 1.2.1 *Mikel Lindsaar*
+
+* Fixed that you don't have to call super in ActionMailer::TestCase#setup #10406 *jamesgolick*
+
+
+## 2.0.2 (December 16th, 2007) ##
+
+* Included in Rails 2.0.2
+
+
+## 2.0.1 (December 7th, 2007) ##
+
+* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 *Rick Olson*
+
+ * Pass the template_root as an array as ActionView's view_path
+ * Request templates with the "#{mailer_name}/#{action}" as opposed to just "#{action}"
+
+* Fixed that partials would be broken when using text.plain.erb as the extension #10130 *java*
+
+* Update README to use new smtp settings configuration API. Closes #10060 *psq*
+
+* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 *Zach Dennis*
+
+* Update TMail to v1.1.0. Use an updated version of TMail if available. *Mikel Lindsaar*
+
+* Introduce a new base test class for testing Mailers. ActionMailer::TestCase *Michael Koziarski*
+
+* Fix silent failure of rxml templates. #9879 *jstewart*
+
+* Fix attachment decoding when using the TMail C extension. #7861 *orangechicken*
+
+* Increase mail delivery test coverage. #8692 *Kamal Fariz Mahyuddin*
+
+* Register alternative template engines using ActionMailer::Base.register_template_extension('haml'). #7534 *cwd, Josh Peek*
+
+* Only load ActionController::UrlWriter if ActionController is present *Rick Olson*
+
+* Make sure parsed emails recognized attachments nested inside multipart parts. #6714 *Jamis Buck*
+
+* Allow mailer actions named send by using __send__ internally. #6467 *iGEL*
+
+* Add assert_emails and assert_no_emails to test the number of emails delivered. #6479 *Jonathan Viney*
+ # Assert total number of emails delivered:
+ assert_emails 0
+ ContactMailer.deliver_contact
+ assert_emails 1
+
+ # Assert number of emails delivered within a block:
+ assert_emails 1 do
+ post :signup, :name => 'Jonathan'
+ end
+
+
+## 1.3.3 (March 12th, 2007) ##
+
+* Depend on Action Pack 1.13.3
+
+
+## 1.3.2 (February 5th, 2007) ##
+
+* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. *Michael Koziarski*
+
+
+## 1.3.1 (January 16th, 2007) ##
+
+* Depend on Action Pack 1.13.1
+
+
+## 1.3.0 (January 16th, 2007) ##
+
+* Make mime version default to 1.0. closes #2323 *ror@andreas-s.net*
+
+* Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154. *jon@siliconcircus.com*
+
+* Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes #4166 and #4452. *Jamis Buck*
+
+* Fixed that iconv decoding should catch InvalidEncoding #3153 *jon@siliconcircus.com*
+
+* Tighten rescue clauses. #5985 *james@grayproductions.net*
+
+* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. *David Heinemeier Hansson*
+
+* Replace Reloadable with Reloadable::Deprecated. *Nicholas Seckar*
+
+* Mailer template root applies to a class and its subclasses rather than acting globally. #5555 *somekool@gmail.com*
+
+* Resolve action naming collision. #5520 *ssinghi@kreeti.com*
+
+* ActionMailer::Base documentation rewrite. Closes #4991 *Kevin Clark, Marcel Molina Jr.*
+
+* Replace alias method chaining with Module#alias_method_chain. *Marcel Molina Jr.*
+
+* Replace Ruby's deprecated append_features in favor of included. *Marcel Molina Jr.*
+
+* Correct spurious documentation example code which results in a SyntaxError. *Marcel Molina Jr.*
+
+
+## 1.2.1 (April 6th, 2006) ##
+
+* Be part of Rails 1.1.1
+
+
+## 1.2.0 (March 27th, 2006) ##
+
+* Nil charset caused subject line to be improperly quoted in implicitly multipart messages #2662 *ehalvorsen+rails@runbox.com*
+
+* Parse content-type apart before using it so that sub-parts of the header can be set correctly #2918 *Jamis Buck*
+
+* Make custom headers work in subparts #4034 *elan@bluemandrill.com*
+
+* Template paths with dot chars in them no longer mess up implicit template selection for multipart messages #3332 *Chad Fowler*
+
+* Make sure anything with content-disposition of "attachment" is passed to the attachment presenter when parsing an email body *Jamis Buck*
+
+* Make sure TMail#attachments includes anything with content-disposition of "attachment", regardless of content-type *Jamis Buck*
+
+
+## 1.1.5 (December 13th, 2005) ##
+
+* Become part of Rails 1.0
+
+
+## 1.1.4 (December 7th, 2005) ##
+
+* Rename Version constant to VERSION. #2802 *Marcel Molina Jr.*
+
+* Stricter matching for implicitly multipart filenames excludes files ending in unsupported extensions (such as foo.rhtml.bak) and without a two-part content type (such as foo.text.rhtml or foo.text.really.plain.rhtml). #2398 *Dave Burt <dave@burt.id.au>, Jeremy Kemper*
+
+
+## 1.1.3 (November 7th, 2005) ##
+
+* Allow Mailers to have custom initialize methods that set default instance variables for all mail actions #2563 *mrj@bigpond.net.au*
+
+
+## 1.1.2 (October 26th, 2005) ##
+
+* Upgraded to Action Pack 1.10.2
+
+
+## 1.1.1 (October 19th, 2005) ##
+
+* Upgraded to Action Pack 1.10.1
+
+
+## 1.1.0 (October 16th, 2005) ##
+
+* Update and extend documentation (rdoc)
+
+* Minero Aoki made TMail available to Rails/ActionMailer under the MIT license (instead of LGPL) *RubyConf '05*
+
+* Austin Ziegler made Text::Simple available to Rails/ActionMailer under a MIT-like licens *See rails ML, subject "Text::Format Licence Exception" on Oct 15, 2005*
+
+* Fix vendor require paths to prevent files being required twice
+
+* Don't add charset to content-type header for a part that contains subparts (for AOL compatibility) #2013 *John Long*
+
+* Preserve underscores when unquoting message bodies #1930
+
+* Encode multibyte characters correctly #1894
+
+* Multipart messages specify a MIME-Version header automatically #2003 *John Long*
+
+* Add a unified render method to ActionMailer (delegates to ActionView::Base#render)
+
+* Move mailer initialization to a separate (overridable) method, so that subclasses may alter the various defaults #1727
+
+* Look at content-location header (if available) to determine filename of attachments #1670
+
+* ActionMailer::Base.deliver(email) had been accidentally removed, but was documented in the Rails book #1849
+
+* Fix problem with sendmail delivery where headers should be delimited by \n characters instead of \r\n, which confuses some mail readers #1742 *Kent Sibilev*
+
+
+## 1.0.1 (11 July, 2005) ##
+
+* Bind to Action Pack 1.9.1
+
+
+## 1.0.0 (6 July, 2005) ##
+
+* Avoid adding nil header values #1392
+
+* Better multipart support with implicit multipart/alternative and sorting of subparts *John Long*
+
+* Allow for nested parts in multipart mails #1570 *Flurin Egger*
+
+* Normalize line endings in outgoing mail bodies to "\n" #1536 *John Long*
+
+* Allow template to be explicitly specified #1448 *tuxie@dekadance.se*
+
+* Allow specific "multipart/xxx" content-type to be set on multipart messages #1412 *Flurin Egger*
+
+* Unquoted @ characters in headers are now accepted in spite of RFC 822 #1206
+
+* Helper support (borrowed from ActionPack)
+
+* Silently ignore Errno::EINVAL errors when converting text.
+
+* Don't cause an error when parsing an encoded attachment name #1340 *lon@speedymac.com*
+
+* Nested multipart message parts are correctly processed in TMail::Mail#body
+
+* BCC headers are removed when sending via SMTP #1402
+
+* Added 'content_type' accessor, to allow content type to be set on a per-message basis. content_type defaults to "text/plain".
+
+* Silently ignore Iconv::IllegalSequence errors when converting text #1341 *lon@speedymac.com*
+
+* Support attachments and multipart messages.
+
+* Added new accessors for the various mail properties.
+
+* Fix to only perform the charset conversion if a 'from' and a 'to' charset are given (make no assumptions about what the charset was) #1276 *Jamis Buck*
+
+* Fix attachments and content-type problems #1276 *Jamis Buck*
+
+* Fixed the TMail#body method to look at the content-transfer-encoding header and unquote the body according to the rules it specifies #1265 *Jamis Buck*
+
+* Added unquoting even if the iconv lib can't be loaded--in that case, only the charset conversion is skipped #1265 *Jamis Buck*
+
+* Added automatic decoding of base64 bodies #1214 *Jamis Buck*
+
+* Added that delivery errors are caught in a way so the mail is still returned whether the delivery was successful or not
+
+* Fixed that email address like "Jamis Buck, M.D." <wild.medicine@example.net> would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 *Jamis Buck*
+
+
+## 0.9.1 (20th April, 2005) ##
+
+* Depend on Action Pack 1.8.1
+
+
+## 0.9.0 (19th April, 2005) ##
+
+* Added that deliver_* will now return the email that was sent
+
+* Added that quoting to UTF-8 only happens if the characters used are in that range #955 *Jamis Buck*
+
+* Fixed quoting for all address headers, not just to #955 *Jamis Buck*
+
+* Fixed unquoting of emails that doesn't have an explicit charset #1036 *wolfgang@stufenlos.net*
+
+
+## 0.8.1 (27th March, 2005) ##
+
+* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 *lon@speedymac.com*
+
+* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 *lon@speedymac.com*
+
+* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 *lon@speedymac.com*
+
+* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
+
+
+## 0.8.0 (22th March, 2005) ##
+
+* Added framework support for processing incoming emails with an Action Mailer class. See example in README.
+
+
+## 0.7.1 (7th March, 2005) ##
+
+* Bind to newest Action Pack (1.5.1)
+
+
+## 0.7.0 (24th February, 2005) ##
+
+* Added support for charsets for both subject and body. The default charset is now UTF-8 #673 [Jamis Buck]. Examples:
+
+ def iso_charset(recipient)
+ @recipients = recipient
+ @subject = "testing iso charsets"
+ @from = "system@loudthinking.com"
+ @body = "Nothing to see here."
+ @charset = "iso-8859-1"
+ end
+
+ def unencoded_subject(recipient)
+ @recipients = recipient
+ @subject = "testing unencoded subject"
+ @from = "system@loudthinking.com"
+ @body = "Nothing to see here."
+ @encode_subject = false
+ @charset = "iso-8859-1"
+ end
+
+
+## 0.6.1 (January 18th, 2005) ##
+
+* Fixed sending of emails to use Tmail#from not the deprecated Tmail#from_address
+
+
+## 0.6 (January 17th, 2005) ##
+
+* Fixed that bcc and cc should be settable through @bcc and @cc -- not just @headers["Bcc"] and @headers["Cc"] #453 *Eric Hodel*
+
+* Fixed Action Mailer to be "warnings safe" so you can run with ruby -w and not get framework warnings #453 *Eric Hodel*
+
+
+## 0.5 ##
+
+* Added access to custom headers, like cc, bcc, and reply-to #268 [Andreas Schwarz]. Example:
+
+ def post_notification(recipients, post)
+ @recipients = recipients
+ @from = post.author.email_address_with_name
+ @headers["bcc"] = SYSTEM_ADMINISTRATOR_EMAIL
+ @headers["reply-to"] = "notifications@example.com"
+ @subject = "[#{post.account.name} #{post.title}]"
+ @body["post"] = post
+ end
+
+## 0.4 (5) ##
+
+* Consolidated the server configuration options into Base#server_settings= and expanded that with controls for authentication and more *Marten*
+ NOTE: This is an API change that could potentially break your application if you used the old application form. Please do change!
+
+* Added Base#deliveries as an accessor for an array of emails sent out through that ActionMailer class when using the :test delivery option. *Jeremy Kemper*
+
+* Added Base#perform_deliveries= which can be set to false to turn off the actual delivery of the email through smtp or sendmail.
+ This is especially useful for functional testing that shouldn't send off real emails, but still trigger delivery_* methods.
+
+* Added option to specify delivery method with Base#delivery_method=. Default is :smtp and :sendmail is currently the only other option.
+ Sendmail is assumed to be present at "/usr/sbin/sendmail" if that option is used. *Kent Sibilev*
+
+* Dropped "include TMail" as it added to much baggage into the default namespace (like Version) *Chad Fowler*
+
+
+## 0.3 ##
+
+* First release
View
2  actionmailer/README.rdoc
@@ -59,6 +59,8 @@ generated would look like this:
Mr. david@loudthinking.com
+ Thank you for signing up!
+
In previous version of Rails you would call <tt>create_method_name</tt> and
<tt>deliver_method_name</tt>. Rails 3.0 has a much simpler interface, you
simply call the method and optionally call +deliver+ on the return value.
View
2  actionmailer/actionmailer.gemspec
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.email = 'david@loudthinking.com'
s.homepage = 'http://www.rubyonrails.org'
- s.files = Dir['CHANGELOG', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*']
+ s.files = Dir['CHANGELOG.md', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*']
s.require_path = 'lib'
s.requirements << 'none'
View
6 actionmailer/lib/action_mailer/base.rb
@@ -100,12 +100,12 @@ module ActionMailer #:nodoc:
# You can even use Action Pack helpers in these views. For example:
#
# You got a new note!
- # <%= truncate(@note.body, 25) %>
+ # <%= truncate(@note.body, :length => 25) %>
#
# If you need to access the subject, from or the recipients in the view, you can do that through message object:
#
# You got a new note from <%= message.from %>!
- # <%= truncate(@note.body, 25) %>
+ # <%= truncate(@note.body, :length => 25) %>
#
#
# = Generating URLs
@@ -524,7 +524,7 @@ def attachments
#
# * <tt>:subject</tt> - The subject of the message, if this is omitted, Action Mailer will
# ask the Rails I18n class for a translated <tt>:subject</tt> in the scope of
- # <tt>[:actionmailer, mailer_scope, action_name]</tt> or if this is missing, will translate the
+ # <tt>[mailer_scope, action_name]</tt> or if this is missing, will translate the
# humanized version of the <tt>action_name</tt>
# * <tt>:to</tt> - Who the message is destined for, can be a string of addresses, or an array
# of addresses.
View
9 actionmailer/lib/action_mailer/test_case.rb
@@ -17,7 +17,14 @@ module Behavior
module ClassMethods
def tests(mailer)
- self._mailer_class = mailer
+ case mailer
+ when String, Symbol
+ self._mailer_class = mailer.to_s.camelize.constantize
+ when Module
+ self._mailer_class = mailer
+ else
+ raise NonInferrableMailerError.new(mailer)
+ end
end
def mailer_class
View
2  actionmailer/test/mailers/base_mailer.rb
@@ -113,6 +113,6 @@ def different_layout(layout_name='')
end
def email_with_translations
- mail :body => render("email_with_translations.html")
+ mail :body => render("email_with_translations", :formats => [:html])
end
end
View
28 actionmailer/test/test_test.rb
@@ -0,0 +1,28 @@
+require 'abstract_unit'
+
+class TestTestMailer < ActionMailer::Base
+end
+
+class CrazyNameMailerTest < ActionMailer::TestCase
+ tests TestTestMailer
+
+ def test_set_mailer_class_manual
+ assert_equal TestTestMailer, self.class.mailer_class
+ end
+end
+
+class CrazySymbolNameMailerTest < ActionMailer::TestCase
+ tests :test_test_mailer
+
+ def test_set_mailer_class_manual_using_symbol
+ assert_equal TestTestMailer, self.class.mailer_class
+ end
+end
+
+class CrazyStringNameMailerTest < ActionMailer::TestCase
+ tests 'test_test_mailer'
+
+ def test_set_mailer_class_manual_using_string
+ assert_equal TestTestMailer, self.class.mailer_class
+ end
+end
View
5,587 actionpack/CHANGELOG
0 additions, 5,587 deletions not shown
View
5,724 actionpack/CHANGELOG.md
5,724 additions, 0 deletions not shown
View
2  actionpack/RUNNING_UNIT_TESTS
@@ -18,7 +18,7 @@ which can be further narrowed down to one test:
== Dependency on Active Record and database setup
-Test cases in the test/controller/active_record/ directory depend on having
+Test cases in the test/active_record/ directory depend on having
activerecord and sqlite installed. If Active Record is not in
actionpack/../activerecord directory, or the sqlite rubygem is not installed,
these tests are skipped.
View
5 actionpack/Rakefile
@@ -26,6 +26,11 @@ namespace :test do
Rake::TestTask.new(:isolated) do |t|
t.pattern = 'test/ts_isolated.rb'
end
+
+ Rake::TestTask.new(:template) do |t|
+ t.libs << 'test'
+ t.pattern = 'test/template/**/*.rb'
+ end
end
desc 'ActiveRecord Integration Tests'
View
24 actionpack/actionpack.gemspec
@@ -12,20 +12,20 @@ Gem::Specification.new do |s|
s.email = 'david@loudthinking.com'
s.homepage = 'http://www.rubyonrails.org'
- s.files = Dir['CHANGELOG', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*']
+ s.files = Dir['CHANGELOG.md', 'README.rdoc', 'MIT-LICENSE', 'lib/**/*']
s.require_path = 'lib'
s.requirements << 'none'
- s.add_dependency('activesupport', version)
- s.add_dependency('activemodel', version)
- s.add_dependency('rack-cache', '~> 1.0.2')
- s.add_dependency('builder', '~> 3.0.0')
- s.add_dependency('i18n', '~> 0.6')
- s.add_dependency('rack', '~> 1.3.2')
- s.add_dependency('rack-test', '~> 0.6.0')
- s.add_dependency('rack-mount', '~> 0.8.1')
- s.add_dependency('sprockets', '~> 2.0.0.beta.12')
- s.add_dependency('erubis', '~> 2.7.0')
+ s.add_dependency('activesupport', version)
+ s.add_dependency('activemodel', version)
+ s.add_dependency('rack-cache', '~> 1.1')
+ s.add_dependency('builder', '~> 3.0.0')
+ s.add_dependency('i18n', '~> 0.6')
+ s.add_dependency('rack', '~> 1.3.5')
+ s.add_dependency('rack-test', '~> 0.6.1')
+ s.add_dependency('journey', '~> 1.0.0')
+ s.add_dependency('sprockets', '~> 2.1.1')
+ s.add_dependency('erubis', '~> 2.7.0')
- s.add_development_dependency('tzinfo', '~> 0.3.29')
+ s.add_development_dependency('tzinfo', '~> 0.3.29')
end
View
3  actionpack/lib/abstract_controller/asset_paths.rb
@@ -3,7 +3,8 @@ module AssetPaths
extend ActiveSupport::Concern
included do
- config_accessor :asset_host, :asset_path, :assets_dir, :javascripts_dir, :stylesheets_dir
+ config_accessor :asset_host, :asset_path, :assets_dir, :javascripts_dir,
+ :stylesheets_dir, :default_asset_host_protocol
end
end
end
View
4 actionpack/lib/abstract_controller/callbacks.rb
@@ -177,7 +177,7 @@ def #{filter}_filter(*names, &blk)
def prepend_#{filter}_filter(*names, &blk) # def prepend_before_filter(*names, &blk)
_insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options|
options[:if] = (Array.wrap(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array.wrap(options[:if]) << "!halted") if false
- set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) # set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true))
+ set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) # set_callback(:process_action, :before, name, options.merge(:prepend => true))
end # end
end # end
@@ -185,7 +185,7 @@ def prepend_#{filter}_filter(*names, &blk)
# for details on the allowed parameters.
def skip_#{filter}_filter(*names, &blk) # def skip_before_filter(*names, &blk)
_insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options|
- skip_callback(:process_action, :#{filter}, name, options) # skip_callback(:process_action, :#{filter}, name, options)
+ skip_callback(:process_action, :#{filter}, name, options) # skip_callback(:process_action, :before, name, options)
end # end
end # end
View
17 actionpack/lib/abstract_controller/layouts.rb
@@ -213,7 +213,7 @@ def action_has_layout?
# true:: raise an ArgumentError
#
# ==== Parameters
- # * <tt>String, Symbol, false</tt> - The layout to use.
+ # * <tt>layout</tt> - The layout to use.
#
# ==== Options (conditions)
# * :only - A list of actions to apply this layout to.
@@ -310,14 +310,10 @@ def action_has_layout?
# This will be overwritten by _write_layout_method
def _layout; end
- # Determine the layout for a given name and details, taking into account
- # the name type.
+ # Determine the layout for a given name, taking into account the name type.
#
# ==== Parameters
# * <tt>name</tt> - The name of the template
- # * <tt>details</tt> - A list of details to restrict
- # the lookup to. By default, layout lookup is limited to the
- # formats specified for the current request.
def _layout_for_option(name)
case name
when String then name
@@ -330,15 +326,12 @@ def _layout_for_option(name)
end
end
- # Returns the default layout for this controller and a given set of details.
+ # Returns the default layout for this controller.
# Optionally raises an exception if the layout could not be found.
#
# ==== Parameters
- # * <tt>details</tt> - A list of details to restrict the search by. This
- # might include details like the format or locale of the template.
- # * <tt>require_layout</tt> - If this is true, raise an ArgumentError
- # with details about the fact that the exception could not be
- # found (defaults to false)
+ # * <tt>require_layout</tt> - If set to true and layout is not found,
+ # an ArgumentError exception is raised (defaults to false)
#
# ==== Returns
# * <tt>template</tt> - The template object for the default layout (or nil)
View
4 actionpack/lib/abstract_controller/railties/routes_helpers.rb
@@ -5,8 +5,8 @@ def self.with(routes)
Module.new do
define_method(:inherited) do |klass|
super(klass)
- if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
- klass.send(:include, namespace._railtie.routes.url_helpers)
+ if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
+ klass.send(:include, namespace.railtie_routes_url_helpers)
else
klass.send(:include, routes.url_helpers)
end
View
4 actionpack/lib/abstract_controller/rendering.rb
@@ -120,8 +120,6 @@ def _render_template(options) #:nodoc:
view_renderer.render(view_context, options)
end
- private
-
DEFAULT_PROTECTED_INSTANCE_VARIABLES = %w(
@_action_name @_response_body @_formats @_prefixes @_config
@_view_context_class @_view_renderer @_lookup_context
@@ -139,6 +137,8 @@ def view_assigns
hash
end
+ private
+
# Normalize args and options.
# :api: private
def _normalize_render(*args, &block)
View
4 actionpack/lib/action_controller/base.rb
@@ -50,7 +50,7 @@ module ActionController
#
# All request parameters, whether they come from a GET or POST request, or from the URL, are available through the params method
# which returns a hash. For example, an action that was performed through <tt>/posts?category=All&limit=5</tt> will include
- # <tt>{ "category" => "All", "limit" => 5 }</tt> in params.
+ # <tt>{ "category" => "All", "limit" => "5" }</tt> in params.
#
# It's also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as:
#
@@ -63,7 +63,7 @@ module ActionController
#
# == Sessions
#
- # Sessions allows you to store objects in between requests. This is useful for objects that are not yet ready to be persisted,
+ # Sessions allow you to store objects in between requests. This is useful for objects that are not yet ready to be persisted,
# such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such
# as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it's likely
# they could be changed unknowingly. It's usually too much work to keep it all synchronized -- something databases already excel at.
View
1  actionpack/lib/action_controller/caching.rb
@@ -24,7 +24,6 @@ module ActionController #:nodoc:
#
# config.action_controller.cache_store = :memory_store
# config.action_controller.cache_store = :file_store, "/path/to/cache/directory"
- # config.action_controller.cache_store = :drb_store, "druby://localhost:9192"
# config.action_controller.cache_store = :mem_cache_store, "localhost"
# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new("localhost:11211")
# config.action_controller.cache_store = MyOwnStore.new("parameter")
View
2  actionpack/lib/action_controller/caching/actions.rb
@@ -175,7 +175,7 @@ def initialize(controller, options = {}, infer_extension = true)
private
def normalize!(path)
path << 'index' if path[-1] == ?/
- path << ".#{extension}" if extension and !path.ends_with?(extension)
+ path << ".#{extension}" if extension and !path.split('?').first.ends_with?(".#{extension}")
URI.parser.unescape(path)
end
end
View
2  actionpack/lib/action_controller/caching/pages.rb
@@ -122,7 +122,7 @@ def expire_page(options = {})
if options.is_a?(Hash)
if options[:action].is_a?(Array)
- options[:action].dup.each do |action|
+ options[:action].each do |action|
self.class.expire_page(url_for(options.merge(:only_path => true, :action => action)))
end
else
View
2  actionpack/lib/action_controller/caching/sweeping.rb
@@ -88,7 +88,7 @@ def callback(timing)
end
def method_missing(method, *arguments, &block)
- return if @controller.nil?
+ return unless @controller
@controller.__send__(method, *arguments, &block)
end
end
View
8 actionpack/lib/action_controller/metal.rb
@@ -182,7 +182,13 @@ def status=(status)
end
def response_body=(val)
- body = val.nil? ? nil : (val.respond_to?(:each) ? val : [val])
+ body = if val.is_a?(String)
+ [val]
+ elsif val.nil? || val.respond_to?(:each)
+ val
+ else
+ [val]
+ end
super body
end
View
4 actionpack/lib/action_controller/metal/data_streaming.rb
@@ -34,7 +34,7 @@ module DataStreaming
# If no content type is registered for the extension, default type 'application/octet-stream' will be used.
# * <tt>:disposition</tt> - specifies whether the file will be shown inline or downloaded.
# Valid values are 'inline' and 'attachment' (default).
- # * <tt>:status</tt> - specifies the status code to send with the response. Defaults to '200 OK'.
+ # * <tt>:status</tt> - specifies the status code to send with the response. Defaults to 200.
# * <tt>:url_based_filename</tt> - set to +true+ if you want the browser guess the filename from
# the URL, which is necessary for i18n filenames on certain browsers
# (setting <tt>:filename</tt> overrides this option).
@@ -92,7 +92,7 @@ def send_file(path, options = {}) #:doc:
# If no content type is registered for the extension, default type 'application/octet-stream' will be used.
# * <tt>:disposition</tt> - specifies whether the file will be shown inline or downloaded.
# Valid values are 'inline' and 'attachment' (default).
- # * <tt>:status</tt> - specifies the status code to send with the response. Defaults to '200 OK'.
+ # * <tt>:status</tt> - specifies the status code to send with the response. Defaults to 200.
#
# Generic data download:
#
View
7 actionpack/lib/action_controller/metal/force_ssl.rb
@@ -24,12 +24,15 @@ module ClassMethods
# * <tt>only</tt> - The callback should be run only for this action
# * <tt>except<tt> - The callback should be run for all actions except this action
def force_ssl(options = {})
+ host = options.delete(:host)
before_filter(options) do
if !request.ssl? && !Rails.env.development?
- redirect_to :protocol => 'https://', :status => :moved_permanently
+ redirect_options = {:protocol => 'https://', :status => :moved_permanently}
+ redirect_options.merge!(:host => host) if host
+ redirect_to redirect_options
end
end
end
end
end
-end
+end
View
2  actionpack/lib/action_controller/metal/head.rb
@@ -9,6 +9,8 @@ module Head
#
# head :created, :location => person_path(@person)
#
+ # head :created, :location => @person
+ #
# It can also be used to return exceptional conditions:
#
# return head(:method_not_allowed) unless request.post?
View
9 actionpack/lib/action_controller/metal/helpers.rb
@@ -7,9 +7,12 @@ module ActionController
# by default.
#
# In addition to using the standard template helpers provided, creating custom helpers to
- # extract complicated logic or reusable functionality is strongly encouraged. By default, the controller will
- # include a helper whose name matches that of the controller, e.g., <tt>MyController</tt> will automatically
- # include <tt>MyHelper</tt>.
+ # extract complicated logic or reusable functionality is strongly encouraged. By default, each controller
+ # will include all helpers.
+ #
+ # In previous versions of \Rails the controller will include a helper whose
+ # name matches that of the controller, e.g., <tt>MyController</tt> will automatically
+ # include <tt>MyHelper</tt>. To return old behavior set +config.action_controller.include_all_helpers+ to +false+.
#
# Additional helpers can be specified using the +helper+ class method in ActionController::Base or any
# controller which inherits from it.
View
2  actionpack/lib/action_controller/metal/http_authentication.rb
@@ -145,7 +145,7 @@ def decode_credentials(request)
end
def encode_credentials(user_name, password)
- "Basic #{ActiveSupport::Base64.encode64("#{user_name}:#{password}")}"
+ "Basic #{ActiveSupport::Base64.encode64s("#{user_name}:#{password}")}"