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 +4 -0
- data/VERSION +1 -1
- data/lib/postmark/bounce.rb +3 -1
- data/lib/postmark/version.rb +1 -1
- data/spec/bounce_spec.rb +3 -1
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.14
|
data/lib/postmark/bounce.rb
CHANGED
@@ -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?
|
data/lib/postmark/version.rb
CHANGED
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.
|
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:
|
231
|
+
hash: 3786712246708808315
|
232
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
233
|
none: false
|
234
234
|
requirements:
|