<commit_before># encoding: utf-8

Capistrano::Configuration.instance.load do
  namespace :setup do

    desc "Setup this server for a new wordpress site."
    task :default do
      # Capistrano's setup script
      deploy.setup

      # Our setup scripts
      setup.config
      setup.checkout
    end

    desc "Checks out a copy of wordpress to a shared location"
    task :checkout do
      run "rm -rf #{shared_path}/wordpress || true"
      raise Exception, 'wordpress.repository must be set in config.yml' if wordpress_git_url.nil?
      run "git clone --depth 1 #{wordpress_git_url} #{shared_path}/wordpress"
      run "cd #{shared_path}/wordpress && git fetch --tags && git checkout #{wordpress_version}"
    end

    desc "Sets up shared wp-config.php"
    task :config do
      file = File.join(File.dirname(__FILE__), "wp-config.php.erb")
      template = File.read(file)

      buffer = ERB.new(template).result(binding)

      put buffer, "#{shared_path}/wp-config.php"
      puts "New wp-config.php uploaded! Please run cap:deploy to activate these changes."
    end

  end
end
<commit_msg>Why do we have to do a reset --hard HEAD? Why?<commit_after># encoding: utf-8

Capistrano::Configuration.instance.load do
  namespace :setup do

    desc "Setup this server for a new wordpress site."
    task :default do
      # Capistrano's setup script
      deploy.setup

      # Our setup scripts
      setup.config
      setup.checkout
    end

    desc "Checks out a copy of wordpress to a shared location"
    task :checkout do
      run "rm -rf #{shared_path}/wordpress || true"
      raise Exception, 'wordpress.repository must be set in config.yml' if wordpress_git_url.nil?
      run "git clone --depth 1 #{wordpress_git_url} #{shared_path}/wordpress"
      run "cd #{shared_path}/wordpress && git fetch --tags && git reset --hard HEAD && git checkout #{wordpress_version}"
    end

    desc "Sets up shared wp-config.php"
    task :config do
      file = File.join(File.dirname(__FILE__), "wp-config.php.erb")
      template = File.read(file)

      buffer = ERB.new(template).result(binding)

      put buffer, "#{shared_path}/wp-config.php"
      puts "New wp-config.php uploaded! Please run cap:deploy to activate these changes."
    end

  end
end

{'fraction_non_alphanumeric': 0.1013215859030837, 'fraction_numerical': 0.001762114537444934, 'mean_word_length': 2.8886986301369864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2853714', 'n_tokens_mistral': 700, 'n_tokens_neox': 661, 'n_words': 230}