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.
git clone https://github.com/devcongress/elections-api.git
bundle install
to grab all the dependencies of the project.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.rails db:create
to create your databaserails db:structure:load
to load the db schema.rails server
to start your serverTo run the test suite, run rails test
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)Use the following guides for getting things done, programming well, and programming in style.