<commit_before>package :rbenv do
  description 'Install rbenv Ruby version manager'

  requires :install_rbenv, :install_ruby_build, :install_ruby, :add_rbenv_bundler
end

package :install_rbenv do
  description 'Install rbenv Ruby version manager'

  requires :git

  runner "true; git clone git://github.com/sstephenson/rbenv.git ~/.rbenv"
  push_text 'export PATH="$HOME/.rbenv/bin:$PATH"', "~/.bash_profile"
  push_text 'eval "$(rbenv init -)"', "~/.bash_profile"
  #runner "chown #{user} #{home_path}/.bash_profile"
  #runner "chmod -R g+rwxXs ~/.rbenv"

  verify do
    has_executable "~/.rbenv/bin/rbenv"
  end
end

package :install_ruby_build do
  description 'Install lib to build rubies'

  requires :git

  runner "rm -rf ~/.rbenv/plugins/ruby-build"
  runner "true; git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build"

  verify do
    @commands << "~/.rbenv/bin/rbenv install|grep Usage"
  end
end

package :ruby_dependencies do
  description 'Setup Ruby dependencies'
  apt 'libssl-dev zlib1g-dev libreadline-dev libpq-dev libyaml-dev build-essential flex gettext libxslt1-dev libxml2-dev' do
    pre :install, ['aptitude update']
  end

  verify do
    has_apt 'libssl-dev'
    has_apt 'zlib1g-dev'
    has_apt 'libreadline-dev'
    has_apt 'libpq-dev'
    has_apt 'libyaml-dev'
    has_apt 'build-essential'
    has_apt 'flex'
    has_apt 'gettext'
  end
end

package :install_ruby do
  description 'Install Ruby'
  version '2.1.5'
  requires :install_ruby_build, :ruby_dependencies<commit_msg>Add dependency<commit_after>package :rbenv do
  description 'Install rbenv Ruby version manager'

  requires :install_rbenv, :install_ruby_build, :install_ruby, :add_rbenv_bundler
end

package :install_rbenv do
  description 'Install rbenv Ruby version manager'

  requires :git

  runner "true; git clone git://github.com/sstephenson/rbenv.git ~/.rbenv"
  push_text 'export PATH="$HOME/.rbenv/bin:$PATH"', "~/.bash_profile"
  push_text 'eval "$(rbenv init -)"', "~/.bash_profile"
  #runner "chown #{user} #{home_path}/.bash_profile"
  #runner "chmod -R g+rwxXs ~/.rbenv"

  verify do
    has_executable "~/.rbenv/bin/rbenv"
  end
end

package :install_ruby_build do
  description 'Install lib to build rubies'

  requires :git

  runner "rm -rf ~/.rbenv/plugins/ruby-build"
  runner "true; git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build"

  verify do
    @commands << "~/.rbenv/bin/rbenv install|grep Usage"
  end
end

package :ruby_dependencies do
  description 'Setup Ruby dependencies'
  apt 'libssl-dev zlib1g-dev libreadline-dev libpq-dev libyaml-dev build-essential flex gettext libxslt1-dev libxml2-dev' do
    pre :install, ['aptitude update']
  end

  verify do
    has_apt 'libxml2-dev'
    has_apt 'libssl-dev'
    has_apt 'zlib1g-dev'
    has_apt 'libreadline-dev'
    has_apt 'libpq-dev'
    has_apt 'libyaml-dev'
    has_apt 'build-essential'
    has_apt 'flex'
    has_apt 'gettext'
  end
end

package :install_ruby do
  description 'Install Ruby'
  version '2.1.5'
  requires :install_ruby_build, :ruby_dependencies
{'fraction_non_alphanumeric': 0.11603985856637737, 'fraction_numerical': 0.0048216007714561235, 'mean_word_length': 3.9475357710651826, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '4356121', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1117, 'n_words': 282}