<commit_before>class Crowdin < Formula
  desc "Command-line tool that allows to manage your resources with crowdin.com"
  homepage "https://support.crowdin.com/cli-tool/"
  url "https://github.com/crowdin/crowdin-cli/releases/download/3.5.2/crowdin-cli.zip"
  sha256 "7295801c0e04a081b836831a6212f4a6db0dd140093cd342c389d8538335298b"
  license "MIT"

  livecheck do
    url "https://github.com/crowdin/crowdin-cli.git"
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle :unneeded

  depends_on "openjdk"

  def install
    libexec.install "crowdin-cli.jar"
    bin.write_jar_script libexec/"crowdin-cli.jar", "crowdin"
  end

  test do
    (testpath/"crowdin.yml").write <<~EOS
      "project_id": "12"
      "api_token": "<PASSWORD>"
      "base_path": "."
      "base_url": "https://api.crowdin.com" # https://{organization-name}.crowdin.com

      "preserve_hierarchy": true

      "files": [
        {
          "source" : "/t1/**/*",<commit_msg>crowdin 3.5.3 (#70039)<commit_after>class Crowdin < Formula
  desc "Command-line tool that allows to manage your resources with crowdin.com"
  homepage "https://support.crowdin.com/cli-tool/"
  url "https://github.com/crowdin/crowdin-cli/releases/download/3.5.3/crowdin-cli.zip"
  sha256 "9e4d0256d41bafaef04fb2ed8df5c965894e14db89956159f59370922b5358f4"
  license "MIT"

  livecheck do
    url "https://github.com/crowdin/crowdin-cli.git"
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle :unneeded

  depends_on "openjdk"

  def install
    libexec.install "crowdin-cli.jar"
    bin.write_jar_script libexec/"crowdin-cli.jar", "crowdin"
  end

  test do
    (testpath/"crowdin.yml").write <<~EOS
      "project_id": "12"
      "api_token": "<PASSWORD>"
      "base_path": "."
      "base_url": "https://api.crowdin.com" # https://{organization-name}.crowdin.com

      "preserve_hierarchy": true

      "files": [
        {
          "source" : "/t1/**/*",
{'fraction_non_alphanumeric': 0.16308337703198741, 'fraction_numerical': 0.06082852648138437, 'mean_word_length': 3.175054704595186, 'pattern_counts': {'":': 12, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 10, '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': '2802205', 'n_tokens_mistral': 851, 'n_tokens_neox': 720, 'n_words': 115}