rubymas 0.1.0 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubymas.rb +51 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea61b89b431c08582f68b93a9ad771ab23ad4b5dd8cf2af5098d403c28757dbd
|
4
|
+
data.tar.gz: 5064ca309644201719363258876f41ec76c9d2716fb05d4cc6f9496eb7245162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b428779d08be30d3788a5027026a835c3676e281736e3fd356688a42e4bc32c43da1959830ac78daaa0965e20aeb2e6dfd4fc19701c588fa707df233011f426
|
7
|
+
data.tar.gz: bccb5f944c2f30df2b385886a6cb07b0064de22f32c14d0e511fe0365958cffbbbcd696ea51c560c8f47254fad9de69a73e4cbaa86b0b6ffb536f28462323c68
|
data/lib/rubymas.rb
CHANGED
@@ -6,14 +6,61 @@ class RubyMas
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_connect
|
9
|
-
telnet.cmd(@connection[:
|
9
|
+
telnet.cmd(@connection[:user]) {|c| print c}
|
10
|
+
telnet.cmd(@connection[:password]) {|c| print c}
|
10
11
|
telnet.close
|
11
12
|
end
|
12
13
|
|
14
|
+
def workorder_report
|
15
|
+
connect
|
16
|
+
run_report
|
17
|
+
telnet.cmd("WOH_DUMP")
|
18
|
+
finish
|
19
|
+
end
|
20
|
+
|
21
|
+
def inventory_report
|
22
|
+
connect
|
23
|
+
run_report
|
24
|
+
telnet.cmd("HP_DUMP3")
|
25
|
+
telnet.cmd("p")
|
26
|
+
telnet.cmd("fil")
|
27
|
+
telnet.cmd("/usr/common")
|
28
|
+
telnet.cmd("invdump.csv")
|
29
|
+
telnet.cmd("3")
|
30
|
+
telnet.cmd("")
|
31
|
+
telnet.cmd("Y")
|
32
|
+
telnet.cmd("")
|
33
|
+
telnet.cmd("")
|
34
|
+
telnet.cmd("")
|
35
|
+
finish
|
36
|
+
end
|
37
|
+
|
13
38
|
private
|
14
39
|
def telnet
|
15
|
-
@telnet ||= Net::Telnet::new(@connection
|
16
|
-
|
17
|
-
|
40
|
+
@telnet ||= Net::Telnet::new("Host" => @connection[:host],
|
41
|
+
"Timeout" => 5,
|
42
|
+
"Prompt" => //,
|
43
|
+
"Waittime" => 1
|
44
|
+
)
|
45
|
+
end
|
46
|
+
def connect
|
47
|
+
telnet.login(@connection[:user], @connection[:password])
|
48
|
+
telnet.cmd("")
|
49
|
+
telnet.cmd(@connection[:mas_user])
|
50
|
+
telnet.cmd(@connection[:mas_pass])
|
51
|
+
telnet.cmd("")
|
52
|
+
telnet.cmd("")
|
53
|
+
end
|
54
|
+
def run_report
|
55
|
+
telnet.cmd("7")
|
56
|
+
telnet.cmd("2")
|
57
|
+
end
|
58
|
+
def finish
|
59
|
+
telnet.cmd("")
|
60
|
+
telnet.cmd("*END")
|
61
|
+
end
|
62
|
+
|
63
|
+
def quick_sleep
|
64
|
+
sleep(1.0/24.0)
|
18
65
|
end
|
19
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubymas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Gauger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-telnet
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Your MAS90 program may vary depending on
|
27
|
+
description: Your MAS90 program may vary depending on implementation
|
28
28
|
email: andygauge@gmail.com
|
29
29
|
executables: []
|
30
30
|
extensions: []
|