aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorRyan Duryea2014-05-07 15:59:45 -0700
committerJack Nagel2014-05-10 11:02:01 -0500
commitd497e9b73253c539f142e4ac7b6950ce2fee0898 (patch)
tree9ad0e2091e59316699c21ecf7bd22797650368b8 /Library/Formula
parent1f57d8c8596f8cbaa231af8cee4658de2fd79ffa (diff)
downloadhomebrew-d497e9b73253c539f142e4ac7b6950ce2fee0898.tar.bz2
pgFormatter 1.2
A PostgreSQL SQL syntax beautifier Closes #29047. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pgformatter.rb20
1 files changed, 20 insertions, 0 deletions
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