addressabler 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.markdown +1 -1
- data/lib/addressabler.rb +2 -1
- data/lib/tlds +3296 -252
- data/spec/addressabler_spec.rb +30 -17
- data/spec/uri_spec.rb +1076 -125
- metadata +68 -66
data/CHANGELOG.md
ADDED
data/README.markdown
CHANGED
data/lib/addressabler.rb
CHANGED
@@ -75,7 +75,8 @@ module Addressabler
|
|
75
75
|
# Thanks Domainatrix for the parsing logic!
|
76
76
|
tlds = {}
|
77
77
|
File.readlines(File.join(File.dirname(__FILE__), 'tlds')).each do |line|
|
78
|
-
|
78
|
+
line.strip!
|
79
|
+
unless line == '' || line =~ /^\//
|
79
80
|
parts = line.split(".").reverse
|
80
81
|
sub_hash = tlds
|
81
82
|
parts.each do |part|
|