Skip to content

Commit

Permalink
now-cli 16.1.2 (new formula)
Browse files Browse the repository at this point in the history
Closes #41998.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
  • Loading branch information
JounQin authored and fxcoudert committed Aug 28, 2019
1 parent d3d3b64 commit d2fe971
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Formula/now-cli.rb
@@ -0,0 +1,24 @@
require "language/node"

class NowCli < Formula
desc "The command-line interface for Now"
homepage "https://zeit.co/now"
url "https://registry.npmjs.org/now/-/now-16.1.2.tgz"
sha256 "c4e2c599e99918b2e7cf1e71ae4ff06888264fb13d6656c4c0407e3608575bfc"

depends_on "node"

def install
rm Dir["dist/{*.exe,xsel}"]
inreplace "dist/index.js", "t.default=getUpdateCommand",
"t.default=async()=>'brew upgrade now-cli'"
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
system "#{bin}/now", "init", "markdown"
assert_predicate testpath/"markdown/now.json", :exist?, "now.json must exist"
assert_predicate testpath/"markdown/README.md", :exist?, "README.md must exist"
end
end

0 comments on commit d2fe971

Please sign in to comment.