aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMichael Bensoussan2015-02-09 22:26:40 +0100
committerMike McQuaid2015-02-19 16:47:31 +0000
commit334b17b1bc20921afd452790647ce5cbbe4e4301 (patch)
treeda8cf4d94ed4dc78bce314c26719c5952ec52704 /Library/Formula
parent9ce6df556c35d4d79a6f9fe5bf8c3a1962cd444b (diff)
downloadhomebrew-334b17b1bc20921afd452790647ce5cbbe4e4301.tar.bz2
vegeta 5.5.2 (new formula)
Closes #36685. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/vegeta.rb28
1 files changed, 28 insertions, 0 deletions
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