lib/joint.rb in joint-0.5.4 vs lib/joint.rb in joint-0.5.5

- old
+ new

@@ -24,16 +24,11 @@ File.size(file) end end def self.type(file) - type = file.content_type if file.respond_to?(:content_type) - - if blank?(type) - type = Wand.wave(file.path, :original_filename => Joint.name(file)) - end - - type + return file.type if file.is_a?(Joint::IO) + Wand.wave(file.path, :original_filename => Joint.name(file)) end private def self.blank?(str) str.nil? || str !~ /\S/