ffprober 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e92baf6e0fb2e8d71014e68f76eac308b66bf10d
4
- data.tar.gz: 3ac7b04d07344108f8d6619e993aa926f4fc01c8
3
+ metadata.gz: b9720e6501e9017095339eeeda71ea175a478645
4
+ data.tar.gz: 1779005a50673b1ef183320d7702287ef9186bfa
5
5
  SHA512:
6
- metadata.gz: 7b23f169a5065a20efc7e73c248b87474f29e0c74a0fee9ab216d4266f857cea2f50410adda49881657c38dcb73336bc440ad7d9ad0ee078fe0673b05d7460b0
7
- data.tar.gz: 28bd43b6fc75c819fe8fa90fd40c788df8e97cf4db873e3a1bd99de726d145ad358d04df5eaf89333f22dcd84a8d2b9f02e93772887022391ab4c69db364314f
6
+ metadata.gz: bb08ab86f81c9c662c708954bad57a92dc49f77ada054d5828b2f5df7ae7d95a646ef2ac0b55ce729aa3fff47330aa3223677ef3e49982ac4a1bb3c37634337f
7
+ data.tar.gz: ee31e032b48e4a923df8a4f31525874a80dcac433747039310e069ad40b68ed8d8c9993c5067961d41886b9ccce5f21381231049e640d73685520dcd889db0c4
data/.travis.yml CHANGED
@@ -11,5 +11,5 @@ rvm:
11
11
  - 2.0.0
12
12
  - 2.1.0
13
13
  - jruby-19mode
14
- - rbx
14
+ - rbx-2
15
15
  - ruby-head
data/Changes.md CHANGED
@@ -1,6 +1,11 @@
1
1
  MASTER
2
2
  -----------
3
+
4
+ 0.3.7
5
+ -----------
3
6
  - upgrade to rspec 3
7
+ - support for ffmpeg 2.1.4
8
+ - support for ffmpeg 2.2.0
4
9
 
5
10
  0.3.6
6
11
  -----------
data/Gemfile CHANGED
@@ -1,9 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- platforms :rbx do
4
- gem 'rubysl', '~> 2.0'
5
- gem 'rubysl-json', '~> 2.0'
6
- end
3
+ gem 'pry'
7
4
 
8
5
  # Specify your gem's dependencies in ffprober.gemspec
9
6
  gemspec
data/ffprober.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
 
14
14
  gem.licenses = ['MIT']
15
15
 
16
- gem.add_development_dependency "rspec", "~> 2.9"
16
+ gem.add_development_dependency "rspec", "~> 3.0.0.beta1"
17
17
 
18
18
  gem.files = `git ls-files`.split("\n")
19
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -4,7 +4,7 @@ module Ffprober
4
4
  @@nightly_regex = /^(ffprobe|avprobe|ffmpeg) version (N|git)-/
5
5
 
6
6
  MIN_VERSION = Gem::Version.new("0.9.0")
7
- MAX_VERSION = Gem::Version.new("2.0.1")
7
+ MAX_VERSION = Gem::Version.new("2.2")
8
8
 
9
9
  def self.valid?
10
10
  self.new.valid?
@@ -1,3 +1,3 @@
1
1
  module Ffprober
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
@@ -0,0 +1,11 @@
1
+ ffprobe version 2.1.2-tessus
2
+ built on Jan 13 2014 18:27:44 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
3
+ configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
4
+ libavutil 52. 48.101 / 52. 48.101
5
+ libavcodec 55. 39.101 / 55. 39.101
6
+ libavformat 55. 19.104 / 55. 19.104
7
+ libavdevice 55. 5.100 / 55. 5.100
8
+ libavfilter 3. 90.100 / 3. 90.100
9
+ libswscale 2. 5.101 / 2. 5.101
10
+ libswresample 0. 17.104 / 0. 17.104
11
+ libpostproc 52. 3.100 / 52. 3.100
@@ -0,0 +1,11 @@
1
+ ffprobe version 2.1.4-tessus
2
+ built on Feb 23 2014 19:51:22 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
3
+ configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-libmodplug --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
4
+ libavutil 52. 48.101 / 52. 48.101
5
+ libavcodec 55. 39.101 / 55. 39.101
6
+ libavformat 55. 19.104 / 55. 19.104
7
+ libavdevice 55. 5.100 / 55. 5.100
8
+ libavfilter 3. 90.100 / 3. 90.100
9
+ libswscale 2. 5.101 / 2. 5.101
10
+ libswresample 0. 17.104 / 0. 17.104
11
+ libpostproc 52. 3.100 / 52. 3.100
@@ -0,0 +1,11 @@
1
+ ffprobe version 2.2-tessus
2
+ built on Mar 24 2014 22:25:11 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
3
+ configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-libmodplug --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
4
+ libavutil 52. 66.100 / 52. 66.100
5
+ libavcodec 55. 52.102 / 55. 52.102
6
+ libavformat 55. 33.100 / 55. 33.100
7
+ libavdevice 55. 10.100 / 55. 10.100
8
+ libavfilter 4. 2.100 / 4. 2.100
9
+ libswscale 2. 5.102 / 2. 5.102
10
+ libswresample 0. 18.100 / 0. 18.100
11
+ libpostproc 52. 3.100 / 52. 3.100
@@ -8,14 +8,22 @@ describe Ffprober::FfprobeVersion do
8
8
  { version: "1.1.0", pass: true },
9
9
  { version: "2.9.0", pass: false },
10
10
  { version: "1.2.1", pass: true },
11
- { version: "2.0", pass: true}
11
+ { version: "2.0", pass: true},
12
+ { version: "2.0.1", pass: true },
13
+ { version: "2.0.2", pass: true },
14
+ { version: "2.1.1", pass: true },
15
+ { version: "2.1.2", pass: true },
16
+ { version: "2.1.4", pass: true },
17
+ { version: "2.2", pass: true }
12
18
  ]
13
19
 
20
+ subject(:ffprobe_version) { Ffprober::FfprobeVersion.new }
21
+
14
22
  context 'validates the ffprobe version' do
15
23
  VERSION_CHECKS.each do |check|
16
24
  it "detects version #{check[:version]}" do
17
- Ffprober::FfprobeVersion.any_instance.stub(:version) { Gem::Version.new(check[:version]) }
18
- Ffprober::FfprobeVersion.valid?.should be(check[:pass])
25
+ allow(ffprobe_version).to receive(:version).and_return(Gem::Version.new(check[:version]))
26
+ expect(ffprobe_version.valid?).to be(check[:pass])
19
27
  end
20
28
  end
21
29
  end
@@ -27,22 +35,22 @@ describe Ffprober::FfprobeVersion do
27
35
 
28
36
  it "on #{os} from #{expected_version}" do
29
37
  version_output = File.read("spec/assets/version_outputs/" + entry)
30
- Ffprober::FfprobeVersion.any_instance.stub(:version_output) { version_output }
31
- version_check = Ffprober::FfprobeVersion.new
38
+
39
+ allow(ffprobe_version).to receive(:version_output).and_return(version_output)
32
40
 
33
41
  if expected_version == "nightly"
34
- version_check.nightly?.should eq(true)
35
- version_check.valid?.should eq(true)
42
+ expect(ffprobe_version.nightly?).to eq(true)
43
+ expect(ffprobe_version.valid?).to eq(true)
36
44
  else
37
- version_check.version.should eq(Gem::Version.new(expected_version.gsub("_", ".")))
45
+ expect(ffprobe_version.version).to eq(Gem::Version.new(expected_version.gsub("_", ".")))
38
46
  end
39
47
  end
40
48
  end
41
49
 
42
50
  it "should not be valid if no ffprobe could be found in PATH" do
43
- Ffprober.stub(:path).and_return(nil)
44
- Ffprober::FfprobeVersion.new.version.to_s.should eq("0.0.0")
45
- Ffprober::FfprobeVersion.valid?.should eq(false)
51
+ allow(Ffprober).to receive(:path).and_return(nil)
52
+ expect(ffprobe_version.version.to_s).to eq("0.0.0")
53
+ expect(Ffprober::FfprobeVersion.valid?).to eq(false)
46
54
  end
47
55
 
48
56
  end
@@ -4,112 +4,98 @@ require 'spec_helper'
4
4
  describe Ffprober::Parser do
5
5
 
6
6
  describe "from_file with whitespace", if: Ffprober::FfprobeVersion.valid? do
7
- before :each do
8
- @ffprobe = Ffprober::Parser.from_file('spec/assets/301 extracting a ruby gem.m4v')
9
- end
7
+ let(:ffprobe) { Ffprober::Parser.from_file('spec/assets/301 extracting a ruby gem.m4v') }
10
8
 
11
9
  describe "format" do
12
10
  it "should determine the correct filename" do
13
- @ffprobe.format.filename.should eq("spec/assets/301 extracting a ruby gem.m4v")
11
+ expect(ffprobe.format.filename).to eq("spec/assets/301 extracting a ruby gem.m4v")
14
12
  end
15
13
 
16
14
  it "should find the correct size" do
17
- @ffprobe.format.size.should eq("130694")
15
+ expect(ffprobe.format.size).to eq("130694")
18
16
  end
19
17
 
20
18
  it "should find the correct bit_rate" do
21
- @ffprobe.format.bit_rate.should eq("502669")
19
+ expect(ffprobe.format.bit_rate).to eq("502669")
22
20
  end
23
21
  end
24
22
  end
25
23
 
26
24
  describe "from_file", if: Ffprober::FfprobeVersion.valid? do
27
- before :each do
28
- @ffprobe = Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
29
- end
25
+ let(:ffprobe) { Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v') }
30
26
 
31
27
  describe "format" do
32
28
  it "should determine the correct filename" do
33
- @ffprobe.format.filename.should eq("spec/assets/301-extracting_a_ruby_gem.m4v")
29
+ expect(ffprobe.format.filename).to eq("spec/assets/301-extracting_a_ruby_gem.m4v")
34
30
  end
35
31
 
36
32
  it "should find the correct size" do
37
- @ffprobe.format.size.should eq("130694")
33
+ expect(ffprobe.format.size).to eq("130694")
38
34
  end
39
35
 
40
36
  it "should find the correct bit_rate" do
41
- @ffprobe.format.bit_rate.should eq("502669")
37
+ expect(ffprobe.format.bit_rate).to eq("502669")
42
38
  end
43
39
  end
44
40
  end
45
41
 
46
42
  describe "from invalid file", if: Ffprober::FfprobeVersion.valid? do
47
- before :each do
48
- @ffprobe = Ffprober::Parser.from_file('spec/assets/empty_file')
49
- end
43
+ let(:ffprobe) { Ffprober::Parser.from_file('spec/assets/empty_file') }
50
44
 
51
45
  describe "format" do
52
46
  it "should determine the correct filename" do
53
- expect do
54
- @ffprobe.format.filename.should eq("spec/assets/empty_file")
55
- end.to raise_error
47
+ expect { ffprobe.format.filename }.to raise_error
56
48
  end
57
49
 
58
50
  it "should find the correct size" do
59
- expect do
60
- @ffprobe.format.size.should eq("130694")
61
- end.to raise_error
51
+ expect { ffprobe.format.size }.to raise_error
62
52
  end
63
53
 
64
54
  it "should find the correct bit_rate" do
65
- expect do
66
- @ffprobe.format.bit_rate.should eq("502669")
67
- end.to raise_error
55
+ expect { ffprobe.format.bit_rate }.to raise_error
68
56
  end
69
57
  end
70
58
  end
71
59
 
72
60
  describe "from_json" do
73
- before :each do
74
- @ffprobe = Ffprober::Parser.from_json(File.read('spec/assets/301-extracting_a_ruby_gem.json'))
75
- end
61
+ let(:ffprobe) { Ffprober::Parser.from_json(File.read('spec/assets/301-extracting_a_ruby_gem.json')) }
76
62
 
77
63
  describe "format" do
78
64
  it "should determine the correct filename" do
79
- @ffprobe.format.filename.should eq("301-extracting-a-ruby-gem.mp4")
65
+ expect(ffprobe.format.filename).to eq("301-extracting-a-ruby-gem.mp4")
80
66
  end
81
67
 
82
68
  it "should find the correct size" do
83
- @ffprobe.format.size.should eq("44772490")
69
+ expect(ffprobe.format.size).to eq("44772490")
84
70
  end
85
71
 
86
72
  it "should find the correct bit_rate" do
87
- @ffprobe.format.bit_rate.should eq("361309")
73
+ expect(ffprobe.format.bit_rate).to eq("361309")
88
74
  end
89
75
  end
90
76
 
91
77
  describe "audio_streams" do
92
78
  it "should determine the correct number of audio streams" do
93
- @ffprobe.audio_streams.count.should eq(1)
79
+ expect(ffprobe.audio_streams.count).to eq(1)
94
80
  end
95
81
 
96
82
  it "should determine the correct sample rate of the first audio stream" do
97
- @ffprobe.audio_streams.first.sample_rate.should eq("48000")
83
+ expect(ffprobe.audio_streams.first.sample_rate).to eq("48000")
98
84
  end
99
85
 
100
86
  end
101
87
 
102
88
  describe "video_streams" do
103
89
  it "should determine the correct width of the first video streams" do
104
- @ffprobe.video_streams.first.width.should eq(960)
90
+ expect(ffprobe.video_streams.first.width).to eq(960)
105
91
  end
106
92
 
107
93
  it "should determine the correct width of the first video streams" do
108
- @ffprobe.video_streams.first.height.should eq(600)
94
+ expect(ffprobe.video_streams.first.height).to eq(600)
109
95
  end
110
96
 
111
97
  it "should determine the correct number of video streams" do
112
- @ffprobe.video_streams.count.should eq(1)
98
+ expect(ffprobe.video_streams.count).to eq(1)
113
99
  end
114
100
  end
115
101
  end
@@ -5,17 +5,18 @@ describe Ffprober do
5
5
 
6
6
  describe "if no ffprobe is found" do
7
7
  it "should raise a exception if there is no ffmpeg" do
8
- Ffprober.stub(:path).and_return("nonexistant")
8
+ allow(Ffprober).to receive(:path).and_return("nonexistant")
9
+
9
10
  expect {
10
- @ffprobe = Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
11
+ Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
11
12
  }.to raise_error
12
13
  end
13
14
 
14
15
  it "should raise a exception if there is no valid ffmpeg" do
15
- Ffprober::FfprobeVersion.stub(:valid?).and_return(false)
16
+ allow(Ffprober::FfprobeVersion).to receive(:valid?).and_return(false)
16
17
 
17
18
  expect {
18
- @ffprobe = Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
19
+ Ffprober::Parser.from_file('spec/assets/301-extracting_a_ruby_gem.m4v')
19
20
  }.to raise_error(ArgumentError)
20
21
  end
21
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.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - beanieboi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2014-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.9'
19
+ version: 3.0.0.beta1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.9'
26
+ version: 3.0.0.beta1
27
27
  description: a Ruby wrapper for ffprobe
28
28
  email:
29
29
  - beanie@benle.de
@@ -57,6 +57,9 @@ files:
57
57
  - spec/assets/version_outputs/osx-1_2_0
58
58
  - spec/assets/version_outputs/osx-2_0
59
59
  - spec/assets/version_outputs/osx-2_0_1
60
+ - spec/assets/version_outputs/osx-2_1_2
61
+ - spec/assets/version_outputs/osx-2_1_4
62
+ - spec/assets/version_outputs/osx-2_2
60
63
  - spec/assets/version_outputs/raspian-0_8_6
61
64
  - spec/assets/version_outputs/ubuntu-0_10_6
62
65
  - spec/assets/version_outputs/windows-nightly
@@ -98,6 +101,9 @@ test_files:
98
101
  - spec/assets/version_outputs/osx-1_2_0
99
102
  - spec/assets/version_outputs/osx-2_0
100
103
  - spec/assets/version_outputs/osx-2_0_1
104
+ - spec/assets/version_outputs/osx-2_1_2
105
+ - spec/assets/version_outputs/osx-2_1_4
106
+ - spec/assets/version_outputs/osx-2_2
101
107
  - spec/assets/version_outputs/raspian-0_8_6
102
108
  - spec/assets/version_outputs/ubuntu-0_10_6
103
109
  - spec/assets/version_outputs/windows-nightly