<commit_before>load Gem.find_files('nonrails.rb').last.to_s

# =========================================================================
# These variables MUST be set in the client capfiles. If they are not set,
# the deploy will fail with an error.
# =========================================================================
_cset(:app_symlinks) {
  abort "Please specify an array of symlinks to shared resources, set :app_symlinks, ['/media', ./. '/staging']"
}
_cset(:app_shared_dirs) {
  abort "Please specify an array of shared directories to be created, set :app_shared_dirs"
}
_cset(:app_shared_files) {
  abort "Please specify an array of shared files to be symlinked, set :app_shared_files"
}

_cset :compile, false
_cset :app_webroot, ''

namespace :mage do
  desc <<-DESC
Clear the Magento Cache
  DESC
  task :clean_cache do
    on roles(:web, :app) do
      run "cd #{current_path}#{app_webroot} && php -r \"require_once('app/Mage.php'); Mage::app()->cleanCache();\""
    end
  end

  desc <<-DESC
Disable the Magento install by creating the maintenance.flag in the web root.
  DESC
  task :disable do
    on roles(:web) do
      run "cd #{current_path}#{app_webroot} && touch maintenance.flag"
    end
  end

  desc <<-DESC
Enable the Magento stores by removing the maintenance.flag in the web root.
  DESC<commit_msg>use fetch from cap3<commit_after>load Gem.find_files('nonrails.rb').last.to_s

namespace :mage do
  desc <<-DESC
Clear the Magento Cache
  DESC
  task :clean_cache do
    on roles(:web, :app) do
      run "cd #{current_path}#{fetch(:app_webroot)} && php -r \"require_once('app/Mage.php'); Mage::app()->cleanCache();\""
    end
  end

  desc <<-DESC
Disable the Magento install by creating the maintenance.flag in the web root.
  DESC
  task :disable do
    on roles(:web) do
      run "cd #{current_path}#{app_webroot} && touch maintenance.flag"
    end
  end

  desc <<-DESC
Enable the Magento stores by removing the maintenance.flag in the web root.
  DESC
{'fraction_non_alphanumeric': 0.17889447236180905, 'fraction_numerical': 0.0005025125628140704, 'mean_word_length': 4.184895833333333, 'pattern_counts': {'":': 0, '<': 15, '<?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': '1395690', 'n_tokens_mistral': 628, 'n_tokens_neox': 609, 'n_words': 213}