Coder Social home page Coder Social logo

ruby-domain-name's Introduction

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.

ruby-domain-name's People

Contributors

deepin-admin-bot avatar deepin-ci-robot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.