This project has as main objective to build an app that solves a board similar to the minesweeper game.
The app takes an API and retrieves a random board, which is a two dimensional Array. The application should replace all the white spaces with an integer representing the number of bombs near the element.
Once the board is solved, the app will proceed to return an API with two properties, the problem, and the solution.
You can try it here.
- Ruby 2.7.0,
- Rails 5.2.0,
- Rest-client 2.1,
- Rspec-rails 3.4,
- Rubocop 0.81.0,
- Visual Studio Code 1.50.1,
- Docker
To get a local copy up and running follow these simple example steps.
You need to install:
- A Git GUI.
- Docker.
- Docker Compose.
- An IDE (Integrated Development Environment).
To run the project:
- Clone the repository with Git.
- Open the repository with your IDE and open the terminal.
- Build a new docker image.
$docker-compose build
- To run the image.
$docker-compose up
- Open http://localhost:3000 to view it in the browser.
Unit tests for:
-
Solver module.
-
Requests.
In your terminal search the repository's address and run:
$docker-compose run --rm web rspec --format documentation
It will provide you well-organized output on your terminal with information about the tests.
To deploy on Heroku you can check this tutorial from the Odin Project.
After pushing the last changes to the remote repository, follow this steps:
- Create the heroku app.
$heroku create
- Verify that you see heroku in the output.
$git remote
- This will push the master branch.
$git push heroku master
- Open the app
$heroku open
- Built using docker, which means it is not necessary to install any other software to run the app.
Rossiel Carranza
- Github: @RossielCS
- Linkedin: Rossiel Carranza
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give an βοΈ if you like this project!
This project is MIT licensed.