homebrew-core/Formula/flow.rb

34 lines
1.1 KiB
Ruby
Raw Normal View History

require "formula"
class Flow < Formula
desc "Static type checker for JavaScript"
homepage "http://flowtype.org/"
url "https://github.com/facebook/flow/archive/v0.12.0.tar.gz"
sha1 "fd8edf6cf291d66bc20053dd02eb66507f36023a"
head "https://github.com/facebook/flow.git"
2014-11-19 10:16:30 +00:00
bottle do
cellar :any
2015-06-12 00:46:47 +00:00
sha256 "fd20aff1d786aadebfd990ed571b0cca8d93083a8bda89245a89f5ac9dd70a55" => :yosemite
sha256 "16516306bae3cb264733f706fbb6ea5ede2b25d7aedc32a21663964741e62417" => :mavericks
sha256 "2a6fc52ef06dbce0bb65f3ffb4022681e3ccfca67526f86cc5e36e87ce2d4de5" => :mountain_lion
2014-11-19 10:16:30 +00:00
end
depends_on "objective-caml" => :build
def install
system "make"
bin.install "bin/flow"
(share/"flow").install "bin/examples"
bash_completion.install "resources/shell/bash-completion" => "flow-completion.bash"
zsh_completion.install_symlink bash_completion/"flow-completion.bash" => "_flow"
end
test do
output = `#{bin}/flow single #{share}/flow/examples/01_HelloWorld`
assert_match(/This type is incompatible with/, output)
assert_match(/Found 1 error/, output)
end
end