<commit_before>require "pathname"
require "set"

# API for watching file change events
module Middleman
  module CoreExtensions
    module FileWatcher

      IGNORE_LIST = [
        /^bin\//,
        /^\.bundle\//,
        /^vendor\//,
        /^\.sass-cache\//,
        /^\.git\//,
        /^\.gitignore$/,
        /\.DS_Store/,
        /^\.rbenv-.*$/,
        /^Gemfile$/,
        /^Gemfile\.lock$/,
        /~$/,
        /(^|\/)\.?#/,
        /^tmp\//
      ]

      # Setup extension
      class << self

        # Once registered
        def registered(app)
          app.send :include, InstanceMethods

          app.config.define_setting :file_watcher_ignore, IGNORE_LIST, 'Regexes for paths that should be ignored when they change.'

          # Before parsing config, load the data/ directory
          app.before_configuration do
            files.reload_path(config[:data_dir])
          end

          app.after_configuration do
            config[:file_watcher_ignore] << %r{^#{config[:build_dir]}\/}
          end

          # After config, load everything else<commit_msg>Ignore this new .cache folder that's shown up<commit_after>require "pathname"
require "set"

# API for watching file change events
module Middleman
  module CoreExtensions
    module FileWatcher

      IGNORE_LIST = [
        /^bin\//,
        /^\.bundle\//,
        /^vendor\//,
        /^\.sass-cache\//,
        /^\.cache\//,
        /^\.git\//,
        /^\.gitignore$/,
        /\.DS_Store/,
        /^\.rbenv-.*$/,
        /^Gemfile$/,
        /^Gemfile\.lock$/,
        /~$/,
        /(^|\/)\.?#/,
        /^tmp\//
      ]

      # Setup extension
      class << self

        # Once registered
        def registered(app)
          app.send :include, InstanceMethods

          app.config.define_setting :file_watcher_ignore, IGNORE_LIST, 'Regexes for paths that should be ignored when they change.'

          # Before parsing config, load the data/ directory
          app.before_configuration do
            files.reload_path(config[:data_dir])
          end

          app.after_configuration do
            config[:file_watcher_ignore] << %r{^#{config[:build_dir]}\/}
          end

          # After config, load everything else
{'fraction_non_alphanumeric': 0.14093357271095153, 'fraction_numerical': 0.0, 'mean_word_length': 1.6100702576112411, 'pattern_counts': {'":': 0, '<': 11, '<?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': '6889053', 'n_tokens_mistral': 692, 'n_tokens_neox': 662, 'n_words': 153}