<commit_before>set :user, "dakotaleedev"
set :application, "angular_rails_receta"
set :repository,  "<EMAIL>:DakotaLMartinez/receta-angular-rails.git"
set :deploy_to, "/home/dakotaleedev/webapps/angular_rails_receta"
# set :default_stage, "production"
set :verbose_command_log, true
set :use_sudo, false
set :deploy_via, :checkout
set :branch, "master"

set :default_environment, {
  "PATH"      =>  "#{deploy_to}/bin:$PATH",
  "GEM_HOME"  =>  "#{deploy_to}/gems",
  "RAILS_ENV" =>  "production"
}

set :scm, :git
set :scm_username, "<EMAIL>"
role :web, "<EMAIL>"
role :app, "<EMAIL>"
role :db,  "<EMAIL>", :primary => true



desc "Restart nginx"
task :restart do on roles(:app) do
  run "#{deploy_to}/bin/restart"
end

desc "Start nginx"
task :start do on roles(:app) do
  run "#{deploy_to}/bin/start"
end

desc "Stop nginx"
task :stop do on roles(:app) do 
  run "#{deploy_to}/bin/stop"
end



namespace :deploy do

  puts "===================================================\n"
  puts "         (  )   (   )  )"
  puts "      ) (   )  (  (         GO GRAB SOME COFFEE"      
  puts "      ( )  (    ) )\n"
  puts "     <_____________> ___    CAPISTRANO IS ROCKING!"
  puts "     |             |/ _ \\"
  puts "     |               | | |"
  puts "     |               |_| |"
  puts "  ___|             |\\___/"
  puts " /    \\___________/    \\"
  puts " \\_____________________/ \n"
  puts "==================================================="

  desc "Remake database"
  task :remakedb do on roles(:db) do
    capture("cd #{deploy_to}/current; bundle exec rake db:migrate RAILS_ENV=production")
    capture("cd #{deploy_to}/current; bundle exec rake db:seed RAILS_ENV=production")
  end

  desc "Seed database"
  task :seed do on roles(:db) do
    capture("cd #{deploy_to}/current; bundle exec rake db:seed RAILS_ENV=production")
  end

  desc "Migrate database"
  task :migrate do on roles(:db) do
    capture("cd #{deploy_to}/current; bundle exec rake db:migrate RAILS_ENV=production")
  end

  desc "Bundle install gems"
  task :bundle do on roles(:app) do
    capture("cd #{deploy_to}/current; bundle install --deployment")
  end

  namespace :assets do
    desc "Run the precompile task remotely"
    task :precompile, :roles => :web, :except => { :no_release => true } do
      capture("cd #{deploy_to}/current; bundle exec rake assets:precompile RAILS_ENV=production")
    end
  end

end



after "deploy:published", "deploy:bundle"
after "deploy:published", "deploy:assets:precompile"
after "deploy:published", "deploy:migrate"
after "deploy:published", "deploy:cleanup"
after "deploy:published", "restart"

# # config valid only for current version of Capistrano
# lock '3.6.0'

# set :application, 'angular_rails_receta'
# set :repo_url, '<EMAIL>:DakotaLMartinez/receta-angular-rails.git'

# # Default branch is :master
# # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
<commit_msg>changes syntax of on do blocks<commit_after>set :user, "dakotaleedev"
set :application, "angular_rails_receta"
set :repository,  "<EMAIL>:DakotaLMartinez/receta-angular-rails.git"
set :deploy_to, "/home/dakotaleedev/webapps/angular_rails_receta"
# set :default_stage, "production"
set :verbose_command_log, true
set :use_sudo, false
set :deploy_via, :checkout
set :branch, "master"

set :default_environment, {
  "PATH"      =>  "#{deploy_to}/bin:$PATH",
  "GEM_HOME"  =>  "#{deploy_to}/gems",
  "RAILS_ENV" =>  "production"
}

set :scm, :git
set :scm_username, "<EMAIL>"
role :web, "<EMAIL>"
role :app, "<EMAIL>"
role :db,  "<EMAIL>", :primary => true



desc "Restart nginx"
task :restart do 
  on roles(:app) do
    capture("#{deploy_to}/bin/restart")
  end
end

desc "Start nginx"
task :start do 
  on roles(:app) do
    capture("#{deploy_to}/bin/start")
  end
end

desc "Stop nginx"
task :stop do 
  on roles(:app) do 
    capture("#{deploy_to}/bin/stop")
  end
end



namespace :deploy do

  puts "===================================================\n"
  puts "         (  )   (   )  )"
  puts "      ) (   )  (  (         GO GRAB SOME COFFEE"      
  puts "      ( )  (    ) )\n"
  puts "     <_____________> ___    CAPISTRANO IS ROCKING!"
  puts "     |             |/ _ \\"
  puts "     |               | | |"
  puts "     |               |_| |"
  puts "  ___|             |\\___/"
  puts " /    \\___________/    \\"
  puts " \\_____________________/ \n"
  puts "==================================================="

  desc "Remake database"
  task :remakedb do 
    on roles(:db) do
      capture("cd #{deploy_to}/current; bundle exec rake db:migrate RAILS_ENV=production")
      capture("cd #{deploy_to}/current; bundle exec rake db:seed RAILS_ENV=production")
    end
  end

  desc "Seed database"
  task :seed do 
    on roles(:db) do
      capture("cd #{deploy_to}/current; bundle exec rake db:seed RAILS_ENV=production")
    end
  end

  desc "Migrate database"
  task :migrate do 
    on roles(:db) do
      capture("cd #{deploy_to}/current; bundle exec rake db:migrate RAILS_ENV=production")
    end
  end

  desc "Bundle install gems"
  task :bundle do 
    on roles(:app) do
      capture("cd #{deploy_to}/current; bundle install --deployment")
    end
  end

  namespace :assets do
    desc "Run the precompile task remotely"
    task :precompile, :roles => :web, :except => { :no_release => true } do
      capture("cd #{deploy_to}/current; bundle exec rake assets:precompile RAILS_ENV=production")
    end
  end

end



after "deploy:published", "deploy:bundle"
after "deploy:published", "deploy:assets:precompile"
after "deploy:published", "deploy:migrate"
after "deploy:published", "deploy:cleanup"
after "deploy:published", "restart"

# # config valid only for current version of Capistrano
# lock '3.6.0'

# set :application, 'angular_rails_receta'
# set :repo_url, '<EMAIL>:DakotaLMartinez/receta-angular-rails.git'

# # Default branch is :master
# # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

{'fraction_non_alphanumeric': 0.17146707091123464, 'fraction_numerical': 0.001010611419909045, 'mean_word_length': 3.4148698884758364, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 31, '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': '1598367', 'n_tokens_mistral': 2130, 'n_tokens_neox': 2038, 'n_words': 519}