Skip to content

Commit 4d6133b

Browse files
authored
Merge pull request #240025 from nikaro/tombi
tombi 0.6.5 (new formula)
2 parents d7c4795 + 349a8eb commit 4d6133b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Formula/t/tombi.rb

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class Tombi < Formula
2+
desc "TOML formatter, linter and 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+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "032c0e1af9c5387794c2c5ec1bcdc88bf83418508909550c4a1fd25b0e4be8e4"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0706b75060023304505cfe457d28fb613c8232fa5af089cb157ac29767dd090"
12+
sha256 cellar: :any_skip_relocation, sonoma: "a88ae2fbcb6fab533282fffcb60506b157406085f1cd6538295f1b00fc9d607c"
13+
sha256 cellar: :any_skip_relocation, x86_64_linux: "34ed9ccea679fd009d4ba0a3ebadd995c9ca85c3555118fa95d9e556ed4d8ba9"
14+
end
15+
16+
depends_on "rust" => :build
17+
18+
def install
19+
system "cargo", "install", *std_cargo_args(path: "rust/tombi-cli")
20+
end
21+
22+
test do
23+
require "open3"
24+
25+
json = <<~JSON
26+
{
27+
"jsonrpc": "2.0",
28+
"id": 1,
29+
"method": "initialize",
30+
"params": {
31+
"rootUri": null,
32+
"capabilities": {}
33+
}
34+
}
35+
JSON
36+
37+
Open3.popen3(bin/"tombi", "lsp") do |stdin, stdout|
38+
stdin.write "Content-Length: #{json.size}\r\n\r\n#{json}"
39+
sleep 1
40+
assert_match(/^Content-Length: \d+/i, stdout.readline)
41+
end
42+
end
43+
end

0 commit comments

Comments
 (0)