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"
|
|
|
|
url "https://raw.githubusercontent.com/Factual/drake/1.0.0/bin/drake-pkg"
|
|
|
|
version "1.0.0"
|
|
|
|
sha256 "6b75504f85f01a7d213c60f87e7da0d94a4961bbc7e9b7e90f79efcc38ae5165"
|
|
|
|
head "https://github.com/Factual/drake.git"
|
|
|
|
|
2015-07-06 10:23:35 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "0e1d17ad42bb1bd51792aa625664f1d1fb12748ac2f1783a53da4c6e6ba74124" => :yosemite
|
|
|
|
sha256 "7f1113ff253e4dccb34f54ff710da37738d39ce60fe014a97103af38a848fdb8" => :mavericks
|
|
|
|
sha256 "9b83197b887b6ce5f7912afbebcad3dff4c550b4057b45673d826982f94e481f" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-06-29 09:20:16 +00:00
|
|
|
resource "jar" do
|
|
|
|
url "https://github.com/Factual/drake/releases/download/1.0.0/drake.jar"
|
|
|
|
sha256 "f601f059dd23f87ccb1fa9ce1c39067e8bbeed36f08820769c6132c311e99aa8"
|
|
|
|
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
|