Sha256: 938f1be70fb9a4276a06013c24b31171d5258701a9d22497a59fa35e8260e3e0

Contents?: true

Size: 359 Bytes

Versions: 13

Compression:

Stored size: 359 Bytes

Contents

module Dragonfly
  module Analysis
    
    class FileCommandAnalyser < Base
      
      include Configurable
      
      configurable_attr :file_command do `which file`.chomp end
      
      def mime_type(temp_object)
        output = `#{file_command} -b --mime #{temp_object.path}`
        output.split(';').first
      end
      
    end
    
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dragonfly-0.4.2 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.4.1 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.4.0 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.8 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.7 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.6 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.5 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.4 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.3 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.2 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.3.0 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.2.1 lib/dragonfly/analysis/file_command_analyser.rb
dragonfly-0.1.6 lib/dragonfly/analysis/file_command_analyser.rb