vncrec 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vncrec/recorder.rb +2 -3
- data/lib/vncrec/version.rb +1 -1
- data/spec/recorder_spec.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3feee74e40b84f5e30207f99e01b2444f8f18d54
|
4
|
+
data.tar.gz: 2da896794d70531e284c14b369e6f21c5c9085c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5ed155f4838c12c0b3a1b3288cd9b71c8526f6e04e2628187745b6bcd5ab02954e9a96816f3fa7cac5ac850345a31813ef116f173de96c949d3aef3100dcb5
|
7
|
+
data.tar.gz: 1c7e9cd361f129e87c298caaebecb70526a6767d49a877356e80e4931001ad5adbe41f37219ea61456d7eed2bcd1ef8d201e9f7570a35bf2cd06f5d47b3413b6
|
data/lib/vncrec/recorder.rb
CHANGED
@@ -139,9 +139,8 @@ module VNCRec
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def substitute_filename
|
142
|
-
File.rename(@filename,
|
143
|
-
|
144
|
-
) if @recording_starttime && @filename['DATE']
|
142
|
+
File.rename(@filename, @filename.gsub(
|
143
|
+
'DATE', @recording_starttime.strftime('%Y_%m_%d_%Hh_%Mm_%Ss'))) if @recording_starttime && @filename['DATE']
|
145
144
|
end
|
146
145
|
|
147
146
|
def close_proxy
|
data/lib/vncrec/version.rb
CHANGED
data/spec/recorder_spec.rb
CHANGED
@@ -153,6 +153,7 @@ describe Rec do
|
|
153
153
|
let(:f1) { Rec.new }
|
154
154
|
let(:f2) { Rec.new(filename: 'file') }
|
155
155
|
let(:f3) { Rec.new(filename: '/root/file') }
|
156
|
+
let(:f4) { Rec.new(filename: 'rec_1_DATE.mp4').run; }
|
156
157
|
|
157
158
|
context 'when no filename given' do
|
158
159
|
it 'file with default name exists' do
|
@@ -174,9 +175,21 @@ describe Rec do
|
|
174
175
|
expect { f3 }.to raise_error(/Cannot create file .*/)
|
175
176
|
end
|
176
177
|
end
|
178
|
+
context 'when template DATE is given' do
|
179
|
+
fit 'file with template substitute as name exist', port: true do
|
180
|
+
f4
|
181
|
+
launch_vnc_server 5900
|
182
|
+
expect do
|
183
|
+
sleep 3
|
184
|
+
`killall -KILL x11vnc`
|
185
|
+
sleep 0.5
|
186
|
+
puts Dir.glob('*')
|
187
|
+
end.to change { Dir.glob('rec_1_*_*_*_*h_*m_*s.mp4').grep(/_\d\dh_/).size }.from(0).to(1)
|
188
|
+
end
|
189
|
+
end
|
177
190
|
end
|
178
191
|
end
|
179
|
-
describe 'filesize do', port: true
|
192
|
+
describe 'filesize do', port: true do
|
180
193
|
let(:rec) { Rec.new(filename: 'somefile.mp4') }
|
181
194
|
context 'when running' do
|
182
195
|
it 'returns > 0' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vncrec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d-theus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|