DEV Community

Samuel Lubliner
Samuel Lubliner

Posted on • Edited on

Sinatra: Rock, Paper, Scissors

I made a dynamic website that allows the user to play Rock, Paper, Scissors.

The most satisfying part of this project was having a single we_play.erb that handles the html for Rock, Paper, or Scissors using the DRY principle (don't repeat yourself).

Use on every project:

sinatra-contrib gem automatically reloading code changes without having to restart the web server

better_errors gem more friendly error pages
Create a /views folder to store our ERB templates

/views/layout.erb file with standard HTML boilerplate

Configuration for this project:

bin/ folder scripts:
bin/dev starts up our web server
bin/setup will bundle install and perform other initial setup work

spec/ folder includes automated tests
rake grade command is included to run the automated tests

Top comments (0)