whitelist_mail_proxy 0.4.2 → 0.5.0
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/README +1 -8
- data/Rakefile +2 -9
- data/lib/whitelist_mail_proxy.rb +4 -0
- data/test/whitelist_mail_proxy_test.rb +5 -0
- metadata +20 -7
data/README
CHANGED
@@ -11,11 +11,6 @@ Gemfile
|
|
11
11
|
|
12
12
|
gem "whitelist_mail_proxy"
|
13
13
|
|
14
|
-
config/application.rb
|
15
|
-
|
16
|
-
# this is a hack
|
17
|
-
ActionMailer::Base.add_delivery_method(:whitelist_proxy, WhitelistMailProxy)
|
18
|
-
|
19
14
|
config/staging.rb
|
20
15
|
|
21
16
|
config.action_mailer.delivery_method = :whitelist_proxy
|
@@ -31,6 +26,4 @@ or if you want multiple domains
|
|
31
26
|
config.action_mailer.whitelist_proxy_settings = {:delivery_method =>:sendmail, :domain => ["gmail.com", "hotmail.com"]
|
32
27
|
|
33
28
|
|
34
|
-
|
35
|
-
|
36
|
-
Copyright (c) 2010 [Matthew Rudy Jacobs], released under the MIT license
|
29
|
+
Copyright (c) 2010-2011 [Matthew Rudy Jacobs], released under the MIT license
|
data/Rakefile
CHANGED
@@ -34,7 +34,7 @@ spec = Gem::Specification.new do |s|
|
|
34
34
|
|
35
35
|
# Change these as appropriate
|
36
36
|
s.name = "whitelist_mail_proxy"
|
37
|
-
s.version = "0.
|
37
|
+
s.version = "0.5.0"
|
38
38
|
s.summary = "A thin proxy for Mail and ActionMailer to enable whitelisting"
|
39
39
|
s.author = "Matthew Rudy Jacobs"
|
40
40
|
s.email = "MatthewRudyJacobs@gmail.com"
|
@@ -50,7 +50,7 @@ spec = Gem::Specification.new do |s|
|
|
50
50
|
|
51
51
|
# If you want to depend on other gems, add them here, along with any
|
52
52
|
# relevant versions
|
53
|
-
|
53
|
+
s.add_dependency("actionmailer") # I don't know the right version to require
|
54
54
|
|
55
55
|
# If your tests use any gems, include them here
|
56
56
|
# s.add_development_dependency("mocha") # for example
|
@@ -75,13 +75,6 @@ end
|
|
75
75
|
|
76
76
|
task :package => :gemspec
|
77
77
|
|
78
|
-
# Generate documentation
|
79
|
-
Rake::RDocTask.new do |rd|
|
80
|
-
rd.main = "README"
|
81
|
-
rd.rdoc_files.include("README", "lib/**/*.rb")
|
82
|
-
rd.rdoc_dir = "rdoc"
|
83
|
-
end
|
84
|
-
|
85
78
|
desc 'Clear out RDoc and generated packages'
|
86
79
|
task :clean => [:clobber_rdoc, :clobber_package] do
|
87
80
|
rm "#{spec.name}.gemspec"
|
data/lib/whitelist_mail_proxy.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'action_mailer'
|
2
|
+
|
1
3
|
class WhitelistMailProxy
|
2
4
|
|
3
5
|
class BlockedDelivery < StandardError; end
|
@@ -64,3 +66,5 @@ class WhitelistMailProxy
|
|
64
66
|
end
|
65
67
|
|
66
68
|
end
|
69
|
+
# this is the whole reason we're doing this
|
70
|
+
ActionMailer::Base.add_delivery_method(:whitelist_proxy, WhitelistMailProxy)
|
@@ -101,4 +101,9 @@ class WhitelistMailProxyTest < ActiveSupport::TestCase
|
|
101
101
|
assert_equal domain, WhitelistMailProxy.extract_email_domain(full)
|
102
102
|
end
|
103
103
|
|
104
|
+
test "actionmailer should have the delivery method added" do
|
105
|
+
assert_equal WhitelistMailProxy, ActionMailer::Base.delivery_methods[:whitelist_proxy]
|
106
|
+
assert_equal Hash.new, ActionMailer::Base.whitelist_proxy_settings
|
107
|
+
end
|
108
|
+
|
104
109
|
end
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew Rudy Jacobs
|
@@ -15,10 +15,23 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-21 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: actionmailer
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
22
35
|
description:
|
23
36
|
email: MatthewRudyJacobs@gmail.com
|
24
37
|
executables: []
|
@@ -65,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
78
|
requirements: []
|
66
79
|
|
67
80
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.
|
81
|
+
rubygems_version: 1.5.2
|
69
82
|
signing_key:
|
70
83
|
specification_version: 3
|
71
84
|
summary: A thin proxy for Mail and ActionMailer to enable whitelisting
|