Skip to content

Solution for issue #18 #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

diogonoda
Copy link

My Solution

Setup

Project dependencies

Container setup

Build the containers for the application

$ docker-compose build

Install webpacker

$ docker-compose run webapp bundle exec rails webpacker:install

Running the application

Let docker compose do the job for us

$ docker-compose up

Testing

Run tests using rspec

$ docker-compose run webapp bundle exec rspec

Code Linter

Code quality evaluation is available with rubocop

$ docker-compose run webapp bundle exec rubocop

The application will be accessible on localhost:3000

Personal Notes

  • Sample data offered by data does not match to rules
  • If I can switch "between 0 and 5 cards", all of them can be used

ToDos

  • Fix challenge description on README
  • Create a rails application running on docker
  • Setup testing tools
  • Write a few test scenarios
  • Build an API to receive the file (mocked response)
  • Handle errors when uploading file (no file, error messages)
  • Build a view to retrieve response (mocked data)
  • Implement cards logic
  • Implement data parsing
  • Choose best hand
  • Implement possible hands analysis
  • Improve data presentation
  • Tests for frontend
  • Possible hands step running in threads/ractors

diogonoda added 11 commits May 16, 2021 16:59
Changing README challenge description for the requested challenge.
Listed an high level overview of what has to be done to build the deliverable.
Web application build with Ruby on Rails, nginx andDocker/docker-compose setup
Setup rspec, rubocop and fix rubocop offenses
An high level test scenarios that will guide my
develompent classes
Config of a controller to receive and validate a file format.
Installation of webpacker to enable views
Mock a few data on service response to build a view with that data
Creates a card model with an interface for instantiating
objects and validating inputs
Enables hand evaluator to check all hands picking
the best of them
Splitted hand evaluation between classes. Evaluation occurs
in order of priority and returns as soon as it finds the
best hand
Data showing in one line per game. Error messages shown
below file input. Rubocop offenses fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants