commutateurs 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commutateurs/device.rb +8 -8
- 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: 6c6bbb727edb595f8c0c0c88681d45f1a4938e25
|
4
|
+
data.tar.gz: 5df84dec18153bc0539f1eaaca8683e6f1ee0655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1f6df8a8e66ec15f73f134282db63ad789931f41f2ae6803eb6e1f2d9c421ecdc16a8149910a91db54a28e6fb472d1761042cd542d5e269463cb9d7e8ed7a52
|
7
|
+
data.tar.gz: c3f95bbbf47c2de863b7d0f7ab6aa39c973a91e60e13c31d7f8b73b4ef313663286e7964213e4d865d1733cf49d98947183be04481c3e739013630ac8c0ea135
|
data/lib/commutateurs/device.rb
CHANGED
@@ -27,7 +27,7 @@ module Commutateurs
|
|
27
27
|
def initialize(host, credentials, verbose = false)
|
28
28
|
super
|
29
29
|
@transport.default_prompt = /(Press any key to continue|# )/
|
30
|
-
@transport.debug = Proc.new { |line| $stderr.print(
|
30
|
+
@transport.debug = Proc.new { |line| $stderr.print(clean(line)) }
|
31
31
|
end
|
32
32
|
|
33
33
|
def connect
|
@@ -50,7 +50,13 @@ module Commutateurs
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def execute(arg)
|
53
|
-
|
53
|
+
clean(super(arg))
|
54
|
+
end
|
55
|
+
|
56
|
+
def clean(arg)
|
57
|
+
cleaned = ""
|
58
|
+
(arg || "").each_byte { |x| cleaned << x unless x > 127 }
|
59
|
+
cleaned
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
@@ -139,10 +145,4 @@ module Commutateurs
|
|
139
145
|
@transport.close
|
140
146
|
end
|
141
147
|
end
|
142
|
-
|
143
|
-
def clean(arg)
|
144
|
-
cleaned = ""
|
145
|
-
(arg || "").each_byte { |x| cleaned << x unless x > 127 }
|
146
|
-
cleaned
|
147
|
-
end
|
148
148
|
end
|