em-ssh 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/em-ssh/connection/channel/interactive.rb +8 -1
- data/lib/em-ssh/shell.rb +6 -1
- data/lib/em-ssh/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -45,9 +45,16 @@ module EventMachine
|
|
45
45
|
|
46
46
|
# @returns[#to_s] Returns a #to_s object describing the dump of the content of the buffers used by
|
47
47
|
# the methods of the interactive module mixed in the host object.
|
48
|
-
def
|
48
|
+
def dump_buffer
|
49
49
|
@buffer.dump
|
50
50
|
end
|
51
|
+
# API compatibility with 0.6.0
|
52
|
+
alias :dump_buffers :dump_buffer
|
53
|
+
|
54
|
+
# Remove any data currently in the buffer.
|
55
|
+
def clear_buffer!
|
56
|
+
@buffer = ''
|
57
|
+
end
|
51
58
|
|
52
59
|
# Wait for a number of seconds until a specified string or regexp is matched by the
|
53
60
|
# data returned from the ssh channel. Optionally send a given string first.
|
data/lib/em-ssh/shell.rb
CHANGED
@@ -184,7 +184,7 @@ module EventMachine
|
|
184
184
|
@shell = shell
|
185
185
|
shell.extend(EventMachine::Ssh::Connection::Channel::Interactive)
|
186
186
|
shell.line_terminator = @line_terminator if @line_terminator
|
187
|
-
shell.on(:data) { |data| debug("#{shell.
|
187
|
+
shell.on(:data) { |data| debug("#{shell.dump_buffer}") }
|
188
188
|
set_open_status(self)
|
189
189
|
end
|
190
190
|
@opening = false
|
@@ -340,6 +340,11 @@ module EventMachine
|
|
340
340
|
shell.wait_for(strregex, {:timeout => @timeout, :log => self }.merge(opts))
|
341
341
|
end
|
342
342
|
|
343
|
+
# Remove any data in the buffer.
|
344
|
+
def clear_buffer!
|
345
|
+
shell.clear_buffer!
|
346
|
+
end
|
347
|
+
|
343
348
|
def debug(msg = nil, &blk)
|
344
349
|
super("#{host} #{msg}", &blk)
|
345
350
|
end
|
data/lib/em-ssh/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|