aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
Commit message (Collapse)AuthorAgeFilesLines
...
| * | This patch removes deprecated catch-all routes from AMAaron Patterson2018-09-241-17/+7
| | | | | | | | | | | | It also removes a monkey patch from AM::Base
* | | Merge pull request #33949 from sjain1107/no-private-defKasper Timm Hansen2018-09-231-8/+10
|\ \ \ | | | | | | | | Remove private def
| * | | Remove private defSakshi Jain2018-09-231-8/+10
| |/ /
* / / Enable `Performance/UnfreezeString` copyuuji.yaginuma2018-09-231-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" end Benchmark.ips do |x| x.report('+@') { +"" } x.report('dup') { "".dup } x.compare! end ``` ``` $ ruby -v benchmark.rb ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] Warming up -------------------------------------- +@ 282.289k i/100ms dup 187.638k i/100ms Calculating ------------------------------------- +@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s Comparison: +@: 6775299.3 i/s dup: 3320400.7 i/s - 2.04x slower ```
* | Add changelog entries for #33849 [ci skip]bogdanvlviv2018-09-131-0/+4
| | | | | | | | | | | | | | Since these changes related to the public API, I think we should add changelog entries. Related to #33838, #33849
* | Include test helpers when ActionDispatch::IntegrationTest is loadedRicardo Díaz2018-09-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | As @dhh brings up, the point of `ActionDispatch::IntegrationTest` is to allow users to test the integration of all the pieces called by a controller. Asserting about the emails and jobs queued is part of that task. This commit includes the `ActionMailer::TestHelper` and `ActiveJob::TestHelper` modules when the ActionMailer and ActiveJob railties are initialized respectively.
* | Add `perform_deliveries` to a payload of `deliver.action_mailer` notification.Yoshiyuki Kinjo2018-09-094-15/+27
| |
* | Skip delivery notification when perform_deliveries is false.Yoshiyuki Kinjo2018-09-084-0/+21
| |
* | Fix the obvious typos detected by github.com/client9/misspellKazuhiro Sera2018-08-081-1/+1
| |
* | Turn on performance based copsDillon Welch2018-07-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use attr_reader/attr_writer instead of methods method is 12% slower Use flat_map over map.flatten(1) flatten is 66% slower Use hash[]= instead of hash.merge! with single arguments merge! is 166% slower See https://github.com/rails/rails/pull/32337 for more conversation
* | Fix docs of `assert_no_emails` [ci skip]bogdanvlviv2018-06-291-1/+1
| | | | | | | | `assert_no_emails` is shortcut for `assert_emails 0, &block`.
* | Allow call `assert_enqueued_with` and `assert_enqueued_email_with` with no blockbogdanvlviv2018-06-292-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example of `assert_enqueued_with` with no block ```ruby def test_assert_enqueued_with MyJob.perform_later(1,2,3) assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low') MyJob.set(wait_until: Date.tomorrow.noon).perform_later assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon) end ``` Example of `assert_enqueued_email_with` with no block: ```ruby def test_email ContactMailer.welcome.deliver_later assert_enqueued_email_with ContactMailer, :welcome end def test_email_with_arguments ContactMailer.welcome("Hello", "Goodbye").deliver_later assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] end ``` Related to #33243
* | ActionMailer::Base can unregister observer(s) and interceptor(s). (#32207)Kota Miyake2018-05-304-19/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ActionMailer::Base can unregister observer(s) and interceptor(s). One or multiple mail observers can be unregistered using `ActionMailer::Base.unregister_observers` or `ActionMailer::Base.unregister_observer`. One or multiple mail interceptors can be unregistered using `ActionMailer::Base.unregister_interceptors` or `ActionMailer::Base.unregister_interceptor`. For preview interceptors, it's possible to use `ActionMailer::Base.unregister_preview_interceptors` or `ActionMailer::Base.unregister_preview_interceptor`. * Ensure to be reset registered observer(s) and interceptor(s) * Add explanation to CHANGELOG * Add original author's name [Kota Miyake + Rafael Mendonça França + Claudio Ortolina]
* | Eager autoload mail gem when eager load is true (#32808)Samuel Cochran2018-05-232-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Eager autoload mail gem when eager load is true We had a production issue where our Sidekiq worker threads all became deadlocked while autoloading a file within the mail gem, required via ActionMailer, despite setting our Rails applicaiton to eager load. `Mail.eager_autoload!` exists and works great, ActionMailer just doesn't call it during eager loading. Adding it to the ActionMailer Railtie's eager_load_namespaces takes care of calling `Mail.eager_autoload!` during the `eager_load!` initializer. * 'Mail' isn't defined yet, use before_eager_load instead * Make sure mail is loaded * Move eager load of Mail into ActionMailer.eager_load! [Samuel Cochran + Rafael Mendonça França]
* | Strip duplicated suffixes more strictlyRyuta Kamizono2018-04-221-1/+1
| | | | | | | | In the previous code incorrectly removes intermediate words.
* | Replace `assert !` with `assert_not`Daniel Colson2018-04-191-4/+4
| | | | | | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
* | Merge pull request #32427 from tjschuck/small_doc_fixesRyuta Kamizono2018-04-031-1/+1
|\ \ | | | | | | | | | | | | Small doc fixes [ci skip]
| * | Small doc fixesT.J. Schuck2018-04-021-1/+1
| | | | | | | | | | | | [ci skip]
* | | Doc fix added missing quoteMichael H2018-04-021-1/+1
|/ /
* | Partly revert #32231bogdanvlviv2018-03-141-4/+2
| | | | | | | | | | | | | | - Remove extra execution of `perform_enqueued_jobs` since it performs all enqueued jobs in the duration of the block. - Fix example of using `assert_emails` without block since we can't use enqueued jobs in this case.
* | Merge pull request #32231 from gmcgibbon/perform_email_jobs_in_assert_emailsRafael Mendonça França2018-03-133-6/+32
|\ \ | | | | | | | | | Perform email jobs in #assert_emails
| * | Perform email jobs in #assert_emailsGannon McGibbon2018-03-122-5/+29
|/ / | | | | | | Perform enqueued delivery jobs in #assert_emails and #assert_no_emails.
* | Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-172-1/+6
| | | | | | | | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* | Remove support to Ruby 2.2Rafael Mendonça França2018-02-161-1/+1
| | | | | | | | Rails 6 will only support Ruby >= 2.3.
* | Start Rails 6.0 development!!!Rafael Mendonça França2018-01-302-34/+4
| | | | | | | | :tada::tada::tada:
* | Use assert_empty and assert_not_emptyDaniel Colson2018-01-251-1/+1
| |
* | Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-2/+2
| |
* | Use respond_to test helpersDaniel Colson2018-01-251-2/+2
| |
* | Merge pull request #30391 from jbourassa/fix-actionmailer-lambda-defaultRyuta Kamizono2018-01-244-2/+34
|\ \ | | | | | | | | | Fix actionmailer lambda default
| * | Fix AM::Base.default proc arity breaking changeJimmy Bourassa2017-08-294-2/+33
| | | | | | | | | | | | | | | | | | | | | PR #29270 changed the number of arguments that gets passed to Procs defined in ActionMail::Base.default. With this changeset, Procs can now have 1 or 0 arguments Also adds test coverage for AM::Base.default Proc arity.
* | | Fix typos, update documentationJames Lovejoy2018-01-111-1/+1
| | | | | | | | | | | | [ci skip]
* | | Move the options for deliver_later up near to the example [ci skip]Prathamesh Sonpatki2018-01-041-12/+12
| | | | | | | | | | | | | | | | | | - And move the Active Job related section down. Otherwise it was appearing as if the options are available for the `delivery_job` setting.
* | | Bump license years for 2018Yoshiyuki Hirano2017-12-312-2/+2
| | |
* | | Enable `Layout/SpaceBeforeComma` rubocop rule, and fixed moreRyuta Kamizono2017-12-122-2/+2
| | | | | | | | | | | | Follow up of #31390.
* | | Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-282-1/+6
| | |
* | | Fix typos and add a few suggestionsFatos Morina2017-11-281-2/+2
| | |
* | | Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-272-1/+3
| | |
* | | Sort mailer previewsDwight Watson2017-11-141-1/+1
| | |
* | | Use .tt extension to all the template filesRafael Mendonça França2017-11-132-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Make clear that the files are not to be run for interpreters. Fixes #23847. Fixes #30690. Closes #23878.
* | | Fix tests on Mail 2.7Jeremy Daer2017-10-312-17/+16
| | | | | | | | | | | | | | | Reverts 4d96be1c27bd6faed957b197a461f18543acebf2 References #31026
* | | Merge pull request #31004 from shuheiktgw/remove_unnecessary_returnsRafael França2017-10-311-1/+1
|\ \ \ | | | | | | | | Remove redundant return statements
| * | | removed unnecessary returnsShuhei Kitagawa2017-10-281-1/+1
| | | |
* | | | removed unnecessary semicolonsShuhei Kitagawa2017-10-281-6/+6
|/ / /
* | | [Action Mailer] require_relative => requireAkira Matsuda2017-10-212-4/+4
| | | | | | | | | | | | This basically reverts cd9cc721ab54e2b0c7875cacf2113f03908a8bb7
* | | Cleanup CHANGELOGs [ci skip]Ryuta Kamizono2017-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing credit * Add backticks * Fix indentation * Remove trailing spaces And some minor tweaks.
* | | Add assert_enqueued_email_with to ActionMailer::TestHelperMikkel Malmberg2017-09-273-0/+92
| | |
* | | Update Action Mailer doc [ci skip]Yoshiyuki Hirano2017-08-303-8/+8
|/ /
* | Use tt in doc for action_mailer [ci skip]Yoshiyuki Hirano2017-08-261-1/+1
| |
* | Merge pull request #30213 from ckundo/ccundiff-alt-text-defaultRafael Mendonça França2017-08-233-5/+5
|\ \ | | | | | | | | | Do not generate default alt text for images
| * | Do not generate default alt text in image tagsCameron Cundiff2017-08-173-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Auto-generating content from the filename of an image is not suitable alternative text; alt text that isn't fully considered can be distracting and fatiguing for screen readers users (blind, low vision, dyslexic people). - Setting a filename fallback short circuits screen reader default behavior and configuration for blank descriptions. - Setting poor defaults also creates false negatives for accessibility linting and testing software, that makes it harder to improve application accessibility. *** - After this change, if authors leave images without alt text, screen readers will fallback to default behavior for missing alt text. - Also with this change, Automated linting and testing tools will correctly generate warnings. [Fixes #30096]