actionmailer 4.1.5 → 4.1.6.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionmailer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/lib/action_mailer/base.rb +17 -2
- data/lib/action_mailer/gem_version.rb +2 -2
- data/lib/action_mailer/preview.rb +2 -0
- data/lib/action_mailer/railtie.rb +1 -0
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8085e6053a70191ca1357e214508c6ddef97fea7
|
4
|
+
data.tar.gz: 62cd59b6c064d2ad2d3d245cdc56f27b8cf303dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf7543476acd0aa5d08027e821709b04d221a763b011bfb80821078f79f6cb10047ef8b305df868e7f1b00035c302fd3902649c5754e9b783d7e0cffc41ffcd0
|
7
|
+
data.tar.gz: 47d59442f5223d7eb35b3a8b2ba47f23515e6643df9ad5ca418f0383826679ff6ceb122ca0756a2aaf9d88979f69230b1f44477d83d73a5722cd2b711fdf36e4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## Rails 4.1.6 (August 19, 2014) ##
|
2
|
+
|
3
|
+
* Make ActionMailer::Previews methods class methods. Previously they were
|
4
|
+
instance methods and ActionMailer tries to render a message when they
|
5
|
+
are called.
|
6
|
+
|
7
|
+
*Cristian Bica*
|
8
|
+
|
9
|
+
* Raise an exception when attachments are added after `mail` was called.
|
10
|
+
This is a safeguard to prevent invalid emails.
|
11
|
+
|
12
|
+
Fixes #16163.
|
13
|
+
|
14
|
+
*Yves Senn*
|
15
|
+
|
16
|
+
* Allow preview interceptors to be registered through
|
17
|
+
`config.action_mailer.preview_interceptors`.
|
18
|
+
|
19
|
+
See #15739.
|
20
|
+
|
21
|
+
*Yves Senn*
|
22
|
+
|
23
|
+
|
1
24
|
## Rails 4.1.5 (August 18, 2014) ##
|
2
25
|
|
3
26
|
* No changes.
|
data/lib/action_mailer/base.rb
CHANGED
@@ -339,7 +339,7 @@ module ActionMailer
|
|
339
339
|
# end
|
340
340
|
# end
|
341
341
|
#
|
342
|
-
# config.action_mailer.
|
342
|
+
# config.action_mailer.preview_interceptors :css_inline_styler
|
343
343
|
#
|
344
344
|
# Note that interceptors need to be registered both with <tt>register_interceptor</tt>
|
345
345
|
# and <tt>register_preview_interceptor</tt> if they should operate on both sending and
|
@@ -648,7 +648,22 @@ module ActionMailer
|
|
648
648
|
# mail.attachments[0] # => Mail::Part (first attachment)
|
649
649
|
#
|
650
650
|
def attachments
|
651
|
-
@
|
651
|
+
if @_mail_was_called
|
652
|
+
LateAttachmentsProxy.new(@_message.attachments)
|
653
|
+
else
|
654
|
+
@_message.attachments
|
655
|
+
end
|
656
|
+
end
|
657
|
+
|
658
|
+
class LateAttachmentsProxy < SimpleDelegator
|
659
|
+
def inline; _raise_error end
|
660
|
+
def []=(_name, _content); _raise_error end
|
661
|
+
|
662
|
+
private
|
663
|
+
def _raise_error
|
664
|
+
raise RuntimeError, "Can't add attachments after `mail` was called.\n" \
|
665
|
+
"Make sure to use `attachments[]=` before calling `mail`."
|
666
|
+
end
|
652
667
|
end
|
653
668
|
|
654
669
|
# The main method that creates the message and renders the email templates. There are
|
@@ -14,7 +14,9 @@ module ActionMailer
|
|
14
14
|
# :nodoc:
|
15
15
|
mattr_accessor :preview_interceptors, instance_writer: false
|
16
16
|
self.preview_interceptors = []
|
17
|
+
end
|
17
18
|
|
19
|
+
module ClassMethods
|
18
20
|
# Register one or more Interceptors which will be called before mail is previewed.
|
19
21
|
def register_preview_interceptors(*interceptors)
|
20
22
|
interceptors.flatten.compact.each { |interceptor| register_preview_interceptor(interceptor) }
|
@@ -33,6 +33,7 @@ module ActionMailer
|
|
33
33
|
include app.routes.mounted_helpers
|
34
34
|
|
35
35
|
register_interceptors(options.delete(:interceptors))
|
36
|
+
register_preview_interceptors(options.delete(:preview_interceptors))
|
36
37
|
register_observers(options.delete(:observers))
|
37
38
|
|
38
39
|
options.each { |k,v| send("#{k}=", v) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.6.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,33 +16,36 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.
|
19
|
+
version: 4.1.6.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.
|
26
|
+
version: 4.1.6.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionview
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.
|
33
|
+
version: 4.1.6.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.
|
40
|
+
version: 4.1.6.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mail
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.5'
|
48
|
+
- - ">="
|
46
49
|
- !ruby/object:Gem::Version
|
47
50
|
version: 2.5.4
|
48
51
|
type: :runtime
|
@@ -50,6 +53,9 @@ dependencies:
|
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
55
|
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '2.5'
|
58
|
+
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: 2.5.4
|
55
61
|
description: Email on Rails. Compose, deliver, receive, and test emails using the
|
@@ -92,9 +98,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
98
|
version: 1.9.3
|
93
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
100
|
requirements:
|
95
|
-
- - "
|
101
|
+
- - ">"
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
103
|
+
version: 1.3.1
|
98
104
|
requirements:
|
99
105
|
- none
|
100
106
|
rubyforge_project:
|