street-address-rb / street-address

Detect, and dissect, US Street Addresses in strings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Street addresses do not parse if they end in "United States"

zhon opened this issue · comments

commented
text = '3120 W 1200 N, WEST POINT, Utah 84015 United States'
StreetAddress::US.parse text                            #=> nil

This issue seems to be resolved in the current master branch. I added the current master branch in my Gemfile and was able to Parse addresses ending in "United States"

 text = '3120 W 1200 N, WEST POINT, Utah 84015 United States'
 StreetAddress::US.parse text     
 => #<StreetAddress::US::Address:0x007fc951df3c08 @number="3120", @street="1200", @prefix="W", @suffix="N", @city="West Point", @state="UT", @postal_code="84015", @redundant_street_type=true, @street_type=nil>