postmark 1.21.6 → 1.21.7

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: 6b42f4ec6b9f264b0ecdd3b4f6189a68f85436af6953c869d4b5e20d4d08abde
4
- data.tar.gz: a755605d53ffd4b8ba7f1707b42e97592eb93510968898854456e1ad368f40c2
3
+ metadata.gz: b2bd2c9a288c0f4baa7f2f076d91151a0835b8b168c76e6b1938d5aee972d118
4
+ data.tar.gz: 5f8ef5865ba91468d5d413f111af5f195adaf0c44983749605e7e015d9b79eb3
5
5
  SHA512:
6
- metadata.gz: 5b6a7eaec4d234210f99e12ab0bf2301a42e3fcd21f6a369640b3dd032a0a3ba25e1f6a3afd1bcbebceac227802c8e4cea945951923a83c7191154f66ec23512
7
- data.tar.gz: 35d6d11418ad06fe1e363e9ac794c3cdab319d827a7f4f12b49a3572d04be0f115638880e6ac475b0a9298e2ada84b8055e247c7fe058c2bb3c4fbf6bb748506
6
+ metadata.gz: ba8d2597f8502259ef996c647d08f5264e6c677aa4d3e0e697156442b35fe6a1503b914f156b83a627dadaf4cdb64e3e159049d2031e52c675ff721b960abc16
7
+ data.tar.gz: 538224ea9fa9c537f9671a5f9de5bfb1a7dc9078f531b6ef8fc8f1c02aa64fda4e82e8031ad5da37abcaeb793b65fd4b5b541e6329181e8e0e21af8d05d0fc93
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.21.7
4
+
5
+ * Improved parsing recipients with Postmark::InactiveRecipientError.parse_recipients method
6
+
3
7
  == 1.21.6
4
8
 
5
9
  * Improved error handling for email sending related to invalid email addresses
@@ -76,8 +76,8 @@ module Postmark
76
76
  attr_reader :recipients
77
77
 
78
78
  PATTERNS = [/^Found inactive addresses: (.+?)\.$/.freeze,
79
- /^Found inactive addresses: (.+?)\.$/.freeze,
80
- /these inactive addresses: (.+?)\. Inactive/.freeze].freeze
79
+ /these inactive addresses: (.+?)\. Inactive/.freeze,
80
+ /these inactive addresses: (.+?)\.?$/].freeze
81
81
 
82
82
  def self.parse_recipients(message)
83
83
  PATTERNS.each do |p|
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.21.6'
2
+ VERSION = '1.21.7'
3
3
  end
@@ -195,6 +195,12 @@ describe(Postmark::InactiveRecipientError) do
195
195
  it {is_expected.to eq(recipients.take(1))}
196
196
  end
197
197
 
198
+ context 'i/n inactive, n > 1, i < n - new message format' do
199
+ let(:message) { "Message OK, but will not deliver to these inactive addresses: #{recipients[0...2].join(', ')}" }
200
+
201
+ it {is_expected.to eq(recipients.take(2))}
202
+ end
203
+
198
204
  context 'i/n inactive, n > 1, i < n' do
199
205
  let(:message) do
200
206
  'Message OK, but will not deliver to these inactive addresses: ' \
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.21.6
4
+ version: 1.21.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomek Maszkowski