sendgrid_actionmailer_adapter 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 1fac44a61ba9e6577026e8956fa84a53df446861461536d73851d99fd21dfe20
4
- data.tar.gz: 0ed2033d464f512e4e1dbbd15c2153b974519639c800d160fa7ead54b0c71d23
3
+ metadata.gz: f3459fa2cabe507129253244ce31666e7c613b4761f1d3209e9d42bd7a142b41
4
+ data.tar.gz: 7df639a0e08d5f906cdb64f2851b3157120fe253c2819ec293e0d45259858345
5
5
  SHA512:
6
- metadata.gz: 875b6e2e9103de5b51a8dc274658e5da3183eb6a85acb92b1cc0a2f7a342429dfe7b037e62d5a2d4abf8c2216d11e20a422b4203290dc99be4d5984b72c1da15
7
- data.tar.gz: 5895a7b1d7c03845a040ccf8424d363ef685aedb67bab1f33201e070c23d545dc1b04b301d98e48565ec1a36f88172831012f1643b855f17bf2e71173815e905
6
+ metadata.gz: 03a37ec28980cafa9aaa7a7175fe7946b43cf8ac3b83ae4ff5ffed70f915b172f4982efe2404d3399199da77eda88f9f27ca7345a19934001b24adf7a2f89a45
7
+ data.tar.gz: 7c18f61dc83ca6eb4d8ed50e0de4d5092dd78d1c5de55064ed699c97159ab1d142d6e3010afa30618ad215c5de86f1654ec5bf852621552c4ec8b5d2eb6f8c0d
@@ -9,8 +9,8 @@ module SendGridActionMailerAdapter
9
9
  end
10
10
 
11
11
  def convert(mail)
12
- main_part = mail.body.parts.detect(&:text?) || mail
13
- ::SendGrid::Content.new(type: main_part.mime_type, value: main_part.body.to_s)
12
+ contents = mail.body.multipart? ? mail.body.parts.select(&:text?) : [mail]
13
+ contents.map { |c| ::SendGrid::Content.new(type: c.mime_type, value: c.body.to_s) }
14
14
  end
15
15
 
16
16
  def assign_attributes(sendgrid_mail, value)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SendGridActionMailerAdapter
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid_actionmailer_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryu39
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sendgrid-ruby