<commit_before>module Bricky
  class Requirements
    def check_and_execute
      if pending_requirements
        print "Make sure you have the following requirements: " 
        puts requirements.join(',').colorize(:red)
      else
        yield          
      end
    end

    private
      def requirements
        ["docker"]
      end
  
      def pending_requirements
        requirements.detect do |command|
          not system("which #{command} > /dev/null 2>&1")
        end
      end
  end
end<commit_msg>add boot2docker as a requiremnts for non-linux machines<commit_after>module Bricky
  class Requirements
    def check_and_execute
      if pending_requirements
        print "Make sure you have the following requirements: " 
        puts requirements.join(', ').colorize(:red)
      else
        yield          
      end
    end

    private
      def requirements
        requirements = ["docker"]
        requirements << "boot2docker" unless RUBY_PLATFORM.include?("linux") 
        requirements
      end
  
      def pending_requirements
        requirements.detect do |command|
          not system("which #{command} > /dev/null 2>&1")
        end
      end
  end
end
{'fraction_non_alphanumeric': 0.06896551724137931, 'fraction_numerical': 0.005046257359125316, 'mean_word_length': 2.0357142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4090648', 'n_tokens_mistral': 323, 'n_tokens_neox': 316, 'n_words': 95}