mote_sms 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f87c411d3669dc4ac581b1d3e61cfb3919530188
4
- data.tar.gz: 2e84c3d7c62f9edeed4a705e70a81b7e765e118c
3
+ metadata.gz: a9bbf42d15f7f0b5df31da51494a41b983150bb3
4
+ data.tar.gz: 46ba38ee95b9372fcc9f983026a73e7d4c65baa2
5
5
  SHA512:
6
- metadata.gz: 8c006f92b10489c224a5f0abc93b6c5af28dec1cfe34d6a1ee876d882c446e3ee1f15d6789cbd1ad429d743c58609a66bc2253aaf61f282c46aa3cb7dcca080b
7
- data.tar.gz: 9405ee86290afae93a5f12837ac800c57fd54b86dc721ec32efaa8722d094c40d4765b65937f74ae93920c82a8a744f1ce297a44305999c1782f626b66815992
6
+ metadata.gz: 7011c599303d7679dbf8f1e831eb9de6acde334d8983f453da93eca93a8f720c8ff804226e7a41c6327272a4e3d5e672de679b95cf8a6577910b29453c7eca3b
7
+ data.tar.gz: ab54555c1684698678ea72e731dd5e62c655293e955ac97859dc3fda9cef48bab495ccd77684623fa4b7f94238230f3222a415574bee2ea2d6d8e1e809d9de0f
@@ -3,8 +3,8 @@ require 'action_mailer'
3
3
  module MoteSMS
4
4
  # Internal: ActionMailer class to forward SMS to recipient.
5
5
  class ActionMailerSMSMailer < ::ActionMailer::Base
6
- def forward_sms(recipient, sms)
7
- subject = "SMS to #{sms.to.map(&:to_s).join(', ')}"
6
+ def forward_sms(recipient, sms, subject = nil)
7
+ subject ||= "SMS to #{sms.to.map(&:to_s).join(', ')}"
8
8
  mail to: recipient, from: "#{sms.from} <#{recipient}>", subject: subject, body: sms.body
9
9
  end
10
10
  end
@@ -38,9 +38,9 @@ module MoteSMS
38
38
  # currently ignored.
39
39
  #
40
40
  # Returns nothing.
41
- def deliver(message, _options = {})
41
+ def deliver(message, options = {})
42
42
  to = recipient.respond_to?(:call) ? recipient.call(message) : recipient
43
- ActionMailerSMSMailer.forward_sms(to, message).deliver_now
43
+ ActionMailerSMSMailer.forward_sms(to, message, options[:subject].presence).deliver_now
44
44
 
45
45
  message.to
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module MoteSMS
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.3.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mote_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Westermann
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-10-04 00:00:00.000000000 Z
12
+ date: 2017-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: phony