postmark 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 0.9.14
4
+
5
+ * Parse Subject and MessageID from the Bounce API response.
6
+
3
7
  == 0.9.13
4
8
 
5
9
  * Added error_code to DeliveryError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.13
1
+ 0.9.14
@@ -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
6
+ attr_reader :email, :bounced_at, :type, :details, :name, :id, :server_id, :tag, :message_id, :subject
7
7
 
8
8
  def initialize(values = {})
9
9
  @id = values["ID"]
@@ -16,6 +16,8 @@ module Postmark
16
16
  @dump_available = values["DumpAvailable"]
17
17
  @inactive = values["Inactive"]
18
18
  @can_activate = values["CanActivate"]
19
+ @message_id = values["MessageID"]
20
+ @subject = values["Subject"]
19
21
  end
20
22
 
21
23
  def inactive?
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = "0.9.13"
2
+ VERSION = "0.9.14"
3
3
  end
data/spec/bounce_spec.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "Bounce" do
4
- let(:bounce_json) { %{{"Type":"HardBounce","TypeCode":1,"Details":"test bounce","Email":"jim@test.com","BouncedAt":"#{Time.now.to_s}","DumpAvailable":true,"Inactive":false,"CanActivate":true,"ID":12}} }
4
+ let(:bounce_json) { %{{"Type":"HardBounce","MessageID":"d12c2f1c-60f3-4258-b163-d17052546ae4","TypeCode":1,"Details":"test bounce","Email":"jim@test.com","BouncedAt":"#{Time.now.to_s}","DumpAvailable":true,"Inactive":false,"CanActivate":true,"ID":12,"Subject":"Hello from our app!"}} }
5
5
  let(:bounces_json) { %{{"Bounces": [#{bounce_json},#{bounce_json}]}} }
6
6
 
7
7
  context "single bounce" do
@@ -21,6 +21,8 @@ describe "Bounce" do
21
21
  bounce.bounced_at.to_s.should == Time.now.to_s
22
22
  bounce.details.should == "test bounce"
23
23
  bounce.email.should == "jim@test.com"
24
+ bounce.message_id.should == "d12c2f1c-60f3-4258-b163-d17052546ae4"
25
+ bounce.subject.should == "Hello from our app!"
24
26
  end
25
27
 
26
28
  it "should retrieve bounce dump" 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: 0.9.13
4
+ version: 0.9.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -228,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  segments:
230
230
  - 0
231
- hash: -3519863047660442665
231
+ hash: 3786712246708808315
232
232
  required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  none: false
234
234
  requirements: