email_reply_trimmer 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/email_reply_trimmer.rb +1 -1
- data/lib/email_reply_trimmer/signature_matcher.rb +9 -2
- data/test/elided/signatures.txt +3 -0
- data/test/emails/signatures.txt +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6d1c0ab5d84950fc4aba02e7b9edbd6c0fabd44
|
4
|
+
data.tar.gz: e895017cee98f971b69057efc009a014ad738bd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b776fa074024dd86bf367d66ff4631f721db08a6f1e77f08e3952096bc25e1225524c10f564be7c8e204f9696e41130fbae5bc3e2de66d63bc9fa2cd6ee3c3
|
7
|
+
data.tar.gz: ff55cb8bbfcedb3c0284839e92ff2c4161123b78cb9c5fe7601a9b04268c69633dcb714fe967c605bcb07fc43b619804312ecf0503ca3ed993c092f0a5d6883f
|
data/Gemfile.lock
CHANGED
data/lib/email_reply_trimmer.rb
CHANGED
@@ -20,7 +20,7 @@ class SignatureMatcher
|
|
20
20
|
/^[[:blank:]]*[[:word:]]+ from mobile/i,
|
21
21
|
/^[[:blank:]]*[\(<]*Sent (from|via|with|by) .+[\)>]*/i,
|
22
22
|
/^[[:blank:]]*From my .{1,20}/i,
|
23
|
-
/^[[:blank:]]*Get Outlook for
|
23
|
+
/^[[:blank:]]*Get Outlook for /i,
|
24
24
|
# French
|
25
25
|
/^[[:blank:]]*Envoyé depuis (mon|Yahoo Mail)/i,
|
26
26
|
# German
|
@@ -34,10 +34,17 @@ class SignatureMatcher
|
|
34
34
|
/^[[:blank:]]*Enviado do meu /i,
|
35
35
|
# Spanish
|
36
36
|
/^[[:blank:]]*Enviado desde mi /i,
|
37
|
+
# Dutch
|
38
|
+
/^[[:blank:]]*Verzonden met /i,
|
39
|
+
/^[[:blank:]]*Verstuurd vanaf mijn /i,
|
40
|
+
# Swedish
|
41
|
+
/^[[:blank:]]*från min /i,
|
37
42
|
]
|
38
43
|
|
39
44
|
def self.match?(line)
|
40
|
-
|
45
|
+
# remove any markdown links
|
46
|
+
stripped = line.gsub(/\[([^\]]+)\]\([^\)]+\)/) { $1 }
|
47
|
+
SIGNATURE_REGEXES.any? { |r| stripped =~ r }
|
41
48
|
end
|
42
49
|
|
43
50
|
end
|
data/test/elided/signatures.txt
CHANGED
@@ -24,5 +24,8 @@ Sent from my Windows 8 PC <http://windows.microsoft.com/consumer-preview>
|
|
24
24
|
(sent from a phone)
|
25
25
|
(Sent from mobile device)
|
26
26
|
從我的 iPhone 傳送
|
27
|
+
Sent from [mail](https://go.microsoft.com/fwlink/?LinkId=550986) for windows 10
|
28
|
+
Verzonden met BlackBerry Work
|
27
29
|
|
28
30
|
Get Outlook for iOShttps://aka.ms/o0ukef
|
31
|
+
Get [Outlook for Android](https://aka.ms/ghei36)
|
data/test/emails/signatures.txt
CHANGED
@@ -26,5 +26,8 @@ Sent from my Windows 8 PC <http://windows.microsoft.com/consumer-preview>
|
|
26
26
|
(sent from a phone)
|
27
27
|
(Sent from mobile device)
|
28
28
|
從我的 iPhone 傳送
|
29
|
+
Sent from [mail](https://go.microsoft.com/fwlink/?LinkId=550986) for windows 10
|
30
|
+
Verzonden met BlackBerry Work
|
29
31
|
|
30
32
|
Get Outlook for iOShttps://aka.ms/o0ukef
|
33
|
+
Get [Outlook for Android](https://aka.ms/ghei36)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_reply_trimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Régis Hanol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|