actionmailer 4.2.0.beta3 → 4.2.0.beta4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8456e86cb336eb60e851b99265b03b1cb5c8723
4
- data.tar.gz: 5bffa7a4df3bf621b5c6c41c4559b894ae2f2a76
3
+ metadata.gz: bcb1c9b3e5d724b79972d86938bb122153250793
4
+ data.tar.gz: ddb546981d14586d13807d3ca1981b79762ce4a4
5
5
  SHA512:
6
- metadata.gz: f65c4887fe5c6dd0277131356aec82a7e1f59291d5ab2ff1b115cb26ae68dff26bd0944d6cb3a83252e921682c638a98cf4f0027be00745bda6b110342fc486b
7
- data.tar.gz: e3b969ed46646611812b2a7bfdba77f505c032cec2ecf717085fea346eaa234843e854f9bad24cdc421d2054d554af041987dfb5cb3318dd643ef19f4c2b0c50
6
+ metadata.gz: a09fc1e03f6b257904225ae25bfd2a02f99326e5deb03a90fd858a797fd5ba015b4d32e916f383ccd9cf41f335d4539e2084e39c05d914f9fc881fde4c87e643
7
+ data.tar.gz: b487d6808a402484d7d4f836a53503f5149bdcd1c94334ca98ecf6fbdb7716079aa13745c0a556c88fbcfd2af074681798e96de700586d23c6db70cbccc1413a
@@ -10,7 +10,7 @@
10
10
  using the new Active Job framework in Rails, and will use whatever queue is
11
11
  configured for Rails.
12
12
 
13
- *DHH/Abdelkader Boudih/Cristian Bica*
13
+ *DHH*, *Abdelkader Boudih*, *Cristian Bica*
14
14
 
15
15
  * Make `ActionMailer::Previews` methods class methods. Previously they were
16
16
  instance methods and `ActionMailer` tries to render a message when they
@@ -39,11 +39,8 @@ module ActionMailer
39
39
  # in the same manner as <tt>attachments[]=</tt>
40
40
  #
41
41
  # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
42
- # as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields like <tt>To:</tt>
43
- # <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
44
- # can appear multiple times. If you want to change a field that can appear multiple times,
45
- # you need to set it to nil first so that Mail knows you are replacing it and not adding
46
- # another field of the same name.
42
+ # as <tt>headers['X-No-Spam'] = 'True'</tt>. Note that declaring a header multiple times
43
+ # will add many fields of the same name. Read #headers doc for more information.
47
44
  #
48
45
  # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
49
46
  # as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'})</tt>
@@ -87,7 +84,8 @@ module ActionMailer
87
84
  # name as the method in your mailer model. For example, in the mailer defined above, the template at
88
85
  # <tt>app/views/notifier/welcome.text.erb</tt> would be used to generate the email.
89
86
  #
90
- # Variables defined in the model are accessible as instance variables in the view.
87
+ # Variables defined in the methods of your mailer model are accessible as instance variables in their
88
+ # corresponding view.
91
89
  #
92
90
  # Emails by default are sent in plain text, so a sample view for our model example might look like this:
93
91
  #
@@ -625,6 +623,26 @@ module ActionMailer
625
623
  # The resulting <tt>Mail::Message</tt> will have the following in its header:
626
624
  #
627
625
  # X-Special-Domain-Specific-Header: SecretValue
626
+ #
627
+ # Note about replacing already defined headers:
628
+ #
629
+ # * +subject+
630
+ # * +sender+
631
+ # * +from+
632
+ # * +to+
633
+ # * +cc+
634
+ # * +bcc+
635
+ # * +reply-to+
636
+ # * +orig-date+
637
+ # * +message-id+
638
+ # * +references+
639
+ #
640
+ # Fields can only appear once in email headers while other fields such as
641
+ # <tt>X-Anything</tt> can appear multiple times.
642
+ #
643
+ # If you want to replace any header which already exists, first set it to
644
+ # +nil+ in order to reset the value otherwise another field will be added
645
+ # for the same header.
628
646
  def headers(args = nil)
629
647
  if args
630
648
  @_message.headers(args)
@@ -685,8 +703,8 @@ module ActionMailer
685
703
  # The main method that creates the message and renders the email templates. There are
686
704
  # two ways to call this method, with a block, or without a block.
687
705
  #
688
- # Both methods accept a headers hash. This hash allows you to specify the most used headers
689
- # in an email message, these are:
706
+ # It accepts a headers hash. This hash allows you to specify
707
+ # the most used headers in an email message, these are:
690
708
  #
691
709
  # * +:subject+ - The subject of the message, if this is omitted, Action Mailer will
692
710
  # ask the Rails I18n class for a translated +:subject+ in the scope of
@@ -1,6 +1,8 @@
1
1
  require 'active_job'
2
2
 
3
3
  module ActionMailer
4
+ # The <tt>ActionMailer::DeliveryJob</tt> class is used when you
5
+ # want to send emails outside of the request-response cycle.
4
6
  class DeliveryJob < ActiveJob::Base #:nodoc:
5
7
  queue_as :mailers
6
8
 
@@ -8,7 +8,7 @@ module ActionMailer
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 0
11
- PRE = "beta3"
11
+ PRE = "beta4"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -1,4 +1,5 @@
1
1
  require 'delegate'
2
+ require 'active_support/core_ext/string/filters'
2
3
 
3
4
  module ActionMailer
4
5
 
@@ -46,6 +47,7 @@ module ActionMailer
46
47
  #
47
48
  # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
48
49
  # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
50
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue
49
51
  def deliver_later!(options={})
50
52
  enqueue_delivery :deliver_now!, options
51
53
  end
@@ -61,6 +63,7 @@ module ActionMailer
61
63
  #
62
64
  # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
63
65
  # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
66
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue
64
67
  def deliver_later(options={})
65
68
  enqueue_delivery :deliver_now, options
66
69
  end
@@ -83,14 +86,22 @@ module ActionMailer
83
86
  end
84
87
 
85
88
  def deliver! #:nodoc:
86
- ActiveSupport::Deprecation.warn "#deliver! is deprecated and will be removed in Rails 5. " \
87
- "Use #deliver_now! to deliver immediately or #deliver_later! to deliver through Active Job."
89
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
90
+ `#deliver!` is deprecated and will be removed in Rails 5. Use
91
+ `#deliver_now!` to deliver immediately or `#deliver_later!` to
92
+ deliver through Active Job.
93
+ MSG
94
+
88
95
  deliver_now!
89
96
  end
90
97
 
91
98
  def deliver #:nodoc:
92
- ActiveSupport::Deprecation.warn "#deliver is deprecated and will be removed in Rails 5. " \
93
- "Use #deliver_now to deliver immediately or #deliver_later to deliver through Active Job."
99
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
100
+ `#deliver` is deprecated and will be removed in Rails 5. Use
101
+ `#deliver_now` to deliver immediately or `#deliver_later` to
102
+ deliver through Active Job.
103
+ MSG
104
+
94
105
  deliver_now
95
106
  end
96
107
 
@@ -17,6 +17,7 @@ module ActionMailer
17
17
  include ActiveSupport::Testing::ConstantLookup
18
18
  include TestHelper
19
19
  include Rails::Dom::Testing::Assertions::SelectorAssertions
20
+ include Rails::Dom::Testing::Assertions::DomAssertions
20
21
 
21
22
  included do
22
23
  class_attribute :_mailer_class
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.2.0.beta3
4
+ version: 4.2.0.beta4
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-10-29 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,82 +16,82 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0.beta3
19
+ version: 4.2.0.beta4
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.2.0.beta3
26
+ version: 4.2.0.beta4
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.2.0.beta3
33
+ version: 4.2.0.beta4
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.2.0.beta3
40
+ version: 4.2.0.beta4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activejob
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.0.beta3
47
+ version: 4.2.0.beta4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.0.beta3
54
+ version: 4.2.0.beta4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mail
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.5'
62
- - - ">="
62
+ - - '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: 2.5.4
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - "~>"
69
+ - - ~>
70
70
  - !ruby/object:Gem::Version
71
71
  version: '2.5'
72
- - - ">="
72
+ - - '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.5.4
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rails-dom-testing
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ~>
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.0'
82
- - - ">="
82
+ - - '>='
83
83
  - !ruby/object:Gem::Version
84
- version: 1.0.3
84
+ version: 1.0.4
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
89
+ - - ~>
90
90
  - !ruby/object:Gem::Version
91
91
  version: '1.0'
92
- - - ">="
92
+ - - '>='
93
93
  - !ruby/object:Gem::Version
94
- version: 1.0.3
94
+ version: 1.0.4
95
95
  description: Email on Rails. Compose, deliver, receive, and test emails using the
96
96
  familiar controller/view pattern. First-class support for multipart email and attachments.
97
97
  email: david@loudthinking.com
@@ -129,18 +129,18 @@ require_paths:
129
129
  - lib
130
130
  required_ruby_version: !ruby/object:Gem::Requirement
131
131
  requirements:
132
- - - ">="
132
+ - - '>='
133
133
  - !ruby/object:Gem::Version
134
134
  version: 1.9.3
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ">"
137
+ - - '>'
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.3.1
140
140
  requirements:
141
141
  - none
142
142
  rubyforge_project:
143
- rubygems_version: 2.2.2
143
+ rubygems_version: 2.2.1
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Email composition, delivery, and receiving framework (part of Rails).