dball-mail 2.2.9.2 → 2.2.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +1 -7
- data/lib/VERSION +1 -1
- data/lib/mail/configuration.rb +0 -2
- data/lib/mail/fields/common/common_message_id.rb +2 -2
- data/lib/mail/message.rb +0 -36
- data/lib/mail/network.rb +0 -1
- data/lib/mail/network/retriever_methods/imap.rb +5 -1
- metadata +6 -23
- data/lib/mail/network/retriever_methods/test_retriever.rb +0 -31
data/CHANGELOG.rdoc
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
== Mon Nov 8 15:13:13 EST 2010 Donald Ball <donald.ball@gmail.com>
|
2
|
-
|
3
|
-
* Add test retriever
|
4
|
-
* Fix comma bug in References and In-Reply-To headers
|
5
|
-
* Add message#reply method
|
6
|
-
|
7
1
|
== Tue Oct 26 07:14:36 UTC 2010 Mikel Lindsaar <mikel@rubyx.com>
|
8
2
|
|
9
3
|
* Version Bump to 2.2.9 and tag
|
@@ -456,4 +450,4 @@ content-disposition or content-location
|
|
456
450
|
|
457
451
|
== Sat Oct 25 13:38:01 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
|
458
452
|
|
459
|
-
* Birthday, Mail released as a gem... phew
|
453
|
+
* Birthday, Mail released as a gem... phew
|
data/lib/VERSION
CHANGED
data/lib/mail/configuration.rb
CHANGED
@@ -33,11 +33,11 @@ module Mail
|
|
33
33
|
private
|
34
34
|
|
35
35
|
def do_encode(field_name)
|
36
|
-
%Q{#{field_name}: #{
|
36
|
+
%Q{#{field_name}: #{message_ids.map { |m| "<#{m}>" }.join(', ')}\r\n}
|
37
37
|
end
|
38
38
|
|
39
39
|
def do_decode
|
40
|
-
"#{message_ids.map { |m| "<#{m}>" }.join(' ')}"
|
40
|
+
"#{message_ids.map { |m| "<#{m}>" }.join(', ')}"
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
data/lib/mail/message.rb
CHANGED
@@ -253,42 +253,6 @@ module Mail
|
|
253
253
|
end
|
254
254
|
end
|
255
255
|
|
256
|
-
def reply(*args, &block)
|
257
|
-
self.class.new.tap do |reply|
|
258
|
-
if message_id
|
259
|
-
bracketed_message_id = "<#{message_id}>"
|
260
|
-
reply.in_reply_to = bracketed_message_id
|
261
|
-
if !references.nil?
|
262
|
-
reply.references = (references.to_a.map { |r| "<#{r}>" } << bracketed_message_id).join(' ')
|
263
|
-
elsif !in_reply_to.nil? && !in_reply_to.kind_of?(Array)
|
264
|
-
reply.references = "<#{in_reply_to}> #{bracketed_message_id}"
|
265
|
-
end
|
266
|
-
reply.references ||= bracketed_message_id
|
267
|
-
end
|
268
|
-
if subject
|
269
|
-
reply.subject = "RE: #{subject}"
|
270
|
-
end
|
271
|
-
if reply_to || from
|
272
|
-
reply.to = self[reply_to ? :reply_to : :from].to_s
|
273
|
-
end
|
274
|
-
if to
|
275
|
-
reply.from = self[:to].formatted.first.to_s
|
276
|
-
end
|
277
|
-
|
278
|
-
unless args.empty?
|
279
|
-
if args.flatten.first.respond_to?(:each_pair)
|
280
|
-
reply.send(:init_with_hash, args.flatten.first)
|
281
|
-
else
|
282
|
-
reply.send(:init_with_string, args.flatten[0].to_s.strip)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
|
286
|
-
if block_given?
|
287
|
-
reply.instance_eval(&block)
|
288
|
-
end
|
289
|
-
end
|
290
|
-
end
|
291
|
-
|
292
256
|
# Provides the operator needed for sort et al.
|
293
257
|
#
|
294
258
|
# Compares this mail object with another mail object, this is done by date, so an
|
data/lib/mail/network.rb
CHANGED
@@ -122,7 +122,11 @@ module Mail
|
|
122
122
|
fetchdata = imap.uid_fetch(message_id, ['RFC822'])[0]
|
123
123
|
new_message = Mail.new(fetchdata.attr['RFC822'])
|
124
124
|
new_message.mark_for_delete = true if options[:delete_after_find]
|
125
|
-
|
125
|
+
if block.arity == 3
|
126
|
+
yield imap, message_id, new_message
|
127
|
+
else
|
128
|
+
yield new_message
|
129
|
+
end
|
126
130
|
imap.uid_store(message_id, "+FLAGS", [Net::IMAP::DELETED]) if options[:delete_after_find] && new_message.is_marked_for_delete?
|
127
131
|
end
|
128
132
|
imap.expunge if options[:delete_after_find]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dball-mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 93
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
9
|
- 9
|
10
|
-
-
|
11
|
-
version: 2.2.9.
|
10
|
+
- 3
|
11
|
+
version: 2.2.9.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Mikel Lindsaar
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-11-
|
20
|
+
date: 2010-11-19 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -83,22 +83,6 @@ dependencies:
|
|
83
83
|
requirement: *id004
|
84
84
|
type: :runtime
|
85
85
|
name: i18n
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
|
-
requirements:
|
90
|
-
- - ~>
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
hash: 29
|
93
|
-
segments:
|
94
|
-
- 0
|
95
|
-
- 0
|
96
|
-
- 1
|
97
|
-
version: 0.0.1
|
98
|
-
prerelease: false
|
99
|
-
requirement: *id005
|
100
|
-
type: :runtime
|
101
|
-
name: tlsmail
|
102
86
|
description: A really Ruby Mail handler.
|
103
87
|
email:
|
104
88
|
- raasdnil@gmail.com
|
@@ -191,7 +175,6 @@ files:
|
|
191
175
|
- lib/mail/network/delivery_methods/test_mailer.rb
|
192
176
|
- lib/mail/network/retriever_methods/imap.rb
|
193
177
|
- lib/mail/network/retriever_methods/pop3.rb
|
194
|
-
- lib/mail/network/retriever_methods/test_retriever.rb
|
195
178
|
- lib/mail/network.rb
|
196
179
|
- lib/mail/parsers/address_lists.rb
|
197
180
|
- lib/mail/parsers/address_lists.treetop
|
@@ -234,7 +217,7 @@ files:
|
|
234
217
|
- lib/VERSION
|
235
218
|
- CHANGELOG.rdoc
|
236
219
|
has_rdoc: true
|
237
|
-
homepage: http://github.com/dball/mail
|
220
|
+
homepage: http://github.com/dball/mail/tree/decisiv
|
238
221
|
licenses: []
|
239
222
|
|
240
223
|
post_install_message:
|
@@ -266,6 +249,6 @@ rubyforge_project:
|
|
266
249
|
rubygems_version: 1.3.7
|
267
250
|
signing_key:
|
268
251
|
specification_version: 3
|
269
|
-
summary:
|
252
|
+
summary: Mail provides a nice Ruby DSL for making, sending and reading emails.
|
270
253
|
test_files: []
|
271
254
|
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Mail
|
4
|
-
|
5
|
-
class TestRetriever
|
6
|
-
cattr_accessor :emails
|
7
|
-
|
8
|
-
def initialize(values)
|
9
|
-
@@emails = []
|
10
|
-
end
|
11
|
-
|
12
|
-
def find(options = {}, &block)
|
13
|
-
emails = @@emails
|
14
|
-
case count = options[:count]
|
15
|
-
when :all then emails
|
16
|
-
when 1 then emails.first
|
17
|
-
when Fixnum then emails[0, count]
|
18
|
-
else
|
19
|
-
raise 'Invalid count option value'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def all(options = {}, &block)
|
24
|
-
options ||= {}
|
25
|
-
options[:count] = :all
|
26
|
-
find(options, &block)
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|