extended_email_reply_parser 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/extended_email_reply_parser/version.rb +1 -1
- data/lib/extended_email_reply_parser.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 973b3edc0195910548a7a07712dd593a1a85eaf5
|
4
|
+
data.tar.gz: 978d70f446b5c794029d00ee7692689eba284205
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 519d870958f4ffee3a4e89e9976c0d12bf48f71919871db62795225046ef789da590d77b79e8f8fe72cee38d0ba4b43873912584f849a7604f4b1274aa94b0f5
|
7
|
+
data.tar.gz: ddd1e82ecd562dfcd99a25e9a2abd9435835e2625111a9b68ebb339a64eec918cfce8608ad2bd9d0c5a175f6fbe173fe4f94015a034d20a42e0b949fda927d3c
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
10
10
|
### Removed
|
11
11
|
### Fixed
|
12
12
|
|
13
|
+
|
14
|
+
## ExtendedEmailReplyParser 0.3.0 (2016-07-22)
|
15
|
+
### Added
|
16
|
+
- `ExtendedEmailReplyParser#extract_text(message)` as alternative to `message.extract_text` in order to indicate where the method comes from. When using `message.extract_text` one is lead to look for the definition in `Mail::Message` directly.
|
17
|
+
|
13
18
|
## ExtendedEmailReplyParser 0.2.0 (2016-07-22)
|
14
19
|
### Added
|
15
20
|
- `Parsers::Base#hide_everything_after(expressions)` is useful when email clients do not quote the previous conversation. This parser method hides everything lead by a series of expressions, e.g. `hide_everything_after %w(From: Sent: To:)`.
|
@@ -40,6 +40,23 @@ module ExtendedEmailReplyParser
|
|
40
40
|
Mail.read email_file_path
|
41
41
|
end
|
42
42
|
|
43
|
+
# Extract the body text from the given Mail::Message.
|
44
|
+
#
|
45
|
+
# ExtendedEmailReplyParser.extract_text message
|
46
|
+
# ExtendedEmailReplyParser.extract_text '/path/to/email.eml'
|
47
|
+
#
|
48
|
+
# This is the same as:
|
49
|
+
#
|
50
|
+
# message.extract_text
|
51
|
+
#
|
52
|
+
def self.extract_text(message_or_path)
|
53
|
+
if message_or_path.kind_of? Mail::Message
|
54
|
+
message_or_path.extract_text
|
55
|
+
elsif message_or_path.kind_of? String and File.file? message_or_path
|
56
|
+
Mail.read(message_or_path).extract_text
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
43
60
|
# This parses the given object, i.e. removes quoted replies etc.
|
44
61
|
#
|
45
62
|
# Examples:
|