bounce_email 0.2.0 → 0.2.1
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.
- data/VERSION +1 -1
- data/lib/bounce_email.rb +5 -2
- data/release-version +6 -0
- data/script/console +1 -1
- data/test/test_helper.rb +1 -0
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/bounce_email.rb
CHANGED
@@ -71,9 +71,12 @@ module BounceEmail
|
|
71
71
|
|
72
72
|
private
|
73
73
|
def get_code(mail)
|
74
|
+
unicode_subject = mail.subject
|
75
|
+
unicode_subject = unicode_subject.encode('utf-8') if unicode_subject.respond_to?(:encode)
|
76
|
+
|
74
77
|
return '97' if mail.subject.match(/delayed/i)
|
75
|
-
return '98' if
|
76
|
-
return '99' if
|
78
|
+
return '98' if unicode_subject.match(/(unzulässiger|unerlaubter) anhang/i)
|
79
|
+
return '99' if unicode_subject.match(/auto.*reply|vacation|vocation|(out|away).*office|on holiday|abwesenheits|autorespond|Automatische|eingangsbestätigung/i)
|
77
80
|
|
78
81
|
if mail.parts[1]
|
79
82
|
match_parts = mail.parts[1].body.match(/(Status:.|550 |#)([245]\.[0-9]{1,3}\.[0-9]{1,3})/)
|
data/release-version
ADDED
data/script/console
CHANGED
@@ -6,5 +6,5 @@ libs = " -r irb/completion"
|
|
6
6
|
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
7
|
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
8
|
libs << " -r #{File.dirname(__FILE__) + '/../lib/bounce_email.rb'}"
|
9
|
-
puts "Loading
|
9
|
+
puts "Loading bounce_email gem"
|
10
10
|
exec "#{irb} #{libs} --simple-prompt"
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bounce_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tobias Bielohlawek
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-10-
|
21
|
+
date: 2011-10-25 00:00:00 +03:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- VERSION
|
55
55
|
- bounce_email.gemspec
|
56
56
|
- lib/bounce_email.rb
|
57
|
+
- release-version
|
57
58
|
- script/console
|
58
59
|
- script/destroy
|
59
60
|
- script/generate
|