The Elections API project is a collection of endpoints to retrieve json-formatted elections-related data in Ghana since 1992.
This project is an initiative of DevCongress.
-
Ruby: This project uses
Ruby v 2.4.1
, we try to stay on the latest stable or releast candidate version. We try to stay on the latest stable or release candidate. rbenv is pretty easy to set up but there's other equally good ruby version management tools out there. Choose which one works for you. -
Bundler: You can grab the latest version of the bundler by running
gem install bundler
. You will need this to grab all the dependencies of the application. -
Postgres: There's a PostgreSQL for most operating systems. Follow the instructions here to install it on your box. PostgreSQL comes with an initializer script that hooks into start up. So the PostgreSQL server is always running in the background. Otherwise you can start it with this command:
$ sudo service postgresql start
-
Git: We use Git and GitHub for version control and collaboration. If you don't have a GitHub account already you can create one here. Follow instructions here to install the latest version of Git for your system.
- Clone this repository on your computer with the following command:
git clone https://github.com/devcongress/elections-api.git
- Run
bundle install
to grab all the dependencies of the project - Create a copy of the
.env.example
file in the project root directory, rename it to.env
and set the values forELECTIONS_DB
,ELECTIONS_DB_TEST
,ELECTIONS_DB_USERNAME
,ELECTIONS_DB_PASSWORD
variables. All environment variables go into this file. - Run
rails db:create
to create your database - Run
rails db:structure:load
to load the db schema. - Run
rails server
to start your server
To run the test suite, run rails test
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Use the following guides for getting things done, programming well, and programming in style.
- Deployment Instructions