Skip to content

Commit 7a0f465

Browse files
authored
Merge pull request #228217 from Wan-Hao/gbox-0.0.11
gbox 0.0.19 (new formula)
2 parents a5a9c75 + 40574c0 commit 7a0f465

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Formula/g/gbox.rb

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
class Gbox < Formula
2+
desc "Self-hostable sandbox for AI Agents to execute commands and surf web"
3+
homepage "https://gbox.ai"
4+
url "https://github.com/babelcloud/gbox/releases/download/v0.0.19/gbox-v0.0.19.tar.gz"
5+
sha256 "41e94e96a756bb4ec81d049080fe15b45d5b3c59785f54965daa364aa7813331"
6+
license "Apache-2.0"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d51e41d35226cf0d9ef00cce72729598114e8eb7d5a52e5fcd33051bd3134b05"
10+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "22ed6fba82e288fc6c79e7fa46ae0d88bafe74db49836753b2bc52869fd1f179"
11+
sha256 cellar: :any_skip_relocation, arm64_ventura: "2737330361a010efb1a7557e1c781e91cd78337e8ab9a52414190d6e111e8bd4"
12+
sha256 cellar: :any_skip_relocation, sonoma: "ffa31a5cd0c2eae8b9c94d8627bd2f13567d14b9146973af1d2748ac3c15e014"
13+
sha256 cellar: :any_skip_relocation, ventura: "f6c1211cc95356191a961c4e9a241eb2e5942c8fad2dcf898820c7cae6914839"
14+
sha256 cellar: :any_skip_relocation, x86_64_linux: "9cfe0d53c7df446dd566082012c6cd27a5feea2faea58c2e6c448a996741c4fd"
15+
end
16+
17+
depends_on "go" => :build
18+
depends_on "rsync" => :build
19+
depends_on "yq"
20+
21+
uses_from_macos "jq"
22+
23+
def install
24+
system "make", "install", "prefix=#{prefix}", "VERSION=#{version}", "COMMIT_ID=#{File.read("COMMIT")}", "BUILD_TIME=#{time.iso8601}"
25+
generate_completions_from_executable(bin/"gbox", "completion")
26+
end
27+
28+
test do
29+
# Test gbox version
30+
assert_match version.to_s, shell_output("#{bin}/gbox --version")
31+
32+
# Test gbox profile management
33+
add_output = shell_output("#{bin}/gbox profile add -k xxx -n gbox-user -o local")
34+
assert_match "Profile added successfully", add_output
35+
36+
current_output = shell_output("#{bin}/gbox profile current")
37+
assert_match "Profile Name: gbox-user", current_output
38+
assert_match "Organization Name: local", current_output
39+
assert_match "API Key: xxx", current_output
40+
end
41+
end

0 commit comments

Comments
 (0)