<commit_before>require 'yaml'

begin
  require 'sprockets/railtie'

  module AutoprefixedRails
    class Railtie < ::Rails::Railtie
      rake_tasks do |app|
        require 'rake/autoprefixer_tasks'
        Rake::AutoprefixerTasks.new( config(app.root)[0] )
      end

      config.assets.configure do |env|
        AutoprefixerRails.install(env, *config(env.root))
      end

      # Read browsers requirements from application config
      def config(root)
        file   = File.join(root, 'config/autoprefixer.yml')
        params = File.exist?(file) ? ::YAML.load_file(file).symbolize_keys : { }

        opts   = { }
        opts[:safe] = true if params.delete(:safe)

        if params[:browsers]
          ActiveSupport::Deprecation.warn(
            'browsers key in config/autoprefixer.yml was deprecated. ' +
            'Use browserslist config.')
        end

        [params, opts]
      end
    end
  end
rescue LoadError
end
<commit_msg>Support Rails 3.2, still<commit_after>require 'yaml'

begin
  require 'sprockets/railtie'

  module AutoprefixedRails
    class Railtie < ::Rails::Railtie
      rake_tasks do |app|
        require 'rake/autoprefixer_tasks'
        Rake::AutoprefixerTasks.new( config(app.root)[0] )
      end

      if config.respond_to?(:assets)
        config.assets.configure do |env|
          AutoprefixerRails.install(env, *config(env.root))
        end
      else
        initializer :setup_autoprefixer, group: :all do |app|
          AutoprefixerRails.install(app.assets, *config(app.root))
        end
      end

      # Read browsers requirements from application config
      def config(root)
        file   = File.join(root, 'config/autoprefixer.yml')
        params = File.exist?(file) ? ::YAML.load_file(file).symbolize_keys : { }

        opts   = { }
        opts[:safe] = true if params.delete(:safe)

        if params[:browsers]
          ActiveSupport::Deprecation.warn(
            'browsers key in config/autoprefixer.yml was deprecated. ' +
            'Use browserslist config.')
        end

        [params, opts]
      end
    end
  end
rescue LoadError
end

{'fraction_non_alphanumeric': 0.10273327049952875, 'fraction_numerical': 0.001885014137606032, 'mean_word_length': 2.3591772151898733, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6939185', 'n_tokens_mistral': 692, 'n_tokens_neox': 671, 'n_words': 144}