lib/gman/locality.rb in gman-4.7.1 vs lib/gman/locality.rb in gman-5.0.0
- old
+ new
@@ -1,12 +1,12 @@
-class Gman < NaughtyOrNice
+class Gman
LOCALITY_REGEX = %r{
(
(state|dst|cog)
|
- (ci|town|vil|co)\.[a-z-]+
+ (ci|co|borough|boro|city|county|parish|town|twp|vi|vil|village)\.[a-z-]+
)
\.(ak|al|ar|az|ca|co|ct|dc|de|fl|ga|hi|ia|id|il|in|ks|ky|la|ma|md|me|mi|mn|mo|ms|mt|nc|nd|ne|nh|nj|nm|nv|ny|oh|ok|or|pa|ri|sc|sd|tn|tx|um|ut|va|vt|wa|wi|wv|wy)
\.us
}x
@@ -21,8 +21,8 @@
# * state.foo.il.us
# * foo.ci.il.us
# * k12.il.us
# * ci.foo.zx.us
def locality?
- !!(domain =~ LOCALITY_REGEX)
+ !!(domain.to_s =~ LOCALITY_REGEX)
end
end