<commit_before>module Dragonfly
  module Analysis
    
    class FileCommandAnalyser
      
      include Shell
      include Configurable
      
      configurable_attr :file_command, "file"
      configurable_attr :use_filesystem, true
      configurable_attr :num_bytes_to_check, 255
      
      def mime_type(temp_object)
        content_type = if use_filesystem<commit_msg>FileCommandAnalyser no longer uses configurable_attr stuff<commit_after>module Dragonfly
  module Analysis
    
    class FileCommandAnalyser
      
      include Shell
      
      def initialize(opts={})
        @file_command       = opts[:file_command] || "file"
        @use_filesystem     = opts.has_key?(:use_filesystem) ? opts[:use_filesystem] : true
        @num_bytes_to_check = opts[:num_bytes_to_check] || 255
      end
      
      attr_accessor :file_command, :use_filesystem, :num_bytes_to_check
      
      def mime_type(temp_object)
        content_type = if use_filesystem
{'fraction_non_alphanumeric': 0.05985552115583075, 'fraction_numerical': 0.006191950464396285, 'mean_word_length': 2.803921568627451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5620963', 'n_tokens_mistral': 290, 'n_tokens_neox': 286, 'n_words': 58}