Alto Jardin API

Preamble

This repository contains the API that will be used on the bot repository. The Heroku servers and Telegram bots have been disabled to reduce unnecessary upkeep costs.


Heroku

Bots

Workflow

  1. We create feature-branch and merge-request from issue (this one has its target branch pointing to develop branch)
  2. Complete and validate the issue, merging the feature-branch into staging branch (this triggers the deploy to Heroku staging environment)
  3. Close the issue by merging it into branch develop.
  4. Merge branch develop into master when iteration its complete (this triggers the deploy to Heroku production environment)

PostgreSQL setup

Follow these steps to initialize the PostgreSQL databases:

  1. Install PostgreSQL if needed. On Ubuntu you can do this by running: sudo apt-get install -y postgresql-9.5 postgresql-contrib postgresql-server-dev-9.5
  2. Create development and test databases by running: sudo -u postgres psql --dbname=postgres -f ./create_dev_and_test_dbs.sql

Padrino application setup

  1. Run bundle install --without staging production, to install all application dependencies
  2. Run bundle exec rake, to run all tests and ensure everything is properly setup
  3. Run RACK_ENV=development bundle exec rake db:migrate db:seed, to setup the development database
  4. Run bundle exec padrino start -h 0.0.0.0, to start the application

Some conventions to work on it:

  • Follow existing coding conventions
  • Use feature branch
  • Add descriptive commits messages in English to every commit
  • Write code and comments in English
  • Use REST routes ======= Health API - Alto Jardin ========================

build status

Workflow

  1. We create feature-branch and merge-request from issue (this one has its target branch pointing to develop branch)
  2. Complete and validate the issue, merging the feature-branch into staging branch (this triggers the deploy to Heroku staging environment)
  3. Close the issue by merging it into branch develop.
  4. Merge branch develop into master when iteration its complete (this triggers the deploy to Heroku production environment)

PostgreSQL setup

Follow these steps to initialize the PostgreSQL databases:

  1. Install PostgreSQL if needed. On Ubuntu you can do this by running: sudo apt-get install -y postgresql-9.5 postgresql-contrib postgresql-server-dev-9.5
  2. Create development and test databases by running: sudo -u postgres psql --dbname=postgres -f ./create_dev_and_test_dbs.sql

Padrino application setup

  1. Run bundle install --without staging production, to install all application dependencies
  2. Run bundle exec rake, to run all tests and ensure everything is properly setup
  3. Run RACK_ENV=development bundle exec rake db:migrate db:seed, to setup the development database
  4. Run bundle exec padrino start -h 0.0.0.0, to start the application

Some conventions to work on it:

  • Follow existing coding conventions
  • Use feature branch
  • Add descriptive commits messages in English to every commit
  • Write code and comments in English
  • Use REST routes