<commit_before>define :asdf_plugin do
  execute "asdf plugin-add #{params[:name]}" do
    user node[:user]
    not_if "test -d ~/.asdf/plugins/#{params[:name]}"
    notifies :run, 'execute[import-release-team-keyring]'
  end

  execute 'import-release-team-keyring' do
    command 'bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring'
    user node[:user]
    action :nothing
    only_if { params[:name] == 'nodejs' }
  end
end

define :asdf, version: nil do
  execute "asdf install #{params[:name]} #{params[:version]}" do
    user node[:user]
    not_if "test -d ~/.asdf/installs/#{params[:name]}/#{params[:version]}"
  end

  execute "asdf global #{params[:name]} #{params[:version]}" do
    user node[:user]
    not_if "test -d ~/.asdf/installs/#{params[:name]}/#{params[:version]}"
  end
end

link File.expand_path('~/.asdfrc') do
  to File.expand_path('../files/.asdfrc', __FILE__)
  user node[:user]
  force true
end

asdf_plugin 'nodejs'
asdf_plugin 'ruby'
asdf_plugin 'terraform'
asdf_plugin 'golang'

link File.expand_path('~/.default-gems') do
  to File.expand_path('../files/.default-gems', __FILE__)
  user node[:user]
  force true
end

link File.expand_path('~/.gemrc') do
  to File.expand_path('../files/.gemrc', __FILE__)
  user node[:user]<commit_msg>Fix not run asdf global command<commit_after>define :asdf_plugin do
  execute "asdf plugin-add #{params[:name]}" do
    user node[:user]
    not_if "test -d ~/.asdf/plugins/#{params[:name]}"
    notifies :run, 'execute[import-release-team-keyring]'
  end

  execute 'import-release-team-keyring' do
    command 'bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring'
    user node[:user]
    action :nothing
    only_if { params[:name] == 'nodejs' }
  end
end

define :asdf, version: nil do
  execute "asdf install #{params[:name]} #{params[:version]}" do
    user node[:user]
    not_if "test -d ~/.asdf/installs/#{params[:name]}/#{params[:version]}"
  end

  execute "asdf global #{params[:name]} #{params[:version]}" do
    user node[:user]
    not_if "asdf current #{params[:name]} | grep #{params[:version]}"
  end
end

link File.expand_path('~/.asdfrc') do
  to File.expand_path('../files/.asdfrc', __FILE__)
  user node[:user]
  force true
end

asdf_plugin 'nodejs'
asdf_plugin 'ruby'
asdf_plugin 'terraform'
asdf_plugin 'golang'

link File.expand_path('~/.default-gems') do
  to File.expand_path('../files/.default-gems', __FILE__)
  user node[:user]
  force true
end

link File.expand_path('~/.gemrc') do
  to File.expand_path('../files/.gemrc', __FILE__)
  user node[:user]
{'fraction_non_alphanumeric': 0.1723196881091618, 'fraction_numerical': 0.0, 'mean_word_length': 4.101391650099403, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2194944', 'n_tokens_mistral': 934, 'n_tokens_neox': 917, 'n_words': 212}