<commit_before>require 'bundler'

namespace :udaeta do
  task :check_dependencies => 'rubycas_server:check_dependencies'

  task :install_dependencies => 'rubycas_server:install_dependencies'

  namespace :rubycas_server do
    DESIRED_RUBY = '1.8.7'
    DESIRED_BUNDLER = '=1.0.7'
    DESIRED_GEMSET = 'castanet'
    RVM_SPEC = "#{DESIRED_RUBY}@#{DESIRED_GEMSET}"

    task :check_dependencies => [:check_rvm, :check_ruby, :check_gemset]

    task :install_dependencies => [:install_ruby, :create_gemset, :install_bundle]

    # ---

    task :check_rvm do
      `type rvm`

      if $?.to_i != 0
        fail %Q{
  RVM was not detected on your system.
  For installation and troubleshooting instructions, see http://rvm.beginrescueend.com.
        }
      else
        $stderr.puts 'RVM present.'
      end<commit_msg>Fixed RVM detection with bash 4 + Ruby 1.9.2.<commit_after>require 'bundler'

namespace :udaeta do
  task :check_dependencies => 'rubycas_server:check_dependencies'

  task :install_dependencies => 'rubycas_server:install_dependencies'

  namespace :rubycas_server do
    DESIRED_RUBY = '1.8.7'
    DESIRED_BUNDLER = '=1.0.7'
    DESIRED_GEMSET = 'castanet'
    RVM_SPEC = "#{DESIRED_RUBY}@#{DESIRED_GEMSET}"

    task :check_dependencies => [:check_rvm, :check_ruby, :check_gemset]

    task :install_dependencies => [:install_ruby, :create_gemset, :install_bundle]

    # ---

    task :check_rvm do
      system 'sh -c "type rvm"'

      if $?.to_i != 0
        fail %Q{
  RVM was not detected on your system.
  For installation and troubleshooting instructions, see http://rvm.beginrescueend.com.
        }
      else
        $stderr.puts 'RVM present.'
      end
{'fraction_non_alphanumeric': 0.11203319502074689, 'fraction_numerical': 0.01066982809721399, 'mean_word_length': 3.350515463917526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1882816', 'n_tokens_mistral': 635, 'n_tokens_neox': 576, 'n_words': 131}