vtools 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{Vtools.project → VTools.project} +3 -4
- data/doc/HOOKS.md +2 -2
- data/doc/LIB_EXAMPLE.md +1 -1
- data/lib/vtools.rb +9 -9
- data/lib/vtools/converter.rb +4 -4
- data/lib/vtools/harvester.rb +1 -1
- data/lib/vtools/hook.rb +43 -0
- data/lib/vtools/job.rb +2 -2
- data/lib/vtools/options.rb +1 -1
- data/lib/vtools/thumbnailer.rb +4 -4
- data/lib/vtools/version.rb +1 -1
- data/spec/converter_spec.rb +6 -6
- data/spec/hook_spec.rb +81 -0
- data/spec/job_spec.rb +7 -7
- data/spec/thumbnailer_spec.rb +10 -10
- metadata +53 -52
- data/Vtools.komodoproject +0 -12
- data/vtools-0.1.0.gem +0 -0
@@ -1,12 +1,11 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<!-- Komodo Project File - DO NOT EDIT -->
|
3
|
-
<project id="
|
4
|
-
<preference-set idref="
|
5
|
-
<string id="import_exclude_matches">*.*~;*.bak;*.tmp;CVS;.#*;*.pyo;*.pyc;.svn;*%*;tmp*.html;.DS_Store
|
3
|
+
<project id="6ff03cf6-d94f-4f90-922c-9d8632791140" kpf_version="4" name="VTools">
|
4
|
+
<preference-set idref="6ff03cf6-d94f-4f90-922c-9d8632791140">
|
5
|
+
<string id="import_exclude_matches">*.*~;*.bak;*.tmp;CVS;.#*;*.pyo;*.pyc;.svn;*%*;tmp*.html;.DS_Store;*.project</string>
|
6
6
|
<string id="import_include_matches"></string>
|
7
7
|
<boolean id="import_live">1</boolean>
|
8
8
|
<boolean id="import_recursive">1</boolean>
|
9
9
|
<string id="import_type">useFolders</string>
|
10
|
-
<string relative="path" id="rubyExtraPaths">lib</string>
|
11
10
|
</preference-set>
|
12
11
|
</project>
|
data/doc/HOOKS.md
CHANGED
@@ -19,7 +19,7 @@ Multiple actions can be attached for a single hook.
|
|
19
19
|
|
20
20
|
```ruby
|
21
21
|
# multiple hooks setup
|
22
|
-
VTools::
|
22
|
+
VTools::Hook.collection do
|
23
23
|
set :in_convert do |video|
|
24
24
|
#..
|
25
25
|
end
|
@@ -31,7 +31,7 @@ VTools::Handler.collection do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# single hook setup
|
34
|
-
VTools::
|
34
|
+
VTools::Hook.set :job_started do
|
35
35
|
#..
|
36
36
|
end
|
37
37
|
```
|
data/doc/LIB_EXAMPLE.md
CHANGED
@@ -52,7 +52,7 @@ VTools::Storage.setup do
|
|
52
52
|
# receives hash: { :data => execution_result, :action => executed_action }
|
53
53
|
# execution_result can be video object or array with thumbnails
|
54
54
|
send_action do |result|
|
55
|
-
@push.send "#{result[:action]} #{result[:data].name}"
|
55
|
+
@push.send "#{result[:action]} #{result[:data].name}" if result[:action] =~ /convert|info/
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
data/lib/vtools.rb
CHANGED
@@ -19,7 +19,7 @@ module VTools
|
|
19
19
|
require 'vtools/shared_methods'
|
20
20
|
require 'vtools/config'
|
21
21
|
require 'vtools/options'
|
22
|
-
require 'vtools/
|
22
|
+
require 'vtools/hook'
|
23
23
|
require 'vtools/storage'
|
24
24
|
require 'vtools/harvester'
|
25
25
|
require 'vtools/job'
|
@@ -32,7 +32,7 @@ module VTools
|
|
32
32
|
include SharedMethods # extend with common methods
|
33
33
|
|
34
34
|
# callbacks after ARGV config has been parsed
|
35
|
-
|
35
|
+
Hook.collection do
|
36
36
|
|
37
37
|
# load external config file & external libs
|
38
38
|
set :config_parsed do
|
@@ -40,40 +40,40 @@ module VTools
|
|
40
40
|
load_libs
|
41
41
|
end
|
42
42
|
|
43
|
-
# set job finished
|
43
|
+
# set job finished hooks
|
44
44
|
set :job_finished do |result, video, action|
|
45
45
|
# log job status
|
46
46
|
log :info, "Job finished. name: #{video.name}, action : #{action}"
|
47
47
|
end
|
48
48
|
|
49
|
-
# set converter error
|
49
|
+
# set converter error hooks
|
50
50
|
set :before_convert do |video, command|
|
51
51
|
# log status
|
52
52
|
log :info, "Running encoding... (#{video.name}) : #{command}"
|
53
53
|
end
|
54
54
|
|
55
|
-
# set converter error
|
55
|
+
# set converter error hooks
|
56
56
|
set :convert_success do |video, output_file|
|
57
57
|
# log status
|
58
58
|
log :info, "Encoding of #{video.path} to #{output_file} succeeded"
|
59
59
|
end
|
60
60
|
|
61
|
-
# set converter error
|
61
|
+
# set converter error hooks
|
62
62
|
set :convert_error do |video, errors, output|
|
63
63
|
# log error
|
64
64
|
log :error, "Failed encoding... #{video} #{output} #{errors}"
|
65
65
|
end
|
66
66
|
|
67
|
-
# set thumbnailer success
|
67
|
+
# set thumbnailer success hooks
|
68
68
|
set :thumb_success do |video, thumbs|
|
69
69
|
# log status
|
70
70
|
log :info, "Thumbnail creation of #{video.path} succeeded"
|
71
71
|
end
|
72
72
|
|
73
|
-
# set thumbnailer error
|
73
|
+
# set thumbnailer error hooks
|
74
74
|
set :thumb_error do |video, errors|
|
75
75
|
# log error
|
76
76
|
log :error, "Failed create thumbnail for the video #{video.name} #{errors}"
|
77
77
|
end
|
78
|
-
end #
|
78
|
+
end # Hook.collection
|
79
79
|
end # VTools
|
data/lib/vtools/converter.rb
CHANGED
@@ -25,7 +25,7 @@ module VTools
|
|
25
25
|
convert_error = true
|
26
26
|
|
27
27
|
# before convert callbacks
|
28
|
-
|
28
|
+
Hook.exec :before_convert, @video, command
|
29
29
|
|
30
30
|
# process video
|
31
31
|
Open3.popen3(command) do |stdin, stdout, stderr|
|
@@ -48,7 +48,7 @@ module VTools
|
|
48
48
|
progress = time / @video.duration
|
49
49
|
|
50
50
|
# callbacks
|
51
|
-
|
51
|
+
Hook.exec :in_convert, @video, progress
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -57,9 +57,9 @@ module VTools
|
|
57
57
|
|
58
58
|
# callbacks
|
59
59
|
unless error = encoding_invalid?
|
60
|
-
|
60
|
+
Hook.exec :convert_success, @video, @output_file
|
61
61
|
else
|
62
|
-
|
62
|
+
Hook.exec :convert_error, @video, error, output
|
63
63
|
raise ProcessError, error # raise exception in error
|
64
64
|
end
|
65
65
|
|
data/lib/vtools/harvester.rb
CHANGED
data/lib/vtools/hook.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- encoding: binary -*-
|
2
|
+
|
3
|
+
module VTools
|
4
|
+
|
5
|
+
# hooks
|
6
|
+
# allows to execute hooks from external script
|
7
|
+
# multiple hooks in one placeholder are allowed
|
8
|
+
#
|
9
|
+
# usage:
|
10
|
+
# Hook.set :placeholder_name, &block
|
11
|
+
# or
|
12
|
+
# Hook.collection do
|
13
|
+
# set :placeholder_one, &block
|
14
|
+
# set :placeholder_other, &block
|
15
|
+
# end
|
16
|
+
class Hook
|
17
|
+
include SharedMethods
|
18
|
+
|
19
|
+
@callbacks = {}
|
20
|
+
|
21
|
+
class << self
|
22
|
+
# hooks setter
|
23
|
+
def set action, &block
|
24
|
+
action = action.to_sym
|
25
|
+
@callbacks[action] = [] unless @callbacks[action].is_a? Array
|
26
|
+
@callbacks[action] << block if block_given?
|
27
|
+
end
|
28
|
+
|
29
|
+
# pending hooks exectuion
|
30
|
+
def exec action, *args
|
31
|
+
action = action.to_sym
|
32
|
+
@callbacks[action].each do |block|
|
33
|
+
block.call(*args)
|
34
|
+
end if @callbacks[action].is_a? Array
|
35
|
+
end
|
36
|
+
|
37
|
+
# collection setup
|
38
|
+
def collection &block
|
39
|
+
instance_eval &block if block_given?
|
40
|
+
end
|
41
|
+
end # << self
|
42
|
+
end # Hook
|
43
|
+
end # VTools
|
data/lib/vtools/job.rb
CHANGED
@@ -15,7 +15,7 @@ module VTools
|
|
15
15
|
# execute job
|
16
16
|
def execute
|
17
17
|
# start hook
|
18
|
-
|
18
|
+
Hook.exec :job_started, @video, @config.action
|
19
19
|
|
20
20
|
result = @video.get_info # we always get info
|
21
21
|
|
@@ -27,7 +27,7 @@ module VTools
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# final hook
|
30
|
-
|
30
|
+
Hook.exec :job_finished, result, @video, @config.action
|
31
31
|
result
|
32
32
|
end
|
33
33
|
|
data/lib/vtools/options.rb
CHANGED
data/lib/vtools/thumbnailer.rb
CHANGED
@@ -24,7 +24,7 @@ module VTools
|
|
24
24
|
command = "#{CONFIG[:thumb_binary]} -i '#{@video.path}' #{options} "
|
25
25
|
|
26
26
|
# callback
|
27
|
-
|
27
|
+
Hook.exec :before_thumb, @video, options
|
28
28
|
|
29
29
|
# process cicle
|
30
30
|
@total.times do |count|
|
@@ -42,7 +42,7 @@ module VTools
|
|
42
42
|
if (error = lines).empty?
|
43
43
|
thumbs << thumb = {:path => file, :offset => time_offset(seconds)}
|
44
44
|
|
45
|
-
|
45
|
+
Hook.exec :in_thumb, @video, thumb # callbacks
|
46
46
|
else
|
47
47
|
errors << "#{error} (#{file})"
|
48
48
|
end
|
@@ -51,10 +51,10 @@ module VTools
|
|
51
51
|
|
52
52
|
# callbacks
|
53
53
|
if errors.empty?
|
54
|
-
|
54
|
+
Hook.exec :thumb_success, @video, thumbs
|
55
55
|
else
|
56
56
|
errors = " Errors: #{errors.flatten.join(";").gsub(/\n/, ' ')}. "
|
57
|
-
|
57
|
+
Hook.exec :thumb_error, @video, errors
|
58
58
|
raise ProcessError, "Thumbnailer error: #{errors}" if thumbs.empty? && @total > 0
|
59
59
|
end
|
60
60
|
|
data/lib/vtools/version.rb
CHANGED
data/spec/converter_spec.rb
CHANGED
@@ -46,7 +46,7 @@ describe VTools::Converter do
|
|
46
46
|
# "#{CONFIG[:ffmpeg_binary]} -y -i '#{@video.path}' #{@options} '#{@output_file}'"
|
47
47
|
exec_com = "tested.ffmpeg -y -i 'video/path' test.options '#{@output_file}'"
|
48
48
|
|
49
|
-
VTools::
|
49
|
+
VTools::Hook.should_receive(:exec).with(:before_convert, video, exec_com)
|
50
50
|
VTools.should_receive(:fix_encoding).exactly(values_set.size).times
|
51
51
|
@converter.should_receive(:generate_path)
|
52
52
|
end
|
@@ -55,10 +55,10 @@ describe VTools::Converter do
|
|
55
55
|
prepare_converter ffmpeg_7
|
56
56
|
|
57
57
|
ffmpeg_7.each do |sec, time_str|
|
58
|
-
VTools::
|
58
|
+
VTools::Hook.should_receive(:exec).with(:in_convert, video, sec/ffmpeg_7.keys.last)
|
59
59
|
end
|
60
60
|
|
61
|
-
VTools::
|
61
|
+
VTools::Hook.should_receive(:exec).with(:convert_success, video, @output_file)
|
62
62
|
@converter.should_receive(:encoding_invalid?) { false }
|
63
63
|
@converter.should_receive(:encoded)
|
64
64
|
|
@@ -69,10 +69,10 @@ describe VTools::Converter do
|
|
69
69
|
prepare_converter ffmpeg_8
|
70
70
|
|
71
71
|
ffmpeg_8.each do |sec, time_str|
|
72
|
-
VTools::
|
72
|
+
VTools::Hook.should_receive(:exec).with(:in_convert, video, sec/ffmpeg_8.keys.last)
|
73
73
|
end
|
74
74
|
|
75
|
-
VTools::
|
75
|
+
VTools::Hook.should_receive(:exec).with(:convert_success, video, @output_file)
|
76
76
|
@converter.should_receive(:encoding_invalid?) { false }
|
77
77
|
@converter.should_receive(:encoded)
|
78
78
|
|
@@ -87,7 +87,7 @@ describe VTools::Converter do
|
|
87
87
|
end
|
88
88
|
|
89
89
|
it "--result file is invalid" do
|
90
|
-
VTools::
|
90
|
+
VTools::Hook.stub(:exec).and_return nil
|
91
91
|
prepare_converter ffmpeg_7
|
92
92
|
@converter.should_receive(:encoding_invalid?) { "test.fail" }
|
93
93
|
expect { @converter.run }.to raise_error VTools::ProcessError, "test.fail"
|
data/spec/hook_spec.rb
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "hook"
|
3
|
+
|
4
|
+
describe VTools::Hook do
|
5
|
+
|
6
|
+
# hooks
|
7
|
+
before do
|
8
|
+
@hook = VTools::Hook.dup
|
9
|
+
@hook.instance_variable_set(:@callbacks, {})
|
10
|
+
end
|
11
|
+
|
12
|
+
# specs
|
13
|
+
context "#set" do
|
14
|
+
|
15
|
+
it "sets valid action" do
|
16
|
+
@hook.instance_variable_get(:@callbacks).should == {}
|
17
|
+
|
18
|
+
block = lambda { |*args| nil }
|
19
|
+
other_block = lambda { |*args| false }
|
20
|
+
|
21
|
+
@hook.set :action_one, &block
|
22
|
+
@hook.set "action_two", &other_block
|
23
|
+
|
24
|
+
@hook.instance_variable_get(:@callbacks).should == {
|
25
|
+
:action_one => [ block ], :action_two => [ other_block ]
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
it "skips set when no block given" do
|
30
|
+
@hook.set :action_one
|
31
|
+
@hook.set :action_one
|
32
|
+
@hook.set :action_two
|
33
|
+
|
34
|
+
@hook.instance_variable_get(:@callbacks).should == {:action_one => [], :action_two => []}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context "#exec" do
|
39
|
+
|
40
|
+
it "executes valid callbacks" do
|
41
|
+
# prepare data
|
42
|
+
block_one = lambda { |*args| nil }
|
43
|
+
block_two = lambda { |*args| nil }
|
44
|
+
block_three = lambda { |*args| nil }
|
45
|
+
@hook.instance_variable_set( :@callbacks, {:action_one => [block_one], :action_two => [block_two, block_three]} )
|
46
|
+
|
47
|
+
block_one.should_receive(:call).with("one").once
|
48
|
+
block_two.should_receive(:call).with("two", "and", "three").once
|
49
|
+
block_three.should_receive(:call).with("two", "and", "three").once
|
50
|
+
|
51
|
+
@hook.exec :action_one, "one"
|
52
|
+
@hook.exec :action_two, "two", "and", "three"
|
53
|
+
end
|
54
|
+
|
55
|
+
it "skips empty or invalid callbacks" do
|
56
|
+
@hook.instance_variable_set(:@callbacks, {:action_one => [], :action_two => "test"} )
|
57
|
+
|
58
|
+
callbacks = @hook.instance_variable_get(:@callbacks)
|
59
|
+
callbacks[:action_one].should_receive :each
|
60
|
+
callbacks[:action_two].should_not_receive :each
|
61
|
+
|
62
|
+
# nil can't be called so we just must ensure, that error is not raised
|
63
|
+
expect { @hook.exec :action_one, "one" }.to_not raise_error
|
64
|
+
expect { @hook.exec :action_two, "two", "and", "three" }.to_not raise_error
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context "#collection" do
|
69
|
+
|
70
|
+
it "executes valid scope" do
|
71
|
+
VTools::Hook.should_receive(:instance_eval).once
|
72
|
+
|
73
|
+
VTools::Hook.collection do
|
74
|
+
self.should be_a_kind_of(VTools::Hook)
|
75
|
+
self.should respond_to(:set)
|
76
|
+
self.should respond_to(:get)
|
77
|
+
self.should respond_to(:collection)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
data/spec/job_spec.rb
CHANGED
@@ -17,7 +17,7 @@ describe VTools::Job do
|
|
17
17
|
context "#execute" do
|
18
18
|
|
19
19
|
def stub_methods
|
20
|
-
VTools::
|
20
|
+
VTools::Hook.stub!(:exec).and_return nil
|
21
21
|
|
22
22
|
@video.stub(:get_info).and_return {"info.result"}
|
23
23
|
@video.stub(:convert).and_return {"encoded.result"}
|
@@ -34,8 +34,8 @@ describe VTools::Job do
|
|
34
34
|
stub_methods
|
35
35
|
set_action "info"
|
36
36
|
|
37
|
-
VTools::
|
38
|
-
VTools::
|
37
|
+
VTools::Hook.should_receive(:exec).with(:job_started, @video, "info")
|
38
|
+
VTools::Hook.should_receive(:exec).with(:job_finished, "info.result", @video, "info")
|
39
39
|
@video.should_receive(:get_info)
|
40
40
|
|
41
41
|
@job.execute.should == "info.result"
|
@@ -45,8 +45,8 @@ describe VTools::Job do
|
|
45
45
|
stub_methods
|
46
46
|
set_action "convert"
|
47
47
|
|
48
|
-
VTools::
|
49
|
-
VTools::
|
48
|
+
VTools::Hook.should_receive(:exec).with(:job_started, @video, "convert")
|
49
|
+
VTools::Hook.should_receive(:exec).with(:job_finished, "encoded.result", @video, "convert")
|
50
50
|
@video.should_receive(:convert)
|
51
51
|
|
52
52
|
@job.execute.should == "encoded.result"
|
@@ -56,8 +56,8 @@ describe VTools::Job do
|
|
56
56
|
stub_methods
|
57
57
|
set_action "thumbs"
|
58
58
|
|
59
|
-
VTools::
|
60
|
-
VTools::
|
59
|
+
VTools::Hook.should_receive(:exec).with(:job_started, @video, "thumbs")
|
60
|
+
VTools::Hook.should_receive(:exec).with(:job_finished, "thumbs.result", @video, "thumbs")
|
61
61
|
@video.should_receive(:create_thumbs)
|
62
62
|
|
63
63
|
@job.execute.should == "thumbs.result"
|
data/spec/thumbnailer_spec.rb
CHANGED
@@ -39,7 +39,7 @@ describe VTools::Thumbnailer do
|
|
39
39
|
@output_file = "/#{video.name}_"
|
40
40
|
|
41
41
|
VTools.should_receive(:fix_encoding).exactly(@options[:thumb_count].to_i).times.and_return {|str| str}
|
42
|
-
VTools::
|
42
|
+
VTools::Hook.should_receive(:exec).with(:before_thumb, video, @options)
|
43
43
|
@thumbnailer.should_receive(:generate_path)
|
44
44
|
end
|
45
45
|
|
@@ -55,12 +55,12 @@ describe VTools::Thumbnailer do
|
|
55
55
|
]
|
56
56
|
|
57
57
|
thumbs_array.each do |index|
|
58
|
-
VTools::
|
58
|
+
VTools::Hook.should_receive(:exec).with(:in_thumb, video, index)
|
59
59
|
end
|
60
60
|
|
61
61
|
@thumbnailer.should_receive(:set_point).exactly(3).times.and_return { |sec| sec }
|
62
62
|
@thumbnailer.should_receive(:time_offset).exactly(3).times.and_return { |sec| (sec.is_a?(Hash) ? sec[:thumb_start_point] : sec) }
|
63
|
-
VTools::
|
63
|
+
VTools::Hook.should_receive(:exec).with(:thumb_success, video, thumbs_array)
|
64
64
|
|
65
65
|
@thumbnailer.run.should == thumbs_array
|
66
66
|
end
|
@@ -72,11 +72,11 @@ describe VTools::Thumbnailer do
|
|
72
72
|
|
73
73
|
thumbs_array = [ {:path => "#{@output_file}test.postfix.jpg", :offset => 3} ]
|
74
74
|
|
75
|
-
VTools::
|
75
|
+
VTools::Hook.should_receive(:exec).with(:in_thumb, video, thumbs_array[0])
|
76
76
|
|
77
77
|
@thumbnailer.should_receive(:set_point).once.and_return { |sec| sec }
|
78
78
|
@thumbnailer.should_receive(:time_offset).once.and_return { |sec| sec[:thumb_start_point] }
|
79
|
-
VTools::
|
79
|
+
VTools::Hook.should_receive(:exec).with(:thumb_success, video, thumbs_array)
|
80
80
|
|
81
81
|
@thumbnailer.run.should == thumbs_array
|
82
82
|
end
|
@@ -87,7 +87,7 @@ describe VTools::Thumbnailer do
|
|
87
87
|
|
88
88
|
thumbs_array = [ {:path => "#{@output_file}12.jpg", :offset => 12} ]
|
89
89
|
|
90
|
-
VTools::
|
90
|
+
VTools::Hook.stub(:exec)
|
91
91
|
@thumbnailer.should_not_receive(:set_point)
|
92
92
|
@thumbnailer.should_receive(:time_offset).with(12).once.and_return { |sec| sec }
|
93
93
|
|
@@ -103,9 +103,9 @@ describe VTools::Thumbnailer do
|
|
103
103
|
{:path => "#{@output_file}2.jpg", :offset => 2},
|
104
104
|
]
|
105
105
|
|
106
|
-
VTools::
|
106
|
+
VTools::Hook.should_receive(:exec).with(:thumb_error, video, " Errors: thumbnailer error (/video.name_0.jpg). ")
|
107
107
|
thumbs_array.each do |index|
|
108
|
-
VTools::
|
108
|
+
VTools::Hook.should_receive(:exec).with(:in_thumb, video, index)
|
109
109
|
end
|
110
110
|
|
111
111
|
@thumbnailer.should_receive(:set_point).exactly(3).times.and_return { |sec| sec }
|
@@ -119,7 +119,7 @@ describe VTools::Thumbnailer do
|
|
119
119
|
prepare_thumbnailer ["thumbnailer error", "thumbnailer error 2"]
|
120
120
|
|
121
121
|
|
122
|
-
VTools::
|
122
|
+
VTools::Hook.should_receive(:exec).with(
|
123
123
|
:thumb_error, video,
|
124
124
|
" Errors: thumbnailer error (/video.name_0.jpg);thumbnailer error 2 (/video.name_1.jpg). "
|
125
125
|
)
|
@@ -138,7 +138,7 @@ describe VTools::Thumbnailer do
|
|
138
138
|
)[10]
|
139
139
|
]
|
140
140
|
|
141
|
-
VTools::
|
141
|
+
VTools::Hook.should_receive(:exec).with(:thumb_error, video, / Errors: /)
|
142
142
|
|
143
143
|
@thumbnailer.should_not_receive(:time_offset)
|
144
144
|
@thumbnailer.should_receive(:set_point).and_return { |sec| sec }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vtools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daemons
|
16
|
-
requirement: &
|
16
|
+
requirement: &79436730 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.1.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *79436730
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &79436540 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *79436540
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &79436310 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *79436310
|
47
47
|
description: FFMPEG & FFMPEGTHUMBNAILER based video processor. Permits to generate
|
48
48
|
thumbs and encode/edit video. Can be started as daemon.
|
49
49
|
email: v.tofir@gmail.com
|
@@ -53,54 +53,54 @@ extensions:
|
|
53
53
|
- extconf.rb
|
54
54
|
extra_rdoc_files: []
|
55
55
|
files:
|
56
|
+
- doc/LIB_EXAMPLE.md
|
57
|
+
- doc/CONFIG.md
|
58
|
+
- doc/HOOKS.md
|
56
59
|
- extconf.rb
|
57
60
|
- vtools.gemspec
|
61
|
+
- setup.rb
|
62
|
+
- VTools.project
|
58
63
|
- Rakefile
|
59
|
-
- vtools-0.1.0.gem
|
60
|
-
- INSTALL
|
61
|
-
- doc/HOOKS.md
|
62
|
-
- doc/LIB_EXAMPLE.md
|
63
|
-
- doc/CONFIG.md
|
64
|
-
- bin/vtools
|
65
64
|
- README.md
|
66
|
-
-
|
67
|
-
- lib/vtools/storage.rb
|
68
|
-
- lib/vtools/options.rb
|
69
|
-
- lib/vtools/errors.rb
|
70
|
-
- lib/vtools/convert_options.rb
|
71
|
-
- lib/vtools/version.rb
|
72
|
-
- lib/vtools/video.rb
|
73
|
-
- lib/vtools/thumbnailer.rb
|
74
|
-
- lib/vtools/shared_methods.rb
|
75
|
-
- lib/vtools/converter.rb
|
76
|
-
- lib/vtools/harvester.rb
|
77
|
-
- lib/vtools/config.rb
|
78
|
-
- lib/vtools/thumbs_options.rb
|
79
|
-
- lib/vtools/job.rb
|
80
|
-
- lib/vtools/handler.rb
|
81
|
-
- lib/vtools.rb
|
82
|
-
- setup.rb
|
83
|
-
- Vtools.project
|
65
|
+
- INSTALL
|
84
66
|
- LICENSE
|
85
|
-
- spec/thumbs_options_spec.rb
|
86
|
-
- spec/handler_spec.rb
|
87
|
-
- spec/shared_methods_spec.rb
|
88
|
-
- spec/harvester_spec.rb
|
89
67
|
- spec/video_spec.rb
|
90
|
-
- spec/
|
91
|
-
- spec/errors_spec.rb
|
92
|
-
- spec/convert_options_spec.rb
|
68
|
+
- spec/thumbs_options_spec.rb
|
93
69
|
- spec/config_spec.rb
|
94
|
-
- spec/job_spec.rb
|
95
70
|
- spec/thumbnailer_spec.rb
|
96
|
-
- spec/
|
97
|
-
- spec/fixtures/outputs/
|
71
|
+
- spec/convert_options_spec.rb
|
72
|
+
- spec/fixtures/outputs/file_with_iso-8859-1.txt
|
98
73
|
- spec/fixtures/outputs/file_with_no_audio.txt
|
74
|
+
- spec/fixtures/outputs/file_with_non_supported_audio.txt
|
99
75
|
- spec/fixtures/outputs/file_with_surround_sound.txt
|
100
|
-
- spec/fixtures/outputs/
|
101
|
-
- spec/
|
76
|
+
- spec/fixtures/outputs/file_with_start_value.txt
|
77
|
+
- spec/harvester_spec.rb
|
78
|
+
- spec/storage_spec.rb
|
79
|
+
- spec/handler_spec.rb
|
102
80
|
- spec/spec_helper.rb
|
81
|
+
- spec/job_spec.rb
|
82
|
+
- spec/options_spec.rb
|
83
|
+
- spec/shared_methods_spec.rb
|
84
|
+
- spec/errors_spec.rb
|
103
85
|
- spec/converter_spec.rb
|
86
|
+
- spec/hook_spec.rb
|
87
|
+
- lib/vtools.rb
|
88
|
+
- lib/vtools/job.rb
|
89
|
+
- lib/vtools/storage.rb
|
90
|
+
- lib/vtools/handler.rb
|
91
|
+
- lib/vtools/version.rb
|
92
|
+
- lib/vtools/errors.rb
|
93
|
+
- lib/vtools/video.rb
|
94
|
+
- lib/vtools/hook.rb
|
95
|
+
- lib/vtools/options.rb
|
96
|
+
- lib/vtools/shared_methods.rb
|
97
|
+
- lib/vtools/thumbnailer.rb
|
98
|
+
- lib/vtools/convert_options.rb
|
99
|
+
- lib/vtools/harvester.rb
|
100
|
+
- lib/vtools/converter.rb
|
101
|
+
- lib/vtools/thumbs_options.rb
|
102
|
+
- lib/vtools/config.rb
|
103
|
+
- bin/vtools
|
104
104
|
homepage: https://github.com/tofir/vtools
|
105
105
|
licenses: []
|
106
106
|
post_install_message:
|
@@ -124,21 +124,22 @@ requirements:
|
|
124
124
|
- ffmpegthumbnailer v >= 2
|
125
125
|
- gem Daemons v >= 1.1.4
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 1.
|
127
|
+
rubygems_version: 1.7.2
|
128
128
|
signing_key:
|
129
129
|
specification_version: 3
|
130
130
|
summary: Daemon tools to operate the video (get info, encode & generate thumbnails).
|
131
131
|
test_files:
|
132
|
+
- spec/video_spec.rb
|
132
133
|
- spec/thumbs_options_spec.rb
|
133
|
-
- spec/
|
134
|
-
- spec/
|
134
|
+
- spec/config_spec.rb
|
135
|
+
- spec/thumbnailer_spec.rb
|
136
|
+
- spec/convert_options_spec.rb
|
135
137
|
- spec/harvester_spec.rb
|
136
|
-
- spec/video_spec.rb
|
137
138
|
- spec/storage_spec.rb
|
138
|
-
- spec/
|
139
|
-
- spec/convert_options_spec.rb
|
140
|
-
- spec/config_spec.rb
|
139
|
+
- spec/handler_spec.rb
|
141
140
|
- spec/job_spec.rb
|
142
|
-
- spec/thumbnailer_spec.rb
|
143
141
|
- spec/options_spec.rb
|
142
|
+
- spec/shared_methods_spec.rb
|
143
|
+
- spec/errors_spec.rb
|
144
144
|
- spec/converter_spec.rb
|
145
|
+
- spec/hook_spec.rb
|
data/Vtools.komodoproject
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!-- Komodo Project File - DO NOT EDIT -->
|
3
|
-
<project id="dce3e17b-c7b8-448c-9806-1c687a505039" kpf_version="5" name="Hephaestus.komodoproject">
|
4
|
-
<preference-set idref="dce3e17b-c7b8-448c-9806-1c687a505039">
|
5
|
-
<string relative="path" id="import_dirname"></string>
|
6
|
-
<string id="import_exclude_matches">*.*~;*.bak;*.tmp;CVS;.#*;*.pyo;*.pyc;.svn;*%*;tmp*.html;.DS_Store;.git;*.komodo*;*.kpf</string>
|
7
|
-
<string id="import_include_matches"></string>
|
8
|
-
<boolean id="import_live">1</boolean>
|
9
|
-
<boolean id="import_recursive">1</boolean>
|
10
|
-
<string id="import_type">useFolders</string>
|
11
|
-
</preference-set>
|
12
|
-
</project>
|
data/vtools-0.1.0.gem
DELETED
Binary file
|