blob: 3b3663ff51ae65f7c56dad9f897102c00966f113 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 | require "formula"
class Pgformatter < Formula
  homepage "http://sqlformat.darold.net/"
  url "https://github.com/darold/pgFormatter/archive/v1.4.tar.gz"
  sha1 "bdbeefd9b3d8088a69816d3f578453c4a886feae"
  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
 |