<commit_before>#!/bin/bash

# Install latest version of facter 
gem install bundler
bundle install --path vendor/bundler
operatingsystem=$(bundle exec facter operatingsystem)
operatingsystemmajrelease=$(bundle exec facter operatingsystemmajrelease)
architecture=$(bundle exec facter architecture)

for version in 1.6.0 1.7.0 2.0.0 2.1.0 2.2.0 2.3.0; do
  FACTER_GEM_VERSION="~> ${version}" bundle update
  minor_version=$(echo $version | cut -c1-3)
  output_dir="/vagrant/facts/${minor_version}"
  mkdir -p $output_dir
  FACTER_GEM_VERSION="~> ${version}" bundle exec facter | tee "${output_dir}/${operatingsystem}-${operatingsystemmajrelease}-${architecture}.facts"
done<commit_msg>Lowercase operatingsystem in get_facts.sh<commit_after>#!/bin/bash

# Install latest version of facter 
gem install bundler
bundle install --path vendor/bundler
operatingsystem=$(bundle exec facter operatingsystem | tr '[:upper:]' '[:lower:]')
operatingsystemmajrelease=$(bundle exec facter operatingsystemmajrelease)
architecture=$(bundle exec facter architecture)

for version in 1.6.0 1.7.0 2.0.0 2.1.0 2.2.0 2.3.0; do
  FACTER_GEM_VERSION="~> ${version}" bundle update
  minor_version=$(echo $version | cut -c1-3)
  output_dir="/vagrant/facts/${minor_version}"
  mkdir -p $output_dir
  FACTER_GEM_VERSION="~> ${version}" bundle exec facter | tee "${output_dir}/${operatingsystem}-${operatingsystemmajrelease}-${architecture}.facts"
done
{'fraction_non_alphanumeric': 0.13633169360505973, 'fraction_numerical': 0.028109627547434995, 'mean_word_length': 6.014778325123153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '595508', 'n_tokens_mistral': 516, 'n_tokens_neox': 484, 'n_words': 115}