GithubHelp home page GithubHelp logo

flipsasser / addressabler Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 10.0 317 KB

Addressabler extends the Addressable::URI class to provide information about, and manipulation of, URI strings.

License: MIT License

Ruby 100.00%

addressabler's People

Contributors

jeanmertz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

addressabler's Issues

How do I run the specs?

I wanted to submit my contribution to the gem, but I can't get the specs to run. I've tried rspec spec/, rake spec and rake test, but none seams to work. Thanks.

.cc domains not parsed properly

[50] pry(main)> uri = Addressable::URI.parse('http://www.bart-blabla.cc')
=> #<Addressable::URI:0x25d2c38 URI:http://www.bart-blabla.cc>
[51] pry(main)> uri.tld
=> ""
[52] pry(main)> uri.domain
=> "cc"

But I expected tld to be cc and domain to be bart-blabla.cc

Another example:

[53] pry(main)> uri = Addressable::URI.parse('http://www.abc.cc')
=> #<Addressable::URI:0x2d99980 URI:http://www.abc.cc>
[54] pry(main)> uri.tld
=> ""
[55] pry(main)> uri.domain
=> "cc"

Is this a known issue?

Version 0.1.0?

It looks like version 0.1.0 of addressabler was never released to rubygems even though the documentation references it.

blogspot domains as tld's

When I try to parse a domain with blogspot it gives me the blogspot url as a tld (this also happens with amazonaws sometimes.

irb(main):015:0> url = 'http://fwefweewf.blogspot.com'
=> "http://fwefweewf.blogspot.com"
irb(main):016:0> @uri = Addressable::URI.parse(url)
=> #<Addressable::URI:0x3fcd6d92e828 URI:http://fwefweewf.blogspot.com>
irb(main):017:0> @uri.tld
=> "blogspot.com"

Hope you can debug this :)

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.