2014-11-18 18:57:59 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Flow < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Static type checker for JavaScript"
|
2014-11-18 18:57:59 +00:00
|
|
|
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-06-03 04:50:59 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "6e099b230e6daaaf57f365d5a5c054d83279deaeb5144612ab427498fe9ec980" => :yosemite
|
|
|
|
sha256 "5737613181baca6a3659d98f8745c0525685067fa327ba48c0a595f3cd5550dc" => :mavericks
|
|
|
|
sha256 "f364b3e00ec533ca5189a3ea9583c9b2d8e89437a0368674cf0774d90fa65b8d" => :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"
|
2015-06-02 21:22:02 +00:00
|
|
|
|
|
|
|
bash_completion.install "resources/shell/bash-completion" => "flow-completion.bash"
|
|
|
|
zsh_completion.install_symlink bash_completion/"flow-completion.bash" => "_flow"
|
2014-11-18 18:57:59 +00:00
|
|
|
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
|