<commit_before>require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  namespace :thinking_sphinx do
    desc 'Installs sphinx and thinking_sphinx'
    task :install, :roles => :app do
      puts 'Installing thinking_sphinx'
      utilities.apt_upgrade
      utilities.apt_install 'build-essential libmysqlclient15-dev libmysql++-dev'
      run "cd /tmp; #{sudo} wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz"
      run "cd /tmp; #{sudo} tar xvzf sphinx-0.9.8.1.tar.gz"
      run "cd /tmp/sphinx-0.9.8.1/; ./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql"
      run "cd /tmp/sphinx-0.9.8.1/; #{sudo} make; #{sudo} make install"
      sudo "gem install thinking-sphinx --source http://gemcutter.org --no-ri --no-rdoc"
    end
  end
end<commit_msg>added sudo for configure for thinking_sphinx install<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  namespace :thinking_sphinx do
    desc 'Installs sphinx and thinking_sphinx'
    task :install, :roles => :app do
      puts 'Installing thinking_sphinx'
      utilities.apt_upgrade
      utilities.apt_install 'build-essential libmysqlclient15-dev libmysql++-dev'
      run "cd /tmp; #{sudo} wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz"
      run "cd /tmp; #{sudo} tar xvzf sphinx-0.9.8.1.tar.gz"
      run "cd /tmp/sphinx-0.9.8.1/; #{sudo} ./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql"
      run "cd /tmp/sphinx-0.9.8.1/; #{sudo} make; #{sudo} make install"
      sudo "gem install thinking-sphinx --source http://gemcutter.org --no-ri --no-rdoc"
    end
  end
end
{'fraction_non_alphanumeric': 0.15362971299943726, 'fraction_numerical': 0.020258863252673044, 'mean_word_length': 3.2535885167464116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5388482', 'n_tokens_mistral': 674, 'n_tokens_neox': 645, 'n_words': 134}