<commit_before>require 'facter'
require 'json'

module RspecPuppetFacts

  def on_supported_os(supported_os = RspecPuppetFacts.meta_supported_os)
    h = {}
    supported_os.map do |os_sup|
      puts "Processing #{os_sup}"
      facts = {}
      # TODO: use SemVer here
      facter_minor_version = Facter.version[0..2]
      file = File.expand_path(File.join(File.dirname(__FILE__), "../facts/#{facter_minor_version}/#{os_sup}.facts"))
      puts "file = #{file}"
      File.read(file).each_line do |line|
        key, value = line.split(' => ')
        facts[key.to_sym] = value.chomp unless value.nil?
      end
      h[os_sup] = facts
    end
    h
  end

  # @api private
  def self.meta_supported_os
    @meta_supported_os ||= get_meta_supported_os
  end<commit_msg>Remove debug<commit_after>require 'facter'
require 'json'

module RspecPuppetFacts

  def on_supported_os(supported_os = RspecPuppetFacts.meta_supported_os)
    h = {}
    supported_os.map do |os_sup|
      facts = {}
      # TODO: use SemVer here
      facter_minor_version = Facter.version[0..2]
      file = File.expand_path(File.join(File.dirname(__FILE__), "../facts/#{facter_minor_version}/#{os_sup}.facts"))
      File.read(file).each_line do |line|
        key, value = line.split(' => ')
        facts[key.to_sym] = value.chomp unless value.nil?
      end
      h[os_sup] = facts
    end
    h
  end

  # @api private
  def self.meta_supported_os
    @meta_supported_os ||= get_meta_supported_os
  end
{'fraction_non_alphanumeric': 0.12204989885367498, 'fraction_numerical': 0.0026972353337828725, 'mean_word_length': 3.0657534246575344, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3711462', 'n_tokens_mistral': 531, 'n_tokens_neox': 522, 'n_words': 98}