No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib/tasks
log
public
spec
storage
tmp
vendor
.dockerignore
.env.example
.gitignore
.rspec
Dockerfile
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
config.ru
docker-compose.yml.example
entrypoint.sh

README.md

CongressForms API

This is a Rails app providing a JSON-based API for the EFForg/congress_forms gem.

Installation

Start by coping the example config.

$ cp .env.example .env
$ cp docker-compose.yml.example docker-compose.yml # if using docker

Fill in the DATABASE_* variables with your postgres address/credentials, and the CWC_* variables with your Communicating with Congress vendor information (see the congress_forms README for more documentation on CWC).

The ADMIN_* variables are optional. They set the basic auth credentials used by the /delayed_job admin area.

DEBUG_KEY is required for access to some API endpoints. Read the API documentation for more information.

You'll also need to clone the EFForg/congress_forms repo locally (this is temporary until that project is released as a gem):

$ git clone https://github.com/EFForg/congress_forms.git

If you're using docker, at this point you can build the containers. Either way be sure to run rake db:setup to initialize the database, and then you should be done!

Delayed Messages

When a message can't be delivered, it is saved into a delayed_job queue and attempted again later. To process this queue you need to run a delayed job worker:

$ rake jobs:work

The example docker-compose configuration includes a container running this command.

API Documentation

See public/index.md.

License

The code is available as open source under the terms of the GPLv3 License.