postmark 1.22.2 → 1.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65048304ac65a25c53918528a483e99f0c74ea5474c11348c978d8fb732dc032
4
- data.tar.gz: 3e90058072e9e549846850fb3c352e963cc7c32468792e10d37662a63b036f03
3
+ metadata.gz: dfce0fc58365a91800f896d2d16c8d62d1a601f7a1a8d5350c6270cae3f12be3
4
+ data.tar.gz: 3d8b2761c884f6ca1f3c81efe7c30dda1432b6d7da740d18d6cc55f5cc062d23
5
5
  SHA512:
6
- metadata.gz: b25f7ea69f5b3db0260ad29c70b464cf757ed2f3f3b9abb45383aa8c4239516cbc9132bc67200f56faa08563e5cfcf391be086d845bf5baf03223106dd3e7cae
7
- data.tar.gz: 7fefb6ced2722b022b27ed06bd5cde4c388e373cfc75995dfb549534618a48e7106281514f9c06d6aba280d472c8211b39a4bffcaff9e61f43aa5017b0a260f7
6
+ metadata.gz: 4082d74e41c4d74378f4e46bb43d0b8dd967489125865cd9379fbc3928dfd0be7369408cfcdcc6a979822739b8734045fba8a66021591848dff801286ef183d9
7
+ data.tar.gz: 5c93b937e1749584f52c1a1f5e0a4a9eabc6ea579e02c26f20d709ea5b89873d666acd6b8c2e7733a5e18885df370c1f2ca26e9c96c23cc44448d95c4f0da309
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = Changelog
2
2
 
3
+ == 1.23.0
4
+ * Deprecated `InvalidEmailAddressError`. New name is `InvalidEmailRequestError`.
5
+
6
+ == 1.22.3
7
+ * Increased default timeout values
8
+
3
9
  == 1.22.2
4
10
  * Updated Postmark::InactiveRecipientError.parse_recipients method to handle current error message
5
11
  * Update post install message to use https URL
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.22.2
1
+ 1.23.0
@@ -43,7 +43,7 @@ module Postmark
43
43
 
44
44
  class ApiInputError < HttpServerError
45
45
  INACTIVE_RECIPIENT = 406
46
- INVALID_EMAIL_ADDRESS = 300
46
+ INVALID_EMAIL_REQUEST = 300
47
47
 
48
48
  attr_accessor :error_code
49
49
 
@@ -53,8 +53,8 @@ module Postmark
53
53
  case error_code
54
54
  when INACTIVE_RECIPIENT
55
55
  InactiveRecipientError.new(error_code, body, parsed_body)
56
- when INVALID_EMAIL_ADDRESS
57
- InvalidEmailAddressError.new(error_code, body, parsed_body)
56
+ when INVALID_EMAIL_REQUEST
57
+ InvalidEmailRequestError.new(error_code, body, parsed_body)
58
58
  else
59
59
  new(error_code, body, parsed_body)
60
60
  end
@@ -70,7 +70,7 @@ module Postmark
70
70
  end
71
71
  end
72
72
 
73
- class InvalidEmailAddressError < ApiInputError; end
73
+ class InvalidEmailRequestError < ApiInputError; end
74
74
 
75
75
  class InactiveRecipientError < ApiInputError
76
76
  attr_reader :recipients
@@ -129,4 +129,5 @@ module Postmark
129
129
  DeliveryError = Error
130
130
  InvalidMessageError = ApiInputError
131
131
  UnknownError = UnexpectedHttpResponseError
132
+ InvalidEmailAddressError = InvalidEmailRequestError
132
133
  end
@@ -17,8 +17,8 @@ module Postmark
17
17
  :host => 'api.postmarkapp.com',
18
18
  :secure => true,
19
19
  :path_prefix => '/',
20
- :http_read_timeout => 15,
21
- :http_open_timeout => 5
20
+ :http_read_timeout => 60,
21
+ :http_open_timeout => 60
22
22
  }
23
23
 
24
24
  def initialize(api_token, options = {})
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.22.2'
2
+ VERSION = '1.23.0'
3
3
  end
data/postmark.gemspec CHANGED
@@ -34,6 +34,6 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.add_dependency "json"
36
36
 
37
- s.add_development_dependency "mail"
37
+ s.add_development_dependency "mail", "~> 2.7.0" # https://github.com/mikel/mail/pull/1539
38
38
  s.add_development_dependency "rake"
39
39
  end
@@ -98,9 +98,9 @@ describe(Postmark::ApiInputError) do
98
98
  end
99
99
 
100
100
  context '300' do
101
- let(:code) {Postmark::ApiInputError::INVALID_EMAIL_ADDRESS}
101
+ let(:code) {Postmark::ApiInputError::INVALID_EMAIL_REQUEST}
102
102
 
103
- it {is_expected.to be_a(Postmark::InvalidEmailAddressError)}
103
+ it {is_expected.to be_a(Postmark::InvalidEmailRequestError)}
104
104
  it_behaves_like 'api input error'
105
105
  end
106
106
 
@@ -149,13 +149,13 @@ describe(Postmark::MailAdapterError) do
149
149
  it {is_expected.to be_a(Postmark::Error)}
150
150
  end
151
151
 
152
- describe(Postmark::InvalidEmailAddressError) do
152
+ describe(Postmark::InvalidEmailRequestError) do
153
153
  describe '.new' do
154
154
  let(:response) {{'Message' => message}}
155
155
 
156
156
  subject do
157
- Postmark::InvalidEmailAddressError.new(
158
- Postmark::ApiInputError::INVALID_EMAIL_ADDRESS, Postmark::Json.encode(response), response)
157
+ Postmark::InvalidEmailRequestError.new(
158
+ Postmark::ApiInputError::INVALID_EMAIL_REQUEST, Postmark::Json.encode(response), response)
159
159
  end
160
160
 
161
161
  let(:message) do
@@ -171,7 +171,7 @@ describe(Postmark::InvalidEmailAddressError) do
171
171
  end
172
172
 
173
173
  it 'error code is set' do
174
- expect(subject.error_code).to eq(Postmark::ApiInputError::INVALID_EMAIL_ADDRESS)
174
+ expect(subject.error_code).to eq(Postmark::ApiInputError::INVALID_EMAIL_REQUEST)
175
175
  end
176
176
  end
177
177
  end
@@ -274,3 +274,9 @@ describe(Postmark::UnknownError) do
274
274
  expect(subject.class).to eq(Postmark::UnexpectedHttpResponseError)
275
275
  end
276
276
  end
277
+
278
+ describe(Postmark::InvalidEmailAddressError) do
279
+ it 'is an alias for backwards compatibility' do
280
+ expect(subject.class).to eq(Postmark::InvalidEmailRequestError)
281
+ end
282
+ end
@@ -39,8 +39,8 @@ describe Postmark::HttpClient do
39
39
  its(:port) { is_expected.to eq 443 }
40
40
  its(:secure) { is_expected.to be true }
41
41
  its(:path_prefix) { is_expected.to eq '/' }
42
- its(:http_read_timeout) { is_expected.to eq 15 }
43
- its(:http_open_timeout) { is_expected.to eq 5 }
42
+ its(:http_read_timeout) { is_expected.to eq 60 }
43
+ its(:http_open_timeout) { is_expected.to eq 60 }
44
44
 
45
45
  it 'does not provide a default which utilizes the Net::HTTP default', :skip_ruby_version => ['1.8.7'] do
46
46
  http_client = subject.http
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.22.2
4
+ version: 1.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomek Maszkowski
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2022-11-22 00:00:00.000000000 Z
16
+ date: 2023-01-23 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: json
@@ -33,16 +33,16 @@ dependencies:
33
33
  name: mail
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ">="
36
+ - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: '0'
38
+ version: 2.7.0
39
39
  type: :development
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ">="
43
+ - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: 2.7.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rake
48
48
  requirement: !ruby/object:Gem::Requirement