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?”
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.)
-
Clone the git repo
-
Install Ruby 2.2.1 on RVM:
rvm install 2.2.1
-
Select the global gemset under ruby 2.2.1:
rvm use 2.2.1@global
-
Install Bundler in the global gemset:
gem install bundler
-
Create a custom gemset for questionr:
rvm gemset create questionr
-
Select the gemset and ruby version:
rvm use 2.2.1@questionr
-
cd
into your local git repo's directory -
Run bundler:
bundle install
-
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
-
Create and seed the database:
foreman run bundle exec rake db:setup
-
Start the server locally:
foreman run bundle exec rails s
-
Visit http://localhost:3000
-
Create an account for yourself by visiting http://localhost:3000/admin and logging in with Facebook
-
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)
- Fork the repo
- Create a topic branch
git checkout -b my-new-feature
- Implement your feature or bug fix and add tests
- Ensure that
foreman run bundle exec rake
passes - Commit your changes
git commit -am 'Added some feature and some tests'
- Push to the branch
git push origin my-new-feature
- Create a pull request