stevefolder/vendor/bundle/ruby/3.1.0/gems/domain_name-0.5.20190701
2022-02-04 18:48:09 -05:00
..
data init 2022-02-04 18:48:09 -05:00
lib init 2022-02-04 18:48:09 -05:00
test init 2022-02-04 18:48:09 -05:00
tool init 2022-02-04 18:48:09 -05:00
.document init 2022-02-04 18:48:09 -05:00
.gitignore init 2022-02-04 18:48:09 -05:00
.travis.yml init 2022-02-04 18:48:09 -05:00
CHANGELOG.md init 2022-02-04 18:48:09 -05:00
domain_name.gemspec init 2022-02-04 18:48:09 -05:00
Gemfile init 2022-02-04 18:48:09 -05:00
LICENSE.txt init 2022-02-04 18:48:09 -05:00
Rakefile init 2022-02-04 18:48:09 -05:00
README.md init 2022-02-04 18:48:09 -05:00

domain_name

Synopsis

Domain Name manipulation library for Ruby

Description

  • Parses a domain name ready for extracting the registered domain and TLD.

      require "domain_name"
    
      host = DomainName("a.b.example.co.uk")
      host.domain         #=> "example.co.uk"
      host.tld            #=> "uk"
      host.cookie_domain?("example.co.uk")    #=> true
      host.cookie_domain?("co.uk")            #=> false
    
      host = DomainName("[::1]")  # IP addresses like "192.168.1.1" and "::1" are also acceptable
      host.ipaddr?        #=> true
      host.cookie_domain?("0:0:0:0:0:0:0:1")  #=> true
    
  • Implements rudimental IDNA support.

To-do's

  • Implement IDNA 2008 (and/or 2003) including the domain label validation and mapping defined in RFC 5891-5895 and UTS #46. (work in progress)

  • Define a compact YAML serialization format.

Installation

gem install domain_name

References

License

Copyright (c) 2011-2017 Akinori MUSHA

Licensed under the 2-clause BSD license.

Some portion of this library is copyrighted by third parties and licensed under MPL 2.0 or 3-clause BSD license, See LICENSE.txt for details.