To run the server in development mode, you'll need:
- ruby interpreter version according to
.ruby-version. Using rvm or rbenv is advisable - PostgreSQL database version 9.3. On OS X, using the Postgres.app is the simplest way to get it running.
- Redis is also used to schedule background jobs. On OS X, you can install it via homebrew.
bundle installto get all required gemsbundle exec rake db:createto create the databasebundle exec rake db:setupto create the database schema and seed databundle exec hookupTo make your database schema sync after each git checkout- Set up your local_env.yml file copied from local_env.example.yml. You should get the development values from a colleague
bundle exec rails s
This will run the Rails server on http://localhost:3000 and Sidekiq job processor.
On the current stage of the project, the following environments are available:
| Environment | Branch | Description |
|---|---|---|
| Staging | master |
Used to perform review on the client side. |
All the Pull Requests must be made against master.
Branches should be named according to the following structure:
[task-type]/[task-id]/[task-title]
Where:
task-typecan befeature,bugfixorenhancementtask-idcorresponds to the id of the card on Jiratask-titledescribes what the task concerns.
Through gitlab CI, we check the following aspects after every branch is pushed
rubocopChecks that the ruby syntax meets the best practice guidelinerubycriticIf the code is to complex it breaks and asks for you to refactor(make it simpler)yardocWe verify that we meet at least 90% documentation coveragesimplecovWe run the tests and check that testing coverage is at least 95%
rake ci:build:commit # Runs all tests
rake ci:build:rubocop # Runs RuboCop code format verification
rake ci:build:rubycritic # Runs RubyCritic code complexity verification
rake ci:build:simplecov # Runs rspec with code coverage analysis and profile
rake ci:build:documentation # Runs documentation generate and verifies its coverage
For rapid development with React, this setup includes [https://webpack.js.org/concepts/hot-module-replacement/](Hot Module Replacement), which will update React components without reloading the page.
To use HMR, run:
$ npm run dev