Permalink
Browse files

Merge commit 'mikel/master'

  • Loading branch information...
2 parents 58ad656 + 94838fb commit 6ce562c9fff4084e185c3c57cc609d3bf5ac0cfc @jeremy jeremy committed Jan 1, 2010
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.homepage = "http://www.rubyonrails.org"
s.add_dependency('actionpack', '= 3.0.pre')
- s.add_dependency('mail', '~> 1.4.2')
+ s.add_dependency('mail', '~> 1.4.3')
s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*']
s.has_rdoc = true
@@ -45,5 +45,3 @@ module Text
autoload :Format, 'action_mailer/vendor/text_format'
end
-
-require 'action_mailer/tmail_compat'
@@ -1,5 +1,6 @@
require 'active_support/core_ext/class'
require 'mail'
+require 'action_mailer/tmail_compat'
module ActionMailer #:nodoc:
# Action Mailer allows you to send email from your application using a mailer model and views.
@@ -149,7 +150,7 @@ module ActionMailer #:nodoc:
#
# part "text/plain" do |p|
# p.body = render_message("signup-as-plain", :account => recipient)
- # p.transfer_encoding = "base64"
+ # p.content_transfer_encoding = "base64"
# end
# end
# end
@@ -1,5 +1,5 @@
require 'active_support/test_case'
-require 'mail'
+require 'action_mailer/base'
module ActionMailer
class NonInferrableMailerError < ::StandardError
@@ -6,5 +6,15 @@ def set_content_type(*args)
content_type(*args)
end
+ alias :old_transfer_encoding :transfer_encoding
+ def transfer_encoding(value = nil)
+ if value
+ STDERR.puts("Message#transfer_encoding is deprecated, please call Message#content_transfer_encoding with the same arguments.\n#{caller}")
+ content_transfer_encoding(value)
+ else
+ old_transfer_encoding
+ end
+ end
+
end
end
@@ -10,5 +10,14 @@ def test_set_content_type_raises_deprecation_warning
end
assert_equal mail.content_type.string, "text/plain"
end
+
+ def test_transfer_encoding_raises_deprecation_warning
+ mail = Mail.new
+ STDERR.expects(:puts) # Deprecation warning
+ assert_nothing_raised do
+ mail.transfer_encoding "base64"
+ end
+ assert_equal mail.content_transfer_encoding.value, "base64"
+ end
end

0 comments on commit 6ce562c

Please sign in to comment.