mail 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of mail might be problematic. Click here for more details.
- data/CHANGELOG.rdoc +8 -0
- data/Rakefile +0 -2
- data/lib/VERSION +1 -1
- data/lib/load_parsers.rb +0 -6
- data/lib/mail/fields/date_field.rb +13 -13
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
== HEAD
|
2
2
|
|
3
|
+
== Version 2.5.3 - Sun Dec 4 15:52:00 +1100 2012 Mikel Lindsaar <mikel@reinteractive.net>
|
4
|
+
|
5
|
+
* Close pull request 468 - Remove debug output to STDOUT (tadman)
|
6
|
+
* Fix up spec warnings
|
7
|
+
* Remove un needed require
|
8
|
+
* Ensure spec_helper constants only defined once
|
9
|
+
* Use stub against time instead of DateTime to avoid double redefinition error
|
10
|
+
|
3
11
|
== Version 2.5.2 - Sun Nov 18 15:01:00 +1100 2012 Mikel Lindsaar <mikel@reinteractive.net>
|
4
12
|
|
5
13
|
* Removing double loading of treetop parsers to remove warnings
|
data/Rakefile
CHANGED
data/lib/VERSION
CHANGED
data/lib/load_parsers.rb
CHANGED
@@ -8,7 +8,6 @@ module Mail # :doc:
|
|
8
8
|
|
9
9
|
def self.compile_parser(parser)
|
10
10
|
require 'treetop/compiler'
|
11
|
-
STDOUT.puts "Compiling parser #{parser} from treetop source"
|
12
11
|
Treetop.load(File.join(File.dirname(__FILE__)) + "/mail/parsers/#{parser}")
|
13
12
|
end
|
14
13
|
|
@@ -18,20 +17,15 @@ module Mail # :doc:
|
|
18
17
|
content_transfer_encoding content_location ]
|
19
18
|
|
20
19
|
if defined?(MAIL_SPEC_SUITE_RUNNING)
|
21
|
-
STDOUT.puts "Compiling all parsers from treetop source"
|
22
|
-
|
23
20
|
parsers.each do |parser|
|
24
21
|
compile_parser(parser)
|
25
22
|
end
|
26
23
|
|
27
24
|
else
|
28
|
-
STDOUT.puts "Loading precompiled parsers from ruby source"
|
29
|
-
|
30
25
|
parsers.each do |parser|
|
31
26
|
begin
|
32
27
|
require "mail/parsers/#{parser}"
|
33
28
|
rescue LoadError
|
34
|
-
STDOUT.puts "Couldn't load parser #{parser} from ruby source"
|
35
29
|
compile_parser(parser)
|
36
30
|
end
|
37
31
|
end
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# = Date Field
|
4
|
-
#
|
4
|
+
#
|
5
5
|
# The Date field inherits from StructuredField and handles the Date: header
|
6
6
|
# field in the email.
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# Sending date to a mail message will instantiate a Mail::Field object that
|
9
9
|
# has a DateField as it's field type. This includes all Mail::CommonAddress
|
10
10
|
# module instance methods.
|
11
|
-
#
|
11
|
+
#
|
12
12
|
# There must be excatly one Date field in an RFC2822 email.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# == Examples:
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# mail = Mail.new
|
17
17
|
# mail.date = 'Mon, 24 Nov 1997 14:22:01 -0800'
|
18
18
|
# mail.date #=> #<DateTime: 211747170121/86400,-1/3,2299161>
|
@@ -20,17 +20,17 @@
|
|
20
20
|
# mail[:date] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::DateField:0x180e1c4
|
21
21
|
# mail['date'] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::DateField:0x180e1c4
|
22
22
|
# mail['Date'] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::DateField:0x180e1c4
|
23
|
-
#
|
23
|
+
#
|
24
24
|
require 'mail/fields/common/common_date'
|
25
25
|
|
26
26
|
module Mail
|
27
27
|
class DateField < StructuredField
|
28
|
-
|
28
|
+
|
29
29
|
include Mail::CommonDate
|
30
|
-
|
30
|
+
|
31
31
|
FIELD_NAME = 'date'
|
32
32
|
CAPITALIZED_FIELD = "Date"
|
33
|
-
|
33
|
+
|
34
34
|
def initialize(value = nil, charset = 'utf-8')
|
35
35
|
self.charset = charset
|
36
36
|
if value.blank?
|
@@ -44,14 +44,14 @@ module Mail
|
|
44
44
|
rescue ArgumentError => e
|
45
45
|
raise e unless "invalid date"==e.message
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
def encoded
|
49
49
|
do_encode(CAPITALIZED_FIELD)
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
def decoded
|
53
53
|
do_decode
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
end
|
57
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mime-types
|