screenxtv 0.0.10 → 0.0.11
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.
- checksums.yaml +7 -0
- data/lib/screenxtv.rb +21 -16
- metadata +9 -13
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 979011c1517589151acb14fe09ae8e5fab986533
|
|
4
|
+
data.tar.gz: 2b50177569b9092a9ab67affd1db0d8fd084bd56
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: baf303d80164a5dea891b652c90ae84bb70fc347e356a44615bc56b87454a42956cf4febb9b79dfea97daaaf96984d2fa583a221c727fcb833e8b18c86742187
|
|
7
|
+
data.tar.gz: 765daed474392f54b31e9ddd023f67f8fd8619bde843040a6d717595c2ef6c9196d097d8efca082ce57f98a2c87a83ff54cdda0ae6b56e8880b220918cad9efe
|
data/lib/screenxtv.rb
CHANGED
|
@@ -9,12 +9,12 @@ require 'readline'
|
|
|
9
9
|
require 'tempfile'
|
|
10
10
|
|
|
11
11
|
def showVersion
|
|
12
|
-
print "ScreenX TV Ruby Client 0.0.
|
|
12
|
+
print "ScreenX TV Ruby Client 0.0.11\n" #is there any good way to do this?
|
|
13
13
|
exit
|
|
14
14
|
end
|
|
15
15
|
def showHelp
|
|
16
16
|
print <<EOS
|
|
17
|
-
Usage:
|
|
17
|
+
Usage:
|
|
18
18
|
screenxtv [options]
|
|
19
19
|
|
|
20
20
|
Options:
|
|
@@ -22,7 +22,7 @@ Options:
|
|
|
22
22
|
-c, [--color] # Select a color (options: black/white/green/novel)
|
|
23
23
|
-t, [--title] # Select a title (e.g. Joe's Codestream)
|
|
24
24
|
-r, [--reset] # Reset your default configuration (e.g. url, color, title)
|
|
25
|
-
-f CONFIG_FILE # Path to a preset configuration
|
|
25
|
+
-f CONFIG_FILE # Path to a preset configuration
|
|
26
26
|
-p, [--private] # Broadcast your terminal privately (anyone who has the link can access)
|
|
27
27
|
-h, [--help] # Show this help message and quit
|
|
28
28
|
-v, [--version] # Show ScreenX TV Ruby Client version number and quit
|
|
@@ -90,20 +90,25 @@ end
|
|
|
90
90
|
|
|
91
91
|
def kvconnect(host,port)
|
|
92
92
|
socket=TCPSocket.open host, port
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
class << socket
|
|
94
|
+
def init_mutex
|
|
95
|
+
@mutex=Mutex.new
|
|
96
|
+
end
|
|
97
|
+
def send(key,value)
|
|
98
|
+
@mutex.synchronize{
|
|
99
|
+
keylen=key.bytesize
|
|
100
|
+
vallen=value.bytesize
|
|
101
|
+
self.write keylen.chr
|
|
102
|
+
self.write key
|
|
103
|
+
self.write (vallen>>8).chr+(vallen&0xff).chr
|
|
104
|
+
self.write value
|
|
105
|
+
}
|
|
106
|
+
end
|
|
107
|
+
def recv
|
|
108
|
+
[self.readline.chop,JSON.parse("["+self.readline+"]")[0]]
|
|
109
|
+
end
|
|
106
110
|
end
|
|
111
|
+
socket.init_mutex
|
|
107
112
|
socket
|
|
108
113
|
end
|
|
109
114
|
|
metadata
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: screenxtv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.0.11
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Tomoya Ishida
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2013-02-
|
|
11
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: json
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '0'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
|
-
- -
|
|
24
|
+
- - '>='
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
26
|
version: '0'
|
|
30
27
|
description: Software for broadcasting your terminal to http://screenx.tv/
|
|
@@ -38,26 +35,25 @@ files:
|
|
|
38
35
|
- bin/screenxtv
|
|
39
36
|
homepage: http://screenx.tv/
|
|
40
37
|
licenses: []
|
|
38
|
+
metadata: {}
|
|
41
39
|
post_install_message:
|
|
42
40
|
rdoc_options: []
|
|
43
41
|
require_paths:
|
|
44
42
|
- lib
|
|
45
43
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
|
-
none: false
|
|
47
44
|
requirements:
|
|
48
|
-
- -
|
|
45
|
+
- - '>='
|
|
49
46
|
- !ruby/object:Gem::Version
|
|
50
47
|
version: '0'
|
|
51
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
|
-
none: false
|
|
53
49
|
requirements:
|
|
54
|
-
- -
|
|
50
|
+
- - '>='
|
|
55
51
|
- !ruby/object:Gem::Version
|
|
56
52
|
version: '0'
|
|
57
53
|
requirements: []
|
|
58
54
|
rubyforge_project:
|
|
59
|
-
rubygems_version:
|
|
55
|
+
rubygems_version: 2.0.0
|
|
60
56
|
signing_key:
|
|
61
|
-
specification_version:
|
|
57
|
+
specification_version: 4
|
|
62
58
|
summary: ScreenX TV client
|
|
63
59
|
test_files: []
|