email_reply_trimmer 0.0.5 → 0.0.6

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: 524c9c03a9b4861ebc85dda7fa41280e8926564e
4
- data.tar.gz: 067ae372e94788afc8f41a821dca98758a5259d4
3
+ metadata.gz: 19151a1b0306908f229506fd9852c2e5f2977e99
4
+ data.tar.gz: 79f45dc86fc21c4781b2a67443da9a25c514ffbd
5
5
  SHA512:
6
- metadata.gz: b6156175d8c7bed81b5244b44fc15cb450e264aa932c3080708b3326b1250b641cc6f100bd95d00c644ba5085fe08ae3fdf4bfcbb37aedb75d022a9f817d1e27
7
- data.tar.gz: 4480e8776f1ca3867ff8f656c8b3298bf8e37d249146f38deeee7aba70ba86fc4565ed06a5d794aa3a8898ae93bec8aa719bcd0dde11c130d188632544503c7a
6
+ metadata.gz: 3004669e3deeb2f2ef729cfa6e09fc1c40fd97560bcb199f96c6c1290f81358b5ec53dad5d63054719f538887b3fd107dffd238929ae5c6a54dcd556a2116e55
7
+ data.tar.gz: d5c4e1139d2d4e618eca348e09d58d5ba98a2b9c64c8d7f3c51536eb434c75c9b32051f7bc1463bcbaf1ca1929ed4d35bb36194c569573c2a7b7a359a7823647
@@ -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.5"
9
+ VERSION = "0.0.6"
10
10
 
11
11
  DELIMITER = "d"
12
12
  EMBEDDED = "b"
@@ -51,18 +51,18 @@ class EmailReplyTrimmer
51
51
  lines.slice!(index)
52
52
  end
53
53
 
54
- # if there is an embedded email marker, followed only by other email markers and/or text
54
+ # if there is an embedded email marker, not followed by a quote
55
55
  # then take everything up to that marker
56
- if pattern =~ /te*b[etb]*$/
57
- index = pattern =~ /te*b[etb]*$/
56
+ if pattern =~ /te*b[^q]*$/
57
+ index = pattern =~ /te*b[^q]*$/
58
58
  pattern = pattern[0..index]
59
59
  lines = lines[0..index]
60
60
  end
61
61
 
62
62
  # if there is an embedded email marker, followed by a huge quote
63
63
  # then take everything up to that marker
64
- if pattern =~ /te*b[eqb]*[te]*$/
65
- index = pattern =~ /te*b[eqb]*[te]*$/
64
+ if pattern =~ /te*b[eqbh]*[te]*$/
65
+ index = pattern =~ /te*b[eqbh]*[te]*$/
66
66
  pattern = pattern[0..index]
67
67
  lines = lines[0..index]
68
68
  end
@@ -0,0 +1,42 @@
1
+ Thank you.
2
+
3
+ Sent from Outlook Mobile<https://foo.bar>
4
+
5
+
6
+
7
+
8
+ On Sun, Feb 7, 2016 at 12:12 AM -0800, "Arpit Jalan" <arpit.jalan@discourse.org<mailto:arpit.jalan@discourse.org>> wrote:
9
+
10
+ Hi Some,
11
+
12
+ https://meta.discourse.org is now running on latest Discourse version!
13
+
14
+ Regards,
15
+ Arpit
16
+
17
+ On Fri, Feb 5, 2016 at 10:43 AM Arpit Jalan <arpit.jalan@discourse.org<mailto:arpit.jalan@discourse.org>> wrote:
18
+ Okay, sure!
19
+
20
+ Arpit
21
+ On Fri, 5 Feb 2016 at 10:42, Some One <foo@bar.com<mailto:foo@bar.com>> wrote:
22
+ Arpit,
23
+ Yes that sounds good.
24
+
25
+ Sent from Outlook Mobile<https://foo.bar>
26
+
27
+ _____________________________
28
+ From: Arpit Jalan <arpit.jalan@discourse.org<mailto:arpit.jalan@discourse.org>>
29
+ Sent: Thursday, February 4, 2016 10:05 AM
30
+ Subject: Meta Discourse update
31
+ To: Some One <foo@bar.com<mailto:foo@bar.com>>, Discourse Team <team@discourse.org<mailto:team@discourse.org>>
32
+
33
+
34
+
35
+ Hi Some One,
36
+
37
+ Time to update meta to the latest Discourse version!
38
+
39
+ Do you want me to take care of it?
40
+
41
+ Regards,
42
+ Arpit
@@ -0,0 +1 @@
1
+ Thank you.
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.5
4
+ version: 0.0.6
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-04 00:00:00.000000000 Z
11
+ date: 2016-02-08 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.
@@ -35,6 +35,7 @@ files:
35
35
  - test/emails/email_headers_2.txt
36
36
  - test/emails/embedded_ception.txt
37
37
  - test/emails/embedded_email_1.txt
38
+ - test/emails/embedded_email_10.txt
38
39
  - test/emails/embedded_email_2.txt
39
40
  - test/emails/embedded_email_3.txt
40
41
  - test/emails/embedded_email_4.txt
@@ -67,6 +68,7 @@ files:
67
68
  - test/replies/email_headers_2.txt
68
69
  - test/replies/embedded_ception.txt
69
70
  - test/replies/embedded_email_1.txt
71
+ - test/replies/embedded_email_10.txt
70
72
  - test/replies/embedded_email_2.txt
71
73
  - test/replies/embedded_email_3.txt
72
74
  - test/replies/embedded_email_4.txt