2013-12-01 18:00:09 +00:00
|
|
|
class Drake < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Data workflow tool meant to be 'make for data'"
|
2015-06-29 09:20:16 +00:00
|
|
|
homepage "https://github.com/Factual/drake"
|
2015-07-23 09:21:18 +00:00
|
|
|
url "https://raw.githubusercontent.com/Factual/drake/1.0.1/bin/drake-pkg"
|
|
|
|
version "1.0.1"
|
|
|
|
sha256 "adeb0bb14dbe39789273c5c766da9a019870f2a491ba1f0c8c328bd9a95711cc"
|
2015-06-29 09:20:16 +00:00
|
|
|
head "https://github.com/Factual/drake.git"
|
|
|
|
|
2015-07-06 10:23:35 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-07-23 11:35:39 +00:00
|
|
|
sha256 "e4ee3af345696cf803595939d098879912dae3e6ba2527609ebd53b6d0f1eae3" => :yosemite
|
|
|
|
sha256 "aecf20701580e0bf885180114d019b0892f9ee108da60a8aba5bc119897a9d13" => :mavericks
|
|
|
|
sha256 "70caad1ee5b8f61aaa9cd62f5ff3f4bd456b4e2fc9a6309c127a45cee4375c76" => :mountain_lion
|
2015-07-06 10:23:35 +00:00
|
|
|
end
|
|
|
|
|
2015-06-29 09:20:16 +00:00
|
|
|
resource "jar" do
|
2015-07-23 09:21:18 +00:00
|
|
|
url "https://github.com/Factual/drake/releases/download/1.0.1/drake.jar"
|
|
|
|
sha256 "2d4350fe00c3a591900ab74d3155019fa4d1f1f70559600e3651909ce4d4f2f6"
|
2015-06-29 09:20:16 +00:00
|
|
|
end
|
2013-12-01 18:00:09 +00:00
|
|
|
|
|
|
|
def install
|
2015-06-29 09:20:16 +00:00
|
|
|
jar = "drake-#{version}-standalone.jar"
|
|
|
|
inreplace "drake-pkg", /DRAKE_JAR/, libexec/jar
|
|
|
|
bin.install "drake-pkg" => "drake"
|
|
|
|
resource("jar").stage do
|
|
|
|
libexec.install "drake.jar" => jar
|
|
|
|
end
|
2013-12-01 18:00:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# count lines test
|
2015-06-29 09:20:16 +00:00
|
|
|
(testpath/"Drakefile").write <<-EOS.undent
|
2013-12-01 18:00:09 +00:00
|
|
|
find_lines <- [shell]
|
|
|
|
echo 'drake' > $OUTPUT
|
|
|
|
|
|
|
|
count_drakes_lines <- find_lines
|
|
|
|
cat $INPUT | wc -l > $OUTPUT
|
|
|
|
EOS
|
|
|
|
|
|
|
|
# force run (no user prompt) the full workflow
|
2014-04-05 03:02:48 +00:00
|
|
|
system bin/"drake", "--auto", "--workflow=#{testpath}/Drakefile", "+..."
|
2013-12-01 18:00:09 +00:00
|
|
|
end
|
|
|
|
end
|