mote_sms 1.3.7 → 1.3.8
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 +4 -4
- data/lib/mote_sms/transports/action_mailer_transport.rb +5 -5
- data/lib/mote_sms/version.rb +1 -1
- 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: 5fa9b61fd37264a39d7137df7f2c7403238c88c6
|
|
4
|
+
data.tar.gz: bc8b78217a2149d2014423bf89581b38aa917c9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 934c23679be893b9a3c75dffe16bebe0fe8addc016fa03d2e37504e0f2118e8bbb52ba32ac57992e5ab8c8974e52f5b617ea1c18d0fe793e131f82fd7a9d4b08
|
|
7
|
+
data.tar.gz: 72938225c8c4109587374e266cd4076f3e734663f7be87c9f8ca07fc15ad91a0d91369172997ffd4de879497d69a7e2b2dedf596793bb8d0958232b4cf28d858
|
|
@@ -3,9 +3,9 @@ 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
|
|
8
|
-
mail to: recipient, from: "#{sms.from} <#{recipient}>", subject: subject, body: sms.body
|
|
6
|
+
def forward_sms(recipient, sms, options = {})
|
|
7
|
+
subject = options[:subject].presence || "SMS to #{sms.to.map(&:to_s).join(', ')}"
|
|
8
|
+
mail options.merge(to: recipient, from: "#{sms.from} <#{recipient}>", subject: subject, body: sms.body)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
|
|
@@ -42,8 +42,8 @@ module MoteSMS
|
|
|
42
42
|
def deliver(message, options = {})
|
|
43
43
|
options = options.reverse_merge default_options
|
|
44
44
|
to = recipient.respond_to?(:call) ? recipient.call(message) : recipient
|
|
45
|
-
message.body message.body.encode(options[:
|
|
46
|
-
ActionMailerSMSMailer.forward_sms(to, message, options
|
|
45
|
+
message.body message.body.encode(options[:charset]) if options[:charset].presence
|
|
46
|
+
ActionMailerSMSMailer.forward_sms(to, message, options.compact).deliver_now
|
|
47
47
|
message.to
|
|
48
48
|
end
|
|
49
49
|
end
|
data/lib/mote_sms/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.3.8
|
|
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-11-
|
|
12
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: phony
|