Crowdsourcing platform for gathering gender information about politicians to improve the data in EveryPolitician
CSS HTML Ruby JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db/migrations
lib
public
scripts
spec
views
.env.example
.gitignore
.rubocop.yml
.travis.yml
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
Vagrantfile
app.json
app.rb
config.ru

README.md

Gender Balance

Build Status

Crowdsourcing platform for gathering gender information about politicians to improve the data in EveryPolitician.

Installation

Get the code from GitHub

git clone https://github.com/everypolitician/gender-balance
cd gender-balance

Configure the environment by copying .env.example and following the instructions inside to configure the app.

cp .env.example .env
vi .env

Then use vagrant to build a VM with all the dependencies installed:

vagrant up

Usage

Log in to the vagrant VM and start the app server and worker with foreman:

vagrant ssh
foreman start

Then visit http://localhost:5000 to view the app.

To run the tests use the following:

vagrant ssh
bundle exec rake test

Setting the featured country

First start a pry session, if you're in a vagrant VM then run

pry -r ./app

Or if you want to run pry on Heroku

heroku run 'pry -r ./app'

Then you can set the featured country using the country code, which can be found in countries.json. For example to set it to Turkey:

FeaturedCountry.current = 'TR'

This will end any previous featured country and create a new row for the given country code.