vnctools 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.mdown ADDED
@@ -0,0 +1,39 @@
1
+ vnctools
2
+ ==========
3
+
4
+ Simple CLI wrappers to control and record VNC displays from Ruby.
5
+
6
+ Usage
7
+ =============
8
+
9
+ # `tightvncserver`
10
+ server = VncTools::Server.new
11
+ server.start
12
+
13
+ # `ffmpeg`
14
+ recorder = VncTools::Recorder.new(server.display, "movie.mp4")
15
+ recorder.start
16
+
17
+ ENV['DISPLAY'] = server.display
18
+ ...
19
+
20
+ recorder.stop
21
+ server.stop
22
+
23
+
24
+ Note on Patches/Pull Requests
25
+ =============================
26
+
27
+ * Fork the project.
28
+ * Make your feature addition or bug fix.
29
+ * Add tests for it. This is important so I don't break it in a
30
+ future version unintentionally.
31
+ * Commit, do not mess with rakefile, version, or history.
32
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
33
+ * Send me a pull request. Bonus points for topic branches.
34
+
35
+ Copyright
36
+ =========
37
+
38
+ Copyright (c) 2011 Jari Bakken. See LICENSE for details.
39
+
@@ -19,12 +19,18 @@ module VncTools
19
19
  "-s", @options[:frame_size] || "1024x768", # frame size
20
20
  "-i", "#{display}.0+0,0", # display :1
21
21
  "-vcodec", @options[:codec] || "mpeg4", # video codec
22
- "-sameq", output # output
22
+ "-sameq", output # output
23
23
  )
24
24
 
25
- @process.io.inherit! if $DEBUG
25
+ if $DEBUG
26
+ @process.io.inherit!
27
+ else
28
+ @process.io.stdout = @process.io.stderr = "/dev/null"
29
+ end
30
+
26
31
  @process.start
27
32
 
33
+ # TODO: this may be too quick to actually catch the failure
28
34
  if @process.crashed?
29
35
  raise Error, "ffmpeg failed, run with $DEBUG = true for full output"
30
36
  end
@@ -1,3 +1,3 @@
1
1
  module VncTools
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -3,7 +3,7 @@ require File.expand_path("../../spec_helper", __FILE__)
3
3
  module VncTools
4
4
  describe Recorder do
5
5
  context "given a display string" do
6
- let(:process) { mock(ChildProcess, :crashed? => false, :start => nil, :stop => nil) }
6
+ let(:process) { mock(ChildProcess, :crashed? => false, :start => nil, :stop => nil, :io => mock("io").as_null_object) }
7
7
  let(:recorder) { Recorder.new ":1", "out.mp4" }
8
8
 
9
9
  it "knows its display" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vnctools
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-03 00:00:00 +01:00
13
+ date: 2011-02-15 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -60,7 +60,7 @@ files:
60
60
  - .rspec
61
61
  - Gemfile
62
62
  - LICENSE
63
- - README
63
+ - README.mdown
64
64
  - Rakefile
65
65
  - lib/vnctools.rb
66
66
  - lib/vnctools/recorder.rb
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  requirements: []
97
97
 
98
98
  rubyforge_project: vnctools
99
- rubygems_version: 1.5.0
99
+ rubygems_version: 1.5.2
100
100
  signing_key:
101
101
  specification_version: 3
102
102
  summary: Simple CLI wrappers to control and record VNC displays from Ruby.
data/README DELETED
File without changes