homebrew-core/Formula/insect.rb

28 lines
975 B
Ruby
Raw Normal View History

require "language/node"
class Insect < Formula
desc "High precision scientific calculator with support for physical units"
homepage "https://insect.sh/"
url "https://registry.npmjs.org/insect/-/insect-4.7.0.tgz"
sha256 "a5f5fbd4f4a50362e611a7be7585fb24b973219857f8a56290ae4b95b7f1f00f"
2017-06-25 12:00:40 +00:00
bottle do
cellar :any_skip_relocation
sha256 "d46b57f2dbd454ecb340e9a0266f079e812a397fbf9a3753622ba26e5c7f1f84" => :sierra
sha256 "92c3083d92ae55201cd7b2e2787ba780a759a67ba9f132fe0f0fb59d46e515a8" => :el_capitan
sha256 "cb53d9e023b9ac9d2c2bd415c244a1fcdfe5e65a0763445eb5f841474edd24a1" => :yosemite
end
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 "120000 ms", shell_output("#{bin}/insect '1 min + 60 s -> ms'").chomp
assert_equal "299792458 m/s", shell_output("#{bin}/insect speedOfLight").chomp
end
end