web_video 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.rdoc +1 -1
- data/Rakefile +0 -19
- data/lib/web_video.rb +2 -2
- data/lib/web_video/tools.rb +8 -7
- data/lib/web_video/version.rb +1 -1
- data/test/test_helper.rb +3 -0
- data/test/web_video_test.rb +8 -0
- metadata +64 -48
data/MIT-LICENSE
CHANGED
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -22,22 +22,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
22
22
|
rdoc.rdoc_files.include('README')
|
23
23
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
24
24
|
end
|
25
|
-
|
26
|
-
begin
|
27
|
-
require 'jeweler'
|
28
|
-
Jeweler::Tasks.new do |gemspec|
|
29
|
-
gemspec.name = "web_video"
|
30
|
-
gemspec.version = WebVideo::VERSION.dup
|
31
|
-
gemspec.summary = "WebVideo allows you to inspect and process video files"
|
32
|
-
gemspec.description = "WebVideo allows you to inspect, convert and take screenshots from video files"
|
33
|
-
gemspec.email = "galeta.igor@gmail.com"
|
34
|
-
gemspec.homepage = "http://github.com/galetahub/web_video"
|
35
|
-
gemspec.authors = ["Igor Galeta"]
|
36
|
-
gemspec.files = FileList["[A-Z]*", "{lib, test}/**/*"]
|
37
|
-
gemspec.rubyforge_project = "web_video"
|
38
|
-
end
|
39
|
-
|
40
|
-
Jeweler::GemcutterTasks.new
|
41
|
-
rescue LoadError
|
42
|
-
puts "Jeweler not available. Install it with: gem install jeweler"
|
43
|
-
end
|
data/lib/web_video.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'logger'
|
2
|
+
require 'active_support'
|
2
3
|
|
3
4
|
module WebVideo
|
4
5
|
autoload :Tools, 'web_video/tools'
|
@@ -14,8 +15,7 @@ module WebVideo
|
|
14
15
|
# WebVideo.logger.info 'Demo convert'
|
15
16
|
#
|
16
17
|
def self.logger
|
17
|
-
@logger ||= Logger.new('/dev/null')
|
18
|
-
@logger
|
18
|
+
@logger ||= Logger.new('/dev/null')
|
19
19
|
end
|
20
20
|
|
21
21
|
#
|
data/lib/web_video/tools.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "subexec"
|
2
|
+
|
1
3
|
module WebVideo
|
2
4
|
module Tools
|
3
5
|
|
@@ -12,17 +14,16 @@ module WebVideo
|
|
12
14
|
command = %Q[#{cmd} #{params}].gsub(/\s+/, " ")
|
13
15
|
command = "#{command} 2>&1"
|
14
16
|
|
15
|
-
WebVideo.logger.info(command)
|
16
|
-
|
17
|
-
output = `#{command}`
|
17
|
+
WebVideo.logger.info(command)
|
18
18
|
|
19
|
-
|
19
|
+
sub = Subexec.run(command)
|
20
20
|
|
21
|
-
unless
|
22
|
-
|
21
|
+
unless Array.wrap(expected_outcodes).include?(sub.exitstatus)
|
22
|
+
WebVideo.logger.info(sub.output)
|
23
|
+
raise WebVideo::CommandLineError, "Error while running #{command}"
|
23
24
|
end
|
24
25
|
|
25
|
-
output
|
26
|
+
sub.output
|
26
27
|
end
|
27
28
|
|
28
29
|
def self.apply_options(command, options)
|
data/lib/web_video/version.rb
CHANGED
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,76 +1,92 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_video
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 2
|
10
|
-
version: 1.1.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Igor Galeta
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: subexec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activesupport
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: WebVideo allows you to inspect, convert and take screenshots from video
|
47
|
+
files
|
23
48
|
email: galeta.igor@gmail.com
|
24
49
|
executables: []
|
25
|
-
|
26
50
|
extensions: []
|
27
|
-
|
28
|
-
extra_rdoc_files:
|
51
|
+
extra_rdoc_files:
|
29
52
|
- README.rdoc
|
30
|
-
files:
|
31
|
-
- MIT-LICENSE
|
32
|
-
- README.rdoc
|
33
|
-
- Rakefile
|
53
|
+
files:
|
34
54
|
- lib/web_video.rb
|
55
|
+
- lib/web_video/transcoder.rb
|
35
56
|
- lib/web_video/adapters/abstract_adapter.rb
|
36
57
|
- lib/web_video/adapters/ffmpeg_adapter.rb
|
37
58
|
- lib/web_video/stream.rb
|
38
|
-
- lib/web_video/tools.rb
|
39
|
-
- lib/web_video/transcoder.rb
|
40
59
|
- lib/web_video/version.rb
|
41
|
-
|
60
|
+
- lib/web_video/tools.rb
|
61
|
+
- MIT-LICENSE
|
62
|
+
- Rakefile
|
63
|
+
- README.rdoc
|
64
|
+
- test/test_helper.rb
|
65
|
+
- test/web_video_test.rb
|
42
66
|
homepage: http://github.com/galetahub/web_video
|
43
67
|
licenses: []
|
44
|
-
|
45
68
|
post_install_message:
|
46
69
|
rdoc_options: []
|
47
|
-
|
48
|
-
require_paths:
|
70
|
+
require_paths:
|
49
71
|
- lib
|
50
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
73
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
|
57
|
-
- 0
|
58
|
-
version: "0"
|
59
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
79
|
none: false
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
segments:
|
66
|
-
- 0
|
67
|
-
version: "0"
|
80
|
+
requirements:
|
81
|
+
- - ! '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
68
84
|
requirements: []
|
69
|
-
|
70
85
|
rubyforge_project: web_video
|
71
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.8.24
|
72
87
|
signing_key:
|
73
88
|
specification_version: 3
|
74
89
|
summary: WebVideo allows you to inspect and process video files
|
75
|
-
test_files:
|
76
|
-
|
90
|
+
test_files:
|
91
|
+
- test/test_helper.rb
|
92
|
+
- test/web_video_test.rb
|