<commit_before>#############
# Application
set :application, "factlink-core"

########
# Stages
set :stages, %w(testserver production)
set :default_stage, "testserver"
require 'capistrano/ext/multistage'

#################
# Bundler support
require "bundler/capistrano"

#############
# RVM support
# Add RVM's lib directory to the load path.
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
# Load RVM's capistrano plugin.    
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2'

set :user, "root"
set :use_sudo,    false

# Repository
set :scm, :git
set :repository,  "<EMAIL>:factlink/factlink/factlink-core.git"

set :deploy_to, "/applications/#{application}"
set :deploy_via, :remote_cache    # only fetch changes since since last

ssh_options[:forward_agent] = true


# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
  
  task :all do
    set_conf_path="export CONFIG_PATH=#{deploy_to}/current; export NODE_ENV=#{deploy_env};"
    # Update the static files
    # run set_conf_path + "cd /applications/factlink-js-library/ && git checkout #{branch} && git pull origin #{branch}"

    # Update the static files
    # run set_conf_path + "cd /applications/factlink-chrome-extension/ && git checkout #{branch} && git pull origin #{branch} && ./release_repo.sh"
    
    # Update the Proxy
    # don't use && chained with killall
    # TODO we should add a proper workaround
    # run set_conf_path + "cd /applications/web-proxy && git checkout #{branch} && git pull origin #{branch} && killall forever ; killall node ; NODE_ENV=testserver forever start server.js "
    
  end
  
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end

before 'deploy:all', 'deploy'
after 'deploy:all', 'deploy:restart'

after "deploy", "deploy:migrate"
<commit_msg>Cleaned deploy script<commit_after>#############
# Application
set :application, "factlink-core"

########
# Stages
set :stages, %w(testserver production)
set :default_stage, "testserver"
require 'capistrano/ext/multistage'

#################
# Bundler support
require "bundler/capistrano"

#############
# RVM support
# Add RVM's lib directory to the load path.
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
# Load RVM's capistrano plugin.    
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2'

set :user, "root"
set :use_sudo,    false

# Repository
set :scm, :git
set :repository,  "<EMAIL>:factlink/factlink/factlink-core.git"

set :deploy_to, "/applications/#{application}"
set :deploy_via, :remote_cache    # only fetch changes since since last

ssh_options[:forward_agent] = true


# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
  
  task :all do
    set_conf_path="export CONFIG_PATH=#{deploy_to}/current; export NODE_ENV=#{deploy_env};"    
  end
  
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end

before 'deploy:all', 'deploy'
after 'deploy:all', 'deploy:restart'

after "deploy", "deploy:migrate"

{'fraction_non_alphanumeric': 0.15997510115157174, 'fraction_numerical': 0.0018674136321195146, 'mean_word_length': 4.668430335097002, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6920361', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1075, 'n_words': 299}