UnlockedLab/unlockphilly — pull request #18 by josomo (2014-05-23 04:48:28+00:00)
Title: Add getPatcoElevatorStatusJson()

Require nokogiri and open-uri, added getPatcoElevatorStatusJson().
The function scrapes the status of elevators and escalators on the Patco alert page and puts them in all_status. Then the elevator statuses are put into elev_status, which is iterated over. If an elevator isn't working, a hash is created and pushed to the array outages, which is incorporated into the JSON object.
There are a couple issues still: (a) because I used the station id's from the database there is no way (presently) to signify which elevator is not functioning at a particular station (it is arbitrarily set to "E" by default now), (b) escalators aren't included.