weppos/whois
55.4
Adequate · 6 November 2026
1.7k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a pure Ruby WHOIS client library that executes network queries against domain, IP, and ASN registries. It parses raw server responses into structured records, supporting complex scenarios like multi-fragment replies and referral resolution across various TLDs. The library provides a command-line interface for direct terminal usage and includes extensive tooling for managing server definitions and testing adapter logic.
How it got here
2009 — Ruby Whois 6.0.3 initial release
4 changes.
This period marks the initial release of Ruby Whois version 6.0.3, establishing the core architecture with a pure Ruby WHOIS client, parser, and a comprehensive error hierarchy. The work involved refactoring server adapters into an object-oriented structure to replace YAML-based configurations, thereby improving maintainability and handling unique WHOIS protocols. Additionally, convenience methods were deprecated in favor of explicit parser usage, and the project repository was initialized with standard configuration and documentation files.
2010 — RSpec migration and dependency updates
4 changes.
The project migrated its test infrastructure from Test::Unit to RSpec, establishing a new spec directory and helper configuration. Comprehensive test suites were added for the Whois core components and server adapters to ensure robust coverage of client, record, and lookup behaviors. Development dependencies were also updated to enforce consistent environments with Ruby 3.2 and specific gem versions.
2011–2014 — CLI tool and multi-response support
8 changes.
This period focused on enhancing the library's usability and parsing capabilities by introducing a new command-line interface and supporting multi-fragment WHOIS responses. Significant effort was also dedicated to improving test reliability, expanding coverage for server and client components, and creating utility scripts for TLD definition management.
Features
Add whoisrb command-line interface
Users can now perform WHOIS lookups directly from the terminal using the new \whoisrb\ executable. This command-line tool accepts domain names or IP addresses as arguments and supports options to configure connection timeouts, specify custom hosts, and control referral query behavior, providing a convenient way to query WHOIS servers without writing Ruby code.
bin · high confidence
Initial release of Ruby Whois 6.0.3
This change introduces the initial implementation of the Ruby Whois library (version 6.0.3), providing a pure Ruby WHOIS client and parser. The release establishes the core architecture, including the \Whois::Client\ for executing queries with configurable timeouts and binding settings, the \Whois::Server\ class for managing server definitions loaded from JSON data, and the \Whois::Record\ class for handling responses. It also defines a comprehensive error hierarchy (\Whois::Error\, \ConnectionError\, \ServerError\, etc.) and includes adapters for various query types such as TLDs, IPv4, IPv6, and ASNs.
lib/whois · high confidence
Introduce Whois::Record::Part for multi-response handling
The library now supports parsing WHOIS responses that consist of multiple fragments from different hosts. A new Whois::Record::Part struct has been added to represent individual response bodies and their originating hosts, allowing the main Record to aggregate data from sources like thin servers that return multiple responses.
lib/whois/record · high confidence
New utility scripts for TLD definition management and testing
Added several new executable scripts in the utils directory to support development and maintenance workflows. The \deftld.rb\ tool provides a command-line interface for managing TLD definitions stored in \data/tld.json\, supporting operations like adding, updating, and validating definitions according to schema version 2. The \compare-whois.rb\ script compares local TLD server definitions against an external IANA source to highlight discrepancies. Additional utilities include \mkwhois.rb\ and \fixupd.rb\ for generating and updating test fixtures from live WHOIS responses, \defutils.rb\ for automating new gTLD tagging, and \matrix.rb\ for generating parser capability matrices.
utils · high confidence
Behavioural changes
Deprecation of convenience methods and introduction of deprecation warnings
The \Whois.available?\ and \Whois.registered?\ methods are now deprecated; calling them issues a warning and directs users to use \Whois.whois(...).parser.available?\ or \registered?\ instead, while also requiring the \whois-parser\ gem. The \Whois.lookup\ method remains the primary entry point, aliased as \whois\, and a new \deprecate\ helper is introduced to standardize deprecation warnings across the library.
lib · high confidence
Move SocketHandler under Whois::Server
The SocketHandler class, which performs synchronous WHOIS queries via TCP sockets, has been moved into the Whois::Server namespace. This change reorganizes the library's internal structure by placing the default query handler directly under the Server module, improving code organization without altering the external API or query behavior.
lib/whois/server · high confidence
Refactored WHOIS server adapters to use a new object-oriented structure
The WHOIS server adapters have been rewritten to use an object-oriented definition, replacing the previous YAML-based configuration with Ruby syntax. This change introduces a new \Base\ adapter class that manages the query lifecycle, including socket handling, buffer management, and referral resolution. Specific adapters like \Afilias\, \Arin\, \Verisign\, and \Arpa\ now implement their own \request\ methods to handle unique WHOIS protocols, such as ARIN's referral server parsing and Afilias/Verisign's referral logic. The \Standard\ adapter handles basic queries, while \Formatted\ allows custom query string formatting. New adapters \None\ and \NotImplemented\ provide explicit error handling for unsupported interfaces, and the \Web\ adapter now raises a \WebInterfaceError\ with the URL. This refactoring improves code maintainability and allows for more flexible adapter configuration.
lib/whois/server/adapters · high confidence
Test coverage
Add RSpec support helpers for connectivity and definition management; Added RSpec test suite for WHOIS server adapters; Added RSpec test suite for Whois core components; Added integration tests for WHOIS client query options; Added tests for Whois::Record::Part initialization; Added tests for Whois::Server::SocketHandler; Migrate test suite to RSpec.
Dependencies
Add Gemfile and update gemspec for Rubocop and RSpec dependencies
The project now includes a Gemfile that explicitly declares development dependencies for Rubocop (\~\> 1.89.0) and Rubocop-RSpec (\~\> 3.10.2), alongside the gemspec. The gemspec has been updated to require Ruby version 3.2 or higher and lists rake, rspec, and yard as development dependencies, ensuring consistent local development environments.
(dependencies) · high confidence
Housekeeping
Project initialization and configuration scaffolding
The repository has been initialized with essential configuration files, including \.gitignore\, \.rspec\, \.rubocop.yml\ (targeting Ruby 3.0), \.simplecov\, \.tool-versions\ (specifying Ruby 3.4.2), and \.yardopts\. Documentation has been standardized with \README.md\, \CONTRIBUTING.md\, \LICENSE.txt\, and \SECURITY.md\. The \Rakefile\ defines default tasks for testing (\rspec\) and linting (\rubocop\), while the \CHANGELOG.md\ indicates the current unreleased version requires a minimum of Ruby 3.2.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 56 → 55 (-0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 89 → 89 (+0.0)
- Maturity 46 → 46 (+0.0)
- Readiness 55 → 55 (+0.0)
- Security 70 → 67 (-2.9)
Resolved (3)
- Ambiguous naming convention: In many Ruby libraries, methods ending in ? are predicates returning booleans, while methods without the suffix may return the matched object or nil. However, having both match and match? on the same object often implies one is a deprecated alias or a specific variant (e.g., regex vs string). Without distinct return type documentation, this creates confusion about which method to call for a simple boolean check versus a match extraction.
- Duplicate intent: Both the module-level Whois class and the Client class expose a lookup method with identical signatures. It is unclear whether Whois.lookup is a convenience wrapper around Client.new.lookup or a separate implementation, leading to confusion about which entry point to use.
- Potential semantic overlap: available? and registered? are likely inverse operations (if a domain is registered, it is not available, and vice versa). However, exposing both as top-level convenience methods can be confusing. More critically, if available? is implemented as !registered?, having both adds unnecessary API surface. If they have different underlying logic (e.g., checking against different sources), this should be explicit, but typically these are two sides of the same coin.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
weppos/whois was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 5e0f0058313297b385046a42ac10a3d52b777460 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.