bodyparts 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bodyparts.gemspec +2 -2
- data/lib/bodyparts.rb +1 -1
- data/spec/bodyparts_spec.rb +6 -0
- data/spec/emails.yml +7 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
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 = "0.1.
|
8
|
+
s.version = "0.1.4"
|
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-11}
|
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
data/spec/bodyparts_spec.rb
CHANGED
@@ -29,4 +29,10 @@ describe "BodyParts" do
|
|
29
29
|
message = FakeMessage.new_mail(Mail, generic[:headers])
|
30
30
|
BodyParts.find_reply_in(message.to_s).should == {:new_message => generic[:reply_text], :rest_of_thread => generic[:rest_of_thread].gsub("\n", "\r\n").strip}
|
31
31
|
end
|
32
|
+
|
33
|
+
it "should return the entire message as a new message if there isn't a reply" do
|
34
|
+
no_reply = FakeMessage.fake_emails[:no_reply]
|
35
|
+
message = FakeMessage.new_mail(Mail, no_reply[:headers])
|
36
|
+
BodyParts.find_reply_in(message.to_s)[:new_message].should == no_reply[:reply_text]
|
37
|
+
end
|
32
38
|
end
|
data/spec/emails.yml
CHANGED
@@ -128,4 +128,10 @@
|
|
128
128
|
On Tue, Jun 8, 2010 at 10:19 AM, Jang Bifflez <
|
129
129
|
palpatine@thedarkside.com> wrote:
|
130
130
|
|
131
|
-
> can you ask vader if he wants to go through with that gig at Vicks VapoRub
|
131
|
+
> can you ask vader if he wants to go through with that gig at Vicks VapoRub
|
132
|
+
:no_reply:
|
133
|
+
:reply_text:
|
134
|
+
hay guys
|
135
|
+
:headers:
|
136
|
+
body:
|
137
|
+
hay guys
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
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-11 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|