postmark 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/README.rdoc +8 -0
- data/VERSION +1 -1
- data/lib/postmark.rb +7 -7
- data/postmark.gemspec +6 -5
- metadata +131 -91
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -38,6 +38,13 @@ In addition to the +postmark+ gem you also need to install +tmail+ or +mail+ gem
|
|
38
38
|
|
39
39
|
# Add attachments:
|
40
40
|
message.postmark_attachments = [File.open("/path"), File.open("/path")]
|
41
|
+
|
42
|
+
# Add attachments with content generated on the fly:
|
43
|
+
message.postmark_attachments = [{
|
44
|
+
"Name" => "September 2011.pdf",
|
45
|
+
"Content" => [pdf_content].pack("m"),
|
46
|
+
"ContentType" => "application/pdf"
|
47
|
+
}]
|
41
48
|
|
42
49
|
# Or specify a reply-to address (can also be an array of addresses):
|
43
50
|
message.reply_to = "penny@bigbangtheory.com"
|
@@ -102,6 +109,7 @@ You can also explicitly specify which one to be used, using
|
|
102
109
|
* Petyo Ivanov
|
103
110
|
* Ilya Sabanin
|
104
111
|
* Hristo Deshev
|
112
|
+
* Artem Chistyakov
|
105
113
|
* Randy Schmidt
|
106
114
|
* Chris Williams
|
107
115
|
* Aitor García Rey
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.9
|
data/lib/postmark.rb
CHANGED
@@ -99,15 +99,15 @@ module Postmark
|
|
99
99
|
options = Hash.new
|
100
100
|
headers = extract_headers_according_to_message_format(message)
|
101
101
|
|
102
|
-
options["From"] = message['from'].to_s
|
103
|
-
options["ReplyTo"] = message.reply_to.join(", ") if message.reply_to
|
104
|
-
options["To"] = message['to'].to_s
|
105
|
-
options["Cc"] = message['cc'].to_s
|
106
|
-
options["Bcc"] = message.bcc.join(", ")
|
102
|
+
options["From"] = message['from'].to_s if message.from
|
103
|
+
options["ReplyTo"] = message.reply_to.to_a.join(", ") if message.reply_to
|
104
|
+
options["To"] = message['to'].to_s if message.to
|
105
|
+
options["Cc"] = message['cc'].to_s if message.cc
|
106
|
+
options["Bcc"] = message.bcc.join(", ") if message.bcc
|
107
107
|
options["Subject"] = message.subject
|
108
108
|
options["Attachments"] = message.postmark_attachments
|
109
|
-
options["Tag"] = message.tag.to_s
|
110
|
-
options["Headers"] = headers
|
109
|
+
options["Tag"] = message.tag.to_s if message.tag
|
110
|
+
options["Headers"] = headers if headers.size > 0
|
111
111
|
|
112
112
|
options = options.delete_if{|k,v| v.nil?}
|
113
113
|
|
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.9.
|
8
|
+
s.version = "0.9.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{
|
11
|
+
s.authors = ["Petyo Ivanov", "Ilya Sabanin"]
|
12
|
+
s.date = %q{2012-01-31}
|
13
13
|
s.description = %q{Use this gem to send emails through Postmark HTTP API and retrieve info about bounces.}
|
14
14
|
s.email = %q{ilya@wildbit.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -51,11 +51,12 @@ Gem::Specification.new do |s|
|
|
51
51
|
Review the README.rdoc for implementation details and examples.
|
52
52
|
==================
|
53
53
|
}
|
54
|
-
s.require_paths = [
|
55
|
-
s.rubygems_version = %q{1.
|
54
|
+
s.require_paths = ["lib"]
|
55
|
+
s.rubygems_version = %q{1.3.7}
|
56
56
|
s.summary = %q{Official Postmark API wrapper.}
|
57
57
|
|
58
58
|
if s.respond_to? :specification_version then
|
59
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
59
60
|
s.specification_version = 3
|
60
61
|
|
61
62
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
metadata
CHANGED
@@ -1,114 +1,146 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: postmark
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 41
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
- 9
|
10
|
+
version: 0.9.9
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Petyo Ivanov
|
9
14
|
- Ilya Sabanin
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-01-31 00:00:00 +01:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: rspec
|
17
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
26
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
23
34
|
type: :development
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
27
37
|
name: activesupport
|
28
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
34
48
|
type: :development
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
38
51
|
name: json
|
39
|
-
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
54
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
45
62
|
type: :development
|
46
|
-
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
49
65
|
name: ruby-debug
|
50
|
-
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
51
68
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
56
76
|
type: :development
|
57
|
-
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Dependency
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
60
79
|
name: fakeweb
|
61
|
-
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
62
82
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
67
90
|
type: :development
|
68
|
-
|
69
|
-
|
70
|
-
- !ruby/object:Gem::Dependency
|
91
|
+
version_requirements: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
71
93
|
name: fakeweb-matcher
|
72
|
-
|
94
|
+
prerelease: false
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
96
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
78
104
|
type: :development
|
79
|
-
|
80
|
-
|
81
|
-
- !ruby/object:Gem::Dependency
|
105
|
+
version_requirements: *id006
|
106
|
+
- !ruby/object:Gem::Dependency
|
82
107
|
name: timecop
|
83
|
-
|
108
|
+
prerelease: false
|
109
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
84
110
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
hash: 3
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
version: "0"
|
89
118
|
type: :development
|
90
|
-
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Dependency
|
119
|
+
version_requirements: *id007
|
120
|
+
- !ruby/object:Gem::Dependency
|
93
121
|
name: yajl-ruby
|
94
|
-
|
122
|
+
prerelease: false
|
123
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
95
124
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
100
132
|
type: :development
|
101
|
-
|
102
|
-
|
103
|
-
description: Use this gem to send emails through Postmark HTTP API and retrieve info
|
104
|
-
about bounces.
|
133
|
+
version_requirements: *id008
|
134
|
+
description: Use this gem to send emails through Postmark HTTP API and retrieve info about bounces.
|
105
135
|
email: ilya@wildbit.com
|
106
136
|
executables: []
|
137
|
+
|
107
138
|
extensions: []
|
108
|
-
|
139
|
+
|
140
|
+
extra_rdoc_files:
|
109
141
|
- LICENSE
|
110
142
|
- README.rdoc
|
111
|
-
files:
|
143
|
+
files:
|
112
144
|
- .bundle/config
|
113
145
|
- .document
|
114
146
|
- .rake_tasks
|
@@ -135,31 +167,39 @@ files:
|
|
135
167
|
- spec/postmark_spec.rb
|
136
168
|
- spec/spec.opts
|
137
169
|
- spec/spec_helper.rb
|
170
|
+
has_rdoc: true
|
138
171
|
homepage: http://postmarkapp.com
|
139
172
|
licenses: []
|
140
|
-
|
141
|
-
|
142
|
-
\ Review the README.rdoc for implementation details and examples.\n ==================\n
|
143
|
-
\ "
|
173
|
+
|
174
|
+
post_install_message: "\n ==================\n Thanks for installing the postmark gem. If you don't have an account, please sign up at http://postmarkapp.com/.\n Review the README.rdoc for implementation details and examples.\n ==================\n "
|
144
175
|
rdoc_options: []
|
145
|
-
|
176
|
+
|
177
|
+
require_paths:
|
146
178
|
- lib
|
147
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
179
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
180
|
none: false
|
149
|
-
requirements:
|
150
|
-
- -
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
|
153
|
-
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
hash: 3
|
185
|
+
segments:
|
186
|
+
- 0
|
187
|
+
version: "0"
|
188
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
189
|
none: false
|
155
|
-
requirements:
|
156
|
-
- -
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
hash: 3
|
194
|
+
segments:
|
195
|
+
- 0
|
196
|
+
version: "0"
|
159
197
|
requirements: []
|
198
|
+
|
160
199
|
rubyforge_project:
|
161
|
-
rubygems_version: 1.
|
200
|
+
rubygems_version: 1.3.7
|
162
201
|
signing_key:
|
163
202
|
specification_version: 3
|
164
203
|
summary: Official Postmark API wrapper.
|
165
204
|
test_files: []
|
205
|
+
|