<commit_before>require "bundler"
Bundler.require

module Initializer
  def self.run
    require_config
    initialize_database
    require_lib
    require_initializers
  end

  def self.require_config
    require! "config/config"
  end

  def self.initialize_database
    Sequel.connect(Config.database_url, max_connections: Config.db_pool)
  end

  def self.require_lib
    require! %w(
      lib/endpoints/base
      lib/endpoints/**/*
      lib/mediators/base
      lib/mediators/**/*
      lib/models/**/*
      lib/routes
      lib/serializers/base
      lib/serializers/**/*.rb
      lib/services/base
      lib/services/**
      lib/workers/**
    )
  end

  def self.require_initializers
    Pliny::Utils.require_glob("#{root}/config/initializers/*.rb")
  end

  def self.require!(globs)
    globs = [globs] unless globs.is_a?(Array)
    globs.each do |f|
      Pliny::Utils.require_glob("#{root}/#{f}.rb")
    end
  end

  def self.root
    @@root ||= File.expand_path("../../", __FILE__)
  end
end

Initializer.run
<commit_msg>Removed database initialization<commit_after>require "bundler"
Bundler.require

module Initializer
  def self.run
    require_config
    require_lib
    require_initializers
  end

  def self.require_config
    require! "config/config"
  end

  def self.require_lib
    require! %w(
      lib/endpoints/base
      lib/endpoints/**/*
      lib/mediators/base
      lib/mediators/**/*
      lib/models/**/*
      lib/routes
      lib/serializers/base
      lib/serializers/**/*.rb
      lib/services/base
      lib/services/**
      lib/workers/**
    )
  end

  def self.require_initializers
    Pliny::Utils.require_glob("#{root}/config/initializers/*.rb")
  end

  def self.require!(globs)
    globs = [globs] unless globs.is_a?(Array)
    globs.each do |f|
      Pliny::Utils.require_glob("#{root}/#{f}.rb")
    end
  end

  def self.root
    @@root ||= File.expand_path("../../", __FILE__)
  end
end

Initializer.run

{'fraction_non_alphanumeric': 0.12979049565661727, 'fraction_numerical': 0.0, 'mean_word_length': 2.605893186003683, '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': '1955567', 'n_tokens_mistral': 665, 'n_tokens_neox': 656, 'n_words': 121}