2015-05-07 20:48:09 +00:00
|
|
|
class Fmpp < Formula
|
2016-01-24 22:22:40 +00:00
|
|
|
desc "Text file preprocessing tool using FreeMarker templates."
|
2015-05-07 20:48:09 +00:00
|
|
|
homepage "http://fmpp.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/fmpp/fmpp/0.9.15/fmpp_0.9.15.tar.gz"
|
|
|
|
sha256 "b893451b5450a7f35fe680e934f6903ec8143d88959dcfca5d17467fbe4142f9"
|
|
|
|
head "https://github.com/freemarker/fmpp.git"
|
|
|
|
|
2015-10-23 11:02:08 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-05-07 20:48:09 +00:00
|
|
|
depends_on :java
|
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install "lib"
|
|
|
|
bin.write_jar_script libexec/"lib/fmpp.jar", "fmpp", "-Dfmpp.home=#{libexec} $FMPP_OPTS $FMPP_ARGS"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"input").write '<#assign foo="bar"/>${foo}'
|
2015-10-03 19:10:04 +00:00
|
|
|
system bin/"fmpp", "input", "-o", "output"
|
2015-05-07 20:48:09 +00:00
|
|
|
assert File.exist? "output"
|
|
|
|
assert_equal("bar", File.read("output"))
|
|
|
|
end
|
|
|
|
end
|