Install Homebrew (OS X)
Homebrew is the best package manager out there for OS X.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
We recommend you to use one of the Ruby version control. We mainly use Ruby 2.0.
brew install openssl
brew install ruby-build
brew install rbenv # Follow the instructions after installing rbenv
brew install rbenv-gemset
rbenv install 2.0.0-p247
brew install postgresql
We are using Phantom.js as a part of testing the javascript application.
brew install nodejs
brew install phantomjs
Fork the repository to your account then clone it to your machine
git clone https://github.com/USERNAME/manshar.git manshar && cd manshar
cp backend/.env.sample backend/.env
cp backend/config/database.yml.sample backend/config/database.yml
# Installing backend dependencies.
cd backend
gem install bundler
bundle install
# Installing web-client dependencies.
cd web-client
sudo gem install sass
npm install
bower install
cd backend
bundle exec rake db:create
bundle exec rake db:migrate
# Running the backend.
cd backend
rails s
# Running the web-client.
cd web-client
grunt serve
# Backend Tests.
cd backend
rspec spec
# Web-client tests.
cd web-client
# This will also show you the test coverage.
grunt test
# If you want to dive deeper into the code coverage to see what is not covered.
# You can run the following command and go to manshar/web-client/coverage/
# Folder and copy paste the folder name after the localhost:5555 that opened.
# You'll end up with something like: localhost:5555/PhantomJS 1.9.2 (Mac OS X)
grunt coverage
We recommend you to add manshar/manshar
as upstream
git remote add upstream https://github.com/manshar/manshar.git
git fetch upstream
git merge upstream/master
Before that, *try* to have your repository synced.
Let's say you want to contribute to XYZ feature, for your local repository create a branch for this feature
# you are on master
git branch xyz
git checkout xyz
After implementing the feature and its test cases, push it to your github account
If your edits touch the web-client code, make sure to also run grunt
to build the web-client. And make sure
it builds successfully without errors or jshints warnings (try to fix jshints warnings).
git add .
git commit -m "feature XYZ"
git push origin xyz
Then open a pull request so we get notified for the feature you've implemented.