Skip to content

Conversation

@flavray
Copy link

@flavray flavray commented Sep 12, 2015

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 :)

Copy link
Collaborator

@stephenyeargin stephenyeargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a swing at cleaning up the merge conflicts but ran into issues with the test case. If you have a second to merge master back into your branch I think we can get this one done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants