Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove rails 2.3.2

  • Loading branch information...
commit 9333c2ee7dc6f0aa1fab184e0ccea81733a77697 1 parent c590e3d
@emiddleton emiddleton authored
Showing with 0 additions and 34,988 deletions.
  1. +0 −20 vendor/rails/.gitignore
  2. 0  vendor/rails/REVISION_7fe8b630ce47f62409aabb609e81ff676df56bd3
  3. +0 −358 vendor/rails/actionmailer/CHANGELOG
  4. +0 −21 vendor/rails/actionmailer/MIT-LICENSE
  5. +0 −149 vendor/rails/actionmailer/README
  6. +0 −98 vendor/rails/actionmailer/Rakefile
  7. +0 −30 vendor/rails/actionmailer/install.rb
  8. +0 −62 vendor/rails/actionmailer/lib/action_mailer.rb
  9. +0 −30 vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
  10. +0 −705 vendor/rails/actionmailer/lib/action_mailer/base.rb
  11. +0 −113 vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  12. +0 −17 vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb
  13. +0 −107 vendor/rails/actionmailer/lib/action_mailer/part.rb
  14. +0 −55 vendor/rails/actionmailer/lib/action_mailer/part_container.rb
  15. +0 −61 vendor/rails/actionmailer/lib/action_mailer/quoting.rb
  16. +0 −64 vendor/rails/actionmailer/lib/action_mailer/test_case.rb
  17. +0 −68 vendor/rails/actionmailer/lib/action_mailer/test_helper.rb
  18. +0 −7 vendor/rails/actionmailer/lib/action_mailer/utils.rb
  19. +0 −1,466 vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
  20. +0 −10 vendor/rails/actionmailer/lib/action_mailer/vendor/text_format.rb
  21. +0 −5 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb
  22. +0 −426 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb
  23. +0 −46 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb
  24. +0 −46 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb
  25. +0 −41 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb
  26. +0 −67 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb
  27. +0 −63 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb
  28. +0 −581 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb
  29. +0 −960 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb
  30. +0 −9 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb
  31. +0 −1,130 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb
  32. +0 −3  vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb
  33. +0 −578 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb
  34. +0 −495 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb
  35. +0 −6 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb
  36. +0 −3  vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb
  37. +0 −248 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb
  38. +0 −132 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb
  39. +0 −1,476 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb
  40. +0 −379 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb
  41. +0 −118 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb
  42. +0 −58 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb
  43. +0 −49 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb
  44. +0 −261 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb
  45. +0 −280 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb
  46. +0 −337 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb
  47. +0 −39 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb
  48. +0 −17 vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb
  49. +0 −9 vendor/rails/actionmailer/lib/action_mailer/version.rb
  50. +0 −1  vendor/rails/actionmailer/lib/actionmailer.rb
  51. +0 −65 vendor/rails/actionmailer/test/abstract_unit.rb
  52. +0 −54 vendor/rails/actionmailer/test/asset_host_test.rb
  53. +0 −51 vendor/rails/actionmailer/test/delivery_method_test.rb
  54. +0 −1  vendor/rails/actionmailer/test/fixtures/asset_host_mailer/email_with_asset.html.erb
  55. +0 −1  vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/hello.html.erb
  56. +0 −1  vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.html.erb
  57. +0 −1  vendor/rails/actionmailer/test/fixtures/auto_layout_mailer/multipart.text.plain.erb
  58. +0 −1  vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/logout.html.erb
  59. +0 −1  vendor/rails/actionmailer/test/fixtures/explicit_layout_mailer/signup.html.erb
  60. +0 −1  vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb
  61. +0 −1  vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb
  62. +0 −1  vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb
  63. +0 −1  vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb
  64. +0 −5 vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb
  65. +0 −5 vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb
  66. +0 −1  vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.html.erb
  67. +0 −1  vendor/rails/actionmailer/test/fixtures/layouts/auto_layout_mailer.text.erb
  68. +0 −1  vendor/rails/actionmailer/test/fixtures/layouts/spam.html.erb
  69. +0 −1  ...ails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb
  70. +0 −14 vendor/rails/actionmailer/test/fixtures/raw_email
  71. +0 −20 vendor/rails/actionmailer/test/fixtures/raw_email10
  72. +0 −32 vendor/rails/actionmailer/test/fixtures/raw_email12
  73. +0 −29 vendor/rails/actionmailer/test/fixtures/raw_email13
  74. +0 −114 vendor/rails/actionmailer/test/fixtures/raw_email2
  75. +0 −70 vendor/rails/actionmailer/test/fixtures/raw_email3
  76. +0 −59 vendor/rails/actionmailer/test/fixtures/raw_email4
  77. +0 −19 vendor/rails/actionmailer/test/fixtures/raw_email5
  78. +0 −20 vendor/rails/actionmailer/test/fixtures/raw_email6
  79. +0 −66 vendor/rails/actionmailer/test/fixtures/raw_email7
  80. +0 −47 vendor/rails/actionmailer/test/fixtures/raw_email8
  81. +0 −28 vendor/rails/actionmailer/test/fixtures/raw_email9
  82. +0 −14 vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a
  83. +0 −104 vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type
  84. +0 −100 vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment
  85. +0 −14 vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject
  86. +0 −1  vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb
  87. +0 −3  vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb
  88. +0 −1  vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb
  89. +0 −2  vendor/rails/actionmailer/test/fixtures/test_mailer/body_ivar.erb
  90. +0 −6 vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml
  91. +0 −6 vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml
  92. +0 −1  vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb
  93. +0 −1  vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak
  94. +0 −10 vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb
  95. +0 −2  vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb
  96. +0 −1  vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb
  97. +0 −1  vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb
  98. +0 −2  vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder
  99. +0 −2  vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml
  100. +0 −3  vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb
  101. +0 −5 vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb
  102. +0 −95 vendor/rails/actionmailer/test/mail_helper_test.rb
  103. +0 −123 vendor/rails/actionmailer/test/mail_layout_test.rb
  104. +0 −116 vendor/rails/actionmailer/test/mail_render_test.rb
  105. +0 −1,078 vendor/rails/actionmailer/test/mail_service_test.rb
  106. +0 −99 vendor/rails/actionmailer/test/quoting_test.rb
  107. +0 −129 vendor/rails/actionmailer/test/test_helper_test.rb
  108. +0 −22 vendor/rails/actionmailer/test/tmail_test.rb
  109. +0 −76 vendor/rails/actionmailer/test/url_test.rb
  110. +0 −5,156 vendor/rails/actionpack/CHANGELOG
  111. +0 −21 vendor/rails/actionpack/MIT-LICENSE
  112. +0 −409 vendor/rails/actionpack/README
  113. +0 −24 vendor/rails/actionpack/RUNNING_UNIT_TESTS
  114. +0 −158 vendor/rails/actionpack/Rakefile
  115. +0 −30 vendor/rails/actionpack/install.rb
  116. +0 −116 vendor/rails/actionpack/lib/action_controller.rb
  117. +0 −39 vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
  118. +0 −21 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
  119. +0 −150 vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb
  120. +0 −146 vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb
  121. +0 −632 vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  122. +0 −127 vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
  123. +0 −1,414 vendor/rails/actionpack/lib/action_controller/base.rb
  124. +0 −107 vendor/rails/actionpack/lib/action_controller/benchmarking.rb
  125. +0 −70 vendor/rails/actionpack/lib/action_controller/caching.rb
  126. +0 −169 vendor/rails/actionpack/lib/action_controller/caching/actions.rb
  127. +0 −120 vendor/rails/actionpack/lib/action_controller/caching/fragments.rb
  128. +0 −152 vendor/rails/actionpack/lib/action_controller/caching/pages.rb
  129. +0 −45 vendor/rails/actionpack/lib/action_controller/caching/sweeper.rb
  130. +0 −55 vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb
  131. +0 −15 vendor/rails/actionpack/lib/action_controller/cgi_ext.rb
  132. +0 −112 vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb
  133. +0 −22 vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb
  134. +0 −24 vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb
  135. +0 −77 vendor/rails/actionpack/lib/action_controller/cgi_process.rb
  136. +0 −94 vendor/rails/actionpack/lib/action_controller/cookies.rb
  137. +0 −118 vendor/rails/actionpack/lib/action_controller/dispatcher.rb
  138. +0 −52 vendor/rails/actionpack/lib/action_controller/failsafe.rb
  139. +0 −680 vendor/rails/actionpack/lib/action_controller/filters.rb
  140. +0 −163 vendor/rails/actionpack/lib/action_controller/flash.rb
  141. +0 −33 vendor/rails/actionpack/lib/action_controller/headers.rb
  142. +0 −225 vendor/rails/actionpack/lib/action_controller/helpers.rb
  143. +0 −304 vendor/rails/actionpack/lib/action_controller/http_authentication.rb
  144. +0 −687 vendor/rails/actionpack/lib/action_controller/integration.rb
  145. +0 −281 vendor/rails/actionpack/lib/action_controller/layout.rb
  146. +0 −119 vendor/rails/actionpack/lib/action_controller/middleware_stack.rb
  147. +0 −13 vendor/rails/actionpack/lib/action_controller/middlewares.rb
  148. +0 −193 vendor/rails/actionpack/lib/action_controller/mime_responds.rb
  149. +0 −212 vendor/rails/actionpack/lib/action_controller/mime_type.rb
  150. +0 −21 vendor/rails/actionpack/lib/action_controller/mime_types.rb
  151. +0 −71 vendor/rails/actionpack/lib/action_controller/params_parser.rb
  152. +0 −15 vendor/rails/actionpack/lib/action_controller/performance_test.rb
  153. +0 −204 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb
  154. +0 −104 vendor/rails/actionpack/lib/action_controller/record_identifier.rb
  155. +0 −14 vendor/rails/actionpack/lib/action_controller/reloader.rb
  156. +0 −489 vendor/rails/actionpack/lib/action_controller/request.rb
  157. +0 −108 vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb
  158. +0 −183 vendor/rails/actionpack/lib/action_controller/rescue.rb
  159. +0 −678 vendor/rails/actionpack/lib/action_controller/resources.rb
  160. +0 −232 vendor/rails/actionpack/lib/action_controller/response.rb
  161. +0 −28 vendor/rails/actionpack/lib/action_controller/rewindable_input.rb
  162. +0 −385 vendor/rails/actionpack/lib/action_controller/routing.rb
  163. +0 −197 vendor/rails/actionpack/lib/action_controller/routing/builder.rb
  164. +0 −130 vendor/rails/actionpack/lib/action_controller/routing/optimisations.rb
  165. +0 −167 vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb
  166. +0 −265 vendor/rails/actionpack/lib/action_controller/routing/route.rb
  167. +0 −488 vendor/rails/actionpack/lib/action_controller/routing/route_set.rb
  168. +0 −49 vendor/rails/actionpack/lib/action_controller/routing/routing_ext.rb
  169. +0 −343 vendor/rails/actionpack/lib/action_controller/routing/segments.rb
  170. +0 −181 vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb
  171. +0 −221 vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb
  172. +0 −51 vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb
  173. +0 −54 vendor/rails/actionpack/lib/action_controller/session_management.rb
  174. +0 −88 vendor/rails/actionpack/lib/action_controller/status_codes.rb
  175. +0 −179 vendor/rails/actionpack/lib/action_controller/streaming.rb
  176. +0 −24 vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb
  177. +0 −26 vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb
  178. +0 −11 vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb
  179. +0 −29 vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb
  180. +0 −2  vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb
  181. +0 −10 vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb
  182. +0 −21 vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb
  183. +0 −2  vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb
  184. +0 −204 vendor/rails/actionpack/lib/action_controller/test_case.rb
  185. +0 −572 vendor/rails/actionpack/lib/action_controller/test_process.rb
  186. +0 −13 vendor/rails/actionpack/lib/action_controller/translation.rb
  187. +0 −44 vendor/rails/actionpack/lib/action_controller/uploaded_file.rb
  188. +0 −216 vendor/rails/actionpack/lib/action_controller/url_rewriter.rb
  189. +0 −16 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner.rb
  190. +0 −68 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
  191. +0 −537 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
  192. +0 −173 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb
  193. +0 −828 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  194. +0 −105 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
  195. +0 −11 vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb
  196. +0 −89 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack.rb
  197. +0 −22 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/adapter/camping.rb
  198. +0 −37 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/handler.rb
  199. +0 −37 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/request.rb
  200. +0 −58 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/basic.rb
  201. +0 −124 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/md5.rb
  202. +0 −51 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/nonce.rb
  203. +0 −55 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/params.rb
  204. +0 −40 vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/request.rb
Sorry, we could not display the entire diff because too many files (1,801) changed.
View
20 vendor/rails/.gitignore
@@ -1,20 +0,0 @@
-debug.log
-doc/rdoc
-activeresource/doc
-activerecord/doc
-actionpack/doc
-actionmailer/doc
-activesupport/doc
-activeresource/pkg
-activerecord/pkg
-actionpack/pkg
-actionmailer/pkg
-activesupport/pkg
-railties/pkg
-railties/test/500.html
-railties/doc/guides/html/images
-railties/doc/guides/html/stylesheets
-railties/guides/output
-*.rbc
-*.swp
-*.swo
View
0  vendor/rails/REVISION_7fe8b630ce47f62409aabb609e81ff676df56bd3
No changes.
View
358 vendor/rails/actionmailer/CHANGELOG
@@ -1,358 +0,0 @@
-*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
21 vendor/rails/actionmailer/MIT-LICENSE
@@ -1,21 +0,0 @@
-Copyright (c) 2004-2009 David Heinemeier Hansson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
View
149 vendor/rails/actionmailer/README
@@ -1,149 +0,0 @@
-= Action Mailer -- Easy email delivery and testing
-
-Action Mailer is a framework for designing email-service layers. These layers
-are used to consolidate code for sending out forgotten passwords, welcome
-wishes on signup, invoices for billing, and any other use case that requires
-a written notification to either a person or another system.
-
-Additionally, an Action Mailer class can be used to process incoming email,
-such as allowing a weblog to accept new posts from an email (which could even
-have been sent from a phone).
-
-== Sending emails
-
-The framework works by setting up all the email details, except the body,
-in methods on the service layer. Subject, recipients, sender, and timestamp
-are all set up this way. An example of such a method:
-
- def signed_up(recipient)
- recipients recipient
- subject "[Signed up] Welcome #{recipient}"
- from "system@loudthinking.com"
- body :recipient => recipient
- end
-
-The body of the email is created by using an Action View template (regular
-ERb) that has the content of the body hash parameter available as instance variables.
-So the corresponding body template for the method above could look like this:
-
- Hello there,
-
- Mr. <%= @recipient %>
-
-And if the recipient was given as "david@loudthinking.com", the email
-generated would look like this:
-
- Date: Sun, 12 Dec 2004 00:00:00 +0100
- From: system@loudthinking.com
- To: david@loudthinking.com
- Subject: [Signed up] Welcome david@loudthinking.com
-
- Hello there,
-
- Mr. david@loudthinking.com
-
-You never actually call the instance methods like signed_up directly. Instead,
-you call class methods like deliver_* and create_* that are automatically
-created for each instance method. So if the signed_up method sat on
-ApplicationMailer, it would look like this:
-
- ApplicationMailer.create_signed_up("david@loudthinking.com") # => tmail object for testing
- ApplicationMailer.deliver_signed_up("david@loudthinking.com") # sends the email
- ApplicationMailer.new.signed_up("david@loudthinking.com") # won't work!
-
-== Receiving emails
-
-To receive emails, you need to implement a public instance method called receive that takes a
-tmail object as its single parameter. The Action Mailer framework has a corresponding class method,
-which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns
-into the tmail object and calls the receive instance method.
-
-Example:
-
- class Mailman < ActionMailer::Base
- def receive(email)
- page = Page.find_by_address(email.to.first)
- page.emails.create(
- :subject => email.subject, :body => email.body
- )
-
- if email.has_attachments?
- for attachment in email.attachments
- page.attachments.create({
- :file => attachment, :description => email.subject
- })
- end
- end
- end
- end
-
-This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
-trivial case like this:
-
- ./script/runner 'Mailman.receive(STDIN.read)'
-
-However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
-instance of Rails should be run within a daemon if it is going to be utilized to process more than just
-a limited number of email.
-
-== Configuration
-
-The Base class has the full list of configuration options. Here's an example:
-
- ActionMailer::Base.smtp_settings = {
- :address => 'smtp.yourserver.com', # default: localhost
- :port => '25', # default: 25
- :user_name => 'user',
- :password => 'pass',
- :authentication => :plain # :plain, :login or :cram_md5
- }
-
-== Dependencies
-
-Action Mailer requires that the Action Pack is either available to be required immediately
-or is accessible as a GEM.
-
-
-== Bundled software
-
-* tmail 0.10.8 by Minero Aoki released under LGPL
- Read more on http://i.loveruby.net/en/prog/tmail.html
-
-* Text::Format 0.63 by Austin Ziegler released under OpenSource
- Read more on http://www.halostatue.ca/ruby/Text__Format.html
-
-
-== Download
-
-The latest version of Action Mailer can be found at
-
-* http://rubyforge.org/project/showfiles.php?group_id=361
-
-Documentation can be found at
-
-* http://actionmailer.rubyonrails.org
-
-
-== Installation
-
-You can install Action Mailer with the following command.
-
- % [sudo] ruby install.rb
-
-from its distribution directory.
-
-
-== License
-
-Action Mailer is released under the MIT license.
-
-
-== Support
-
-The Action Mailer homepage is http://www.rubyonrails.org. You can find
-the Action Mailer RubyForge page at http://rubyforge.org/projects/actionmailer.
-And as Jim from Rake says:
-
- Feel free to submit commits or feature requests. If you send a patch,
- remember to update the corresponding unit tests. If fact, I prefer
- new feature to be submitted in the form of new unit tests.
View
98 vendor/rails/actionmailer/Rakefile
@@ -1,98 +0,0 @@
-require 'rubygems'
-require 'rake'
-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'] : ''
-PKG_NAME = 'actionmailer'
-PKG_VERSION = ActionMailer::VERSION::STRING + PKG_BUILD
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
-
-RELEASE_NAME = "REL #{PKG_VERSION}"
-
-RUBY_FORGE_PROJECT = "actionmailer"
-RUBY_FORGE_USER = "webster132"
-
-desc "Default Task"
-task :default => [ :test ]
-
-# Run the unit tests
-Rake::TestTask.new { |t|
- t.libs << "test"
- t.pattern = 'test/*_test.rb'
- t.verbose = true
- t.warning = false
-}
-
-
-# Generate the RDoc documentation
-Rake::RDocTask.new { |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "Action Mailer -- Easy email delivery and testing"
- rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
- rdoc.options << '--charset' << 'utf-8'
- rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
- rdoc.rdoc_files.include('README', 'CHANGELOG')
- rdoc.rdoc_files.include('lib/action_mailer.rb')
- rdoc.rdoc_files.include('lib/action_mailer/*.rb')
-}
-
-
-# Create compressed packages
-spec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = PKG_NAME
- s.summary = "Service layer for easy email delivery and testing."
- s.description = %q{Makes it trivial to test and deliver emails sent from a single service layer.}
- s.version = PKG_VERSION
-
- s.author = "David Heinemeier Hansson"
- s.email = "david@loudthinking.com"
- s.rubyforge_project = "actionmailer"
- s.homepage = "http://www.rubyonrails.org"
-
- s.add_dependency('actionpack', '= 2.3.2' + PKG_BUILD)
-
- s.has_rdoc = true
- s.requirements << 'none'
- s.require_path = 'lib'
- s.autorequire = 'action_mailer'
-
- s.files = [ "Rakefile", "install.rb", "README", "CHANGELOG", "MIT-LICENSE" ]
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
-end
-
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar = true
- p.need_zip = true
-end
-
-
-desc "Publish the API documentation"
-task :pgem => [:package] do
- 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
- Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
-end
-
-desc "Publish the release files to RubyForge."
-task :release => [ :package ] do
- require 'rubyforge'
- require 'rake/contrib/rubyforgepublisher'
-
- packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
-
- rubyforge = RubyForge.new
- rubyforge.login
- rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
-end
View
30 vendor/rails/actionmailer/install.rb
@@ -1,30 +0,0 @@
-require 'rbconfig'
-require 'find'
-require 'ftools'
-
-include Config
-
-# this was adapted from rdoc's install.rb by way of Log4r
-
-$sitedir = CONFIG["sitelibdir"]
-unless $sitedir
- version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
- $libdir = File.join(CONFIG["libdir"], "ruby", version)
- $sitedir = $:.find {|x| x =~ /site_ruby/ }
- if !$sitedir
- $sitedir = File.join($libdir, "site_ruby")
- elsif $sitedir !~ Regexp.quote(version)
- $sitedir = File.join($sitedir, version)
- end
-end
-
-# the actual gruntwork
-Dir.chdir("lib")
-
-Find.find("action_mailer", "action_mailer.rb") { |f|
- if f[-3..-1] == ".rb"
- File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
- else
- File::makedirs(File.join($sitedir, *f.split(/\//)))
- end
-}
View
62 vendor/rails/actionmailer/lib/action_mailer.rb
@@ -1,62 +0,0 @@
-#--
-# Copyright (c) 2004-2009 David Heinemeier Hansson
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# 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
-
-require 'action_view'
-
-module ActionMailer
- def self.load_all!
- [Base, Part, ::Text::Format, ::Net::SMTP]
- end
-
- autoload :AdvAttrAccessor, 'action_mailer/adv_attr_accessor'
- autoload :Base, 'action_mailer/base'
- autoload :Helpers, 'action_mailer/helpers'
- autoload :Part, 'action_mailer/part'
- autoload :PartContainer, 'action_mailer/part_container'
- autoload :Quoting, 'action_mailer/quoting'
- autoload :TestCase, 'action_mailer/test_case'
- autoload :TestHelper, 'action_mailer/test_helper'
- autoload :Utils, 'action_mailer/utils'
-end
-
-module Text
- autoload :Format, 'action_mailer/vendor/text_format'
-end
-
-module Net
- autoload :SMTP, 'net/smtp'
-end
-
-autoload :MailHelper, 'action_mailer/mail_helper'
-
-require 'action_mailer/vendor/tmail'
View
30 vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
@@ -1,30 +0,0 @@
-module ActionMailer
- module AdvAttrAccessor #:nodoc:
- def self.included(base)
- base.extend(ClassMethods)
- end
-
- module ClassMethods #:nodoc:
- def adv_attr_accessor(*names)
- names.each do |name|
- ivar = "@#{name}"
-
- define_method("#{name}=") do |value|
- instance_variable_set(ivar, value)
- end
-
- define_method(name) do |*parameters|
- raise ArgumentError, "expected 0 or 1 parameters" unless parameters.length <= 1
- if parameters.empty?
- if instance_variable_names.include?(ivar)
- instance_variable_get(ivar)
- end
- else
- instance_variable_set(ivar, parameters.first)
- end
- end
- end
- end
- end
- end
-end
View
705 vendor/rails/actionmailer/lib/action_mailer/base.rb
@@ -1,705 +0,0 @@
-module ActionMailer #:nodoc:
- # Action Mailer allows you to send email from your application using a mailer model and views.
- #
- #
- # = Mailer Models
- #
- # To use Action Mailer, you need to create a mailer model.
- #
- # $ script/generate mailer Notifier
- #
- # The generated model inherits from ActionMailer::Base. Emails are defined by creating methods within the model which are then
- # used to set variables to be used in the mail template, to change options on the mail, or
- # to add attachments.
- #
- # Examples:
- #
- # class Notifier < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # bcc ["bcc@example.com", "Order Watcher <watcher@example.com>"]
- # from "system@example.com"
- # subject "New account information"
- # body :account => recipient
- # end
- # end
- #
- # Mailer methods have the following configuration methods available.
- #
- # * <tt>recipients</tt> - Takes one or more email addresses. These addresses are where your email will be delivered to. Sets the <tt>To:</tt> header.
- # * <tt>subject</tt> - The subject of your email. Sets the <tt>Subject:</tt> header.
- # * <tt>from</tt> - Who the email you are sending is from. Sets the <tt>From:</tt> header.
- # * <tt>cc</tt> - Takes one or more email addresses. These addresses will receive a carbon copy of your email. Sets the <tt>Cc:</tt> header.
- # * <tt>bcc</tt> - Takes one or more email addresses. These addresses will receive a blind carbon copy of your email. Sets the <tt>Bcc:</tt> header.
- # * <tt>reply_to</tt> - Takes one or more email addresses. These addresses will be listed as the default recipients when replying to your email. Sets the <tt>Reply-To:</tt> header.
- # * <tt>sent_on</tt> - The date on which the message was sent. If not set, the header wil be set by the delivery agent.
- # * <tt>content_type</tt> - Specify the content type of the message. Defaults to <tt>text/plain</tt>.
- # * <tt>headers</tt> - Specify additional headers to be set for the message, e.g. <tt>headers 'X-Mail-Count' => 107370</tt>.
- #
- # When a <tt>headers 'return-path'</tt> is specified, that value will be used as the 'envelope from'
- # address. Setting this is useful when you want delivery notifications sent to a different address than
- # the one in <tt>from</tt>.
- #
- # The <tt>body</tt> method has special behavior. It takes a hash which generates an instance variable
- # named after each key in the hash containing the value that that key points to.
- #
- # So, for example, <tt>body :account => recipient</tt> would result
- # in an instance variable <tt>@account</tt> with the value of <tt>recipient</tt> being accessible in the
- # view.
- #
- #
- # = Mailer views
- #
- # Like Action Controller, each mailer class has a corresponding view directory
- # in which each method of the class looks for a template with its name.
- # To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same name as the method
- # in your mailer model. For example, in the mailer defined above, the template at
- # <tt>app/views/notifier/signup_notification.erb</tt> would be used to generate the email.
- #
- # Variables defined in the model are accessible as instance variables in the view.
- #
- # Emails by default are sent in plain text, so a sample view for our model example might look like this:
- #
- # Hi <%= @account.name %>,
- # Thanks for joining our service! Please check back often.
- #
- # You can even use Action Pack helpers in these views. For example:
- #
- # You got a new note!
- # <%= truncate(note.body, 25) %>
- #
- #
- # = Generating URLs
- #
- # URLs can be generated in mailer views using <tt>url_for</tt> or named routes.
- # Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request,
- # so you'll need to provide all of the details needed to generate a URL.
- #
- # When using <tt>url_for</tt> you'll need to provide the <tt>:host</tt>, <tt>:controller</tt>, and <tt>:action</tt>:
- #
- # <%= url_for(:host => "example.com", :controller => "welcome", :action => "greeting") %>
- #
- # When using named routes you only need to supply the <tt>:host</tt>:
- #
- # <%= users_url(:host => "example.com") %>
- #
- # You will want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't make sense to
- # generate relative URLs in email messages.
- #
- # It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt> option in
- # the <tt>ActionMailer::Base.default_url_options</tt> hash as follows:
- #
- # ActionMailer::Base.default_url_options[:host] = "example.com"
- #
- # This can also be set as a configuration option in <tt>config/environment.rb</tt>:
- #
- # config.action_mailer.default_url_options = { :host => "example.com" }
- #
- # If you do decide to set a default <tt>:host</tt> for your mailers you will want to use the
- # <tt>:only_path => false</tt> option when using <tt>url_for</tt>. This will ensure that absolute URLs are generated because
- # the <tt>url_for</tt> view helper will, by default, generate relative URLs when a <tt>:host</tt> option isn't
- # explicitly provided.
- #
- # = Sending mail
- #
- # Once a mailer action and template are defined, you can deliver your message or create it and save it
- # for delivery later:
- #
- # Notifier.deliver_signup_notification(david) # sends the email
- # mail = Notifier.create_signup_notification(david) # => a tmail object
- # Notifier.deliver(mail)
- #
- # You never instantiate your mailer class. Rather, your delivery instance
- # methods are automatically wrapped in class methods that start with the word
- # <tt>deliver_</tt> followed by the name of the mailer method that you would
- # like to deliver. The <tt>signup_notification</tt> method defined above is
- # delivered by invoking <tt>Notifier.deliver_signup_notification</tt>.
- #
- #
- # = HTML email
- #
- # To send mail as HTML, make sure your view (the <tt>.erb</tt> file) generates HTML and
- # set the content type to html.
- #
- # class MyMailer < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # from "system@example.com"
- # body :account => recipient
- # content_type "text/html"
- # end
- # end
- #
- #
- # = Multipart email
- #
- # You can explicitly specify multipart messages:
- #
- # class ApplicationMailer < ActionMailer::Base
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # from "system@example.com"
- # content_type "multipart/alternative"
- #
- # part :content_type => "text/html",
- # :body => render_message("signup-as-html", :account => recipient)
- #
- # part "text/plain" do |p|
- # p.body = render_message("signup-as-plain", :account => recipient)
- # p.transfer_encoding = "base64"
- # end
- # end
- # end
- #
- # Multipart messages can also be used implicitly because Action Mailer will automatically
- # detect and use multipart templates, where each template is named after the name of the action, followed
- # by the content type. Each such detected template will be added as separate part to the message.
- #
- # For example, if the following templates existed:
- # * signup_notification.text.plain.erb
- # * signup_notification.text.html.erb
- # * signup_notification.text.xml.builder
- # * signup_notification.text.x-yaml.erb
- #
- # Each would be rendered and added as a separate part to the message,
- # with the corresponding content type. The content type for the entire
- # message is automatically set to <tt>multipart/alternative</tt>, which indicates
- # that the email contains multiple different representations of the same email
- # body. The same body hash is passed to each template.
- #
- # Implicit template rendering is not performed if any attachments or parts have been added to the email.
- # This means that you'll have to manually add each part to the email and set the content type of the email
- # to <tt>multipart/alternative</tt>.
- #
- # = Attachments
- #
- # Attachments can be added by using the +attachment+ method.
- #
- # Example:
- #
- # class ApplicationMailer < ActionMailer::Base
- # # attachments
- # def signup_notification(recipient)
- # recipients recipient.email_address_with_name
- # subject "New account information"
- # from "system@example.com"
- #
- # attachment :content_type => "image/jpeg",
- # :body => File.read("an-image.jpg")
- #
- # attachment "application/pdf" do |a|
- # a.body = generate_your_pdf_here()
- # end
- # end
- # end
- #
- #
- # = Configuration options
- #
- # These options are specified on the class level, like <tt>ActionMailer::Base.template_root = "/my/templates"</tt>
- #
- # * <tt>template_root</tt> - Determines the base from which template references will be made.
- #
- # * <tt>logger</tt> - the logger is used for generating information on the mailing run if available.
- # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
- #
- # * <tt>smtp_settings</tt> - Allows detailed configuration for <tt>:smtp</tt> delivery method:
- # * <tt>:address</tt> - Allows you to use a remote mail server. Just change it from its default "localhost" setting.
- # * <tt>:port</tt> - On the off chance that your mail server doesn't run on port 25, you can change it.
- # * <tt>:domain</tt> - If you need to specify a HELO domain, you can do it here.
- # * <tt>:user_name</tt> - If your mail server requires authentication, set the username in this setting.
- # * <tt>:password</tt> - If your mail server requires authentication, set the password in this setting.
- # * <tt>:authentication</tt> - If your mail server requires authentication, you need to specify the authentication type here.
- # This is a symbol and one of <tt>:plain</tt>, <tt>:login</tt>, <tt>:cram_md5</tt>.
- # * <tt>:enable_starttls_auto</tt> - When set to true, detects if STARTTLS is enabled in your SMTP server and starts to use it.
- # It works only on Ruby >= 1.8.7 and Ruby >= 1.9. Default is true.
- #
- # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
- # * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
- # * <tt>:arguments</tt> - The command line arguments. Defaults to <tt>-i -t</tt>.
- #
- # * <tt>raise_delivery_errors</tt> - Whether or not errors should be raised if the email fails to be delivered.
- #
- # * <tt>delivery_method</tt> - Defines a delivery method. Possible values are <tt>:smtp</tt> (default), <tt>:sendmail</tt>, and <tt>:test</tt>.
- #
- # * <tt>perform_deliveries</tt> - Determines whether <tt>deliver_*</tt> methods are actually carried out. By default they are,
- # but this can be turned off to help functional testing.
- #
- # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with <tt>delivery_method :test</tt>. Most useful
- # for unit and functional testing.
- #
- # * <tt>default_charset</tt> - The default charset used for the body and to encode the subject. Defaults to UTF-8. You can also
- # pick a different charset from inside a method with +charset+.
- #
- # * <tt>default_content_type</tt> - The default content type used for the main part of the message. Defaults to "text/plain". You
- # can also pick a different content type from inside a method with +content_type+.
- #
- # * <tt>default_mime_version</tt> - The default mime version used for the message. Defaults to <tt>1.0</tt>. You
- # can also pick a different value from inside a method with +mime_version+.
- #
- # * <tt>default_implicit_parts_order</tt> - When a message is built implicitly (i.e. multiple parts are assembled from templates
- # which specify the content type in their filenames) this variable controls how the parts are ordered. Defaults to
- # <tt>["text/html", "text/enriched", "text/plain"]</tt>. Items that appear first in the array have higher priority in the mail client
- # and appear last in the mime encoded message. You can also pick a different order from inside a method with
- # +implicit_parts_order+.
- class Base
- include AdvAttrAccessor, PartContainer, Quoting, Utils
- if Object.const_defined?(:ActionController)
- include ActionController::UrlWriter
- include ActionController::Layout
- end
-
- private_class_method :new #:nodoc:
-
- class_inheritable_accessor :view_paths
- self.view_paths = []
-
- cattr_accessor :logger
-
- @@smtp_settings = {
- :address => "localhost",
- :port => 25,
- :domain => 'localhost.localdomain',
- :user_name => nil,
- :password => nil,
- :authentication => nil,
- :enable_starttls_auto => true,
- }
- cattr_accessor :smtp_settings
-
- @@sendmail_settings = {
- :location => '/usr/sbin/sendmail',
- :arguments => '-i -t'
- }
- cattr_accessor :sendmail_settings
-
- @@raise_delivery_errors = true
- cattr_accessor :raise_delivery_errors
-
- superclass_delegating_accessor :delivery_method
- self.delivery_method = :smtp
-
- @@perform_deliveries = true
- cattr_accessor :perform_deliveries
-
- @@deliveries = []
- cattr_accessor :deliveries
-
- @@default_charset = "utf-8"
- cattr_accessor :default_charset
-
- @@default_content_type = "text/plain"
- cattr_accessor :default_content_type
-
- @@default_mime_version = "1.0"
- cattr_accessor :default_mime_version
-
- @@default_implicit_parts_order = [ "text/html", "text/enriched", "text/plain" ]
- cattr_accessor :default_implicit_parts_order
-
- cattr_reader :protected_instance_variables
- @@protected_instance_variables = %w(@body)
-
- # Specify the BCC addresses for the message
- adv_attr_accessor :bcc
-
- # Define the body of the message. This is either a Hash (in which case it
- # specifies the variables to pass to the template when it is rendered),
- # or a string, in which case it specifies the actual text of the message.
- adv_attr_accessor :body
-
- # Specify the CC addresses for the message.
- adv_attr_accessor :cc
-
- # Specify the charset to use for the message. This defaults to the
- # +default_charset+ specified for ActionMailer::Base.
- adv_attr_accessor :charset
-
- # Specify the content type for the message. This defaults to <tt>text/plain</tt>
- # in most cases, but can be automatically set in some situations.
- adv_attr_accessor :content_type
-
- # Specify the from address for the message.
- adv_attr_accessor :from
-
- # Specify the address (if different than the "from" address) to direct
- # replies to this message.
- adv_attr_accessor :reply_to
-
- # Specify additional headers to be added to the message.
- adv_attr_accessor :headers
-
- # Specify the order in which parts should be sorted, based on content-type.
- # This defaults to the value for the +default_implicit_parts_order+.
- adv_attr_accessor :implicit_parts_order
-
- # Defaults to "1.0", but may be explicitly given if needed.
- adv_attr_accessor :mime_version
-
- # The recipient addresses for the message, either as a string (for a single
- # address) or an array (for multiple addresses).
- adv_attr_accessor :recipients
-
- # The date on which the message was sent. If not set (the default), the
- # header will be set by the delivery agent.
- adv_attr_accessor :sent_on
-
- # Specify the subject of the message.
- adv_attr_accessor :subject
-
- # Specify the template name to use for current message. This is the "base"
- # template name, without the extension or directory, and may be used to
- # have multiple mailer methods share the same template.
- adv_attr_accessor :template
-
- # Override the mailer name, which defaults to an inflected version of the
- # mailer's class name. If you want to use a template in a non-standard
- # location, you can use this to specify that location.
- def mailer_name(value = nil)
- if value
- self.mailer_name = value
- else
- self.class.mailer_name
- end
- end
-
- def mailer_name=(value)
- self.class.mailer_name = value
- end
-
- # The mail object instance referenced by this mailer.
- attr_reader :mail
- attr_reader :template_name, :default_template_name, :action_name
-
- class << self
- attr_writer :mailer_name
-
- def mailer_name
- @mailer_name ||= name.underscore
- end
-
- # for ActionView compatibility
- alias_method :controller_name, :mailer_name
- alias_method :controller_path, :mailer_name
-
- def respond_to?(method_symbol, include_private = false) #:nodoc:
- matches_dynamic_method?(method_symbol) || super
- end
-
- def method_missing(method_symbol, *parameters) #:nodoc:
- if match = matches_dynamic_method?(method_symbol)
- case match[1]
- when 'create' then new(match[2], *parameters).mail
- when 'deliver' then new(match[2], *parameters).deliver!
- when 'new' then nil
- else super
- end
- else
- super
- end
- end
-
- # Receives a raw email, parses it into an email object, decodes it,
- # instantiates a new mailer, and passes the email object to the mailer
- # object's +receive+ method. If you want your mailer to be able to
- # process incoming messages, you'll need to implement a +receive+
- # method that accepts the email object as a parameter:
- #
- # class MyMailer < ActionMailer::Base
- # def receive(mail)
- # ...
- # end
- # end
- def receive(raw_email)
- logger.info "Received mail:\n #{raw_email}" unless logger.nil?
- mail = TMail::Mail.parse(raw_email)
- mail.base64_decode
- new.receive(mail)
- end
-
- # Deliver the given mail object directly. This can be used to deliver
- # a preconstructed mail object, like:
- #
- # email = MyMailer.create_some_mail(parameters)
- # email.set_some_obscure_header "frobnicate"
- # MyMailer.deliver(email)
- def deliver(mail)
- new.deliver!(mail)
- end
-
- def template_root
- self.view_paths && self.view_paths.first
- end
-
- def template_root=(root)
- self.view_paths = ActionView::Base.process_view_paths(root)
- end
-
- private
- def matches_dynamic_method?(method_name) #:nodoc:
- method_name = method_name.to_s
- /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name)
- end
- end
-
- # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
- # will be initialized according to the named method. If not, the mailer will
- # remain uninitialized (useful when you only need to invoke the "receive"
- # method, for instance).
- def initialize(method_name=nil, *parameters) #:nodoc:
- create!(method_name, *parameters) if method_name
- end
-
- # Initialize the mailer via the given +method_name+. The body will be
- # rendered and a new TMail::Mail object created.
- def create!(method_name, *parameters) #:nodoc:
- initialize_defaults(method_name)
- __send__(method_name, *parameters)
-
- # If an explicit, textual body has not been set, we check assumptions.
- unless String === @body
- # First, we look to see if there are any likely templates that match,
- # which include the content-type in their file name (i.e.,
- # "the_template_file.text.html.erb", etc.). Only do this if parts
- # have not already been specified manually.
- if @parts.empty?
- Dir.glob("#{template_path}/#{@template}.*").each do |path|
- template = template_root["#{mailer_name}/#{File.basename(path)}"]
-
- # Skip unless template has a multipart format
- next unless template && template.multipart?
-
- @parts << Part.new(
- :content_type => template.content_type,
- :disposition => "inline",
- :charset => charset,
- :body => render_message(template, @body)
- )
- end
- unless @parts.empty?
- @content_type = "multipart/alternative" if @content_type !~ /^multipart/
- @parts = sort_parts(@parts, @implicit_parts_order)
- end
- end
-
- # Then, if there were such templates, we check to see if we ought to
- # also render a "normal" template (without the content type). If a
- # normal template exists (or if there were no implicit parts) we render
- # it.
- template_exists = @parts.empty?
- template_exists ||= template_root["#{mailer_name}/#{@template}"]
- @body = render_message(@template, @body) if template_exists
-
- # Finally, if there are other message parts and a textual body exists,
- # we shift it onto the front of the parts and set the body to nil (so
- # that create_mail doesn't try to render it in addition to the parts).
- if !@parts.empty? && String === @body
- @parts.unshift Part.new(:charset => charset, :body => @body)
- @body = nil
- end
- end
-
- # If this is a multipart e-mail add the mime_version if it is not
- # already set.
- @mime_version ||= "1.0" if !@parts.empty?
-
- # build the mail object itself
- @mail = create_mail
- end
-
- # Delivers a TMail::Mail object. By default, it delivers the cached mail
- # object (from the <tt>create!</tt> method). If no cached mail object exists, and
- # no alternate has been given as the parameter, this will fail.
- def deliver!(mail = @mail)
- raise "no mail object available for delivery!" unless mail
- unless logger.nil?
- logger.info "Sent mail to #{Array(recipients).join(', ')}"
- logger.debug "\n#{mail.encoded}"
- end
-
- begin
- __send__("perform_delivery_#{delivery_method}", mail) if perform_deliveries
- rescue Exception => e # Net::SMTP errors or sendmail pipe errors
- raise e if raise_delivery_errors
- end
-
- return mail
- end
-
- private
- # Set up the default values for the various instance variables of this
- # mailer. Subclasses may override this method to provide different
- # defaults.
- def initialize_defaults(method_name)
- @charset ||= @@default_charset.dup
- @content_type ||= @@default_content_type.dup
- @implicit_parts_order ||= @@default_implicit_parts_order.dup
- @template ||= method_name
- @default_template_name = @action_name = @template
- @mailer_name ||= self.class.name.underscore
- @parts ||= []
- @headers ||= {}
- @body ||= {}
- @mime_version = @@default_mime_version.dup if @@default_mime_version
- end
-
- def render_message(method_name, body)
- if method_name.respond_to?(:content_type)
- @current_template_content_type = method_name.content_type
- end
- render :file => method_name, :body => body
- ensure
- @current_template_content_type = nil
- end
-
- def render(opts)
- body = opts.delete(:body)
- if opts[:file] && (opts[:file] !~ /\// && !opts[:file].respond_to?(:render))
- opts[:file] = "#{mailer_name}/#{opts[:file]}"
- end
-
- begin
- old_template, @template = @template, initialize_template_class(body)
- layout = respond_to?(:pick_layout, true) ? pick_layout(opts) : false
- @template.render(opts.merge(:layout => layout))
- ensure
- @template = old_template
- end
- end
-
- def default_template_format
- if @current_template_content_type
- Mime::Type.lookup(@current_template_content_type).to_sym
- else
- :html
- end
- end
-
- def candidate_for_layout?(options)
- !self.view_paths.find_template(default_template_name, default_template_format).exempt_from_layout?
- rescue ActionView::MissingTemplate
- return true
- end
-
- def template_root
- self.class.template_root
- end
-
- def template_root=(root)
- self.class.template_root = root
- end
-
- def template_path
- "#{template_root}/#{mailer_name}"
- end
-
- def initialize_template_class(assigns)
- template = ActionView::Base.new(self.class.view_paths, assigns, self)
- template.template_format = default_template_format
- template
- end
-
- def sort_parts(parts, order = [])
- order = order.collect { |s| s.downcase }
-
- parts = parts.sort do |a, b|
- a_ct = a.content_type.downcase
- b_ct = b.content_type.downcase
-
- a_in = order.include? a_ct
- b_in = order.include? b_ct
-
- s = case
- when a_in && b_in
- order.index(a_ct) <=> order.index(b_ct)
- when a_in
- -1
- when b_in
- 1
- else
- a_ct <=> b_ct
- end
-
- # reverse the ordering because parts that come last are displayed
- # first in mail clients
- (s * -1)
- end
-
- parts
- end
-
- def create_mail
- m = TMail::Mail.new
-
- m.subject, = quote_any_if_necessary(charset, subject)
- m.to, m.from = quote_any_address_if_necessary(charset, recipients, from)
- m.bcc = quote_address_if_necessary(bcc, charset) unless bcc.nil?
- m.cc = quote_address_if_necessary(cc, charset) unless cc.nil?
- m.reply_to = quote_address_if_necessary(reply_to, charset) unless reply_to.nil?
- m.mime_version = mime_version unless mime_version.nil?
- m.date = sent_on.to_time rescue sent_on if sent_on
-
- headers.each { |k, v| m[k] = v }
-
- real_content_type, ctype_attrs = parse_content_type
-
- if @parts.empty?
- m.set_content_type(real_content_type, nil, ctype_attrs)
- m.body = normalize_new_lines(body)
- else
- if String === body
- part = TMail::Mail.new
- part.body = normalize_new_lines(body)
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition "inline"
- m.parts << part
- end
-
- @parts.each do |p|
- part = (TMail::Mail === p ? p : p.to_mail(self))
- m.parts << part
- end
-
- if real_content_type =~ /multipart/
- ctype_attrs.delete "charset"
- m.set_content_type(real_content_type, nil, ctype_attrs)
- end
- end
-
- @mail = m
- end
-
- def perform_delivery_smtp(mail)
- destinations = mail.destinations
- mail.ready_to_send
- 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)
- smtp.start(smtp_settings[:domain], smtp_settings[:user_name], smtp_settings[:password],
- smtp_settings[:authentication]) do |smtp|
- smtp.sendmail(mail.encoded, sender, destinations)
- end
- end
-
- def perform_delivery_sendmail(mail)
- sendmail_args = sendmail_settings[:arguments]
- sendmail_args += " -f \"#{mail['return-path']}\"" if mail['return-path']
- IO.popen("#{sendmail_settings[:location]} #{sendmail_args}","w+") do |sm|
- sm.print(mail.encoded.gsub(/\r/, ''))
- sm.flush
- end
- end
-
- def perform_delivery_test(mail)
- deliveries << mail
- end
- end
-
- Base.class_eval do
- include Helpers
- helper MailHelper
- end
-end
View
113 vendor/rails/actionmailer/lib/action_mailer/helpers.rb
@@ -1,113 +0,0 @@
-require 'active_support/dependencies'
-
-module ActionMailer
- module Helpers #:nodoc:
- def self.included(base) #:nodoc:
- # Initialize the base module to aggregate its helpers.
- base.class_inheritable_accessor :master_helper_module
- base.master_helper_module = Module.new
-
- # Extend base with class methods to declare helpers.
- base.extend(ClassMethods)
-
- base.class_eval do
- # Wrap inherited to create a new master helper module for subclasses.
- class << self
- alias_method_chain :inherited, :helper
- end
-
- # Wrap initialize_template_class to extend new template class
- # instances with the master helper module.
- alias_method_chain :initialize_template_class, :helper
- end
- end
-
- module ClassMethods
- # Makes all the (instance) methods in the helper module available to templates rendered through this controller.
- # See ActionView::Helpers (link:classes/ActionView/Helpers.html) for more about making your own helper modules
- # available to the templates.
- def add_template_helper(helper_module) #:nodoc:
- master_helper_module.module_eval "include #{helper_module}"
- end
-
- # Declare a helper:
- # helper :foo
- # requires 'foo_helper' and includes FooHelper in the template class.
- # helper FooHelper
- # includes FooHelper in the template class.
- # helper { def foo() "#{bar} is the very best" end }
- # evaluates the block in the template class, adding method +foo+.
- # helper(:three, BlindHelper) { def mice() 'mice' end }
- # does all three.
- def helper(*args, &block)
- args.flatten.each do |arg|
- case arg
- when Module
- add_template_helper(arg)
- when String, Symbol
- file_name = arg.to_s.underscore + '_helper'
- class_name = file_name.camelize
-
- begin
- require_dependency(file_name)
- rescue LoadError => load_error
- requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]
- msg = (requiree == file_name) ? "Missing helper file helpers/#{file_name}.rb" : "Can't load file: #{requiree}"
- raise LoadError.new(msg).copy_blame!(load_error)
- end
-
- add_template_helper(class_name.constantize)
- else
- raise ArgumentError, 'helper expects String, Symbol, or Module argument'
- end
- end
-
- # Evaluate block in template class if given.
- master_helper_module.module_eval(&block) if block_given?
- end
-
- # Declare a controller method as a helper. For example,
- # helper_method :link_to
- # def link_to(name, options) ... end
- # makes the link_to controller method available in the view.
- def helper_method(*methods)
- methods.flatten.each do |method|
- master_helper_module.module_eval <<-end_eval
- def #{method}(*args, &block)
- controller.__send__(%(#{method}), *args, &block)
- end
- end_eval
- end
- end
-
- # Declare a controller attribute as a helper. For example,
- # helper_attr :name
- # attr_accessor :name
- # makes the name and name= controller methods available in the view.
- # The is a convenience wrapper for helper_method.
- def helper_attr(*attrs)
- attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
- end
-
- private
- def inherited_with_helper(child)
- inherited_without_helper(child)
- begin
- child.master_helper_module = Module.new
- child.master_helper_module.__send__(:include, master_helper_module)
- child.helper child.name.to_s.underscore
- rescue MissingSourceFile => e
- raise unless e.is_missing?("helpers/#{child.name.to_s.underscore}_helper")
- end
- end
- end
-
- private
- # Extend the template class instance with our controller's helper module.
- def initialize_template_class_with_helper(assigns)
- returning(template = initialize_template_class_without_helper(assigns)) do
- template.extend self.class.master_helper_module
- end
- end
- end
-end
View
17 vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb
@@ -1,17 +0,0 @@
-module MailHelper
- # Uses Text::Format to take the text and format it, indented two spaces for
- # each line, and wrapped at 72 columns.
- def block_format(text)
- formatted = text.split(/\n\r\n/).collect { |paragraph|
- Text::Format.new(
- :columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph
- ).format
- }.join("\n")
-
- # Make list points stand on their own line
- formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" }
- formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" }
-
- formatted
- end
-end
View
107 vendor/rails/actionmailer/lib/action_mailer/part.rb
@@ -1,107 +0,0 @@
-module ActionMailer
- # Represents a subpart of an email message. It shares many similar
- # attributes of ActionMailer::Base. Although you can create parts manually
- # and add them to the +parts+ list of the mailer, it is easier
- # to use the helper methods in ActionMailer::PartContainer.
- class Part
- include AdvAttrAccessor, PartContainer, Utils
-
- # Represents the body of the part, as a string. This should not be a
- # Hash (like ActionMailer::Base), but if you want a template to be rendered
- # into the body of a subpart you can do it with the mailer's +render+ method
- # and assign the result here.
- adv_attr_accessor :body
-
- # Specify the charset for this subpart. By default, it will be the charset
- # of the containing part or mailer.
- adv_attr_accessor :charset
-
- # The content disposition of this part, typically either "inline" or
- # "attachment".
- adv_attr_accessor :content_disposition
-
- # The content type of the part.
- adv_attr_accessor :content_type
-
- # The filename to use for this subpart (usually for attachments).
- adv_attr_accessor :filename
-
- # Accessor for specifying additional headers to include with this part.
- adv_attr_accessor :headers
-
- # The transfer encoding to use for this subpart, like "base64" or
- # "quoted-printable".
- adv_attr_accessor :transfer_encoding
-
- # Create a new part from the given +params+ hash. The valid params keys
- # correspond to the accessors.
- def initialize(params)
- @content_type = params[:content_type]
- @content_disposition = params[:disposition] || "inline"
- @charset = params[:charset]
- @body = params[:body]
- @filename = params[:filename]
- @transfer_encoding = params[:transfer_encoding] || "quoted-printable"
- @headers = params[:headers] || {}
- @parts = []
- end
-
- # Convert the part to a mail object which can be included in the parts
- # list of another mail object.
- def to_mail(defaults)
- part = TMail::Mail.new
-
- real_content_type, ctype_attrs = parse_content_type(defaults)
-
- if @parts.empty?
- part.content_transfer_encoding = transfer_encoding || "quoted-printable"
- case (transfer_encoding || "").downcase
- when "base64" then
- part.body = TMail::Base64.folding_encode(body)
- when "quoted-printable"
- part.body = [normalize_new_lines(body)].pack("M*")
- else
- part.body = body
- end
-
- # Always set the content_type after setting the body and or parts!
- # Also don't set filename and name when there is none (like in
- # non-attachment parts)
- if content_disposition == "attachment"
- ctype_attrs.delete "charset"
- part.set_content_type(real_content_type, nil,
- squish("name" => filename).merge(ctype_attrs))
- part.set_content_disposition(content_disposition,
- squish("filename" => filename).merge(ctype_attrs))
- else
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition(content_disposition)
- end
- else
- if String === body
- @parts.unshift Part.new(:charset => charset, :body => @body, :content_type => 'text/plain')
- @body = nil
- end
-
- @parts.each do |p|
- prt = (TMail::Mail === p ? p : p.to_mail(defaults))
- part.parts << prt
- end
-
- if real_content_type =~ /multipart/
- ctype_attrs.delete 'charset'
- part.set_content_type(real_content_type, nil, ctype_attrs)
- end
- end
-
- headers.each { |k,v| part[k] = v }
-
- part
- end
-
- private
- def squish(values={})
- values.delete_if { |k,v| v.nil? }
- end
- end
-end
View
55 vendor/rails/actionmailer/lib/action_mailer/part_container.rb
@@ -1,55 +0,0 @@
-module ActionMailer
- # Accessors and helpers that ActionMailer::Base and ActionMailer::Part have
- # in common. Using these helpers you can easily add subparts or attachments
- # to your message:
- #
- # def my_mail_message(...)
- # ...
- # part "text/plain" do |p|
- # p.body "hello, world"
- # p.transfer_encoding "base64"
- # end
- #
- # attachment "image/jpg" do |a|
- # a.body = File.read("hello.jpg")
- # a.filename = "hello.jpg"
- # end
- # end
- module PartContainer
- # The list of subparts of this container
- attr_reader :parts
-
- # Add a part to a multipart message, with the given content-type. The
- # part itself is yielded to the block so that other properties (charset,
- # body, headers, etc.) can be set on it.
- def part(params)
- params = {:content_type => params} if String === params
- part = Part.new(params)
- yield part if block_given?
- @parts << part
- end
-
- # Add an attachment to a multipart message. This is simply a part with the
- # content-disposition set to "attachment".
- def attachment(params, &block)
- params = { :content_type => params } if String === params
- params = { :disposition => "attachment",
- :transfer_encoding => "base64" }.merge(params)
- part(params, &block)
- end
-
- private
-
- def parse_content_type(defaults=nil)
- if content_type.blank?
- return defaults ?
- [ defaults.content_type, { 'charset' => defaults.charset } ] :
- [ nil, {} ]
- end
- ctype, *attrs = content_type.split(/;\s*/)
- attrs = attrs.inject({}) { |h,s| k,v = s.split(/=/, 2); h[k] = v; h }
- [ctype, {"charset" => charset || defaults && defaults.charset}.merge(attrs)]
- end
-
- end
-end
View
61 vendor/rails/actionmailer/lib/action_mailer/quoting.rb
@@ -1,61 +0,0 @@
-module ActionMailer
- module Quoting #:nodoc:
- # Convert the given text into quoted printable format, with an instruction
- # that the text be eventually interpreted in the given charset.
- def quoted_printable(text, charset)
- text = text.gsub( /[^a-z ]/i ) { quoted_printable_encode($&) }.
- gsub( / /, "_" )
- "=?#{charset}?Q?#{text}?="
- end
-
- # Convert the given character to quoted printable format, taking into
- # account multi-byte characters (if executing with $KCODE="u", for instance)
- def quoted_printable_encode(character)
- result = ""
- character.each_byte { |b| result << "=%02X" % b }
- result
- end
-
- # A quick-and-dirty regexp for determining whether a string contains any
- # characters that need escaping.
- if !defined?(CHARS_NEEDING_QUOTING)
- CHARS_NEEDING_QUOTING = /[\000-\011\013\014\016-\037\177-\377]/
- end
-
- # Quote the given text if it contains any "illegal" characters
- def quote_if_necessary(text, charset)
- text = text.dup.force_encoding(Encoding::ASCII_8BIT) if text.respond_to?(:force_encoding)
-
- (text =~ CHARS_NEEDING_QUOTING) ?
- quoted_printable(text, charset) :
- text
- end
-
- # Quote any of the given strings if they contain any "illegal" characters
- def quote_any_if_necessary(charset, *args)
- args.map { |v| quote_if_necessary(v, charset) }
- end
-
- # Quote the given address if it needs to be. The address may be a
- # regular email address, or it can be a phrase followed by an address in
- # brackets. The phrase is the only part that will be quoted, and only if
- # it needs to be. This allows extended characters to be used in the
- # "to", "from", "cc", "bcc" and "reply-to" headers.
- def quote_address_if_necessary(address, charset)
- if Array === address
- address.map { |a| quote_address_if_necessary(a, charset) }
- elsif address =~ /^(\S.*)\s+(<.*>)$/
- address = $2
- phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset)
- "\"#{phrase}\" #{address}"
- else
- address
- end
- end
-
- # Quote any of the given addresses, if they need to be.
- def quote_any_address_if_necessary(charset, *args)
- args.map { |v| quote_address_if_necessary(v, charset) }
- end
- end
-end
View
64 vendor/rails/actionmailer/lib/action_mailer/test_case.rb
@@ -1,64 +0,0 @@
-require 'active_support/test_case'
-
-module ActionMailer
- class NonInferrableMailerError < ::StandardError
- def initialize(name)
- super "Unable to determine the mailer to test from #{name}. " +
- "You'll need to specify it using tests YourMailer in your " +
- "test case definition"
- end
- end
-
- class TestCase < ActiveSupport::TestCase
- include Quoting, TestHelper
-
- setup :initialize_test_deliveries
- setup :set_expected_mail
-
- class << self
- def tests(mailer)
- write_inheritable_attribute(:mailer_class, mailer)
- end
-
- def mailer_class
- if mailer = read_inheritable_attribute(:mailer_class)
- mailer
- else
- tests determine_default_mailer(name)
- end
- end
-
- def determine_default_mailer(name)
- name.sub(/Test$/, '').constantize
- rescue NameError => e
- raise NonInferrableMailerError.new(name)
- end
- end
-
- protected
- def initialize_test_deliveries
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
- end
-
- def set_expected_mail
- @expected = TMail::Mail.new
- @expected.set_content_type "text", "plain", { "charset" => charset }
- @expected.mime_version = '1.0'
- end
-
- private
- def charset
- "utf-8"
- end
-
- def encode(subject)
- quoted_printable(subject, charset)
- end
-
- def read_fixture(action)
- IO.readlines(File.join(RAILS_ROOT, 'test', 'fixtures', self.class.mailer_class.name.underscore, action))
- end
- end
-end
View
68 vendor/rails/actionmailer/lib/action_mailer/test_helper.rb
@@ -1,68 +0,0 @@
-module ActionMailer
- module TestHelper
- # Asserts that the number of emails sent matches the given number.
- #
- # def test_emails
- # assert_emails 0
- # ContactMailer.deliver_contact
- # assert_emails 1
- # ContactMailer.deliver_contact
- # assert_emails 2
- # end
- #
- # If a block is passed, that block should cause the specified number of emails to be sent.
- #
- # def test_emails_again
- # assert_emails 1 do
- # ContactMailer.deliver_contact
- # end
- #
- # assert_emails 2 do
- # ContactMailer.deliver_contact
- # ContactMailer.deliver_contact
- # end
- # end
- def assert_emails(number)
- if block_given?
- original_count = ActionMailer::Base.deliveries.size
- yield
- new_count = ActionMailer::Base.deliveries.size
- assert_equal original_count + number, new_count, "#{number} emails expected, but #{new_count - original_count} were sent"
- else
- assert_equal number, ActionMailer::Base.deliveries.size
- end
- end
-
- # Assert that no emails have been sent.
- #
- # def test_emails
- # assert_no_emails
- # ContactMailer.deliver_contact
- # assert_emails 1
- # end
- #
- # If a block is passed, that block should not cause any emails to be sent.
- #
- # def test_emails_again
- # assert_no_emails do
- # # No emails should be sent from this block
- # end
- # end
- #
- # Note: This assertion is simply a shortcut for:
- #
- # assert_emails 0
- def assert_no_emails(&block)
- assert_emails 0, &block
- end
- end
-end
-
-# TODO: Deprecate this
-module Test
- module Unit
- class TestCase
- include ActionMailer::TestHelper
- end
- end
-end
View
7 vendor/rails/actionmailer/lib/action_mailer/utils.rb
@@ -1,7 +0,0 @@
-module ActionMailer
- module Utils #:nodoc:
- def normalize_new_lines(text)
- text.to_s.gsub(/\r\n?/, "\n")
- end
- end
-end
View
1,466 vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
@@ -1,1466 +0,0 @@
-#--
-# Text::Format for Ruby
-# Version 0.63
-#
-# Copyright (c) 2002 - 2003 Austin Ziegler
-#
-# $Id: format.rb,v 1.1.1.1 2004/10/14 11:59:57 webster132 Exp $
-#
-# ==========================================================================
-# Revision History ::
-# YYYY.MM.DD Change ID Developer
-# Description
-# --------------------------------------------------------------------------
-# 2002.10.18 Austin Ziegler
-# Fixed a minor problem with tabs not being counted. Changed
-# abbreviations from Hash to Array to better suit Ruby's
-# capabilities. Fixed problems with the way that Array arguments
-# are handled in calls to the major object types, excepting in
-# Text::Format#expand and Text::Format#unexpand (these will
-# probably need to be fixed).
-# 2002.10.30 Austin Ziegler
-# Fixed the ordering of the <=> for binary tests. Fixed
-# Text::Format#expand and Text::Format#unexpand to handle array
-# arguments better.
-# 2003.01.24 Austin Ziegler
-# Fixed a problem with Text::Format::RIGHT_FILL handling where a
-# single word is larger than #columns. Removed Comparable
-# capabilities (<=> doesn't make sense; == does). Added Symbol
-# equivalents for the Hash initialization. Hash initialization has
-# been modified so that values are set as follows (Symbols are
-# highest priority; strings are middle; defaults are lowest):
-# @columns = arg[:columns] || arg['columns'] || @columns
-# Added #hard_margins, #split_rules, #hyphenator, and #split_words.
-# 2003.02.07 Austin Ziegler
-# Fixed the installer for proper case-sensitive handling.
-# 2003.03.28 Austin Ziegler
-# Added the ability for a hyphenator to receive the formatter
-# object. Fixed a bug for strings matching /\A\s*\Z/ failing
-# entirely. Fixed a test case failing under 1.6.8.
-# 2003.04.04 Austin Ziegler
-# Handle the case of hyphenators returning nil for first/rest.
-# 2003.09.17 Austin Ziegler
-# Fixed a problem where #paragraphs(" ") was raising
-# NoMethodError.
-#
-# ==========================================================================
-#++
-
-module Text #:nodoc:
- # Text::Format for Ruby is copyright 2002 - 2005 by Austin Ziegler. It
- # is available under Ruby's licence, the Perl Artistic licence, or the
- # GNU GPL version 2 (or at your option, any later version). As a
- # special exception, for use with official Rails (provided by the
- # rubyonrails.org development team) and any project created with
- # official Rails, the following alternative MIT-style licence may be
- # used:
- #
- # == Text::Format Licence for Rails and Rails Applications
- # Permission is hereby granted, free of charge, to any person
- # obtaining a copy of this software and associated documentation files
- # (the "Software"), to deal in the Software without restriction,
- # including without limitation the rights to use, copy, modify, merge,
- # publish, distribute, sublicense, and/or sell copies of the Software,
- # and to permit persons to whom the Software is furnished to do so,
- # subject to the following conditions:
- #
- # * The names of its contributors may not be used to endorse or
- # promote products derived from this software without specific prior
- # written permission.
- #
- # The above copyright notice and this permission notice shall be
- # included in all copies or substantial portions of the Software.
- #