<commit_before>class Krakend < Formula
  desc "Ultra-High performance API Gateway built in Go"
  homepage "https://www.krakend.io/"
  url "https://github.com/devopsfaith/krakend-ce/archive/v2.0.2.tar.gz"
  sha256 "8cd8211f2d51bf032e85e0c62b1e4ff743dfbd08699429093a45325265a1fb52"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "684183cf0ee8b759dc0cdeda4a1cf62ce715422b446e204b189e8419d0841224"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "7f766f400d42527adaca881a2e10a02677126e29e8004a7cb7c63343d6335b6c"
    sha256 cellar: :any_skip_relocation, monterey:       "13f1a476d7ab6d9143ab3286a4789cbd59c708038e9aee274424b417a1449abe"
    sha256 cellar: :any_skip_relocation, big_sur:        "d3b4827433c0ee693da6251e53efb34bd271c6fe35c3f3b27f25aa413eefad91"
    sha256 cellar: :any_skip_relocation, catalina:       "62024a4f84cd638b0cb6bf795332cbe53faafff0f311805941e5d65c95aa9ac2"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "81eba06c4a0d8ab38a58753f8848c9b0e9a8eab281ff2362aa13fe030ca18ea8"
  end

  depends_on "go" => :build

  def install
    (buildpath/"src/github.com/devopsfaith/krakend-ce").install buildpath.children
    cd "src/github.com/devopsfaith/krakend-ce" do
      system "make", "build"
      bin.install "krakend"
      prefix.install_metafiles
    end
  end

  test do
    (testpath/"krakend_unsupported_version.json").write <<~EOS
      {
        "version": 2,
        "extra_config": {
          "github_com/devopsfaith/krakend-gologging": {
            "level": "WARNING",
            "prefix": "[KRAKEND]",
            "syslog": false,
            "stdout": true
          }
        }<commit_msg>krakend: update 2.0.2 bottle.<commit_after>class Krakend < Formula
  desc "Ultra-High performance API Gateway built in Go"
  homepage "https://www.krakend.io/"
  url "https://github.com/devopsfaith/krakend-ce/archive/v2.0.2.tar.gz"
  sha256 "8cd8211f2d51bf032e85e0c62b1e4ff743dfbd08699429093a45325265a1fb52"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "8c9c858f337ac130da385208c89ae9d80a60cd7853b86c1d69f90acfc9d12569"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "81005b3b02c719998e4415ef13afe5c485579c6da02ca8da5ff6b9bd9554c890"
    sha256 cellar: :any_skip_relocation, monterey:       "f06b8c7e4e57918f1198e6d8e5feede80a2961c2ff1b8cc360f64847a3239e7a"
    sha256 cellar: :any_skip_relocation, big_sur:        "f8d31808681ed7d23c404dca46b8d56fa374c6ebda39956b0718cb8a7e0e1c24"
    sha256 cellar: :any_skip_relocation, catalina:       "70695c7b5adf22d2bd89612a60a822a8fd71f9d28a09006c220f49ee13e3130c"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "95429d776564613625750f0e69883364f2ec67d89764b89c67c18b163c80cb0e"
  end

  depends_on "go" => :build

  def install
    (buildpath/"src/github.com/devopsfaith/krakend-ce").install buildpath.children
    cd "src/github.com/devopsfaith/krakend-ce" do
      system "make", "build"
      bin.install "krakend"
      prefix.install_metafiles
    end
  end

  test do
    (testpath/"krakend_unsupported_version.json").write <<~EOS
      {
        "version": 2,
        "extra_config": {
          "github_com/devopsfaith/krakend-gologging": {
            "level": "WARNING",
            "prefix": "[KRAKEND]",
            "syslog": false,
            "stdout": true
          }
        }
{'fraction_non_alphanumeric': 0.0920353982300885, 'fraction_numerical': 0.19174041297935104, 'mean_word_length': 3.9794419970631423, 'pattern_counts': {'":': 14, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '6567226', 'n_tokens_mistral': 1759, 'n_tokens_neox': 1416, 'n_words': 175}