docker volume create ruby-bundle-cache
- Add the following alias to your shell configuration file (e.g.
~/.bashrc
or~/.zshrc
), then reload your terminal.
alias docked='docker run --rm -it -v ${PWD}:/rails -v ruby-bundle-cache:/bundle -p 3000:3000 ghcr.io/mas-rad/rails-cli-firefox-esr:latest'
-
Download the Rails Exam app from the github.com/mas-rad/rails-2023-exam repository by clicking on the green "Code" button and selecting "Download ZIP". Unzip the archive in your working directory.
-
From within the repository folder, run the following commands:
docked bundle
docked rails db:setup
docked rails db:fixtures:load
- You are ready! 🎉 Run
docked rails server
and check http://0.0.0.0:3000.
- Modify the Rails application code to fix the 11 failing tests, running
docked rails test:all
should then be all green. The tests code cannot be modified! - When you are done, save all your changes, then create a ZIP file of your whole Rails application folder.
- Generate a 12 characters secret hash with
docked rails secret | cut -c1-12
and append it to the ZIP file name (e.g.rails-2023-exam-1234567890ab.zip
). - Sent me the ZIP file to: [email protected].
- Launch Rails Dev Console:
docked rails console
- List all products routes:
docked rails routes -g products
- Run all tests:
docked rails test:all
Each test is worth 3 points, there's also 3 extra points for the code quality/style, for a total of 36 points.