<commit_before>class FollowerNotifier
  include MailHelper

  def self.publish(args)
    new(args).publish
  end

  def initialize(args)
    @topic_arn = args[:topic_arn]
    @effort_data = args[:effort_data]
    @sns_client = args[:sns_client] || SnsClientFactory.client
  end

  def publish
    response = sns_client.publish(topic_arn: topic_arn, subject: subject, message: message)
    if response.successful?
      response
    else
      logger.info "Unable to publish to #{topic_arn}"
    end
  end

  private

  attr_reader :topic_arn, :effort_data, :sns_client

  def subject
    "Update for #{effort_data[:full_name]} at #{effort_data[:event_name]} from OpenSplitTime"
  end

  def message
    <<-MESSAGE
The following new times were reported for #{effort_data[:full_name]} at #{effort_data[:event_name]}:
  #{times_text}

Full results for #{effort_data[:full_name]} here: https://www.opensplittime.org/efforts/#{effort_data[:effort_slug]}
Full results for #{effort_data[:event_name]} here: https://www.opensplittime.org/events/#{effort_data[:event_slug]}

Thank you for using OpenSplitTime!
    MESSAGE
  end<commit_msg>Change FollowerNotifier event link to spread page.<commit_after>class FollowerNotifier
  include MailHelper

  def self.publish(args)
    new(args).publish
  end

  def initialize(args)
    @topic_arn = args[:topic_arn]
    @effort_data = args[:effort_data]
    @sns_client = args[:sns_client] || SnsClientFactory.client
  end

  def publish
    response = sns_client.publish(topic_arn: topic_arn, subject: subject, message: message)
    if response.successful?
      response
    else
      logger.info "Unable to publish to #{topic_arn}"
    end
  end

  private

  attr_reader :topic_arn, :effort_data, :sns_client

  def subject
    "Update for #{effort_data[:full_name]} at #{effort_data[:event_name]} from OpenSplitTime"
  end

  def message
    <<-MESSAGE
The following new times were reported for #{effort_data[:full_name]} at #{effort_data[:event_name]}:
  #{times_text}

Full results for #{effort_data[:full_name]} here: https://www.opensplittime.org/efforts/#{effort_data[:effort_slug]}
Full results for #{effort_data[:event_name]} here: https://www.opensplittime.org/events/#{effort_data[:event_slug]}/spread

Thank you for using OpenSplitTime!
    MESSAGE
  end
{'fraction_non_alphanumeric': 0.109375, 'fraction_numerical': 0.0, 'mean_word_length': 4.554216867469879, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '5087468', 'n_tokens_mistral': 768, 'n_tokens_neox': 753, 'n_words': 179}