<commit_before>require 'wp_config'
require 'erb'
require 'digest'
require 'digest/sha1'

require 'wp_capistrano/namespace/deploy'
require 'wp_capistrano/namespace/setup'
require 'wp_capistrano/namespace/wp'

Capistrano::Configuration.instance.load do
  default_run_options[:pty] = true

  def set_target target
    tt = WPConfig.instance.h['deploy'][target]
    if tt
      t = OpenStruct.new(tt)
      set :domain, t.ssh_domain
      set :user, t.ssh_user
      set :deploy_to, t.path
      set :wordpress_domain, t.vhost
      set :wordpress_db_name, t.database.name
      set :wordpress_db_user, t.database.user
      set :wordpress_db_password, <PASSWORD>
      set :wordpress_db_host, t.database.host
      set :use_sudo, t.use_sudo

      @roles = {}
      role :app, domain
      role :web, domain
      role :db,  domain, :primary => true
    end
  end

  WPConfig.instance.h['deploy'].each_pair do |k,v|
    set_target k if v['default']
  end

  task :testing do<commit_msg>Add some defaults.<commit_after>require 'wp_config'
require 'erb'
require 'digest'
require 'digest/sha1'

require 'wp_capistrano/namespace/deploy'
require 'wp_capistrano/namespace/setup'
require 'wp_capistrano/namespace/wp'

Capistrano::Configuration.instance.load do
  default_run_options[:pty] = true

  def set_target target
    tt = WPConfig.instance.h['deploy'][target]
    if tt
      t = OpenStruct.new(tt)
      set :domain, t.ssh_domain
      set :user, t.ssh_user
      set :deploy_to, t.path
      set :wordpress_domain, t.vhost
      set :wordpress_domain, 'localhost' if wordpress_domain.nil?
      set :wordpress_db_name, t.database.name
      set :wordpress_db_user, t.database.user
      set :wordpress_db_user, 'root' if wordpress_db_user.nil?
      set :wordpress_db_password, <PASSWORD>
      set :wordpress_db_host, t.database.host
      set :wordpress_db_host, 'localhost' if wordpress_db_host.nil?
      set :use_sudo, t.use_sudo
      set :deploy_profile, t

      @roles = {}
      role :app, domain
      role :web, domain
      role :db,  domain, :primary => true
    end
  end

  WPConfig.instance.h['deploy'].each_pair do |k,v|
    set_target k if v['default']
  end

  task :testing do
{'fraction_non_alphanumeric': 0.10514337733272644, 'fraction_numerical': 0.0009103322712790169, 'mean_word_length': 3.3353057199211045, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2732139', 'n_tokens_mistral': 781, 'n_tokens_neox': 742, 'n_words': 177}