<commit_before>require 'pavlov'
require 'cgi'

class FactUrl

  def initialize fact
    @fact = fact
  end

  def fact_url
    full_url "facts/#{@fact.id}"
  end

  def friendly_fact_url
    slug = Pavlov.query :"facts/slug", @fact, nil
    full_url "#{slug}/f/#{@fact.id}"
  end

  def proxy_scroll_url
    return unless @fact.site_url

    proxy_url + "/?url=" +
      CGI.escape(@fact.site_url) + "&scrollto=" + URI.escape(@fact.id)
  end

  private

  def full_url uri
    URI.join(application_url, uri).to_s
  end

  def application_url
    FactlinkUI::Application.config.core_url
  end

  def proxy_url
    FactlinkUI::Application.config.proxy_url
  end

end<commit_msg>Break line on another place<commit_after>require 'pavlov'
require 'cgi'

class FactUrl

  def initialize fact
    @fact = fact
  end

  def fact_url
    full_url "facts/#{@fact.id}"
  end

  def friendly_fact_url
    slug = Pavlov.query :"facts/slug", @fact, nil
    full_url "#{slug}/f/#{@fact.id}"
  end

  def proxy_scroll_url
    return unless @fact.site_url

    proxy_url + "/?url=" + CGI.escape(@fact.site_url) +
      "&scrollto=" + URI.escape(@fact.id)
  end

  private

  def full_url uri
    URI.join(application_url, uri).to_s
  end

  def application_url
    FactlinkUI::Application.config.core_url
  end

  def proxy_url
    FactlinkUI::Application.config.proxy_url
  end

end
{'fraction_non_alphanumeric': 0.11127379209370425, 'fraction_numerical': 0.0, 'mean_word_length': 3.180428134556575, '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': '7030623', 'n_tokens_mistral': 521, 'n_tokens_neox': 494, 'n_words': 111}