<commit_before>module ActionView
  
  class Base
    
    def tidy_javascripts
      @tidy_javascripts ||= []
      tidy_places.each do |javascript|
        @tidy_javascripts << javascript if File.exists? "#{Dir.pwd}/public/javascripts/#{javascript}.js"
      end
      @tidy_javascripts
    end

    def tidy_stylesheets
      @tidy_stylesheets ||= []
      tidy_places.each do |stylesheet|
        @tidy_stylesheets << stylesheet if File.exists? "#{Dir.pwd}/public/stylesheets/#{stylesheet}.css"
      end
      @tidy_stylesheets
    end
    
    private
    
    def tidy_places
      unless @tidy_places
        @tidy_places = ["#{controller.controller_path}/_controller", @tidy_template]
        @tidy_places.insert(0, @tidy_layout) if @tidy_layout
        @tidy_places << @tidy_partials if @tidy_partials
      end
      @tidy_places
    end
    
  end

  module Partials
    
    def _render_partial_with_capture(options, &block)
      @tidy_partials ||= []
      @tidy_partials << options[:partial] unless @tidy_partials.include?(options[:partial])
      _render_partial_without_capture(options, &block)
    end
    
    alias_method_chain :_render_partial, :capture
    
  end<commit_msg>Fix loading of CSS and Javascript files with regard to partials for Rails 3.0.8 compatibility.<commit_after>module ActionView
  
  class Base
    
    def tidy_javascripts
      @tidy_javascripts ||= []
      tidy_places.each do |javascript|
        @tidy_javascripts << javascript if File.exists? "#{Dir.pwd}/public/javascripts/#{javascript}.js"
      end
      @tidy_javascripts
    end

    def tidy_stylesheets
      @tidy_stylesheets ||= []
      tidy_places.each do |stylesheet|
        @tidy_stylesheets << stylesheet if File.exists? "#{Dir.pwd}/public/stylesheets/#{stylesheet}.css"
      end
      @tidy_stylesheets
    end
    
    private
    
    def tidy_places
      unless @tidy_places
        @tidy_places = ["#{controller.controller_path}/_controller", @tidy_template]
        @tidy_places.insert(0, @tidy_layout) if @tidy_layout
        @tidy_places += @tidy_partials if @tidy_partials
      end
      @tidy_places
    end
    
  end

  module Partials
    
    def _render_partial_with_capture(options, &block)
      @tidy_partials ||= []
      parts = options[:partial].split("/")
      parts.insert(0, controller_name) unless parts.length > 1
      parts[-1] = "_#{parts[-1]}"
      partial = parts.join("/")
      @tidy_partials << partial unless @tidy_partials.include?(partial)
      _render_partial_without_capture(options, &block)
    end
    
    alias_method_chain :_render_partial, :capture
    
  end
{'fraction_non_alphanumeric': 0.10125618576322802, 'fraction_numerical': 0.0034259611724400457, 'mean_word_length': 2.847730600292826, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 4, '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': '3768857', 'n_tokens_mistral': 880, 'n_tokens_neox': 839, 'n_words': 162}