Permalink
Browse files

Process HTC Sensation footers.

  • Loading branch information...
1 parent 2433b37 commit 797932b89dd4c94796e0acc1ea26d7d7f1f9095f @monde committed Aug 22, 2012
Showing with 4 additions and 0 deletions.
  1. +3 −0 conf/mms2r_media.yml
  2. +1 −0 test/test_mms2r_media.rb
View
3 conf/mms2r_media.yml
@@ -3,13 +3,16 @@ ignore:
text/plain:
- !ruby/regexp /^\(no subject\)$/i
- !ruby/regexp /\ASent (via|(from (my|your))) /im
+ - !ruby/regexp /\AFrom my HTC /im
- !ruby/regexp /\ASent on the Sprint.* Now Network.*$/im
multipart/mixed:
- !ruby/regexp "/^Attachment: /i"
transform:
text/plain:
- - !ruby/regexp /\A(.*?)Sent (via|(from (my|your))) .*/im
- "\\1"
+ - - !ruby/regexp /\A(.*?)From my HTC .*/im
+ - "\\1"
- - !ruby/regexp /\A(.*?)\s+image\/jpeg$/im
- "\\1"
- - !ruby/regexp /\A(.*?)Sent on the Sprint.* Now Network.*$/im
View
1 test/test_mms2r_media.rb
@@ -193,6 +193,7 @@ def test_transform_text_plain
assert_equal result, mms.transform_text(type, text)
# testing the default config
+ assert_equal ['text/plain', ''], mms.transform_text('text/plain', "From my HTC Sensation 4G on T-Mobile. The first nationwide 4G network")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent from my Windows Phone")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent via BlackBerry from T-Mobile")
assert_equal ['text/plain', ''], mms.transform_text('text/plain', "Sent from my Verizon Wireless BlackBerry")

0 comments on commit 797932b

Please sign in to comment.