commutateurs 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 544da22d7769b00df93d5ab8900e20fedf4c9ba3
4
- data.tar.gz: a02bb5a9bb5c2c6bbef4be4e346bc841c4eb0a19
3
+ metadata.gz: 9982f7528257ee82c8bdca4028c58498fbfc6661
4
+ data.tar.gz: 783e07ed4906193389d9e443c7dc50e596b9e91a
5
5
  SHA512:
6
- metadata.gz: 98dd507109dc3df90344ed532f880211d004932fc2569c0b9ab73b29fdddaea0ad34770192100a700012da186df675689f08ff480926c0d2d0857eb47cfaf3f1
7
- data.tar.gz: 61318cea86794f00b86f0a9e7e11a6cfa4672562710561cfebc6adba2ce5207ed114d903445215881c73b14eb64af2f3256a370911cb993f41dc401755e8bc5e
6
+ metadata.gz: 4abc114671e554c585897021da6a068ca14a1a32e6c722db8ff61d7fe184784a91d4f876f1672275925351447551cf09b1fdd089bc07fcde76d792100abc9b9d
7
+ data.tar.gz: d7b21d4f86147da6fe36078b2de87d4ef5adbe92524cf335e1fd7304acef73af503952a8a5ab80200a6b85deb1dc188eb25aba08abf47e5c2d57d62300a6b58c
@@ -3,6 +3,7 @@ module Commutateurs
3
3
  def initialize(host, credentials, verbose = false)
4
4
  super
5
5
  @transport.default_prompt = / [#\$] $/
6
+ @transport.more = /--More-- /
6
7
  end
7
8
 
8
9
  def enable
@@ -3,7 +3,7 @@
3
3
  module Commutateurs
4
4
  class Ssh
5
5
  attr_accessor :user, :password, :host, :port
6
- attr_accessor :default_prompt, :timeout, :filter
6
+ attr_accessor :default_prompt, :timeout, :filter, :more
7
7
 
8
8
  def initialize(verbose)
9
9
  @timeout = 10
@@ -78,6 +78,11 @@ module Commutateurs
78
78
 
79
79
  process_ssh
80
80
 
81
+ if more && @buf =~ more
82
+ @buf = @buf.gsub(more, "")
83
+ send(" ")
84
+ end
85
+
81
86
  if @buf != ""
82
87
  line += @buf.gsub(/\r\n/no, "\n")
83
88
  @buf = ''
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commutateurs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Rose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh