hokaido 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hokaido/broadcast.rb +9 -0
- data/lib/hokaido/cli.rb +7 -0
- data/lib/hokaido/version.rb +1 -1
- 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: 84ff69267500b6524e74a935447b3389a6299f2a
|
4
|
+
data.tar.gz: c46d68b17486d2e932a03788100354283bcd1938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dbd14e42abaae8ff7097ae0f5c4c2d9bd853f115315ace28738721d3c5777421c6b8b29d1cbb25cfca250bcbdaecbf6f459718b27248830f3474e42a905835f
|
7
|
+
data.tar.gz: 9063491ced10eb39f39426736e78bb8a7ec028b155e187e27a6ca29b07ce5182e01ac01f26e8de72fc1e008d092c55889985b413f7b2d1cc8f2c7211494f28b0
|
data/lib/hokaido/broadcast.rb
CHANGED
@@ -64,6 +64,9 @@ module Hokaido
|
|
64
64
|
ptyout, ptyin, pid = PTY.getpty(command)
|
65
65
|
connection = Connection.new_link(host, port)
|
66
66
|
|
67
|
+
# FIXME: adjust on SIGWINCH
|
68
|
+
adjust_screen_size ptyin
|
69
|
+
|
67
70
|
OutputHandler.new_link ptyout, connection
|
68
71
|
InputHandler.new_link ptyin
|
69
72
|
|
@@ -75,6 +78,12 @@ module Hokaido
|
|
75
78
|
|
76
79
|
terminate
|
77
80
|
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def adjust_screen_size(ptyin)
|
85
|
+
TermInfo.tiocswinsz ptyin, *TermInfo.screen_size
|
86
|
+
end
|
78
87
|
end
|
79
88
|
end
|
80
89
|
end
|
data/lib/hokaido/cli.rb
CHANGED
@@ -8,6 +8,8 @@ module Hokaido
|
|
8
8
|
class_option :host, aliases: :h, default: '0.0.0.0'
|
9
9
|
class_option :port, aliases: :p, default: 4423
|
10
10
|
|
11
|
+
map '-v' => :version
|
12
|
+
|
11
13
|
desc :broadcast, 'Broadcast a session'
|
12
14
|
def broadcast(command = ENV['SHELL'])
|
13
15
|
Hokaido::Broadcast::Command.run command, *options.values_at(:host, :port)
|
@@ -35,5 +37,10 @@ module Hokaido
|
|
35
37
|
|
36
38
|
exit
|
37
39
|
end
|
40
|
+
|
41
|
+
desc :version, 'Show hokaido version'
|
42
|
+
def version
|
43
|
+
say Hokaido::VERSION, :cyan
|
44
|
+
end
|
38
45
|
end
|
39
46
|
end
|
data/lib/hokaido/version.rb
CHANGED