lib/domainatrix/domain_parser.rb in f1sherman-domainatrix-0.0.10 vs lib/domainatrix/domain_parser.rb in f1sherman-domainatrix-0.0.11
- old
+ new
@@ -29,10 +29,11 @@
end
end
end
def parse(url)
+ url.downcase!
uri = URI.parse(url)
if uri.query
path = "#{uri.path}?#{uri.query}"
else
path = uri.path
@@ -44,10 +45,11 @@
:url => url
})
end
def parse_domains_from_host(host)
+ host.downcase!
parts = host.split(".").reverse
public_suffix = []
domain = ""
subdomains = []
sub_hash = @public_suffixes
@@ -72,6 +74,6 @@
end
end
{:public_suffix => public_suffix.reverse.join("."), :domain => domain, :subdomain => subdomains.reverse.join(".")}
end
end
-end
\ No newline at end of file
+end