vnctools 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/README.mdown +2 -0
- data/Rakefile +1 -0
- data/lib/vnctools/server.rb +6 -2
- data/lib/vnctools/version.rb +1 -1
- data/spec/vnctools/server_spec.rb +12 -0
- data/vnctools.gemspec +2 -1
- metadata +42 -6
data/.travis.yml
ADDED
data/README.mdown
CHANGED
data/Rakefile
CHANGED
data/lib/vnctools/server.rb
CHANGED
@@ -30,9 +30,9 @@ module VncTools
|
|
30
30
|
|
31
31
|
def start
|
32
32
|
if display
|
33
|
-
server
|
33
|
+
server(display, *launch_arguments)
|
34
34
|
else
|
35
|
-
output = server
|
35
|
+
output = server(*launch_arguments)
|
36
36
|
@display = output[/desktop is #{host}(\S+)/, 1]
|
37
37
|
end
|
38
38
|
end
|
@@ -43,6 +43,10 @@ module VncTools
|
|
43
43
|
|
44
44
|
private
|
45
45
|
|
46
|
+
def launch_arguments
|
47
|
+
[] # can be overriden by subclasses
|
48
|
+
end
|
49
|
+
|
46
50
|
def server(*args)
|
47
51
|
cmd = [self.class.executable, args, '2>&1'].flatten.compact
|
48
52
|
out = `#{cmd.join ' '}`
|
data/lib/vnctools/version.rb
CHANGED
@@ -24,6 +24,18 @@ module VncTools
|
|
24
24
|
|
25
25
|
lambda { server.start }.should raise_error(Server::Error, /oops/)
|
26
26
|
end
|
27
|
+
|
28
|
+
it "can be overriden to provide custom launch arguments" do
|
29
|
+
server_class = Class.new(Server) {
|
30
|
+
def launch_arguments() %w[-geometry 1280x1024] end
|
31
|
+
}
|
32
|
+
|
33
|
+
server = server_class.new
|
34
|
+
server.stub :last_status => mock(:success? => true)
|
35
|
+
|
36
|
+
server.should_receive(:`).with("tightvncserver -geometry 1280x1024 2>&1").and_return("desktop is #{Socket.gethostname}:1")
|
37
|
+
server.start
|
38
|
+
end
|
27
39
|
end
|
28
40
|
|
29
41
|
context "controlling an existing display" do
|
data/vnctools.gemspec
CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.add_dependency "childprocess"
|
18
18
|
s.add_development_dependency "simplecov"
|
19
|
-
s.add_development_dependency "rspec", "~> 2.
|
19
|
+
s.add_development_dependency "rspec", "~> 2.5"
|
20
|
+
s.add_development_dependency "rake", "~> 0.9.2"
|
20
21
|
|
21
22
|
s.files = `git ls-files`.split("\n")
|
22
23
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vnctools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Jari Bakken
|
@@ -10,8 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
18
|
+
date: 2011-11-10 00:00:00 Z
|
15
19
|
dependencies:
|
16
20
|
- !ruby/object:Gem::Dependency
|
17
21
|
name: childprocess
|
@@ -21,6 +25,9 @@ dependencies:
|
|
21
25
|
requirements:
|
22
26
|
- - ">="
|
23
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
24
31
|
version: "0"
|
25
32
|
type: :runtime
|
26
33
|
version_requirements: *id001
|
@@ -32,6 +39,9 @@ dependencies:
|
|
32
39
|
requirements:
|
33
40
|
- - ">="
|
34
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
35
45
|
version: "0"
|
36
46
|
type: :development
|
37
47
|
version_requirements: *id002
|
@@ -43,9 +53,29 @@ dependencies:
|
|
43
53
|
requirements:
|
44
54
|
- - ~>
|
45
55
|
- !ruby/object:Gem::Version
|
46
|
-
|
56
|
+
hash: 9
|
57
|
+
segments:
|
58
|
+
- 2
|
59
|
+
- 5
|
60
|
+
version: "2.5"
|
47
61
|
type: :development
|
48
62
|
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rake
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 63
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
- 9
|
75
|
+
- 2
|
76
|
+
version: 0.9.2
|
77
|
+
type: :development
|
78
|
+
version_requirements: *id004
|
49
79
|
description: Simple CLI wrappers to control and record VNC displays from Ruby.
|
50
80
|
email:
|
51
81
|
- jari.bakken@gmail.com
|
@@ -58,6 +88,7 @@ extra_rdoc_files: []
|
|
58
88
|
files:
|
59
89
|
- .gitignore
|
60
90
|
- .rspec
|
91
|
+
- .travis.yml
|
61
92
|
- Gemfile
|
62
93
|
- LICENSE
|
63
94
|
- README.mdown
|
@@ -72,7 +103,6 @@ files:
|
|
72
103
|
- spec/vnctools/server_pool_spec.rb
|
73
104
|
- spec/vnctools/server_spec.rb
|
74
105
|
- vnctools.gemspec
|
75
|
-
has_rdoc: true
|
76
106
|
homepage: ""
|
77
107
|
licenses: []
|
78
108
|
|
@@ -86,17 +116,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
116
|
requirements:
|
87
117
|
- - ">="
|
88
118
|
- !ruby/object:Gem::Version
|
119
|
+
hash: 3
|
120
|
+
segments:
|
121
|
+
- 0
|
89
122
|
version: "0"
|
90
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
124
|
none: false
|
92
125
|
requirements:
|
93
126
|
- - ">="
|
94
127
|
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
95
131
|
version: "0"
|
96
132
|
requirements: []
|
97
133
|
|
98
134
|
rubyforge_project: vnctools
|
99
|
-
rubygems_version: 1.
|
135
|
+
rubygems_version: 1.8.10
|
100
136
|
signing_key:
|
101
137
|
specification_version: 3
|
102
138
|
summary: Simple CLI wrappers to control and record VNC displays from Ruby.
|