Skip to content

A simple tool to empower citizens to ask candidates one question: “What specific reforms will you advance to end the corrupting influence of money in politics?”

Notifications You must be signed in to change notification settings

bucchere/questionr

Repository files navigation

Questionr

A simple tool to empower citizens to ask candidates one question: “What specific reforms will you advance to end the corrupting influence of money in politics?”

3rd-Party Depedencies

  1. RVM
  2. postgres
  3. redis
  4. Elastic Search

Do not proceed until you have all the dependencies installed and running. (On OSX, your best bet is to install postgres, redis and elastic search using homebrew.)

Local Environment Setup

  1. Clone the git repo

  2. Install Ruby 2.2.1 on RVM: rvm install 2.2.1

  3. Select the global gemset under ruby 2.2.1: rvm use 2.2.1@global

  4. Install Bundler in the global gemset: gem install bundler

  5. Create a custom gemset for questionr: rvm gemset create questionr

  6. Select the gemset and ruby version: rvm use 2.2.1@questionr

  7. cd into your local git repo's directory

  8. Run bundler: bundle install

  9. Set environment variables for foreman by creating a .env file in your project directory with these variables (and ask one of us for the missing values so we can get them to you securely):

    S3_BUCKET=questionr-stage
    AWS_ACCESS_KEY_ID=
    AWS_SECRET_ACCESS_KEY=
    AWS_REGION=us-west-1
    REDISTOGO_URL=redis://127.0.0.1:6379/
    RAILS_RESQUE_REDIS=redis://127.0.0.1:6379/
    RESQUE_ADMIN_PASSWORD= #set this to whatever value you like
    SEARCHBOX_URL=http://localhost:9200
    JANRAIN_API_KEY=
    URL=http://localhost:3000
    
  10. Create and seed the database: foreman run bundle exec rake db:setup

  11. Start the server locally: foreman run bundle exec rails s

  12. Visit http://localhost:3000

  13. Create an account for yourself by visiting http://localhost:3000/admin and logging in with Facebook

  14. Launch a rails console foreman run bundle exec rails c and execute this command to admin-ize your user account: User.last.update_attribute(:admin, true)

Note: When viewing the Resque Web Console for the first time, you'll receive a basic auth challenge. Respond with username questionr and the password you set for RESQUE_ADMIN_PASSWORD in your .env file and ask the browser to remember your credentials.

Contributing (using the fork-and-pull model)

  1. Fork the repo
  2. Create a topic branch git checkout -b my-new-feature
  3. Implement your feature or bug fix and add tests
  4. Ensure that foreman run bundle exec rake passes
  5. Commit your changes git commit -am 'Added some feature and some tests'
  6. Push to the branch git push origin my-new-feature
  7. Create a pull request

About

A simple tool to empower citizens to ask candidates one question: “What specific reforms will you advance to end the corrupting influence of money in politics?”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published