postmark 0.9.3 → 0.9.4
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/CHANGELOG.rdoc +4 -0
 - data/README.rdoc +1 -0
 - data/VERSION +1 -1
 - data/lib/postmark.rb +3 -3
 - data/postmark.gemspec +2 -2
 - data/spec/postmark_spec.rb +10 -0
 - metadata +4 -4
 
    
        data/CHANGELOG.rdoc
    CHANGED
    
    
    
        data/README.rdoc
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.9. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.9.4
         
     | 
    
        data/lib/postmark.rb
    CHANGED
    
    | 
         @@ -98,15 +98,15 @@ module Postmark 
     | 
|
| 
       98 
98 
     | 
    
         
             
                  options = Hash.new
         
     | 
| 
       99 
99 
     | 
    
         
             
                  headers = extract_headers_according_to_message_format(message)
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
     | 
    
         
            -
                  options["From"]        = message 
     | 
| 
      
 101 
     | 
    
         
            +
                  options["From"]        = message['from'].to_s        if message.from
         
     | 
| 
       102 
102 
     | 
    
         
             
                  options["ReplyTo"]     = message.reply_to.join(", ") if message.reply_to
         
     | 
| 
       103 
103 
     | 
    
         
             
                  options["To"]          = message.to.join(", ")       if message.to
         
     | 
| 
       104 
104 
     | 
    
         
             
                  options["Cc"]          = message.cc.join(", ")       if message.cc
         
     | 
| 
       105 
105 
     | 
    
         
             
                  options["Bcc"]         = message.bcc.join(", ")      if message.bcc
         
     | 
| 
       106 
106 
     | 
    
         
             
                  options["Subject"]     = message.subject
         
     | 
| 
       107 
107 
     | 
    
         
             
                  options["Attachments"] = message.postmark_attachments
         
     | 
| 
       108 
     | 
    
         
            -
                  options["Tag"]         = message.tag.to_s 
     | 
| 
       109 
     | 
    
         
            -
                  options["Headers"]     = headers 
     | 
| 
      
 108 
     | 
    
         
            +
                  options["Tag"]         = message.tag.to_s            if message.tag
         
     | 
| 
      
 109 
     | 
    
         
            +
                  options["Headers"]     = headers                     if headers.size > 0
         
     | 
| 
       110 
110 
     | 
    
         | 
| 
       111 
111 
     | 
    
         
             
                  options = options.delete_if{|k,v| v.nil?}
         
     | 
| 
       112 
112 
     | 
    
         | 
    
        data/postmark.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{postmark}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0.9. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.9.4"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Petyo Ivanov", "Ilya Sabanin"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = %q{2010-10- 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2010-10-14}
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.description = %q{Ruby gem for sending emails through http://postmarkapp.com HTTP API. It relieas on TMail::Mail for message construction.}
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email = %q{underlog@gmail.com}
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.extra_rdoc_files = [
         
     | 
    
        data/spec/postmark_spec.rb
    CHANGED
    
    | 
         @@ -129,6 +129,11 @@ describe "Postmark" do 
     | 
|
| 
       129 
129 
     | 
    
         
             
                  tmail_message["CUSTOM-HEADER"] = "header"
         
     | 
| 
       130 
130 
     | 
    
         
             
                  tmail_message.should be_serialized_to %q[{"Subject":"Hello!", "From":"sheldon@bigbangtheory.com", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!", "Headers":[{"Name":"Custom-Header", "Value":"header"}]}]
         
     | 
| 
       131 
131 
     | 
    
         
             
                end
         
     | 
| 
      
 132 
     | 
    
         
            +
                
         
     | 
| 
      
 133 
     | 
    
         
            +
                it "should encode from properly when name is used" do
         
     | 
| 
      
 134 
     | 
    
         
            +
                  tmail_message.from = "Sheldon Lee Cooper <sheldon@bigbangtheory.com>"
         
     | 
| 
      
 135 
     | 
    
         
            +
                  tmail_message.should be_serialized_to %q[{"Subject":"Hello!", "From":"Sheldon Lee Cooper <sheldon@bigbangtheory.com>", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!"}]
         
     | 
| 
      
 136 
     | 
    
         
            +
                end
         
     | 
| 
       132 
137 
     | 
    
         | 
| 
       133 
138 
     | 
    
         
             
                it "should encode reply to" do
         
     | 
| 
       134 
139 
     | 
    
         
             
                  tmail_message.reply_to = ['a@a.com', 'b@b.com']
         
     | 
| 
         @@ -181,6 +186,11 @@ describe "Postmark" do 
     | 
|
| 
       181 
186 
     | 
    
         
             
                  mail_message.should be_serialized_to %q[{"Subject":"Hello!", "From":"sheldon@bigbangtheory.com", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!", "Headers":[{"Name":"Custom-Header", "Value":"header"}]}]
         
     | 
| 
       182 
187 
     | 
    
         
             
                end
         
     | 
| 
       183 
188 
     | 
    
         | 
| 
      
 189 
     | 
    
         
            +
                it "should encode from properly when name is used" do
         
     | 
| 
      
 190 
     | 
    
         
            +
                  mail_message.from = "Sheldon Lee Cooper <sheldon@bigbangtheory.com>"
         
     | 
| 
      
 191 
     | 
    
         
            +
                  mail_message.should be_serialized_to %q[{"Subject":"Hello!", "From":"Sheldon Lee Cooper <sheldon@bigbangtheory.com>", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!"}]
         
     | 
| 
      
 192 
     | 
    
         
            +
                end
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
       184 
194 
     | 
    
         
             
                it "should encode reply to" do
         
     | 
| 
       185 
195 
     | 
    
         
             
                  mail_message.reply_to = ['a@a.com', 'b@b.com']
         
     | 
| 
       186 
196 
     | 
    
         
             
                  mail_message.should be_serialized_to %q[{"Subject":"Hello!", "From":"sheldon@bigbangtheory.com", "ReplyTo":"a@a.com, b@b.com", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!"}]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: postmark
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 51
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 9
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0.9. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 4
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.9.4
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Petyo Ivanov
         
     | 
| 
         @@ -16,7 +16,7 @@ autorequire: 
     | 
|
| 
       16 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
            date: 2010-10- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2010-10-14 00:00:00 +08:00
         
     | 
| 
       20 
20 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       22 
22 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |