postmark 1.0.0 → 1.0.1

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/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  .rvmrc
6
+ .idea
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.0.1
4
+
5
+ * Fixed an issue causing recipient names to disappear from "To", "Cc" and "Reply-To" headers when using with Mail library.
6
+
3
7
  == 1.0.0
4
8
 
5
9
  * Introduced new instance-based architecture (see README for more details).
data/README.md CHANGED
@@ -570,6 +570,7 @@ Postmark.response_parser_class = :Json # :ActiveSupport or :Yajl are also suppor
570
570
  * Anton Astashov
571
571
  * Marcus Brito
572
572
  * Tyler Hunt
573
+ * Russell Bevers
573
574
 
574
575
  ## Copyright
575
576
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -53,7 +53,8 @@ module Mail
53
53
  options["Tag"] = self.tag.to_s if self.tag
54
54
 
55
55
  %w(to reply_to cc bcc).each do |field|
56
- next unless value = self.send(field)
56
+ next unless self.send(field)
57
+ value = self[field.to_s]
57
58
  options[::Postmark::Inflector.to_postmark(field)] = Array[value].flatten.join(", ")
58
59
  end
59
60
 
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -66,6 +66,16 @@ describe Mail::Message do
66
66
  end
67
67
  end
68
68
 
69
+ let(:mail_message_with_named_addresses) do
70
+ Mail.new do
71
+ from "Sheldon <sheldon@bigbangtheory.com>"
72
+ to "\"Leonard Hofstadter\" <leonard@bigbangtheory.com>"
73
+ subject "Hello!"
74
+ body "Hello Sheldon!"
75
+ reply_to 'Penny "The Neighbor" <penny@bigbangtheory.com>'
76
+ end
77
+ end
78
+
69
79
  describe "#html?" do
70
80
  it 'is true for html only email' do
71
81
  mail_html_message.should be_html
@@ -201,5 +211,15 @@ describe Mail::Message do
201
211
  "TextBody"=>"Hello Sheldon!",
202
212
  "To"=>"lenard@bigbangtheory.com"}
203
213
  end
214
+
215
+ it 'converts messages with named addresses correctly' do
216
+ mail_message_with_named_addresses.to_postmark_hash.should == {
217
+ "From" => "Sheldon <sheldon@bigbangtheory.com>",
218
+ "Subject" => "Hello!",
219
+ "TextBody" => "Hello Sheldon!",
220
+ "To" => "Leonard Hofstadter <leonard@bigbangtheory.com>",
221
+ "ReplyTo" => "\"Penny \\\"The Neighbor\\\"\" <penny@bigbangtheory.com>"
222
+ }
223
+ end
204
224
  end
205
225
  end
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: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-05-10 00:00:00.000000000 Z
14
+ date: 2013-07-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  segments:
169
169
  - 0
170
- hash: -1032735191678886837
170
+ hash: -2741501783398035661
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements: