email_reply_trimmer 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/email_reply_trimmer/email_header_matcher.rb +7 -1
- data/lib/email_reply_trimmer/embedded_email_matcher.rb +5 -1
- data/lib/email_reply_trimmer.rb +1 -1
- data/test/emails/{embedded_email_german.txt → embedded_email_german_1.txt} +0 -0
- data/test/emails/embedded_email_german_3.txt +10 -0
- data/test/emails/{embedded_email_spanish.txt → embedded_email_spanish_1.txt} +0 -0
- data/test/emails/embedded_email_spanish_2.txt +12 -0
- data/test/replies/{embedded_email_german.txt → embedded_email_german_1.txt} +0 -0
- data/test/replies/embedded_email_german_3.txt +1 -0
- data/test/replies/{embedded_email_spanish.txt → embedded_email_spanish_1.txt} +0 -0
- data/test/replies/embedded_email_spanish_2.txt +1 -0
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b7111f3d85ec48027ab149ec317f811e54edb7
|
4
|
+
data.tar.gz: 4187af3b8da111b6e695b87f675999ea262a612a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 828510391511ccbd47acfb11ea91cfd7693d2bc600b3e69791ee62c80d3d8e9e2bd6d88fd576e69f22047d8ce7a9b7f09e980e6574eeed38108f1df2bf8df190
|
7
|
+
data.tar.gz: 45498e31054c288dac4b1e099abbd8916848f3640c87ef197a7f0460698b7471c0ec8a8b3535b16ce045c5e4e8cca6000e9883d854e48ace84da5278418e10ba
|
@@ -7,8 +7,12 @@ class EmailHeaderMatcher
|
|
7
7
|
["Sent"],
|
8
8
|
# French
|
9
9
|
["Date"],
|
10
|
+
# German
|
11
|
+
["Gesendet"],
|
10
12
|
# Portuguese
|
11
13
|
["Enviada em"],
|
14
|
+
# Spanish
|
15
|
+
["Enviado"],
|
12
16
|
# Spanish (Mexican)
|
13
17
|
["Fecha"],
|
14
18
|
]
|
@@ -24,9 +28,11 @@ class EmailHeaderMatcher
|
|
24
28
|
["From", "To", "Cc", "Reply-To", "Subject"],
|
25
29
|
# French
|
26
30
|
["De", "À", "Répondre à", "Objet"],
|
31
|
+
# German
|
32
|
+
["Von", "An", "Betreff"],
|
27
33
|
# Portuguese
|
28
34
|
["De", "Para", "Assunto"],
|
29
|
-
# Spanish
|
35
|
+
# Spanish
|
30
36
|
["De", "Para", "Asunto"],
|
31
37
|
]
|
32
38
|
|
@@ -91,7 +91,11 @@ class EmbeddedEmailMatcher
|
|
91
91
|
# English
|
92
92
|
/^[[:space:]]*Begin forwarded message:/i,
|
93
93
|
/^[[:space:]]*Reply message/i,
|
94
|
-
/^[[:space:]\*]*-{2,}[[:space:]]*(Forwarded|Original) Message[[:space:]]*-{2,}/i
|
94
|
+
/^[[:space:]\*]*-{2,}[[:space:]]*(Forwarded|Original) Message[[:space:]]*-{2,}/i,
|
95
|
+
# German
|
96
|
+
/^[[:space:]\*]*-{2,}[[:space:]]*Ursprüngliche Nachricht[[:space:]]*-{2,}/i,
|
97
|
+
# Spanish
|
98
|
+
/^[[:space:]\*]*-{2,}[[:space:]]*Mensaje original[[:space:]]*-{2,}/i,
|
95
99
|
]
|
96
100
|
|
97
101
|
EMBEDDED_REGEXES = [
|
data/lib/email_reply_trimmer.rb
CHANGED
File without changes
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Igual que siempre (inclusive ahora), sin nada raro :/
|
2
|
+
|
3
|
+
-----Mensaje original-----
|
4
|
+
De: "Miguel" <foo@bar.es>
|
5
|
+
Enviado: =E2=80=8E16/=E2=80=8E02/=E2=80=8E2016 14:53
|
6
|
+
Para: "discourse" <discourse@discourse.org>
|
7
|
+
Asunto: [MP]Parser del email
|
8
|
+
|
9
|
+
Visita el tema o responde a este email para publicar.
|
10
|
+
Para no recibir m=C3=A1s notificaciones de este tema en particular, haz cli=
|
11
|
+
c aqu=C3=AD. Para darte de baja de estos emails, cambia tus preferencias
|
12
|
+
=
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Gruß Discourse
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Igual que siempre (inclusive ahora), sin nada raro :/
|
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.0.
|
4
|
+
version: 0.0.8
|
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: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: EmailReplyTrimmer is a small library to trim replies from plain text
|
14
14
|
email.
|
@@ -48,13 +48,15 @@ files:
|
|
48
48
|
- test/emails/embedded_email_dutch_1.txt
|
49
49
|
- test/emails/embedded_email_dutch_2.txt
|
50
50
|
- test/emails/embedded_email_french.txt
|
51
|
-
- test/emails/
|
51
|
+
- test/emails/embedded_email_german_1.txt
|
52
52
|
- test/emails/embedded_email_german_2.txt
|
53
|
+
- test/emails/embedded_email_german_3.txt
|
53
54
|
- test/emails/embedded_email_polish.txt
|
54
55
|
- test/emails/embedded_email_portuguese.txt
|
55
56
|
- test/emails/embedded_email_quote_text.txt
|
56
57
|
- test/emails/embedded_email_russian.txt
|
57
|
-
- test/emails/
|
58
|
+
- test/emails/embedded_email_spanish_1.txt
|
59
|
+
- test/emails/embedded_email_spanish_2.txt
|
58
60
|
- test/emails/forwarded_message.txt
|
59
61
|
- test/emails/normalize_line_endings.txt
|
60
62
|
- test/emails/quote_and_text.txt
|
@@ -82,13 +84,15 @@ files:
|
|
82
84
|
- test/replies/embedded_email_dutch_1.txt
|
83
85
|
- test/replies/embedded_email_dutch_2.txt
|
84
86
|
- test/replies/embedded_email_french.txt
|
85
|
-
- test/replies/
|
87
|
+
- test/replies/embedded_email_german_1.txt
|
86
88
|
- test/replies/embedded_email_german_2.txt
|
89
|
+
- test/replies/embedded_email_german_3.txt
|
87
90
|
- test/replies/embedded_email_polish.txt
|
88
91
|
- test/replies/embedded_email_portuguese.txt
|
89
92
|
- test/replies/embedded_email_quote_text.txt
|
90
93
|
- test/replies/embedded_email_russian.txt
|
91
|
-
- test/replies/
|
94
|
+
- test/replies/embedded_email_spanish_1.txt
|
95
|
+
- test/replies/embedded_email_spanish_2.txt
|
92
96
|
- test/replies/forwarded_message.txt
|
93
97
|
- test/replies/normalize_line_endings.txt
|
94
98
|
- test/replies/quote_and_text.txt
|