mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge commit 'mikel/master'
This commit is contained in:
@@ -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 @@ module Mail
|
||||
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 @@ class TmailCompatTest < Test::Unit::TestCase
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user