<commit_before>module RailsAdmin
  module Bootstrap
    class FrameworkNotFound < StandardError; end

    # Inspired by Kaminari
    def self.load!
      if compass?
        require 'rails_admin/bootstrap-sass/compass_functions'
        register_compass_extension
      elsif asset_pipeline?
        require 'rails_admin/bootstrap-sass/sass_functions'
      end

      require 'sass-rails' if rails?

      unless rails? || compass?
        raise(Bootstrap::FrameworkNotFound.new('bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded'))
      end

      if defined?(::Sass) && ::Sass.respond_to?(:load_paths)
        stylesheets = File.expand_path(File.join('..', 'vendor', 'assets', 'stylesheets'))
        ::Sass.load_paths << stylesheets
      end
    end

    def self.asset_pipeline?
      defined?(::Sprockets)
    end

    def self.compass?<commit_msg>Updating sass-rails reference I missed<commit_after>module RailsAdmin
  module Bootstrap
    class FrameworkNotFound < StandardError; end

    # Inspired by Kaminari
    def self.load!
      if compass?
        require 'rails_admin/bootstrap-sass/compass_functions'
        register_compass_extension
      elsif asset_pipeline?
        require 'rails_admin/bootstrap-sass/sass_functions'
      end

      require 'sassc-rails' if rails?

      unless rails? || compass?
        raise(Bootstrap::FrameworkNotFound.new('bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded'))
      end

      if defined?(::Sass) && ::Sass.respond_to?(:load_paths)
        stylesheets = File.expand_path(File.join('..', 'vendor', 'assets', 'stylesheets'))
        ::Sass.load_paths << stylesheets
      end
    end

    def self.asset_pipeline?
      defined?(::Sprockets)
    end

    def self.compass?
{'fraction_non_alphanumeric': 0.0992239467849224, 'fraction_numerical': 0.0022172949002217295, 'mean_word_length': 2.9757709251101323, 'pattern_counts': {'":': 0, '<': 9, '<?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': '226248', 'n_tokens_mistral': 553, 'n_tokens_neox': 521, 'n_words': 125}