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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3580bb67f3fef9014b7efecbfe07a87b7f17eb5d
4
- data.tar.gz: d2d2800bc7a41ba50a81cb5674d11b0af82d9e95
3
+ metadata.gz: b4b7111f3d85ec48027ab149ec317f811e54edb7
4
+ data.tar.gz: 4187af3b8da111b6e695b87f675999ea262a612a
5
5
  SHA512:
6
- metadata.gz: 0fffbfcca55fb58a800ee29414bd154fb360bead10ee89209c843a6ae9ba7a5a9160d7c24d9914a24b061c51f6ab48cd3ae6ad9716258ad405df2590747e170e
7
- data.tar.gz: ec708ed09eaba586fe72bb014551d05038f34d5c1d0109fc5b9b499a7e72f4507800283dadf5aa7c476621aa56f3b5b6eb7cc630dcea1f6e4b3e504a8dc72c9d
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 (Mexican)
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 = [
@@ -6,7 +6,7 @@ require_relative "email_reply_trimmer/email_header_matcher"
6
6
  require_relative "email_reply_trimmer/quote_matcher"
7
7
 
8
8
  class EmailReplyTrimmer
9
- VERSION = "0.0.7"
9
+ VERSION = "0.0.8"
10
10
 
11
11
  DELIMITER = "d"
12
12
  EMBEDDED = "b"
@@ -0,0 +1,10 @@
1
+ Gruß Discourse
2
+
3
+
4
+ -----Ursprüngliche Nachricht-----
5
+ Von: Discourse Team <team@discourse.org>
6
+ Gesendet: Don 11 Februar 2016 11:23
7
+ An: Some One <foo@bar.com>
8
+ Betreff: Some Subject
9
+
10
+ Hallo! Wie geht es Ihnen heute?
@@ -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
+ =
@@ -0,0 +1 @@
1
+ Gruß Discourse
@@ -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.7
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-08 00:00:00.000000000 Z
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/embedded_email_german.txt
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/embedded_email_spanish.txt
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/embedded_email_german.txt
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/embedded_email_spanish.txt
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