actionmailer-2.3.17-rack-upgrade 2.3.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/CHANGELOG +387 -0
  2. data/MIT-LICENSE +21 -0
  3. data/README +149 -0
  4. data/Rakefile +97 -0
  5. data/install.rb +30 -0
  6. data/lib/action_mailer.rb +62 -0
  7. data/lib/action_mailer/adv_attr_accessor.rb +30 -0
  8. data/lib/action_mailer/base.rb +739 -0
  9. data/lib/action_mailer/helpers.rb +113 -0
  10. data/lib/action_mailer/mail_helper.rb +17 -0
  11. data/lib/action_mailer/part.rb +107 -0
  12. data/lib/action_mailer/part_container.rb +55 -0
  13. data/lib/action_mailer/quoting.rb +62 -0
  14. data/lib/action_mailer/test_case.rb +64 -0
  15. data/lib/action_mailer/test_helper.rb +68 -0
  16. data/lib/action_mailer/utils.rb +7 -0
  17. data/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
  18. data/lib/action_mailer/vendor/text_format.rb +10 -0
  19. data/lib/action_mailer/vendor/tmail-1.2.7/tmail.rb +6 -0
  20. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
  21. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/address.rb +392 -0
  22. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
  23. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/base64.rb +46 -0
  24. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb +41 -0
  25. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/config.rb +67 -0
  26. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/core_extensions.rb +63 -0
  27. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/encode.rb +590 -0
  28. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/header.rb +962 -0
  29. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/index.rb +9 -0
  30. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb +1162 -0
  31. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/loader.rb +3 -0
  32. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb +578 -0
  33. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb +496 -0
  34. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/main.rb +6 -0
  35. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mbox.rb +3 -0
  36. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/net.rb +250 -0
  37. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/obsolete.rb +132 -0
  38. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
  39. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
  40. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb +379 -0
  41. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb +164 -0
  42. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb +58 -0
  43. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner.rb +49 -0
  44. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner_r.rb +262 -0
  45. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/stringio.rb +280 -0
  46. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb +362 -0
  47. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
  48. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
  49. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
  50. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
  51. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
  52. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
  53. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
  54. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
  55. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
  56. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
  57. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
  58. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
  59. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
  60. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
  61. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
  62. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
  63. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
  64. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
  65. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
  66. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
  67. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
  68. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
  69. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
  70. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
  71. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
  72. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
  73. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
  74. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
  75. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
  76. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
  77. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
  78. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
  79. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
  80. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
  81. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
  82. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
  83. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
  84. data/lib/action_mailer/vendor/tmail-1.2.7/tmail/version.rb +39 -0
  85. data/lib/action_mailer/vendor/tmail.rb +17 -0
  86. data/lib/action_mailer/version.rb +9 -0
  87. data/lib/actionmailer.rb +2 -0
  88. data/test/abstract_unit.rb +62 -0
  89. data/test/asset_host_test.rb +54 -0
  90. data/test/delivery_method_test.rb +51 -0
  91. data/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
  92. data/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
  93. data/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
  94. data/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
  95. data/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
  96. data/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
  97. data/test/fixtures/first_mailer/share.erb +1 -0
  98. data/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
  99. data/test/fixtures/helper_mailer/use_helper.erb +1 -0
  100. data/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
  101. data/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
  102. data/test/fixtures/helpers/example_helper.rb +5 -0
  103. data/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
  104. data/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
  105. data/test/fixtures/layouts/spam.html.erb +1 -0
  106. data/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
  107. data/test/fixtures/raw_email +14 -0
  108. data/test/fixtures/raw_email10 +20 -0
  109. data/test/fixtures/raw_email12 +32 -0
  110. data/test/fixtures/raw_email13 +29 -0
  111. data/test/fixtures/raw_email2 +114 -0
  112. data/test/fixtures/raw_email3 +70 -0
  113. data/test/fixtures/raw_email4 +59 -0
  114. data/test/fixtures/raw_email5 +19 -0
  115. data/test/fixtures/raw_email6 +20 -0
  116. data/test/fixtures/raw_email7 +66 -0
  117. data/test/fixtures/raw_email8 +47 -0
  118. data/test/fixtures/raw_email9 +28 -0
  119. data/test/fixtures/raw_email_quoted_with_0d0a +14 -0
  120. data/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
  121. data/test/fixtures/raw_email_with_nested_attachment +100 -0
  122. data/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
  123. data/test/fixtures/second_mailer/share.erb +1 -0
  124. data/test/fixtures/templates/signed_up.erb +3 -0
  125. data/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
  126. data/test/fixtures/test_mailer/body_ivar.erb +2 -0
  127. data/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
  128. data/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
  129. data/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
  130. data/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
  131. data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
  132. data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ +10 -0
  133. data/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
  134. data/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
  135. data/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
  136. data/test/fixtures/test_mailer/rxml_template.builder +2 -0
  137. data/test/fixtures/test_mailer/rxml_template.rxml +2 -0
  138. data/test/fixtures/test_mailer/signed_up.html.erb +3 -0
  139. data/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
  140. data/test/mail_helper_test.rb +95 -0
  141. data/test/mail_layout_test.rb +123 -0
  142. data/test/mail_render_test.rb +116 -0
  143. data/test/mail_service_test.rb +1145 -0
  144. data/test/quoting_test.rb +105 -0
  145. data/test/test_helper_test.rb +129 -0
  146. data/test/tmail_test.rb +22 -0
  147. data/test/url_test.rb +76 -0
  148. metadata +209 -0
@@ -0,0 +1,39 @@
1
+ #
2
+ # version.rb
3
+ #
4
+ #--
5
+ # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net>
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining
8
+ # a copy of this software and associated documentation files (the
9
+ # "Software"), to deal in the Software without restriction, including
10
+ # without limitation the rights to use, copy, modify, merge, publish,
11
+ # distribute, sublicense, and/or sell copies of the Software, and to
12
+ # permit persons to whom the Software is furnished to do so, subject to
13
+ # the following conditions:
14
+ #
15
+ # The above copyright notice and this permission notice shall be
16
+ # included in all copies or substantial portions of the Software.
17
+ #
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+ #
26
+ # Note: Originally licensed under LGPL v2+. Using MIT license for Rails
27
+ # with permission of Minero Aoki.
28
+ #++
29
+
30
+ #:stopdoc:
31
+ module TMail
32
+ module VERSION
33
+ MAJOR = 1
34
+ MINOR = 2
35
+ TINY = 6
36
+
37
+ STRING = [MAJOR, MINOR, TINY].join('.')
38
+ end
39
+ end
@@ -0,0 +1,17 @@
1
+ # Prefer gems to the bundled libs.
2
+ require 'rubygems'
3
+
4
+ begin
5
+ gem 'tmail', '~> 1.2.7'
6
+ rescue Gem::LoadError
7
+ $:.unshift "#{File.dirname(__FILE__)}/tmail-1.2.7"
8
+ end
9
+
10
+ module TMail
11
+ end
12
+
13
+ require 'tmail'
14
+
15
+ silence_warnings do
16
+ TMail::Encoder.const_set("MAX_LINE_LEN", 200)
17
+ end
@@ -0,0 +1,9 @@
1
+ module ActionMailer
2
+ module VERSION #:nodoc:
3
+ MAJOR = 2
4
+ MINOR = 3
5
+ TINY = 17
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ require 'action_mailer'
2
+ ActiveSupport::Deprecation.warn 'require "actionmailer" is deprecated and will be removed in Rails 3. Use require "action_mailer" instead.'
@@ -0,0 +1,62 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+
4
+ $:.unshift File.expand_path('../../lib', __FILE__)
5
+ $:.unshift File.expand_path('../../../activesupport/lib', __FILE__)
6
+ $:.unshift File.expand_path('../../../actionpack/lib', __FILE__)
7
+ require 'action_mailer'
8
+ require 'action_mailer/test_case'
9
+
10
+ # Show backtraces for deprecated behavior for quicker cleanup.
11
+ ActiveSupport::Deprecation.debug = true
12
+
13
+ # Bogus template processors
14
+ ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect }
15
+ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect }
16
+
17
+ $:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers"
18
+
19
+ ActionView::Base.cache_template_loading = true
20
+ FIXTURE_LOAD_PATH = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
21
+ ActionMailer::Base.template_root = FIXTURE_LOAD_PATH
22
+
23
+ class MockSMTP
24
+ def self.deliveries
25
+ @@deliveries
26
+ end
27
+
28
+ def initialize
29
+ @@deliveries = []
30
+ end
31
+
32
+ def sendmail(mail, from, to)
33
+ @@deliveries << [mail, from, to]
34
+ end
35
+
36
+ def start(*args)
37
+ yield self
38
+ end
39
+ end
40
+
41
+ class Net::SMTP
42
+ def self.new(*args)
43
+ MockSMTP.new
44
+ end
45
+ end
46
+
47
+ def uses_gem(gem_name, test_name, version = '> 0')
48
+ gem gem_name.to_s, version
49
+ require gem_name.to_s
50
+ yield
51
+ rescue LoadError
52
+ $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again."
53
+ end
54
+
55
+ def set_delivery_method(delivery_method)
56
+ @old_delivery_method = ActionMailer::Base.delivery_method
57
+ ActionMailer::Base.delivery_method = delivery_method
58
+ end
59
+
60
+ def restore_delivery_method
61
+ ActionMailer::Base.delivery_method = @old_delivery_method
62
+ end
@@ -0,0 +1,54 @@
1
+ require 'abstract_unit'
2
+
3
+ class AssetHostMailer < ActionMailer::Base
4
+ def email_with_asset(recipient)
5
+ recipients recipient
6
+ subject "testing email containing asset path while asset_host is set"
7
+ from "tester@example.com"
8
+ end
9
+ end
10
+
11
+ class AssetHostTest < Test::Unit::TestCase
12
+ def setup
13
+ set_delivery_method :test
14
+ ActionMailer::Base.perform_deliveries = true
15
+ ActionMailer::Base.deliveries = []
16
+
17
+ @recipient = 'test@localhost'
18
+ end
19
+
20
+ def teardown
21
+ restore_delivery_method
22
+ end
23
+
24
+ def test_asset_host_as_string
25
+ ActionController::Base.asset_host = "http://www.example.com"
26
+ mail = AssetHostMailer.deliver_email_with_asset(@recipient)
27
+ assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.strip
28
+ end
29
+
30
+ def test_asset_host_as_one_arguement_proc
31
+ ActionController::Base.asset_host = Proc.new { |source|
32
+ if source.starts_with?('/images')
33
+ "http://images.example.com"
34
+ else
35
+ "http://assets.example.com"
36
+ end
37
+ }
38
+ mail = AssetHostMailer.deliver_email_with_asset(@recipient)
39
+ assert_equal "<img alt=\"Somelogo\" src=\"http://images.example.com/images/somelogo.png\" />", mail.body.strip
40
+ end
41
+
42
+ def test_asset_host_as_two_arguement_proc
43
+ ActionController::Base.asset_host = Proc.new {|source,request|
44
+ if request && request.ssl?
45
+ "https://www.example.com"
46
+ else
47
+ "http://www.example.com"
48
+ end
49
+ }
50
+ mail = nil
51
+ assert_nothing_raised { mail = AssetHostMailer.deliver_email_with_asset(@recipient) }
52
+ assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.strip
53
+ end
54
+ end
@@ -0,0 +1,51 @@
1
+ require 'abstract_unit'
2
+
3
+ class DefaultDeliveryMethodMailer < ActionMailer::Base
4
+ end
5
+
6
+ class NonDefaultDeliveryMethodMailer < ActionMailer::Base
7
+ self.delivery_method = :sendmail
8
+ end
9
+
10
+ class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase
11
+ def setup
12
+ set_delivery_method :smtp
13
+ end
14
+
15
+ def teardown
16
+ restore_delivery_method
17
+ end
18
+
19
+ def test_should_be_the_default_smtp
20
+ assert_equal :smtp, ActionMailer::Base.delivery_method
21
+ end
22
+ end
23
+
24
+ class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
25
+ def setup
26
+ set_delivery_method :smtp
27
+ end
28
+
29
+ def teardown
30
+ restore_delivery_method
31
+ end
32
+
33
+ def test_should_be_the_default_smtp
34
+ assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method
35
+ end
36
+ end
37
+
38
+ class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
39
+ def setup
40
+ set_delivery_method :smtp
41
+ end
42
+
43
+ def teardown
44
+ restore_delivery_method
45
+ end
46
+
47
+ def test_should_be_the_set_delivery_method
48
+ assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method
49
+ end
50
+ end
51
+
@@ -0,0 +1 @@
1
+ <%= image_tag "somelogo.png" %>
@@ -0,0 +1 @@
1
+ text/html multipart
@@ -0,0 +1 @@
1
+ text/plain multipart
@@ -0,0 +1 @@
1
+ first mail
@@ -0,0 +1 @@
1
+ So, <%= example_format(@text) %>
@@ -0,0 +1 @@
1
+ Hello, <%= person_name %>. Thanks for registering!
@@ -0,0 +1 @@
1
+ This message brought to you by <%= name_of_the_mailer_class %>.
@@ -0,0 +1,5 @@
1
+ From "Romeo and Juliet":
2
+
3
+ <%= block_format @text %>
4
+
5
+ Good ol' Shakespeare.
@@ -0,0 +1,5 @@
1
+ module ExampleHelper
2
+ def example_format(text)
3
+ "<em><strong><small>#{h(text)}</small></strong></em>".html_safe
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ Hello from layout <%= yield %>
@@ -0,0 +1 @@
1
+ text/plain layout - <%= yield %>
@@ -0,0 +1 @@
1
+ Spammer layout <%= yield %>
@@ -0,0 +1,14 @@
1
+ From jamis_buck@byu.edu Mon May 2 16:07:05 2005
2
+ Mime-Version: 1.0 (Apple Message framework v622)
3
+ Content-Transfer-Encoding: base64
4
+ Message-Id: <d3b8cf8e49f04480850c28713a1f473e@37signals.com>
5
+ Content-Type: text/plain;
6
+ charset=EUC-KR;
7
+ format=flowed
8
+ To: willard15georgina@jamis.backpackit.com
9
+ From: Jamis Buck <jamis@37signals.com>
10
+ Subject: =?EUC-KR?Q?NOTE:_=C7=D1=B1=B9=B8=BB=B7=CE_=C7=CF=B4=C2_=B0=CD?=
11
+ Date: Mon, 2 May 2005 16:07:05 -0600
12
+
13
+ tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin
14
+ wLogSmFtaXPA1LTPtNku
@@ -0,0 +1,20 @@
1
+ Return-Path: <xxx@xxxx.xxx>
2
+ Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:05 -0500
3
+ Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:04 -0500
4
+ Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:03 -0500
5
+ Date: Tue, 10 May 2005 15:27:03 -0500
6
+ From: xxx@xxxx.xxx
7
+ Sender: xxx@xxxx.xxx
8
+ To: xxxxxxxxxxx@xxxx.xxxx.xxx
9
+ Message-Id: <xxx@xxxx.xxx>
10
+ X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx
11
+ Delivered-To: xxx@xxxx.xxx
12
+ Importance: normal
13
+ Content-Type: text/plain; charset=X-UNKNOWN
14
+
15
+ Test test. Hi. Waving. m
16
+
17
+ ----------------------------------------------------------------
18
+ Sent via Bell Mobility's Text Messaging service.
19
+ Envoyé par le service de messagerie texte de Bell Mobilité.
20
+ ----------------------------------------------------------------
@@ -0,0 +1,32 @@
1
+ Mime-Version: 1.0 (Apple Message framework v730)
2
+ Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151
3
+ Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
4
+ From: foo@example.com
5
+ Subject: testing
6
+ Date: Mon, 6 Jun 2005 22:21:22 +0200
7
+ To: blah@example.com
8
+
9
+
10
+ --Apple-Mail-13-196941151
11
+ Content-Transfer-Encoding: quoted-printable
12
+ Content-Type: text/plain;
13
+ charset=ISO-8859-1;
14
+ delsp=yes;
15
+ format=flowed
16
+
17
+ This is the first part.
18
+
19
+ --Apple-Mail-13-196941151
20
+ Content-Type: image/jpeg
21
+ Content-Transfer-Encoding: base64
22
+ Content-Location: Photo25.jpg
23
+ Content-ID: <qbFGyPQAS8>
24
+ Content-Disposition: inline
25
+
26
+ jamisSqGSIb3DQEHAqCAMIjamisxCzAJBgUrDgMCGgUAMIAGCSqGSjamisEHAQAAoIIFSjCCBUYw
27
+ ggQujamisQICBD++ukQwDQYJKojamisNAQEFBQAwMTELMAkGA1UEBhMCRjamisAKBgNVBAoTA1RE
28
+ QzEUMBIGjamisxMLVERDIE9DRVMgQ0jamisNMDQwMjI5MTE1OTAxWhcNMDYwMjamisIyOTAxWjCB
29
+ gDELMAkGA1UEjamisEsxKTAnBgNVBAoTIEjamisuIG9yZ2FuaXNhdG9yaXNrIHRpbjamisRuaW5=
30
+
31
+ --Apple-Mail-13-196941151--
32
+
@@ -0,0 +1,29 @@
1
+ Mime-Version: 1.0 (Apple Message framework v730)
2
+ Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151
3
+ Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
4
+ From: foo@example.com
5
+ Subject: testing
6
+ Date: Mon, 6 Jun 2005 22:21:22 +0200
7
+ To: blah@example.com
8
+
9
+
10
+ --Apple-Mail-13-196941151
11
+ Content-Transfer-Encoding: quoted-printable
12
+ Content-Type: text/plain;
13
+ charset=ISO-8859-1;
14
+ delsp=yes;
15
+ format=flowed
16
+
17
+ This is the first part.
18
+
19
+ --Apple-Mail-13-196941151
20
+ Content-Type: text/x-ruby-script; name="hello.rb"
21
+ Content-Transfer-Encoding: 7bit
22
+ Content-Disposition: attachment;
23
+ filename="api.rb"
24
+
25
+ puts "Hello, world!"
26
+ gets
27
+
28
+ --Apple-Mail-13-196941151--
29
+
@@ -0,0 +1,114 @@
1
+ From xxxxxxxxx.xxxxxxx@gmail.com Sun May 8 19:07:09 2005
2
+ Return-Path: <xxxxxxxxx.xxxxxxx@gmail.com>
3
+ X-Original-To: xxxxx@xxxxx.xxxxxxxxx.com
4
+ Delivered-To: xxxxx@xxxxx.xxxxxxxxx.com
5
+ Received: from localhost (localhost [127.0.0.1])
6
+ by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 06C9DA98D
7
+ for <xxxxx@xxxxx.xxxxxxxxx.com>; Sun, 8 May 2005 19:09:13 +0000 (GMT)
8
+ Received: from xxxxx.xxxxxxxxx.com ([127.0.0.1])
9
+ by localhost (xxxxx.xxxxxxxxx.com [127.0.0.1]) (amavisd-new, port 10024)
10
+ with LMTP id 88783-08 for <xxxxx@xxxxx.xxxxxxxxx.com>;
11
+ Sun, 8 May 2005 19:09:12 +0000 (GMT)
12
+ Received: from xxxxxxx.xxxxxxxxx.com (xxxxxxx.xxxxxxxxx.com [69.36.39.150])
13
+ by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 10D8BA960
14
+ for <xxxxx@xxxxxxxxx.org>; Sun, 8 May 2005 19:09:12 +0000 (GMT)
15
+ Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199])
16
+ by xxxxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 9EBC4148EAB
17
+ for <xxxxx@xxxxxxxxx.com>; Sun, 8 May 2005 14:09:11 -0500 (CDT)
18
+ Received: by zproxy.gmail.com with SMTP id 13so1233405nzp
19
+ for <xxxxx@xxxxxxxxx.com>; Sun, 08 May 2005 12:09:11 -0700 (PDT)
20
+ DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
21
+ s=beta; d=gmail.com;
22
+ h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references;
23
+ b=cid1mzGEFa3gtRa06oSrrEYfKca2CTKu9sLMkWxjbvCsWMtp9RGEILjUz0L5RySdH5iO661LyNUoHRFQIa57bylAbXM3g2DTEIIKmuASDG3x3rIQ4sHAKpNxP7Pul+mgTaOKBv+spcH7af++QEJ36gHFXD2O/kx9RePs3JNf/K8=
24
+ Received: by 10.36.10.16 with SMTP id 16mr1012493nzj;
25
+ Sun, 08 May 2005 12:09:11 -0700 (PDT)
26
+ Received: by 10.36.5.10 with HTTP; Sun, 8 May 2005 12:09:11 -0700 (PDT)
27
+ Message-ID: <e85734b90505081209eaaa17b@mail.gmail.com>
28
+ Date: Sun, 8 May 2005 14:09:11 -0500
29
+ From: xxxxxxxxx xxxxxxx <xxxxxxxxx.xxxxxxx@gmail.com>
30
+ Reply-To: xxxxxxxxx xxxxxxx <xxxxxxxxx.xxxxxxx@gmail.com>
31
+ To: xxxxx xxxx <xxxxx@xxxxxxxxx.com>
32
+ Subject: Fwd: Signed email causes file attachments
33
+ In-Reply-To: <F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@mac.com>
34
+ Mime-Version: 1.0
35
+ Content-Type: multipart/mixed;
36
+ boundary="----=_Part_5028_7368284.1115579351471"
37
+ References: <F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@mac.com>
38
+
39
+ ------=_Part_5028_7368284.1115579351471
40
+ Content-Type: text/plain; charset=ISO-8859-1
41
+ Content-Transfer-Encoding: quoted-printable
42
+ Content-Disposition: inline
43
+
44
+ We should not include these files or vcards as attachments.
45
+
46
+ ---------- Forwarded message ----------
47
+ From: xxxxx xxxxxx <xxxxxxxx@xxx.com>
48
+ Date: May 8, 2005 1:17 PM
49
+ Subject: Signed email causes file attachments
50
+ To: xxxxxxx@xxxxxxxxxx.com
51
+
52
+
53
+ Hi,
54
+
55
+ Just started to use my xxxxxxxx account (to set-up a GTD system,
56
+ natch) and noticed that when I send content via email the signature/
57
+ certificate from my email account gets added as a file (e.g.
58
+ "smime.p7s").
59
+
60
+ Obviously I can uncheck the signature option in the Mail compose
61
+ window but how often will I remember to do that?
62
+
63
+ Is there any way these kind of files could be ignored, e.g. via some
64
+ sort of exclusions list?
65
+
66
+ ------=_Part_5028_7368284.1115579351471
67
+ Content-Type: application/pkcs7-signature; name=smime.p7s
68
+ Content-Transfer-Encoding: base64
69
+ Content-Disposition: attachment; filename="smime.p7s"
70
+
71
+ MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGFDCCAs0w
72
+ ggI2oAMCAQICAw5c+TANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
73
+ d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
74
+ YWlsIElzc3VpbmcgQ0EwHhcNMDUwMzI5MDkzOTEwWhcNMDYwMzI5MDkzOTEwWjBCMR8wHQYDVQQD
75
+ ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBzbWhhdW5jaEBtYWMuY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