<commit_before>set :application, "vebel.ru"
set :deploy_to, "/srv/www/#{application}"

default_run_options[:pty] = true
set :scm, :git
set :repository, "git://github.com/pasitive/zapad.git"
set :deploy_via, :remote_cache
set :git_enable_submodules, 1
                         
set :domain, "<EMAIL>"
set :user, "deployer"
set :group, "users"
set :port, 2112
set :use_sudo, false

ssh_options[:forward_agent] = true

role :web, '172.16.17.32'
role :app, '172.16.17.32'
role :db, '172.16.17.32', :primary => true

set :branch do
  default_tag = `git describe --abbrev=0 --tags`.split("\n").last
  tag = Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] "
  tag = default_tag if tag.empty?
  tag
end unless exists?(:branch)      

namespace :app do
  task :setup do        
    
    run "rm -rf #{shared_path}/runtime"
    run "rm -rf #{shared_path}/assets"
    run "rm -rf #{shared_path}/upload"
    run "rm -rf #{shared_path}/config"
    
    run "mkdir #{shared_path}/runtime"
    run "mkdir #{shared_path}/assets"
    run "mkdir #{shared_path}/upload"
    run "mkdir #{shared_path}/config"
    
    run "chmod 0777 #{shared_path}/runtime"
    run "chmod 0777 #{shared_path}/assets"
    run "chmod 0777 #{shared_path}/upload"  
    
    run "cp -R #{current_release}/protected/config #{shared_path}/"
  end
end

namespace :deploy do
  task :restart do
    puts "Nothing to restart"
  end
  task :finalize_update, :except => { :no_release => true } do 
    run "#{latest_release}/protected/yiic migrate up --interactive=0"
    run "ln -s #{shared_path}/runtime #{latest_release}/protected/runtime"
    run "ln -s #{shared_path}/assets #{latest_release}/public/assets"
    run "ln -s #{shared_path}/upload #{latest_release}/public/upload"
  end
end<commit_msg>capistrano integration<commit_after>set :application, "vebel.ru"
set :deploy_to, "/srv/www/#{application}"

default_run_options[:pty] = true
set :scm, :git
set :repository, "git://github.com/pasitive/zapad.git"
set :deploy_via, :remote_cache
set :git_enable_submodules, 1
                         
set :domain, "<EMAIL>"
set :user, "deployer"
set :group, "users"
set :port, 2112
set :use_sudo, false

ssh_options[:forward_agent] = true

role :web, '172.16.17.32'
role :app, '172.16.17.32'
role :db, '172.16.17.32', :primary => true

set :branch do
  default_tag = `git describe --abbrev=0 --tags`.split("\n").last
  tag = Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] "
  tag = default_tag if tag.empty?
  tag
end unless exists?(:branch)      

namespace :app do
  task :setup do
    run "rm -rf #{shared_path}/runtime"
    run "rm -rf #{shared_path}/assets"
    run "rm -rf #{shared_path}/upload"
    run "rm -rf #{shared_path}/config"
    
    run "mkdir #{shared_path}/runtime"
    run "mkdir #{shared_path}/assets"
    run "mkdir #{shared_path}/upload"
    run "mkdir #{shared_path}/config"
    
    run "chmod 0777 #{shared_path}/runtime"
    run "chmod 0777 #{shared_path}/assets"
    run "chmod 0777 #{shared_path}/upload"  
    
    run "cp -R #{current_release}/protected/config #{shared_path}/"
  end
end

namespace :deploy do
  task :restart do
    puts "Nothing to restart"
  end
  task :finalize_update, :except => { :no_release => true } do 
    run "#{latest_release}/protected/yiic migrate up --interactive=0"
    run "ln -s #{shared_path}/runtime #{latest_release}/protected/runtime"
    run "ln -s #{shared_path}/assets #{latest_release}/public/assets"
    run "ln -s #{shared_path}/upload #{latest_release}/public/upload"
    run "ln -s #{shared_path}/components/DbConnection.php #{latest_release}/protected/components/DbConnection.php"
  end
end
{'fraction_non_alphanumeric': 0.14998651200431615, 'fraction_numerical': 0.02481791205826814, 'mean_word_length': 3.600496277915633, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 6, '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': '3463827', 'n_tokens_mistral': 1357, 'n_tokens_neox': 1276, 'n_words': 343}