File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments