Skip to content

jubishop/smalldemocracy

Repository files navigation

Small Democracy

RSpec Status Rubocop Status

Tools for a Small Democracy

Small Democracy can be viewed online at smalldemocracy.com.

Polls

Small Democracy currently supports:

Developing Small Democracy

Basic Setup

  1. Install ruby and postgres.

  2. Create two local postgres databases:

    createdb smalldemocracy_test
    createdb smalldemocracy_dev
  3. Install bundler:

    gem install bundler
  4. From the root directory of your copy of smalldemocracy:

    bundle install
    bundle exec rake db:migrate

    This will install all necessary dependencies and migrate the schema for the smalldemocracy_dev database. smalldemocracy_test will be automatically set up and torn down during each test run.

Launching SmallDemocracy

  • From the root directory of your copy of smalldemocracy:

    bundle exec rake run

    You will now be able to load smalldemocracy at http://localhost:8989

Testing SmallDemocracy

Note: You will need Chrome installed, since the UI tests use the Chrome DevTools Protocol.

  • To run all tests except the slow UI tests:

    bundle exec rake fast
  • To run the slow UI tests:

    bundle exec rake capybara
  • To run the slow UI tests and create new goldens on failures (necessary if you've intentionally modified the UI):

    bundle exec rake goldens

Other Commands

To see everything you can do:

bundle exec rake --tasks

License

This work is licensed under the Fair Source License as Fair Source 10.