flipsasser / addressabler Goto Github PK
View Code? Open in Web Editor NEWAddressabler extends the Addressable::URI class to provide information about, and manipulation of, URI strings.
License: MIT License
Addressabler extends the Addressable::URI class to provide information about, and manipulation of, URI strings.
License: MIT License
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 :)
It looks like version 0.1.0 of addressabler was never released to rubygems even though the documentation references it.
[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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.