bodyparts 0.1.9 → 1.2.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.
- data/README.rdoc +47 -5
- data/VERSION +1 -1
- data/bodyparts.gemspec +2 -2
- data/lib/bodyparts.rb +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
|
@@ -1,11 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
<h1>BodyParts</h1> Splits the body of replied email messages into the actual new message and the included reply chain.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
== Usage
|
|
3
|
+
h2. Usage
|
|
6
4
|
|
|
7
5
|
BodyParts.find_reply_in( valid raw email string, TMail or Mail object)
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
h2. Example
|
|
8
|
+
|
|
9
|
+
Given that you have the following raw email:
|
|
10
|
+
|
|
11
|
+
<pre>
|
|
12
|
+
<code>
|
|
13
|
+
MIME-Version: 1.0
|
|
14
|
+
Received: by 10.231.176.6 with HTTP; Tue, 22 Jun 2010 10:37:09 -0700 (PDT)
|
|
15
|
+
In-Reply-To: <AANLkTilVGBfgiQr1vdF17qit8eyZ3nwYjqg3nDCiRknZ@mail.gmail.com>
|
|
16
|
+
References: <AANLkTilVGBfgiQr1vdF17qit8eyZ3nwYjqg3nDCiRknZ@mail.gmail.com>
|
|
17
|
+
Date: Tue, 22 Jun 2010 10:37:09 -0700
|
|
18
|
+
Delivered-To: mogden@gmail.com
|
|
19
|
+
Message-ID: <AANLkTil7bf681WP6s5NTEyZeCVBtfL_DI6mdjXN9ZeTR@mail.gmail.com>
|
|
20
|
+
Subject: Re: how is babby formed?
|
|
21
|
+
From: Max Ogden <mogden@gmail.com>
|
|
22
|
+
To: Max Ogden <mogden@gmail.com>
|
|
23
|
+
Content-Type: multipart/alternative; boundary=0016361e87c2efdb680489a1de8e
|
|
24
|
+
|
|
25
|
+
--0016361e87c2efdb680489a1de8e
|
|
26
|
+
Content-Type: text/plain; charset=ISO-8859-1
|
|
27
|
+
|
|
28
|
+
i saw on the news this mroing
|
|
29
|
+
|
|
30
|
+
On Tue, Jun 22, 2010 at 10:36 AM, Max Ogden <mogden@gmail.com> wrote:
|
|
31
|
+
|
|
32
|
+
> how girl get pragnent?
|
|
33
|
+
|
|
34
|
+
--0016361e87c2efdb680489a1de8e
|
|
35
|
+
Content-Type: text/html; charset=ISO-8859-1
|
|
36
|
+
Content-Transfer-Encoding: quoted-printable
|
|
37
|
+
|
|
38
|
+
i saw on the news this mroing<br><br><div class=3D"gmail_quote">On Tue, Jun=
|
|
39
|
+
22, 2010 at 10:36 AM, Max Ogden <span dir=3D"ltr"><<a href=3D"mailto:mo=
|
|
40
|
+
gden@gmail.com">mogden@gmail.com</a>></span> wrote:<br><blockquote class=
|
|
41
|
+
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
|
|
42
|
+
ing-left:1ex;">
|
|
43
|
+
how girl get pragnent?
|
|
44
|
+
</blockquote></div><br>
|
|
45
|
+
|
|
46
|
+
--0016361e87c2efdb680489a1de8e--
|
|
47
|
+
</code>
|
|
48
|
+
</pre>
|
|
49
|
+
|
|
50
|
+
h2. Copyright
|
|
10
51
|
|
|
11
52
|
Copyright (c) 2010 Max Ogden. See LICENSE for details.
|
|
53
|
+
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1.2.0
|
data/bodyparts.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{bodyparts}
|
|
8
|
-
s.version = "
|
|
8
|
+
s.version = "1.2.0"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Max Ogden"]
|
|
12
|
-
s.date = %q{2010-06-
|
|
12
|
+
s.date = %q{2010-06-22}
|
|
13
13
|
s.description = %q{Separates new messages from included reply chains in the body of emails}
|
|
14
14
|
s.email = %q{max@maxogden.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/bodyparts.rb
CHANGED
|
@@ -26,8 +26,8 @@ class BodyParts
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def self.extract_mail_attributes(mail_object)
|
|
29
|
-
if mail_object.find_first_mime_type('text/plain')
|
|
30
|
-
part =
|
|
29
|
+
if plain_part = mail_object.find_first_mime_type('text/plain')
|
|
30
|
+
part = plain_part
|
|
31
31
|
else
|
|
32
32
|
part = mail_object
|
|
33
33
|
end
|
metadata
CHANGED
|
@@ -3,10 +3,10 @@ name: bodyparts
|
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
|
5
5
|
segments:
|
|
6
|
-
- 0
|
|
7
6
|
- 1
|
|
8
|
-
-
|
|
9
|
-
|
|
7
|
+
- 2
|
|
8
|
+
- 0
|
|
9
|
+
version: 1.2.0
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Max Ogden
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-06-
|
|
17
|
+
date: 2010-06-22 00:00:00 -07:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|