Silly toy Sinatra app to provide something to style
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
views
.gitignore
README.mdown
classes.yaml
config.ru
index.yaml
initialise.rb
yoga.rb

README.mdown

Yoga Classes

This is a silly little Sinatra app that provides some functionality and renders some pages that can be styled with haml/sass/javascript.

The idea is that the app presents a view of all the available classes at a Yoga studio. It is possible to unsubscribe students from a class, and it is possible to promote a student into a harder class.

Ultimately, the idea is to present this functionality using columns and draggable boxes reprsenting the students.

Initialisation

State is stored in a two YAML files:

  • index.yaml
  • classes.yaml

To begin with a new set of users and classes, run:

ruby initialise.rb

Indexes

Indexes is a list of the Yoga classes available at the studio, organised by difficulty.

Classes

Classes is the database of attendees of each class.

Running the app

There's a config.ru file which means you can run this with shotgun or rackup, or if, for some reason, you really want to run the app for real, you can serve it with unicorn and Nginx.

To have a play, just run:

shotgun config.ru

Then browse to http://localhost:9393

Known issues

For some reason, I can't get this to work with my versions of Ruby 1.9. However, my friend could... I plan to fix this very soon, however, until then, just run it with 1.8.7 or REE and it'll be fine. It might also be fine on 1.9 for you. YMMV.