lib/mediainfo.rb in mediainfo-1.3.0 vs lib/mediainfo.rb in mediainfo-1.3.1
- old
+ new
@@ -1,10 +1,11 @@
require 'forwardable'
require 'net/http'
require 'mediainfo/errors'
require 'mediainfo/tracks'
require 'mediainfo/string'
+require 'open3'
module MediaInfo
def self.which(cmd)
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
@@ -87,10 +88,10 @@
end
def self.run(input = nil)
raise ArgumentError, 'Your input cannot be blank.' if input.nil?
command = "#{location} '#{input}' --Output=XML"
- raw_response, errors, status = Open3.capture3(command)
+ raw_response, errors, status = ::Open3.capture3(command)
unless errors.empty? && status.exitstatus == 0
raise ExecutionError, "Execution of '#{command}' failed: \n #{errors.red}"
end
return raw_response
end