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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba9d4544676c2a17748b534f434b318b223331c6
4
- data.tar.gz: a1602cea4d9d03375373f6eacab8f82bb96d0cb3
3
+ metadata.gz: 84ff69267500b6524e74a935447b3389a6299f2a
4
+ data.tar.gz: c46d68b17486d2e932a03788100354283bcd1938
5
5
  SHA512:
6
- metadata.gz: 713597c50d91a3ec475322f6fadfc27a166f0f1cc1841ad6e00c52492585789bdc57ed33f1d48bfc20a6b0b72e3bc277da054ff51633e24c558de483bc6c051f
7
- data.tar.gz: 9baffd608a5d42bc64b2a546f22f986d437bcf9903324f01427811c555b688da329e03ba411bef6aa7e6002f9171ad113359ef10429b5db8ddaad0382bb0b73e
6
+ metadata.gz: 7dbd14e42abaae8ff7097ae0f5c4c2d9bd853f115315ace28738721d3c5777421c6b8b29d1cbb25cfca250bcbdaecbf6f459718b27248830f3474e42a905835f
7
+ data.tar.gz: 9063491ced10eb39f39426736e78bb8a7ec028b155e187e27a6ca29b07ce5182e01ac01f26e8de72fc1e008d092c55889985b413f7b2d1cc8f2c7211494f28b0
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Hokaido
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hokaido
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ursm