catch_all 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9ecfda75b7a73bcb32ada1f5e876e4e03e23a93
4
- data.tar.gz: facd9a247bbc4416f5ad83df7442439f5174dfbe
3
+ metadata.gz: 9afcb9bf05b4d907384612e7b5e5390e89b6a14b
4
+ data.tar.gz: 1d569aa7b74f2eeb28d9afdc0b69b4fc3f75d5ed
5
5
  SHA512:
6
- metadata.gz: 0d8821cf46adab5a2b268cdf5bcca4c3bec692ea04a3096fa4a96e857ea65280f6a6ad521fdcedd38b1831198ab10d8d10ea368013911935cef7402bab0c792b
7
- data.tar.gz: 11afad6bec26b7c9c70ce4c6730a4fe1da9855c16ed0491ab4c772480299d54eabf8250b370a67d95c7fb3cfbde23c65f49360a5f707f49ed7ba4f30737d7616
6
+ metadata.gz: 760e1a64b1685b0c1c786e932e1f4b903d6e9c3c8620ece3bcf79366fab9fcc20d9857d227a65166bbada2311ceb65446297183ee84497950b0cab01ff04f078
7
+ data.tar.gz: fc0013f7868750cf0461f46c70b3171f4b32ebbf4cccd9f880a9e2b99090a7db2262efdeff6a025d74a2aee101f367cf5e058bffded54dfaf6417a7344de5ea4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catch_all (0.0.2)
4
+ catch_all (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/catch_all.rb CHANGED
@@ -37,6 +37,8 @@ module ActionMailer
37
37
  field.value
38
38
  end
39
39
 
40
+ to_values.flatten!
41
+
40
42
  # save the original to header
41
43
  mailer['X-Action-Mailer-Staging-Original-Email-To'] = to_values.inspect
42
44
 
@@ -1,5 +1,5 @@
1
1
  module ActionMailer
2
2
  module CatchAll
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
@@ -130,4 +130,10 @@ describe ActionMailer::CatchAll do
130
130
  mailer = Notifier.notify
131
131
  mailer.to.should == ["fallback@example.com"]
132
132
  end
133
+
134
+ it "should work with a whitelist and a list" do
135
+ ActionMailer::CatchAll.enable(whitelist: [/\@learnup.me$/], fallback: "example@example.com")
136
+ mailer = Notifier.notify_multiple
137
+ mailer.to.should == ["scott@learnup.me", "kenny@learnup.me"]
138
+ end
133
139
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catch_all
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-12 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Define a white-list only set of emails for ActionMailer
14
14
  email: