From 5c684f518feeaf38961f976b966e57abf386e248 Mon Sep 17 00:00:00 2001 From: Marcus Mateus Date: Tue, 24 Feb 2009 10:47:50 -0600 Subject: Just require tmail instead of autoloading it to fix issues when using the gem version [#1851 state:resolved] Signed-off-by: Joshua Peek --- actionmailer/lib/action_mailer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 45fcab599c..02c536c8ad 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -58,4 +58,5 @@ module Net end autoload :MailHelper, 'action_mailer/mail_helper' -autoload :TMail, 'action_mailer/vendor/tmail' + +require 'action_mailer/vendor/tmail' -- cgit v1.2.3 From 77b0994c7835610982d708ce7ce5cd95e6e99e5a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 27 Feb 2009 14:46:23 +0100 Subject: Prep for RC2 later today --- actionmailer/CHANGELOG | 2 +- actionmailer/Rakefile | 2 +- actionmailer/lib/action_mailer/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 457e9aca94..0749ff4dab 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,4 +1,4 @@ -*Edge* +*2.3.1 [RC2] (February 27th, 2009)* * Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones] diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index c3826e3a27..7c27ef450f 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -55,7 +55,7 @@ spec = Gem::Specification.new do |s| s.rubyforge_project = "actionmailer" s.homepage = "http://www.rubyonrails.org" - s.add_dependency('actionpack', '= 2.3.0' + PKG_BUILD) + s.add_dependency('actionpack', '= 2.3.1' + PKG_BUILD) s.has_rdoc = true s.requirements << 'none' diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb index 9cd7a14b73..ac843ae6ac 100644 --- a/actionmailer/lib/action_mailer/version.rb +++ b/actionmailer/lib/action_mailer/version.rb @@ -2,7 +2,7 @@ module ActionMailer module VERSION #:nodoc: MAJOR = 2 MINOR = 3 - TINY = 0 + TINY = 1 STRING = [MAJOR, MINOR, TINY].join('.') end -- cgit v1.2.3 From 7058c1366ee33f3095b8737c2b71876702cddea6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 28 Feb 2009 10:30:49 +0100 Subject: So it didnt happen yesterday, but very soon! Just need the final details ironed out --- actionmailer/CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 0749ff4dab..7c6cba29f0 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,4 +1,4 @@ -*2.3.1 [RC2] (February 27th, 2009)* +*2.3.1 [RC2] (February ?, 2009)* * Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones] -- cgit v1.2.3 From c41ed929bbbe649c730a90e1f3bf8a1f88dc1f81 Mon Sep 17 00:00:00 2001 From: Elliott Wood Date: Sun, 1 Mar 2009 13:08:16 -0700 Subject: Removed the "charset" parameter from the Content-Type header of multipart sections of nested multipart messages. Signed-off-by: Michael Koziarski [#2109 state:committed] --- actionmailer/lib/action_mailer/part.rb | 5 ++++- actionmailer/test/mail_service_test.rb | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/part.rb b/actionmailer/lib/action_mailer/part.rb index 977c0b2b5c..2bbb59cdb6 100644 --- a/actionmailer/lib/action_mailer/part.rb +++ b/actionmailer/lib/action_mailer/part.rb @@ -88,7 +88,10 @@ module ActionMailer part.parts << prt end - part.set_content_type(real_content_type, nil, ctype_attrs) if real_content_type =~ /multipart/ + 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 } diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 1e04531753..26ba652f2a 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -330,6 +330,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal "multipart/mixed", created.content_type assert_equal "multipart/alternative", created.parts.first.content_type assert_equal "bar", created.parts.first.header['foo'].to_s + assert_nil created.parts.first.charset assert_equal "text/plain", created.parts.first.parts.first.content_type assert_equal "text/html", created.parts.first.parts[1].content_type assert_equal "application/octet-stream", created.parts[1].content_type -- cgit v1.2.3 From dfef3d8b14b5d3dcb61d83c30d5d5b27d33ff530 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 5 Mar 2009 11:00:04 +0100 Subject: Release RC2 today --- actionmailer/CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 7c6cba29f0..2a5e3b81d8 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,4 +1,4 @@ -*2.3.1 [RC2] (February ?, 2009)* +*2.3.1 [RC2] (March 5, 2009)* * Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones] -- cgit v1.2.3 From 1c36172c13fc51b22167f5e8fc41b1da9f8fcb2a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 8 Mar 2009 13:11:58 -0700 Subject: Ruby 1.9 compat: rename deprecated assert_raises to assert_raise. [#1617 state:resolved] --- .../lib/action_mailer/vendor/text-format-0.6.3/text/format.rb | 2 +- actionmailer/test/mail_service_test.rb | 2 +- actionmailer/test/test_helper_test.rb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb b/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb index de054db83e..2d20c7a6a1 100755 --- a/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +++ b/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb @@ -1150,7 +1150,7 @@ if __FILE__ == $0 assert_equal(Text::Format::JUSTIFY, @format_o.format_style) assert_match(/^of freedom, and that government of the people, by the people, for the$/, @format_o.format(GETTYSBURG).split("\n")[-3]) - assert_raises(ArgumentError) { @format_o.format_style = 33 } + assert_raise(ArgumentError) { @format_o.format_style = 33 } end def test_tag_paragraph diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 26ba652f2a..277a91395d 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -1069,7 +1069,7 @@ class RespondToTest < Test::Unit::TestCase end def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method - error = assert_raises NoMethodError do + error = assert_raise NoMethodError do RespondToMailer.not_a_method end diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 9d22bb26bd..65b07a71b8 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -26,7 +26,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_determine_default_mailer_raises_correct_error - assert_raises(ActionMailer::NonInferrableMailerError) do + assert_raise(ActionMailer::NonInferrableMailerError) do self.class.determine_default_mailer("NotAMailerTest") end end @@ -84,7 +84,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_emails_too_few_sent - error = assert_raises ActiveSupport::TestCase::Assertion do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 2 do TestHelperMailer.deliver_test end @@ -94,7 +94,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_emails_too_many_sent - error = assert_raises ActiveSupport::TestCase::Assertion do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 1 do TestHelperMailer.deliver_test TestHelperMailer.deliver_test @@ -105,7 +105,7 @@ class TestHelperMailerTest < ActionMailer::TestCase end def test_assert_no_emails_failure - error = assert_raises ActiveSupport::TestCase::Assertion do + error = assert_raise ActiveSupport::TestCase::Assertion do assert_no_emails do TestHelperMailer.deliver_test end -- cgit v1.2.3 From 1dff106888d671dac07f93711ecb319170132c56 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 10 Mar 2009 16:23:52 +0000 Subject: Allow custom type for multipart emails [#1691 state:resolved] Signed-off-by: Pratik Naik --- actionmailer/lib/action_mailer/base.rb | 2 +- actionmailer/test/mail_layout_test.rb | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index db4589ee8f..b77409b64b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -479,7 +479,7 @@ module ActionMailer #:nodoc: ) end unless @parts.empty? - @content_type = "multipart/alternative" + @content_type = "multipart/alternative" if @content_type !~ /^multipart/ @parts = sort_parts(@parts, @implicit_parts_order) end end diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb index c185bd5acd..50901f52ec 100644 --- a/actionmailer/test/mail_layout_test.rb +++ b/actionmailer/test/mail_layout_test.rb @@ -21,10 +21,12 @@ class AutoLayoutMailer < ActionMailer::Base body render(:inline => "Hello, <%= @world %>", :layout => false, :body => { :world => "Earth" }) end - def multipart(recipient) + def multipart(recipient, type = nil) recipients recipient subject "You have a mail" from "tester@example.com" + + content_type(type) if type end end @@ -64,6 +66,19 @@ class LayoutMailerTest < Test::Unit::TestCase def test_should_pickup_multipart_layout mail = AutoLayoutMailer.create_multipart(@recipient) + assert_equal "multipart/alternative", mail.content_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.content_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + + assert_equal 'text/html', mail.parts.last.content_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body + end + + def test_should_pickup_multipartmixed_layout + mail = AutoLayoutMailer.create_multipart(@recipient, "multipart/mixed") + assert_equal "multipart/mixed", mail.content_type assert_equal 2, mail.parts.size assert_equal 'text/plain', mail.parts.first.content_type @@ -73,6 +88,19 @@ class LayoutMailerTest < Test::Unit::TestCase assert_equal "Hello from layout text/html multipart", mail.parts.last.body end + def test_should_fix_multipart_layout + mail = AutoLayoutMailer.create_multipart(@recipient, "text/plain") + assert_equal "multipart/alternative", mail.content_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.content_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + + assert_equal 'text/html', mail.parts.last.content_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body + end + + def test_should_pickup_layout_given_to_render mail = AutoLayoutMailer.create_spam(@recipient) assert_equal "Spammer layout Hello, Earth", mail.body.strip -- cgit v1.2.3 From 73fc42cc0b5e94541480032c2941a50edd4080c2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 15 Mar 2009 22:06:50 -0500 Subject: Prepare for final 2.3 release --- actionmailer/CHANGELOG | 5 +---- actionmailer/Rakefile | 2 +- actionmailer/lib/action_mailer/version.rb | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 2a5e3b81d8..773e603d73 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,10 +1,7 @@ -*2.3.1 [RC2] (March 5, 2009)* +*2.3.2 [Final] (March 15, 2009)* * Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones] - -*2.3.0 [RC1] (February 1st, 2009)* - * Fixed RFC-2045 quoted-printable bug #1421 [squadette] * Fixed that no body charset would be set when there are attachments present #740 [Paweł Kondzior] diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 7c27ef450f..f06f18ff76 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -55,7 +55,7 @@ spec = Gem::Specification.new do |s| s.rubyforge_project = "actionmailer" s.homepage = "http://www.rubyonrails.org" - s.add_dependency('actionpack', '= 2.3.1' + PKG_BUILD) + s.add_dependency('actionpack', '= 2.3.2' + PKG_BUILD) s.has_rdoc = true s.requirements << 'none' diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb index ac843ae6ac..08ff0d2ffb 100644 --- a/actionmailer/lib/action_mailer/version.rb +++ b/actionmailer/lib/action_mailer/version.rb @@ -2,7 +2,7 @@ module ActionMailer module VERSION #:nodoc: MAJOR = 2 MINOR = 3 - TINY = 1 + TINY = 2 STRING = [MAJOR, MINOR, TINY].join('.') end -- cgit v1.2.3