<commit_before>require "krug_forum/engine"

module KrugForum
  DEFAULT_CURRENT_USER = Proc.new do
    if respond_to?(:current_user)
      current_user
    else
      raise "Cannot find :current_user method"
    end
  end

  def self.current_user_method(&block)
    @current_user = block if block
    @current_user || DEFAULT_CURRENT_USER
  end
end<commit_msg>Return nil if auth is not available.<commit_after>require "krug_forum/engine"

module KrugForum
  DEFAULT_CURRENT_USER = Proc.new do
    if respond_to?(:current_user)
      current_user
    else
      nil
    end
  end

  def self.current_user_method(&block)
    @current_user = block if block
    @current_user || DEFAULT_CURRENT_USER
  end
end
{'fraction_non_alphanumeric': 0.06534090909090909, 'fraction_numerical': 0.0, 'mean_word_length': 3.5779220779220777, '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': '4180335', 'n_tokens_mistral': 232, 'n_tokens_neox': 225, 'n_words': 58}