Before you start working on a task, make sure it's assigned to you on the issue tracker. You either assign it to yourself, or the project lead assigns it to you.
Install Homebrew (OS X)
Homebrew is the best package manager out there for OS X.
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
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
[Install Postgres, NodeJS, and PhantomJS] (https://github.com/manshar/manshar/wiki/Installing-Postgres,-NodeJS,-and-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
# Create postgres role and leave the password empty when prompted.
createuser -P -s -e postgres
cd backend
bundle exec rake db:create
bundle exec rake db:migrate
# Optional: Seed the Database with some test data.
bundle exec rake db:seed
# 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.