test Maintainability Coverage Status Inline docs

This bot notifies LA County users who DM their zip codes to @vaccinesignup about available vaccine-appointment Locations in their area.

Usage

Users

  1. Follow @vaccinesignup.

  2. DM @vaccinesignup a zip code only:

zip

  1. The bot will DM you available Locations in that zip:

appointments

  1. To stop all notifications, DM stop to @vaccinesignup.

Developers

Available Tasks

$ rake -T|grep vacc
rake vaccinesignup:back_up              # Back-up production data and restore to the local environment
rake vaccinesignup:delete_real_users    # Delete real (non-test) users from development environment
rake vaccinesignup:read_and_notify      # Read DMs and, if there are subscribed zip codes, notify users
rake vaccinesignup:reset_staging        # Back-up production, restore locally, and delete real users for testing
rake vaccinesignup:sync_and_notify      # Sync Locations and, if there are changes, notify users

When configuring tasks for production, the timing on both should be optimized depending on how often Locations are updated and DMs are tweeted, respectively.

Mirror Production Locally

  1. Configure environment variables: bash export TWITTER_CONSUMER_KEY=[your key] export TWITTER_CONSUMER_SECRET=[your secret] export TWITTER_ACCESS_TOKEN=[your token] export TWITTER_ACCESS_SECRET=[your access secret]
  2. Reset local database to a known state: bash bundle ex rake db:reset
  3. Back-up production data and restore to the local environment: bash bundle ex rake vaccinesignup:back_up

Release Testing

  1. Reset local/staging environment: bash bundle ex rake vaccinesignup:reset_staging
  2. Test location syncing/notification: bash bundle ex rake vaccinesignup:sync_and_notify
  3. Test reading DMs/notification: bash bundle ex rake vaccinesignup:read_and_notify

Copyright © 2021 Roderick Monje. See LICENSE for further details.