postmark 1.22.1 → 1.22.2

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: dd4bf518075f6e5a7eafaa982c34b95cb3cd5eebee2cf059ad5743b182a6a533
4
- data.tar.gz: f34c3ddc69336854ca6a964b66eb4c393a4e630756b4e2a8dc637121e5c43a3e
3
+ metadata.gz: 65048304ac65a25c53918528a483e99f0c74ea5474c11348c978d8fb732dc032
4
+ data.tar.gz: 3e90058072e9e549846850fb3c352e963cc7c32468792e10d37662a63b036f03
5
5
  SHA512:
6
- metadata.gz: 6020d8ad751fd18f3e706d42c3c16938f04e517de4653121e1efb83ce9e1db9d33578cef954edd615c3f56c0151e9c4ee154a7cb7e8f2e738cb57cd6ffa227dc
7
- data.tar.gz: c0ccc572d15ab61da1647c7c4abcbd4a0d180d0aa21cda7a580a798880f03f1ede1759a40db2bb269b15d9cf3dc39bbe2a641d6c12211cec2901db9e2034a925
6
+ metadata.gz: b25f7ea69f5b3db0260ad29c70b464cf757ed2f3f3b9abb45383aa8c4239516cbc9132bc67200f56faa08563e5cfcf391be086d845bf5baf03223106dd3e7cae
7
+ data.tar.gz: 7fefb6ced2722b022b27ed06bd5cde4c388e373cfc75995dfb549534618a48e7106281514f9c06d6aba280d472c8211b39a4bffcaff9e61f43aa5017b0a260f7
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.6
1
+ ruby-2.7.5
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.22.2
4
+ * Updated Postmark::InactiveRecipientError.parse_recipients method to handle current error message
5
+ * Update post install message to use https URL
6
+
3
7
  == 1.22.1
4
8
  * Migrated to ActiveCampaign
5
9
 
data/CONTRIBUTING.md CHANGED
@@ -14,5 +14,5 @@ If you’d like to submit a pull request:
14
14
  * Do not mess with rakefile, version, or history.
15
15
  * Update the CHANGELOG, list your changes under Unreleased.
16
16
  * Update the README if necessary.
17
- * Write short, descriptive commit messages, following the format used in therepo.
17
+ * Write short, descriptive commit messages, following the format used in the repo.
18
18
  * Send a pull request. Bonus points for topic branches.
data/Gemfile CHANGED
@@ -11,5 +11,8 @@ group :test do
11
11
  gem 'mime-types'
12
12
  gem 'activesupport'
13
13
  gem 'i18n', '~> 0.6.0'
14
- gem 'yajl-ruby', '~> 1.0', :platforms => [:mingw, :mswin, :ruby]
14
+
15
+ # To support Ruby version <= 2.6
16
+ gem 'minitest', '<= 5.15.0'
17
+ gem 'yajl-ruby', '<= 1.4.1', :platforms => [:mingw, :mswin, :ruby]
15
18
  end
data/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  Postmark allows you to send your emails with high delivery rates. It also includes detailed statistics. In addition, Postmark can parse incoming emails which are forwarded back to your application.
13
13
 
14
- This gem is the official wrapper for the [Postmark HTTP API](http://postmarkapp.com).
14
+ This gem is the official wrapper for the [Postmark HTTP API](https://postmarkapp.com).
15
15
 
16
16
  ## Usage
17
17
 
@@ -62,6 +62,10 @@ Please leave all comments, bugs, requests and issues on the Issues page.
62
62
  The Postmark Ruby library is licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) license.
63
63
  Refer to the [LICENSE](https://github.com/ActiveCampaign/postmark-gem/blob/main/LICENSE) file for more information.
64
64
 
65
+ ## Tests
66
+
67
+ The [integration tests](https://github.com/ActiveCampaign/postmark-gem/tree/main/spec/integration) currently use a real test email address, configured via `POSTMARK_CI_RECIPIENT`. The credentials for it can be found in the internal 1password vault under `Postmark - Ruby - Client Library - Account`.
68
+
65
69
  ## Copyright
66
70
 
67
71
  Copyright © 2022 ActiveCampaign LLC.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.22.1
1
+ 1.22.2
@@ -75,9 +75,10 @@ module Postmark
75
75
  class InactiveRecipientError < ApiInputError
76
76
  attr_reader :recipients
77
77
 
78
- PATTERNS = [/^Found inactive addresses: (.+?)\.$/.freeze,
79
- /these inactive addresses: (.+?)\. Inactive/.freeze,
80
- /these inactive addresses: (.+?)\.?$/].freeze
78
+ PATTERNS = [
79
+ /Found inactive addresses: (.+?)\. Inactive/,
80
+ /these inactive addresses: (.+?)\.?$/
81
+ ].freeze
81
82
 
82
83
  def self.parse_recipients(message)
83
84
  PATTERNS.each do |p|
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.22.1'
2
+ VERSION = '1.22.2'
3
3
  end
data/postmark.gemspec CHANGED
@@ -5,7 +5,7 @@ require "postmark/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "postmark"
7
7
  s.version = Postmark::VERSION
8
- s.homepage = "http://postmarkapp.com"
8
+ s.homepage = "https://postmarkapp.com"
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.license = 'MIT'
11
11
 
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.post_install_message = %q{
25
25
  ==================
26
26
  Thanks for installing the postmark gem. If you don't have an account, please
27
- sign up at http://postmarkapp.com/.
27
+ sign up at https://postmarkapp.com/.
28
28
 
29
29
  Review the README.md for implementation details and examples.
30
30
  ==================
@@ -186,26 +186,15 @@ describe(Postmark::InactiveRecipientError) do
186
186
 
187
187
  context '1/1 inactive' do
188
188
  let(:message) do
189
- 'You tried to send to a recipient that has been marked as ' \
190
- "inactive.\nFound inactive addresses: #{recipients[0]}.\n" \
191
- 'Inactive recipients are ones that have generated a hard ' \
192
- 'bounce or a spam complaint.'
189
+ all_recipients_inactive_message(recipients[0])
193
190
  end
194
191
 
195
192
  it {is_expected.to eq(recipients.take(1))}
196
193
  end
197
194
 
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
-
204
195
  context 'i/n inactive, n > 1, i < n' do
205
196
  let(:message) do
206
- 'Message OK, but will not deliver to these inactive addresses: ' \
207
- "#{recipients[0...2].join(', ')}. Inactive recipients are ones that " \
208
- 'have generated a hard bounce or a spam complaint.'
197
+ some_recipients_inactive_message(recipients[0...2].join(', '))
209
198
  end
210
199
 
211
200
  it {is_expected.to eq(recipients.take(2))}
@@ -213,9 +202,7 @@ describe(Postmark::InactiveRecipientError) do
213
202
 
214
203
  context 'n/n inactive, n > 1' do
215
204
  let(:message) do
216
- 'You tried to send to recipients that have all been marked as ' \
217
- "inactive.\nFound inactive addresses: #{recipients.join(', ')}.\n" \
218
- 'Inactive recipients are ones that have generated a hard bounce or a spam complaint.'
205
+ all_recipients_inactive_message(recipients.join(', '))
219
206
  end
220
207
 
221
208
  it {is_expected.to eq(recipients)}
@@ -240,10 +227,7 @@ describe(Postmark::InactiveRecipientError) do
240
227
  end
241
228
 
242
229
  let(:message) do
243
- 'You tried to send to a recipient that has been marked as ' \
244
- "inactive.\nFound inactive addresses: #{address}.\n" \
245
- 'Inactive recipients are ones that have generated a hard ' \
246
- 'bounce or a spam complaint.'
230
+ all_recipients_inactive_message(address)
247
231
  end
248
232
 
249
233
  it 'parses recipients from json payload' do
@@ -262,6 +246,15 @@ describe(Postmark::InactiveRecipientError) do
262
246
  expect(subject.error_code).to eq(Postmark::ApiInputError::INACTIVE_RECIPIENT)
263
247
  end
264
248
  end
249
+
250
+ def some_recipients_inactive_message(addresses)
251
+ "Message OK, but will not deliver to these inactive addresses: #{addresses}."
252
+ end
253
+
254
+ def all_recipients_inactive_message(addresses)
255
+ "You tried to send to recipient(s) that have been marked as inactive. Found inactive addresses: #{addresses}. " \
256
+ "Inactive recipients are ones that have generated a hard bounce, a spam complaint, or a manual suppression."
257
+ end
265
258
  end
266
259
 
267
260
  describe(Postmark::DeliveryError) do
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.1
4
+ version: 1.22.2
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-06-22 00:00:00.000000000 Z
16
+ date: 2022-11-22 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: json
@@ -129,12 +129,12 @@ files:
129
129
  - spec/unit/postmark/mail_message_converter_spec.rb
130
130
  - spec/unit/postmark/message_extensions/mail_spec.rb
131
131
  - spec/unit/postmark_spec.rb
132
- homepage: http://postmarkapp.com
132
+ homepage: https://postmarkapp.com
133
133
  licenses:
134
134
  - MIT
135
135
  metadata: {}
136
136
  post_install_message: "\n ==================\n Thanks for installing the postmark
137
- gem. If you don't have an account, please\n sign up at http://postmarkapp.com/.\n\n
137
+ gem. If you don't have an account, please\n sign up at https://postmarkapp.com/.\n\n
138
138
  \ Review the README.md for implementation details and examples.\n ==================\n
139
139
  \ "
140
140
  rdoc_options:
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: 1.3.7
154
154
  requirements: []
155
- rubygems_version: 3.0.9
155
+ rubygems_version: 3.1.6
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Official Postmark API wrapper.