coolsms-client 0.1.0 → 0.1.1

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: 2238ae2307f0f0c4a92b2899288c84d91607a194
4
- data.tar.gz: 29328c3d0e31bb2d333aa0b02769db3b97651a32
3
+ metadata.gz: a4d69ab619be656f96f12505c01e34df5bf8a9e8
4
+ data.tar.gz: a41fa018ba83eaeb2505122ff78d9907ddef55d3
5
5
  SHA512:
6
- metadata.gz: fd5a02bba4dfd6f28aea04757878b84c9a89c59a18531c9145ef05d0e282fc6346cc32a719783d3027a9fbcb439c242ff042cf3cf91e2ebc3219e65195bbc802
7
- data.tar.gz: c4dc4c032e2eaec51e12ec3fb1a8a76e9b841d621cb83f18e50f401f5276096acbf511a45d39910ad3afe7f9810dd28c1c8b5d6828bac5583ef4d9d3498082e8
6
+ metadata.gz: 22751d6b462bfd74c6950c6bed12e69f697894e004fdd7e3a2a3e5e766114b9abc359f995017fb4a8fbb1fc1e0e3a7999a579f70d2b83624155774f246d7a639
7
+ data.tar.gz: 78eb0e314ede3a7b3437851bc5467817ed0330f5a3a0c8d395eba7e51777c7e322678a24cc9e9f1fc5e45c56e968b64e90b42be04c62ba5a415fb35cd4340d3c
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ ![image]
2
+ (https://travis-ci.org/CosmicColor/coolsms-client.svg)
3
+
1
4
  # Coolsms::Client
2
5
 
3
6
  This is a simple client for sending SMS and LMS messages to mobile phones in South Korea via the CoolSMS api. http://www.coolsms.co.kr/
@@ -25,7 +25,13 @@ module Coolsms
25
25
  slt = salt
26
26
  signature = signature(ts,slt)
27
27
  type = options[:text].bytesize > 80 ? 'LMS' : 'SMS'
28
- res = HTTParty.post(COOLSMS_URL, :headers => { 'Content-Type' => 'application/x-www-form-urlencoded' }, :body => { :api_key => @api_key, :type => type, :salt => slt, :signature => signature, :to => options[:to], :timestamp => ts, :from => @sender, :text => options[:text] })
28
+ body = { :api_key => @api_key, :type => type, :salt => slt, :signature => signature, :to => options[:to], :timestamp => ts, :from => @sender, :text => options[:text] }
29
+
30
+ if type == 'LMS'
31
+ body.merge! :subject => options[:subject] ? options[:subject] : ""
32
+ end
33
+
34
+ res = HTTParty.post(COOLSMS_URL, :headers => { 'Content-Type' => 'application/x-www-form-urlencoded' }, :body => body)
29
35
  parse_response res
30
36
  end
31
37
 
@@ -1,3 +1,3 @@
1
1
  module Coolsms
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coolsms-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kenleytomlin