<commit_before># frozen_string_literal: true
require "securerandom"

require "sidekiq/testing"

module JidGenerator
  def jid
    SecureRandom.hex 12
  end
end

configure_redis = proc do |config|
  config.redis = {
    :url        =>  "redis://localhost/15",
    :namespace  =>  "sidekiq-throttled-test"
  }
end

Sidekiq.configure_server(&configure_redis)
Sidekiq.configure_client(&configure_redis)

RSpec.configure do |config|
  config.include JidGenerator<commit_msg>Do not use namespace for redis in specs<commit_after># frozen_string_literal: true
require "securerandom"

require "sidekiq/testing"

module JidGenerator
  def jid
    SecureRandom.hex 12
  end
end

configure_redis = proc do |config|
  config.redis = { :url => "redis://localhost/15" }
end

Sidekiq.configure_server(&configure_redis)
Sidekiq.configure_client(&configure_redis)

RSpec.configure do |config|
  config.include JidGenerator
{'fraction_non_alphanumeric': 0.09513274336283185, 'fraction_numerical': 0.008849557522123894, 'mean_word_length': 4.838709677419355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '6850384', 'n_tokens_mistral': 318, 'n_tokens_neox': 308, 'n_words': 68}