postmark 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/postmark.rb +11 -12
  3. data/postmark.gemspec +5 -5
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
data/lib/postmark.rb CHANGED
@@ -91,19 +91,18 @@ module Postmark
91
91
  end
92
92
 
93
93
  def convert_tmail(message)
94
- { "From" => message['from'].to_s, "To" => message['to'].to_s, "Subject" => message.subject }.tap do |hash|
95
- # not always true, but should work I guess
96
- html = message.body_html
97
- text = message.body_text
98
- if message.multipart?
99
- hash["HtmlBody"] = html
100
- hash["TextBody"] = text
101
- elsif html
102
- hash["HtmlBody"] = message.body_html
103
- else
104
- hash["TextBody"] = text
105
- end
94
+ options = { "From" => message['from'].to_s, "To" => message['to'].to_s, "Subject" => message.subject }
95
+ html = message.body_html
96
+ text = message.body_text
97
+ if message.multipart?
98
+ options["HtmlBody"] = html
99
+ options["TextBody"] = text
100
+ elsif html
101
+ options["HtmlBody"] = message.body_html
102
+ else
103
+ options["TextBody"] = text
106
104
  end
105
+ options
107
106
  end
108
107
 
109
108
  end
data/postmark.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{postmark}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.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"]
12
- s.date = %q{2009-11-20}
12
+ s.date = %q{2009-11-25}
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 = [
@@ -29,7 +29,6 @@ Gem::Specification.new do |s|
29
29
  "features/support/env.rb",
30
30
  "lib/postmark.rb",
31
31
  "lib/postmark/tmail_mail_extension.rb",
32
- "lib/postmark/tmail_mail_extension.rb",
33
32
  "postmark.gemspec",
34
33
  "spec/postmark_spec.rb",
35
34
  "spec/spec.opts",
@@ -70,3 +69,4 @@ Gem::Specification.new do |s|
70
69
  s.add_dependency(%q<tmail>, [">= 0"])
71
70
  end
72
71
  end
72
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petyo Ivanov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-20 00:00:00 +02:00
12
+ date: 2009-11-25 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency