Skip to content

AI-comp/wpcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

688e639 · May 20, 2016
Oct 31, 2013
May 13, 2016
May 8, 2014
May 8, 2014
Nov 1, 2013
May 9, 2014
May 3, 2012
May 11, 2013
May 3, 2012
May 20, 2016
May 10, 2014
Mar 15, 2013
May 8, 2014
May 8, 2014
Apr 11, 2013
May 20, 2016
May 20, 2016
May 20, 2016
May 20, 2016
Apr 29, 2013
Jul 4, 2014
May 3, 2012
May 3, 2012
Oct 31, 2013

Repository files navigation

wpcs [Build Status] (https://travis-ci.org/AI-comp/wpcs) [Dependency Status] (https://gemnasium.com/AI-comp/wpcs) [Code Climate] (https://codeclimate.com/github/AI-comp/wpcs) [Coverage Status] (https://coveralls.io/r/AI-comp/wpcs)

=====

Requirements

  • Ruby (it's recommended to use rbenv to install Ruby)

  • Rails

  • ImageMagick

      sudo apt-get install imagemagick libmagickcore-dev
    

Setup

Install dependencies

  • for general

      bundle install
    
  • for only Linux (after gneral installation)

      sudo apt-get install libnotify-bin
    

Run on development environment

  1. Initialize database and assets

     rake db:migrate:reset assets:clean assets:precompile
    
  2. [Optional] Populate database with mock data (for testing purpose)

     rake populate:mock
    
  3. [Optional] Create users with predefined passwords and groups

     rake ghosts[num_groups,num_users(per group),debug(optional)]
    

Notice * You might have to escape brackets like rake ghosts\[20,5,debug\] on shells * Database should not contain "Group#{N}" named groups nor "user_#{N}_#{M}" named users already * Information will be output to ghosts.csv

  1. [Optinal] Start automatic Rspec tesing with Guard and Spork

     guard
    
  2. Run a rails sever on your machine in development mode

     rails s
    

Run on production environment

  1. Initialize database and assets

     rake db:migrate:reset assets:clean assets:precompile RAILS_ENV=production
    
  2. Run a rails sever on your machine in production mode

     rails s -e production
    

Documents

  • Generate class diagrams for controllers and models

      sudo apt-get install graphviz # if you didn't install graph-viz
      rake diagram:all
    

Performance Testing

You might have to use ruby with version >= 1.9.3 and <= 2.0.0.

rake test:benchmark

Daily development

  • Clean up unused branches which don't exist the remote

      git remote prune origin
    
  • Clean up precompiled javascript files

      rake assets:clean