- PostgreSQL 10+
- Ruby 2.6+
RAILS_ENV=development
POSTGRES_HOST={postgres_host}
POSTGRES_PORT={port}
HTTP_HOST={host:port}
To install run bundle install
. And start application running rails s
.
API documentation is available at /api-docs
.
SWAGGER_DRY_RUN=0 rake rswag:specs:swaggerize
On the first run, the match_snapshot
matcher will always return success and it will store a snapshot file. On the next runs, it will compare the response with the file content.
If you need to replace snapshots, run the specs with:
REPLACE_SNAPSHOTS=true bundle exec rspec
If you only need to add, remove or replace data without replacing the whole snapshot:
CONSERVATIVE_UPDATE_SNAPSHOTS=true bundle exec rspec
bin/rails standard
To fix linter issues
bin/rails standard:fix
Merge your code in develop
branch.
Add heroku site:
heroku git:remote -a mangroves-atlas-api
And deploy:
git push heroku develop:master
MAILER_DEFAULT_HOST={MRTT API base url}
MRTT_UI_BASE_URL={MRTT UI base url}
SMTP_ADDRESS={SMTP address}
SMTP_PORT={SMTP port}
SMTP_USER_NAME={SMTP username}
SMTP_PASSWORD={SMTP password}