email_forward_parser 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/Gemfile +6 -1
- data/Gemfile.lock +31 -14
- data/Rakefile +1 -3
- data/lib/email_forward_parser/original_email_parser.rb +5 -5
- data/lib/email_forward_parser/parser.rb +1 -1
- data/lib/email_forward_parser/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d13f8a06613ebc2be2afd53582a92b8bdb2647cfaac6d5e54f8d56e1ffc89991
|
4
|
+
data.tar.gz: 8078837a0c88106341f7c12d5e5030e9edffabc30d032c497a8cb7ebf5d72f3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85a13cf7d9b1debd7600c7ee2b7329a035249dbbee58f244f762a0cb75a6ac64a446b93e5e1eec9adb9f9de1d21ef718b8bebecb218b5101d8261cf0c51d5a4b
|
7
|
+
data.tar.gz: ad4907443a5994d0f66be2bf9836577113cd88f1697181a0872a965be6bdffdf668fe78cfa2ad5f9249ddd4b23cad41f68325e9b9591441b6b1f95dd4d0fce43
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -7,56 +7,73 @@ GEM
|
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.2)
|
10
|
+
base64 (0.1.1)
|
10
11
|
json (2.6.3)
|
11
12
|
language_server-protocol (3.17.0.3)
|
12
|
-
lint_roller (1.
|
13
|
-
minitest (5.
|
13
|
+
lint_roller (1.1.0)
|
14
|
+
minitest (5.19.0)
|
14
15
|
parallel (1.23.0)
|
15
16
|
parser (3.2.2.3)
|
16
17
|
ast (~> 2.4.1)
|
17
18
|
racc
|
19
|
+
prettier_print (1.2.1)
|
18
20
|
racc (1.7.1)
|
19
21
|
rainbow (3.1.1)
|
20
22
|
rake (13.0.6)
|
21
23
|
regexp_parser (2.8.1)
|
22
|
-
rexml (3.2.
|
23
|
-
rubocop (1.
|
24
|
+
rexml (3.2.6)
|
25
|
+
rubocop (1.56.2)
|
26
|
+
base64 (~> 0.1.1)
|
24
27
|
json (~> 2.3)
|
28
|
+
language_server-protocol (>= 3.17.0)
|
25
29
|
parallel (~> 1.10)
|
26
30
|
parser (>= 3.2.2.3)
|
27
31
|
rainbow (>= 2.2.2, < 4.0)
|
28
32
|
regexp_parser (>= 1.8, < 3.0)
|
29
33
|
rexml (>= 3.2.5, < 4.0)
|
30
|
-
rubocop-ast (>= 1.28.
|
34
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
31
35
|
ruby-progressbar (~> 1.7)
|
32
36
|
unicode-display_width (>= 2.4.0, < 3.0)
|
33
37
|
rubocop-ast (1.29.0)
|
34
38
|
parser (>= 3.2.1.0)
|
35
|
-
rubocop-performance (1.
|
39
|
+
rubocop-performance (1.19.0)
|
36
40
|
rubocop (>= 1.7.0, < 2.0)
|
37
41
|
rubocop-ast (>= 0.4.0)
|
42
|
+
ruby-lsp (0.9.1)
|
43
|
+
language_server-protocol (~> 3.17.0)
|
44
|
+
sorbet-runtime
|
45
|
+
syntax_tree (>= 6.1.1, < 7)
|
46
|
+
yarp (>= 0.9, < 0.10)
|
38
47
|
ruby-progressbar (1.13.0)
|
39
|
-
|
48
|
+
sorbet-runtime (0.5.10990)
|
49
|
+
standard (1.31.0)
|
40
50
|
language_server-protocol (~> 3.17.0.2)
|
41
51
|
lint_roller (~> 1.0)
|
42
|
-
rubocop (~> 1.
|
52
|
+
rubocop (~> 1.56.0)
|
43
53
|
standard-custom (~> 1.0.0)
|
44
|
-
standard-performance (~> 1.
|
45
|
-
standard-custom (1.0.
|
54
|
+
standard-performance (~> 1.2)
|
55
|
+
standard-custom (1.0.2)
|
46
56
|
lint_roller (~> 1.0)
|
47
|
-
|
48
|
-
|
49
|
-
|
57
|
+
rubocop (~> 1.50)
|
58
|
+
standard-performance (1.2.0)
|
59
|
+
lint_roller (~> 1.1)
|
60
|
+
rubocop-performance (~> 1.19.0)
|
61
|
+
syntax_tree (6.1.1)
|
62
|
+
prettier_print (>= 1.2.0)
|
50
63
|
unicode-display_width (2.4.2)
|
64
|
+
yarp (0.9.0)
|
51
65
|
|
52
66
|
PLATFORMS
|
53
67
|
arm64-darwin-22
|
68
|
+
x86_64-linux
|
54
69
|
|
55
70
|
DEPENDENCIES
|
56
71
|
email_forward_parser!
|
57
72
|
minitest (~> 5.0)
|
58
73
|
rake (~> 13.0)
|
59
|
-
|
74
|
+
rubocop
|
75
|
+
ruby-lsp
|
76
|
+
standard
|
60
77
|
|
61
78
|
BUNDLED WITH
|
62
79
|
2.4.13
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require_relative "
|
2
|
-
require_relative "
|
3
|
-
require_relative "
|
1
|
+
require_relative "regexes"
|
2
|
+
require_relative "utils"
|
3
|
+
require_relative "mailbox_parser"
|
4
4
|
|
5
5
|
module EmailForwardParser
|
6
6
|
class OriginalEmailParser
|
@@ -53,7 +53,7 @@ module EmailForwardParser
|
|
53
53
|
|
54
54
|
# A new line must be present between the Cc, To, Reply-To or Subject \
|
55
55
|
# part and the actual body
|
56
|
-
return match[2].strip if match && match.length
|
56
|
+
return match[2..].join("\n").strip if match && match.length >= 3 && match[2].start_with?("\n\n")
|
57
57
|
end
|
58
58
|
|
59
59
|
# Second method: extract the text after the Subject part \
|
@@ -64,7 +64,7 @@ module EmailForwardParser
|
|
64
64
|
)
|
65
65
|
|
66
66
|
# No new line must be present between the Subject part and the actual body
|
67
|
-
return match[2].strip if match && match.length
|
67
|
+
return match[2..].join("\n").strip if match && match.length >= 3
|
68
68
|
|
69
69
|
# Third method: return the raw text, as there is no original information \
|
70
70
|
# embedded (no Cc, To, Subject, etc.) (Outlook 2019)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_forward_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- ".rubocop.yml"
|
20
21
|
- ".standard.yml"
|
21
22
|
- Gemfile
|
22
23
|
- Gemfile.lock
|
@@ -49,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
50
|
- !ruby/object:Gem::Version
|
50
51
|
version: '0'
|
51
52
|
requirements: []
|
52
|
-
rubygems_version: 3.4.
|
53
|
+
rubygems_version: 3.4.10
|
53
54
|
signing_key:
|
54
55
|
specification_version: 4
|
55
56
|
summary: Parse forwarded emails from body and subject
|