Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

18F/michigan-benefits

 
 

Repository files navigation

Michigan Benefits

CircleCI Code Climate Test Coverage

Deploying

Requirements

Developing

Getting Started

  • After cloning this repo, run: bin/setup
  • Read through the CONTRIBUTING.md file to learn how this team operates.

Onboarding Checklist

Ask the team for access to the following services to begin contributing:

  • GitHub
  • Slack
  • Twilio
  • Mailgun
  • Trello (2 boards)
  • Heroku
  • Password Manager
  • Get calendar invites to: daily standup, weekly planning, weekly retro

Day-to-day

Deploying

  • CircleCI is currently set up to deploy green builds to staging.
  • Use heroku pipelines to promote from staging to production. If you want to promote from the Heroku web page or CLI, be sure to run migrations afterwards.

Debugging

  • Call binding.pry anywhere in the code to stop execution and get a debugger console.
  • Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  • To get a good look at and debug any emails that were sent from your running development environment visit your local mailcatcher server.

CircleCI green builds deploy to Heroku staging servers

  1. Get your Heroku API Key for a user from (https://dashboard.heroku.com/account)
  2. Paste API Key in the CircleCI account settings page (https://circleci.com/account/heroku)
  3. Set your user as the deploy user CircleCI per project settings page (https://circleci.com/gh/codeforamerica/michigan-benefits/edit#heroku)
  4. Ensure that your @circleci.com and generated ssh key show up on heroku (https://dashboard.heroku.com/account)
  5. Click rebuild if necessary

What's Included

Step Skipping

This application is a long questionaire. You will probably want to work on parts of it without completing the whole application.

After booting the server and filling out the first step, go to http://localhost:3000/steps to jump around.

Document / Photo Uploading Details

  • The file uploading service is called Shubox. The dashboard can be accessed with account info found in 1password. Ping @jayroh for any questions or issues related to Shubox.
  • The file limit is currently set to 3MB. That can be bumped up if we notice that people are often taking photos or attaching documents larger than that.
  • The file formats currently allowed as "Documents" consist of:
    • .doc
    • .docx
    • .gif
    • .jpg
    • .pdf
    • .png

Spec Helpers

  • Use with_modified_env to modify an env variable for one test:
with_modified_env INVITATION_CODE: "inv-code", INVITATIONS_ENABLED: "true" do
  post :create, user: { name: "Alice", invitation_code: "wrong-code" }
  expect(flash[:alert]).to equal "Invalid invitation code"
end
  • Use match_html to 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

About

Digital Assister for Michigan

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 53.2%
  • HTML 27.2%
  • CSS 18.9%
  • JavaScript 0.7%