postmark 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,13 @@
1
1
  = Changelog
2
2
 
3
+ == 0.9.8
4
+
5
+ * Fixed bug that caused unexpected multiple email deliveries on Ruby1.9.2/Rails3.0.7
6
+
7
+ == 0.9.7
8
+
9
+ * All delivery exceptions are now childs of Postmark::DeliveryError. Easier to rescue that way.
10
+
3
11
  == 0.9.6
4
12
 
5
13
  * Fixed exception when content-type wasn't explicitly specified.
@@ -32,4 +40,4 @@
32
40
 
33
41
  == 0.8.0
34
42
 
35
- * Added support for Rails 3.
43
+ * Added support for Rails 3.
data/README.rdoc CHANGED
@@ -69,8 +69,8 @@ You can retrieve various information about your server state using the Public bo
69
69
 
70
70
  # Find specific bounce by id:
71
71
  bounce = Postmark::Bounce.find(bounce_id)
72
- bounce.dump # string, containing raw SMTP data
73
- bounce.reactivate # reactivate hard bounce
72
+ bounce.dump # string, containing raw SMTP data
73
+ bounce.activate # reactivate hard bounce
74
74
 
75
75
  == Encryption
76
76
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.6
1
+ 0.9.8
data/lib/postmark.rb CHANGED
@@ -16,11 +16,12 @@ require_local 'attachments_fix_for_mail'
16
16
 
17
17
  module Postmark
18
18
 
19
- class UnknownError < StandardError; end
20
- class InvalidApiKeyError < StandardError; end
21
- class InvalidMessageError < StandardError; end
22
- class InternalServerError < StandardError; end
23
- class UnknownMessageType < StandardError; end
19
+ class DeliveryError < StandardError; end
20
+ class UnknownError < DeliveryError; end
21
+ class InvalidApiKeyError < DeliveryError; end
22
+ class InvalidMessageError < DeliveryError; end
23
+ class InternalServerError < DeliveryError; end
24
+ class UnknownMessageType < DeliveryError; end
24
25
 
25
26
  module ResponseParsers
26
27
  autoload :Json, 'postmark/response_parsers/json'
@@ -84,7 +85,7 @@ module Postmark
84
85
  @retries = 0
85
86
  begin
86
87
  HttpClient.post("email", Postmark::Json.encode(convert_message_to_options_hash(message)))
87
- rescue Exception => e
88
+ rescue DeliveryError => e
88
89
  if @retries < max_retries
89
90
  @retries += 1
90
91
  retry
@@ -100,8 +101,8 @@ module Postmark
100
101
 
101
102
  options["From"] = message['from'].to_s if message.from
102
103
  options["ReplyTo"] = message.reply_to.join(", ") if message.reply_to
103
- options["To"] = message.to.join(", ") if message.to
104
- options["Cc"] = message.cc.join(", ") if message.cc
104
+ options["To"] = message['to'].to_s if message.to
105
+ options["Cc"] = message['cc'].to_s if message.cc
105
106
  options["Bcc"] = message.bcc.join(", ") if message.bcc
106
107
  options["Subject"] = message.subject
107
108
  options["Attachments"] = message.postmark_attachments
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.6"
8
+ s.version = "0.9.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Petyo Ivanov", "Ilya Sabanin"]
12
- s.date = %q{2011-02-23}
11
+ s.authors = [%q{Petyo Ivanov}, %q{Ilya Sabanin}]
12
+ s.date = %q{2011-08-23}
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,17 +51,11 @@ Gem::Specification.new do |s|
51
51
  Review the README.rdoc for implementation details and examples.
52
52
  ==================
53
53
  }
54
- s.require_paths = ["lib"]
55
- s.rubygems_version = %q{1.3.7}
54
+ s.require_paths = [%q{lib}]
55
+ s.rubygems_version = %q{1.8.6}
56
56
  s.summary = %q{Official Postmark API wrapper.}
57
- s.test_files = [
58
- "spec/bounce_spec.rb",
59
- "spec/postmark_spec.rb",
60
- "spec/spec_helper.rb"
61
- ]
62
57
 
63
58
  if s.respond_to? :specification_version then
64
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
65
59
  s.specification_version = 3
66
60
 
67
61
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,146 +1,114 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: postmark
3
- version: !ruby/object:Gem::Version
4
- hash: 55
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 9
9
- - 6
10
- version: 0.9.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.8
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Petyo Ivanov
14
9
  - Ilya Sabanin
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-02-23 00:00:00 +07:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
13
+ date: 2011-08-23 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
23
16
  name: rspec
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &10778620 !ruby/object:Gem::Requirement
26
18
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
34
23
  type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: activesupport
38
24
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *10778620
26
+ - !ruby/object:Gem::Dependency
27
+ name: activesupport
28
+ requirement: &10777940 !ruby/object:Gem::Requirement
40
29
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
48
34
  type: :development
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: json
52
35
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *10777940
37
+ - !ruby/object:Gem::Dependency
38
+ name: json
39
+ requirement: &10777420 !ruby/object:Gem::Requirement
54
40
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
62
45
  type: :development
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: ruby-debug
66
46
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *10777420
48
+ - !ruby/object:Gem::Dependency
49
+ name: ruby-debug
50
+ requirement: &10776860 !ruby/object:Gem::Requirement
68
51
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
76
56
  type: :development
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: fakeweb
80
57
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ version_requirements: *10776860
59
+ - !ruby/object:Gem::Dependency
60
+ name: fakeweb
61
+ requirement: &10750560 !ruby/object:Gem::Requirement
82
62
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
90
67
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: fakeweb-matcher
94
68
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
69
+ version_requirements: *10750560
70
+ - !ruby/object:Gem::Dependency
71
+ name: fakeweb-matcher
72
+ requirement: &10750000 !ruby/object:Gem::Requirement
96
73
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
104
78
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: timecop
108
79
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
80
+ version_requirements: *10750000
81
+ - !ruby/object:Gem::Dependency
82
+ name: timecop
83
+ requirement: &10749460 !ruby/object:Gem::Requirement
110
84
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
118
89
  type: :development
119
- version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: yajl-ruby
122
90
  prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
91
+ version_requirements: *10749460
92
+ - !ruby/object:Gem::Dependency
93
+ name: yajl-ruby
94
+ requirement: &10748800 !ruby/object:Gem::Requirement
124
95
  none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
132
100
  type: :development
133
- version_requirements: *id008
134
- description: Use this gem to send emails through Postmark HTTP API and retrieve info about bounces.
101
+ prerelease: false
102
+ version_requirements: *10748800
103
+ description: Use this gem to send emails through Postmark HTTP API and retrieve info
104
+ about bounces.
135
105
  email: ilya@wildbit.com
136
106
  executables: []
137
-
138
107
  extensions: []
139
-
140
- extra_rdoc_files:
108
+ extra_rdoc_files:
141
109
  - LICENSE
142
110
  - README.rdoc
143
- files:
111
+ files:
144
112
  - .bundle/config
145
113
  - .document
146
114
  - .rake_tasks
@@ -167,41 +135,31 @@ files:
167
135
  - spec/postmark_spec.rb
168
136
  - spec/spec.opts
169
137
  - spec/spec_helper.rb
170
- has_rdoc: true
171
138
  homepage: http://postmarkapp.com
172
139
  licenses: []
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 "
140
+ post_install_message: ! "\n ==================\n Thanks for installing the
141
+ postmark gem. If you don't have an account, please sign up at http://postmarkapp.com/.\n
142
+ \ Review the README.rdoc for implementation details and examples.\n ==================\n
143
+ \ "
175
144
  rdoc_options: []
176
-
177
- require_paths:
145
+ require_paths:
178
146
  - lib
179
- required_ruby_version: !ruby/object:Gem::Requirement
147
+ required_ruby_version: !ruby/object:Gem::Requirement
180
148
  none: false
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
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
154
  none: false
190
- requirements:
191
- - - ">="
192
- - !ruby/object:Gem::Version
193
- hash: 3
194
- segments:
195
- - 0
196
- version: "0"
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
197
159
  requirements: []
198
-
199
160
  rubyforge_project:
200
- rubygems_version: 1.3.7
161
+ rubygems_version: 1.8.6
201
162
  signing_key:
202
163
  specification_version: 3
203
164
  summary: Official Postmark API wrapper.
204
- test_files:
205
- - spec/bounce_spec.rb
206
- - spec/postmark_spec.rb
207
- - spec/spec_helper.rb
165
+ test_files: []