{"id":21837762,"url":"https://github.com/gabrielsvinha/minesweeper","last_synced_at":"2026-04-13T04:42:24.625Z","repository":{"id":67107776,"uuid":"107478915","full_name":"gabrielsvinha/minesweeper","owner":"gabrielsvinha","description":"MineSweeper rails engine to control a game session","archived":false,"fork":false,"pushed_at":"2017-11-23T23:49:31.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T15:16:09.684Z","etag":null,"topics":["docker","jenkins","mongodb","mongoid","rspec","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrielsvinha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-19T00:39:20.000Z","updated_at":"2017-10-20T03:12:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c1c4b64-39f4-4455-a27d-cb461c33af94","html_url":"https://github.com/gabrielsvinha/minesweeper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gabrielsvinha/minesweeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielsvinha%2Fminesweeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielsvinha%2Fminesweeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielsvinha%2Fminesweeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielsvinha%2Fminesweeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielsvinha","download_url":"https://codeload.github.com/gabrielsvinha/minesweeper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielsvinha%2Fminesweeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279048609,"owners_count":26093037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","jenkins","mongodb","mongoid","rspec","ruby-on-rails"],"created_at":"2024-11-27T20:48:42.049Z","updated_at":"2025-10-15T04:11:20.753Z","avatar_url":"https://github.com/gabrielsvinha.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis application is a rails server to control a MineSweeper game session. :bomb:\n\n# System Config\n\n* **Ruby Version**: 2.3.1\n\n* **Rails Version**: 5.0.0.1\n\n* **MongoDB Version**: 3.4.10\n\n# Endpoints\n\nThe server has the following endpoints:\n\n* **POST** `/board`: Creates a new Board, example:\n```\n{\n  \"height\": 5,\n  \"width\": 5,\n  \"bombs_count\": 4\n}\n```\nCreates a board with 5 lines, 5 columns and 4 bombs randomly generated.\n\n**Note: This application controls a game session, therefore it is possible to create only one board per session, creating another one will overwrite the older.**\n\n* **DELETE** `/board`: Deletes the current board.\n\n\n* **GET** `/status`: Return a JSON with the status of the current game. Example:\n\n```\n{\n  \"playing\": true\n}\n```\n\n\n* **PATCH** `/flag`: Places a flag in the passed position, return `400` in case of the position is invalid. Example:\n\n{\n  \"line\": 1,\n  \"column\": 3\n}\n\n\n* **PATCH** `/play`: Is equivalent to a \"click\" on the specified position. It also discovers the neighbour cells. Example:\n\n{\n  \"line\": 0,\n  \"column\": \"4\"\n}\n\n# Test Cases\n\nSpec tests were made using **RSpec** version **3.7**.\n\n# Launch The Application\n\nThe application uses MongoDB for NoSQL data handling. Here are some options for launching the server.\n\n\n## Development Mode in Your Local Terminal\n\nIf you have a Linux machine and a bash terminal, you can use it in development mode. Use the following commands:\n\n### Prerequisites\n\nMake sure you have [ruby](https://rvm.io/rvm/install) and [mongod](https://docs.mongodb.com/manual/installation/) installed.\n\n### Usage\n\nRun:\n\n```\n$ gem install bundler \u0026\u0026 bundle install\n```\n\nTo install all dependencies\n\n```\n$ sudo service mongod start\n```\n\nTo launch mongod as a systemctl service.\n\n```\n$ bundle exec rails puma -b 0.0.0.0\n```\n\nTo launch your application on port `3000`\n\n## Using Docker Compose\n\nThis application can be run as a Docker Container and Compose can be used to orchestrate de dependencies.\n\n### Prerequisites\n\nMake sure you have [docker](https://docs.docker.com/engine/installation/) and [docker compose](https://docs.docker.com/compose/install/) installed.\n\n### Usage\n\nTo run the standalone application (without database it crashes), run:\n\n```\n$ docker run --name minesweeper-server -d -p 3000:3000 vinhags/minesweeper\n```\n\nOr, use it with docker compose:\n\n```\n$ docker-compose up\n```\n\n**You need to be in the source folder so the docker-compose.yaml can be loaded**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielsvinha%2Fminesweeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielsvinha%2Fminesweeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielsvinha%2Fminesweeper/lists"}