actionmailer 4.2.11.3 → 5.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: d85bc14462cd772ec78e58939b2f36351f956394471545995fe1a7e7ac537f0b
4
- data.tar.gz: 215de6367abadf4df7ab7d13e3d93c21d60ecc01ddc874e7ddc63b36d15f0dd5
2
+ SHA1:
3
+ metadata.gz: 56789d48fc0a0b2b154ceb49bce402209a6bedad
4
+ data.tar.gz: fbbbdcb930198d46970bc07307ab65e8ebc4c0ba
5
5
  SHA512:
6
- metadata.gz: ca89d4732b6b6d393efa689166e4625d8a677433e5ad43f540f2366f4559e16cc32256f5385215176c1c513d5493ee0e0c53a7dabaac63de57b5a763b0f2dc61
7
- data.tar.gz: d5a57832464d0480d43a05a20a8de5d391846fb5bbc01628a24ba6059978292bb6e5c3b92b8b25b126bc8c18eabec7b1018b57b6cf3ec87538529665bd3ae0a3
6
+ metadata.gz: 1dcf35b84d00a94840c13730e7abc5b955ac16c8685f7de2ebc00bb7f5a9d093e202c216a9b717c9e91ce4fea9c56b7cc2da028cd31ad66ae216d19f8aa9cdb4
7
+ data.tar.gz: 58f33f59b8549216c0ff7a8ca623b94c9c755802c40f3f897a2190b9a14e7b08d75ae0d144b44a5ee1860d8fcfd52be1164dc0dcdca1cbdcaac6b0bc939886dc
@@ -1,78 +1,28 @@
1
- ## Rails 4.2.11.3 (May 15, 2020) ##
1
+ ## Rails 5.0.0.beta1 (December 18, 2015) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 4.2.11.2 (May 15, 2020) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 4.2.11.1 (March 11, 2019) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 4.2.11 (November 27, 2018) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 4.2.10 (September 27, 2017) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 4.2.9 (June 26, 2017) ##
27
-
28
- * No changes.
29
-
30
-
31
- ## Rails 4.2.8 (February 21, 2017) ##
32
-
33
- * No changes.
34
-
35
-
36
- ## Rails 4.2.7 (July 12, 2016) ##
37
-
38
- * Removes `-t` from default Sendmail arguments to match the underlying
39
- `Mail::Sendmail` setting.
40
-
41
- *Clayton Liggitt*
42
-
43
-
44
- ## Rails 4.2.6 (March 07, 2016) ##
45
-
46
- * No changes.
6
+ * `config.force_ssl = true` will set
7
+ `config.action_mailer.default_url_options = { protocol: 'https' }`
47
8
 
9
+ *Andrew Kampjes*
48
10
 
49
- ## Rails 4.2.5.2 (February 26, 2016) ##
50
-
51
- * No changes.
52
-
53
-
54
- ## Rails 4.2.5.1 (January 25, 2015) ##
55
-
56
- * No changes.
11
+ * Add `config.action_mailer.deliver_later_queue_name` configuration to set the
12
+ mailer queue name.
57
13
 
58
-
59
- ## Rails 4.2.5 (November 12, 2015) ##
60
-
61
- * No changes.
62
-
63
-
64
- ## Rails 4.2.4 (August 24, 2015) ##
65
-
66
- * No Changes *
67
-
68
-
69
- ## Rails 4.2.3 (June 25, 2015) ##
14
+ *Chris McGrath*
70
15
 
71
16
  * `assert_emails` in block form use the given number as expected value.
72
17
  This makes the error message much easier to understand.
73
18
 
74
19
  *Yuji Yaginuma*
75
20
 
21
+ * Add support for inline images in mailer previews by using an interceptor
22
+ class to convert cid: urls in image src attributes to data urls.
23
+
24
+ *Andrew White*
25
+
76
26
  * Mailer preview now uses `url_for` to fix links to emails for apps running on
77
27
  a subdirectory.
78
28
 
@@ -89,79 +39,59 @@
89
39
 
90
40
  *Yves Senn*
91
41
 
42
+ * Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
92
43
 
93
- ## Rails 4.2.2 (June 16, 2015) ##
94
-
95
- * No Changes *
96
-
97
-
98
- ## Rails 4.2.1 (March 19, 2015) ##
44
+ Example:
99
45
 
100
- * No Changes *
46
+ def test_emails
47
+ assert_enqueued_emails 2 do
48
+ ContactMailer.welcome.deliver_later
49
+ ContactMailer.welcome.deliver_later
50
+ end
51
+ end
101
52
 
53
+ def test_no_emails
54
+ assert_no_enqueued_emails do
55
+ # No emails enqueued here
56
+ end
57
+ end
102
58
 
103
- ## Rails 4.2.0 (December 20, 2014) ##
59
+ *George Claghorn*
104
60
 
105
- * `MailerGenerator` now generates layouts by default. The HTML mailer layout
106
- now includes `<html>` and `<body>` tags which improve the spam rating in
107
- some spam detection engines. Mailers now inherit from `ApplicationMailer`
108
- which sets the default layout.
61
+ * Add `_mailer` suffix to mailers created via generator, following the same
62
+ naming convention used in controllers and jobs.
109
63
 
110
- *Andy Jeffries*
64
+ *Carlos Souza*
111
65
 
112
- * `link_to` and `url_for` now generate URLs by default in templates.
113
- Passing `only_path: false` is no longer needed.
66
+ * Remove deprecate `*_path` helpers in email views.
114
67
 
115
- Fixes #16497 and #16589.
68
+ *Rafael Mendonça França*
116
69
 
117
- *Xavier Noria*, *Richard Schneeman*
70
+ * Remove deprecated `deliver` and `deliver!` methods.
118
71
 
119
- * Attachments can now be added while rendering the mail template.
72
+ *claudiob*
120
73
 
121
- Fixes #16974.
74
+ * Template lookup now respects default locale and I18n fallbacks.
122
75
 
123
- *Christian Felder*
76
+ Given the following templates:
124
77
 
125
- * Add `#deliver_later` and `#deliver_now` methods and deprecate `#deliver` in
126
- favor of `#deliver_now`. `#deliver_later` will enqueue a job to render and
127
- deliver the mail instead of delivering it immediately. The job is enqueued
128
- using the new Active Job framework in Rails and will use the queue that you
129
- have configured in Rails.
78
+ mailer/demo.html.erb
79
+ mailer/demo.en.html.erb
80
+ mailer/demo.pt.html.erb
130
81
 
131
- *DHH*, *Abdelkader Boudih*, *Cristian Bica*
82
+ Before this change, for a locale that doesn't have its associated file, the
83
+ `mailer/demo.html.erb` would be rendered even if `en` was the default locale.
132
84
 
133
- * `ActionMailer::Previews` are now class methods instead of instance methods.
85
+ Now `mailer/demo.en.html.erb` has precedence over the file without locale.
134
86
 
135
- *Cristian Bica*
87
+ Also, it is possible to give a fallback.
136
88
 
137
- * Deprecate `*_path` helpers in email views. They generated broken links in
138
- email views and were not the intention of most developers. The `*_url`
139
- helper is recommended instead.
89
+ mailer/demo.pt.html.erb
90
+ mailer/demo.pt-BR.html.erb
140
91
 
141
- *Richard Schneeman*
142
-
143
- * Raise an exception when attachments are added after `mail` is called.
144
- This is a safeguard to prevent invalid emails.
145
-
146
- Fixes #16163.
147
-
148
- *Yves Senn*
92
+ So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given
93
+ the right I18n fallback configuration.
149
94
 
150
- * Add `config.action_mailer.show_previews` configuration option.
151
-
152
- This configuration option can be used to enable the mail preview in
153
- environments other than development (such as staging).
154
-
155
- Defaults to `true` in development and `false` elsewhere.
156
-
157
- *Leonard Garvey*
158
-
159
- * Allow preview interceptors to be registered through
160
- `config.action_mailer.preview_interceptors`.
161
-
162
- See #15739.
163
-
164
- *Yves Senn*
95
+ *Rafael Mendonça França*
165
96
 
166
- Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionmailer/CHANGELOG.md)
167
- for previous changes.
97
+ Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2014 David Heinemeier Hansson
1
+ Copyright (c) 2004-2015 David Heinemeier Hansson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -146,11 +146,11 @@ The Base class has the full list of configuration options. Here's an example:
146
146
 
147
147
  The latest version of Action Mailer can be installed with RubyGems:
148
148
 
149
- % [sudo] gem install actionmailer
149
+ $ gem install actionmailer
150
150
 
151
151
  Source code can be downloaded as part of the Rails project on GitHub
152
152
 
153
- * https://github.com/rails/rails/tree/4-2-stable/actionmailer
153
+ * https://github.com/rails/rails/tree/master/actionmailer
154
154
 
155
155
 
156
156
  == License
@@ -173,4 +173,3 @@ Bug reports can be filed for the Ruby on Rails project here:
173
173
  Feature requests should be discussed on the rails-core mailing list here:
174
174
 
175
175
  * https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core
176
-
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2004-2014 David Heinemeier Hansson
2
+ # Copyright (c) 2004-2015 David Heinemeier Hansson
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
@@ -21,11 +21,11 @@ module ActionMailer
21
21
  # the mailer views, options on the mail itself such as the <tt>:from</tt> address, and attachments.
22
22
  #
23
23
  # class ApplicationMailer < ActionMailer::Base
24
- # default from: 'from@exmaple.com'
24
+ # default from: 'from@example.com'
25
25
  # layout 'mailer'
26
26
  # end
27
27
  #
28
- # class Notifier < ApplicationMailer
28
+ # class NotifierMailer < ApplicationMailer
29
29
  # default from: 'no-reply@example.com',
30
30
  # return_path: 'system@example.com'
31
31
  #
@@ -88,7 +88,7 @@ module ActionMailer
88
88
  #
89
89
  # To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same
90
90
  # name as the method in your mailer model. For example, in the mailer defined above, the template at
91
- # <tt>app/views/notifier/welcome.text.erb</tt> would be used to generate the email.
91
+ # <tt>app/views/notifier_mailer/welcome.text.erb</tt> would be used to generate the email.
92
92
  #
93
93
  # Variables defined in the methods of your mailer model are accessible as instance variables in their
94
94
  # corresponding view.
@@ -132,32 +132,32 @@ module ActionMailer
132
132
  #
133
133
  # config.action_mailer.default_url_options = { host: "example.com" }
134
134
  #
135
- # When you decide to set a default <tt>:host</tt> for your mailers, then you need to make sure to use the
136
- # <tt>only_path: false</tt> option when using <tt>url_for</tt>. Since the <tt>url_for</tt> view helper
137
- # will generate relative URLs by default when a <tt>:host</tt> option isn't explicitly provided, passing
138
- # <tt>only_path: false</tt> will ensure that absolute URLs are generated.
135
+ # By default when <tt>config.force_ssl</tt> is true, URLs generated for hosts will use the HTTPS protocol.
139
136
  #
140
137
  # = Sending mail
141
138
  #
142
- # Once a mailer action and template are defined, you can deliver your message or create it and save it
143
- # for delivery later:
139
+ # Once a mailer action and template are defined, you can deliver your message or defer its creation and
140
+ # delivery for later:
144
141
  #
145
- # Notifier.welcome(User.first).deliver_now # sends the email
146
- # mail = Notifier.welcome(User.first) # => an ActionMailer::MessageDelivery object
147
- # mail.deliver_now # sends the email
142
+ # NotifierMailer.welcome(User.first).deliver_now # sends the email
143
+ # mail = NotifierMailer.welcome(User.first) # => an ActionMailer::MessageDelivery object
144
+ # mail.deliver_now # generates and sends the email now
148
145
  #
149
- # The <tt>ActionMailer::MessageDelivery</tt> class is a wrapper around a <tt>Mail::Message</tt> object. If
150
- # you want direct access to the <tt>Mail::Message</tt> object you can call the <tt>message</tt> method on
151
- # the <tt>ActionMailer::MessageDelivery</tt> object.
146
+ # The <tt>ActionMailer::MessageDelivery</tt> class is a wrapper around a delegate that will call
147
+ # your method to generate the mail. If you want direct access to delegator, or <tt>Mail::Message</tt>,
148
+ # you can call the <tt>message</tt> method on the <tt>ActionMailer::MessageDelivery</tt> object.
152
149
  #
153
- # Notifier.welcome(User.first).message # => a Mail::Message object
150
+ # NotifierMailer.welcome(User.first).message # => a Mail::Message object
154
151
  #
155
- # Action Mailer is nicely integrated with Active Job so you can send emails in the background (example: outside
156
- # of the request-response cycle, so the user doesn't have to wait on it):
152
+ # Action Mailer is nicely integrated with Active Job so you can generate and send emails in the background
153
+ # (example: outside of the request-response cycle, so the user doesn't have to wait on it):
157
154
  #
158
- # Notifier.welcome(User.first).deliver_later # enqueue the email sending to Active Job
155
+ # NotifierMailer.welcome(User.first).deliver_later # enqueue the email sending to Active Job
156
+ #
157
+ # Note that <tt>deliver_later</tt> will execute your method from the background job.
159
158
  #
160
159
  # You never instantiate your mailer class. Rather, you just call the method you defined on the class itself.
160
+ # All instance methods are expected to return a message object to be sent.
161
161
  #
162
162
  # = Multipart Emails
163
163
  #
@@ -184,7 +184,7 @@ module ActionMailer
184
184
  #
185
185
  # Sending attachment in emails is easy:
186
186
  #
187
- # class Notifier < ApplicationMailer
187
+ # class NotifierMailer < ApplicationMailer
188
188
  # def welcome(recipient)
189
189
  # attachments['free_book.pdf'] = File.read('path/to/file.pdf')
190
190
  # mail(to: recipient, subject: "New account information")
@@ -200,7 +200,7 @@ module ActionMailer
200
200
  # If you need to send attachments with no content, you need to create an empty view for it,
201
201
  # or add an empty body parameter like this:
202
202
  #
203
- # class Notifier < ApplicationMailer
203
+ # class NotifierMailer < ApplicationMailer
204
204
  # def welcome(recipient)
205
205
  # attachments['free_book.pdf'] = File.read('path/to/file.pdf')
206
206
  # mail(to: recipient, subject: "New account information", body: "")
@@ -212,7 +212,7 @@ module ActionMailer
212
212
  # You can also specify that a file should be displayed inline with other HTML. This is useful
213
213
  # if you want to display a corporate logo or a photo.
214
214
  #
215
- # class Notifier < ApplicationMailer
215
+ # class NotifierMailer < ApplicationMailer
216
216
  # def welcome(recipient)
217
217
  # attachments.inline['photo.png'] = File.read('path/to/photo.png')
218
218
  # mail(to: recipient, subject: "Here is what we look like")
@@ -251,7 +251,7 @@ module ActionMailer
251
251
  # Action Mailer provides some intelligent defaults for your emails, these are usually specified in a
252
252
  # default method inside the class definition:
253
253
  #
254
- # class Notifier < ApplicationMailer
254
+ # class NotifierMailer < ApplicationMailer
255
255
  # default sender: 'system@example.com'
256
256
  # end
257
257
  #
@@ -259,8 +259,8 @@ module ActionMailer
259
259
  # <tt>ActionMailer::Base</tt> sets the following:
260
260
  #
261
261
  # * <tt>mime_version: "1.0"</tt>
262
- # * <tt>charset: "UTF-8",</tt>
263
- # * <tt>content_type: "text/plain",</tt>
262
+ # * <tt>charset: "UTF-8"</tt>
263
+ # * <tt>content_type: "text/plain"</tt>
264
264
  # * <tt>parts_order: [ "text/plain", "text/enriched", "text/html" ]</tt>
265
265
  #
266
266
  # <tt>parts_order</tt> and <tt>charset</tt> are not actually valid <tt>Mail::Message</tt> header fields,
@@ -269,7 +269,7 @@ module ActionMailer
269
269
  # As you can pass in any header, you need to either quote the header as a string, or pass it in as
270
270
  # an underscored symbol, so the following will work:
271
271
  #
272
- # class Notifier < ApplicationMailer
272
+ # class NotifierMailer < ApplicationMailer
273
273
  # default 'Content-Transfer-Encoding' => '7bit',
274
274
  # content_description: 'This is a description'
275
275
  # end
@@ -277,7 +277,7 @@ module ActionMailer
277
277
  # Finally, Action Mailer also supports passing <tt>Proc</tt> objects into the default hash, so you
278
278
  # can define methods that evaluate as the message is being generated:
279
279
  #
280
- # class Notifier < ApplicationMailer
280
+ # class NotifierMailer < ApplicationMailer
281
281
  # default 'X-Special-Header' => Proc.new { my_method }
282
282
  #
283
283
  # private
@@ -288,7 +288,7 @@ module ActionMailer
288
288
  # end
289
289
  #
290
290
  # Note that the proc is evaluated right at the start of the mail message generation, so if you
291
- # set something in the defaults using a proc, and then set the same thing inside of your
291
+ # set something in the default using a proc, and then set the same thing inside of your
292
292
  # mailer method, it will get over written by the mailer method.
293
293
  #
294
294
  # It is also possible to set these default options that will be used in all mailers through
@@ -302,7 +302,7 @@ module ActionMailer
302
302
  # This may be useful, for example, when you want to add default inline attachments for all
303
303
  # messages sent out by a certain mailer class:
304
304
  #
305
- # class Notifier < ApplicationMailer
305
+ # class NotifierMailer < ApplicationMailer
306
306
  # before_action :add_inline_attachment!
307
307
  #
308
308
  # def welcome
@@ -321,8 +321,9 @@ module ActionMailer
321
321
  # callbacks in the same manner that you would use callbacks in classes that
322
322
  # inherit from <tt>ActionController::Base</tt>.
323
323
  #
324
- # Note that unless you have a specific reason to do so, you should prefer using before_action
325
- # rather than after_action in your Action Mailer classes so that headers are parsed properly.
324
+ # Note that unless you have a specific reason to do so, you should prefer
325
+ # using <tt>before_action</tt> rather than <tt>after_action</tt> in your
326
+ # Action Mailer classes so that headers are parsed properly.
326
327
  #
327
328
  # = Previewing emails
328
329
  #
@@ -330,9 +331,9 @@ module ActionMailer
330
331
  # <tt>ActionMailer::Base.preview_path</tt>. Since most emails do something interesting
331
332
  # with database data, you'll need to write some scenarios to load messages with fake data:
332
333
  #
333
- # class NotifierPreview < ActionMailer::Preview
334
+ # class NotifierMailerPreview < ActionMailer::Preview
334
335
  # def welcome
335
- # Notifier.welcome(User.first)
336
+ # NotifierMailer.welcome(User.first)
336
337
  # end
337
338
  # end
338
339
  #
@@ -414,6 +415,8 @@ module ActionMailer
414
415
  #
415
416
  # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with
416
417
  # <tt>delivery_method :test</tt>. Most useful for unit and functional testing.
418
+ #
419
+ # * <tt>deliver_later_queue_name</tt> - The name of the queue used with <tt>deliver_later</tt>.
417
420
  class Base < AbstractController::Base
418
421
  include DeliveryMethods
419
422
  include Previews
@@ -438,8 +441,6 @@ module ActionMailer
438
441
 
439
442
  helper ActionMailer::MailHelper
440
443
 
441
- private_class_method :new #:nodoc:
442
-
443
444
  class_attribute :default_params
444
445
  self.default_params = {
445
446
  mime_version: "1.0",
@@ -463,29 +464,25 @@ module ActionMailer
463
464
  # Either a class, string or symbol can be passed in as the Observer.
464
465
  # If a string or symbol is passed in it will be camelized and constantized.
465
466
  def register_observer(observer)
466
- delivery_observer = case observer
467
- when String, Symbol
468
- observer.to_s.camelize.constantize
469
- else
470
- observer
471
- end
472
-
473
- Mail.register_observer(delivery_observer)
467
+ Mail.register_observer(observer_class_for(observer))
474
468
  end
475
469
 
476
470
  # Register an Interceptor which will be called before mail is sent.
477
471
  # Either a class, string or symbol can be passed in as the Interceptor.
478
472
  # If a string or symbol is passed in it will be camelized and constantized.
479
473
  def register_interceptor(interceptor)
480
- delivery_interceptor = case interceptor
481
- when String, Symbol
482
- interceptor.to_s.camelize.constantize
483
- else
484
- interceptor
485
- end
486
-
487
- Mail.register_interceptor(delivery_interceptor)
474
+ Mail.register_interceptor(observer_class_for(interceptor))
475
+ end
476
+
477
+ def observer_class_for(value) # :nodoc:
478
+ case value
479
+ when String, Symbol
480
+ value.to_s.camelize.constantize
481
+ else
482
+ value
483
+ end
488
484
  end
485
+ private :observer_class_for
489
486
 
490
487
  # Returns the name of current mailer. This method is also being used as a path for a view lookup.
491
488
  # If this is an anonymous mailer, this method will return +anonymous+ instead.
@@ -544,10 +541,6 @@ module ActionMailer
544
541
  end
545
542
  end
546
543
 
547
- def respond_to?(method, include_private = false) #:nodoc:
548
- super || action_methods.include?(method.to_s)
549
- end
550
-
551
544
  protected
552
545
 
553
546
  def set_payload_for_mail(payload, mail) #:nodoc:
@@ -569,6 +562,12 @@ module ActionMailer
569
562
  super
570
563
  end
571
564
  end
565
+
566
+ private
567
+
568
+ def respond_to_missing?(method, include_all = false) #:nodoc:
569
+ action_methods.include?(method.to_s)
570
+ end
572
571
  end
573
572
 
574
573
  attr_internal :message
@@ -577,11 +576,10 @@ module ActionMailer
577
576
  # will be initialized according to the named method. If not, the mailer will
578
577
  # remain uninitialized (useful when you only need to invoke the "receive"
579
578
  # method, for instance).
580
- def initialize(method_name=nil, *args)
579
+ def initialize
581
580
  super()
582
581
  @_mail_was_called = false
583
582
  @_message = Mail.new
584
- process(method_name, *args) if method_name
585
583
  end
586
584
 
587
585
  def process(method_name, *args) #:nodoc:
@@ -591,8 +589,6 @@ module ActionMailer
591
589
  }
592
590
 
593
591
  ActiveSupport::Notifications.instrument("process.action_mailer", payload) do
594
- lookup_context.skip_default_locale!
595
-
596
592
  super
597
593
  @_message = NullMail.new unless @_mail_was_called
598
594
  end
@@ -662,18 +658,18 @@ module ActionMailer
662
658
  #
663
659
  # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg')
664
660
  #
665
- # If you do this, then Mail will take the file name and work out the mime type
666
- # set the Content-Type, Content-Disposition, Content-Transfer-Encoding and
667
- # base64 encode the contents of the attachment all for you.
661
+ # If you do this, then Mail will take the file name and work out the mime type.
662
+ # It will also set the Content-Type, Content-Disposition, Content-Transfer-Encoding
663
+ # and encode the contents of the attachment in Base64.
668
664
  #
669
665
  # You can also specify overrides if you want by passing a hash instead of a string:
670
666
  #
671
667
  # mail.attachments['filename.jpg'] = {mime_type: 'application/x-gzip',
672
668
  # content: File.read('/path/to/filename.jpg')}
673
669
  #
674
- # If you want to use a different encoding than Base64, you can pass an encoding in,
675
- # but then it is up to you to pass in the content pre-encoded, and don't expect
676
- # Mail to know how to decode this data:
670
+ # If you want to use encoding other than Base64 then you will need to pass encoding
671
+ # type along with the pre-encoded content as Mail doesn't know how to decode the
672
+ # data:
677
673
  #
678
674
  # file_content = SpecialEncode(File.read('/path/to/filename.jpg'))
679
675
  # mail.attachments['filename.jpg'] = {mime_type: 'application/x-gzip',
@@ -798,52 +794,40 @@ module ActionMailer
798
794
  # end
799
795
  #
800
796
  def mail(headers = {}, &block)
801
- return @_message if @_mail_was_called && headers.blank? && !block
802
-
803
- m = @_message
797
+ return message if @_mail_was_called && headers.blank? && !block
804
798
 
805
799
  # At the beginning, do not consider class default for content_type
806
800
  content_type = headers[:content_type]
807
801
 
808
- # Call all the procs (if any)
809
- default_values = {}
810
- self.class.default.each do |k,v|
811
- default_values[k] = v.is_a?(Proc) ? instance_eval(&v) : v
812
- end
813
-
814
- # Handle defaults
815
- headers = headers.reverse_merge(default_values)
816
- headers[:subject] ||= default_i18n_subject
802
+ headers = apply_defaults(headers)
817
803
 
818
804
  # Apply charset at the beginning so all fields are properly quoted
819
- m.charset = charset = headers[:charset]
805
+ message.charset = charset = headers[:charset]
820
806
 
821
807
  # Set configure delivery behavior
822
- wrap_delivery_behavior!(headers.delete(:delivery_method), headers.delete(:delivery_method_options))
808
+ wrap_delivery_behavior!(headers[:delivery_method], headers[:delivery_method_options])
823
809
 
824
- # Assign all headers except parts_order, content_type and body
825
- assignable = headers.except(:parts_order, :content_type, :body, :template_name, :template_path)
826
- assignable.each { |k, v| m[k] = v }
810
+ assign_headers_to_message(message, headers)
827
811
 
828
812
  # Render the templates and blocks
829
813
  responses = collect_responses(headers, &block)
830
814
  @_mail_was_called = true
831
815
 
832
- create_parts_from_responses(m, responses)
816
+ create_parts_from_responses(message, responses)
833
817
 
834
818
  # Setup content type, reapply charset and handle parts order
835
- m.content_type = set_content_type(m, content_type, headers[:content_type])
836
- m.charset = charset
819
+ message.content_type = set_content_type(message, content_type, headers[:content_type])
820
+ message.charset = charset
837
821
 
838
- if m.multipart?
839
- m.body.set_sort_order(headers[:parts_order])
840
- m.body.sort_parts!
822
+ if message.multipart?
823
+ message.body.set_sort_order(headers[:parts_order])
824
+ message.body.sort_parts!
841
825
  end
842
826
 
843
- m
827
+ message
844
828
  end
845
829
 
846
- protected
830
+ protected
847
831
 
848
832
  # Used by #mail to set the content type of the message.
849
833
  #
@@ -860,7 +844,7 @@ module ActionMailer
860
844
  when user_content_type.present?
861
845
  user_content_type
862
846
  when m.has_attachments?
863
- if m.attachments.detect { |a| a.inline? }
847
+ if m.attachments.detect(&:inline?)
864
848
  ["multipart", "related", params]
865
849
  else
866
850
  ["multipart", "mixed", params]
@@ -881,45 +865,70 @@ module ActionMailer
881
865
  I18n.t(:subject, interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
882
866
  end
883
867
 
884
- def collect_responses(headers) #:nodoc:
885
- responses = []
868
+ # Emails do not support relative path links.
869
+ def self.supports_path?
870
+ false
871
+ end
872
+
873
+ private
874
+
875
+ def apply_defaults(headers)
876
+ default_values = self.class.default.map do |key, value|
877
+ [
878
+ key,
879
+ value.is_a?(Proc) ? instance_eval(&value) : value
880
+ ]
881
+ end.to_h
882
+
883
+ headers_with_defaults = headers.reverse_merge(default_values)
884
+ headers_with_defaults[:subject] ||= default_i18n_subject
885
+ headers_with_defaults
886
+ end
887
+
888
+ def assign_headers_to_message(message, headers)
889
+ assignable = headers.except(:parts_order, :content_type, :body, :template_name,
890
+ :template_path, :delivery_method, :delivery_method_options)
891
+ assignable.each { |k, v| message[k] = v }
892
+ end
886
893
 
894
+ def collect_responses(headers)
887
895
  if block_given?
888
896
  collector = ActionMailer::Collector.new(lookup_context) { render(action_name) }
889
897
  yield(collector)
890
- responses = collector.responses
898
+ collector.responses
891
899
  elsif headers[:body]
892
- responses << {
900
+ [{
893
901
  body: headers.delete(:body),
894
902
  content_type: self.class.default[:content_type] || "text/plain"
895
- }
903
+ }]
896
904
  else
897
- templates_path = headers.delete(:template_path) || self.class.mailer_name
898
- templates_name = headers.delete(:template_name) || action_name
905
+ collect_responses_from_templates(headers)
906
+ end
907
+ end
899
908
 
900
- each_template(Array(templates_path), templates_name) do |template|
901
- self.formats = template.formats
909
+ def collect_responses_from_templates(headers)
910
+ templates_path = headers[:template_path] || self.class.mailer_name
911
+ templates_name = headers[:template_name] || action_name
902
912
 
903
- responses << {
904
- body: render(template: template),
905
- content_type: template.type.to_s
906
- }
907
- end
913
+ each_template(Array(templates_path), templates_name).map do |template|
914
+ self.formats = template.formats
915
+ {
916
+ body: render(template: template),
917
+ content_type: template.type.to_s
918
+ }
908
919
  end
909
-
910
- responses
911
920
  end
912
921
 
913
- def each_template(paths, name, &block) #:nodoc:
922
+ def each_template(paths, name, &block)
914
923
  templates = lookup_context.find_all(name, paths)
915
924
  if templates.empty?
916
925
  raise ActionView::MissingTemplate.new(paths, name, paths, false, 'mailer')
917
926
  else
918
- templates.uniq { |t| t.formats }.each(&block)
927
+ templates.uniq(&:formats).each(&block)
919
928
  end
920
929
  end
921
930
 
922
- def create_parts_from_responses(m, responses) #:nodoc:
931
+ def create_parts_from_responses(m, responses)
923
932
  if responses.size == 1 && !m.has_attachments?
924
933
  responses[0].each { |k,v| m[k] = v }
925
934
  elsif responses.size > 1 && m.has_attachments?
@@ -932,17 +941,12 @@ module ActionMailer
932
941
  end
933
942
  end
934
943
 
935
- def insert_part(container, response, charset) #:nodoc:
944
+ def insert_part(container, response, charset)
936
945
  response[:charset] ||= charset
937
946
  part = Mail::Part.new(response)
938
947
  container.add_part(part)
939
948
  end
940
949
 
941
- # Emails do not support relative path links.
942
- def self.supports_path?
943
- false
944
- end
945
-
946
950
  ActiveSupport.run_load_hooks(:action_mailer, self)
947
951
  end
948
952
  end
@@ -4,9 +4,9 @@ module ActionMailer
4
4
  # The <tt>ActionMailer::DeliveryJob</tt> class is used when you
5
5
  # want to send emails outside of the request-response cycle.
6
6
  class DeliveryJob < ActiveJob::Base # :nodoc:
7
- queue_as :mailers
7
+ queue_as { ActionMailer::Base.deliver_later_queue_name }
8
8
 
9
- def perform(mailer, mail_method, delivery_method, *args) # :nodoc:
9
+ def perform(mailer, mail_method, delivery_method, *args) #:nodoc:
10
10
  mailer.constantize.public_send(mail_method, *args).send(delivery_method)
11
11
  end
12
12
  end
@@ -16,6 +16,9 @@ module ActionMailer
16
16
  cattr_accessor :perform_deliveries
17
17
  self.perform_deliveries = true
18
18
 
19
+ cattr_accessor :deliver_later_queue_name
20
+ self.deliver_later_queue_name = :mailers
21
+
19
22
  self.delivery_methods = {}.freeze
20
23
  self.delivery_method = :smtp
21
24
 
@@ -33,7 +36,7 @@ module ActionMailer
33
36
 
34
37
  add_delivery_method :sendmail, Mail::Sendmail,
35
38
  location: '/usr/sbin/sendmail',
36
- arguments: '-i'
39
+ arguments: '-i -t'
37
40
 
38
41
  add_delivery_method :test, Mail::TestMailer
39
42
  end
@@ -1,14 +1,14 @@
1
1
  module ActionMailer
2
- # Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>
2
+ # Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>.
3
3
  def self.gem_version
4
4
  Gem::Version.new VERSION::STRING
5
5
  end
6
6
 
7
7
  module VERSION
8
- MAJOR = 4
9
- MINOR = 2
10
- TINY = 11
11
- PRE = "3"
8
+ MAJOR = 5
9
+ MINOR = 0
10
+ TINY = 0
11
+ PRE = "beta1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -5,10 +5,10 @@ module ActionMailer
5
5
  # that use inline cid: style urls to data: style urls so that they are visible
6
6
  # when previewing a HTML email in a web browser.
7
7
  #
8
- # This interceptor is not enabled by default, to use it just register it like any
9
- # other mailer preview interceptor:
8
+ # This interceptor is enabled by default. To disable it, delete it from the
9
+ # <tt>ActionMailer::Base.preview_interceptors</tt> array:
10
10
  #
11
- # ActionMailer::Base.register_preview_interceptor(ActionMailer::InlinePreviewInterceptor)
11
+ # ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor)
12
12
  #
13
13
  class InlinePreviewInterceptor
14
14
  PATTERN = /src=(?:"cid:[^"]+"|'cid:[^']+')/i
@@ -2,13 +2,13 @@ require 'active_support/log_subscriber'
2
2
 
3
3
  module ActionMailer
4
4
  # Implements the ActiveSupport::LogSubscriber for logging notifications when
5
- # email is delivered and received.
5
+ # email is delivered or received.
6
6
  class LogSubscriber < ActiveSupport::LogSubscriber
7
7
  # An email was delivered.
8
8
  def deliver(event)
9
9
  info do
10
10
  recipients = Array(event.payload[:to]).join(', ')
11
- "\nSent mail to #{recipients} (#{event.duration.round(1)}ms)"
11
+ "Sent mail to #{recipients} (#{event.duration.round(1)}ms)"
12
12
  end
13
13
 
14
14
  debug { event.payload[:mail] }
@@ -16,7 +16,7 @@ module ActionMailer
16
16
 
17
17
  # An email was received.
18
18
  def receive(event)
19
- info { "\nReceived mail (#{event.duration.round(1)}ms)" }
19
+ info { "Received mail (#{event.duration.round(1)}ms)" }
20
20
  debug { event.payload[:mail] }
21
21
  end
22
22
 
@@ -25,11 +25,11 @@ module ActionMailer
25
25
  debug do
26
26
  mailer = event.payload[:mailer]
27
27
  action = event.payload[:action]
28
- "\n#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms"
28
+ "#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms"
29
29
  end
30
30
  end
31
31
 
32
- # Use the logger configured for ActionMailer::Base
32
+ # Use the logger configured for ActionMailer::Base.
33
33
  def logger
34
34
  ActionMailer::Base.logger
35
35
  end
@@ -4,7 +4,17 @@ module ActionMailer
4
4
  # attachments list.
5
5
  module MailHelper
6
6
  # Take the text and format it, indented two spaces for each line, and
7
- # wrapped at 72 columns.
7
+ # wrapped at 72 columns:
8
+ #
9
+ # text = <<-TEXT
10
+ # This is
11
+ # the paragraph.
12
+ #
13
+ # * item1 * item2
14
+ # TEXT
15
+ #
16
+ # block_format text
17
+ # # => " This is the paragraph.\n\n * item1\n * item2\n"
8
18
  def block_format(text)
9
19
  formatted = text.split(/\n\r?\n/).collect { |paragraph|
10
20
  format_paragraph(paragraph)
@@ -33,6 +43,8 @@ module ActionMailer
33
43
  end
34
44
 
35
45
  # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces.
46
+ # By default column length +len+ equals 72 characters and indent
47
+ # +indent+ equal two spaces.
36
48
  #
37
49
  # my_text = 'Here is a sample text with more than 40 characters'
38
50
  #
@@ -1,5 +1,4 @@
1
1
  require 'delegate'
2
- require 'active_support/core_ext/string/filters'
3
2
 
4
3
  module ActionMailer
5
4
 
@@ -22,7 +21,11 @@ module ActionMailer
22
21
  end
23
22
 
24
23
  def __getobj__ #:nodoc:
25
- @obj ||= @mailer.send(:new, @mail_method, *@args).message
24
+ @obj ||= begin
25
+ mailer = @mailer.new
26
+ mailer.process @mail_method, *@args
27
+ mailer.message
28
+ end
26
29
  end
27
30
 
28
31
  def __setobj__(obj) #:nodoc:
@@ -61,9 +64,9 @@ module ActionMailer
61
64
  #
62
65
  # Options:
63
66
  #
64
- # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
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
67
+ # * <tt>:wait</tt> - Enqueue the email to be delivered with a delay.
68
+ # * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time.
69
+ # * <tt>:queue</tt> - Enqueue the email on the specified queue.
67
70
  def deliver_later(options={})
68
71
  enqueue_delivery :deliver_now, options
69
72
  end
@@ -85,26 +88,6 @@ module ActionMailer
85
88
  message.deliver
86
89
  end
87
90
 
88
- def deliver! #:nodoc:
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
-
95
- deliver_now!
96
- end
97
-
98
- def deliver #:nodoc:
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
-
105
- deliver_now
106
- end
107
-
108
91
  private
109
92
 
110
93
  def enqueue_delivery(delivery_method, options={})
@@ -21,7 +21,7 @@ module ActionMailer
21
21
 
22
22
  # :nodoc:
23
23
  mattr_accessor :preview_interceptors, instance_writer: false
24
- self.preview_interceptors = []
24
+ self.preview_interceptors = [ActionMailer::InlinePreviewInterceptor]
25
25
  end
26
26
 
27
27
  module ClassMethods
@@ -52,7 +52,7 @@ module ActionMailer
52
52
  extend ActiveSupport::DescendantsTracker
53
53
 
54
54
  class << self
55
- # Returns all mailer preview classes
55
+ # Returns all mailer preview classes.
56
56
  def all
57
57
  load_previews if descendants.empty?
58
58
  descendants
@@ -68,27 +68,27 @@ module ActionMailer
68
68
  message
69
69
  end
70
70
 
71
- # Returns all of the available email previews
71
+ # Returns all of the available email previews.
72
72
  def emails
73
73
  public_instance_methods(false).map(&:to_s).sort
74
74
  end
75
75
 
76
- # Returns true if the email exists
76
+ # Returns true if the email exists.
77
77
  def email_exists?(email)
78
78
  emails.include?(email)
79
79
  end
80
80
 
81
- # Returns true if the preview exists
81
+ # Returns true if the preview exists.
82
82
  def exists?(preview)
83
83
  all.any?{ |p| p.preview_name == preview }
84
84
  end
85
85
 
86
- # Find a mailer preview by its underscored class name
86
+ # Find a mailer preview by its underscored class name.
87
87
  def find(preview)
88
88
  all.find{ |p| p.preview_name == preview }
89
89
  end
90
90
 
91
- # Returns the underscored name of the mailer preview without the suffix
91
+ # Returns the underscored name of the mailer preview without the suffix.
92
92
  def preview_name
93
93
  name.sub(/Preview$/, '').underscore
94
94
  end
@@ -16,6 +16,11 @@ module ActionMailer
16
16
  paths = app.config.paths
17
17
  options = app.config.action_mailer
18
18
 
19
+ if app.config.force_ssl
20
+ options.default_url_options ||= {}
21
+ options.default_url_options[:protocol] ||= 'https'
22
+ end
23
+
19
24
  options.assets_dir ||= paths["public"].first
20
25
  options.javascripts_dir ||= paths["public/javascripts"].first
21
26
  options.stylesheets_dir ||= paths["public/stylesheets"].first
@@ -41,7 +46,7 @@ module ActionMailer
41
46
  options.each { |k,v| send("#{k}=", v) }
42
47
 
43
48
  if options.show_previews
44
- app.routes.append do
49
+ app.routes.prepend do
45
50
  get '/rails/mailers' => "rails/mailers#index"
46
51
  get '/rails/mailers/*path' => "rails/mailers#preview"
47
52
  end
@@ -57,29 +57,28 @@ module ActionMailer
57
57
 
58
58
  protected
59
59
 
60
- def initialize_test_deliveries
60
+ def initialize_test_deliveries # :nodoc:
61
61
  set_delivery_method :test
62
62
  @old_perform_deliveries = ActionMailer::Base.perform_deliveries
63
63
  ActionMailer::Base.perform_deliveries = true
64
- ActionMailer::Base.deliveries.clear
65
64
  end
66
65
 
67
- def restore_test_deliveries
66
+ def restore_test_deliveries # :nodoc:
68
67
  restore_delivery_method
69
68
  ActionMailer::Base.perform_deliveries = @old_perform_deliveries
69
+ ActionMailer::Base.deliveries.clear
70
70
  end
71
71
 
72
- def set_delivery_method(method)
72
+ def set_delivery_method(method) # :nodoc:
73
73
  @old_delivery_method = ActionMailer::Base.delivery_method
74
74
  ActionMailer::Base.delivery_method = method
75
75
  end
76
76
 
77
- def restore_delivery_method
78
- ActionMailer::Base.deliveries.clear
77
+ def restore_delivery_method # :nodoc:
79
78
  ActionMailer::Base.delivery_method = @old_delivery_method
80
79
  end
81
80
 
82
- def set_expected_mail
81
+ def set_expected_mail # :nodoc:
83
82
  @expected = Mail.new
84
83
  @expected.content_type ["text", "plain", { "charset" => charset }]
85
84
  @expected.mime_version = '1.0'
@@ -1,7 +1,11 @@
1
+ require 'active_job'
2
+
1
3
  module ActionMailer
2
4
  # Provides helper methods for testing Action Mailer, including #assert_emails
3
- # and #assert_no_emails
5
+ # and #assert_no_emails.
4
6
  module TestHelper
7
+ include ActiveJob::TestHelper
8
+
5
9
  # Asserts that the number of emails sent matches the given number.
6
10
  #
7
11
  # def test_emails
@@ -36,7 +40,7 @@ module ActionMailer
36
40
  end
37
41
  end
38
42
 
39
- # Assert that no emails have been sent.
43
+ # Asserts that no emails have been sent.
40
44
  #
41
45
  # def test_emails
42
46
  # assert_no_emails
@@ -58,5 +62,52 @@ module ActionMailer
58
62
  def assert_no_emails(&block)
59
63
  assert_emails 0, &block
60
64
  end
65
+
66
+ # Asserts that the number of emails enqueued for later delivery matches
67
+ # the given number.
68
+ #
69
+ # def test_emails
70
+ # assert_enqueued_emails 0
71
+ # ContactMailer.welcome.deliver_later
72
+ # assert_enqueued_emails 1
73
+ # ContactMailer.welcome.deliver_later
74
+ # assert_enqueued_emails 2
75
+ # end
76
+ #
77
+ # If a block is passed, that block should cause the specified number of
78
+ # emails to be enqueued.
79
+ #
80
+ # def test_emails_again
81
+ # assert_enqueued_emails 1 do
82
+ # ContactMailer.welcome.deliver_later
83
+ # end
84
+ #
85
+ # assert_enqueued_emails 2 do
86
+ # ContactMailer.welcome.deliver_later
87
+ # ContactMailer.welcome.deliver_later
88
+ # end
89
+ # end
90
+ def assert_enqueued_emails(number, &block)
91
+ assert_enqueued_jobs number, only: ActionMailer::DeliveryJob, &block
92
+ end
93
+
94
+ # Asserts that no emails are enqueued for later delivery.
95
+ #
96
+ # def test_no_emails
97
+ # assert_no_enqueued_emails
98
+ # ContactMailer.welcome.deliver_later
99
+ # assert_enqueued_emails 1
100
+ # end
101
+ #
102
+ # If a block is provided, it should not cause any emails to be enqueued.
103
+ #
104
+ # def test_no_emails
105
+ # assert_no_enqueued_emails do
106
+ # # No emails should be enqueued from this block
107
+ # end
108
+ # end
109
+ def assert_no_enqueued_emails(&block)
110
+ assert_no_enqueued_jobs only: ActionMailer::DeliveryJob, &block
111
+ end
61
112
  end
62
113
  end
@@ -11,7 +11,7 @@ Example:
11
11
  rails generate mailer Notifications signup forgot_password invoice
12
12
 
13
13
  creates a Notifications mailer class, views, and test:
14
- Mailer: app/mailers/notifications.rb
15
- Views: app/views/notifications/signup.text.erb [...]
16
- Test: test/mailers/notifications_test.rb
14
+ Mailer: app/mailers/notifications_mailer.rb
15
+ Views: app/views/notifications_mailer/signup.text.erb [...]
16
+ Test: test/mailers/notifications_mailer_test.rb
17
17
 
@@ -4,16 +4,19 @@ module Rails
4
4
  source_root File.expand_path("../templates", __FILE__)
5
5
 
6
6
  argument :actions, type: :array, default: [], banner: "method method"
7
- check_class_collision
7
+
8
+ check_class_collision suffix: "Mailer"
8
9
 
9
10
  def create_mailer_file
10
- template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
11
- if self.behavior == :invoke
12
- template "application_mailer.rb", 'app/mailers/application_mailer.rb'
13
- end
11
+ template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}_mailer.rb")
14
12
  end
15
13
 
16
14
  hook_for :template_engine, :test_framework
15
+
16
+ protected
17
+ def file_name
18
+ @_file_name ||= super.gsub(/\_mailer/i, '')
19
+ end
17
20
  end
18
21
  end
19
22
  end
@@ -1,11 +1,11 @@
1
1
  <% module_namespacing do -%>
2
- class <%= class_name %> < ApplicationMailer
2
+ class <%= class_name %>Mailer < ApplicationMailer
3
3
  <% actions.each do |action| -%>
4
4
 
5
5
  # Subject can be set in your I18n file at config/locales/en.yml
6
6
  # with the following lookup:
7
7
  #
8
- # en.<%= file_path.tr("/",".") %>.<%= action %>.subject
8
+ # en.<%= file_path.tr("/",".") %>_mailer.<%= action %>.subject
9
9
  #
10
10
  def <%= action %>
11
11
  @greeting = "Hi"
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.11.3
4
+ version: 5.0.0.beta1
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: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.11.3
19
+ version: 5.0.0.beta1
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.11.3
26
+ version: 5.0.0.beta1
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.11.3
33
+ version: 5.0.0.beta1
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.11.3
40
+ version: 5.0.0.beta1
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.11.3
47
+ version: 5.0.0.beta1
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.11.3
54
+ version: 5.0.0.beta1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mail
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -119,9 +119,8 @@ files:
119
119
  - lib/action_mailer/version.rb
120
120
  - lib/rails/generators/mailer/USAGE
121
121
  - lib/rails/generators/mailer/mailer_generator.rb
122
- - lib/rails/generators/mailer/templates/application_mailer.rb
123
122
  - lib/rails/generators/mailer/templates/mailer.rb
124
- homepage: http://www.rubyonrails.org
123
+ homepage: http://rubyonrails.org
125
124
  licenses:
126
125
  - MIT
127
126
  metadata: {}
@@ -133,16 +132,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
132
  requirements:
134
133
  - - ">="
135
134
  - !ruby/object:Gem::Version
136
- version: 1.9.3
135
+ version: 2.2.2
137
136
  required_rubygems_version: !ruby/object:Gem::Requirement
138
137
  requirements:
139
- - - ">="
138
+ - - ">"
140
139
  - !ruby/object:Gem::Version
141
- version: '0'
140
+ version: 1.3.1
142
141
  requirements:
143
142
  - none
144
- rubygems_version: 3.0.3
143
+ rubyforge_project:
144
+ rubygems_version: 2.5.1
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Email composition, delivery, and receiving framework (part of Rails).
148
148
  test_files: []
149
+ has_rdoc:
@@ -1,4 +0,0 @@
1
- class ApplicationMailer < ActionMailer::Base
2
- default from: "from@example.com"
3
- layout 'mailer'
4
- end