Releases: ipregistry/ipregistry-ruby
Releases · ipregistry/ipregistry-ruby
Release list
v1.0.0
Added
- Initial release of the official Ruby client library for the Ipregistry API.
Client#lookupfor single IP address lookups,Client#lookup_originfor origin (requester) lookups returning
parsed User-Agent data, andClient#batch_lookupfor resolving many IP addresses at once. Batch lookups
transparently split arrays larger than the API's 1024-address limit into concurrently dispatched sub-requests
(configurable viamax_batch_size:andbatch_concurrency:) and reassemble results in input order.Client#parse_user_agentsfor parsing raw User-Agent strings into structured data.- Batch results (
BatchResponse) expose per-entry success or failure throughResultobjects, areEnumerable,
and support pattern matching. - Nil-safe response models: nested sections are always present, so chained access such as
info.location.country.namenever raises; boolean fields are exposed as predicates (security.vpn?). - Optional in-memory caching (
Cache::Memory) with LRU eviction and TTL, plus a duck-typed interface for custom
backends. Caching is disabled by default; origin lookups are never cached and batch lookups reuse cached entries. - Automatic retries with exponential backoff for transient network errors and 5xx responses, honoring the
Retry-Afterheader. Retries on 429 Too Many Requests are disabled by default. - Typed errors rooted at
Ipregistry::Error: every documented API error code maps to a dedicatedApiError
subclass (e.g.InvalidApiKeyError,InsufficientCreditsError), and client-side failures raise
ConnectionError,TimeoutError, orParseError. Ipregistry.bot?helper to skip lookups for crawler traffic.- Offline unit/behavior specs using WebMock, plus opt-in live system specs in
spec/system(run with
IPREGISTRY_API_KEYset). - Zero runtime dependencies (standard library only).