<commit_before>namespace :symfony do
  desc "Runs custom symfony command"
  task :default do
    prompt_with_default(:task_arguments, "cache:clear")

    stream "cd #{latest_release} && #{php_bin} #{symfony_console} #{task_arguments} --env=#{symfony_env_prod}"
  end

  namespace :assets do
    desc "Updates assets version (in config.yml)"
    task :update_version, :except => { :no_release => true } do
       run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml"
    end

    desc "Installs bundle's assets"
    task :install, :except => { :no_release => true } do
      pretty_print "--> Installing bundle's assets"

      run "cd #{latest_release} && #{php_bin} #{symfony_console} assets:install #{web_path} --env=#{symfony_env_prod}"
      puts_ok
    end
  end

  namespace :assetic do
    desc "Dumps all assets to the filesystem"
    task :dump, :except => { :no_release => true } do
      pretty_print "--> Dumping all assets to the filesystem"

      run "cd #{latest_release} && #{php_bin} #{symfony_console} assetic:dump --env=#{symfony_env_prod} --no-debug"
      puts_ok
    end
  end

  namespace :vendors do
    desc "Runs the bin/vendors script to install the vendors (fast if already installed)"
    task :install, :except => { :no_release => true } do
      pretty_print "--> Installing vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} install"
      puts_ok
    end

    desc "Runs the bin/vendors script to reinstall the vendors"
    task :reinstall, :except => { :no_release => true } do
      pretty_print "--> Reinstalling vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} install --reinstall"
      puts_ok
    end

    desc "Runs the bin/vendors script to upgrade the vendors"
    task :upgrade, :except => { :no_release => true } do
      pretty_print "--> Upgrading vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} update"
      puts_ok
    end
  end

  namespace :bootstrap do
    desc "Runs the bin/build_bootstrap script"
    task :build, :except => { :no_release => true } do
      pretty_print "--> Building bootstrap file"

      run "cd #{latest_release} && test -f #{build_bootstrap} && #{php_bin} #{build_bootstrap} || echo '#{build_bootstrap} not found, skipped'"
      puts_ok
    end
  end

  namespace :composer do
    desc "Gets composer and installs it"
    task :get, :except => { :no_release => true } do
        pretty_print "--> Downloading Composer"

        run "cd #{latest_release} && curl -s http://getcomposer.org/installer | #{php_bin}"
        puts_ok
    end

    desc "Runs composer to install vendors from composer.lock file"
    task :install, :except => { :no_release => true } do
      if !File.exist?("#{latest_release}/composer.phar")
        symfony.composer.get
      end

      pretty_print "--> Installing Composer dependencies"

      run "cd #{latest_release} && #{php_bin} composer.phar install --no-scripts --verbose"
      puts_ok
    end

    desc "Runs composer to update vendors, and composer.lock file"
    task :update, :except => { :no_release => true } do
      if !File.exist?("#{latest_release}/composer.phar")
        symfony.composer.get
      end

      pretty_print "--> Updating Composer dependencies"
<commit_msg>fix for remote check of composer.phar, File.exist? only checks local files<commit_after>def remote_file_exists?(full_path)
  'true' ==  capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
end

namespace :symfony do
  desc "Runs custom symfony command"
  task :default do
    prompt_with_default(:task_arguments, "cache:clear")

    stream "cd #{latest_release} && #{php_bin} #{symfony_console} #{task_arguments} --env=#{symfony_env_prod}"
  end

  namespace :assets do
    desc "Updates assets version (in config.yml)"
    task :update_version, :except => { :no_release => true } do
       run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml"
    end

    desc "Installs bundle's assets"
    task :install, :except => { :no_release => true } do
      pretty_print "--> Installing bundle's assets"

      run "cd #{latest_release} && #{php_bin} #{symfony_console} assets:install #{web_path} --env=#{symfony_env_prod}"
      puts_ok
    end
  end

  namespace :assetic do
    desc "Dumps all assets to the filesystem"
    task :dump, :except => { :no_release => true } do
      pretty_print "--> Dumping all assets to the filesystem"

      run "cd #{latest_release} && #{php_bin} #{symfony_console} assetic:dump --env=#{symfony_env_prod} --no-debug"
      puts_ok
    end
  end

  namespace :vendors do
    desc "Runs the bin/vendors script to install the vendors (fast if already installed)"
    task :install, :except => { :no_release => true } do
      pretty_print "--> Installing vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} install"
      puts_ok
    end

    desc "Runs the bin/vendors script to reinstall the vendors"
    task :reinstall, :except => { :no_release => true } do
      pretty_print "--> Reinstalling vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} install --reinstall"
      puts_ok
    end

    desc "Runs the bin/vendors script to upgrade the vendors"
    task :upgrade, :except => { :no_release => true } do
      pretty_print "--> Upgrading vendors"

      run "cd #{latest_release} && #{php_bin} #{symfony_vendors} update"
      puts_ok
    end
  end

  namespace :bootstrap do
    desc "Runs the bin/build_bootstrap script"
    task :build, :except => { :no_release => true } do
      pretty_print "--> Building bootstrap file"

      run "cd #{latest_release} && test -f #{build_bootstrap} && #{php_bin} #{build_bootstrap} || echo '#{build_bootstrap} not found, skipped'"
      puts_ok
    end
  end

  namespace :composer do
    desc "Gets composer and installs it"
    task :get, :except => { :no_release => true } do
        pretty_print "--> Downloading Composer"

        run "cd #{latest_release} && curl -s http://getcomposer.org/installer | #{php_bin}"
        puts_ok
    end

    desc "Runs composer to install vendors from composer.lock file"
    task :install, :except => { :no_release => true } do
      if !remote_file_exists?("#{latest_release}/composer.phar")
        symfony.composer.get
      end

      pretty_print "--> Installing Composer dependencies"

      run "cd #{latest_release} && #{php_bin} composer.phar install --no-scripts --verbose"
      puts_ok
    end

    desc "Runs composer to update vendors, and composer.lock file"
    task :update, :except => { :no_release => true } do
      if !remote_file_exists?("#{latest_release}/composer.phar")
        symfony.composer.get
      end

      pretty_print "--> Updating Composer dependencies"

{'fraction_non_alphanumeric': 0.12907925407925408, 'fraction_numerical': 0.0002913752913752914, 'mean_word_length': 3.123123123123123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3590139', 'n_tokens_mistral': 2180, 'n_tokens_neox': 2134, 'n_words': 635}