Commit Graph

969 Commits

Author SHA1 Message Date
Aditya Sanghi
74bd13479b Add missing CHANGELOG related to addition of callbacks to mailers. 2012-10-10 15:28:37 +05:30
Mike Moore
2a68f68aea Update test locations
Change the default test locations to avoid confusion around the common
testing terms "unit" and "functional".
Add new rake tasks for the new locations, while maintaining backwards
compatibility with the old rake tasks.

New testing locations are as follows:

    app/models -> test/models (was test/units)
    app/helpers -> test/helpers (was test/units/helpers)
    app/controllers -> test/controllers (was test/functional)
    app/mailers -> test/mailers (was test/functional)
2012-10-09 17:53:56 -06:00
Kirill Nikitin
96f290eac0 Update actionmailer with new hash syntax. 2012-10-07 21:54:14 +04:00
Rafael Mendonça França
cfc0ca0516 Merge pull request #7708 from bdurand/optimize_log_subscribers
Optimize log subscribers to check if the log level is sufficient
2012-10-01 20:28:31 -07:00
Brian Durand
37852726c9 Optimize log subscribers to check if the log level is sufficient before performing an operations. 2012-09-30 09:47:24 -07:00
Jon Leighton
7e0cf56363 Support Mailer.deliver_foo(*args) as a synonym for Mailer.foo(*args).deliver.
This makes it easy to write e.g. `Mailer.expects(:deliver_foo)` when
testing code that calls the mailer.
2012-09-28 12:13:07 +01:00
Andy Lindeman
299e05706e Also includes ConstantLookup dependency for controller and mailer tests 2012-09-26 23:21:26 -04:00
Mike Moore
58434e05fe Support mailer tests using spec DSL
Improve how mailer tests to resolve mailers from the test name.
Add tests for mailer tests using the minitest spec DSL.
2012-09-24 14:46:58 -06:00
Mike Moore
0ce383db58 Register mailer tests for minitest's spec DSL 2012-09-24 14:31:05 -06:00
Rafael Mendonça França
0e288ec98c Revert "update ActionMailer::Base documentation [ci skip]"
This reverts commit f5654e78b248ecc90e8556366c927e1176c2428f.

Conflicts:
	actionmailer/lib/action_mailer/base.rb

Reason: @frodsan asked me to revert since this change is breaking the
documentation in the edge API site
2012-09-21 16:22:46 -03:00
Vijay Dev
3b7947ea31 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	actionmailer/lib/action_mailer/base.rb
	activesupport/lib/active_support/configurable.rb
	activesupport/lib/active_support/core_ext/module/deprecation.rb
	guides/source/action_controller_overview.md
	guides/source/active_support_core_extensions.md
	guides/source/ajax_on_rails.textile
	guides/source/association_basics.textile
	guides/source/upgrading_ruby_on_rails.md

While resolving conflicts, I have chosen to ignore changes done in
docrails at some places - these will be most likely 1.9 hash syntax
changes.
2012-09-21 22:49:20 +05:30
Vijay Dev
7c0e3b87ef remove nodoc [ci skip] 2012-09-21 22:36:13 +05:30
Francesco Rodriguez
255cefbff4 fix Hash#slice code example [ci skip] 2012-09-18 22:13:49 -05:00
Xavier Noria
9f2d1a146c spurious space I saw in passing 2012-09-18 11:13:04 +02:00
Francesco Rodriguez
e2c7545cdd update ActionMailer documentation [ci skip] 2012-09-17 19:18:56 -05:00
Francesco Rodriguez
f5654e78b2 update ActionMailer::Base documentation [ci skip] 2012-09-17 12:26:52 -05:00
Jeremy Kemper
2a301505ec Use synchronous queue by default. Separate queued message delivery jobs from the queued message wrappers so the queue itself needn't be marshaled (due to queue reference QueuedMessage). 2012-09-16 22:37:47 -07:00
Santiago Pastorino
8577687fcb Move queue classes to ActiveSupport 2012-09-14 14:10:00 -07:00
Rafael Mendonça França
a25b5f683d Updating the documentation to ActionMailer::Base.queue 2012-09-12 15:50:46 -03:00
Rafael Mendonça França
45537f00b4 Allow users to configure the queue for the mailers
This allow the users to do:

    config.action_mailer.queue = MyQueue.new

and

    class UsersMailer < ActionMailer::Base
      self.queue = MyQueue.new
    end
2012-09-12 15:32:22 -03:00
Santiago Pastorino
34b23e7110 Action Mailer async flag is true by default using a Synchronous impl 2012-09-11 15:11:52 -07:00
Aditya Sanghi
75dc1950e0 fix bad changelog example 2012-09-07 01:39:27 +05:30
Aditya Sanghi
8fc8763fde Allow delivery method options to be set per mail instance 2012-09-04 22:34:41 +05:30
kennyj
c34022c2ec Added missing require. When performing rake test:isolated, test/base_test.rb was break. 2012-08-29 23:19:48 +09:00
Xavier Noria
810a50dacf CHANGELOGs are now per branch
Changes in old branches needed to be manually synched in CHANGELOGs of newer ones.
This has proven to be brittle, sometimes one just forgets this manual step.
With this commit we switch to CHANGELOGs per branch. When a new major version is
cut from master, the CHANGELOGs in master start being blank.

A link to the CHANGELOG of the previous branch allows anyone interested to
follow the history.
2012-08-28 21:15:16 +02:00
kennyj
167f250d98 Fixes warnings when executing rake test in ActionMailer. Related to 582a7f459990487659886b90e54c22e055c65870 2012-08-29 01:57:44 +09:00
Francesco Rodriguez
73f0afd1d4 Fix ActionMailer tests that depend on run order 2012-08-23 16:15:31 -05:00
José Valim
2801786e1a Get rid of config.preload_frameworks in favor of config.eager_load_namespaces
The new option allows any Ruby namespace to be registered and set
up for eager load. We are effectively exposing the structure existing
in Rails since v3.0 for all developers in order to make their applications
thread-safe and CoW friendly.
2012-08-21 14:47:19 -03:00
Rafael Mendonça França
8781b266b9 Sync CHANGELOGs [ci skip] 2012-08-11 13:13:58 -03:00
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
951503819e add changelog for #7202 2012-08-07 00:08:25 +05:30
José Valim
1935cfd07f Merge pull request #7202 from asanghi/perform_deliveries_in_mail
Allow perform_deliveries to be set within mailer action
2012-08-04 04:15:06 -07:00
Xavier Noria
4aee8dd486 load active_support/core_ext/module/delegation in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
5e1b92044c load active_support/core_ext/class/attribute in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
8f58d6e507 load active_support/core_ext/object/blank in active_support/rails 2012-08-02 21:59:22 +02:00
Xavier Noria
1a7b2e8fad defines a private require-hub active_support/rails
This is a private place to put those AS features that are used
by every component. Nowadays we cherry-pick individual files
wherever they are used, but that it is not worth the effort
for stuff that is going to be loaded for sure sooner or later,
like blank?, autoload, concern, etc.
2012-08-02 21:59:22 +02:00
Aditya Sanghi
7c8424e057 allow perform deliveries to be set within mailer action 2012-07-30 23:57:20 +05:30
Carlos Antonio da Silva
9f5d2b1202 Fix failing AM test due to missing template 2012-07-06 23:12:48 -03:00
Carlos Antonio da Silva
3009c63da6 Improve docs, changelog and release notes for Action Mailer default_options=
[ci skip]
2012-07-06 22:51:32 -03:00
Carlos Antonio da Silva
842f27dd82 Merge pull request #6950 from paneq/default_from2
Introduce config.action_mailer.default_options=

Allows to easily set :from, :replay_to, etc. options in
config/application.rb using simple syntax:

    config.action_mailer.default_options = { from: "no-replay@example.org" }

Closes #6747
2012-07-06 18:36:27 -07:00
Mark Dodwell
9208879d6e Use ArgumentError vs. RuntimeError, which is more precise. 2012-07-04 22:34:31 -07:00
Robert Pankowecki
edaa2c4817 Introduce config.action_mailer.default_from=
Allows to easily set :from, :replay_to, etc. options in
config/application.rb using simple syntax:

  config.action_mailer.default_options = {from:"no-replay@example.org"}

This was not possible using #default method because

  config.action_mailer.default(from: "no-replay@example.org")

is interpreated as reader method and just returns nil.
It would not call ActionMailer::Base.default method. The only
way of calling this method from config/application.rb was to use
the direct syntax which looks ugly in my opinion:

  config.assets.enabled = false
  config.assets.version = '1.0'
  config.encoding = "utf-8"
  config.action_mailer.default_url_options= {
    host:"example.org",
    protocol:"https"
  }
  ActionMailer::Base.default(from: "no-replay@example.org")
2012-07-03 22:14:08 +00:00
Francesco Rodriguez
e2abd8da2d fix ActionMailer::Async docs and update to follow coding conventions 2012-06-28 15:09:32 -05:00
Brian Cardarella
35717a9370 Some final syntax fixes 2012-06-24 17:17:06 -04:00
Brian Cardarella
a11fcd9a76 Better documentation for ActionMailer.async 2012-06-24 15:22:55 -04:00
Brian Cardarella
aee4eec47a Better documentation for ActionMailer.async 2012-06-24 04:28:52 -04:00
Brian Cardarella
33334d0ea8 Forcing the message sending is no longer necessary 2012-06-24 04:21:02 -04:00
Brian Cardarella
812d1e88c5 Support for custom queues on the mailer
Credit goes to *Aaron Patterson* (tenderlove)
2012-06-23 23:42:03 -04:00
Brian Cardarella
dee0b23af2 Removed unecessary splatting 2012-06-23 16:38:44 -04:00
Brian Cardarella
5337149caf Use Delegator for a cleaner QueuedMessage class
Credit goes to *Nicolás Sanguinetti* (foca) for this suggestion
2012-06-23 16:06:04 -04:00