codeforamerica / balance

A text message system for checking one's EBT card balance (SNAP benefits and more)
MIT License
47 stars 37 forks source link

Refactor state handlers to use message generator for balances #216

Closed daguar closed 9 years ago

daguar commented 9 years ago

This PR implements a few things:

  1. Centralizes generating a balance message (eg, "Your balance is...") in the MessageGenerator#balance_message method so that it's no longer hard-coded and state-specific in the StateHandler class. (This is still overridable, and remains overridden in North Carolina and Missouri. All others use the MessageGenerator.)
  2. Adds Spanish support for Oklahoma
  3. Adds test coverage for states contributed by Brigade members at the CfA summit (NC, OK, PA, VA)
  4. Makes PA "card # not found" parsing more robust (downcases transcribed text prior to comparison)

Closes #193, closes #199, and touches on #211