trym-mail_bouncer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('mail_bouncer', '0.1.0') do |p|
5
+ Echoe.new('mail_bouncer', '0.1.1') do |p|
6
6
  p.description = "Catch outgoing emails and bounce them to a specified recipient while keeping headers intact."
7
7
  p.url = "http://github.com/trym/mail-bouncer"
8
8
  p.author = "Trym Skaar"
data/lib/mail_bouncer.rb CHANGED
@@ -11,9 +11,11 @@ end
11
11
  module TMail
12
12
  class Mail
13
13
  def destinations_with_bouncer(default = nil)
14
- MailBouncer.enabled ?
15
- MailBouncer.recipients :
16
- destinations_without_bouncer(default)
14
+ if MailBouncer.enabled and !MailBouncer.recipients.blank?
15
+ MailBouncer.recipients
16
+ else
17
+ destinations_without_bouncer(default)
18
+ end
17
19
  end
18
20
  alias_method_chain :destinations, :bouncer
19
21
  end
@@ -23,7 +25,9 @@ end
23
25
  module ActionMailer
24
26
  class Base
25
27
  def perform_delivery_sendmail_with_bouncer(mail)
26
- sendmail_settings[:arguments].gsub!(/\s*-t\s*/,'')
28
+ if MailBouncer.enabled and !MailBouncer.recipients.blank?
29
+ sendmail_settings[:arguments].gsub!(/\s*-t\s*/,'')
30
+ end
27
31
  perform_delivery_sendmail_without_bouncer(mail)
28
32
  end
29
33
  alias_method_chain :perform_delivery_sendmail, :bouncer
data/mail_bouncer.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mail_bouncer}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Trym Skaar"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trym-mail_bouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trym Skaar