Commit Graph

1353 Commits

Author SHA1 Message Date
eileencodes
099ddfdefd Add CHANGELOG headers for Rails 5.0.0.beta1 2015-12-18 15:58:25 -05:00
eileencodes
7eae0bb88e Change alpha to beta1 to prep for release of Rails 5
🎉 🍻
2015-12-18 12:14:09 -05:00
David Heinemeier Hansson
83e3a17d32 Same gemspec formats everywhere 2015-12-18 13:20:49 +01:00
David Heinemeier Hansson
293d35e256 ApplicationMailer should be generated by default just like every other Application* parent 2015-12-17 17:35:20 -02:00
Akshay Vishnoi
ccb6b2e87f [ci skip] Fix grammar and sentence framing 2015-12-17 12:23:33 +05:30
Elektron1c97
6bd417df50 [ci skip] Add a dollar sign to each command in the READMEs
According to pr #22443 in the guides there's always a dollar sign before every command, so why is in the main README a `$` and in every submodule a `%`?

Just eye candy..
2015-12-06 19:18:52 +01:00
Ryan Buckley
50593cc205 Make ActionMailer::Base.respond_to_missing? private 2015-12-03 10:34:39 -10:00
Ryan Buckley
e899dfac47 Replace ActionMailer::Base#respond_to? with respond_to_missing? 2015-12-02 22:36:36 -10:00
Rafael Mendonça França
7b122d3988 Move all nodoc methods to the private section
Since they are nodoc there is no need to be protected.
2015-11-24 00:52:22 -02:00
Rafael Mendonça França
53d316c269 Put all private method together 2015-11-24 00:45:52 -02:00
Rafael Mendonça França
782edbd28f Avoid mutating the headers hash
We are already filtering the keys in the assign_headers_to_message
method so we can just update the filter.
2015-11-24 00:43:25 -02:00
Rafael Mendonça França
c6368db90f nodoc in the private method 2015-11-24 00:43:14 -02:00
Rafael Mendonça França
63ea79e586 Merge pull request #22120 from hnatt/refactor-actionmailer
Refactor ActionMailer::Base
2015-11-24 00:38:30 -02:00
Sean Griffin
3faf748562 Revert "Merge pull request #18446 from cloud8421/actionmailer-unregister-interceptor"
This reverts commit 65a61ab7c370d2894c11ce276725f723a5c9c111, reversing
changes made to 14314ca18302f18c3d8bb7a63e9f71ac4c2290c2.

This PR broke the build
2015-11-23 15:01:24 -07:00
Sean Griffin
65a61ab7c3 Merge pull request #18446 from cloud8421/actionmailer-unregister-interceptor
ActionMailer::Base can unregister interceptor(s).
2015-11-23 14:29:56 -07:00
Kasper Timm Hansen
f21743b5bc Merge pull request #22077 from obduk/clean-up-logs
Remove newlines from start of logs
2015-11-19 12:23:25 +01: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
Vijay Dev
b217354dbb Merge branch 'master' of github.com:rails/docrails 2015-10-31 17:01:41 +00:00
Aaron Patterson
e76c38ef10 split process from mailer instantiation
this allows us to construct mailer objects without possibly disastrous
side-effects.
2015-10-30 14:53:19 -07:00
hnatt
1be276beb4 Rename ActionMailer::Base#class_from_value -> observer_class_for 2015-10-30 10:45:35 +02:00
hnatt
baaf3769ff Don't mutate headers in ActionMailer::Base#collect_responses_from_templates 2015-10-30 10:41:58 +02:00
hnatt
2a55a6d2e5 Pass message as argument to ActionMailer::Base#assign_headers_to_message 2015-10-30 08:56:00 +02:00
hnatt
c26abb8691 Fix indentation in ActionMailer::Base#collect_responses_from_templates 2015-10-29 22:01:16 +02:00
hnatt
4b65e5058e Refactor out headers to message assignment from ActionMailer::Base#mail 2015-10-29 21:58:27 +02:00
hnatt
79b6a4bbc4 Use attr_internal in ActionMailer::Base#mail instead of local var for message 2015-10-29 21:55:14 +02:00
hnatt
04f1ce7950 Refactor out defaults handling from ActionMailer::Base#mail 2015-10-29 21:52:04 +02:00
hnatt
8c566b9a94 Refactor ActionMailer::Base#collect_responses 2015-10-29 21:28:22 +02:00
hnatt
e71cfc109d Reduce code duplication in ActionMailer::Base#register_observer and #register_interceptor 2015-10-29 21:20:08 +02:00
Owen Davies
5e4f82a5f3 Remove newlines from start of logs
Currently if using a single line logger, this causes the time stamp and
log message to be on separate lines which is not common to how most
other logging works.
2015-10-26 14:58:18 +00:00
yui-knk
1099329be0 Delete needless require 'active_support/deprecation'
When `require 'active_support/rails'`, 'active_support/deprecation'
is automatically loaded.
2015-10-20 20:02:59 +09:00
Arthur Nogueira Neves
9674703671 Merge pull request #17388 from akampjes/master
ActionMailer https on URL with force_ssl = true
2015-10-12 14:26:11 -04:00
Ronak Jangir
495722a956 Fixed wording in Assertion docs, changed ‘Assert’ -> ‘Asserts’ 2015-10-07 21:07:46 +05:30
Sean Griffin
411ed20865 Merge pull request #21865 from Gaurav2728/test_cases_protected_method_nodoc
action mailer test cases protected method can be `# :nodoc:` [ci skip]
2015-10-04 17:23:47 -06:00
Vijay Dev
7976b6d306 Merge branch 'master' of github.com:rails/docrails 2015-10-04 12:33:14 +00:00
Gaurav Sharma
64e316edd3 action mailer test cases protected method can be # :nodoc: 2015-10-04 13:30:00 +05:30
amitkumarsuroliya
367e8cf763 Add missing punctuation mark to all ActionMailer docs [ci skip] 2015-09-28 21:17:44 +05:30
amitkumarsuroliya
6474c53dcb Add a missing period to ActionMailer Base docs [ci skip] 2015-09-28 18:15:15 +05:30
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
yuuji.yaginuma
09e3aa62dc change test method name to the appropriate name 2015-09-19 17:33:14 +09:00
Ronak Jangir
fef6c11d2a Added test for any if called without specifying any format
Example
````ruby
mail(hash) do |format|
  format.any
end
````
2015-09-18 22:56:42 +05:30
Isaac Betesh
efadc69daa When used by ActionMailer, ActionView should automatically use the correct MIME type just as it does when used by ActionDispatch #11157 2015-09-09 08:44:37 -04:00
Ronak Jangir
8d7bf97798 Removed duplicate requiring minitest/mock as it is already required in method_call_assertions 2015-08-26 19:43:54 +05:30
Ronak Jangir
c48257b0af Removed mocha from ActionMailer 2015-08-20 11:27:49 +05:30
Andrew Kampjes
f0a3af209f ActionMailer https on URL with force_ssl = true
`config.force_ssl = true` will set
config.action_mailer.default_url_options = { protocol: 'https' }

If you have turned on force_ssl, and then gone to the effort of setting
config.action_mailer.default_url_options = {host: 'example.com'} then
you are probably pointing people back to your current app and want
https on that too.
2015-08-14 08:05:11 +12:00
mlbileschi
738be4457b fix comment about which mail headers are excluded 2015-08-11 16:30:47 -04:00
yui-knk
6149444685 Make silence a warning inserted by commit #4b3f8ac 2015-07-30 00:42:19 +09:00
Kasper Timm Hansen
062cbd18dd Revert "Merge pull request #20758 from xijo/action_mailer_message_delivery_respects_i18n_locale"
This reverts commit f2a8c23654d69dd8f294971487b5abf0e5d891c3, reversing
changes made to 3046c9bbe154aa717a5147091be8b495ed8969c4.
2015-07-07 22:11:20 +02:00
Johannes Opper
ca2387eb01 ActionMailer::MessageDelivery respects current I18n.locale
When #deliver_now is called all translations within the
generated email will be looked up for the current I18n
locale.

    I18n.locale = ‘de’
    mail.deliver_now # Generates german email, correct

In #enqueue_delivery the locale was not considered and
the resulting job uses the default locale.

    I18n.locale = ‘de’
    mail.deliver_later # Generate english email, incorrect

In order to achieve a consistent behaviour the current locale
is now always passed to `ActionMailer::DeliveryJob`.
2015-07-05 20:21:25 +02:00
Yves Senn
9946788775 select the AR adapter through bin/test. 2015-06-11 14:24:56 +02:00
Yves Senn
54d84cbb77 use our runner (bin/test) for framework components.
This adds a script `bin/test` to most Rails framework components. The
script uses the rails minitest plugin to augment the runner.
See https://github.com/rails/rails/pull/19571 for details about the
plugin.

I did not yet add `bin/test` for activerecord, activejob and railties.
These components rely on specific setup performed in the rake-tasks.
2015-06-11 14:12:15 +02:00