delayed_mailer 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
- data/README +56 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/delayed_mailer.gemspec +9 -3
- metadata +9 -6
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 Anderson Dias
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
DelayedJobMailer
|
2
|
+
==============
|
3
|
+
|
4
|
+
This plugin provides a module which - when included into an ActionMailer subclass - pushes all emails that would
|
5
|
+
normally be delivered synchronously into a queue for asynchronous processing. For queuing it relies on the delayed_job
|
6
|
+
plugin ( http://github.com/tobi/delayed_job ).
|
7
|
+
|
8
|
+
How it works
|
9
|
+
============
|
10
|
+
|
11
|
+
The plugin provides a module Delayed::Mailer. To make a mailer use a queue simply include it into the class like this:
|
12
|
+
|
13
|
+
class MyMailer < ActionMailer::Base
|
14
|
+
include Delayed::Mailer
|
15
|
+
end
|
16
|
+
|
17
|
+
From now on all MyMailer.deliver_whatever_email calls create an entry delayed_job queue.
|
18
|
+
If you still want to deliver mail sycnhronously add a bang to the method call: MyMailer.deliver_whatever_email!
|
19
|
+
|
20
|
+
To set asynchronous mailing as project default, you need to create an initializer file as follows:
|
21
|
+
|
22
|
+
# config/initializers/delayed_mailer.rb
|
23
|
+
class ActionMailer::Base
|
24
|
+
include Delayed::Mailer
|
25
|
+
end
|
26
|
+
|
27
|
+
Installation
|
28
|
+
============
|
29
|
+
|
30
|
+
script/plugin install git://github.com/andersondias/delayed_job_mailer.git
|
31
|
+
|
32
|
+
Configuration
|
33
|
+
=============
|
34
|
+
|
35
|
+
Delayed e-mails is an awesome thing in production environments, but for e-mail specs/tests in testing environments it can be a mess causing specs/tests to fail because the e-mail haven't been sent directly. Therefore you can configure what environments that should be excluded like so:
|
36
|
+
|
37
|
+
# config/initializers/delayed_mailer.rb
|
38
|
+
|
39
|
+
Delayed::Mailer.excluded_environments = [:test, :cucumber] # etc.
|
40
|
+
|
41
|
+
...
|
42
|
+
|
43
|
+
Credits
|
44
|
+
=======
|
45
|
+
|
46
|
+
This plugin is a delayed job plugin based on langalex workling_mailer
|
47
|
+
plugin that can be found at http://github.com/langalex/workling_mailer
|
48
|
+
|
49
|
+
Contact
|
50
|
+
=======
|
51
|
+
|
52
|
+
Copyright (c) 2009 Anderson Dias, released under the MIT license
|
53
|
+
|
54
|
+
Email: andersondaraujo[at]gmail.com
|
55
|
+
Twitter: extendsmymind
|
56
|
+
Blog: http://extendsmymind.wordpress.com
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
Jeweler::Tasks.new do |gem|
|
9
9
|
gem.name = "delayed_mailer"
|
10
10
|
gem.summary = %Q{Send emails asynchronously using delayed_job.}
|
11
|
-
gem.description = %Q{
|
11
|
+
gem.description = %Q{Change the behavior of ActionMailer::Base in Rails to allways use delayed_job's send_later method.}
|
12
12
|
gem.email = "andersondaraujo@gmail.com"
|
13
13
|
gem.homepage = "http://github.com/danielvlopes/delayed_mailer"
|
14
14
|
gem.authors = ["Anderson Araújo"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/delayed_mailer.gemspec
CHANGED
@@ -5,16 +5,22 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{delayed_mailer}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Anderson Ara\303\272jo"]
|
12
|
-
s.date = %q{2010-03-
|
13
|
-
s.description = %q{
|
12
|
+
s.date = %q{2010-03-06}
|
13
|
+
s.description = %q{Change the behavior of ActionMailer::Base in Rails to allways use delayed_job's send_later method.}
|
14
14
|
s.email = %q{andersondaraujo@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README"
|
18
|
+
]
|
15
19
|
s.files = [
|
16
20
|
".document",
|
17
21
|
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README",
|
18
24
|
"Rakefile",
|
19
25
|
"VERSION",
|
20
26
|
"delayed_mailer.gemspec",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Anderson Ara\xC3\xBAjo"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-06 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -31,17 +31,20 @@ dependencies:
|
|
31
31
|
version: 1.3.0
|
32
32
|
type: :development
|
33
33
|
version_requirements: *id001
|
34
|
-
description:
|
34
|
+
description: Change the behavior of ActionMailer::Base in Rails to allways use delayed_job's send_later method.
|
35
35
|
email: andersondaraujo@gmail.com
|
36
36
|
executables: []
|
37
37
|
|
38
38
|
extensions: []
|
39
39
|
|
40
|
-
extra_rdoc_files:
|
41
|
-
|
40
|
+
extra_rdoc_files:
|
41
|
+
- LICENSE
|
42
|
+
- README
|
42
43
|
files:
|
43
44
|
- .document
|
44
45
|
- .gitignore
|
46
|
+
- LICENSE
|
47
|
+
- README
|
45
48
|
- Rakefile
|
46
49
|
- VERSION
|
47
50
|
- delayed_mailer.gemspec
|