aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorLeonel Galán <leonel@getstealz.com>2017-04-03 22:59:43 -0400
committerGitHub <noreply@github.com>2017-04-03 22:59:43 -0400
commit8648f289f01656b2258687126108c389127108e0 (patch)
tree1ccb15f72f00d8c30497ad4e48f203545dd3383b /actionmailer
parent28b3582aa2cd6007c708134b911b3f360ad5d659 (diff)
parente8c33349bfabca28996ac74d344d69c7aaffec50 (diff)
downloadrails-8648f289f01656b2258687126108c389127108e0.tar.gz
rails-8648f289f01656b2258687126108c389127108e0.tar.bz2
rails-8648f289f01656b2258687126108c389127108e0.zip
Merge branch 'master' into bug/filtered_parameters_class
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/CHANGELOG.md32
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
-rw-r--r--actionmailer/lib/action_mailer/gem_version.rb2
-rw-r--r--actionmailer/test/message_delivery_test.rb6
4 files changed, 9 insertions, 36 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md
index 6ec10c7a70..e488d867de 100644
--- a/actionmailer/CHANGELOG.md
+++ b/actionmailer/CHANGELOG.md
@@ -1,31 +1 @@
-* Add `:args` to `process.action_mailer` event.
-
- *Yuji Yaginuma*
-
-* Add parameterized invocation of mailers as a way to share before filters and defaults between actions.
- See ActionMailer::Parameterized for a full example of the benefit.
-
- *DHH*
-
-* Allow lambdas to be used as lazy defaults in addition to procs.
-
- *DHH*
-
-* Mime type: allow to custom content type when setting body in headers
- and attachments.
-
- Example:
-
- def test_emails
- attachments["invoice.pdf"] = "This is test File content"
- mail(body: "Hello there", content_type: "text/html")
- end
-
- *Minh Quy*
-
-* Exception handling: use `rescue_from` to handle exceptions raised by
- mailer actions, by message delivery, and by deferred delivery jobs.
-
- *Jeremy Daer*
-
-Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionmailer/CHANGELOG.md) for previous changes.
+Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actionmailer/CHANGELOG.md) for previous changes.
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 444be944df..6849f5c0f9 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -133,6 +133,9 @@ module ActionMailer
#
# config.action_mailer.default_url_options = { host: "example.com" }
#
+ # You can also define a <tt>default_url_options</tt> method on individual mailers to override these
+ # default settings per-mailer.
+ #
# By default when <tt>config.force_ssl</tt> is true, URLs generated for hosts will use the HTTPS protocol.
#
# = Sending mail
@@ -972,7 +975,7 @@ module ActionMailer
end
def instrument_name
- "action_mailer"
+ "action_mailer".freeze
end
ActiveSupport.run_load_hooks(:action_mailer, self)
diff --git a/actionmailer/lib/action_mailer/gem_version.rb b/actionmailer/lib/action_mailer/gem_version.rb
index 7dafceef2b..f5594ef928 100644
--- a/actionmailer/lib/action_mailer/gem_version.rb
+++ b/actionmailer/lib/action_mailer/gem_version.rb
@@ -6,7 +6,7 @@ module ActionMailer
module VERSION
MAJOR = 5
- MINOR = 1
+ MINOR = 2
TINY = 0
PRE = "alpha"
diff --git a/actionmailer/test/message_delivery_test.rb b/actionmailer/test/message_delivery_test.rb
index a79d77e1e5..c0683be94d 100644
--- a/actionmailer/test/message_delivery_test.rb
+++ b/actionmailer/test/message_delivery_test.rb
@@ -76,14 +76,14 @@ class MessageDeliveryTest < ActiveSupport::TestCase
test "should enqueue a delivery with a delay" do
travel_to Time.new(2004, 11, 24, 01, 04, 44) do
- assert_performed_with(job: ActionMailer::DeliveryJob, at: Time.current.to_f + 600.seconds, args: ["DelayedMailer", "test_message", "deliver_now", 1, 2, 3]) do
- @mail.deliver_later wait: 600.seconds
+ assert_performed_with(job: ActionMailer::DeliveryJob, at: Time.current + 10.minutes, args: ["DelayedMailer", "test_message", "deliver_now", 1, 2, 3]) do
+ @mail.deliver_later wait: 10.minutes
end
end
end
test "should enqueue a delivery at a specific time" do
- later_time = Time.now.to_f + 3600
+ later_time = Time.current + 1.hour
assert_performed_with(job: ActionMailer::DeliveryJob, at: later_time, args: ["DelayedMailer", "test_message", "deliver_now", 1, 2, 3]) do
@mail.deliver_later wait_until: later_time
end