tr_email_reply_parser 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/LICENSE +22 -0
- data/README.md +68 -0
- data/Rakefile +135 -0
- data/lib/tr_email_reply_parser.rb +464 -0
- data/test/email_reply_parser_test.rb +441 -0
- data/test/emails/correct_sig.txt +4 -0
- data/test/emails/email_1_1.txt +13 -0
- data/test/emails/email_1_2.txt +51 -0
- data/test/emails/email_1_3.txt +55 -0
- data/test/emails/email_1_4.txt +5 -0
- data/test/emails/email_1_5.txt +15 -0
- data/test/emails/email_1_6.txt +15 -0
- data/test/emails/email_1_7.txt +12 -0
- data/test/emails/email_1_8.txt +6 -0
- data/test/emails/email_1_9.txt +9 -0
- data/test/emails/email_2_1.txt +25 -0
- data/test/emails/email_2_2.txt +10 -0
- data/test/emails/email_2_3.txt +14 -0
- data/test/emails/email_2_4.txt +14 -0
- data/test/emails/email_2_5.txt +15 -0
- data/test/emails/email_2_6.txt +11 -0
- data/test/emails/email_2_7.txt +5 -0
- data/test/emails/email_2_8.txt +4 -0
- data/test/emails/email_2_9.txt +9 -0
- data/test/emails/email_2nd_paragraph_starting_with_on.txt +12 -0
- data/test/emails/email_BlackBerry.txt +3 -0
- data/test/emails/email_bullets.txt +22 -0
- data/test/emails/email_from_address_in_quote_header.txt +12 -0
- data/test/emails/email_from_name_in_quote_header.txt +12 -0
- data/test/emails/email_hyphens.txt +5 -0
- data/test/emails/email_iPhone.txt +3 -0
- data/test/emails/email_mentions_own_email_address.txt +6 -0
- data/test/emails/email_mentions_own_name.txt +6 -0
- data/test/emails/email_multi_word_sent_from_my_mobile_device.txt +3 -0
- data/test/emails/email_multiline_quote_header_es_mx.txt +8 -0
- data/test/emails/email_multiline_quote_header_fr.txt +8 -0
- data/test/emails/email_multiline_quote_header_from_first.txt +11 -0
- data/test/emails/email_multiline_quote_header_from_replyto_date_to_subject.txt +12 -0
- data/test/emails/email_multiline_quote_header_from_to_date_subject.txt +11 -0
- data/test/emails/email_multiline_quote_header_none.txt +11 -0
- data/test/emails/email_multiline_quote_header_pt_br.txt +8 -0
- data/test/emails/email_multiline_quote_header_with_asterisks.txt +21 -0
- data/test/emails/email_multiline_quote_header_with_cc.txt +9 -0
- data/test/emails/email_multiline_quote_header_with_multiline_headers.txt +14 -0
- data/test/emails/email_no_signature_deliminator.txt +7 -0
- data/test/emails/email_no_signature_deliminator_adds_a_middle_initial.txt +7 -0
- data/test/emails/email_one_is_not_on.txt +10 -0
- data/test/emails/email_sent_from_my_not_signature.txt +3 -0
- data/test/emails/email_was_showing_as_nothing_visible.txt +13 -0
- data/test/emails/new_content/email_1_2.txt +28 -0
- data/tr_email_reply_parser.gemspec +123 -0
- metadata +143 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
Foo!
|
2
|
+
|
3
|
+
From: john@example.com
|
4
|
+
Reply-To: john@example.com
|
5
|
+
Sent: Tue, 2 Oct 2012 02:35:10 +0000
|
6
|
+
To: shelly@example.com
|
7
|
+
Subject: Tell us what you learned.
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
Thank you for recently participating in our class. We're interested in feedback. Please reply to this email.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Outlook with a reply
|
2
|
+
|
3
|
+
*From:* Google Apps Sync Team [mailto:mail-noreply@google.com]
|
4
|
+
*Sent:* Thursday, February 09, 2012 1:36 PM
|
5
|
+
*To:* jow@xxxx.com
|
6
|
+
*Subject:* Google Apps Sync was updated!
|
7
|
+
|
8
|
+
|
9
|
+
Dear Google Apps Sync user,
|
10
|
+
|
11
|
+
Google Apps Sync for Microsoft Outlook® was recently updated. Your computer
|
12
|
+
now has the latest version (version 2.5). This release includes bug fixes
|
13
|
+
to improve product reliability. For more information about these and other
|
14
|
+
changes, please see the help article here:
|
15
|
+
|
16
|
+
http://www.google.com/support/a/bin/answer.py?answer=153463
|
17
|
+
|
18
|
+
Sincerely,
|
19
|
+
|
20
|
+
The Google Apps Sync Team.
|
21
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Foo
|
2
|
+
|
3
|
+
Subject: [ERROR] Example unavailable:
|
4
|
+
(ExampleClassName::SomeError) "Etiam dignissim imperdiet metus.
|
5
|
+
error, unexpected $duh near 't'"
|
6
|
+
Date: Fri, 01 Feb 2013 07:50:06 +0000
|
7
|
+
cc: esther@example.com
|
8
|
+
mathias@example.com
|
9
|
+
ok@example.com
|
10
|
+
From: Application Error <noreply@example.com>
|
11
|
+
Reply-To: Example <noreply@example.com>
|
12
|
+
To: alert@example.com
|
13
|
+
|
14
|
+
Thank you for recently participating in our class. We're interested in feedback. Please reply to this email.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
On Friday, one achievement I had was learning a new technology that allows us
|
2
|
+
to keep UI elements and events separated from the software on the
|
3
|
+
server side, which should allow for more flexible UI code and
|
4
|
+
decreased chances of code becoming a swarm of angry hornets. I've
|
5
|
+
been transparent about the initial increased development time while
|
6
|
+
learning the technology.
|
7
|
+
|
8
|
+
On Wed, Apr 4, 2012 at 9:32 AM, Bob Jones <bjones@gmail.com> wrote:
|
9
|
+
> We are still very interested in achievements you’ve had from participating
|
10
|
+
> in our initiative. When you have a chance, please reply to this
|
11
|
+
> email and describe what you have done.
|
12
|
+
>
|
13
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Hi,
|
2
|
+
|
3
|
+
You can list the keys for the bucket and call delete for each. Or if you
|
4
|
+
put the keys (and kept track of them in your test) you can delete them
|
5
|
+
one at a time (without incurring the cost of calling list first.)
|
6
|
+
|
7
|
+
Something like:
|
8
|
+
|
9
|
+
String bucket = "my_bucket";
|
10
|
+
BucketResponse bucketResponse = riakClient.listBucket(bucket);
|
11
|
+
RiakBucketInfo bucketInfo = bucketResponse.getBucketInfo();
|
12
|
+
|
13
|
+
for(String key : bucketInfo.getKeys()) {
|
14
|
+
riakClient.delete(bucket, key);
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
would do it.
|
19
|
+
|
20
|
+
See also
|
21
|
+
|
22
|
+
http://wiki.basho.com/REST-API.html#Bucket-operations
|
23
|
+
|
24
|
+
which says
|
25
|
+
|
26
|
+
"At the moment there is no straightforward way to delete an entire
|
27
|
+
Bucket. There is, however, an open ticket for the feature. To delete all
|
28
|
+
the keys in a bucket, you'll need to delete them all individually."
|
@@ -0,0 +1,123 @@
|
|
1
|
+
$LOAD_PATH.unshift '.'
|
2
|
+
require 'lib/tr_email_reply_parser'
|
3
|
+
|
4
|
+
## This is the rakegem gemspec template. Make sure you read and understand
|
5
|
+
## all of the comments. Some sections require modification, and others can
|
6
|
+
## be deleted if you don't need them. Once you understand the contents of
|
7
|
+
## this file, feel free to delete any comments that begin with two hash marks.
|
8
|
+
## You can find comprehensive Gem::Specification documentation, at
|
9
|
+
## http://docs.rubygems.org/read/chapter/20
|
10
|
+
Gem::Specification.new do |s|
|
11
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
12
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
|
+
s.rubygems_version = '1.3.5'
|
14
|
+
|
15
|
+
## Leave these as is they will be modified for you by the rake gemspec task.
|
16
|
+
## If your rubyforge_project name is different, then edit it and comment out
|
17
|
+
## the sub! line in the Rakefile
|
18
|
+
s.name = 'tr_email_reply_parser'
|
19
|
+
s.version = EmailReplyParser::VERSION
|
20
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
21
|
+
s.rubyforge_project = 'tr_email_reply_parser'
|
22
|
+
|
23
|
+
## Make sure your summary is short. The description may be as long
|
24
|
+
## as you like.
|
25
|
+
s.summary = "Email Reply Parser"
|
26
|
+
s.description = "EmailReplyParser is a small library to parse plain text email content to return only the reply."
|
27
|
+
|
28
|
+
## List the primary authors. If there are a bunch of authors, it's probably
|
29
|
+
## better to set the email to an email list or something. If you don't have
|
30
|
+
## a custom homepage, consider using your GitHub URL or the like.
|
31
|
+
s.authors = ["Rick Olson"]
|
32
|
+
s.email = 'technoweenie@gmail.com'
|
33
|
+
s.homepage = 'http://github.com/github/email_reply_parser'
|
34
|
+
|
35
|
+
## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
|
36
|
+
## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
|
37
|
+
s.require_paths = %w[lib]
|
38
|
+
|
39
|
+
## This sections is only necessary if you have C extensions.
|
40
|
+
#s.require_paths << 'ext'
|
41
|
+
#s.extensions = %w[ext/extconf.rb]
|
42
|
+
|
43
|
+
## If your gem includes any executables, list them here.
|
44
|
+
#s.executables = ["name"]
|
45
|
+
#s.default_executable = 'name'
|
46
|
+
|
47
|
+
## Specify any RDoc options here. You'll want to add your README and
|
48
|
+
## LICENSE files to the extra_rdoc_files list.
|
49
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
50
|
+
s.extra_rdoc_files = %w[README.md LICENSE]
|
51
|
+
|
52
|
+
## List your runtime dependencies here. Runtime dependencies are those
|
53
|
+
## that are needed for an end user to actually USE your code.
|
54
|
+
#s.add_dependency('DEPNAME', [">= 1.1.0", "< 2.0.0"])
|
55
|
+
|
56
|
+
## List your development dependencies here. Development dependencies are
|
57
|
+
## those that are only needed during development
|
58
|
+
#s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
|
59
|
+
|
60
|
+
## Leave this section as-is. It will be automatically generated from the
|
61
|
+
## contents of your Git repository via the gemspec task. DO NOT REMOVE
|
62
|
+
## THE MANIFEST COMMENTS, they are used as delimiters by the task.
|
63
|
+
# = MANIFEST =
|
64
|
+
s.files = %w[
|
65
|
+
LICENSE
|
66
|
+
README.md
|
67
|
+
Rakefile
|
68
|
+
lib/tr_email_reply_parser.rb
|
69
|
+
test/email_reply_parser_test.rb
|
70
|
+
test/emails/correct_sig.txt
|
71
|
+
test/emails/email_1_1.txt
|
72
|
+
test/emails/email_1_2.txt
|
73
|
+
test/emails/email_1_3.txt
|
74
|
+
test/emails/email_1_4.txt
|
75
|
+
test/emails/email_1_5.txt
|
76
|
+
test/emails/email_1_6.txt
|
77
|
+
test/emails/email_1_7.txt
|
78
|
+
test/emails/email_1_8.txt
|
79
|
+
test/emails/email_1_9.txt
|
80
|
+
test/emails/email_2_1.txt
|
81
|
+
test/emails/email_2_2.txt
|
82
|
+
test/emails/email_2_3.txt
|
83
|
+
test/emails/email_2_4.txt
|
84
|
+
test/emails/email_2_5.txt
|
85
|
+
test/emails/email_2_6.txt
|
86
|
+
test/emails/email_2_7.txt
|
87
|
+
test/emails/email_2_8.txt
|
88
|
+
test/emails/email_2_9.txt
|
89
|
+
test/emails/email_2nd_paragraph_starting_with_on.txt
|
90
|
+
test/emails/email_BlackBerry.txt
|
91
|
+
test/emails/email_bullets.txt
|
92
|
+
test/emails/email_from_address_in_quote_header.txt
|
93
|
+
test/emails/email_from_name_in_quote_header.txt
|
94
|
+
test/emails/email_hyphens.txt
|
95
|
+
test/emails/email_iPhone.txt
|
96
|
+
test/emails/email_mentions_own_email_address.txt
|
97
|
+
test/emails/email_mentions_own_name.txt
|
98
|
+
test/emails/email_multi_word_sent_from_my_mobile_device.txt
|
99
|
+
test/emails/email_multiline_quote_header_es_mx.txt
|
100
|
+
test/emails/email_multiline_quote_header_fr.txt
|
101
|
+
test/emails/email_multiline_quote_header_from_first.txt
|
102
|
+
test/emails/email_multiline_quote_header_from_replyto_date_to_subject.txt
|
103
|
+
test/emails/email_multiline_quote_header_from_to_date_subject.txt
|
104
|
+
test/emails/email_multiline_quote_header_none.txt
|
105
|
+
test/emails/email_multiline_quote_header_pt_br.txt
|
106
|
+
test/emails/email_multiline_quote_header_with_asterisks.txt
|
107
|
+
test/emails/email_multiline_quote_header_with_cc.txt
|
108
|
+
test/emails/email_multiline_quote_header_with_multiline_headers.txt
|
109
|
+
test/emails/email_no_signature_deliminator.txt
|
110
|
+
test/emails/email_no_signature_deliminator_adds_a_middle_initial.txt
|
111
|
+
test/emails/email_one_is_not_on.txt
|
112
|
+
test/emails/email_sent_from_my_not_signature.txt
|
113
|
+
test/emails/email_was_showing_as_nothing_visible.txt
|
114
|
+
test/emails/new_content/email_1_2.txt
|
115
|
+
tr_email_reply_parser.gemspec
|
116
|
+
]
|
117
|
+
# = MANIFEST =
|
118
|
+
|
119
|
+
## Test files will be grabbed from the file list. Make sure the path glob
|
120
|
+
## matches what you actually use.
|
121
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
122
|
+
end
|
123
|
+
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tr_email_reply_parser
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rick Olson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: EmailReplyParser is a small library to parse plain text email content
|
14
|
+
to return only the reply.
|
15
|
+
email: technoweenie@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files:
|
19
|
+
- README.md
|
20
|
+
- LICENSE
|
21
|
+
files:
|
22
|
+
- LICENSE
|
23
|
+
- README.md
|
24
|
+
- Rakefile
|
25
|
+
- lib/tr_email_reply_parser.rb
|
26
|
+
- test/email_reply_parser_test.rb
|
27
|
+
- test/emails/correct_sig.txt
|
28
|
+
- test/emails/email_1_1.txt
|
29
|
+
- test/emails/email_1_2.txt
|
30
|
+
- test/emails/email_1_3.txt
|
31
|
+
- test/emails/email_1_4.txt
|
32
|
+
- test/emails/email_1_5.txt
|
33
|
+
- test/emails/email_1_6.txt
|
34
|
+
- test/emails/email_1_7.txt
|
35
|
+
- test/emails/email_1_8.txt
|
36
|
+
- test/emails/email_1_9.txt
|
37
|
+
- test/emails/email_2_1.txt
|
38
|
+
- test/emails/email_2_2.txt
|
39
|
+
- test/emails/email_2_3.txt
|
40
|
+
- test/emails/email_2_4.txt
|
41
|
+
- test/emails/email_2_5.txt
|
42
|
+
- test/emails/email_2_6.txt
|
43
|
+
- test/emails/email_2_7.txt
|
44
|
+
- test/emails/email_2_8.txt
|
45
|
+
- test/emails/email_2_9.txt
|
46
|
+
- test/emails/email_2nd_paragraph_starting_with_on.txt
|
47
|
+
- test/emails/email_BlackBerry.txt
|
48
|
+
- test/emails/email_bullets.txt
|
49
|
+
- test/emails/email_from_address_in_quote_header.txt
|
50
|
+
- test/emails/email_from_name_in_quote_header.txt
|
51
|
+
- test/emails/email_hyphens.txt
|
52
|
+
- test/emails/email_iPhone.txt
|
53
|
+
- test/emails/email_mentions_own_email_address.txt
|
54
|
+
- test/emails/email_mentions_own_name.txt
|
55
|
+
- test/emails/email_multi_word_sent_from_my_mobile_device.txt
|
56
|
+
- test/emails/email_multiline_quote_header_es_mx.txt
|
57
|
+
- test/emails/email_multiline_quote_header_fr.txt
|
58
|
+
- test/emails/email_multiline_quote_header_from_first.txt
|
59
|
+
- test/emails/email_multiline_quote_header_from_replyto_date_to_subject.txt
|
60
|
+
- test/emails/email_multiline_quote_header_from_to_date_subject.txt
|
61
|
+
- test/emails/email_multiline_quote_header_none.txt
|
62
|
+
- test/emails/email_multiline_quote_header_pt_br.txt
|
63
|
+
- test/emails/email_multiline_quote_header_with_asterisks.txt
|
64
|
+
- test/emails/email_multiline_quote_header_with_cc.txt
|
65
|
+
- test/emails/email_multiline_quote_header_with_multiline_headers.txt
|
66
|
+
- test/emails/email_no_signature_deliminator.txt
|
67
|
+
- test/emails/email_no_signature_deliminator_adds_a_middle_initial.txt
|
68
|
+
- test/emails/email_one_is_not_on.txt
|
69
|
+
- test/emails/email_sent_from_my_not_signature.txt
|
70
|
+
- test/emails/email_was_showing_as_nothing_visible.txt
|
71
|
+
- test/emails/new_content/email_1_2.txt
|
72
|
+
- tr_email_reply_parser.gemspec
|
73
|
+
homepage: http://github.com/github/email_reply_parser
|
74
|
+
licenses: []
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options:
|
78
|
+
- --charset=UTF-8
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ! '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project: tr_email_reply_parser
|
93
|
+
rubygems_version: 2.0.6
|
94
|
+
signing_key:
|
95
|
+
specification_version: 2
|
96
|
+
summary: Email Reply Parser
|
97
|
+
test_files:
|
98
|
+
- test/email_reply_parser_test.rb
|
99
|
+
- test/emails/correct_sig.txt
|
100
|
+
- test/emails/email_1_1.txt
|
101
|
+
- test/emails/email_1_2.txt
|
102
|
+
- test/emails/email_1_3.txt
|
103
|
+
- test/emails/email_1_4.txt
|
104
|
+
- test/emails/email_1_5.txt
|
105
|
+
- test/emails/email_1_6.txt
|
106
|
+
- test/emails/email_1_7.txt
|
107
|
+
- test/emails/email_1_8.txt
|
108
|
+
- test/emails/email_1_9.txt
|
109
|
+
- test/emails/email_2_1.txt
|
110
|
+
- test/emails/email_2_2.txt
|
111
|
+
- test/emails/email_2_3.txt
|
112
|
+
- test/emails/email_2_4.txt
|
113
|
+
- test/emails/email_2_5.txt
|
114
|
+
- test/emails/email_2_6.txt
|
115
|
+
- test/emails/email_2_7.txt
|
116
|
+
- test/emails/email_2_8.txt
|
117
|
+
- test/emails/email_2_9.txt
|
118
|
+
- test/emails/email_2nd_paragraph_starting_with_on.txt
|
119
|
+
- test/emails/email_BlackBerry.txt
|
120
|
+
- test/emails/email_bullets.txt
|
121
|
+
- test/emails/email_from_address_in_quote_header.txt
|
122
|
+
- test/emails/email_from_name_in_quote_header.txt
|
123
|
+
- test/emails/email_hyphens.txt
|
124
|
+
- test/emails/email_iPhone.txt
|
125
|
+
- test/emails/email_mentions_own_email_address.txt
|
126
|
+
- test/emails/email_mentions_own_name.txt
|
127
|
+
- test/emails/email_multi_word_sent_from_my_mobile_device.txt
|
128
|
+
- test/emails/email_multiline_quote_header_es_mx.txt
|
129
|
+
- test/emails/email_multiline_quote_header_fr.txt
|
130
|
+
- test/emails/email_multiline_quote_header_from_first.txt
|
131
|
+
- test/emails/email_multiline_quote_header_from_replyto_date_to_subject.txt
|
132
|
+
- test/emails/email_multiline_quote_header_from_to_date_subject.txt
|
133
|
+
- test/emails/email_multiline_quote_header_none.txt
|
134
|
+
- test/emails/email_multiline_quote_header_pt_br.txt
|
135
|
+
- test/emails/email_multiline_quote_header_with_asterisks.txt
|
136
|
+
- test/emails/email_multiline_quote_header_with_cc.txt
|
137
|
+
- test/emails/email_multiline_quote_header_with_multiline_headers.txt
|
138
|
+
- test/emails/email_no_signature_deliminator.txt
|
139
|
+
- test/emails/email_no_signature_deliminator_adds_a_middle_initial.txt
|
140
|
+
- test/emails/email_one_is_not_on.txt
|
141
|
+
- test/emails/email_sent_from_my_not_signature.txt
|
142
|
+
- test/emails/email_was_showing_as_nothing_visible.txt
|
143
|
+
- test/emails/new_content/email_1_2.txt
|