Fix #12 - missing optional files normally do not raise GTFS::InvalidSourceException anymore
If an optional file is missing, parse_entity yields a new empty instance of StringIO, when calling read on this StringIO, an empty string will be returned causing parse_models to return an empty array.
If a required file is missing, raise GTFS::InvalidSourceException as before.
I added a test on transfers field, transfers.txt is missing in valid_gtfs_missing_optional_files.zip but calling source.transfers does not raise an exception anymore :)
Fix #12 - missing optional files normally do not raise GTFS::InvalidSourceException anymore
If an optional file is missing,
parse_entity
yields a new empty instance of StringIO, when callingread
on this StringIO, an empty string will be returned causingparse_models
to return an empty array. If a required file is missing, raise GTFS::InvalidSourceException as before.I added a test on
transfers
field,transfers.txt
is missing invalid_gtfs_missing_optional_files.zip
but callingsource.transfers
does not raise an exception anymore :)