Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Demos first commit.

  • Loading branch information...
commit 3d3af350327746f5bf023c1cf2088d6aa8c200eb 0 parents
@jacortinas authored
Showing with 34,896 additions and 0 deletions.
  1. +1 −0  .gems/bundler_gems/environment.rb
  2. BIN  .gems/bundler_gems/jruby/1.8/cache/actionmailer-2.3.5.gem
  3. BIN  .gems/bundler_gems/jruby/1.8/cache/actionpack-2.3.5.gem
  4. BIN  .gems/bundler_gems/jruby/1.8/cache/activerecord-2.3.5.gem
  5. BIN  .gems/bundler_gems/jruby/1.8/cache/activeresource-2.3.5.gem
  6. BIN  .gems/bundler_gems/jruby/1.8/cache/activesupport-2.3.5.gem
  7. BIN  .gems/bundler_gems/jruby/1.8/cache/addressable-2.1.2.gem
  8. BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-apis-0.0.16.gem
  9. BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-apis-0.0.17.gem
  10. BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-rack-0.0.10.pre.gem
  11. BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-rack-0.0.9.gem
  12. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-appengine-0.0.9.gem
  13. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-ar-finders-0.10.2.gem
  14. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-core-0.10.2.gem
  15. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-serializer-0.10.2.gem
  16. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-timestamps-0.10.2.gem
  17. BIN  .gems/bundler_gems/jruby/1.8/cache/dm-validations-0.10.2.gem
  18. BIN  .gems/bundler_gems/jruby/1.8/cache/extlib-0.9.15.gem
  19. BIN  .gems/bundler_gems/jruby/1.8/cache/fastercsv-1.5.3.gem
  20. BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-jars-1.4.1.gem
  21. BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-jars-1.5.1.gem
  22. BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-rack-1.0.1.gem
  23. BIN  .gems/bundler_gems/jruby/1.8/cache/json-jruby-1.4.3-universal-java-1.6.gem
  24. BIN  .gems/bundler_gems/jruby/1.8/cache/json_pure-1.2.4.gem
  25. BIN  .gems/bundler_gems/jruby/1.8/cache/rack-1.0.1.gem
  26. BIN  .gems/bundler_gems/jruby/1.8/cache/rack-1.1.0.gem
  27. BIN  .gems/bundler_gems/jruby/1.8/cache/rails-2.3.5.gem
  28. BIN  .gems/bundler_gems/jruby/1.8/cache/rails_appengine-0.0.3.gem
  29. BIN  .gems/bundler_gems/jruby/1.8/cache/rails_dm_datastore-0.2.9.gem
  30. BIN  .gems/bundler_gems/jruby/1.8/cache/rake-0.8.7.gem
  31. +142 −0 .gems/bundler_gems/jruby/1.8/environment.rb
  32. +370 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/CHANGELOG
  33. +21 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/MIT-LICENSE
  34. +149 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/README
  35. +99 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/Rakefile
  36. +30 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/install.rb
  37. +62 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer.rb
  38. +30 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/adv_attr_accessor.rb
  39. +706 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb
  40. +113 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/helpers.rb
  41. +17 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/mail_helper.rb
  42. +107 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/part.rb
  43. +55 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/part_container.rb
  44. +61 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/quoting.rb
  45. +64 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/test_case.rb
  46. +68 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/test_helper.rb
  47. +7 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/utils.rb
  48. +1,466 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
  49. +10 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/text_format.rb
  50. +5 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb
  51. +426 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb
  52. +46 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb
  53. +46 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/base64.rb
  54. +41 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb
  55. +67 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb
  56. +63 −0 ...undler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb
  57. +581 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb
  58. +960 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb
  59. +9 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb
  60. +1,130 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb
  61. +3 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/loader.rb
  62. +578 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb
  63. +495 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb
  64. +6 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/main.rb
  65. +3 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/mbox.rb
  66. +248 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb
  67. +132 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb
  68. +1,478 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb
  69. +379 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb
  70. +118 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb
  71. +58 −0 ...s/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/require_arch.rb
  72. +49 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner.rb
  73. +261 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/scanner_r.rb
  74. +280 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb
  75. +337 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb
  76. +39 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail-1.2.3/tmail/version.rb
  77. +17 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/vendor/tmail.rb
  78. +9 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/version.rb
  79. +2 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/actionmailer.rb
  80. +62 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/abstract_unit.rb
  81. +54 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/asset_host_test.rb
  82. +51 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/delivery_method_test.rb
  83. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/asset_host_mailer/email_with_asset.html.erb
  84. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/auto_layout_mailer/hello.html.erb
  85. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/auto_layout_mailer/multipart.text.html.erb
  86. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/auto_layout_mailer/multipart.text.plain.erb
  87. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/explicit_layout_mailer/logout.html.erb
  88. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/explicit_layout_mailer/signup.html.erb
  89. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/first_mailer/share.erb
  90. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/helper_mailer/use_example_helper.erb
  91. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/helper_mailer/use_helper.erb
  92. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/helper_mailer/use_helper_method.erb
  93. +5 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/helper_mailer/use_mail_helper.erb
  94. +5 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/helpers/example_helper.rb
  95. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/layouts/auto_layout_mailer.html.erb
  96. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/layouts/auto_layout_mailer.text.erb
  97. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/layouts/spam.html.erb
  98. +1 −0  ...ctionmailer-2.3.5/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb
  99. +14 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email
  100. +20 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email10
  101. +32 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email12
  102. +29 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email13
  103. +114 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email2
  104. +70 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email3
  105. +59 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email4
  106. +19 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email5
  107. +20 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email6
  108. +66 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email7
  109. +47 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email8
  110. +28 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email9
  111. +14 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email_quoted_with_0d0a
  112. +104 −0 ...dler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email_with_invalid_characters_in_content_type
  113. +100 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email_with_nested_attachment
  114. +14 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/raw_email_with_partially_quoted_subject
  115. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/second_mailer/share.erb
  116. +3 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/templates/signed_up.erb
  117. +1 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/_subtemplate.text.plain.erb
  118. +2 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/body_ivar.erb
  119. +6 −0 ...gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/custom_templating_extension.text.html.haml
  120. +6 −0 ...ems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml
  121. +1 −0  ...r_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb
  122. +1 −0  ...ler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak
  123. +10 −0 ...gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb
  124. +10 −0 ...ems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~
  125. +2 −0  ...ems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb
  126. +1 −0  ...gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb
  127. +1 −0  ...undler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/included_subtemplate.text.plain.erb
  128. +2 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/rxml_template.builder
  129. +2 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/rxml_template.rxml
  130. +3 −0  .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/signed_up.html.erb
  131. +5 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/fixtures/test_mailer/signed_up_with_url.erb
  132. +95 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/mail_helper_test.rb
  133. +123 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/mail_layout_test.rb
  134. +116 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/mail_render_test.rb
  135. +1,081 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/mail_service_test.rb
  136. +99 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/quoting_test.rb
  137. +129 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/test_helper_test.rb
  138. +22 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/tmail_test.rb
  139. +76 −0 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/test/url_test.rb
  140. +5,184 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/CHANGELOG
  141. +21 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/MIT-LICENSE
  142. +409 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/README
  143. +24 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/RUNNING_UNIT_TESTS
  144. +160 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/Rakefile
  145. +30 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/install.rb
  146. +113 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller.rb
  147. +55 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/dom_assertions.rb
  148. +21 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/model_assertions.rb
  149. +160 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/response_assertions.rb
  150. +146 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/routing_assertions.rb
  151. +638 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/selector_assertions.rb
  152. +127 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/assertions/tag_assertions.rb
  153. +1,423 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb
  154. +107 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb
  155. +71 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching.rb
  156. +177 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching/actions.rb
  157. +120 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching/fragments.rb
  158. +152 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching/pages.rb
  159. +45 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching/sweeper.rb
  160. +55 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/caching/sweeping.rb
  161. +15 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_ext.rb
  162. +112 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_ext/cookie.rb
  163. +22 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_ext/query_extension.rb
  164. +24 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_ext/stdinput.rb
  165. +77 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_process.rb
  166. +95 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/cookies.rb
  167. +133 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb
  168. +86 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb
  169. +680 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb
  170. +171 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb
  171. +33 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/headers.rb
  172. +225 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb
  173. +309 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/http_authentication.rb
  174. +692 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/integration.rb
  175. +286 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/layout.rb
  176. +119 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/middleware_stack.rb
  177. +14 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/middlewares.rb
  178. +193 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_responds.rb
  179. +212 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_type.rb
  180. +21 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_types.rb
  181. +77 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb
  182. +15 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/performance_test.rb
  183. +189 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/polymorphic_routes.rb
  184. +36 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rack_lint_patch.rb
  185. +104 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/record_identifier.rb
  186. +54 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb
  187. +493 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/request.rb
  188. +113 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/request_forgery_protection.rb
  189. +183 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb
  190. +682 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/resources.rb
  191. +239 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/response.rb
  192. +388 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing.rb
  193. +197 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/builder.rb
  194. +130 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/optimisations.rb
  195. +167 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/recognition_optimisation.rb
  196. +265 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route.rb
  197. +502 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb
  198. +49 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/routing_ext.rb
  199. +343 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/segments.rb
  200. +181 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session/abstract_store.rb
  201. +221 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb
  202. +51 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session/mem_cache_store.rb
  203. +54 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session_management.rb
  204. +88 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/status_codes.rb
  205. +181 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/streaming.rb
  206. +29 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb
  207. +24 −0 ...dler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/_request_and_response.erb
  208. +26 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/_trace.erb
  209. +11 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/diagnostics.erb
  210. +29 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/layout.erb
  211. +2 −0  ...s/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/missing_template.erb
  212. +10 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/routing_error.erb
  213. +21 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/template_error.erb
  214. +2 −0  .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/unknown_action.erb
  215. +209 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/test_case.rb
  216. +580 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/test_process.rb
  217. +13 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/translation.rb
  218. +44 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/uploaded_file.rb
  219. +216 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/url_rewriter.rb
  220. +16 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner.rb
  221. +68 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/document.rb
  222. +537 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/node.rb
  223. +173 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/sanitizer.rb
  224. +828 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/selector.rb
  225. +105 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
  226. +11 −0 .gems/bundler_gems/jruby/1.8/gems/actionpack-2.3.5/lib/action_controller/vendor/html-scanner/html/version.rb
Sorry, we could not display the entire diff because too many files (2,658) changed.
1  .gems/bundler_gems/environment.rb
@@ -0,0 +1 @@
+require 'bundler_gems/jruby/1.8/environment'
BIN  .gems/bundler_gems/jruby/1.8/cache/actionmailer-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/actionpack-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/activerecord-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/activeresource-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/activesupport-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/addressable-2.1.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-apis-0.0.16.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-apis-0.0.17.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-rack-0.0.10.pre.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/appengine-rack-0.0.9.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-appengine-0.0.9.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-ar-finders-0.10.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-core-0.10.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-serializer-0.10.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-timestamps-0.10.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/dm-validations-0.10.2.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/extlib-0.9.15.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/fastercsv-1.5.3.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-jars-1.4.1.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-jars-1.5.1.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/jruby-rack-1.0.1.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/json-jruby-1.4.3-universal-java-1.6.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/json_pure-1.2.4.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rack-1.0.1.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rack-1.1.0.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rails-2.3.5.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rails_appengine-0.0.3.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rails_dm_datastore-0.2.9.gem
Binary file not shown
BIN  .gems/bundler_gems/jruby/1.8/cache/rake-0.8.7.gem
Binary file not shown
142 .gems/bundler_gems/jruby/1.8/environment.rb
@@ -0,0 +1,142 @@
+# DO NOT MODIFY THIS FILE
+module Bundler
+ file = File.expand_path(__FILE__)
+ dir = File.dirname(file)
+
+ ENV["GEM_HOME"] = dir
+ ENV["GEM_PATH"] = dir
+
+ # handle 1.9 where system gems are always on the load path
+ if defined?(::Gem)
+ $LOAD_PATH.reject! do |p|
+ p != File.dirname(__FILE__) &&
+ Gem.path.any? { |gp| p.include?(gp) }
+ end
+ end
+
+ ENV["PATH"] = "#{dir}/../../../../bin:#{ENV["PATH"]}"
+ ENV["RUBYOPT"] = "-r#{file} #{ENV["RUBYOPT"]}"
+
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/activesupport-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/actionmailer-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json_pure-1.2.4/bin")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json_pure-1.2.4/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/extlib-0.9.15/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rails_appengine-0.0.3/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/bin")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/actionpack-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/jruby-jars-1.5.1/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/json-jruby-1.4.3-universal-java-1.6/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-appengine-0.0.9/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/jruby-rack-1.0.1/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/appengine-rack-0.0.10.pre/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/appengine-apis-0.0.17/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/bin")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rake-0.8.7/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/addressable-2.1.2/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-core-0.10.2/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-timestamps-0.10.2/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-validations-0.10.2/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/activerecord-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-ar-finders-0.10.2/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/activeresource-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rails-2.3.5/bin")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rails-2.3.5/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rails_dm_datastore-0.2.9/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/fastercsv-1.5.3/lib")
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/dm-serializer-0.10.2/lib")
+
+ @gemfile = "#{dir}/../../../../Gemfile"
+
+
+ def self.require_env(env = nil)
+ context = Class.new do
+ def initialize(env) @env = env && env.to_s ; end
+ def method_missing(*) ; yield if block_given? ; end
+ def only(*env)
+ old, @only = @only, _combine_only(env.flatten)
+ yield
+ @only = old
+ end
+ def except(*env)
+ old, @except = @except, _combine_except(env.flatten)
+ yield
+ @except = old
+ end
+ def gem(name, *args)
+ opt = args.last.is_a?(Hash) ? args.pop : {}
+ only = _combine_only(opt[:only] || opt["only"])
+ except = _combine_except(opt[:except] || opt["except"])
+ files = opt[:require_as] || opt["require_as"] || name
+ files = [files] unless files.respond_to?(:each)
+
+ return unless !only || only.any? {|e| e == @env }
+ return if except && except.any? {|e| e == @env }
+
+ if files = opt[:require_as] || opt["require_as"]
+ files = Array(files)
+ files.each { |f| require f }
+ else
+ begin
+ require name
+ rescue LoadError
+ # Do nothing
+ end
+ end
+ yield if block_given?
+ true
+ end
+ private
+ def _combine_only(only)
+ return @only unless only
+ only = [only].flatten.compact.uniq.map { |o| o.to_s }
+ only &= @only if @only
+ only
+ end
+ def _combine_except(except)
+ return @except unless except
+ except = [except].flatten.compact.uniq.map { |o| o.to_s }
+ except |= @except if @except
+ except
+ end
+ end
+ context.new(env && env.to_s).instance_eval(File.read(@gemfile), @gemfile, 1)
+ end
+end
+
+$" << "rubygems.rb"
+
+module Kernel
+ def gem(*)
+ # Silently ignore calls to gem, since, in theory, everything
+ # is activated correctly already.
+ end
+end
+
+# Define all the Gem errors for gems that reference them.
+module Gem
+ def self.ruby ; "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby" ; end
+ def self.dir ; @dir ||= File.dirname(File.expand_path(__FILE__)) ; end
+ class << self ; alias default_dir dir; alias path dir ; end
+ class LoadError < ::LoadError; end
+ class Exception < RuntimeError; end
+ class CommandLineError < Exception; end
+ class DependencyError < Exception; end
+ class DependencyRemovalException < Exception; end
+ class GemNotInHomeException < Exception ; end
+ class DocumentError < Exception; end
+ class EndOfYAMLException < Exception; end
+ class FilePermissionError < Exception; end
+ class FormatException < Exception; end
+ class GemNotFoundException < Exception; end
+ class InstallError < Exception; end
+ class InvalidSpecificationException < Exception; end
+ class OperationNotSupportedError < Exception; end
+ class RemoteError < Exception; end
+ class RemoteInstallationCancelled < Exception; end
+ class RemoteInstallationSkipped < Exception; end
+ class RemoteSourceException < Exception; end
+ class VerificationError < Exception; end
+ class SystemExitException < SystemExit; end
+end
370 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/CHANGELOG
@@ -0,0 +1,370 @@
+*2.3.5 (November 25, 2009)*
+
+* Minor Bug Fixes and deprecation warnings
+
+*2.3.4 (September 4, 2009)*
+
+* Minor bug fixes.
+
+*2.3.3 (July 12, 2009)*
+
+* No changes, just a version bump.
+
+*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
21 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/MIT-LICENSE
@@ -0,0 +1,21 @@
+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.
+
149 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/README
@@ -0,0 +1,149 @@
+= 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.
99 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/Rakefile
@@ -0,0 +1,99 @@
+require 'rubygems'
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rake/packagetask'
+require 'rake/gempackagetask'
+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.5' + 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
+ require 'rake/contrib/sshpublisher'
+ Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
+ `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
+end
+
+desc "Publish the API documentation"
+task :pdoc => [:rdoc] do
+ require 'rake/contrib/sshpublisher'
+ Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
+end
+
+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
30 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/install.rb
@@ -0,0 +1,30 @@
+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
+}
62 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer.rb
@@ -0,0 +1,62 @@
+#--
+# 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'
30 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/adv_attr_accessor.rb
@@ -0,0 +1,30 @@
+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
706 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb
@@ -0,0 +1,706 @@
+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
+ @sent_on ||= Time.now
+ 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
113 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/helpers.rb
@@ -0,0 +1,113 @@
+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
17 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/mail_helper.rb
@@ -0,0 +1,17 @@
+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
107 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/part.rb
@@ -0,0 +1,107 @@
+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
55 .gems/bundler_gems/jruby/1.8/gems/actionmailer-2.3.5/lib/action_mailer/part_container.rb
@@ -0,0 +1,55 @@
+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
61