attachments 0.0.10 → 0.0.11
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 +4 -0
- data/VERSION +1 -1
- data/lib/attachments/extract.rb +10 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -18,6 +18,10 @@ times faster at decoding large attachments if you us ruby 1.9 instead of 1.8.
|
|
18
18
|
|
19
19
|
== NEW STUFF:
|
20
20
|
|
21
|
+
Version 0.0.11
|
22
|
+
|
23
|
+
* A message object from the mail gem library may now be passed to parse
|
24
|
+
|
21
25
|
Version 0.0.10
|
22
26
|
|
23
27
|
* Find text body even if the mail is not multipart
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/lib/attachments/extract.rb
CHANGED
@@ -52,7 +52,11 @@ module Attachments
|
|
52
52
|
nil
|
53
53
|
end
|
54
54
|
|
55
|
-
|
55
|
+
if content
|
56
|
+
parse_data content
|
57
|
+
elsif hash[:mail]
|
58
|
+
parse_mail hash[:mail]
|
59
|
+
end
|
56
60
|
end
|
57
61
|
|
58
62
|
def parse_file filename
|
@@ -62,8 +66,12 @@ module Attachments
|
|
62
66
|
end
|
63
67
|
|
64
68
|
def parse_data raw_mail_data
|
65
|
-
|
69
|
+
mail = Mail.new(raw_mail_data)
|
70
|
+
parse_mail mail
|
71
|
+
end
|
66
72
|
|
73
|
+
def parse_mail mail
|
74
|
+
@mail = mail
|
67
75
|
# Parse parts recursively until it is not multipart
|
68
76
|
# Ignore types that are not suited for forwarding
|
69
77
|
parse_part @mail
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attachments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rune Myrland
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-23 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|