postmark 0.4.3 → 0.4.5
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/VERSION +1 -1
- data/lib/postmark.rb +2 -2
- data/postmark.gemspec +1 -1
- data/spec/postmark_spec.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.5
|
data/lib/postmark.rb
CHANGED
@@ -133,8 +133,8 @@ module Postmark
|
|
133
133
|
def extract_headers(message)
|
134
134
|
headers = []
|
135
135
|
message.each_header do |key, value|
|
136
|
-
next if bogus_headers.include? key.downcase
|
137
|
-
headers << { "Name" => key
|
136
|
+
next if bogus_headers.include? key.dup.downcase
|
137
|
+
headers << { "Name" => key, "Value" => value.body }
|
138
138
|
end
|
139
139
|
headers
|
140
140
|
end
|
data/postmark.gemspec
CHANGED
data/spec/postmark_spec.rb
CHANGED
@@ -116,7 +116,7 @@ describe "Postmark" do
|
|
116
116
|
end
|
117
117
|
|
118
118
|
it "should encode headers properly" do
|
119
|
-
json = %q[{"Subject":"Hello!", "From":"sheldon@bigbangtheory.com", "ReplyTo":"a@a.com, b@b.com", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!", "Headers":[{"Name":"
|
119
|
+
json = %q[{"Subject":"Hello!", "From":"sheldon@bigbangtheory.com", "ReplyTo":"a@a.com, b@b.com", "To":"lenard@bigbangtheory.com", "TextBody":"Hello Sheldon!", "Headers":[{"Name":"custom-header", "Value":"header"}]}]
|
120
120
|
result = Postmark.convert_tmail(message_with_headers)
|
121
121
|
result.should == JSON.parse(json)
|
122
122
|
end
|