2019-02-19 14:29:27 +00:00
|
|
|
require "open3"
|
|
|
|
|
|
|
|
class Riff < Formula
|
|
|
|
desc "Function As A Service on top of Knative, riff is for functions"
|
|
|
|
homepage "https://www.projectriff.io/"
|
|
|
|
url "https://github.com/projectriff/riff.git",
|
2019-05-20 19:16:35 +00:00
|
|
|
:tag => "v0.3.1",
|
|
|
|
:revision => "1ff6c6d7a708e52eb6843e89f9a618fcbfebbb9f"
|
2019-02-19 14:29:27 +00:00
|
|
|
|
2019-02-25 10:21:00 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-05-20 19:53:26 +00:00
|
|
|
sha256 "5ef5559484851d1f28cd7f56b5cf0d88195378f3c9133001a0364445c5481877" => :mojave
|
|
|
|
sha256 "0e8406d6c8bfd1ff1626b7205b81cbcb23684ba500eb83532b67401de2bf70d7" => :high_sierra
|
|
|
|
sha256 "b68904bdb3b97e33541de373a7add5783400145f417e42561cae8dff74cd05ef" => :sierra
|
2019-02-25 10:21:00 +00:00
|
|
|
end
|
|
|
|
|
2019-02-19 14:29:27 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
depends_on "kubernetes-cli"
|
|
|
|
|
|
|
|
def install
|
2019-04-10 12:28:11 +00:00
|
|
|
cd buildpath do
|
2019-02-19 14:29:27 +00:00
|
|
|
system "make", "build"
|
|
|
|
bin.install "riff"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2019-04-10 12:28:11 +00:00
|
|
|
stdout, stderr, status = Open3.capture3("#{bin}/riff --kubeconfig not-a-kube-config-file service list")
|
2019-02-19 14:29:27 +00:00
|
|
|
|
|
|
|
assert_equal false, status.success?
|
2019-04-10 12:28:11 +00:00
|
|
|
assert_match "List service resources", stdout
|
2019-02-19 14:29:27 +00:00
|
|
|
assert_match "Error: stat not-a-kube-config-file: no such file or directory", stderr
|
|
|
|
end
|
|
|
|
end
|