Commit Graph

30 Commits

Author SHA1 Message Date
Andy
0398459e9a Change sendmail default options to match Mail 2.8.x arguments format.
The Mail gem changed format of the delivery method arguments for
sendmail from a string to an array of strings in this commit
7e1196bd29

As the settings are now a sendmail delivery method produces the
following error:
```
.../mail-2.8.0/lib/mail/network/delivery_methods/sendmail.rb:53:in `initialize': :arguments expected to be an Array of individual string args (ArgumentError)
```

This also updates the mail dependency since the new default won't work
with the older versions.
2022-12-06 20:41:09 -05:00
Kir Shatrov
82df8c2ca5 Use frozen string literal in actionmailer/ 2017-07-23 18:17:19 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
b91ff557ef applies new string literal convention in actionmailer/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:03:39 +02:00
arktisklada
23e4c968d2 Sendmail default arguments match Mail::SendMail
Removes `-t`
2016-04-05 14:11:37 -05:00
Yves Senn
a80fb6f9b3 tests, define Rails.root before loading Action Mailer.
Since `bin/test` would define `Rails.root` before loading AM but `bundle
exec rake` would define it after loading AM, this lead to the following
test failure when using `bin/test`:

```
--- expected
+++ actual
@@ -1 +1 @@
-{:location=>"/var/folders/_r/9kh50y4j0vn7zgg2p65z1lcm0000gn/T/mails"}
+{:location=>"/Users/senny/Projects/rails/actionmailer/tmp/mails"}
```

This patch ensures that `Rails.root` is defined when loading AM to
achieve consistent test results.
2015-11-04 16:35:31 -05:00
Ronak Jangir
ecc9473622 Added assertion for error messages for nil and unknown delivery methods
As `deliver_now` `RuntimeError` for both nil & unknown delivery method so it’s good to have assertion for error messages
2015-09-22 19:11:03 +05:30
Ronak Jangir
c48257b0af Removed mocha from ActionMailer 2015-08-20 11:27:49 +05:30
Ankit Gupta
0e6a67644a not needed require's
- as core_ext is not used and test pass locally
- mail is already required in abstract_unit
2015-05-10 08:42:30 -04:00
Cristian Bica
f4ee114746 Deprecated .deliver / .deliver! to .deliver_now / .deliver_now! 2014-08-20 17:48:34 +03:00
Dmitry Polushkin
99f8d4feeb add test coverage for the action mailer 2014-07-04 15:55:33 +01:00
Zuhao Wan
5330b894e5 Move state restoration from setup/teardown into affected test cases. 2014-05-13 16:28:39 +08:00
Dmitry Polushkin
5af7cab02d add actionmailer test coverage for undefined delivery method 2014-02-09 18:41:41 +00:00
Akira Matsuda
0c93a48904 Don't mutate the Base settings by merge!ing the given value 2013-09-10 18:10:48 +02:00
Vijay Dev
ec8ef1e105 Revert "Merge branch 'master' of github.com:rails/docrails"
This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing
changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9.

Seems to be a code merge done by mistake.
2013-08-17 21:46:39 +05:30
Akira Matsuda
64202abc3d Don't mutate the Base settings by merge!ing the given value 2013-07-26 04:04:51 +09:00
Kirill Nikitin
96f290eac0 Update actionmailer with new hash syntax. 2012-10-07 21:54:14 +04:00
Aditya Sanghi
8fc8763fde Allow delivery method options to be set per mail instance 2012-09-04 22:34:41 +05:30
José Valim
485e655082 Revert "Merge pull request #7202 from asanghi/perform_deliveries_in_mail"
Reverting because it feels backward to specify a delivery to not
be performed while the e-mail is being composed. It is simpler (and
makes more sense) to delegate the responsibility to the calling code.
2012-08-07 14:00:54 -03:00
Aditya Sanghi
7c8424e057 allow perform deliveries to be set within mailer action 2012-07-30 23:57:20 +05:30
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Jeremy Kemper
e5ab4b0d07 Convert to class_attribute 2010-02-01 02:02:42 -08:00
José Valim and Mikel Lindsaar
ace74974cf Got AM working with Mail yield on delivery_handler and updated tests 2010-01-25 21:47:03 +11:00
José Valim and Mikel Lindsaar
e4a989e9d9 Added delivery_handler method to mail and implemented in ActionMailer to deliver inside of instrumentation 2010-01-25 13:39:48 +11:00
José Valim and Mikel Lindsaar
a74a655648 Add tests to mail helper. 2010-01-24 19:52:50 +01:00
José Valim and Mikel Lindsaar
bd96614101 Move old tests to a specific folder and add some delivery method tests. 2010-01-24 19:36:42 +01:00
José Valim and Mikel Lindsaar
0d931fecbb Finish cleaning up delivery methods implementation. 2010-01-24 18:11:57 +01:00