<commit_before>class NatsStreamingServer < Formula
  desc "Lightweight cloud messaging system"
  homepage "https://nats.io"
  url "https://github.com/nats-io/nats-streaming-server/archive/refs/tags/v0.23.1.tar.gz"
  sha256 "bf25c099239f1d43a316d63d79f552dbd86f1b23bcb8e647d11d07d231be5dfd"
  license "Apache-2.0"
  head "https://github.com/nats-io/nats-streaming-server.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "c93e366145291bd820767a920ebd1c933dc3d842133fa5ad772bd441a6ecff52"
    sha256 cellar: :any_skip_relocation, big_sur:       "07b8e72f00db316b5dd144a1d0619c7afd619a6389aaffde1c660eb3b3f2e35e"
    sha256 cellar: :any_skip_relocation, catalina:      "91686d2410d5978327e4b67ad4163335e263168fb2efd9cf34c7954383b9e0b9"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "8c08a368c5c5c3148bb36e8903d42689bc2fee808c28d3015f65691fceca9452"
  end

  depends_on "go" => :build

  def install
    system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"nats-streaming-server"
    prefix.install_metafiles
  end

  service do
    run opt_bin/"nats-streaming-server"
  end

  test do
    port = free_port
    http_port = free_port
    pid = fork do
      exec "#{bin}/nats-streaming-server",
           "--port=#{port}",<commit_msg>nats-streaming-server: update 0.23.1 bottle.<commit_after>class NatsStreamingServer < Formula
  desc "Lightweight cloud messaging system"
  homepage "https://nats.io"
  url "https://github.com/nats-io/nats-streaming-server/archive/refs/tags/v0.23.1.tar.gz"
  sha256 "bf25c099239f1d43a316d63d79f552dbd86f1b23bcb8e647d11d07d231be5dfd"
  license "Apache-2.0"
  head "https://github.com/nats-io/nats-streaming-server.git", branch: "main"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "f937ea2a78c8ef5ad6fc858423eb9ed4761bc56962de6ca40e62b232c3f7458c"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "c93e366145291bd820767a920ebd1c933dc3d842133fa5ad772bd441a6ecff52"
    sha256 cellar: :any_skip_relocation, monterey:       "d9d730b46485bf57968062aa42960e9173b45bc978b0c3f6c63453507c2dabc8"
    sha256 cellar: :any_skip_relocation, big_sur:        "07b8e72f00db316b5dd144a1d0619c7afd619a6389aaffde1c660eb3b3f2e35e"
    sha256 cellar: :any_skip_relocation, catalina:       "91686d2410d5978327e4b67ad4163335e263168fb2efd9cf34c7954383b9e0b9"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "8c08a368c5c5c3148bb36e8903d42689bc2fee808c28d3015f65691fceca9452"
  end

  depends_on "go" => :build

  def install
    system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"nats-streaming-server"
    prefix.install_metafiles
  end

  service do
    run opt_bin/"nats-streaming-server"
  end

  test do
    port = free_port
    http_port = free_port
    pid = fork do
      exec "#{bin}/nats-streaming-server",
           "--port=#{port}",
{'fraction_non_alphanumeric': 0.10170672239637757, 'fraction_numerical': 0.19296412399860677, 'mean_word_length': 4.802020202020202, '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': '341057', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1225, 'n_words': 164}