diff options
Diffstat (limited to 'actionmailer')
-rwxr-xr-x[-rw-r--r--] | actionmailer/Rakefile | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 10 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/test_case.rb | 7 |
4 files changed, 14 insertions, 9 deletions
diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index cba6e93c8a..123ef9bbbf 100644..100755 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -1,4 +1,4 @@ -require 'rake' +#!/usr/bin/env rake require 'rake/testtask' require 'rake/packagetask' require 'rake/gempackagetask' diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 0bf60a2c24..840708cdc6 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -234,8 +234,8 @@ module ActionMailer #:nodoc: # default :sender => 'system@example.com' # end # - # You can pass in any header value that a <tt>Mail::Message</tt>, out of the box, <tt>ActionMailer::Base</tt> - # sets the following: + # You can pass in any header value that a <tt>Mail::Message</tt> accepts. Out of the box, + # <tt>ActionMailer::Base</tt> sets the following: # # * <tt>:mime_version => "1.0"</tt> # * <tt>:charset => "UTF-8",</tt> @@ -273,7 +273,7 @@ module ActionMailer #:nodoc: # = Configuration options # # These options are specified on the class level, like - # <tt>ActionMailer::Base.template_root = "/my/templates"</tt> + # <tt>ActionMailer::Base.raise_delivery_errors = true</tt> # # * <tt>default</tt> - You can pass this in at a class level as well as within the class itself as # per the above section. @@ -290,7 +290,9 @@ module ActionMailer #:nodoc: # * <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>. + # This is a symbol and one of <tt>:plain</tt> (will send the password in the clear), <tt>:login</tt> (will + # send password BASE64 encoded) or <tt>:cram_md5</tt> (combines a Challenge/Response mechanism to exchange + # information and a cryptographic Message Digest 5 algorithm to hash important information) # * <tt>:enable_starttls_auto</tt> - When set to true, detects if STARTTLS is enabled in your SMTP server # and starts to use it. # diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index d67a5b6521..4ec478067f 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -19,8 +19,8 @@ module ActionMailer options.stylesheets_dir ||= paths["public/stylesheets"].first # make sure readers methods get compiled - options.asset_path ||= nil - options.asset_host ||= nil + options.asset_path ||= app.config.asset_path + options.asset_host ||= app.config.asset_host ActiveSupport.on_load(:action_mailer) do include AbstractController::UrlFor diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index f4d1bb59f1..63e18147f6 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/class/attribute' + module ActionMailer class NonInferrableMailerError < ::StandardError def initialize(name) @@ -15,11 +17,11 @@ module ActionMailer module ClassMethods def tests(mailer) - write_inheritable_attribute(:mailer_class, mailer) + self._mailer_class = mailer end def mailer_class - if mailer = read_inheritable_attribute(:mailer_class) + if mailer = self._mailer_class mailer else tests determine_default_mailer(name) @@ -65,6 +67,7 @@ module ActionMailer end included do + class_attribute :_mailer_class setup :initialize_test_deliveries setup :set_expected_mail end |