mxfinfo 0.0.3.2 → 0.0.3.3

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.
@@ -1,3 +1,3 @@
1
1
  class MXFinfo
2
- VERSION = "0.0.3.2"
2
+ VERSION = "0.0.3.3"
3
3
  end
data/lib/mxfinfo.rb CHANGED
@@ -13,7 +13,6 @@ class MXFinfo
13
13
 
14
14
  def self.scan(path)
15
15
  info = InfoObject.new(path)
16
- info.valid? ? info : nil
17
16
  end
18
17
 
19
18
  def self.import(data)
@@ -48,6 +47,8 @@ class MXFinfo
48
47
  @mxfinfo = mxfinfo
49
48
  # Check if output contains error from binary
50
49
  @mxfinfo.include?("ERROR") ? @valid = false : @valid = true
50
+ @mxfinfo.include?("Failed to open file") ? @valid = false : @valid = true
51
+ @mxfinfo.include?("mxf_disk_file_open_read") ? @valid = false : @valid = true
51
52
  end
52
53
  else
53
54
  @valid = true
data/spec/mxfinfo_spec.rb CHANGED
@@ -23,19 +23,10 @@ describe MXFinfo do
23
23
  info.raw_data.empty?.should == false
24
24
  end
25
25
 
26
- it "should return nil if file doesn't exist" do
27
- MXFinfo.scan("imagenary File").should == nil
28
- end
29
-
30
26
  #it "should work with whitespace filenames" do
31
27
  # MXFinfo.scan(name_to_fixture "Shellescape Test.mxf").should_not == nil
32
28
  #end
33
29
 
34
- it "should redirect stderr to stdout and return if ERROR is included" do
35
- info = MXFinfo.scan(name_to_fixture "InvalidFileTest.mxf")
36
- info.should == nil
37
- end
38
-
39
30
  it "should be possible to access raw data" do
40
31
  info = MXFinfo.scan(name_to_fixture "IMG_0395.MOV.A14DC7130D.mxf")
41
32
  info.nil?.should == false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mxfinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.2
4
+ version: 0.0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-18 00:00:00.000000000 Z
12
+ date: 2012-07-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: MXFinfo is a gem to use avidmxfinfo from http://ingex.sourceforge.net/
15
15
  directly in ruby.