forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplay13.rb
30 lines (26 loc) · 929 Bytes
/
play13.rb
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
28
29
30
class Play13 < Formula
homepage "https://www.playframework.org/"
url "https://github.com/playframework/play1/releases/download/1.3.2/play-1.3.2.zip"
sha256 "b88e99fa4ab64c4efe4f87adeb48522f6d5d0397397cd4d7fd1937b8ce51f44c"
bottle :unneeded
conflicts_with "sox", :because => "Both install a `play` executable"
conflicts_with "play12", :because => "Both install a `play` executable"
conflicts_with "play22", :because => "Both install a `play` executable"
def install
rm_rf "python" # we don't need the bundled Python for windows
rm Dir["*.bat"]
libexec.install Dir["*"]
chmod 0755, libexec/"play"
bin.install_symlink libexec/"play"
end
test do
require "open3"
Open3.popen3("#{bin}/play new #{testpath}/app") do |stdin, _, _|
stdin.write "\n"
stdin.close
end
%W[app conf lib public test].each do |d|
File.directory? testpath/"app/#{d}"
end
end
end