Code repository for Colorado Benefits, an application for reporting life changes that affect public assistance benefits by Code for America.
Getting Set Up
Install Heroku CLI.
brew install heroku/brew/heroku
Install and start PostgreSQL.
brew install postgresql
brew services start postgresql
Ruby on Rails
This application is built using Ruby on Rails.
Your system will require Ruby to develop on the application.
The required Ruby version is listed in the .ruby-version file.
If you do not have this binary, use this guide to get set up on MacOS.
Configuring the Application
- Clone this repo
- Ask the team for the RAILS_MASTER_KEY
- Add it to a new file
- Run the server(s):
- Visit your local server
- To preview any emails that were sent while testing locally, visit the running mailhog instance
- Run tests, Rubocop, bundle audit, and Brakeman:
- Secrets - We store all secrets in credentials.yml.enc. Locally you will need a
config/master.keyfile with the master key in it (stored in LastPass). To edit run
EDITOR=vi bin/rails credentials:edit
- Environment config - We store non-sensitive environment configuration in environment variables. In development, environment variables are loaded from
.env. When adding an environment, be sure to update the
app.json(used by Heroku for review apps).
This application is a long questionnaire. You will probably want to work on parts of it without completing the whole application.
After booting the server and filling out the first few questions,
http://localhost:3000/screens to jump around.
For development purposes, we generally just run
match_htmlto test that two HTML strings match, excluding whitespace, order of attributes, etc.:
expect(rendered).to match_html <<-HTML <table class="foo bar"> <tr> <td>Hi!</td> </tr> </table> HTML
This application was designed using an Atomic design system.
The styleguide can be viewed at /cfa/Styleguide.
Timing for Deploys
- Staging: Deployed automatically on successful builds from
Deploying to Staging
CircleCI is currently set up to deploy green builds to staging.
Deploying to Production
Our release process will promote the staging environment to production.
Before deploying to production, we want to make sure that:
- All tickets that are awaiting acceptance have been accepted
- All necessary configuration variables are set on production
- All buildpacks are the same between staging and production
To promote the staging environment to production click the "Promote to production..." button in the colorado-benefits pipeline in Heroku.
Adding New Counties
Here are the steps to add a new Colorado county.
- Add the county name to the VALID_COUNTIES array in the CountyFinder.
- Add the delivery email to the Heroku environment variables. Needs to look like
- Add the logo to the homepage.