<commit_before>require "language/node"

class Heroku < Formula
  desc "Command-line client for the cloud PaaS"
  homepage "https://cli.heroku.com"
  # heroku should only be updated every 10 releases on multiples of 10
  url "https://registry.npmjs.org/heroku/-/heroku-7.5.10.tgz"
  sha256 "603cacfe71415ed06d0d75862391e9d30dcbc9bb1afc2065b0271422a46d7654"
  head "https://github.com/heroku/cli.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "1915ef8d9208a6bf18ebfae992347d7e9cf9a0b7e94cbd0263b9b8919d0821ae" => :high_sierra
    sha256 "09a844cf367eaaa24146eb866abc6e510b53f281ffaba09131ac3fe79e33828c" => :sierra
    sha256 "10e582480f728e2fb2c2e8b73e9fefa2ecf3c8bb59ad693c59fc264d51efc1cf" => :el_capitan
  end

  depends_on "node"

  def install
    # disable migrator
    inreplace "lib/hooks/update/brew.js", "if (this.config.platform !== 'darwin')",
                                          "if (true)"

    # disable outdated check
    inreplace "package.json", /.*plugin-warn-if-update-available.*$\n/, ""

    # replace `heroku update` messaging
    inreplace "bin/run", "npm update -g heroku", "brew upgrade heroku"

    inreplace "bin/run", "#!/usr/bin/env node",
                         "#!#{Formula["node"].opt_bin}/node"
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do<commit_msg>heroku 7.6.0<commit_after>require "language/node"

class Heroku < Formula
  desc "Command-line client for the cloud PaaS"
  homepage "https://cli.heroku.com"
  # heroku should only be updated every 10 releases on multiples of 10
  url "https://registry.npmjs.org/heroku/-/heroku-7.6.0.tgz"
  sha256 "250f64b81d6895a5aa3ccd394dc1295f79132d8b4a26243363bf6ea9d1927c8d"
  head "https://github.com/heroku/cli.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "1915ef8d9208a6bf18ebfae992347d7e9cf9a0b7e94cbd0263b9b8919d0821ae" => :high_sierra
    sha256 "09a844cf367eaaa24146eb866abc6e510b53f281ffaba09131ac3fe79e33828c" => :sierra
    sha256 "10e582480f728e2fb2c2e8b73e9fefa2ecf3c8bb59ad693c59fc264d51efc1cf" => :el_capitan
  end

  depends_on "node"

  def install
    # disable migrator
    inreplace "lib/hooks/update/brew.js", "if (this.config.platform !== 'darwin')",
                                          "if (true)"

    # disable outdated check
    inreplace "package.json", /.*plugin-warn-if-update-available.*$\n/, ""

    # replace `heroku update` messaging
    inreplace "bin/run", "npm update -g heroku", "brew upgrade heroku"

    inreplace "bin/run", "#!/usr/bin/env node",
                         "#!#{Formula["node"].opt_bin}/node"
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
{'fraction_non_alphanumeric': 0.12, 'fraction_numerical': 0.12321428571428572, 'mean_word_length': 3.576797385620915, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '573866', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1062, 'n_words': 184}