44 lines
1.2 KiB
Ruby
44 lines
1.2 KiB
Ruby
class Lgogdownloader < Formula
|
|
desc "Unofficial downloader for GOG.com games"
|
|
homepage "https://sites.google.com/site/gogdownloader/"
|
|
url "https://sites.google.com/site/gogdownloader/lgogdownloader-3.3.tar.gz"
|
|
sha256 "8bb7a37b48f558bddeb662ebac32796b0ae11fa2cc57a03d48b3944198e800ce"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "9f8154a12de734c98441293e1b4f6c6eda06999de22126bbef5a7b712cc3f85d" => :high_sierra
|
|
sha256 "ca90e4513aeef6e3dcb7ec3f2668e4951ba32d9def5e958c3e2ffdeade3195d2" => :sierra
|
|
sha256 "d8fd1d6b73bc6d80d8f35def08bc28115c919d7d4de92b1480fff75cd16a4d2e" => :el_capitan
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "help2man" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "htmlcxx"
|
|
depends_on "jsoncpp"
|
|
depends_on "liboauth"
|
|
depends_on "rhash"
|
|
depends_on "tinyxml2"
|
|
|
|
def install
|
|
system "cmake", ".", *std_cmake_args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
require "pty"
|
|
|
|
ENV["XDG_CONFIG_HOME"] = testpath
|
|
reader, writer = PTY.spawn(bin/"lgogdownloader", "--list", "--retries", "1")
|
|
writer.write <<~EOS
|
|
test@example.com
|
|
secret
|
|
EOS
|
|
writer.close
|
|
assert_equal "HTTP: Login failed", reader.read.lines.last.chomp
|
|
reader.close
|
|
end
|
|
end
|