<commit_before>set :application, "firefly"
set :repository,  "git://github.com/ariejan/firefly.git"

set :scm, :git
set :user, 'root'
set :deploy_to, "/var/rails/#{application}"

role :web, "aj.gs"
role :app, "aj.gs"
role :db, "aj.gs", :primary => true

set :keep_releases, 3
after "deploy", "deploy:cleanup"

namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end<commit_msg>Updated deploy script<commit_after>set :application, "firefly"
set :repository,  "git://github.com/ariejan/firefly.git"

set :scm, :git
set :user, 'root'
set :deploy_to, "/var/rails/#{application}"

set :rails_env, 'production'

role :web, "aj.gs"
role :app, "aj.gs"
role :db, "aj.gs", :primary => true

set :keep_releases, 3
after "deploy", "deploy:cleanup"
after "deploy:update", "deploy:database"
after "deploy:update", "deploy:configure"
after "deploy:update", "deploy:bundle"
after "deploy:update", "deploy:chown"

namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
    run "#{try_sudo} /etc/init.d/varnish restart"
  end
  task :configure, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} cp #{shared_path}/config.ru #{release_path}/config.ru"
  end
  task :database, :roles => :db, :except => { :no_release => true } do
    run "#{try_sudo} ln -sf #{shared_path}/firefly_#{rails_env}.sqlite3 #{release_path}/firefly_#{rails_env}.sqlite3"
  end  
  task :bundle do
    run "cd #{release_path} ; #{try_sudo} bundle install"
    run "#{try_sudo} chown -R www-data:www-data #{release_path}/.bundle"
  end
  task :chown do
    run "#{try_sudo} chown -RL www-data:www-data #{release_path}"
  end
end
{'fraction_non_alphanumeric': 0.17875647668393782, 'fraction_numerical': 0.002072538860103627, 'mean_word_length': 4.646198830409356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '6911616', 'n_tokens_mistral': 748, 'n_tokens_neox': 712, 'n_words': 189}