<commit_before>class Shim::PagesController < ActionController::Base
  unloadable
  layout Proc.new { |_| Shim.layout }

  rescue_from ActionView::MissingTemplate do |exception|
    if exception.message =~ %r{Missing template #{content_path}}
      raise ActionController::RoutingError, "No such page: #{params[:id]}"
    else
      raise exception
    end
  end

  def show
    render :template => current_page
  end

  protected

  def current_page
    "#{content_path}#{clean_path}"
  end

  def clean_path
    path = Pathname.new "/#{params[:id]}"
    path.cleanpath.to_s[1..-1]
  end

  def content_path
    Shim.content_path
  end
end
<commit_msg>we conflict with newrelic's shim module<commit_after>class Shim::PagesController < ActionController::Base
  unloadable
  layout Proc.new { |_| ::Shim.layout }

  rescue_from ActionView::MissingTemplate do |exception|
    if exception.message =~ %r{Missing template #{content_path}}
      raise ActionController::RoutingError, "No such page: #{params[:id]}"
    else
      raise exception
    end
  end

  def show
    render :template => current_page
  end

  protected

  def current_page
    "#{content_path}#{clean_path}"
  end

  def clean_path
    path = Pathname.new "/#{params[:id]}"
    path.cleanpath.to_s[1..-1]
  end

  def content_path
    ::Shim.content_path
  end
end

{'fraction_non_alphanumeric': 0.10719640179910045, 'fraction_numerical': 0.0029985007496251873, 'mean_word_length': 3.5408163265306123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2259042', 'n_tokens_mistral': 437, 'n_tokens_neox': 428, 'n_words': 105}