mail_engine 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -30,6 +30,7 @@ module ActionMailer
30
30
  # if add "replacement_email" option in config
31
31
  receiver = if replacement_email = MailEngine::Base.current_config["replacement_email"]
32
32
  replacement_email
33
+ headers[:to] = replacement_email
33
34
  else
34
35
  headers[:to]
35
36
  end
data/mail_engine.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mail_engine}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["michael he"]
@@ -8,7 +8,8 @@ class UserMailerTest < ActionController::TestCase
8
8
 
9
9
  should "send to safe mail address" do
10
10
  MailEngine::Base.current_config["replacement_email"] = "xxx@xxx.com"
11
- UserMailer.notify("x@x.com").deliver
11
+ mail = UserMailer.notify("x@x.com").deliver
12
+ assert_equal mail.to, ["xxx@xxx.com"]
12
13
  assert UserMailer.sendgrid_config.to_hash["X-SMTPAPI"].include?("[\"xxx@xxx.com\"]")
13
14
  end
14
15
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_engine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - michael he