jeffrafter-win32-sms 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/lib/win32/sms.rb +4 -4
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/win32/sms.rb
CHANGED
@@ -61,8 +61,8 @@ module Win32
|
|
61
61
|
@device = nil
|
62
62
|
end
|
63
63
|
|
64
|
-
def command(data, term = "\r
|
65
|
-
write(data + "\r
|
64
|
+
def command(data, term = "\r")
|
65
|
+
write(data + "\r")
|
66
66
|
response = wait(term)
|
67
67
|
response.delete_if do |line|
|
68
68
|
(line[0,6] == "+WIND:") or
|
@@ -104,7 +104,7 @@ module Win32
|
|
104
104
|
|
105
105
|
def sms(number, text)
|
106
106
|
# initiate the sms, and wait for either the text prompt or an error
|
107
|
-
command "AT+CMGS=\"#{number}\"", ["\r
|
107
|
+
command "AT+CMGS=\"#{number}\"", ["\r", "> "]
|
108
108
|
begin
|
109
109
|
# send the sms, and wait until it is accepted or rejected
|
110
110
|
text = encode(text)
|
@@ -145,7 +145,7 @@ module Win32
|
|
145
145
|
|
146
146
|
protected
|
147
147
|
|
148
|
-
def wait(term = "\r
|
148
|
+
def wait(term = "\r")
|
149
149
|
response = []
|
150
150
|
loop do
|
151
151
|
buffer = read_until(term)
|