postmark 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +5 -0
- data/VERSION +1 -1
- data/lib/postmark/mail_message_converter.rb +1 -1
- data/lib/postmark/message_extensions/mail.rb +5 -2
- data/lib/postmark/version.rb +1 -1
- data/spec/unit/postmark/mail_message_converter_spec.rb +1 -1
- data/spec/unit/postmark/message_extensions/mail_spec.rb +9 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3eb03641468ddcbee6aab9cdc449257f5bb309c
|
4
|
+
data.tar.gz: 19f4463b421ead1daae9e1121a1a24e5a4485c98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad68cc4ef04239f9a222d0a9426e9d0c8b8bdd696741990ff06076e34c8d4e1a9ff1ebaec7f0f2539ddd3b8147fba3c311286988f519b8121aa5ea71e9687a42
|
7
|
+
data.tar.gz: 356a337ee74c68a196f11110537a2ab525ec4d446e597c32c8df0fb69166e03ef67aa0d317a3904cfe5c00cec39729c78be5c21c654919efa40ef972b395c8ea
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 1.13.0
|
4
|
+
|
5
|
+
* Changed default value returned by Mail::Message#metadata to a mutable hash (makes things easier for postmark-rails).
|
6
|
+
* All message JSON payloads now include an empty metadata object even if metadata is unset.
|
7
|
+
|
3
8
|
== 1.12.0
|
4
9
|
|
5
10
|
* Added support for attaching metadata to messages.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.13.0
|
@@ -32,7 +32,7 @@ module Postmark
|
|
32
32
|
'Tag' => @message.tag.to_s,
|
33
33
|
'TrackOpens' => (cast_to_bool(@message.track_opens) unless @message.track_opens.empty?),
|
34
34
|
'TrackLinks' => (::Postmark::Inflector.to_postmark(@message.track_links) unless @message.track_links.empty?),
|
35
|
-
'Metadata' =>
|
35
|
+
'Metadata' => @message.metadata
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
data/lib/postmark/version.rb
CHANGED
@@ -328,7 +328,7 @@ describe Postmark::MailMessageConverter do
|
|
328
328
|
|
329
329
|
it 'converts multiple metadata fields' do
|
330
330
|
metadata = {}
|
331
|
-
|
331
|
+
10.times { |i| metadata["test#{i+1}"] = "t"*80 }
|
332
332
|
msg = mail_html_message
|
333
333
|
msg.metadata = metadata
|
334
334
|
expect(subject.new(msg).run).to include('Metadata' => metadata)
|
@@ -88,24 +88,20 @@ describe Mail::Message do
|
|
88
88
|
end
|
89
89
|
|
90
90
|
describe '#metadata' do
|
91
|
-
let(:metadata) {{:test =>
|
91
|
+
let(:metadata) { { :test => 'test' } }
|
92
92
|
|
93
|
-
it 'returns
|
94
|
-
expect(mail_message.metadata).to eq
|
93
|
+
it 'returns a mutable empty hash if unset' do
|
94
|
+
expect(mail_message.metadata).to eq({})
|
95
|
+
expect(mail_message.metadata.equal?(mail_message.metadata)).to be true
|
95
96
|
end
|
96
97
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
expect(mail_message.metadata).to eq metadata
|
101
|
-
end
|
98
|
+
it 'supports assigning non-null values (for the builder DSL)' do
|
99
|
+
expect { mail_message.metadata(metadata) }.to change { mail_message.metadata }.to(metadata)
|
100
|
+
expect { mail_message.metadata(nil) }.to_not change { mail_message.metadata }
|
102
101
|
end
|
103
102
|
|
104
|
-
|
105
|
-
|
106
|
-
mail_message.metadata(metadata)
|
107
|
-
expect(mail_message.metadata).to eq metadata
|
108
|
-
end
|
103
|
+
it 'returns value assigned via metadata=' do
|
104
|
+
expect { mail_message.metadata = metadata }.to change { mail_message.metadata }.to(metadata)
|
109
105
|
end
|
110
106
|
end
|
111
107
|
|
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.
|
4
|
+
version: 1.13.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: 2018-07-
|
13
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|