mail_interceptor 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01f80432a77850310f4d4ae32027ead3bdc951b5
4
- data.tar.gz: 50e4552dd58951fbae975339350e75d31e0d13fc
3
+ metadata.gz: 691b985934a4d8d914973c060939febba013f974
4
+ data.tar.gz: ce02faa6ca1925dba811e607ceb5b015e7ce10da
5
5
  SHA512:
6
- metadata.gz: 606b17ea4496526fe9b9cf0f1f17710a5184218083749770cdc8f1e588995ca0edd03404c4453b8438d95c5a228c2ae3a5fa224fd6cf6144e31d2f9eaf65af84
7
- data.tar.gz: 461fb9d049dd049ffb7492a643063e9fa1d4a7ead07fe39f72f4eb036c9aa99d29d61054977eea39cd92c7f6acd342c1b43b69632c725164f03d7ae22e9e49ab
6
+ metadata.gz: 1d47f4ab350a5a78dbc0628edb983ad02a867aefd72893284012efe6e62284596120c1e7dcf7ead1022bd64bff723de6fcbb93830dd1217cbe2180566e22da70
7
+ data.tar.gz: fe81f686a1df5e724f94380cf7ed94375e573df5a310f5c7900f0485d8331fdeb4f73043532e4e2b9263eb070628a202c38e6d8ccefe99439e2b7c8d6589f25b
data/README.md CHANGED
@@ -28,9 +28,14 @@ options = { forward_emails_to: 'intercepted_emails@domain.com',
28
28
  subject_prefix: 'WHEEL' }
29
29
 
30
30
  interceptor = MailInterceptor::Interceptor.new(options)
31
- ActionMailer::Base.register_interceptor(interceptor)
31
+ unless Rails.env.test?
32
+ ActionMailer::Base.register_interceptor(interceptor)
33
+ end
32
34
  ```
33
35
 
36
+ Do not use this feature in test mode so that in your tests
37
+ you can test against real recipients of the email.
38
+
34
39
  ### deliver_emails_to
35
40
 
36
41
  Passing __deliver_emails_to__ is optional. If no "deliver_emails_to"
@@ -39,7 +39,6 @@ module MailInterceptor
39
39
 
40
40
  def add_subject_prefix message
41
41
  return if subject_prefix.blank?
42
- return if !env.intercept?
43
42
 
44
43
  message.subject = "#{subject_prefix} #{message.subject}"
45
44
  end
@@ -70,8 +69,6 @@ module MailInterceptor
70
69
  end
71
70
 
72
71
  def intercept?
73
- return false if Rails.env.test?
74
-
75
72
  !Rails.env.production?
76
73
  end
77
74
  end
@@ -1,3 +1,3 @@
1
1
  module MailInterceptor
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_interceptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Singh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-21 00:00:00.000000000 Z
11
+ date: 2015-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport