<commit_before>require 'compass'
require "compass-rails/version"
require "compass-rails/configuration"

module CompassRails

    RAILS_32 = %r{^3.2}
    RAILS_31 = %r{^3.1}
    RAILS_23 = %r{^2.3}
    RAILS_3 = %r{^3.0}

    extend self

    def load_rails
      return if defined?(::Rails) && !::Rails.application.nil?
      rails_config_path = Dir.pwd
      until File.exists?(File.join(rails_config_path, 'config', 'application.rb')) do
        raise 'Rails application not found' if rails_config_path == '/'
        rails_config_path = File.join(rails_config_path, '..')
      end
      #load the rails config
      require "#{rails_config_path}/config/application.rb"
      if rails31? || rails32?
        require 'sass-rails'
        require 'sprockets/railtie'
        require 'rails/engine'
        @app ||= ::Rails.application.initialize!(:assets)
      end<commit_msg>Handle a half-loaded rails module.<commit_after>require 'compass'
require "compass-rails/version"
require "compass-rails/configuration"

module CompassRails

    RAILS_32 = %r{^3.2}
    RAILS_31 = %r{^3.1}
    RAILS_23 = %r{^2.3}
    RAILS_3 = %r{^3.0}

    extend self

    def load_rails
      return if defined?(::Rails) && ::Rails.respond_to?(:application) && !::Rails.application.nil?

      rails_config_path = Dir.pwd
      until File.exists?(File.join(rails_config_path, 'config', 'application.rb')) do
        raise 'Rails application not found' if rails_config_path == '/'
        rails_config_path = File.join(rails_config_path, '..')
      end
      #load the rails config
      require "#{rails_config_path}/config/application.rb"
      if rails31? || rails32?
        require 'sass-rails'
        require 'sprockets/railtie'
        require 'rails/engine'
        @app ||= ::Rails.application.initialize!(:assets)
      end
{'fraction_non_alphanumeric': 0.13388429752066117, 'fraction_numerical': 0.0209366391184573, 'mean_word_length': 3.0266075388026605, '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': '7279330', 'n_tokens_mistral': 657, 'n_tokens_neox': 614, 'n_words': 122}