mail 1.2.9 → 1.3.0
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 +6 -0
- data/Rakefile +1 -1
- data/lib/mail/message.rb +15 -7
- data/lib/mail/version.rb +2 -2
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== Mon Nov 23 22:35:50 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
|
2
|
+
|
3
|
+
* Changed the way attachments are added so that it does not break depending on the order
|
4
|
+
of the Hash passed in.
|
5
|
+
* Version bump to 1.3.0 - Now works with Edge ActionMailer, MRI 1.8.6, 1.8.7, 1.9.1, all tests passing
|
6
|
+
|
1
7
|
== Sun Nov 22 12:19:44 UTC 2009 Mikel Lindsaar <raasdnil@gmail.com>
|
2
8
|
|
3
9
|
* Added check on add_part to make sure if there is already a body, and if so, make a text_part of the body
|
data/Rakefile
CHANGED
data/lib/mail/message.rb
CHANGED
@@ -855,16 +855,24 @@ module Mail
|
|
855
855
|
end
|
856
856
|
|
857
857
|
def init_with_hash(hash)
|
858
|
-
passed_in_options = hash
|
858
|
+
passed_in_options = hash.with_indifferent_access
|
859
859
|
self.raw_source = ''
|
860
860
|
@header = Mail::Header.new
|
861
861
|
@body = Mail::Body.new
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
862
|
+
|
863
|
+
# Strip out the attachment headers and make an attachment
|
864
|
+
if passed_in_options.has_key?(:filename)
|
865
|
+
add_attachment(passed_in_options)
|
866
|
+
passed_in_options.delete(:content_disposition)
|
867
|
+
passed_in_options.delete(:content_type)
|
868
|
+
passed_in_options.delete(:mime_type)
|
869
|
+
passed_in_options.delete(:filename)
|
870
|
+
passed_in_options.delete(:data)
|
871
|
+
end
|
872
|
+
|
873
|
+
passed_in_options.each_pair do |k,v|
|
874
|
+
k = underscoreize(k).to_sym if k.class == String
|
875
|
+
if k == :headers
|
868
876
|
self.headers(v)
|
869
877
|
else
|
870
878
|
self[k] = v
|
data/lib/mail/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Lindsaar
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-24 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|