prest 0.3.5
Closes #58796. Signed-off-by: Dawid Dziurla <dawidd0811@gmail.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
56e565971d
commit
69a1f307dc
|
@ -1,9 +1,10 @@
|
|||
class Prest < Formula
|
||||
desc "Serve a RESTful API from any PostgreSQL database"
|
||||
homepage "https://github.com/prest/prest"
|
||||
url "https://github.com/prest/prest/archive/v0.3.4.tar.gz"
|
||||
sha256 "cc45eb5de17a1957124545e11ae6dcc6e3957e9d5e9b06acf37a341113963829"
|
||||
url "https://github.com/prest/prest/archive/v0.3.5.tar.gz"
|
||||
sha256 "35aa1faaa33a47526cb836562ab095bcf610dbc3da4a569eebcbab0a8dd92e7a"
|
||||
license "MIT"
|
||||
head "https://github.com/prest/prest.git"
|
||||
|
||||
bottle do
|
||||
cellar :any_skip_relocation
|
||||
|
@ -17,14 +18,15 @@ class Prest < Formula
|
|||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
system "go", "build", "-ldflags",
|
||||
"-s -w -X github.com/prest/helpers.PrestVersionNumber=#{version}",
|
||||
"-trimpath",
|
||||
"-o", bin/"prest"
|
||||
prefix.install_metafiles
|
||||
system "go", "build", *std_go_args, "-ldflags",
|
||||
"-s -w -X github.com/prest/helpers.PrestVersionNumber=#{version}"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match version.to_s, shell_output("#{bin}/prest version")
|
||||
output_regex = /Version (?<migration>\d+) migration files created in .*:/
|
||||
output = shell_output("prest migrate create test --path .")
|
||||
migration = output.match(output_regex)[:migration]
|
||||
assert_predicate testpath/"#{migration}_test.down.sql", :exist?
|
||||
assert_predicate testpath/"#{migration}_test.up.sql", :exist?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue