From d497e9b73253c539f142e4ac7b6950ce2fee0898 Mon Sep 17 00:00:00 2001 From: Ryan Duryea Date: Wed, 7 May 2014 15:59:45 -0700 Subject: pgFormatter 1.2 A PostgreSQL SQL syntax beautifier Closes #29047. Signed-off-by: Jack Nagel --- Library/Formula/pgformatter.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Library/Formula/pgformatter.rb (limited to 'Library/Formula') diff --git a/Library/Formula/pgformatter.rb b/Library/Formula/pgformatter.rb new file mode 100644 index 000000000..6b90db5c1 --- /dev/null +++ b/Library/Formula/pgformatter.rb @@ -0,0 +1,20 @@ +require "formula" + +class Pgformatter < Formula + homepage "http://sqlformat.darold.net/" + url "https://downloads.sourceforge.net/project/pgformatter/1.2/pgFormatter-1.2.tar.gz" + sha1 "598c39fa7f3f511aa376e7a18457139a9393fe74" + + def install + system "perl", "Makefile.PL", "DESTDIR=." + system "make", "install" + bin.install "blib/script/pg_format" + man1.install "blib/man1/pg_format.1" + end + + test do + test_file = (testpath/'test.sql') + test_file.write('SELECT * FROM foo') + system "#{bin}/pg_format", test_file + end +end -- cgit v1.2.3