adzap-ar_mailer 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/action_mailer/ar_mailer.rb +3 -1
- data/lib/action_mailer/ar_sendmail.rb +1 -1
- data/test/test_armailer.rb +2 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -23,8 +23,10 @@ class ActionMailer::Base
|
|
23
23
|
# used.
|
24
24
|
|
25
25
|
def perform_delivery_activerecord(mail)
|
26
|
+
destinations = mail.destinations
|
27
|
+
mail.ready_to_send
|
26
28
|
sender = (mail['return-path'] && mail['return-path'].spec) || mail.from.first
|
27
|
-
|
29
|
+
destinations.each do |destination|
|
28
30
|
self.class.email_class.create :mail => mail.encoded, :to => destination, :from => sender
|
29
31
|
end
|
30
32
|
end
|
data/test/test_armailer.rb
CHANGED
@@ -9,6 +9,7 @@ class Mailer < ActionMailer::Base
|
|
9
9
|
def @mail.from() ['nobody@example.com'] end
|
10
10
|
def @mail.[](key) {'return-path' => $return_path, 'from' => 'nobody@example.com'}[key] end
|
11
11
|
def @mail.destinations() %w[user1@example.com user2@example.com] end
|
12
|
+
def @mail.ready_to_send() end
|
12
13
|
end
|
13
14
|
|
14
15
|
end
|
@@ -30,7 +31,7 @@ class TestARMailer < Test::Unit::TestCase
|
|
30
31
|
|
31
32
|
assert_equal 2, Newsletter.records.length
|
32
33
|
end
|
33
|
-
|
34
|
+
|
34
35
|
def test_perform_delivery_activerecord_when_return_path_is_present
|
35
36
|
$return_path = stub(:spec => 'return-path@example.com')
|
36
37
|
Mailer.deliver_mail
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adzap-ar_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-
|
13
|
+
date: 2010-03-17 00:00:00 +11:00
|
14
14
|
default_executable: ar_sendmail
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|