bounce_email 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
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 mail.subject.encode('utf-8').match(/(unzulässiger|unerlaubter) anhang/i)
76
- return '99' if mail.subject.encode('utf-8').match(/auto.*reply|vacation|vocation|(out|away).*office|on holiday|abwesenheits|autorespond|Automatische|eingangsbestätigung/i)
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
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+
3
+ NAME="bounce_email"
4
+
5
+ git push
6
+ gem build $NAME.gemspec && gem push $NAME-* && rm -f $NAME-*
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 bounce-email gem"
9
+ puts "Loading bounce_email gem"
10
10
  exec "#{irb} #{libs} --simple-prompt"
data/test/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'test/unit'
2
3
 
3
4
  require File.dirname(__FILE__) + '/../lib/bounce_email'
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
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-24 00:00:00 +03:00
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