em-ssh 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 0.6.2
2
+ - [#24](https://github.com/simulacre/em-ssh/pull/24) - Fix callbacks defined on EM::Ssh::Shell don't work [@mandre](https://github.com/mandre)
3
+
1
4
  0.6.1
2
5
  - Allow Shell#buffer to be cleared
3
6
 
@@ -25,6 +25,10 @@ module EventMachine
25
25
  @clbks ||= {}
26
26
  end # callbacks
27
27
 
28
+ def callbacks=(clbks)
29
+ @clbks = clbks
30
+ end
31
+
28
32
 
29
33
  # Signal that an event has occured.
30
34
  # Each callback will receive whatever args are passed to fire, or the object that the event was fired upon.
data/lib/em-ssh/shell.rb CHANGED
@@ -183,6 +183,8 @@ module EventMachine
183
183
  @closed = false
184
184
  @shell = shell
185
185
  shell.extend(EventMachine::Ssh::Connection::Channel::Interactive)
186
+ # Share callbacks with shell
187
+ send(:callbacks=, shell.callbacks)
186
188
  shell.line_terminator = @line_terminator if @line_terminator
187
189
  shell.on(:data) { |data| debug("#{shell.dump_buffer}") }
188
190
  set_open_status(self)
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  class Ssh
3
- VERSION='0.6.1'
3
+ VERSION='0.6.2'
4
4
  end # class::Ssh
5
5
  end # module::EventMachine
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.1
4
+ version: 0.6.2
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-13 00:00:00.000000000 Z
12
+ date: 2013-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine