<commit_before>require "language/node"

class NetlifyCli < Formula
  desc "Netlify command-line tool"
  homepage "https://www.netlify.com/docs/cli"
  url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-3.2.3.tgz"
  sha256 "4c42a3159b4de0974d2dcfd1f64752495163cf4775c8653b7b2a334fe8792c44"
  license "MIT"
  head "https://github.com/netlify/cli.git"

  livecheck do
    url :stable
  end

  bottle do
    cellar :any_skip_relocation
    sha256 "0d119f727dec11bcb961bc0d10ec94b1b486eead19677e09b405cdeb44bad317" => :big_sur
    sha256 "eca867f743502e0a1d3f5ebaa277835c0332c985e6b3836a1bf877e4c0b2510f" => :arm64_big_sur
    sha256 "9d4e077cd24b42bf3ab2cbbfec584bcff7d2219ccbc33866dace0a09f98029cc" => :catalina
    sha256 "b73d2d309e6189e57fd45f235a1dd66590f4c4de3ce85f1cbb65d2889707a999" => :mojave
  end

  depends_on "node"

  uses_from_macos "expect" => :test

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.exp").write <<~EOS
      spawn #{bin}/netlify login
      expect "Opening"<commit_msg>netlify-cli: update 3.2.3 bottle.<commit_after>require "language/node"

class NetlifyCli < Formula
  desc "Netlify command-line tool"
  homepage "https://www.netlify.com/docs/cli"
  url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-3.2.3.tgz"
  sha256 "4c42a3159b4de0974d2dcfd1f64752495163cf4775c8653b7b2a334fe8792c44"
  license "MIT"
  head "https://github.com/netlify/cli.git"

  livecheck do
    url :stable
  end

  bottle do
    cellar :any_skip_relocation
    sha256 "3c786d4b4c0f56a8b591a14f57af037f05ff808b14734749428b7925052d0358" => :big_sur
    sha256 "06c7facb474b12129d9a95e8cda5a2accc77373b9a4718581cab48803ca35edf" => :arm64_big_sur
    sha256 "43b8c98fd8760ea3d1de4c33fe5298d607c8ba31b5068928a9ae25656522ca97" => :catalina
    sha256 "d53aa1593813db052e6495facc8132fd81c2290c94a7c05647b9134a3a3a219a" => :mojave
  end

  depends_on "node"

  uses_from_macos "expect" => :test

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"test.exp").write <<~EOS
      spawn #{bin}/netlify login
      expect "Opening"
{'fraction_non_alphanumeric': 0.10491659350307288, 'fraction_numerical': 0.19754170324846357, 'mean_word_length': 4.873711340206185, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '3999946', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1005, 'n_words': 130}