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 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
@@ -12,7 +12,7 @@ require 'bundler'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = "mail"
15
- s.version = "1.2.9"
15
+ s.version = "1.3.0"
16
16
  s.author = "Mike Lindsaar"
17
17
  s.email = "raasdnil@gmail.com"
18
18
  s.homepage = "http://github.com/mikel/mail"
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
- hash.each_pair do |k,v|
863
- next if k.to_sym == :data
864
- if k.to_sym == :filename
865
- add_attachment(passed_in_options)
866
- break
867
- elsif k == :headers
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
@@ -2,8 +2,8 @@
2
2
  module Mail
3
3
  module VERSION
4
4
  MAJOR = 1
5
- MINOR = 2
6
- TINY = 9
5
+ MINOR = 3
6
+ TINY = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  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: 1.2.9
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-23 00:00:00 +11:00
12
+ date: 2009-11-24 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency