diff options
| author | Ryan Duryea | 2014-05-07 15:59:45 -0700 |
|---|---|---|
| committer | Jack Nagel | 2014-05-10 11:02:01 -0500 |
| commit | d497e9b73253c539f142e4ac7b6950ce2fee0898 (patch) | |
| tree | 9ad0e2091e59316699c21ecf7bd22797650368b8 /Library | |
| parent | 1f57d8c8596f8cbaa231af8cee4658de2fd79ffa (diff) | |
| download | homebrew-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')
| -rw-r--r-- | Library/Formula/pgformatter.rb | 20 |
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 |
