aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
Commit message (Collapse)AuthorAgeFilesLines
* Revert "MethodCallAssertions is a regular player of the team ↵Rafael Mendonça França2019-08-021-0/+3
| | | | | | ActiveSupport::TestCase now" This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
* Revert "You give jruby_skip & rubinius_skip a good name"Rafael Mendonça França2019-08-021-0/+13
| | | | This reverts commit 8d2866bb80fbe81acb04f5b0c44f152f571fb29f.
* You give jruby_skip & rubinius_skip a good nameAkira Matsuda2019-08-021-13/+0
| | | | | | | | This hack prevails everywhere in the codebase by being copy & pasted, and it's actually not a negative thing but a necessary thing for framework implementors, so it should better have a name and be a thing. And with this commit, activesupport/test/abstract_unit.rb now doesn't silently autoload AS::TestCase, so we're ready to establish clearner environment for running AS tests (probably in later commits)
* MethodCallAssertions is a regular player of the team ActiveSupport::TestCase nowAkira Matsuda2019-08-021-3/+0
| | | | It's used everywhere, clean and mature enough
* Do not use the same test class in different testsyuuji.yaginuma2019-08-011-2/+2
| | | | | | | | | This fixes the following warnings. ``` actionmailer/test/base_test.rb:272: warning: method redefined; discarding old welcome actionmailer/test/base_test.rb:260: warning: previous definition of welcome was here ```
* Merge pull request #36198 from oneiros/actionmailer_ssl_optionRyuta Kamizono2019-07-291-1/+1
|\ | | | | | | | | Documentation for ActionMailer's SMTP over SSL/TLS option [ci skip]
| * Improve documentation of `:ssl/:tls` option [ci skip]David Roetzel2019-07-291-1/+1
| | | | | | | | | | | | | | | | Add missing bullet point to make clear this is actually a separate option from `:openssl_verify_mode`. Add `:ssl/:tls`-option to guides as well [ci skip]
* | Merge pull request #36227 from ↵Rafael França2019-07-262-1/+12
|\ \ | | | | | | | | | | | | betesh/avoid-misleading-error-about-late-attachments Prevent reading inline attachments after `mail` was called from raising an inaccurate exception
| * | Prevent reading inline attachments after `mail` was called from raising an ↵Isaac Betesh2019-05-212-1/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | inaccurate exception Without this change, `attachments.inline['my_attachment'].present?`, for example, would raise the exception `Can't add attachments after mail was called`. I first brought this issue up at https://github.com/rails/rails/issues/16163#issuecomment-437378347. Note that this commit addresses only one of the 2 problems I described in that comment. The other problem is that using `attachments.inline['my_attachment']` for reading an attachment is unnecessary--it's the same as `attachments['my_attachment']`--even before `mail` is called. We could add a warning about the unnecessary use of `inline` but I'm saving that for a later PR since my comment has not received any feedback yet.
* / Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-1311-13/+0
|/ | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Start Rails 6.1 developmentRafael Mendonça França2019-04-242-81/+3
|
* Output junit format test reportFumiaki MATSUSHIMA2019-04-041-0/+2
|
* Merge tag 'v6.0.0.beta3'eileencodes2019-03-132-1/+6
|\ | | | | | | v6.0.0.beta3 release
| * Prep releaseeileencodes2019-03-112-1/+6
| | | | | | | | | | | | | | * Update RAILS_VERSION * Bundle * rake update_versions * rake changelog:header
* | Merge pull request #35121 from utilum/warning_tried_to_create_proc_without_blockKasper Timm Hansen2019-03-101-2/+2
|\ \ | | | | | | Ruby 2.7 warning: creating a Proc without a block
| * | Ruby 2.7 warning: creating a Proc without a blockutilum2019-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of [Revision 66772]( https://bugs.ruby-lang.org/projects/ruby-trunk/repository/trunk/revisions/66772) `Proc.new` without giving a block emits `warning: tried to create Proc object without a block`. This commit fixes cases where Rails test suit tickles this warning. See CI logs: https://travis-ci.org/rails/rails/jobs/487205819#L1161-L1190 https://travis-ci.org/rails/rails/jobs/487205821#L1154-1159 https://travis-ci.org/rails/rails/jobs/487205821#L1160-L1169 https://travis-ci.org/rails/rails/jobs/487205821#L1189 https://travis-ci.org/rails/rails/jobs/487254404#L1307-L1416 https://travis-ci.org/rails/rails/jobs/487254405#L1174-L1191
* | | Merge pull request #35559 from ↵Kasper Timm Hansen2019-03-091-0/+2
|\ \ \ | | | | | | | | | | | | | | | | ashishprajapati/ashishprajapati/important_textual_improvements Added missing guide links in documentation and minor wording fix
| * | | Added missing guide links in README documentation and minor wording fix [ci ↵ashishprajapati2019-03-101-0/+2
| | | | | | | | | | | | | | | | skip]
* | | | Updated links from http to https in guides, docs, etcAbhay Nikam2019-03-092-2/+2
|/ / /
* | | Add test and change how format set in ActionMailerJohn Hawthorn2019-03-015-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this used self.formats= to set the format which render would use to find templates. This worked, but was untested, and looked a little confusing because it was doing the mutation within a loop. This commit replaces the assignment with passing formats: [format] into the render call, which makes it more obvious that that's the purpose of the format. It also adds a test to verify the formats being used.
* | | Create templates with format=nilJohn Hawthorn2019-02-261-2/+3
| |/ |/|
* | Preparing for 6.0.0.beta2 releaseRafael Mendonça França2019-02-252-1/+6
| |
* | Templates have one formatAaron Patterson2019-02-251-2/+2
| | | | | | | | | | | | | | Templates only have one format. Before this commit, templates would be constructed with a single element array that contained the format. This commit eliminates the single element array and just implements a `format` method. This saves one array allocation per template.
* | Fix class name in the documentation [ci skip]Rafael Mendonça França2019-02-251-1/+1
| |
* | Merge pull request #35293 from rails/remove-rendered-format-from-cacheAaron Patterson2019-02-191-5/+5
|\ \ | | | | | | Pass the template format to the digestor
| * | pass format to the digestorAaron Patterson2019-02-161-5/+5
| | |
* | | Auto correct rubocop offensesYoshiyuki Hirano2019-02-171-12/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offenses: railties/lib/rails/autoloaders.rb:1:1: C: [Corrected] Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. module Rails ^ actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. actionmailer/test/base_test.rb:917:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected. actionmailer/test/base_test.rb:917:5: C: [Corrected] Style/RedundantBegin: Redundant begin block detected. begin ^^^^^ actionmailer/test/base_test.rb:918:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation. events = [] ^^^^ actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. actionmailer/test/base_test.rb:930:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
* / Don’t log recipients when sending mailJaap van der Plas2019-02-135-10/+26
|/ | | | | | Since production applications typically run with log level info and email adresses should be considered as sensitive data we want to prevent them from ending up in the logs. In development mode (with log level debug) they are still logged as part of the Mail::Message object.
* Zeitwerk integrationXavier Noria2019-02-121-6/+10
|
* Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-182-1/+3
|
* Fix legacy fallback for parameterized mailersGannon McGibbon2019-01-073-6/+13
|
* Move MailDeliveryJob default to 6.0 defaultsGannon McGibbon2019-01-072-1/+5
|
* Bump license years for 2019Arun Agrawal2018-12-312-2/+2
|
* Remove mention about `receive.action_mailer` from the AS instrumentation guidebogdanvlviv2018-12-281-3/+4
| | | | | Since e3f832a7433a291a51c5df397dc3dd654c1858cb `ActionMailer::Base.receive` is deprecated.
* Deprecate ActionMailer::Base.receive in favor of Action MailboxGeorge Claghorn2018-12-275-40/+14
|
* Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin blockRyuta Kamizono2018-12-211-14/+12
| | | | | | | | | | Currently we sometimes find a redundant begin block in code review (e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205). I'd like to enable `Style/RedundantBegin` cop to avoid that, since rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5 (https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with that situation than before.
* fix tests for mail 2.8pavel2018-12-191-4/+4
|
* Require Ruby 2.5 for Rails 6.Kasper Timm Hansen2018-12-192-3/+3
| | | | | | | | | | Generally followed the pattern for https://github.com/rails/rails/pull/32034 * Removes needless CI configs for 2.4 * Targets 2.5 in rubocop * Updates existing CHANGELOG entries for fewer merge conflicts * Removes Hash#slice extension as that's inlined on Ruby 2.5. * Removes the need for send on define_method in MethodCallAssertions.
* Add MailDeliveryJob for unified mail deliveryGannon McGibbon2018-12-0412-23/+179
| | | | | Add `MailDeliveryJob` for delivering both regular and parameterized mail. Deprecate using `DeliveryJob` and `Parameterized::DeliveryJob`.
* Add yield to with_delivery_job test helperGannon McGibbon2018-11-301-0/+1
| | | | | Adds yield to parameterized mail test helper so assertions passed into with_delivery_job are actually ran.
* Deliver parameterized mail with DeliveryJobGannon McGibbon2018-11-229-51/+50
| | | | | Deliver parameterized mail with `ActionMailer::DeliveryJob` and remove `ActionMailer::Parameterized::DeliveryJob`.
* Fix ActionMailer assertion not working for mail defining delivery_job:Edouard CHIN2018-11-213-5/+70
| | | | | | | | | | | | | | | | | | | - If a Mail defines a custom delivery_job, all ActionMailer assertion helper (assert_emails, assert_enqueued_emails ...) wouldn't work. ```ruby MyMailer < ApplicationMailer self.delivery_job = MyJob end # This assertion will fail assert_emails(1) do MyMailer.my_mail.deliver_later end This PR leverage the new ActiveJob feature that accepts Procs for the `only` keyword and check if the delivery job is one of ActionMailer registered ones.
* Merge pull request #22534 from evopark/masterRafael Mendonça França2018-11-194-3/+26
|\ | | | | | | ActionMailer: support overriding template name in multipart
| * ActionMailer: support overriding template name in multipartMarcus Ilgner2015-12-084-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | Implicit rendering in multipart blocks now also uses the template name from the options hash instead of always using the action name. So you can now write mail(template_name: template_name) do |format| format.text format.html end
* | Amend CVE note and security guide section wordingsGannon McGibbon2018-11-061-3/+3
| | | | | | | | | | | | | | Reword first sentence of dep management and CVE section of security guide. Also, reword and move gemspec notes above deps. [ci skip]
* | Add CVE note to security guide and gemspecsGannon McGibbon2018-11-061-0/+3
| | | | | | | | [ci skip]
* | Fix tests on Mail 2.7.1yuuji.yaginuma2018-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | Up to `2.7.0`, encoding was chosen using `Mail::Encodings::TransferEncoding.negotiate`, and base64 encoding was used. In `2.7.1`, when `transfer_encoding` is not specified, the encoding of the message is respected. Related to: https://github.com/mikel/mail/commit/dead487e02f592d9058fd07deedcde39b569d18d However, what chosen for transfer encoding is not essential in these tests. To test more accurately, confirm that the decoded body instead.
* | Parameterized mailers can configure delivery jobLuke Pearce2018-10-054-1/+27
| | | | | | | | | | | | | | | | | | | | Setting parameterized_delivery_job on a mailer class will cause Parameterized::MessageDelivery to use the specified job instead of ActionMailer::Parameterized::DeliveryJob: class MyMailer < ApplicationMailer self.parameterized_delivery_job = MyCustomDeliveryJob ... end
* | Fix spellings for 'unmarshall(ing/ed)' & 'marshall(ing/ed)'Sharang Dashputre2018-10-021-1/+1
| |
* | Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'