<commit_before>require "puppet"
require "rubygems"

module PuppetCatalogTest
  class Puppet3xAdapter < BasePuppetAdapter
    def initialize(config)
      super(config)

      require 'puppet/test/test_helper'
      parser = config[:parser]

      # initialize was added in 3.1.0
      if Gem::Version.new(version) > Gem::Version.new('3.1.0')
        Puppet::Test::TestHelper.initialize
      end

      Puppet::Test::TestHelper.before_all_tests
      
      Puppet::Node::Environment.new.modules_by_path.each do |_, mod|
        mod.entries.each do |entry|
          ldir = entry.plugin_directory
          $LOAD_PATH << ldir unless $LOAD_PATH.include?(ldir)
        end<commit_msg>Add missing init_config to initialize<commit_after>require "puppet"
require "rubygems"

module PuppetCatalogTest
  class Puppet3xAdapter < BasePuppetAdapter
    def initialize(config)
      super(config)

      require 'puppet/test/test_helper'
      parser = config[:parser]

      init_config
      
      # initialize was added in 3.1.0
      if Gem::Version.new(version) > Gem::Version.new('3.1.0')
        Puppet::Test::TestHelper.initialize
      end

      Puppet::Test::TestHelper.before_all_tests
      
      Puppet::Node::Environment.new.modules_by_path.each do |_, mod|
        mod.entries.each do |entry|
          ldir = entry.plugin_directory
          $LOAD_PATH << ldir unless $LOAD_PATH.include?(ldir)
        end
{'fraction_non_alphanumeric': 0.10191082802547771, 'fraction_numerical': 0.009907997169143666, 'mean_word_length': 2.8953168044077136, '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': '2889838', 'n_tokens_mistral': 454, 'n_tokens_neox': 449, 'n_words': 84}