From e7097773d0f78999a48dcafc31fbe957908156e6 Mon Sep 17 00:00:00 2001 From: Diego Araújo Date: Wed, 4 May 2016 16:10:53 -0300 Subject: [PATCH] Add CONTRIBUTING and HACKING --- CONTRIBUTING.md | 6 ++++++ HACKING.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 HACKING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..de7176a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,6 @@ +### Contributing + +Please, have a look the wiki pages about development workflow and code standards: + + - https://github.com/mezuro/mezuro/wiki/Development-workflow + - https://github.com/mezuro/mezuro/wiki/Standards diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..d81e792 --- /dev/null +++ b/HACKING.md @@ -0,0 +1,84 @@ +## Development + +### System dependencies (Ubuntu 14.04 package names) + - build-essential + - curl + - postgresql-server-dev-9.3 + +### Unpacked dependecies + - PhantomJS >= 1.9.2 (http://phantomjs.org/) + - *NOTE:* Just create sym links for that, for example: + + ```bash + cd /usr/local/share + wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 + tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 + sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs + sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs + sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs + ``` + +### Ruby version + + `2.3.0` + + You can easily install it through the Ruby Version Manager - RVM. Instructions on how to do it can be found at http://rvm.io + + *NOTE:* If you are using the gnome-shell, or any derivate like terminator, you have to mark on your profile the option to use a "login bash". + + +### Environment setup + +- Gem installation: + - `bundle install` + +- Database creation: + - `rake db:create` + +- Database initialization (the seeds script will need the kalibro configurations service running): + - `rake db:setup` + +- Alternatively you can just run the setup script (it will also need the kalibro configurations service running): + - `bin/setup` + +### How to run the test suite + + `rake` + +### Services (job queues, cache servers, search engines, etc.) + +- _Kalibro Processor_ - [version 1.2.1](https://github.com/mezuro/kalibro_processor/archive/v1.2.1.zip). + You can find the latest changes directly on the [repository](https://github.com/mezuro/kalibro_processor). + By default Mezuro will expect it to be running on port 8082 at localhost. + In order to run it as expected, run on two different terminal instances: + + ```bash + RAILS_ENV=local rails s -p 8082 + RAILS_ENV=local rake jobs:work + ``` + +- _Kalibro Configurations_ - [version 2.1.0](https://github.com/mezuro/kalibro_configurations/archive/v2.1.0.zip). + You can find the latest changes directly on the [repository](https://github.com/mezuro/kalibro_configurations). + By default Mezuro will expect it to be running on port 8083 at localhost. + In order to run it as expected, run: + + ```bash + rails s -p 8083 + ``` + +### Deployment instructions + + Deployment is made through Capistrano (https://github.com/capistrano/capistrano) + + `cap production deploy` + + In order to do this, you must have the password. + + Otherwise, you can also modify the deployment file at config/deploy.rb. + +#### First Deploy + + 1. Make sure that the deployment file config/deploy.rb is correctly configured to the installation server; + 2. Also, make sure that the installation server already has rvm installed; + 3. cap deploy:setup will install the ruby correct ruby version, the gemset and all the directories tree; + 4. cap deploy:migrations deploys the code and run all the migrations -- libgit2 0.21.2