Skip to content

Commit 9f4e640

Browse files
committed
tombi 0.6.5 (new formula)
1 parent 36e702c commit 9f4e640

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Formula/t/tombi.rb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
class Tombi < Formula
2+
desc "TOML Formatter / Linter / Language Server"
3+
homepage "https://github.com/tombi-toml/tombi"
4+
url "https://github.com/tombi-toml/tombi/archive/refs/tags/v0.6.5.tar.gz"
5+
sha256 "4d97f5c740e35b99c28f382e29a3f792241bb756371c41a66b2c64f0f7ee4a0c"
6+
license "MIT"
7+
head "https://github.com/tombi-toml/tombi.git", branch: "main"
8+
9+
depends_on "rust" => :build
10+
11+
def install
12+
system "cargo", "install", *std_cargo_args(path: "rust/tombi-cli")
13+
end
14+
15+
test do
16+
require "open3"
17+
18+
json = <<~JSON
19+
{
20+
"jsonrpc": "2.0",
21+
"id": 1,
22+
"method": "initialize",
23+
"params": {
24+
"rootUri": null,
25+
"capabilities": {}
26+
}
27+
}
28+
JSON
29+
30+
Open3.popen3("#{bin}/tombi", "lsp") do |stdin, stdout|
31+
stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}"
32+
sleep 1
33+
assert_match(/^Content-Length: \d+/i, stdout.readline)
34+
end
35+
end
36+
end

0 commit comments

Comments
 (0)