<commit_before>class EventSerializer < ActiveModel::Serializer

  self.root = false

  attributes :id, :event_date, :event_datetime, :event_title, :event_description,
             :event_author, :event_type, :event_url

  def default_url_options
    { :host => Setting.host_name, :protocol => Setting.protocol }
  end

  def event_author
    object.author.to_s
  end

  def event_url
    url_for default_url_options.merge(object.event_url)
  end
end<commit_msg>fixed EventSerializer (event_author and event_url)<commit_after>class EventSerializer < ActiveModel::Serializer

  self.root = false

  attributes :id, :event_date, :event_datetime, :event_title, :event_description,
             :event_author, :event_type, :event_url

  def default_url_options
    { :host => Setting.host_name, :protocol => Setting.protocol }
  end

  def event_author
    object.event_author.to_s
  end

  def event_url
    url_for object.event_url(default_url_options)
  end
end
{'fraction_non_alphanumeric': 0.08446298227320125, 'fraction_numerical': 0.0, 'mean_word_length': 4.274725274725275, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4651083', 'n_tokens_mistral': 308, 'n_tokens_neox': 296, 'n_words': 65}