utel 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -1
- data/lib/utel.rb +4 -0
- data/lib/utel/device.rb +24 -0
- data/lib/utel/pdu.rb +9 -0
- data/lib/utel/version.rb +1 -1
- metadata +5 -4
data/README.md
CHANGED
data/lib/utel.rb
CHANGED
data/lib/utel/device.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Utel
|
2
|
+
class Device
|
3
|
+
def self.send_at
|
4
|
+
new.send_at
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.pin(*args)
|
8
|
+
new.pin(*args)
|
9
|
+
end
|
10
|
+
|
11
|
+
def pin(code=PIN_CODE)
|
12
|
+
puts code
|
13
|
+
end
|
14
|
+
|
15
|
+
def send_at
|
16
|
+
File.open(Utel::DEVICE, 'w+') do |f|
|
17
|
+
f.write("AT\r\n")
|
18
|
+
while (s = f.gets) do
|
19
|
+
break if s.slice(0,2) == "OK"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/utel/pdu.rb
CHANGED
data/lib/utel/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eugene Russkikh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-05 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- balance.rb
|
37
37
|
- lib/utel.rb
|
38
38
|
- lib/utel/balance.rb
|
39
|
+
- lib/utel/device.rb
|
39
40
|
- lib/utel/operator.rb
|
40
41
|
- lib/utel/pdu.rb
|
41
42
|
- lib/utel/sms.rb
|