sms_global_sender 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sms_sender.rb +2 -1
- data/sms_global_sender.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbbc3d28a272ad6eaaa8ca63d8d377468e8f5d59
|
4
|
+
data.tar.gz: 0073f12dd3e936c1c244d152414cf5601c22b73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e8a555f8ffa3da6de3cac9b263ddf08ac3e8592d8c6f45b7d80be6307baf5dbda7576368f8ca20f77aa20946a451014ae82d89ad33109bdc6dbd372d672a12
|
7
|
+
data.tar.gz: efcb12318958ac14fa99a62da8d2da4103d7cf392961ff64712458dc6a616d1cfea5734ee44233a74d73284c833290b5c91a02bae2c32c22628b46a3f3c8d55d
|
data/lib/sms_sender.rb
CHANGED
@@ -19,9 +19,10 @@ class SmsSender
|
|
19
19
|
'Content-Type' => 'application/json',
|
20
20
|
'Accept' => 'application/json'}
|
21
21
|
|
22
|
+
protocol = port == 443 ? 'https' : 'http'
|
22
23
|
body = {"origin"=>title, "destination"=>mobile, "message"=>msg }
|
23
24
|
|
24
|
-
response = HTTParty.post("
|
25
|
+
response = HTTParty.post("#{protocol}://#{@host}#{@request_url}", headers: header, body: body.to_json)
|
25
26
|
response.code
|
26
27
|
end
|
27
28
|
|
data/sms_global_sender.gemspec
CHANGED