2017-08-17 21:54:34 +00:00
|
|
|
class Frugal < Formula
|
|
|
|
desc "Cross language code generator for creating scalable microservices"
|
|
|
|
homepage "https://github.com/Workiva/frugal"
|
2017-08-25 18:47:20 +00:00
|
|
|
url "https://github.com/Workiva/frugal/archive/2.9.0.tar.gz"
|
|
|
|
sha256 "f8be0d486d3b4480b56202653780385a429fb0d9e7598868c4ddfc1e1335dbeb"
|
2017-08-17 21:54:34 +00:00
|
|
|
|
2017-08-22 17:55:32 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2017-08-25 18:52:13 +00:00
|
|
|
sha256 "3042e3efa48bab9443569f13cedc01dae09bb8ae35852899567b6a195f9b2f98" => :sierra
|
|
|
|
sha256 "3f0b5a2b35a10b2171666bbee4ba3e656425cd7c78a6b63116f49bcea6de3d83" => :el_capitan
|
|
|
|
sha256 "e73d547528635e521a8af878748220b345545eaf4ce166172f3a89ec875c4a32" => :yosemite
|
2017-08-22 17:55:32 +00:00
|
|
|
end
|
|
|
|
|
2017-08-17 21:54:34 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
depends_on "godep" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
(buildpath/"src/github.com/Workiva/frugal").install buildpath.children
|
|
|
|
cd buildpath/"src/github.com/Workiva/frugal" do
|
|
|
|
system "godep", "restore"
|
|
|
|
system "go", "build", "-o", bin/"frugal"
|
|
|
|
prefix.install_metafiles
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.frugal").write("typedef double Test")
|
|
|
|
system "#{bin}/frugal", "--gen", "go", "test.frugal"
|
|
|
|
assert_match "type Test float64", (testpath/"gen-go/test/f_types.go").read
|
|
|
|
end
|
|
|
|
end
|