Repository navigation
Developing for Bandido Person
This document details how to get Bandido Person up and running locally, and how to write code for it.
Setup your development environment first. Then clone the repository to your local machine and cd into it:
git clone git@github.com:1000Memories/acom-bandido-plus.git
cd acom-bandido-plus
The first time you cd into the project directory, RVM should prompt you to accept the gemset. Press y to accept.
Ruby has a tool called bundler that lets you easily manage dependencies (it's similar to Nuget Package Manager). If you haven't already, install it with gem install bundler.
Dependencies are defined in Gemfile. Run bundle install to install/update these dependencies.
Run rake db:migrate to migrate your database schema to the most current version. To get tests working, you will also have to run RACK_ENV=test rake db:migrate to migrate the test database.
Run foreman start to start the app on http://localhost:5000 .
If you want to generate some sample Bandido Person pages, run rake db:seed[user_id], replacing user_id with your own ACOM user ID (this will allow you to test both edit and non-edit mode of Bandido Person).
We use RSpec for server-side testing: https://www.relishapp.com/rspec
Install autotest if you haven't already with gem install autotest. This will rerun tests automatically when you save files.
To run the tests, just enter autotest into the terminal.
We use Jasmine for client-side testing: http://pivotal.github.io/jasmine/
Run the following to start up these tests:
rake guard
rake jasmine
You can then open http://localhost:8888 to run the tests. Guard will recompile the JS / tests when you save files.