<commit_before>class Thanos < Formula
  desc "Highly available Prometheus setup with long term storage capabilities"
  homepage "https://thanos.io"
  url "https://github.com/thanos-io/thanos/archive/v0.22.0.tar.gz"
  sha256 "dd3b86719efee738402c6b9ce0686055447ae9ab5ce9a64c3a357c914c651073"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "dc0d0653d316182d3337117ed6d139ca0610c6ae3cfb984ccb9bfff53b86bb32"
    sha256 cellar: :any_skip_relocation, big_sur:       "56961cbfcb49226f7ecee46c1225a013a34dcd76167952a20e90b853bebc2e74"
    sha256 cellar: :any_skip_relocation, catalina:      "69166b1da6ee07d6257fb3334f992ef168e83012dea18a011ab786eccf670277"
    sha256 cellar: :any_skip_relocation, mojave:        "9fa302ae777114c48f92e3347b09e26157098465b860a26496763e0d9218272f"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "42414e4b433bc5f3774b6fed59c44c47c02cf1d1fd14027f760f037dc7045e67"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/thanos"
  end

  test do
    (testpath/"bucket_config.yaml").write <<~EOS
      type: FILESYSTEM
      config:
        directory: #{testpath}
    EOS

    output = shell_output("#{bin}/thanos tools bucket inspect --objstore.config-file bucket_config.yaml")<commit_msg>thanos: update 0.22.0 bottle.<commit_after>class Thanos < Formula
  desc "Highly available Prometheus setup with long term storage capabilities"
  homepage "https://thanos.io"
  url "https://github.com/thanos-io/thanos/archive/v0.22.0.tar.gz"
  sha256 "dd3b86719efee738402c6b9ce0686055447ae9ab5ce9a64c3a357c914c651073"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "2880c66594b2c4932fdba9d90b6ce301b94efa44d86b2e8fee3dad1f4cc4797a"
    sha256 cellar: :any_skip_relocation, big_sur:       "5cccad8e8adad38d8369aaae9f1df6ee11caa88a478b45d415d3980774cd3a45"
    sha256 cellar: :any_skip_relocation, catalina:      "16e895b9bfee9ab77b11bc0d3637088dd1e0e72e127b3aa3a45aa34ff6f31f1c"
    sha256 cellar: :any_skip_relocation, mojave:        "0cae3c6b0145d195576eec2d90540d894a495fe990eadb177dfac760aaa61f83"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "440d556924f3826b62f0f5a4814a5b52cbf3b9c22ec5eb0b423007e61a23cb67"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/thanos"
  end

  test do
    (testpath/"bucket_config.yaml").write <<~EOS
      type: FILESYSTEM
      config:
        directory: #{testpath}
    EOS

    output = shell_output("#{bin}/thanos tools bucket inspect --objstore.config-file bucket_config.yaml")
{'fraction_non_alphanumeric': 0.0900225056264066, 'fraction_numerical': 0.204801200300075, 'mean_word_length': 5.13103448275862, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '4777366', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1122, 'n_words': 160}