postmark 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +13 -7
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/lib/postmark/attachments_fix_for_mail.rb +15 -10
- data/lib/postmark/version.rb +1 -1
- data/spec/postmark_spec.rb +20 -0
- metadata +24 -24
data/CHANGELOG.rdoc
CHANGED
@@ -1,23 +1,29 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 0.9.12
|
4
|
+
|
5
|
+
* Fixed a problem of attachments processing when using deliver! method on Mail object.
|
6
|
+
* Removed activesupport dependency for Postmark::AttachmentsFixForMail.
|
7
|
+
* Added specs for AttachmentFixForMail.
|
8
|
+
|
3
9
|
== 0.9.11
|
4
10
|
|
5
|
-
* Replaced Jeweler by Bundler
|
6
|
-
* Updated RSpec to 2.8
|
7
|
-
* Fixed specs
|
8
|
-
* Refactored the codebase
|
11
|
+
* Replaced Jeweler by Bundler.
|
12
|
+
* Updated RSpec to 2.8.
|
13
|
+
* Fixed specs.
|
14
|
+
* Refactored the codebase.
|
9
15
|
|
10
16
|
== 0.9.10
|
11
17
|
|
12
|
-
* Fixed Ruby 1.9 compatibility issue
|
18
|
+
* Fixed Ruby 1.9 compatibility issue.
|
13
19
|
|
14
20
|
== 0.9.9
|
15
21
|
|
16
|
-
* Added support for non-array reply_to addresses
|
22
|
+
* Added support for non-array reply_to addresses.
|
17
23
|
|
18
24
|
== 0.9.8
|
19
25
|
|
20
|
-
* Fixed bug that caused unexpected multiple email deliveries on
|
26
|
+
* Fixed bug that caused unexpected multiple email deliveries on Ruby 1.9.2/Rails 3.0.7.
|
21
27
|
|
22
28
|
== 0.9.7
|
23
29
|
|
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.12
|
@@ -19,25 +19,30 @@ module Postmark
|
|
19
19
|
module AttachmentsFixForMail
|
20
20
|
|
21
21
|
def self.included(base)
|
22
|
-
base.class_eval do
|
23
|
-
|
22
|
+
base.class_eval do
|
23
|
+
alias_method :deliver_without_postmark_hook, :deliver
|
24
|
+
alias_method :deliver_without_postmark_hook!, :deliver!
|
25
|
+
|
26
|
+
def deliver!
|
27
|
+
remove_postmark_attachments_from_standard_fields
|
28
|
+
deliver_without_postmark_hook!
|
29
|
+
end
|
30
|
+
|
31
|
+
def deliver
|
32
|
+
remove_postmark_attachments_from_standard_fields
|
33
|
+
deliver_without_postmark_hook
|
34
|
+
end
|
24
35
|
end
|
25
36
|
end
|
26
|
-
|
27
|
-
def deliver_with_postmark_hook
|
28
|
-
remove_postmark_attachments_from_standard_fields
|
29
|
-
deliver_without_postmark_hook
|
30
|
-
end
|
31
|
-
|
37
|
+
|
32
38
|
private
|
33
|
-
|
39
|
+
|
34
40
|
def remove_postmark_attachments_from_standard_fields
|
35
41
|
field = self['POSTMARK-ATTACHMENTS']
|
36
42
|
return if field.nil?
|
37
43
|
self.postmark_attachments = field.value
|
38
44
|
header.fields.delete_if{|f| f.name == 'postmark-attachments'}
|
39
45
|
end
|
40
|
-
|
41
46
|
end
|
42
47
|
|
43
48
|
end
|
data/lib/postmark/version.rb
CHANGED
data/spec/postmark_spec.rb
CHANGED
@@ -158,6 +158,26 @@ describe Postmark do
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
+
context "attachments hook", :ruby => 1.9 do
|
162
|
+
before(:all) { Mail::Message.send(:include, Postmark::AttachmentsFixForMail) }
|
163
|
+
|
164
|
+
before do
|
165
|
+
mail_message.delivery_method Mail::Postmark
|
166
|
+
mail_message.should_receive(:remove_postmark_attachments_from_standard_fields)
|
167
|
+
Postmark.should_receive(:send_through_postmark).with(mail_message)
|
168
|
+
end
|
169
|
+
|
170
|
+
it "should run postmark attachments hook when using deliver! method" do
|
171
|
+
mail_message.deliver!
|
172
|
+
end
|
173
|
+
|
174
|
+
it "should run postmark attachments hook when using deliver method" do
|
175
|
+
mail_message.deliver
|
176
|
+
end
|
177
|
+
|
178
|
+
|
179
|
+
end
|
180
|
+
|
161
181
|
context "JSON library support" do
|
162
182
|
[:Json, :ActiveSupport, :Yajl].each do |lib|
|
163
183
|
begin
|
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.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,7 +15,7 @@ date: 2012-01-31 00:00:00.000000000Z
|
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
18
|
-
requirement: &
|
18
|
+
requirement: &70174637538220 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: '0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70174637538220
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
|
-
requirement: &
|
29
|
+
requirement: &70174637537320 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70174637537320
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: tmail
|
40
|
-
requirement: &
|
40
|
+
requirement: &70174637536120 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70174637536120
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: mail
|
51
|
-
requirement: &
|
51
|
+
requirement: &70174637534700 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: '0'
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *70174637534700
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: rspec-core
|
62
|
-
requirement: &
|
62
|
+
requirement: &70174637533620 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: '2.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *70174637533620
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: activesupport
|
73
|
-
requirement: &
|
73
|
+
requirement: &70174637532520 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: '3.0'
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *70174637532520
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: fakeweb
|
84
|
-
requirement: &
|
84
|
+
requirement: &70174637531520 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *70174637531520
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: fakeweb-matcher
|
95
|
-
requirement: &
|
95
|
+
requirement: &70174637530680 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ! '>='
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: '0'
|
101
101
|
type: :development
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *70174637530680
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: timecop
|
106
|
-
requirement: &
|
106
|
+
requirement: &70174637529940 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ! '>='
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: '0'
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *70174637529940
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: yajl-ruby
|
117
|
-
requirement: &
|
117
|
+
requirement: &70174637529260 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ! '>='
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
version: '0'
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *70174637529260
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: ruby-debug19
|
128
|
-
requirement: &
|
128
|
+
requirement: &70174637528420 !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
@@ -133,7 +133,7 @@ dependencies:
|
|
133
133
|
version: '0'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
|
-
version_requirements: *
|
136
|
+
version_requirements: *70174637528420
|
137
137
|
description: Use this gem to send emails through Postmark HTTP API and retrieve info
|
138
138
|
about bounces.
|
139
139
|
email: ilya@wildbit.com
|
@@ -190,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
segments:
|
192
192
|
- 0
|
193
|
-
hash:
|
193
|
+
hash: 2238284457988379279
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|