Skip to content

Commit a81c5f1

Browse files
committed
memcacheq 0.2.1
1 parent 92f17ff commit a81c5f1

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

Formula/m/memcacheq.rb

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
class Memcacheq < Formula
22
desc "Queue service for memcache"
3-
homepage "https://code.google.com/archive/p/memcacheq/"
4-
url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memcacheq/memcacheq-0.2.0.tar.gz"
5-
sha256 "b314c46e1fb80d33d185742afe3b9a4fadee5575155cb1a63292ac2f28393046"
3+
homepage "https://github.com/stvchu/memcacheq"
4+
url "https://github.com/stvchu/memcacheq/archive/refs/tags/v0.2.1.tar.gz"
5+
sha256 "ace33313568959b5a301dda491f63af09793987b73fd15abd3fb613829eda07e"
66
license "BSD-3-Clause"
7-
revision 5
87

98
bottle do
109
sha256 cellar: :any, arm64_sequoia: "f056c80f984e46a6a4d683ff08eb5832a19d589fc6c0824d75c4d749655fbe2b"
@@ -26,10 +25,24 @@ class Memcacheq < Formula
2625

2726
def install
2827
ENV.append "CFLAGS", "-std=gnu89"
29-
system "./configure", "--disable-debug",
30-
"--disable-dependency-tracking",
31-
"--prefix=#{prefix}",
32-
"--enable-threads"
28+
system "./configure", "--enable-threads", *std_configure_args
3329
system "make", "install"
3430
end
31+
32+
test do
33+
port = free_port
34+
pid = spawn(bin/"memcacheq", "-p", port.to_s, "-H", testpath)
35+
sleep 5
36+
TCPSocket.open("localhost", port) do |sock|
37+
sock.puts("set brew 2 0 3\r\n100\r\n")
38+
assert_equal "STORED\r\n", sock.gets
39+
sock.puts("stats queue\r\n")
40+
assert_equal "STAT brew 1/0\r\n", sock.gets
41+
ensure
42+
sock.close
43+
end
44+
ensure
45+
Process.kill "TERM", pid
46+
Process.wait pid
47+
end
3548
end

0 commit comments

Comments
 (0)