<commit_before>set :application, 'mezuro'
set :repo_url, 'https://github.com/mezuro/mezuro.git'

# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

set :deploy_to, "/home/mezuro/app"
# set :scm, :git

# set :format, :pretty
# set :log_level, :debug
# set :pty, true

# set :linked_files, %w{config/database.yml}
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# set :keep_releases, 5

# User info
set :user, 'mezuro'

# RVM
set :rvm_ruby_string, :local              # use the same ruby as used locally for deployment
set :rvm_autolibs_flag, "read-only"       # more info: rvm help autolibs
set :rvm_type, :system
set :rvm_install_with_sudo, true

namespace :deploy do
  after 'deploy:publishing', 'deploy:restart'

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute "touch #{File.join(current_path,'tmp','restart.txt')}"
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
      # within release_path do
      #   execute :rake, 'cache:clear'
      # end
    end
  end

  before :compile_assets, :config_symlinks do
    on roles(:web) do
      execute "ln -s #{File.join(deploy_to, 'shared', 'config/database.yml')} #{File.join(release_path, 'config/database.yml')}"
      execute "ln -s #{File.join(deploy_to, 'shared', 'config/kalibro_gayekeeper.yml')} #{File.join(release_path, 'config/kalibro_gatekeeper.yml')}"
    end
  end

  after :finishing, 'deploy:cleanup'

end<commit_msg>New fix to deploy script<commit_after>set :application, 'mezuro'
set :repo_url, 'https://github.com/mezuro/mezuro.git'

# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

set :deploy_to, "/home/mezuro/app"
# set :scm, :git

# set :format, :pretty
# set :log_level, :debug
# set :pty, true

# set :linked_files, %w{config/database.yml}
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# set :keep_releases, 5

# User info
set :user, 'mezuro'

# RVM
set :rvm_ruby_string, :local              # use the same ruby as used locally for deployment
set :rvm_autolibs_flag, "read-only"       # more info: rvm help autolibs
set :rvm_type, :system
set :rvm_install_with_sudo, true

namespace :deploy do
  after 'deploy:publishing', 'deploy:restart'

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute "touch #{File.join(current_path,'tmp','restart.txt')}"
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
      # within release_path do
      #   execute :rake, 'cache:clear'
      # end
    end
  end

  before :compile_assets, :config_symlinks do
    on roles(:web) do
      execute "ln -s #{File.join(deploy_to, 'shared', 'config/database.yml')} #{File.join(release_path, 'config/database.yml')}"
      execute "ln -s #{File.join(deploy_to, 'shared', 'config/kalibro_gatekeeper.yml')} #{File.join(release_path, 'config/kalibro_gatekeeper.yml')}"
    end
  end

  after :finishing, 'deploy:cleanup'

end
{'fraction_non_alphanumeric': 0.14125492573507123, 'fraction_numerical': 0.003031221582297666, 'mean_word_length': 3.8175182481751824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7009937', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1191, 'n_words': 325}