<commit_before>class Atlas < Formula
  desc "Database toolkit"
  homepage "https://atlasgo.io/"
  url "https://github.com/ariga/atlas/archive/v0.3.5.tar.gz"
  sha256 "005c0108fc92355a7a7c9df98dd18062a3575e970a5aa992d7a0a731a451b49c"
  license "Apache-2.0"
  head "https://github.com/ariga/atlas.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "a4516fe2ad1b9f5fc24e35f5b5b2cac7a2c13e77dfaacef3910c058b3b9efa9b"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "7e73d464992882423778659525dcdcc69c670624cd9140b90d43d25a90464414"
    sha256 cellar: :any_skip_relocation, monterey:       "65407105999de1812a94cb41a2be15a268479d3f733024df16583eba5388b2b9"
    sha256 cellar: :any_skip_relocation, big_sur:        "a766d10b5a1e328caad4075c73500ec401ab36171300b4450acb4227fbcd87ab"
    sha256 cellar: :any_skip_relocation, catalina:       "5a0d8544c538d776548e7640721ac6cdfaf83f2897373f606ea566f6cfdb8f60"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "ac012ccdc01e92e54e61fe2ecfb60c78c64dee5e7afda89afce1914108528b94"
  end

  depends_on "go" => :build

  def install
    ldflags = %W[
      -s -w
      -X ariga.io/atlas/cmd/action.version=v#{version}
    ]
    system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/atlas"

    bash_output = Utils.safe_popen_read(bin/"atlas", "completion", "bash")
    (bash_completion/"atlas").write bash_output

    zsh_output = Utils.safe_popen_read(bin/"atlas", "completion", "zsh")
    (zsh_completion/"_atlas").write zsh_output

    fish_output = Utils.safe_popen_read(bin/"atlas", "completion", "fish")
    (fish_completion/"atlas.fish").write fish_output
  end

  test do<commit_msg>atlas: update 0.3.5 bottle.<commit_after>class Atlas < Formula
  desc "Database toolkit"
  homepage "https://atlasgo.io/"
  url "https://github.com/ariga/atlas/archive/v0.3.5.tar.gz"
  sha256 "005c0108fc92355a7a7c9df98dd18062a3575e970a5aa992d7a0a731a451b49c"
  license "Apache-2.0"
  head "https://github.com/ariga/atlas.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "337c291e8ea39e766bd7994753f8ae2a340bbb26f323e3ad73716edefae6a64e"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "44c134efad6908adad0fdf35b0fca8a36a86a267060af4731f5287a081a75e36"
    sha256 cellar: :any_skip_relocation, monterey:       "6d700e558f21125f851a52f5f1224e3ae9900c2855fdb32b341aca1aed457995"
    sha256 cellar: :any_skip_relocation, big_sur:        "fdf0b5440e7ba0365057f9bfa00ef8726799e2a716f24c289a894e5201d8fea2"
    sha256 cellar: :any_skip_relocation, catalina:       "f7cbb0bbc12f8952ab8df50abe0d0de2211a1cca1ac30a71fa6a075206cd0a48"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "556aa1a6ea851d4125bc6833155c4f90f70e0e96de7d33d2e3577f76cd35f868"
  end

  depends_on "go" => :build

  def install
    ldflags = %W[
      -s -w
      -X ariga.io/atlas/cmd/action.version=v#{version}
    ]
    system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/atlas"

    bash_output = Utils.safe_popen_read(bin/"atlas", "completion", "bash")
    (bash_completion/"atlas").write bash_output

    zsh_output = Utils.safe_popen_read(bin/"atlas", "completion", "zsh")
    (zsh_completion/"_atlas").write zsh_output

    fish_output = Utils.safe_popen_read(bin/"atlas", "completion", "fish")
    (fish_completion/"atlas.fish").write fish_output
  end

  test do
{'fraction_non_alphanumeric': 0.10548025928108426, 'fraction_numerical': 0.18738951090159103, 'mean_word_length': 5.275415896487985, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '2078846', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1472, 'n_words': 180}