Guo Xiang Tan 6ecf37c482 Improve URL validation to check for a valid host.
Parsing a URL with `URI` is not sufficient as the following cases
are considered valid:

URI.parse("http://https://google.com")
=> #<URI::HTTP http://https//google.com>
2017-12-21 13:50:15 +08:00
..
2017-07-24 21:46:08 +09:00
2017-09-25 13:49:00 +08:00
2017-07-28 10:20:09 +09:00