Browse files

Removed all "try" calls from the code. The method is not always avail…

…able and not essential anyway.
  • Loading branch information...
1 parent 037490c commit d6071a965c53425a66b36009ffd34efeb1b09f0a @isabanin isabanin committed Oct 11, 2010
Showing with 12 additions and 8 deletions.
  1. +4 −0 CHANGELOG.rdoc
  2. +1 −1 VERSION
  3. +5 −5 lib/postmark.rb
  4. +2 −2 postmark.gemspec
View
4 CHANGELOG.rdoc
@@ -1,5 +1,9 @@
= Changelog
+== 0.9.3
+
+* Removed all "try" calls from the code. It's not always available and not essential anyway.
+
== 0.9.2
* Fixed "Illegal email address ']'" bug on Ruby 1.9
View
2 VERSION
@@ -1 +1 @@
-0.9.2
+0.9.3
View
10 lib/postmark.rb
@@ -98,11 +98,11 @@ def convert_message_to_options_hash(message)
options = Hash.new
headers = extract_headers_according_to_message_format(message)
- options["From"] = message.from.try(:first)
- options["ReplyTo"] = message.reply_to.try(:join, ", ")
- options["To"] = message.to.try(:join, ", ")
- options["Cc"] = message.cc.try(:join, ", ")
- options["Bcc"] = message.bcc.try(:join, ", ")
+ options["From"] = message.from.first if message.from
+ options["ReplyTo"] = message.reply_to.join(", ") if message.reply_to
+ options["To"] = message.to.join(", ") if message.to
+ options["Cc"] = message.cc.join(", ") if message.cc
+ options["Bcc"] = message.bcc.join(", ") if message.bcc
options["Subject"] = message.subject
options["Attachments"] = message.postmark_attachments
options["Tag"] = message.tag.to_s if message.tag
View
4 postmark.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{postmark}
- s.version = "0.9.2"
+ s.version = "0.9.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Petyo Ivanov", "Ilya Sabanin"]
- s.date = %q{2010-09-29}
+ s.date = %q{2010-10-11}
s.description = %q{Ruby gem for sending emails through http://postmarkapp.com HTTP API. It relieas on TMail::Mail for message construction.}
s.email = %q{underlog@gmail.com}
s.extra_rdoc_files = [

0 comments on commit d6071a9

Please sign in to comment.