Sharks with Lasers... WATCH OUT
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
public
spec
vendor/assets
.env.example
.gitignore
Gemfile
Gemfile.lock
Guardfile
Procfile
README.md
Rakefile
config.ru
dump.rdb
erd.pdf
wercker.yml

README.md

LaserShark

wercker status Code Climate Code Climate Dependency Status

Ruby / Rails

This project is built with :

  • ruby 2.1.1 (mentioned in the Gemfile)
  • rails 4.1.0 (rc2 for now)
  • slim instead of erb/haml
  • postgres 9.x
  • bourbon instead of bootstrap/foundation
  • phantomjs (use brew to install) for integration test driver
    • Please make sure your phantomjs brew package is up2date: brew update && brew upgrade phantomjs
  • poltergeist for phantomjs driver

Setup

Follow these steps in order please:

  1. Clone the project
  2. bundle install
  3. Setup your config/database.yml based off config/database.example.yml (cp it)
  • If you are using vagrant (which already has postgres on it): please remove host: localhost from both the development and test db settings. Also, please add username: and password: as empty keys under both sections.
  1. bin/rake db:setup
  2. Setup new DNS Alias for localhost:
  • From your terminal, type in sudo nano /etc/hosts (Mac/Linux Only)
  • Note: if you are using a VM (Vagrant, etc), this should be done on your host (main) machine, not your virtual machine
  • Add the following entry as a new line at the end of the /etc/hosts file: 127.0.0.1 compass.dev.
  • Now you can go to the URL http://compass.dev:3000/ instead of http://localhost:3000/ for when you are working on this app.
  1. Setup a .env file based on .env.example in the project root: cp .env.example .env
  2. Create a Github App (see steps below)
  3. Start the server, using the bundle exec guard or the bin/rails server command

Github App Setup

User (student/teacher) Authentication can only happen through Github. Much like how Facebook has Apps that you need if you want to allow users to login through Facebook, we need to create an "app" on Github).

  1. Create a Github application on your Github profile (for your dev environment): https://github.com/settings/applications/new
  2. Specify http://compass.dev:3000/auth/github/callback as the Callback URL (when they ask you)
  3. After the app is created, it gives you some keys. Add the OAuth client ID and client secret as GITHUB_KEY and GITHUB_SECRET to your .env file
  4. Kill and Restart your local server (guard or rails s or whatever) if running

Server

Use guard to start the server and run the tests: bundle exec guard

Alternatively, you could start the server using: bin/rails s and run the tests using bin/rake spec

Project Management

At the moment, this project is managed via a Public Trello Board

Notes

https://github.com/wingrunr21/flat-ui-sass was used to convert FlatUI Pro from LESS to SASS (located in vendor/assets )

Activities Seed

Ask the teachers for the activites_seed.rb which has some activities that can be populated by the bin/rake db:seed command. They will send you a gist with the rb file in it.

Custom markdown

To make code selectable in the browser use:

```ruby-selectable Some selectable text Some selectable text Some selectable text ```

```selectable Some selectable text here Some selectable text here Some selectable text here ```

To make a toggleable answer section:

???ruby
Some ruby code herecode
Some ruby code herecode
Some ruby code herecode
???