<commit_before>class Mongocli < Formula
  desc "MongoDB CLI enables you to manage your MongoDB in the Cloud"
  homepage "https://github.com/mongodb/mongodb-atlas-cli"
  url "https://github.com/mongodb/mongodb-atlas-cli/archive/refs/tags/mongocli/v1.23.1.tar.gz"
  sha256 "34f4aaef8bae5fa848b7091c760af6c659a2a7e3c5a5d00d0ebda18cd0117ea4"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "4cffad70e7ad2a0f5027f4816dfd4d13cf76b69f229804210d6bb03eda081b0c"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "fec4a7fa93ca1a887e58c5247b626ec41ab330b787883356fe26e435768fbd99"
    sha256 cellar: :any_skip_relocation, monterey:       "cccbe19cf818d76e7bbf89b0c05cfbdd7bc0b2410f2bbda13a982892b9c6c6d8"
    sha256 cellar: :any_skip_relocation, big_sur:        "3a78a2ce8add4da1ff999127c8284933624eb4c42e6107cccd8dc79756a60e53"
    sha256 cellar: :any_skip_relocation, catalina:       "9e18ac628f71801cafc7180415326fc1ef5c0414e26506a181e40e3503bfc011"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "fddaec563628cf740aaf703fb7574355c2ec50e92213109e513ec184ad2b1c2d"
  end

  depends_on "go" => :build

  def install
    with_env(
      MCLI_VERSION: version.to_s,
      MCLI_GIT_SHA: "homebrew-release",
    ) do
      system "make", "build"
    end
    bin.install "bin/mongocli"

    (bash_completion/"mongocli").write Utils.safe_popen_read(bin/"mongocli", "completion", "bash")
    (fish_completion/"mongocli.fish").write Utils.safe_popen_read(bin/"mongocli", "completion", "fish")
    (zsh_completion/"_mongocli").write Utils.safe_popen_read(bin/"mongocli", "completion", "zsh")
  end

  test do
    assert_match "mongocli version: #{version}", shell_output("#{bin}/mongocli --version")
    assert_match "Error: missing credentials", shell_output("#{bin}/mongocli iam projects ls 2>&1", 1)
    assert_match "PROFILE NAME", shell_output("#{bin}/mongocli config ls")
  end
end<commit_msg>mongocli: update 1.23.1 bottle.<commit_after>class Mongocli < Formula
  desc "MongoDB CLI enables you to manage your MongoDB in the Cloud"
  homepage "https://github.com/mongodb/mongodb-atlas-cli"
  url "https://github.com/mongodb/mongodb-atlas-cli/archive/refs/tags/mongocli/v1.23.1.tar.gz"
  sha256 "34f4aaef8bae5fa848b7091c760af6c659a2a7e3c5a5d00d0ebda18cd0117ea4"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "d7f1f06b80b65f92fea77e0b39fe1d00443a66f1b30d0c734c8eab75e5120a3f"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "adc7fdb8752684214c010319ee7020c90a36710c1807112b91d8e3ad2dd95b3b"
    sha256 cellar: :any_skip_relocation, monterey:       "4c6f99c90fb7092b4ca5f91433a9d7ba2097d989561a85d0d1ddc9d70416b5b8"
    sha256 cellar: :any_skip_relocation, big_sur:        "ad194a907fed89132c0ad1965ca0d025212d977ee684d37f6b04334c6a5a5f69"
    sha256 cellar: :any_skip_relocation, catalina:       "cce730578c3b5db4458795a38e6e4de2054c28add6646bcf0afbb0d12b433532"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "783d363825cbe2efc02cd1576816227e92316bf9cabbc5130d2524a68a65145b"
  end

  depends_on "go" => :build

  def install
    with_env(
      MCLI_VERSION: version.to_s,
      MCLI_GIT_SHA: "homebrew-release",
    ) do
      system "make", "build"
    end
    bin.install "bin/mongocli"

    (bash_completion/"mongocli").write Utils.safe_popen_read(bin/"mongocli", "completion", "bash")
    (fish_completion/"mongocli.fish").write Utils.safe_popen_read(bin/"mongocli", "completion", "fish")
    (zsh_completion/"_mongocli").write Utils.safe_popen_read(bin/"mongocli", "completion", "zsh")
  end

  test do
    assert_match "mongocli version: #{version}", shell_output("#{bin}/mongocli --version")
    assert_match "Error: missing credentials", shell_output("#{bin}/mongocli iam projects ls 2>&1", 1)
    assert_match "PROFILE NAME", shell_output("#{bin}/mongocli config ls")
  end
end
{'fraction_non_alphanumeric': 0.10302409021014865, 'fraction_numerical': 0.16068682726806766, 'mean_word_length': 5.559663865546218, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '3174369', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1635, 'n_words': 226}