<commit_before># The controller for serving/cacheing theme content...
#
class ThemeController < ActionController::Base

  after_filter :cache_theme_files
  
  def stylesheets
    render_theme_item(:stylesheets, params[:filename].to_s, params[:theme], 'text/css')
  end

  def javascript
    render_theme_item(:javascript, params[:filename].to_s, params[:theme], 'text/javascript')
  end

  def images
    render_theme_item(:images, params[:filename].to_s, params[:theme])
  end

  def error
    render :nothing => true, :status => 404
  end
  
  private
  
  def render_theme_item(type, file, theme, mime = mime_for(file))
    render :text => "Not Found", :status => 404 and return if file.split(%r{[\\/]}).include?("..")<commit_msg>Updated ThemeController. Replaced calls to to_s with join('/') so that files located in subdirectories of /stylesheets, etc are accessible.<commit_after># The controller for serving/cacheing theme content...
#
class ThemeController < ActionController::Base

  after_filter :cache_theme_files
  
  def stylesheets
    render_theme_item(:stylesheets, params[:filename].join('/'), params[:theme], 'text/css')
  end

  def javascript
    render_theme_item(:javascript, params[:filename].join('/'), params[:theme], 'text/javascript')
  end

  def images
    render_theme_item(:images, params[:filename].join('/'), params[:theme])
  end

  def error
    render :nothing => true, :status => 404
  end
  
  private
  
  def render_theme_item(type, file, theme, mime = mime_for(file))
    render :text => "Not Found", :status => 404 and return if file.split(%r{[\\/]}).include?("..")
{'fraction_non_alphanumeric': 0.13939016801493467, 'fraction_numerical': 0.0074673304293715, 'mean_word_length': 4.469387755102041, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6851800', 'n_tokens_mistral': 512, 'n_tokens_neox': 475, 'n_words': 131}