bitwarden 1.0.0 (new formula)

Closes #28201.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Kyle Spearrin 2018-05-23 20:35:31 -04:00 committed by ilovezfs
parent a3a4ac468b
commit bbb45c3277

22
Formula/bitwarden-cli.rb Normal file
View file

@ -0,0 +1,22 @@
require "language/node"
class BitwardenCli < Formula
desc "Secure and free password manager for all of your devices"
homepage "https://bitwarden.com/"
url "https://registry.npmjs.org/@bitwarden/cli/-/cli-1.0.0.tgz"
sha256 "75475a7eb9c728b0b16c1a69d397391019617cfbf73304bcc8724d9fd32aec47"
depends_on "node"
def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
assert_equal 10, shell_output("#{bin}/bw generate --length 10").chomp.length
output = pipe_output("#{bin}/bw encode", "Testing", 0)
assert_equal "VGVzdGluZw==", output.chomp
end
end