blob: 6e0d74177ac443102b72a4bfdec7731c7793c673 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
require 'formula'
class Drake < Formula
homepage 'https://github.com/Factual/drake'
url 'https://github.com/Factual/drake/releases/download/v0.1.6/drake.jar'
version '0.1.6'
sha1 '43870cf657a70fd484093f452ceab22fb4c33d3c'
def install
libexec.install Dir['*']
bin.write_jar_script libexec/'drake.jar', 'drake'
end
test do
# count lines test
(testpath/'Drakefile').write <<-EOS.undent
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
system bin/"drake", "--auto", "--workflow=#{testpath}/Drakefile", "+..."
end
end
|