Skip to content

yaroslavrick/my_money_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personal finance manager

Coverage

Requirements

  • Ruby 3.1.2
  • Rails 7.0.4

1. Clone the repository

https://github.com/yaroslavrick/my_money_app
cd finance_app

2. Copy the .env.example file.

cp .env.example .env

3. Install dependencies

bundle

4. Setup Docker services (PostgreSQL and Redis):

docker-compose up

Ensure that the ports configured in .env do not conflict with your running services.

Check the PID that use the port 5432:

sudo lsof -i :5432

If there is conflict: Kill that PID:

sudo kill <PID>

sudo service docker start

sudo systemctl stop redis postgresql

docker-compose up

If you can't start docker, it can be problem with user permissions: sudo gpasswd -a <user> docker or: sudo usermod -aG docker $USER

5. Create and setup the database

rails db:create && rails db:migrate && rails db:seed

6. Start the app

rails s

7. Visit the app at localhost: http://localhost:3000

9. Run RSpec tests:

bundle exec rspec

Testing

To run the test suite, use the following command:

bundle exec rspec

Using Rswag

To view the API documentation, run the rails server and go to http://localhost:3000/api-docs

To create rswag file for new endpoint, run the following command:

bundle exec rails generate rspec:swagger API::MyControllerName

Then watch the file in spec/request/api/my_controller_name_spec.rb and add the test cases for the endpoint.

Generate documentation for the endpoint using:

bundle exec rake rswag:specs:swaggerize

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published