Skip to content

devcongress/elections-api

Repository files navigation

Elections Api · Build Status Test Coverage Code Quality Issues

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.

What you need

  • 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.

Project Setup

  1. Clone this repository on your computer with the following command: git clone https://github.com/devcongress/elections-api.git
  2. Run bundle install to grab all the dependencies of the project
  3. Create a copy of the .env.example file in the project root directory, rename it to .env and set the values for ELECTIONS_DB, ELECTIONS_DB_TEST, ELECTIONS_DB_USERNAME, ELECTIONS_DB_PASSWORD variables. All environment variables go into this file.
  4. Run rails db:create to create your database
  5. Run rails db:structure:load to load the db schema.
  6. Run rails server to start your server

How to run the test suite

To run the test suite, run rails test

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Guidelines

Use the following guides for getting things done, programming well, and programming in style.

TODO

  • Deployment Instructions

Releases

No releases published

Packages

No packages published