rafi-khan/marketplace — pull request #12 by rafi-khan (2014-10-09 19:50:23+00:00)
Title: CAS Login, User and Project models, controllers

This pull request includes all the setup work the authors did together, including

- CAS Login
- Basic Angular setup
- Model and controller setup

In addition, it defines the `User` and `Project` models, and also their associated controllers. It also includes the search functionality for users, projects, and openings. All behavior is tested in `spec/models/` or `spec/controllers/`.

Note that after pulling this pull request, you will have to `bundle` and then "recreate" you database to match the one this expects. Though this is bad practice, in the early stages, I figure dropping the database and recreating from scratch is not so bad.

I programmed a `recreate` command directly into my `~/.bash_profile` , with

alias recreate='bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake db:seed && bundle exec rake db:migrate RAILS_ENV=test'

The `bundle exec` part is being a bit overly verbose; if you're typing yourself, the commands are

rake db:drop
rake db:create
rake db:migrate
rake db:seed
rake db:migrate RAILS_ENV=test # for the test database

Then you can run `rails s`, or run all the rspec tests (good practice to make sure everything is working on your computer as well) wiht `rspec .` (note the period).