<commit_before>set :stage, :production

set :deploy_to, '/home/zemniak/'
set :tmp_dir, '/home/zemniak/tmp'

server '<EMAIL>',
       user: 'zemniak',
       roles: %w{web app db},
       ssh_options: {
           user: 'zemniak',
           forward_agent: true,
           keys: %w(~/.ssh/id_rsa),
           auth_methods: %w(publickey)
       }

namespace :deploy do
  after :finishing, 'deploy:cleanup', 'ziemniak:generate_docs'

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  desc 'load the database with seed data'
  task :seed do
    on roles(:db), in: :sequence, wait: 5 do
      with rails_env: fetch(:rails_env) do
        execute "cd #{current_path}; bundle exec rake db:seed_fu RAILS_ENV=production"
      end
    end
  end

  before 'assets:precompile', 'migrate' do
    on roles(:app), in: :sequence, wait: 5 do
      with rails_env: fetch(:rails_env) do
        execute "cd #{release_path}; bower install"
      end
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do

    end
  end
end<commit_msg>Clean cap production<commit_after>set :stage, :production

set :deploy_to, '/home/zemniak/'
set :tmp_dir, '/home/zemniak/tmp'

server '<EMAIL>',
       user: 'zemniak',
       roles: %w{web app db},
       ssh_options: {
           user: 'zemniak',
           forward_agent: true,
           keys: %w(~/.ssh/id_rsa),
           auth_methods: %w(publickey)
       }

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  desc 'load the database with seed data'
  task :seed do
    on roles(:db), in: :sequence, wait: 5 do
      with rails_env: fetch(:rails_env) do
        execute "cd #{current_path}; bundle exec rake db:seed_fu RAILS_ENV=production"
      end
    end
  end

  before 'assets:precompile', 'migrate' do
    on roles(:app), in: :sequence, wait: 5 do
      with rails_env: fetch(:rails_env) do
        execute "cd #{release_path}; bower install"
      end
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 5 do
      puts 'Successfully deployed'
    end
  end

  after :finishing, 'deploy:cleanup', 'ziemniak:generate_docs'
end
{'fraction_non_alphanumeric': 0.12184003315375051, 'fraction_numerical': 0.0045586406962287605, 'mean_word_length': 2.7601246105919004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3486767', 'n_tokens_mistral': 852, 'n_tokens_neox': 827, 'n_words': 248}