<commit_before>dep 'rbenv' do
  requires \
    'rbenv cloned',
    'rbenv path',
    'rbenv init',
    'ruby-build.managed', # allows installing ruby version through 'rbenv install #version'
    'rbenv version'
end

dep 'rbenv cloned' do
  met? {
    p "#{ENV['HOME']}/.rbenv"
    "#{ENV['HOME']}/.rbenv".p.exists?
  }

  meet {
    log_shell "Cloning rbenv", "git clone https://github.com/sstephenson/rbenv.git #{ENV['HOME']}/.rbenv"
  }
end

dep 'rbenv init' do
  init_string = "eval \"$(rbenv init -)\""

  met? {
    shell("cat #{ENV['HOME']}/.bash_profile").include?(init_string)
  }

  meet {
    log_shell "Add init to .bash_profile", "echo '#{init_string}' >> ~/.bash_profile"
    shell '$HOME/.rbenv/bin/rbenv init'
  }
end

dep 'rbenv path' do
  export_string = "export PATH=$HOME/.rbenv/bin:$PATH"

  met? {
    shell("cat #{ENV['HOME']}/.bash_profile").include?(export_string)
  }

  meet {
    log_shell "Add rbenv to PATH", "echo '#{export_string}' >> ~/.bash_profile"
    shell export_string
    p shell "echo $PATH"
  }
end


dep 'ruby-build.managed'

dep 'rbenv ruby', :version do
  requires \
    'rbenv'

  version.default!('2.0.0-p247')

  # write version into ~/.rbenv/version
  met? {
    "#{ENV['HOME']}/.rbenv/versions/#{version}".p.exists?
  }

  meet {
    log_shell "Installing ruby", "PATH=$HOME/.rbenv/bin:$PATH rbenv install #{version}"
  }
end

dep 'bundler' do
  met? { in_path? 'bundle'}
  meet { shell 'gem install bundler' }
end
<commit_msg>removed not written dep in rbenv.rb<commit_after>dep 'rbenv' do
  requires \
    'rbenv cloned',
    'rbenv path',
    'rbenv init',
    'ruby-build.managed' # allows installing ruby version through 'rbenv install #version'
end

dep 'rbenv cloned' do
  met? {
    p "#{ENV['HOME']}/.rbenv"
    "#{ENV['HOME']}/.rbenv".p.exists?
  }

  meet {
    log_shell "Cloning rbenv", "git clone https://github.com/sstephenson/rbenv.git #{ENV['HOME']}/.rbenv"
  }
end

dep 'rbenv init' do
  init_string = "eval \"$(rbenv init -)\""

  met? {
    shell("cat #{ENV['HOME']}/.bash_profile").include?(init_string)
  }

  meet {
    log_shell "Add init to .bash_profile", "echo '#{init_string}' >> ~/.bash_profile"
    shell '$HOME/.rbenv/bin/rbenv init'
  }
end

dep 'rbenv path' do
  export_string = "export PATH=$HOME/.rbenv/bin:$PATH"

  met? {
    shell("cat #{ENV['HOME']}/.bash_profile").include?(export_string)
  }

  meet {
    log_shell "Add rbenv to PATH", "echo '#{export_string}' >> ~/.bash_profile"
    shell export_string
    p shell "echo $PATH"
  }
end


dep 'ruby-build.managed'

dep 'rbenv ruby', :version do
  requires \
    'rbenv'

  version.default!('2.0.0-p247')

  # write version into ~/.rbenv/version
  met? {
    "#{ENV['HOME']}/.rbenv/versions/#{version}".p.exists?
  }

  meet {
    log_shell "Installing ruby", "PATH=$HOME/.rbenv/bin:$PATH rbenv install #{version}"
  }
end

dep 'bundler' do
  met? { in_path? 'bundle'}
  meet { shell 'gem install bundler' }
end

{'fraction_non_alphanumeric': 0.17880121909922114, 'fraction_numerical': 0.004063664070436844, 'mean_word_length': 3.2626262626262625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '270038', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1148, 'n_words': 255}