Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icann-rdap 0.0.21 (new formula) #205514

Merged
merged 4 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Formula/i/icann-rdap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class IcannRdap < Formula
desc "Full-rich client for the Registry Data Access Protocol (RDAP) sponsored by ICANN"
homepage "https://github.com/icann/icann-rdap/wiki"
url "https://github.com/icann/icann-rdap/archive/refs/tags/v0.0.21.tar.gz"
sha256 "252b112776fae0160f539e20b70ff24b6f2bea7551c9476ccd6f7651c7b861d0"
license any_of: ["Apache-2.0", "MIT"]

depends_on "pkgconf" => :build
depends_on "rust" => :build
depends_on "openssl@3"

conflicts_with "rdap", because: "rdap also ships a rdap binary"

def install
system "cargo", "install", "--bin=rdap", *std_cargo_args(path: "icann-rdap-cli")
system "cargo", "install", "--bin=rdap-test", *std_cargo_args(path: "icann-rdap-cli")
end

test do
# check version of rdap
assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap -V")

# check version of rdap-test
assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap-test -V")

# lookup com TLD at IANA with rdap
output = shell_output("#{bin}/rdap -O pretty-json https://rdap.iana.org/domain/com")
assert_match '"ldhName": "com"', output

# test com TLD at IANA with rdap-test
output = shell_output("#{bin}/rdap-test -O pretty-json --skip-v6 -C icann-error https://rdap.iana.org/domain/com")
assert_match '"status_code": 200', output
end
end
2 changes: 2 additions & 0 deletions Formula/r/rdap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Rdap < Formula

depends_on "go" => :build

conflicts_with "icann-rdap", because: "icann-rdap also ships a rdap binary"

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/rdap"
end
Expand Down
Loading