postmark 1.4.2 → 1.4.3

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: fc241632a8664fa4d6da4f478cb3b06d16dcad9e
4
- data.tar.gz: 05270b025e77c916322187db871b53aa9d2f90dd
3
+ metadata.gz: 9b6cd5a5bf46c2c22b7ef83182778ca9d77ae269
4
+ data.tar.gz: 04066522d985faed76d5aa028c1aa4985304876f
5
5
  SHA512:
6
- metadata.gz: de873b858f3b93c0e4bbbbec6b6092d579799da2e7d393909d163c2522a3a336d03846faffcaf8b618791d59d7dde5d8376ae808ee4f21d4112bb7ffb4f181f4
7
- data.tar.gz: bfc1403186f4522b58174842bd104848a52f5b6aa405f3b61dc8e1db252785160b76f1b6b5a8046b079eb95975bf0a6a1717855787ded20fd93069e8590b9f02
6
+ metadata.gz: 0f667a7423a02dd37de2c4efb28e1384dc0f07ee8b01a54fe9ae2d718e7ce4140eb3381c0073831b0d4799fbe2cddcb05e4ce5b6f4cc6284aa786e9beb269caa
7
+ data.tar.gz: 941a75f25a9c13b6ed9736b54cace4d445a29723c564c4ad14584c4f2a363dcf3a48f61fb461b0f2b1ab36f9189239fb3aa52a66db765df4f6bd175c4e5ecca4
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.4.3
4
+
5
+ * Fix a regression when using the gem with older mail gem versions not implementing Mail::Message#text?.
6
+
3
7
  == 1.4.2
4
8
 
5
9
  * Fix a regression when using the gem with older mail gem versions introduced in 1.4.1. Affected mail gem versions are 2.5.3 and below.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.2
1
+ 1.4.3
@@ -39,14 +39,22 @@ module Mail
39
39
  ::Postmark::MessageHelper.attachments_to_postmark(@_attachments)
40
40
  end
41
41
 
42
+ def text?
43
+ if defined?(super)
44
+ super
45
+ else
46
+ has_content_type? ? !!(main_type =~ /^text$/i) : false
47
+ end
48
+ end
49
+
42
50
  def html?
43
- content_type && content_type.include?('text/html')
51
+ text? && !!(sub_type =~ /^html$/i)
44
52
  end
45
53
 
46
54
  def body_html
47
55
  if multipart? && html_part
48
56
  html_part.decoded
49
- elsif text? && html?
57
+ elsif html?
50
58
  decoded
51
59
  end
52
60
  end
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.4.2'
2
+ VERSION = '1.4.3'
3
3
  end
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.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petyo Ivanov