umts / bojangles

Ruby script for monitoring the PVTA realtime bus departures feed
MIT License
0 stars 0 forks source link

Make stop hastus_id a string #88

Closed werebus closed 2 years ago

werebus commented 2 years ago

This was necessitated by the current PVTA GTFS file

"Stop ID" was never guaranteed to be an integer in the spec, ans at some point the export started containing parent stations with ids like "place_UnSta".

dirschn commented 2 years ago

Do the instances where stop_id is used need to now call .to_i? Or is it implicitly called? https://github.com/umts/bojangles/blob/dbbf54afc7c0b7b719a5b45fb3868a0a51b6f9b2/lib/avail.rb#L54-L56 Or is this a different thing?

werebus commented 2 years ago

Do the instances where stop_id is used need to now call .to_i? Or is it implicitly called?

This is an interesting question. Neither option is really "correct":

So, you can't get departures for these stops. That's OK-ish. They exist only to be parent_stations for other stops. And of the two behaviors, I prefer the 400 because it tells the user right away that they've configured it bad.