<commit_before>require "error_inbox/version"
require "error_inbox/notifier"
require "error_inbox/configuration"

module ErrorInbox
  class MissingCredentialsError < StandardError; end
  class InvalidCredentialsError < StandardError; end

  def self.notify(ex, env)
    notifier = Notifier.new(env)
    notifier.save(ex)
  end

  def self.configuration
    @configuration ||= Configuration.new
    yield @configuration if block_given?
    @configuration
  end
end
<commit_msg>better method to configure the gem<commit_after>require "error_inbox/version"
require "error_inbox/notifier"
require "error_inbox/configuration"

module ErrorInbox
  class MissingCredentialsError < StandardError; end
  class InvalidCredentialsError < StandardError; end

  def self.notify(ex, env)
    notifier = Notifier.new(env)
    notifier.save(ex)
  end

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

  def self.configure
    yield configuration if block_given?
  end
end

{'fraction_non_alphanumeric': 0.07252298263534218, 'fraction_numerical': 0.0, 'mean_word_length': 4.6976744186046515, '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': '4581411', 'n_tokens_mistral': 292, 'n_tokens_neox': 285, 'n_words': 75}