<commit_before>%w(rbenv::default
   rbenv::ruby_build
   rbenv-gemset).each do |recipe|
  include_recipe recipe
end

node['rbenv']['rubies'].each do |ver|
  rbenv_ruby ver
end<commit_msg>add recipe to install rbenv gemsets<commit_after>%w(rbenv::default
   rbenv::ruby_build
   rbenv-gemset).each do |recipe|
  include_recipe recipe
end

node['rbenv']['rubies'].each do |ver|
  rbenv_ruby ver
end

def install_rbenv_gemset(ruby_ver, gemset_name, gems)
  user node['rbenv']['user']
  cwd '/tmp'
  code <<-SH
    tmp_dir=`mktemp -d rbenv_gemset_tmp.XXXXXXXXXX`
    pushd $tmp_dir
    rbenv gemset create #{ruby_ver} #{gemset_name}
    rbenv local #{ruby_ver}
    rbenv gemset init #{gemset_name}
    gem install #{gems.join(' ')}

    rm -r $tmp_dir
  SH
end

bash 'rbenv gemsets install' do
  if node['rbenv']['gemsets']
    node['rbenv']['gemsets'].each do |ver, sets|
      sets.each do |gemset_name, gems|
        install_rbenv_gemset(ver, gemset_name, gems)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.12753036437246965, 'fraction_numerical': 0.0, 'mean_word_length': 4.020304568527918, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '5767354', 'n_tokens_mistral': 406, 'n_tokens_neox': 392, 'n_words': 89}