<commit_before>class Click < Formula
  desc "The command-line interactive controller for Kubernetes"
  homepage "https://github.com/databricks/click"
  url "https://github.com/databricks/click/archive/v0.5.0.tar.gz"
  sha256 "0d7b119d73f830a7cef2339e86cfa1bbfe0ce9fb57a00cce343d3e271a824dc4"
  head "https://github.com/databricks/click.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "d4f0029a38738bd96c34e257ffa4d32a65452354b94c9feee6d12c35af8be770" => :catalina
    sha256 "57598c45faa3379b4585686fbc6074f9755a01a733f4a6370ca5034756340b8f" => :mojave
    sha256 "1da2b335adabf93bb8fd8bcfb772721ba6f89bb4d71ee9c8ef99e93afa0a6ca7" => :high_sierra
  end

  depends_on "rust" => :build

  uses_from_macos "expect" => :test

  def install
    system "cargo", "install", "--locked", "--root", prefix, "--path", "."
  end

  test do
    mkdir testpath/"config"
    # Default state configuration file to avoid warning on startup
    (testpath/"config/click.config").write <<~EOS
      ---
      namespace: ~
      context: ~
      editor: ~
      terminal: ~
    EOS

    # Fake K8s configuration
    (testpath/"config/config").write <<~EOS
      apiVersion: v1
      clusters:<commit_msg>click: update 0.5.0 bottle.<commit_after>class Click < Formula
  desc "The command-line interactive controller for Kubernetes"
  homepage "https://github.com/databricks/click"
  url "https://github.com/databricks/click/archive/v0.5.0.tar.gz"
  sha256 "0d7b119d73f830a7cef2339e86cfa1bbfe0ce9fb57a00cce343d3e271a824dc4"
  head "https://github.com/databricks/click.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "890704d50d503be704a4ba42eaf4e00744498018665c387dfdfbb3e8e90821c3" => :catalina
    sha256 "504036658e9d97db5629fbd60a42fe09c7d173a4d87369eb352db4882d4e40e5" => :mojave
    sha256 "e42bd20ff9d3f6fd6d0c298e6b9c1692a0fd0535156e9a4e70ff9964d79c3693" => :high_sierra
  end

  depends_on "rust" => :build

  uses_from_macos "expect" => :test

  def install
    system "cargo", "install", "--locked", "--root", prefix, "--path", "."
  end

  test do
    mkdir testpath/"config"
    # Default state configuration file to avoid warning on startup
    (testpath/"config/click.config").write <<~EOS
      ---
      namespace: ~
      context: ~
      editor: ~
      terminal: ~
    EOS

    # Fake K8s configuration
    (testpath/"config/config").write <<~EOS
      apiVersion: v1
      clusters:
{'fraction_non_alphanumeric': 0.10972568578553615, 'fraction_numerical': 0.14546965918536992, 'mean_word_length': 3.823647294589178, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '59462', 'n_tokens_mistral': 1117, 'n_tokens_neox': 930, 'n_words': 154}