talira

Addressable

URI, IRI and URI template library for Ruby

open sourceApache-2.0free

Addressable is an alternative to the URI implementation in Ruby's standard library. It parses URIs flexibly, with heuristic parsing for messy input, normalizes them (including internationalized domain names), supports IRIs, and expands, partially expands and extracts values from URI templates. It closely follows RFC 3986, RFC 3987 and RFC 6570 at level 4. Apache-2.0 licensed.

Problems it solves

  • parse URLs with unicode or messy input in Ruby
  • normalize URLs before comparing them in Ruby
  • expand URI templates in Ruby
  • extract parameters from a URL with a template in Ruby

Features

  • URI parsing that follows RFC 3986, with heuristic parsing
  • normalization, including internationalized domain names
  • IRI support (RFC 3987)
  • URI templates (RFC 6570 level 4): expand, partially expand and extract