<commit_before>module Disk

  # Create essential deploy directories
  def self.create_deploy_dirs cap, deploy_to
    cap.run "if [ ! -d '#{deploy_to}/releases' ]; then mkdir -p #{deploy_to}/releases; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/backup/db' ]; then mkdir -p #{deploy_to}/shared/backup/db; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/uploads/documents' ]; then mkdir -p #{deploy_to}/shared/uploads/documents; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/uploads/images' ]; then mkdir -p #{deploy_to}/shared/uploads/images; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/logs' ]; then mkdir -p #{deploy_to}/shared/logs; fi"
  end

  # Fix casing
  def self.set_blackhole_path_symlink_fix cap, current_release
		cap.run "ln -nfs BlackHole.php #{current_release}/library/Zend/Cache/Backend/Blackhole.php"
  end

  # Create backend cache directories
  def self.create_system_cache_dirs cap, server_cache_dir
    cap.run "if [ ! -d '#{server_cache_dir}' ]; then mkdir -p #{server_cache_dir}; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/URI' ]; then mkdir -p #{server_cache_dir}/URI; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/HTML' ]; then mkdir -p #{server_cache_dir}/HTML; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/CSS' ]; then mkdir -p #{server_cache_dir}/CSS; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/tags' ]; then mkdir -p #{server_cache_dir}/tags; fi";
    # run "echo '<?php' > #{server_cache_dir}/pluginLoaderCache.php"
  end
  
  # Create static html cache directory
  def self.create_static_cache_dir cap, current_release
    cap.run "if [ ! -d '#{current_release}/public/cached' ]; then mkdir -p #{current_release}/public/cached; fi";
  end

  # Make sure the log file directory is present
  def self.create_log_dir cap, current_release
    cap.run "if [ ! -d '#{current_release}/application/data/logs' ]; then mkdir -p #{current_release}/application/data/logs; fi";
  end
end<commit_msg>tags cache dir to shared<commit_after>module Disk

  # Create essential deploy directories
  def self.create_deploy_dirs cap, deploy_to
    cap.run "if [ ! -d '#{deploy_to}/releases' ]; then mkdir -p #{deploy_to}/releases; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/backup/db' ]; then mkdir -p #{deploy_to}/shared/backup/db; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/uploads/documents' ]; then mkdir -p #{deploy_to}/shared/uploads/documents; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/uploads/images' ]; then mkdir -p #{deploy_to}/shared/uploads/images; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/logs' ]; then mkdir -p #{deploy_to}/shared/logs; fi"
    cap.run "if [ ! -d '#{deploy_to}/shared/tags' ]; then mkdir -p #{deploy_to}/shared/tags; fi";
  end

  # Fix casing
  def self.set_blackhole_path_symlink_fix cap, current_release
		cap.run "ln -nfs BlackHole.php #{current_release}/library/Zend/Cache/Backend/Blackhole.php"
  end

  # Create backend cache directories
  def self.create_system_cache_dirs cap, server_cache_dir
    cap.run "if [ ! -d '#{server_cache_dir}' ]; then mkdir -p #{server_cache_dir}; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/URI' ]; then mkdir -p #{server_cache_dir}/URI; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/HTML' ]; then mkdir -p #{server_cache_dir}/HTML; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/CSS' ]; then mkdir -p #{server_cache_dir}/CSS; fi";
    cap.run "if [ ! -d '#{server_cache_dir}/tags' ]; then mkdir -p #{server_cache_dir}/tags; fi";
    # run "echo '<?php' > #{server_cache_dir}/pluginLoaderCache.php"
  end
  
  # Create static html cache directory
  def self.create_static_cache_dir cap, current_release
    cap.run "if [ ! -d '#{current_release}/public/cached' ]; then mkdir -p #{current_release}/public/cached; fi";
  end

  # Make sure the log file directory is present
  def self.create_log_dir cap, current_release
    cap.run "if [ ! -d '#{current_release}/application/data/logs' ]; then mkdir -p #{current_release}/application/data/logs; fi";
  end
end
{'fraction_non_alphanumeric': 0.16079019754938734, 'fraction_numerical': 0.0, 'mean_word_length': 3.8899755501222493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2117335', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1400, 'n_words': 348}