2014-11-18 18:57:59 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Flow < Formula
|
|
|
|
homepage "http://flowtype.org/"
|
2014-11-27 01:28:30 +00:00
|
|
|
url "https://github.com/facebook/flow/archive/v0.1.2.tar.gz"
|
|
|
|
sha1 "776dd272707c4c640c44aeb127e5485f977c803f"
|
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
|
2014-11-20 06:13:56 +00:00
|
|
|
sha1 "d5bcb891128f8efa2290082859016183cc16aaf1" => :yosemite
|
|
|
|
sha1 "fb6245516745eb00bd0b32b5e5330aa298f18cb2" => :mavericks
|
|
|
|
sha1 "9507787f95b91c48528a8717436d9e2f865383b8" => :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
|