mail_gate 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mail_gate/filter.rb +1 -1
- data/lib/mail_gate/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- data/test/unit/mail_gate/filter_test.rb +1 -1
- metadata +5 -5
data/lib/mail_gate/filter.rb
CHANGED
@@ -26,7 +26,7 @@ module MailGate
|
|
26
26
|
|
27
27
|
def initialize(settings = {})
|
28
28
|
self.settings = settings
|
29
|
-
@whitelist = Regexp.new(settings.
|
29
|
+
@whitelist = Regexp.new(settings.fetch(:whitelist, /.*/))
|
30
30
|
delivery_method = settings.fetch(:delivery_method, :test)
|
31
31
|
delivery_settings = settings.fetch(:delivery_settings, {})
|
32
32
|
@delivery_method = Mail::Configuration.instance.lookup_delivery_method(delivery_method).new(delivery_settings)
|
data/lib/mail_gate/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -28,7 +28,7 @@ class Test::Unit::TestCase
|
|
28
28
|
# Returns instance of Mail::Message.
|
29
29
|
def with_whitelist(options={})
|
30
30
|
filter = MailGate::Filter.new \
|
31
|
-
:whitelist => options.
|
31
|
+
:whitelist => options.fetch(:whitelist, /.*/),
|
32
32
|
:subject_prefix => options.delete(:subject_prefix),
|
33
33
|
:append_emails => options.delete(:append_emails)
|
34
34
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail_gate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|
16
|
-
requirement: &
|
16
|
+
requirement: &70211421077700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70211421077700
|
25
25
|
description: MailGate is an additional delivery method for the Mail gem that lets
|
26
26
|
you restrict the delivery of mail to only whitelisted emails.
|
27
27
|
email:
|
@@ -57,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
segments:
|
59
59
|
- 0
|
60
|
-
hash:
|
60
|
+
hash: 3389828814842690469
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
segments:
|
68
68
|
- 0
|
69
|
-
hash:
|
69
|
+
hash: 3389828814842690469
|
70
70
|
requirements: []
|
71
71
|
rubyforge_project:
|
72
72
|
rubygems_version: 1.8.17
|