/todomvc-rails-2023

TodoMVC application built with Rails 7.1

Primary LanguageRubyMIT LicenseMIT

TodoMVC Ruby on Rails 7.1 app for the MAS-RAD 2023

Rails Test Action Status

This TodoMVC application written with Ruby on Rails 7.1 is used as a learning tool in the context of the Master of Advanced Studies in Rapid Application Development (MAS-RAD) in the CAS-DAS Frameworks module.

Getting started

  1. Install Docker (and WSL on Windows). Then copy'n'paste into your terminal.
docker volume create ruby-bundle-cache
  1. 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'
  1. Fork the mas-rad/todomvc-rails-2023 repository to your own GitHub account and clone it locally.
  2. From within the cloned repo folder, use your terminal to ensure that git remote -v includes both an origin remote pointing to your fork and an upstream remote pointing to mas-rad/todomvc-rails-2023. If the upstream remote is missing, add it with git remote add upstream https://github.com/mas-rad/todomvc-rails-2023.git.
  3. Install the Ruby gem dependencies with docked bundle.
  4. Finally, run the DB migration with docked rails db:migrate.
  5. You are ready! 🎉 You can now run docked COMMAND to execute commands in the Rails container. For example, docked rails server will start the Rails server (http://0.0.0.0:3000) and docked rails test:all will run the whole test suite.

Working on an exercise

  1. Update your upstream remote with: git fetch upstream
  2. Optional, list available remote branch with: git branch --remote
  3. Create a new exercise-XX branch from the remote branch with git checkout -b exercise-XX upstream/exercise-XX
  4. Do the exercise and ensure that all tests are green with docked rails test:all.
  5. Commit your changes.
  6. Push your exercise-XX branch to your origin with: git push origin.
  7. Visit mas-rad/todomvc-rails-2023 and open a pull request.

Author

Thibaud Guillaume-Gentil (@thibaudgg)