postmark 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -2
- data/VERSION +1 -1
- data/lib/postmark.rb +16 -1
- data/lib/postmark/response_parsers/active_support.rb +2 -2
- data/postmark.gemspec +2 -2
- data/spec/postmark_spec.rb +5 -3
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -47,8 +47,10 @@ You can also explicitly specify which one to be used, using
|
|
47
47
|
Postmark.response_parser_class = :Json # :ActiveSupport or :Yajl is also supported.
|
48
48
|
|
49
49
|
== Limitations
|
50
|
-
|
51
|
-
|
50
|
+
|
51
|
+
Currently postmark API does not support multiple recipients, or attachments. For more information, check the docs at:
|
52
|
+
|
53
|
+
http://developer.postmarkapp.com
|
52
54
|
|
53
55
|
== Note on Patches/Pull Requests
|
54
56
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/lib/postmark.rb
CHANGED
@@ -131,7 +131,6 @@ module Postmark
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def extract_headers(message)
|
134
|
-
bogus_headers = %w[from to subject reply-to]
|
135
134
|
headers = []
|
136
135
|
message.each_header do |key, value|
|
137
136
|
next if bogus_headers.include? key.downcase
|
@@ -140,6 +139,22 @@ module Postmark
|
|
140
139
|
headers
|
141
140
|
end
|
142
141
|
|
142
|
+
def bogus_headers
|
143
|
+
%q[
|
144
|
+
return-path
|
145
|
+
x-pm-rcpt
|
146
|
+
from
|
147
|
+
reply-to
|
148
|
+
sender
|
149
|
+
received
|
150
|
+
date
|
151
|
+
content-type
|
152
|
+
cc
|
153
|
+
bcc
|
154
|
+
subject
|
155
|
+
]
|
156
|
+
end
|
157
|
+
|
143
158
|
end
|
144
159
|
|
145
160
|
self.response_parser_class = nil
|
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.4.
|
8
|
+
s.version = "0.4.2"
|
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{2010-01-
|
12
|
+
s.date = %q{2010-01-13}
|
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
@@ -126,10 +126,12 @@ describe "Postmark" do
|
|
126
126
|
[:Json, :ActiveSupport, :Yajl].each do |lib|
|
127
127
|
begin
|
128
128
|
original_parser_class = Postmark.response_parser_class
|
129
|
-
|
130
|
-
it "
|
131
|
-
Postmark.
|
129
|
+
|
130
|
+
it "decodes json with #{lib}" do
|
131
|
+
Postmark.response_parser_class = lib
|
132
|
+
Postmark.decode_json(%({"Message":"OK"})).should == { "Message" => "OK" }
|
132
133
|
end
|
134
|
+
|
133
135
|
Postmark.response_parser_class = original_parser_class
|
134
136
|
rescue LoadError # No ActiveSupport or Yajl :(
|
135
137
|
end
|
data/spec/spec_helper.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.2
|
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: 2010-01-
|
12
|
+
date: 2010-01-13 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|