<commit_before># reopen Redmine Mailer
class Mailer < ActionMailer::Base
  # Sends notification to specified administrator
  #
  # @param [Gem::Version] advisories
  #   The version to compare against {#unaffected_versions}.
  # @param [Array] user_ids
  #   Array of user ids who should be notified
  def unfixed_advisories_found(redmine_version, advisories, user_ids)
    if advisories.nil? || advisories.empty?
      raise "Couldn't find user specified: #{advisories.inspect}"
    end

    users = User.active.where(admin: true, id: user_ids).to_a
    if users.empty?
      raise ActiveRecord::RecordNotFound.new("Couldn't find user specified: #{user_ids.inspect}")
    end

    @redmine_version = redmine_version
    @advisories = advisories
    # TODO: Internationalize suject and body.
    mail(to: users, subject: "[Redmine] Security notification")<commit_msg>Fix document.<commit_after># reopen Redmine Mailer
class Mailer < ActionMailer::Base
  # Sends notification to specified administrator
  #
  # @param [Gem::Version] redmine_version
  #   The version to compare against {#unaffected_versions}.
  # @param [RedmineAudit::Advisory] advisories
  #   Array of Redmine advisories.
  # @param [Array] user_ids
  #   Array of user ids who should be notified.
  def unfixed_advisories_found(redmine_version, advisories, user_ids)
    if advisories.nil? || advisories.empty?
      raise "Couldn't find user specified: #{advisories.inspect}"
    end

    users = User.active.where(admin: true, id: user_ids).to_a
    if users.empty?
      raise ActiveRecord::RecordNotFound.new("Couldn't find user specified: #{user_ids.inspect}")
    end

    @redmine_version = redmine_version
    @advisories = advisories
    # TODO: Internationalize suject and body.
    mail(to: users, subject: "[Redmine] Security notification")
{'fraction_non_alphanumeric': 0.09659714599341383, 'fraction_numerical': 0.0, 'mean_word_length': 4.208571428571428, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1315178', 'n_tokens_mistral': 565, 'n_tokens_neox': 545, 'n_words': 157}