2014-11-18 18:57:59 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Flow < Formula
|
|
|
|
homepage "http://flowtype.org/"
|
2015-05-13 03:36:48 +00:00
|
|
|
url "https://github.com/facebook/flow/archive/v0.11.0.tar.gz"
|
|
|
|
sha1 "714ad08030aab07acf76bf4b6c2603a8b193881d"
|
2014-11-18 18:57:59 +00:00
|
|
|
head "https://github.com/facebook/flow.git"
|
|
|
|
|
2014-11-19 10:16:30 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-13 06:02:46 +00:00
|
|
|
sha256 "031eb5ac7f75e6e7a12c038543764012dd91cae67a185b61cdc20059b0b4ab6d" => :yosemite
|
|
|
|
sha256 "e16e00a1d182c84c9eddfd57bf8e72974d6704710f70b821506c63d5ce373ae0" => :mavericks
|
|
|
|
sha256 "95fa7f28d058a7c3e0ce2b0fa33da6166718f5412473d8f7bbebbef2b4f8439b" => :mountain_lion
|
2014-11-19 10:16:30 +00:00
|
|
|
end
|
|
|
|
|
2014-11-18 18:57:59 +00:00
|
|
|
depends_on "objective-caml" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make"
|
|
|
|
bin.install "bin/flow"
|
|
|
|
(share/"flow").install "bin/examples"
|
|
|
|
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
|