postmark 1.22.3 → 1.23.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef3cc236986909ab3ad5351bb3642a525f5d0a7826a270d35e9eadde0f37021b
4
- data.tar.gz: 824731c2567364402cc9866c0f0da8abcbd974809fb9e237238c8581da72f8f8
3
+ metadata.gz: dfce0fc58365a91800f896d2d16c8d62d1a601f7a1a8d5350c6270cae3f12be3
4
+ data.tar.gz: 3d8b2761c884f6ca1f3c81efe7c30dda1432b6d7da740d18d6cc55f5cc062d23
5
5
  SHA512:
6
- metadata.gz: 9ef7a11422e2415ec69c1614d77a12d89b3b2fd94f7ba5d9ddb56c6e7671b4213de9b1480c8840125f65ef00eadbca6f56e265fcf9dd5ae82d17f224f56f1a98
7
- data.tar.gz: c3d90f8162206e6174bc9edd141164a8349288f36504e019d69a34a7eb8d1aa822d71e80319bfdef22cf028fde5b9f6d0ae5b4d9b866f054a55a481164c1c4ff
6
+ metadata.gz: 4082d74e41c4d74378f4e46bb43d0b8dd967489125865cd9379fbc3928dfd0be7369408cfcdcc6a979822739b8734045fba8a66021591848dff801286ef183d9
7
+ data.tar.gz: 5c93b937e1749584f52c1a1f5e0a4a9eabc6ea579e02c26f20d709ea5b89873d666acd6b8c2e7733a5e18885df370c1f2ca26e9c96c23cc44448d95c4f0da309
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,8 @@
1
1
  = Changelog
2
2
 
3
+ == 1.23.0
4
+ * Deprecated `InvalidEmailAddressError`. New name is `InvalidEmailRequestError`.
5
+
3
6
  == 1.22.3
4
7
  * Increased default timeout values
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.22.3
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
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.22.3'
2
+ VERSION = '1.23.0'
3
3
  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
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.3
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: 2023-01-16 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