ffprober 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ffprober/parser.rb +1 -1
- data/lib/ffprober/version.rb +1 -1
- data/spec/ffprober_spec.rb +12 -3
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 612303cd0473e0360c30c7ac20a8a4842f720835
|
4
|
+
data.tar.gz: f820a3022dadd1214d28f8e02919cbf416cd6d3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc225d63eb2e44ff3070cf389bedb142b94c12677cda690fa445cc3efbc12eb0cca29a144acd5b8d9c4f8dbd3d7553115e735e6bf8e7f2e831b09c937c8340d
|
7
|
+
data.tar.gz: bb41d0d96a511f1e88589308f151dfa0faf6f7c71c80f6eeb6e0a7ad70917b951f8ee754849887d2b1cc453c69aa8303f41af77e1d3109baa8b4c9767a074e99
|
data/lib/ffprober/parser.rb
CHANGED
@@ -6,7 +6,7 @@ module Ffprober
|
|
6
6
|
def from_file(file_to_parse)
|
7
7
|
unless FfprobeVersion.valid?
|
8
8
|
raise ArgumentError.new("no or unsupported ffprobe version found.\
|
9
|
-
(version: #{FfprobeVersion.
|
9
|
+
(version: #{FfprobeVersion.new.version.to_s})")
|
10
10
|
end
|
11
11
|
|
12
12
|
json_output = `#{Ffprober.path} #{@@options} #{file_to_parse}`
|
data/lib/ffprober/version.rb
CHANGED
data/spec/ffprober_spec.rb
CHANGED
@@ -4,10 +4,19 @@ require 'spec_helper'
|
|
4
4
|
describe Ffprober do
|
5
5
|
|
6
6
|
describe "if no ffprobe is found" do
|
7
|
-
it "should raise a exception" do
|
7
|
+
it "should raise a exception if there is no ffmpeg" do
|
8
8
|
Ffprober.stub(:path).and_return("nonexistant")
|
9
|
-
|
9
|
+
expect {
|
10
|
+
@ffprobe = Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
|
11
|
+
}.to raise_error(Errno::ENOENT)
|
10
12
|
end
|
11
|
-
end
|
12
13
|
|
14
|
+
it "should raise a exception if there is no valid ffmpeg" do
|
15
|
+
Ffprober::FfprobeVersion.stub(:valid?).and_return(false)
|
16
|
+
|
17
|
+
expect {
|
18
|
+
@ffprobe = Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
|
19
|
+
}.to raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
end
|
13
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffprober
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- beanieboi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -112,4 +112,3 @@ test_files:
|
|
112
112
|
- spec/ffprober/parser_spec.rb
|
113
113
|
- spec/ffprober_spec.rb
|
114
114
|
- spec/spec_helper.rb
|
115
|
-
has_rdoc:
|