runger_email_reply_trimmer 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile +17 -0
  4. data/Gemfile.lock +72 -0
  5. data/LICENSE +9 -0
  6. data/README.md +21 -0
  7. data/Rakefile +17 -0
  8. data/bin/release +27 -0
  9. data/lib/runger_email_reply_trimmer/delimiter_matcher.rb +12 -0
  10. data/lib/runger_email_reply_trimmer/email_header_matcher.rb +72 -0
  11. data/lib/runger_email_reply_trimmer/embedded_email_matcher.rb +158 -0
  12. data/lib/runger_email_reply_trimmer/empty_line_matcher.rb +9 -0
  13. data/lib/runger_email_reply_trimmer/quote_matcher.rb +9 -0
  14. data/lib/runger_email_reply_trimmer/signature_matcher.rb +52 -0
  15. data/lib/runger_email_reply_trimmer/version.rb +5 -0
  16. data/lib/runger_email_reply_trimmer.rb +226 -0
  17. data/runger_email_reply_trimmer.gemspec +21 -0
  18. data/test/before/email_headers_1.txt +1 -0
  19. data/test/before/email_headers_2.txt +1 -0
  20. data/test/before/email_headers_3.txt +1 -0
  21. data/test/before/email_headers_4.txt +1 -0
  22. data/test/before/embedded_email_10.txt +25 -0
  23. data/test/before/embedded_email_german_3.txt +1 -0
  24. data/test/before/embedded_email_spanish_2.txt +1 -0
  25. data/test/before/forwarded_apple.txt +1 -0
  26. data/test/before/forwarded_gmail.txt +1 -0
  27. data/test/before/forwarded_message.txt +0 -0
  28. data/test/elided/delimiters.txt +10 -0
  29. data/test/elided/dual_embedded.txt +10 -0
  30. data/test/elided/email_headers_1.txt +14 -0
  31. data/test/elided/email_headers_2.txt +9 -0
  32. data/test/elided/email_headers_3.txt +16 -0
  33. data/test/elided/email_headers_4.txt +15 -0
  34. data/test/elided/email_headers_5.txt +23 -0
  35. data/test/elided/embedded_ception.txt +38 -0
  36. data/test/elided/embedded_email_1.txt +6 -0
  37. data/test/elided/embedded_email_10.txt +40 -0
  38. data/test/elided/embedded_email_11.txt +3 -0
  39. data/test/elided/embedded_email_12.txt +8 -0
  40. data/test/elided/embedded_email_13.txt +9 -0
  41. data/test/elided/embedded_email_14.txt +11 -0
  42. data/test/elided/embedded_email_15.txt +4 -0
  43. data/test/elided/embedded_email_16.txt +4 -0
  44. data/test/elided/embedded_email_17.txt +2 -0
  45. data/test/elided/embedded_email_18.txt +1 -0
  46. data/test/elided/embedded_email_19.txt +0 -0
  47. data/test/elided/embedded_email_2.txt +9 -0
  48. data/test/elided/embedded_email_3.txt +14 -0
  49. data/test/elided/embedded_email_4.txt +15 -0
  50. data/test/elided/embedded_email_5.txt +3 -0
  51. data/test/elided/embedded_email_6.txt +3 -0
  52. data/test/elided/embedded_email_7.txt +10 -0
  53. data/test/elided/embedded_email_8.txt +3 -0
  54. data/test/elided/embedded_email_9.txt +3 -0
  55. data/test/elided/embedded_email_chinese.txt +4 -0
  56. data/test/elided/embedded_email_dutch_1.txt +10 -0
  57. data/test/elided/embedded_email_dutch_2.txt +59 -0
  58. data/test/elided/embedded_email_french_1.txt +9 -0
  59. data/test/elided/embedded_email_french_2.txt +19 -0
  60. data/test/elided/embedded_email_german_1.txt +22 -0
  61. data/test/elided/embedded_email_german_2.txt +3 -0
  62. data/test/elided/embedded_email_german_3.txt +7 -0
  63. data/test/elided/embedded_email_german_4.txt +15 -0
  64. data/test/elided/embedded_email_german_5.txt +20 -0
  65. data/test/elided/embedded_email_german_6.txt +8 -0
  66. data/test/elided/embedded_email_italian.txt +28 -0
  67. data/test/elided/embedded_email_norwegian.txt +9 -0
  68. data/test/elided/embedded_email_polish_1.txt +32 -0
  69. data/test/elided/embedded_email_polish_2.txt +7 -0
  70. data/test/elided/embedded_email_portuguese.txt +14 -0
  71. data/test/elided/embedded_email_quote_text.txt +6 -0
  72. data/test/elided/embedded_email_russian_1.txt +25 -0
  73. data/test/elided/embedded_email_russian_2.txt +23 -0
  74. data/test/elided/embedded_email_spanish_1.txt +32 -0
  75. data/test/elided/embedded_email_spanish_2.txt +10 -0
  76. data/test/elided/embedded_email_swedish.txt +8 -0
  77. data/test/elided/embedded_email_ukrainian.txt +17 -0
  78. data/test/elided/forwarded_apple.txt +15 -0
  79. data/test/elided/forwarded_gmail.txt +15 -0
  80. data/test/elided/forwarded_message.txt +6 -0
  81. data/test/elided/normalize_line_endings.txt +0 -0
  82. data/test/elided/quote_and_text.txt +0 -0
  83. data/test/elided/quote_only.txt +0 -0
  84. data/test/elided/retains_spaces_and_formatting.txt +0 -0
  85. data/test/elided/signatures.txt +31 -0
  86. data/test/elided/spam_1.txt +75 -0
  87. data/test/elided/spam_2.txt +152 -0
  88. data/test/elided/strip.txt +0 -0
  89. data/test/elided/text_only.txt +0 -0
  90. data/test/elided/usenet.txt +7 -0
  91. data/test/emails/delimiters.txt +14 -0
  92. data/test/emails/dual_embedded.txt +13 -0
  93. data/test/emails/email_headers_1.txt +17 -0
  94. data/test/emails/email_headers_2.txt +10 -0
  95. data/test/emails/email_headers_3.txt +18 -0
  96. data/test/emails/email_headers_4.txt +17 -0
  97. data/test/emails/email_headers_5.txt +37 -0
  98. data/test/emails/embedded_ception.txt +47 -0
  99. data/test/emails/embedded_email_1.txt +8 -0
  100. data/test/emails/embedded_email_10.txt +42 -0
  101. data/test/emails/embedded_email_11.txt +5 -0
  102. data/test/emails/embedded_email_12.txt +18 -0
  103. data/test/emails/embedded_email_13.txt +14 -0
  104. data/test/emails/embedded_email_14.txt +16 -0
  105. data/test/emails/embedded_email_15.txt +9 -0
  106. data/test/emails/embedded_email_16.txt +16 -0
  107. data/test/emails/embedded_email_17.txt +38 -0
  108. data/test/emails/embedded_email_18.txt +7 -0
  109. data/test/emails/embedded_email_19.txt +13 -0
  110. data/test/emails/embedded_email_2.txt +16 -0
  111. data/test/emails/embedded_email_3.txt +24 -0
  112. data/test/emails/embedded_email_4.txt +19 -0
  113. data/test/emails/embedded_email_5.txt +5 -0
  114. data/test/emails/embedded_email_6.txt +11 -0
  115. data/test/emails/embedded_email_7.txt +20 -0
  116. data/test/emails/embedded_email_8.txt +5 -0
  117. data/test/emails/embedded_email_9.txt +5 -0
  118. data/test/emails/embedded_email_chinese.txt +7 -0
  119. data/test/emails/embedded_email_dutch_1.txt +13 -0
  120. data/test/emails/embedded_email_dutch_2.txt +62 -0
  121. data/test/emails/embedded_email_french_1.txt +12 -0
  122. data/test/emails/embedded_email_french_2.txt +21 -0
  123. data/test/emails/embedded_email_german_1.txt +26 -0
  124. data/test/emails/embedded_email_german_2.txt +6 -0
  125. data/test/emails/embedded_email_german_3.txt +10 -0
  126. data/test/emails/embedded_email_german_4.txt +18 -0
  127. data/test/emails/embedded_email_german_5.txt +23 -0
  128. data/test/emails/embedded_email_german_6.txt +14 -0
  129. data/test/emails/embedded_email_italian.txt +31 -0
  130. data/test/emails/embedded_email_norwegian.txt +11 -0
  131. data/test/emails/embedded_email_polish_1.txt +34 -0
  132. data/test/emails/embedded_email_polish_2.txt +11 -0
  133. data/test/emails/embedded_email_portuguese.txt +18 -0
  134. data/test/emails/embedded_email_quote_text.txt +10 -0
  135. data/test/emails/embedded_email_russian_1.txt +27 -0
  136. data/test/emails/embedded_email_russian_2.txt +26 -0
  137. data/test/emails/embedded_email_spanish_1.txt +41 -0
  138. data/test/emails/embedded_email_spanish_2.txt +12 -0
  139. data/test/emails/embedded_email_swedish.txt +20 -0
  140. data/test/emails/embedded_email_ukrainian.txt +19 -0
  141. data/test/emails/forwarded_apple.txt +17 -0
  142. data/test/emails/forwarded_gmail.txt +17 -0
  143. data/test/emails/forwarded_message.txt +9 -0
  144. data/test/emails/normalize_line_endings.txt +4 -0
  145. data/test/emails/quote_and_text.txt +3 -0
  146. data/test/emails/quote_only.txt +1 -0
  147. data/test/emails/retains_spaces_and_formatting.txt +14 -0
  148. data/test/emails/signatures.txt +33 -0
  149. data/test/emails/spam_1.txt +75 -0
  150. data/test/emails/spam_2.txt +174 -0
  151. data/test/emails/strip.txt +10 -0
  152. data/test/emails/text_only.txt +1 -0
  153. data/test/emails/usenet.txt +9 -0
  154. data/test/embedded/email_headers_1.txt +12 -0
  155. data/test/embedded/email_headers_2.txt +8 -0
  156. data/test/embedded/email_headers_3.txt +16 -0
  157. data/test/embedded/email_headers_4.txt +15 -0
  158. data/test/embedded/embedded_email_10.txt +15 -0
  159. data/test/embedded/embedded_email_german_3.txt +6 -0
  160. data/test/embedded/embedded_email_spanish_2.txt +9 -0
  161. data/test/embedded/forwarded_apple.txt +13 -0
  162. data/test/embedded/forwarded_gmail.txt +14 -0
  163. data/test/embedded/forwarded_message.txt +8 -0
  164. data/test/matchers/does_not_contain_embedded_email.txt +5 -0
  165. data/test/test_email_matcher.rb +17 -0
  166. data/test/test_email_reply_trimmer.rb +87 -0
  167. data/test/trimmed/delimiters.txt +3 -0
  168. data/test/trimmed/dual_embedded.txt +1 -0
  169. data/test/trimmed/email_headers_1.txt +1 -0
  170. data/test/trimmed/email_headers_2.txt +1 -0
  171. data/test/trimmed/email_headers_3.txt +1 -0
  172. data/test/trimmed/email_headers_4.txt +1 -0
  173. data/test/trimmed/email_headers_5.txt +11 -0
  174. data/test/trimmed/embedded_ception.txt +4 -0
  175. data/test/trimmed/embedded_email_1.txt +1 -0
  176. data/test/trimmed/embedded_email_10.txt +1 -0
  177. data/test/trimmed/embedded_email_11.txt +1 -0
  178. data/test/trimmed/embedded_email_12.txt +1 -0
  179. data/test/trimmed/embedded_email_13.txt +3 -0
  180. data/test/trimmed/embedded_email_14.txt +3 -0
  181. data/test/trimmed/embedded_email_15.txt +3 -0
  182. data/test/trimmed/embedded_email_16.txt +11 -0
  183. data/test/trimmed/embedded_email_17.txt +35 -0
  184. data/test/trimmed/embedded_email_18.txt +5 -0
  185. data/test/trimmed/embedded_email_19.txt +13 -0
  186. data/test/trimmed/embedded_email_2.txt +3 -0
  187. data/test/trimmed/embedded_email_3.txt +7 -0
  188. data/test/trimmed/embedded_email_4.txt +2 -0
  189. data/test/trimmed/embedded_email_5.txt +1 -0
  190. data/test/trimmed/embedded_email_6.txt +7 -0
  191. data/test/trimmed/embedded_email_7.txt +10 -0
  192. data/test/trimmed/embedded_email_8.txt +1 -0
  193. data/test/trimmed/embedded_email_9.txt +1 -0
  194. data/test/trimmed/embedded_email_chinese.txt +2 -0
  195. data/test/trimmed/embedded_email_dutch_1.txt +1 -0
  196. data/test/trimmed/embedded_email_dutch_2.txt +2 -0
  197. data/test/trimmed/embedded_email_french_1.txt +1 -0
  198. data/test/trimmed/embedded_email_french_2.txt +1 -0
  199. data/test/trimmed/embedded_email_german_1.txt +1 -0
  200. data/test/trimmed/embedded_email_german_2.txt +1 -0
  201. data/test/trimmed/embedded_email_german_3.txt +1 -0
  202. data/test/trimmed/embedded_email_german_4.txt +1 -0
  203. data/test/trimmed/embedded_email_german_5.txt +1 -0
  204. data/test/trimmed/embedded_email_german_6.txt +4 -0
  205. data/test/trimmed/embedded_email_italian.txt +1 -0
  206. data/test/trimmed/embedded_email_norwegian.txt +1 -0
  207. data/test/trimmed/embedded_email_polish_1.txt +1 -0
  208. data/test/trimmed/embedded_email_polish_2.txt +2 -0
  209. data/test/trimmed/embedded_email_portuguese.txt +2 -0
  210. data/test/trimmed/embedded_email_quote_text.txt +2 -0
  211. data/test/trimmed/embedded_email_russian_1.txt +1 -0
  212. data/test/trimmed/embedded_email_russian_2.txt +1 -0
  213. data/test/trimmed/embedded_email_spanish_1.txt +6 -0
  214. data/test/trimmed/embedded_email_spanish_2.txt +1 -0
  215. data/test/trimmed/embedded_email_swedish.txt +9 -0
  216. data/test/trimmed/embedded_email_ukrainian.txt +1 -0
  217. data/test/trimmed/forwarded_apple.txt +1 -0
  218. data/test/trimmed/forwarded_gmail.txt +1 -0
  219. data/test/trimmed/forwarded_message.txt +1 -0
  220. data/test/trimmed/normalize_line_endings.txt +4 -0
  221. data/test/trimmed/quote_and_text.txt +3 -0
  222. data/test/trimmed/quote_only.txt +1 -0
  223. data/test/trimmed/retains_spaces_and_formatting.txt +14 -0
  224. data/test/trimmed/signatures.txt +1 -0
  225. data/test/trimmed/spam_1.txt +0 -0
  226. data/test/trimmed/spam_2.txt +21 -0
  227. data/test/trimmed/strip.txt +1 -0
  228. data/test/trimmed/text_only.txt +1 -0
  229. data/test/trimmed/usenet.txt +1 -0
  230. metadata +275 -0
@@ -0,0 +1,75 @@
1
+ > On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
2
+ >
3
+ >> On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
4
+ >>
5
+ >>> On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
6
+ >>>
7
+ >>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
8
+ >>>>
9
+ >>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
10
+ >>>>>
11
+ >>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
12
+ >>>>>>
13
+ >>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
14
+ >>>>>>>
15
+ >>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
16
+ >>>>>>>>
17
+ >>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
18
+ >>>>>>>>>
19
+ >>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
20
+ >>>>>>>>>>
21
+ >>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
22
+ >>>>>>>>>>>
23
+ >>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
24
+ >>>>>>>>>>>>
25
+ >>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
26
+ >>>>>>>>>>>>>
27
+ >>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
28
+ >>>>>>>>>>>>>>
29
+ >>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
30
+ >>>>>>>>>>>>>>>
31
+ >>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
32
+ >>>>>>>>>>>>>>>>
33
+ >>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
34
+ >>>>>>>>>>>>>>>>>
35
+ >>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
36
+ >>>>>>>>>>>>>>>>>>
37
+ >>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
38
+ >>>>>>>>>>>>>>>>>>>
39
+ >>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
40
+ >>>>>>>>>>>>>>>>>>>>
41
+ >>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
42
+ >>>>>>>>>>>>>>>>>>>>>
43
+ >>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
44
+ >>>>>>>>>>>>>>>>>>>>>>
45
+ >>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
46
+ >>>>>>>>>>>>>>>>>>>>>>>
47
+ >>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
48
+ >>>>>>>>>>>>>>>>>>>>>>>>
49
+ >>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
50
+ >>>>>>>>>>>>>>>>>>>>>>>>>
51
+ >>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
52
+ >>>>>>>>>>>>>>>>>>>>>>>>>>
53
+ >>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
54
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>
55
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
56
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>
57
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
58
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
59
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
60
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
61
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
62
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
63
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
64
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
65
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
66
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
67
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
68
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
69
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
70
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
71
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
72
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
73
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
74
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
75
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
@@ -0,0 +1,174 @@
1
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet dictum
2
+ lectus, at efficitur neque. Class aptent taciti sociosqu ad litora torquent per
3
+ conubia nostra, per inceptos himenaeos. Aenean dictum pulvinar tortor non
4
+ ultricies. Maecenas cursus lobortis dolor quis feugiat. Integer efficitur,
5
+ mauris sit amet lobortis consectetur, urna augue feugiat mi, et tempor dui
6
+ sapien vehicula dolor. Aenean sit amet ultrices tortor. Praesent vel porttitor
7
+ risus, eu fringilla nibh. Phasellus sollicitudin elit id tortor dapibus, at
8
+ euismod odio sodales. Ut est ex, pharetra malesuada dui maximus, ullamcorper
9
+ fringilla turpis. Nullam gravida, elit blandit commodo blandit, velit sem
10
+ ornare odio, eu ultricies arcu ex sit amet libero. Vestibulum eu fringilla
11
+ ante, nec blandit nunc.
12
+
13
+ Nullam nec viverra ipsum. Nullam semper eu urna id facilisis. Nam blandit
14
+ dictum eros, sit amet auctor dui fermentum a. Quisque finibus magna nisi, ac
15
+ hendrerit purus lacinia ut. Donec maximus, enim id tincidunt vulputate, libero
16
+ ex tempor elit, vitae sagittis libero leo sed leo. Quisque non gravida ex,
17
+ efficitur interdum neque. Interdum et malesuada fames ac ante ipsum primis in
18
+ faucibus. Phasellus rhoncus nisi vitae turpis bibendum luctus. Duis placerat
19
+ aliquam lectus, pellentesque commodo dolor hendrerit quis. Suspendisse ipsum
20
+ sapien, interdum ac felis ac, mattis varius neque. Maecenas nec risus sit amet
21
+ ex aliquam vestibulum. Maecenas a turpis et turpis volutpat congue.
22
+
23
+ > On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
24
+ >
25
+ >> Hello world!
26
+ >>
27
+ >> On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
28
+ >>
29
+ >>> Hello world!
30
+ >>>
31
+ >>> On Thu, Apr 30, 2020 at 10:07 AM, "someone" <someone@example.com> wrote:
32
+ >>>
33
+ >>>> Hello world!
34
+ >>>>
35
+ >>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
36
+ >>>>
37
+ >>>>> Hello world!
38
+ >>>>>
39
+ >>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
40
+ >>>>>
41
+ >>>>>> Hello world!
42
+ >>>>>>
43
+ >>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
44
+ >>>>>>
45
+ >>>>>>> Hello world!
46
+ >>>>>>>
47
+ >>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
48
+ >>>>>>>
49
+ >>>>>>>> Hello world!
50
+ >>>>>>>>
51
+ >>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
52
+ >>>>>>>>
53
+ >>>>>>>>> Hello world!
54
+ >>>>>>>>>
55
+ >>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
56
+ >>>>>>>>>
57
+ >>>>>>>>>> Hello world!
58
+ >>>>>>>>>>
59
+ >>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
60
+ >>>>>>>>>>
61
+ >>>>>>>>>>> Hello world!
62
+ >>>>>>>>>>>
63
+ >>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
64
+ >>>>>>>>>>>
65
+ >>>>>>>>>>>> Hello world!
66
+ >>>>>>>>>>>>
67
+ >>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
68
+ >>>>>>>>>>>>
69
+ >>>>>>>>>>>>> Hello world!
70
+ >>>>>>>>>>>>>
71
+ >>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
72
+ >>>>>>>>>>>>>
73
+ >>>>>>>>>>>>>> Hello world!
74
+ >>>>>>>>>>>>>>
75
+ >>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
76
+ >>>>>>>>>>>>>>
77
+ >>>>>>>>>>>>>>> Hello world!
78
+ >>>>>>>>>>>>>>>
79
+ >>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
80
+ >>>>>>>>>>>>>>>
81
+ >>>>>>>>>>>>>>>> Hello world!
82
+ >>>>>>>>>>>>>>>>
83
+ >>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
84
+ >>>>>>>>>>>>>>>>
85
+ >>>>>>>>>>>>>>>>> Hello world!
86
+ >>>>>>>>>>>>>>>>>
87
+ >>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
88
+ >>>>>>>>>>>>>>>>>
89
+ >>>>>>>>>>>>>>>>>> Hello world!
90
+ >>>>>>>>>>>>>>>>>>
91
+ >>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
92
+ >>>>>>>>>>>>>>>>>>
93
+ >>>>>>>>>>>>>>>>>>> Hello world!
94
+ >>>>>>>>>>>>>>>>>>>
95
+ >>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
96
+ >>>>>>>>>>>>>>>>>>>
97
+ >>>>>>>>>>>>>>>>>>>> Hello world!
98
+ >>>>>>>>>>>>>>>>>>>>
99
+ >>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
100
+ >>>>>>>>>>>>>>>>>>>>
101
+ >>>>>>>>>>>>>>>>>>>>> Hello world!
102
+ >>>>>>>>>>>>>>>>>>>>>
103
+ >>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
104
+ >>>>>>>>>>>>>>>>>>>>>
105
+ >>>>>>>>>>>>>>>>>>>>>> Hello world!
106
+ >>>>>>>>>>>>>>>>>>>>>>
107
+ >>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
108
+ >>>>>>>>>>>>>>>>>>>>>>
109
+ >>>>>>>>>>>>>>>>>>>>>>> Hello world!
110
+ >>>>>>>>>>>>>>>>>>>>>>>
111
+ >>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
112
+ >>>>>>>>>>>>>>>>>>>>>>>
113
+ >>>>>>>>>>>>>>>>>>>>>>>> Hello world!
114
+ >>>>>>>>>>>>>>>>>>>>>>>>
115
+ >>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
116
+ >>>>>>>>>>>>>>>>>>>>>>>>
117
+ >>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
118
+ >>>>>>>>>>>>>>>>>>>>>>>>>
119
+ >>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
120
+ >>>>>>>>>>>>>>>>>>>>>>>>>
121
+ >>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
122
+ >>>>>>>>>>>>>>>>>>>>>>>>>>
123
+ >>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
124
+ >>>>>>>>>>>>>>>>>>>>>>>>>>
125
+ >>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
126
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>
127
+ >>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
128
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>
129
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
130
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>
131
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
132
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>
133
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
134
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
135
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
136
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
137
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
138
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
139
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
140
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
141
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
142
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
143
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
144
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
145
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
146
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
147
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
148
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
149
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
150
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
151
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
152
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
153
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
154
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
155
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
156
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
157
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
158
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
159
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
160
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
161
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
162
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
163
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
164
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
165
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
166
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
167
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
168
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
169
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
170
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
171
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On Thu, Apr 30, 2020 at 10:06 AM, "someone" <someone@example.com> wrote:
172
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
173
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hello world!
174
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -0,0 +1,10 @@
1
+
2
+
3
+
4
+
5
+
6
+ Strip leading and trailing empty lines.
7
+
8
+
9
+
10
+
@@ -0,0 +1 @@
1
+ Email with only text.
@@ -0,0 +1,9 @@
1
+ Mal sehen was hier mit der Signatur passiert!
2
+
3
+ --
4
+ Mit lieben Grüßen
5
+
6
+ John Doe
7
+ http://blog.john.doe
8
+ www.facebook.com/johndoe
9
+ Mobil: +12 345 6789 012
@@ -0,0 +1,12 @@
1
+ *From:* Outlook user
2
+ *Sent:* 2016-01-27
3
+ *To:* info@discourse.org
4
+ *Subject:* Are you using Outlook?
5
+
6
+
7
+
8
+ Just some random text wich is part
9
+
10
+ of the embedded email...
11
+
12
+ Outlook user
@@ -0,0 +1,8 @@
1
+ From: Discourse <info@discourse.org.
2
+ Sent: Thursday, 28 January 2016 8:16 p.m.
3
+ To: Someone
4
+ Subject: (no subject)
5
+
6
+ Lorem ipsum.
7
+
8
+ Ipsor dolor sum met.
@@ -0,0 +1,16 @@
1
+ From: Some One <discuss@foo.bar<mailto:discuss@foo.bar>>
2
+ Reply-To: "For.bar" <reply+275e18486b01289e3250bebe85ef6496@members.foo.bar<mailto:reply+275e18486b01289e3250bebe85ef6496@members.foo.bar>>
3
+ Date: Monday, February 8, 2016 11:44 AM
4
+ To: Discourse <discourse@discourse.org<mailto:discourse@discourse.org>>
5
+ Subject: VIS
6
+
7
+
8
+ Here's an email with some very important stuff.
9
+
10
+
11
+ ________________________________
12
+ Reply here<http://foo.bar> or hit reply from your inbox to help members by sharing your ideas.
13
+ Mute this topic<http://42.wat> to stop getting updates, we'll send you the next one.
14
+
15
+
16
+ DO NOT FORWARD THIS EMAIL!
@@ -0,0 +1,15 @@
1
+ Da: Sally54721
2
+ Risposta: Testy McTesterson / Test
3
+ Data: giovedì 8 ottobre 2015 15:26
4
+ A: Testy McTesterson
5
+ Oggetto: Test | Issue (#3)
6
+
7
+ [@example](http://example.com/u/example)
8
+
9
+
10
+ Reply to this email directly or [view it on GitLab](http://git.example.com/example/Test/issues/3). {"@context":"[http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View](http://schema.org%22,%22@type%22:%22EmailMessage%22,%22action%22:%7B%22@type%22:%22ViewAction%22,%22name%22:%22View) Issue","url":"[http://git.example.com/example/Test/issues/3"}](http://git.example.com/example/Test/issues/3%22%7D)} You're receiving this notification because you are a member of the Testy McTesterson / Test project team.
11
+
12
+ --
13
+ Questo messaggio e' stato analizzato con Libra ESVA ed e' risultato non infetto.
14
+ [Clicca qui per segnalarlo come spam.](http://esva.example.com/cgi-bin/learn-msg.cgi?id=1234567890.ABCDEF)
15
+ [Clicca qui per metterlo in blacklist](http://esva.example.com/cgi-bin/learn-msg.cgi?blacklist=1&id=1234567890.ABCDEF)
@@ -0,0 +1,15 @@
1
+ From: Arpit Jalan <arpit.jalan@discourse.org<mailto:arpit.jalan@discourse.org>>
2
+ Sent: Thursday, February 4, 2016 10:05 AM
3
+ Subject: Meta Discourse update
4
+ To: Some One <foo@bar.com<mailto:foo@bar.com>>, Discourse Team <team@discourse.org<mailto:team@discourse.org>>
5
+
6
+
7
+
8
+ Hi Some One,
9
+
10
+ Time to update meta to the latest Discourse version!
11
+
12
+ Do you want me to take care of it?
13
+
14
+ Regards,
15
+ Arpit
@@ -0,0 +1,6 @@
1
+ Von: Discourse Team <team@discourse.org>
2
+ Gesendet: Don 11 Februar 2016 11:23
3
+ An: Some One <foo@bar.com>
4
+ Betreff: Some Subject
5
+
6
+ Hallo! Wie geht es Ihnen heute?
@@ -0,0 +1,9 @@
1
+ De: "Miguel" <foo@bar.es>
2
+ Enviado: =E2=80=8E16/=E2=80=8E02/=E2=80=8E2016 14:53
3
+ Para: "discourse" <discourse@discourse.org>
4
+ Asunto: [MP]Parser del email
5
+
6
+ Visita el tema o responde a este email para publicar.
7
+ Para no recibir m=C3=A1s notificaciones de este tema en particular, haz cli=
8
+ c aqu=C3=AD. Para darte de baja de estos emails, cambia tus preferencias
9
+ =
@@ -0,0 +1,13 @@
1
+ From: Foo Discourse <foo@discourse.org>
2
+ Subject: This email is going to be forwarded
3
+ Date: 01 January 2019 at 12:00:00 EET
4
+ To: bar@discourse.org
5
+
6
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi auctor
7
+ lacus in metus vehicula, non dictum mi consequat. Nunc eget quam sit
8
+ amet dolor scelerisque cursus. Etiam laoreet lectus a rutrum
9
+ sollicitudin. Nullam sit amet lorem id ante lobortis fringilla. Duis
10
+ dictum tempus sem et ultrices. Sed ac lectus ante. Vivamus interdum,
11
+ risus non tincidunt accumsan, purus mi accumsan dolor, vitae euismod
12
+ turpis orci ut est. Integer ut ante eu velit dignissim ullamcorper non
13
+ id nibh. Nulla auctor magna erat, et posuere sapien gravida convallis.
@@ -0,0 +1,14 @@
1
+ From: Foo Discourse <foo@discourse.org>
2
+ Date: Tue, Jan 01, 2019 at 12:00 PM
3
+ Subject: This email is going to be forwarded
4
+ To: <bar@discourse.org>
5
+
6
+
7
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi auctor
8
+ lacus in metus vehicula, non dictum mi consequat. Nunc eget quam sit
9
+ amet dolor scelerisque cursus. Etiam laoreet lectus a rutrum
10
+ sollicitudin. Nullam sit amet lorem id ante lobortis fringilla. Duis
11
+ dictum tempus sem et ultrices. Sed ac lectus ante. Vivamus interdum,
12
+ risus non tincidunt accumsan, purus mi accumsan dolor, vitae euismod
13
+ turpis orci ut est. Integer ut ante eu velit dignissim ullamcorper non
14
+ id nibh. Nulla auctor magna erat, et posuere sapien gravida convallis.
@@ -0,0 +1,8 @@
1
+ From: Some One <foo@bar.com>
2
+ Date: Thu, Jan 28, 2016 at 4:00 PM
3
+ Subject: Some subject that
4
+ spans over 2 lines
5
+ To: infod@discourse.org
6
+
7
+
8
+ This is a forwarded email. And just that.
@@ -0,0 +1,5 @@
1
+ > am 09.09.2017 um 21:42 sssssss
2
+ ßßßßßßßß fffffff
3
+
4
+ > in message from sssssss
5
+ ßßßßßßßß fffffff
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'minitest/autorun'
4
+ require 'runger_email_reply_trimmer'
5
+ require 'timeout'
6
+
7
+ class TestRungerEmailReplyTrimmer < Minitest::Test
8
+ def test_does_not_hang_when_no_embedded_email_is_found
9
+ Timeout.timeout(5) do
10
+ EmbeddedEmailMatcher.match?(example('does_not_contain_embedded_email.txt'))
11
+ end
12
+ end
13
+
14
+ def example(filename)
15
+ File.read("test/matchers/#{filename}").strip
16
+ end
17
+ end
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'minitest/autorun'
4
+ require 'runger_email_reply_trimmer'
5
+
6
+ class TestRungerEmailReplyTrimmer < Minitest::Test
7
+ EMAILS = Dir['test/emails/*.txt'].map { |path| File.basename(path) }
8
+ TRIMMED = Dir['test/trimmed/*.txt'].map { |path| File.basename(path) }
9
+ ELIDED = Dir['test/elided/*.txt'].map { |path| File.basename(path) }
10
+
11
+ EMBEDDED_EMAILS = %w[
12
+ email_headers_1
13
+ email_headers_2
14
+ email_headers_3
15
+ email_headers_4
16
+ embedded_email_10
17
+ embedded_email_german_3
18
+ embedded_email_spanish_2
19
+ forwarded_message
20
+ forwarded_gmail
21
+ forwarded_apple
22
+ ].freeze
23
+ def test_all_emails_have_a_matching_reply
24
+ assert_equal(EMAILS, TRIMMED, 'Files in /emails and /trimmed folders should match 1-to-1.')
25
+ end
26
+
27
+ def test_all_emails_have_a_matching_elided
28
+ assert_equal(EMAILS, ELIDED, 'Files in /emails and /elided folders should match 1-to-1.')
29
+ end
30
+
31
+ def test_normalize_line_endings_email_has_windows_line_endings
32
+ assert_match(/\r\n/, File.read('test/emails/normalize_line_endings.txt'))
33
+ end
34
+
35
+ def test_is_reply_at_end?
36
+ Timeout.timeout(1) { assert_nil(RungerEmailReplyTrimmer.send(:is_reply_at_end?, 'bq' * 100)) }
37
+ end
38
+
39
+ EMAILS.each do |filename|
40
+ name = File.basename(filename, '.txt')
41
+ define_method("test_#{name}") do
42
+ assert_equal(trimmed(filename), trim(filename), "[TRIMMED] EMAIL: #{filename}")
43
+ assert_equal(elided(filename), elide(filename), "[ELIDED] EMAIL: #{filename}")
44
+ end
45
+ end
46
+
47
+ EMBEDDED_EMAILS.each do |name|
48
+ filename = "#{name}.txt"
49
+ define_method("test_embedded_extraction_for_#{name}") do
50
+ e, b = extract_embedded_email(filename)
51
+ assert_equal(e, embedded(filename), "[EMBEDDED] EMAIL: #{filename}")
52
+ assert_equal(b, before(filename), "[BEFORE] EMAIL: #{filename}")
53
+ end
54
+ end
55
+
56
+ def trim(filename)
57
+ RungerEmailReplyTrimmer.trim(email(filename))
58
+ end
59
+
60
+ def elide(filename)
61
+ RungerEmailReplyTrimmer.trim(email(filename), true)[1]
62
+ end
63
+
64
+ def extract_embedded_email(filename)
65
+ RungerEmailReplyTrimmer.extract_embedded_email(email(filename))
66
+ end
67
+
68
+ def email(filename)
69
+ File.read("test/emails/#{filename}").strip
70
+ end
71
+
72
+ def trimmed(filename)
73
+ File.read("test/trimmed/#{filename}").strip
74
+ end
75
+
76
+ def elided(filename)
77
+ File.read("test/elided/#{filename}").strip
78
+ end
79
+
80
+ def embedded(filename)
81
+ File.read("test/embedded/#{filename}").strip
82
+ end
83
+
84
+ def before(filename)
85
+ File.read("test/before/#{filename}").strip
86
+ end
87
+ end
@@ -0,0 +1,3 @@
1
+ This is not a ---------- delimiter.
2
+
3
+ But there should be no delimiter after this line
@@ -0,0 +1 @@
1
+ This is the 3rd email.
@@ -0,0 +1 @@
1
+ This is a reply from Outlook!
@@ -0,0 +1 @@
1
+ This is a reply from Outlook!
@@ -0,0 +1 @@
1
+ This is the actual reply.
@@ -0,0 +1 @@
1
+ test
@@ -0,0 +1,11 @@
1
+ Hi Erlend,
2
+
3
+ I don’t know what a “legally recognised educational institution” means for you.
4
+
5
+ We’re based in Sweden and we provide education to our people across the globe.
6
+
7
+ We want to try Discourse in small scale first to see it will add value to our communities.
8
+
9
+ Best regards,
10
+
11
+ //Jef
@@ -0,0 +1,4 @@
1
+ This is the reply.
2
+
3
+ Thanks,
4
+ Some One
@@ -0,0 +1 @@
1
+ This is before the embedded email.
@@ -0,0 +1 @@
1
+ Thank you.
@@ -0,0 +1 @@
1
+ Before
@@ -0,0 +1 @@
1
+ One 1
@@ -0,0 +1,3 @@
1
+ yes we're fine
2
+
3
+ thanks
@@ -0,0 +1,3 @@
1
+ I just saw the standard plan has the slack integration.
2
+
3
+ Thank you!
@@ -0,0 +1,3 @@
1
+ [message body]
2
+
3
+ / Greetings
@@ -0,0 +1,11 @@
1
+ > From: "Albert Wagner" <alwagner@tcac.net>
2
+ >
3
+ > > Some guy at ibraheem@localhost(?) needs to be unsubscribed. I
4
+ > > keep getting bounces from his ISP everytime I post. Surely,
5
+ > > everyone else is getting the same?
6
+ >
7
+ > Surely it doesn't need to be said anymore, but I *still* am.
8
+ > What's happening with this?
9
+
10
+ Yep, me too, although I bet due to RubyConf/OOPSLA, it may be a little
11
+ longer yet...