actionmailer-maildir 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +10 -0
  2. data/WTFPL +13 -0
  3. data/lib/actionmailer-maildir.rb +32 -0
  4. metadata +102 -0
@@ -0,0 +1,10 @@
1
+ actionmailer-maildir
2
+ ====================
3
+
4
+ An additional delivery method for ActionMailer using the maildir gem. This gem does not do much and there is not much to describe.
5
+
6
+ How to
7
+ ------
8
+
9
+ ActionMailer::Base.delivery_method = :maildir.
10
+ ActionMailer::Base.maildir_settings = {:path => '/my/mail/dir'}
data/WTFPL ADDED
@@ -0,0 +1,13 @@
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2011 Alexander Flatter <aflatter@farbenmeer.net>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
@@ -0,0 +1,32 @@
1
+ require 'maildir'
2
+ require 'maildir/serializer/mail'
3
+
4
+ module ActionMailer
5
+
6
+ module DeliveryMethods
7
+
8
+ class Maildir
9
+ attr_accessor :path
10
+ attr_accessor :settings
11
+
12
+ def initialize(settings = {})
13
+ self.settings = settings
14
+ @maildir = ::Maildir.new(settings[:path])
15
+ @maildir.serializer = ::Maildir::Serializer::Mail.new
16
+ end
17
+
18
+ def deliver!(mail)
19
+ @maildir.add(mail) # writes an RFC2822 message to disk
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+
26
+ end
27
+
28
+ ActionMailer::Base.class_eval do
29
+ cattr_accessor :maildir_settings
30
+ self.maildir_settings = {}
31
+ add_delivery_method :maildir, ActionMailer::DeliveryMethods::Maildir, {}
32
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: actionmailer-maildir
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Alexander Flatter
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-05-08 00:00:00 +02:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: actionmailer
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: 3.0.0
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: maildir
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: rspec
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: fakefs
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ description: Uses the maildir gem to store ActionMailer deliveries.
61
+ email:
62
+ - aflatter@farbenmeer.net
63
+ executables: []
64
+
65
+ extensions: []
66
+
67
+ extra_rdoc_files: []
68
+
69
+ files:
70
+ - lib/actionmailer-maildir.rb
71
+ - WTFPL
72
+ - README.md
73
+ has_rdoc: true
74
+ homepage: http://github.com/aflatter/actionmailer-maildir
75
+ licenses: []
76
+
77
+ post_install_message:
78
+ rdoc_options: []
79
+
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: "0"
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 1.3.6
94
+ requirements: []
95
+
96
+ rubyforge_project:
97
+ rubygems_version: 1.5.0
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: A maildir delivery method for ActionMailer
101
+ test_files: []
102
+