- Install RVM (https://rvm.io):
\curl -sSL https://get.rvm.io | bash -s stable
- Install Postgresql. I like https://postgresapp.com for macOS.
- Clone the repo
- cd into the directory where you cloned the repo and agree to whatever RVM says
gem install bundler
bundle install
rake db:create
rake db:schema:load
rake db:seed
rails s
open http://localhost:3000
Service alerts involve the following models:
AlertFeed
- Represents a single service alert feed. It is primarily designed to consume RSS feeds. This is an STI model; child classes are responsible for knowing how to parse their own feed types. SeeKingCountyMetroAlertFeed
.AlertFeedItem
- Represents an item in anAlertFeed
Alert feeds are updated from their sources by running rake update_alert_feeds
. In production, this is managed with the Heroku Scheduler add-on.
GET /regions/:region_id/alert_feeds
- Returns a JSON collection ofAlertFeed
objects.GET /regions/:region_id/alert_feed_items
- Returns a JSON collection ofAlertFeedItem
objects for the givenRegion
id. Accepts asince
parameter formatted as a UTC timestamp.GET /alert_feeds/:id
- Returns a JSON collection ofAlertFeedItem
objects for the givenAlertFeed
id. Accepts asince
parameter formatted as a UTC timestamp.