commutateurs 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/commutateurs/device.rb +8 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2ffce63f0f44087e1a319c8e68217261132bb37
4
- data.tar.gz: 8384ac86ce8683ece9d7008b29860967792309d2
3
+ metadata.gz: 6c6bbb727edb595f8c0c0c88681d45f1a4938e25
4
+ data.tar.gz: 5df84dec18153bc0539f1eaaca8683e6f1ee0655
5
5
  SHA512:
6
- metadata.gz: 6858c1e589ccba063f67d37d5582967ce802ab74dd64aa1670ae82268e0c46bbe2670d5c7a34e4caa67972a2209107fe6b341493249b80b0a41eef10a65fbcba
7
- data.tar.gz: 88b24ae71009ce16c857da63130ac4b16a67894a3669417323f99d0a54beb83d1bdb3d8f50900bcdb591365087cd8ae18da16a6e56cc94166572cec288dc6e08
6
+ metadata.gz: e1f6df8a8e66ec15f73f134282db63ad789931f41f2ae6803eb6e1f2d9c421ecdc16a8149910a91db54a28e6fb472d1761042cd542d5e269463cb9d7e8ed7a52
7
+ data.tar.gz: c3f95bbbf47c2de863b7d0f7ab6aa39c973a91e60e13c31d7f8b73b4ef313663286e7964213e4d865d1733cf49d98947183be04481c3e739013630ac8c0ea135
@@ -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(Commutateurs.clean(line)) }
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
- Commutateurs.clean(super(arg))
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commutateurs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Rose