<commit_before>require 'sequel'
require 'sandthorn_event_filter'
require "sandthorn_sequel_projection/version"
require "sandthorn_sequel_projection/utilities"
require "sandthorn_sequel_projection/cursor"
require "sandthorn_sequel_projection/event_handler"
require "sandthorn_sequel_projection/event_handler_collection"
require "sandthorn_sequel_projection/projection"
require "sandthorn_sequel_projection/lock"
require "sandthorn_sequel_projection/processed_events_tracker"

module SandthornSequelProjection

  class << self

    attr_accessor :configuration

    def configure
      @configuration ||= Configuration.default
      yield(configuration) if block_given?
    end

    def start
      ProcessedEventsTracker.migrate!(configuration.projections_driver)
    end

    def event_store
      configuration.event_store
    end

    def batch_size
      configuration.batch_size
    end

  end

  class Configuration
    attr_accessor :projections_driver, :event_store, :projections_folder, :batch_size

    def self.default
      self.new do |c|
        c.batch_size = 40
      end
    end

  end
end

<commit_msg>Config yields itself for and refactor requires<commit_after>require "sequel"
require "sandthorn_event_filter"

module SandthornSequelProjection

  class << self

    attr_accessor :configuration

    def configure
      @configuration ||= Configuration.default
      yield(configuration) if block_given?
    end

    def start
      ProcessedEventsTracker.migrate!(configuration.projections_driver)
    end

    def event_store
      configuration.event_store
    end

    def batch_size
      configuration.batch_size
    end

  end

  class Configuration

    attr_accessor :projections_driver, :event_store, :projections_folder, :batch_size

    def initialize
      yield(self) if block_given?
    end

    def self.default
      self.new do |c|
        c.batch_size = 40
      end
    end

  end
end

require "sandthorn_sequel_projection/version"
require "sandthorn_sequel_projection/utilities"
require "sandthorn_sequel_projection/cursor"
require "sandthorn_sequel_projection/event_handler"
require "sandthorn_sequel_projection/event_handler_collection"
require "sandthorn_sequel_projection/projection"
require "sandthorn_sequel_projection/lock"
require "sandthorn_sequel_projection/processed_events_tracker"
require "sandthorn_sequel_projection/manifest"
require "sandthorn_sequel_projection/runner"
{'fraction_non_alphanumeric': 0.05484536082474227, 'fraction_numerical': 0.0016494845360824743, 'mean_word_length': 4.538812785388128, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5774740', 'n_tokens_mistral': 775, 'n_tokens_neox': 724, 'n_words': 146}