Ruby Rails application for JSON-API with ActiveRecord, RSpec
- Ruby 2.7.5
- PostgreSQL
The application manages stocks and bearers
- Clone poject
- Run bundler:
$ bundle install
- Create database.yml:
$ cp config/database.yml.sample config/database.yml
- Run application:
$ rails server
To execute tests, run following commands:
$ bundle exec rake db:migrate RAILS_ENV=test #(the first time only)
$ bundle exec rspec
DDD Service-based app design with step-based operations
Stock API with 4 endpoints:
- GET
api/stocks
- returns a list of available stocks with related bearers - POST
api/stocks
- creates a stock and links it to a bearer, if a bearer doesn't exist it will be created - PATCH
api/stocks
- updates a stock, if bearer attributes are present - finds or creates a new bearer - DELETE
api/stocks
- deletes a stock from the API
The software is available as open source under the terms of the MIT License.