DEV Community

Samuel Lubliner
Samuel Lubliner

Posted on • Edited on

1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more