Skip to content

2016 Spring - CS 169 - Group #8 - Question Bank project. Forked from 2015 Spring repo.

Notifications You must be signed in to change notification settings

UFPE/coursequestionbank

 
 

Repository files navigation

Course Question Bank - CS 169 Project

Code Climate Travis CI Test Coverage PivotalTracker

User Guide

See the Wiki.

Running or Testing Locally

You need to run a solr process during local development (or Cloud9 for those who used it). So bundle exec sunspot-solr start -p 8983 to start and bundle exec sunspot-solr stop to stop (basically the steps in the .travis.yml). And the config in sunspot.yml should enable the app to connect properly.

When running locally, you can click the "Dev Login" button and login as either saas (Instructor privilege) or saas-admin (Admin privilege) with no password needed.

Deployment

Currently set up to deploy to Heroku.

  1. Provision a Heroku app and add the Websolr and Rollbar addons. There is a Websolr worker that periodically re-indexes the questions so that keyword search will work; you can run it manually with heroku run rake sunspot:solr:reindex

  2. Login to your GitHub account, go to Settings, then OAuth applications. Click "Register new application" and fill in the fields as follows:

  • Application name: something you or your students will recognize
  • Homepage URL: https://yourappname.herokuapp.com
  • Description: something your students will recognize, or can leave blank
  • Callback URL: https://yourappname.herokuapp.com/auth/github/callback Make note of the "Client ID" and "Client Secret" GitHub assigns when you register the app.
  1. In the Rollbar addon for Heroku, generate a Rollbar access token if you don't already have one.

  2. You now need to tell Heroku the GitHub client and secret as well as the Rollbar access token. You can do this two ways.

  • Manually: in the Heroku app dashboard, go to Config Variables and manually enter values for github_key, github_secret, and ROLLBAR_ACCESS_TOKEN (case is significant).
  • Semi-automatically: The app expects to find a Figaro-friendly config/application.yml file with the keys github_key (client ID), github_secret, and ROLLBAR_ACCESS_TOKEN. Create the file, then run figaro heroku:set -e production to propagate these values ti Heroku.
  1. Deploy: git push heroku master

  2. Setup the remote database: heroku run rake db:migrate

  3. Create the initial admin user based on their GitHub username: heroku run rake setup:add_admin[github-username-here]

You should now be able to login.

About

2016 Spring - CS 169 - Group #8 - Question Bank project. Forked from 2015 Spring repo.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 59.7%
  • Gherkin 18.4%
  • HTML 14.6%
  • JavaScript 4.0%
  • CSS 2.8%
  • CoffeeScript 0.5%