A simple webserver that makes the PVTA's GTFS and GTFS Realtime datasets available publicly.
When the server is booted it spawns a background thread (implemented as a puma plugin) that periodically fetches and caches responses from the original data sources (the PVTA itself for GTFS, Swiftly for GTFS Realtime).
These cached responses are then forwarded to requests made to the server itself.
This gets us around various access control pain points (CORS for the PVTA, API keys/rate limits for Swiftly) when using these datasets in our other applications.
The application is built on the Sinatra framework. It is recommended you use rbenv to install/manage ruby.
- Install ruby. (
rbenv install
) - Run the setup script. (
script/setup
)
- Run
bin/rspec
to run the tests. - Run
bin/rubocop
to run the linter. - Run
script/console
for an interactive prompt that will allow you to experiment. - Run
script/server
to run the development server. - Run
script/setup
to install dependencies.
Bug reports and pull requests are welcome on GitHub at https://github.com/umts/gtfs_cache.
The gem is available as open source under the terms of the MIT License.