travishaynes/trackerific — pull request #9 by zackshapiro (2013-11-23 19:25:06+00:00)
Title: USPS tracking now working

* Was unable to get specs to run, unsure why. Guessing you can get this solved faster than me poking around for a bit
* Completely re-wrote the `date` method that was the source of many failures. The thing that was causing the error was a hardcoded look for a certain range. With the re-write, it looks for the month in the array and uses it's index as the starting value for the date. It then goes either 2 or 4 places deeper in the array to get the full date based on whether AM or PM is present in that index.
* Re-wrote the `description` method to detect the description more simply. The format is always a description, followed by a comma, so I'm just splitting on the first comma. Tried this with a few data sets, works well. They never use commas in the description
* Removed excess comma from city, state, zip. They now include it in the city string
* In the `location` method, detecting whether or not the location is present. If not, returning an empty string for location.