postmark 1.7.1 → 1.8.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
  SHA1:
3
- metadata.gz: 8b6ee89865d8cde0823c77c487163bf21dfabb05
4
- data.tar.gz: 44a1f152f892ca15636246681afa18f2c17790ab
3
+ metadata.gz: afb7c453558ddc8d7bd2f85b9da18499cbad37a5
4
+ data.tar.gz: 33ebe801283b76dd4bfc5251cc34cd86af40ebd2
5
5
  SHA512:
6
- metadata.gz: debf5072fefde22657302ea4bf137d33f8648d651e9ed07d8549fcb0b0663926ea7615b2dd109679945c0345e905a06a233bf39aebda4cafa28ec355aefa4263
7
- data.tar.gz: 56a4e7a8721f3771f248f5b2152b6d403eaa58ceb7a0fb9c9506c170652ca9dfcf450334b247e4ea62fdeba1ea4f41f4ebb524f26942114078e44b3d70965567
6
+ metadata.gz: 35d6cf332e0f3afb325bb6fe9726408538228613e26948a0de686d9a12cff61e14cbb84ac3cc05ee26eb17c1a9c4a013f175bb963161cd6893711d697e474d10
7
+ data.tar.gz: a54e778d7cf3a3be9e483dbf494b44a0013a10353548a960df1f19c47551cc264454dae1a4dd02d8b5bd96ab8fc3f6295c3f30d0b6b370d9a92fa1126f9f4bc1
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  .bundle
3
+ .env
3
4
  Gemfile.lock
4
5
  pkg/*
5
6
  .rvmrc
data/.travis.yml CHANGED
@@ -1,8 +1,13 @@
1
1
  env:
2
2
  global:
3
- - secure: "fo5ce1ABn12rZODstLzMnM14Ma21CUpYkcn9EnRtsPlvpFt/71hTPtP5pYrhnTTGUxVk6JPYGSUC58fXMa9zJKyMZv1PKokiGuGw4ktcsn+fX/pvEYxmsuQx0e+GbZ6psCHneIbaADEjUeqR/XJUBJDFpDoXKGwZuJW05b8Hxbc="
4
- - secure: "YGu/kwvIbTKQ9/ox2MGJ3qVLU78ccqi+HLgkXYBxhjfOFTgTemFizMgZYRDmwGKnO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BuY8+hvtB89PXyoKKv9TBjnLEPTZFKnxP9vcYsbi45Sm06MOg="
6
11
  language: ruby
7
12
  rvm:
8
13
  - 1.8.7
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = Changelog
2
2
 
3
+ == 1.8.0
4
+
5
+ * Added missing `description` attribute to `Postmark::Bounce` #50.
6
+ * Restricted `rake` dependency to `< 11.0.0` for Ruby < 1.9 via gemspec.
7
+ * Restricted `json` dependency to `< 2.0.0` for Ruby < 2.0 via gemspec.
8
+
3
9
  == 1.7.1
4
10
 
5
11
  * Explicitly set TLS version used by the client.
data/README.md CHANGED
@@ -144,7 +144,7 @@ client.deliver(from: 'sheldon@bigbangtheory.com',
144
144
  ## Sending to multiple recipients
145
145
 
146
146
  You can pass multiple recipient addresses in the `:to` field and the optional
147
- `:cc` and `:bcc` fields. Note that Postmark has a limit of twenty recipients
147
+ `:cc` and `:bcc` fields. Note that Postmark has a limit of 50 recipients
148
148
  per message in total. You need to take care not to exceed that limit.
149
149
  Otherwise, you will get an error.
150
150
 
@@ -340,6 +340,16 @@ Delivery method accepts all options supported by `Postmark::ApiClient`
340
340
  documented above. A new instance of `Postmark::ApiClient` is created every time
341
341
  you deliver a message to preserve thread safety.
342
342
 
343
+ If you would prefer to use Postmark as the default delivery method for all
344
+ `Mail::Message` instances, you can call `Mail.defaults` method during the initialization
345
+ step of your app:
346
+
347
+ ``` ruby
348
+ Mail.defaults do
349
+ delivery_method Mail::Postmark, api_token: 'your-postmark-api-token'
350
+ end
351
+ ```
352
+
343
353
  ## Plain text message
344
354
 
345
355
  ``` ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.1
1
+ 1.8.0
@@ -3,7 +3,7 @@ require 'time'
3
3
  module Postmark
4
4
  class Bounce
5
5
 
6
- attr_reader :email, :bounced_at, :type, :details, :name, :id, :server_id, :tag, :message_id, :subject
6
+ attr_reader :email, :bounced_at, :type, :description, :details, :name, :id, :server_id, :tag, :message_id, :subject
7
7
 
8
8
  def initialize(values = {})
9
9
  values = Postmark::HashHelper.to_ruby(values)
@@ -12,6 +12,7 @@ module Postmark
12
12
  @bounced_at = Time.parse(values[:bounced_at])
13
13
  @type = values[:type]
14
14
  @name = values[:name]
15
+ @description = values[:description]
15
16
  @details = values[:details]
16
17
  @tag = values[:tag]
17
18
  @dump_available = values[:dump_available]
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.7.1'
2
+ VERSION = '1.8.0'
3
3
  end
data/postmark.gemspec CHANGED
@@ -33,8 +33,8 @@ Gem::Specification.new do |s|
33
33
 
34
34
  s.required_rubygems_version = ">= 1.3.7"
35
35
 
36
- s.add_dependency "rake"
37
- s.add_dependency "json"
36
+ s.add_dependency "rake", ("< 11.0.0" if RUBY_VERSION < "1.9")
37
+ s.add_dependency "json", ("< 2.0.0" if RUBY_VERSION < "2.0")
38
38
 
39
39
  s.add_development_dependency "mail"
40
40
  end
@@ -6,7 +6,7 @@ describe 'Account API client usage' do
6
6
  :http_open_timeout => 15,
7
7
  :http_read_timeout => 15) }
8
8
  let(:unique_token) { rand(36**32).to_s(36) }
9
- let(:unique_from_email) { ENV['POSTMARK_CI_RECIPIENT'].gsub(/(\+.+)?@/, "+#{unique_token}@") }
9
+ let(:unique_from_email) { ENV['POSTMARK_CI_SENDER'].gsub(/(\+.+)?@/, "+#{unique_token}@") }
10
10
 
11
11
  it 'can be used to manage senders' do
12
12
  new_sender = nil
@@ -32,7 +32,7 @@ describe 'Account API client usage' do
32
32
  expect(updated_sender[:id]).to eq(new_sender[:id])
33
33
 
34
34
  # spf
35
- expect(subject.verified_sender_spf?(new_sender[:id])).to be_false
35
+ expect(subject.verified_sender_spf?(new_sender[:id])).to be_true
36
36
 
37
37
  # resend
38
38
  expect { subject.resend_sender_confirmation(new_sender[:id]) }.not_to raise_error
@@ -4,6 +4,7 @@ describe Postmark::Bounce do
4
4
  let(:bounce_data) { {:type => "HardBounce",
5
5
  :message_id => "d12c2f1c-60f3-4258-b163-d17052546ae4",
6
6
  :type_code => 1,
7
+ :description => "The server was unable to deliver your message (ex: unknown user, mailbox not found).",
7
8
  :details => "test bounce",
8
9
  :email => "jim@test.com",
9
10
  :bounced_at => "2013-04-22 18:06:48 +0800",
@@ -24,6 +25,7 @@ describe Postmark::Bounce do
24
25
  it { should respond_to(:email) }
25
26
  it { should respond_to(:bounced_at) }
26
27
  it { should respond_to(:type) }
28
+ it { should respond_to(:description) }
27
29
  it { should respond_to(:details) }
28
30
  it { should respond_to(:name) }
29
31
  it { should respond_to(:id) }
@@ -50,6 +52,7 @@ describe Postmark::Bounce do
50
52
 
51
53
  its(:type) { should eq bounce_data[:type] }
52
54
  its(:message_id) { should eq bounce_data[:message_id] }
55
+ its(:description) { should eq bounce_data[:description] }
53
56
  its(:details) { should eq bounce_data[:details] }
54
57
  its(:email) { should eq bounce_data[:email] }
55
58
  its(:bounced_at) { should == Time.parse(bounce_data[:bounced_at]) }
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.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petyo Ivanov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-02-15 00:00:00.000000000 Z
13
+ date: 2016-07-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake