<commit_before>require "bundler/setup"

require "graphviz"
require "hiredis"
require "pathname"
require "redis"
require "securerandom"
require "sidekiq"

require "gush/json"
require "gush/cli"
require "gush/cli/overview"
require "gush/graph"
require "gush/client"
require "gush/configuration"
require "gush/errors"
require "gush/job"
require "gush/version"
require "gush/worker"
require "gush/workflow"

module Gush
  def self.gushfile
    configuration.gushfile
  end

  def self.root
    Pathname.new(__FILE__).parent.parent
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration
    reconfigure_sidekiq_server
  end

  def self.reconfigure_sidekiq_server
    Sidekiq.configure_server do |config|
      config.redis = { url: configuration.redis_url, queue: configuration.namespace}
    end
  end
end

Gush.reconfigure_sidekiq_server<commit_msg>Remove old require.<commit_after>require "bundler/setup"

require "graphviz"
require "hiredis"
require "pathname"
require "redis"
require "securerandom"
require "sidekiq"

require "gush/json"
require "gush/cli"
require "gush/cli/overview"
require "gush/graph"
require "gush/client"
require "gush/configuration"
require "gush/errors"
require "gush/job"
require "gush/worker"
require "gush/workflow"

module Gush
  def self.gushfile
    configuration.gushfile
  end

  def self.root
    Pathname.new(__FILE__).parent.parent
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration
    reconfigure_sidekiq_server
  end

  def self.reconfigure_sidekiq_server
    Sidekiq.configure_server do |config|
      config.redis = { url: configuration.redis_url, queue: configuration.namespace}
    end
  end
end

Gush.reconfigure_sidekiq_server
{'fraction_non_alphanumeric': 0.0881542699724518, 'fraction_numerical': 0.0, 'mean_word_length': 4.553516819571866, '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': '2517316', 'n_tokens_mistral': 615, 'n_tokens_neox': 602, 'n_words': 141}