hokaido 0.0.3 → 0.0.4

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: 8b6f64f172bb6a9da01f64a1989daf02193e2d1f
4
- data.tar.gz: b1a0e14037d1a4cda9e4e582baedcc8030526399
3
+ metadata.gz: 13b934e4a7e01d32d6366179ef660e484fe5ddeb
4
+ data.tar.gz: a7b298c2e37776c1ee1a58a50ff705d33851b6fe
5
5
  SHA512:
6
- metadata.gz: 73728faa085eb09d692b770d896b908d70d5fa704924e3016c4975c072ae443da1803fd3616076364a34168f432873e0946fe7140a84ed4961343cf8260d6a6d
7
- data.tar.gz: e31dabda704cff9440ba5229bfecf780f07fb0f47f50ff990dcb3104ee27cd74e8bdc7d58d6ea20ae668876344da008922a94b05c7c32f1363be2eaefc681b59
6
+ metadata.gz: 5e2cd0b75c3665e2a3e430a4c6f8a80a90285dddf79a93e5e7a91caf6460f8cc41e2826a286915569f5f839b8ca8e4ccac7eb6761969fafc3037335a0ec69d2f
7
+ data.tar.gz: 64a50a2095150a07fcc29e025fe06a8d2d19931e673ce323e13a55e081d832916cce5a7facdde73bdeae2ba503aa418e13ac6647842af8e67b608616a9018d27
data/README.md CHANGED
@@ -6,14 +6,14 @@
6
6
  $ hokaido server # on 203.0.113.10:4423
7
7
  ```
8
8
 
9
- ## 2. Start viewer (Tokyo)
9
+ ## 2. Watch (Tokyo)
10
10
 
11
11
  ``` sh
12
- $ hokaido viewer --host 203.0.113.10
12
+ $ hokaido watch --host 203.0.113.10
13
13
  ```
14
14
 
15
- ## 3. Start new live shell (Hokaido!)
15
+ ## 3. Broadcast (Hokaido!)
16
16
 
17
17
  ``` sh
18
- $ hokaido sh --host 203.0.113.10
18
+ $ hokaido broadcast --host 203.0.113.10
19
19
  ```
@@ -25,23 +25,23 @@ module Hokaido
25
25
  server = TCPSocket.open(*options.values_at(:host, :port))
26
26
  server.puts 'write'
27
27
 
28
- while c = nonbloq.deq
29
- server.putc c
28
+ while chunk = nonbloq.deq
29
+ server.write chunk
30
30
  end
31
31
  end
32
32
 
33
33
  Thread.start do
34
- while c = pty_out.getc
35
- $stdout.putc c
36
- nonbloq.enq c
34
+ while chunk = pty_out.readpartial(4096)
35
+ $stdout.write chunk
36
+ nonbloq.enq chunk
37
37
  end
38
38
  end
39
39
 
40
40
  Thread.start do
41
41
  TermInfo.tiocswinsz pty_in, *TermInfo.screen_size
42
42
 
43
- while c = $stdin.getch
44
- pty_in.putc c
43
+ while char = $stdin.getch
44
+ pty_in.putc char
45
45
  end
46
46
  end
47
47
 
@@ -59,14 +59,14 @@ module Hokaido
59
59
  when 'write'
60
60
  client.puts ':)'
61
61
 
62
- while c = client.getc
63
- queue.enq c
62
+ while chunk = client.readpartial(4096)
63
+ queue.enq chunk
64
64
  end
65
65
  when 'read'
66
66
  client.puts '=)'
67
67
 
68
- while c = queue.deq
69
- client.putc c
68
+ while chunk = queue.deq
69
+ client.write chunk
70
70
  end
71
71
  else
72
72
  client.puts ':('
@@ -86,8 +86,8 @@ module Hokaido
86
86
  server = TCPSocket.open(*options.values_at(:host, :port))
87
87
  server.puts 'read'
88
88
 
89
- while c = server.getc
90
- $stdout.putc c
89
+ while chunk = server.readpartial(4096)
90
+ $stdout.write chunk
91
91
  end
92
92
  rescue Interrupt
93
93
  server.close
@@ -1,3 +1,3 @@
1
1
  module Hokaido
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ursm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-21 00:00:00.000000000 Z
12
+ date: 2014-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor