From 334b17b1bc20921afd452790647ce5cbbe4e4301 Mon Sep 17 00:00:00 2001 From: Michael Bensoussan Date: Mon, 9 Feb 2015 22:26:40 +0100 Subject: vegeta 5.5.2 (new formula) Closes #36685. Signed-off-by: Mike McQuaid --- Library/Formula/vegeta.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Library/Formula/vegeta.rb (limited to 'Library') diff --git a/Library/Formula/vegeta.rb b/Library/Formula/vegeta.rb new file mode 100644 index 000000000..07a46385c --- /dev/null +++ b/Library/Formula/vegeta.rb @@ -0,0 +1,28 @@ +require "language/go" + +class Vegeta < Formula + homepage "https://github.com/tsenart/vegeta" + url "https://github.com/tsenart/vegeta/archive/v5.5.2.tar.gz" + sha1 "a0b2d4c4bca0023a8407a819f64c3f96e1ebe3bc" + + depends_on "go" => :build + + go_resource "github.com/bmizerany/perks" do + url "https://github.com/bmizerany/perks.git", + :revision => "6cb9d9d729303ee2628580d9aec5db968da3a607" + end + + def install + mkdir_p buildpath/"src/github.com/tsenart/" + ln_s buildpath, buildpath/"src/github.com/tsenart/vegeta" + ENV["GOPATH"] = buildpath + Language::Go.stage_deps resources, buildpath/"src" + + system "go", "build", "-o", "vegeta" + bin.install "vegeta" + end + + test do + pipe_output("#{bin}/vegeta attack -duration=1s -rate=1", "GET http://localhost/") + end +end -- cgit v1.2.3