On 6/24/07, Ruby Quiz <james / grayproductions.net> wrote: > The LSRC organizers would like us to build name picking applications they can > choose from. The functionality is very basic: My design goals were: * What can I do in an hour? * How can I avoid graphics design, which I suck at? * How can I minimize (to zero, if possible) gems, add-ons, etc? My solution is a dead simple WEBrick servlet thingy that poaches the stylesheet and images from the conference website. It uses a YAML input file of names and attributes, and an ERB template to display the result. Every time you reload the page you get a new name. It keeps track of the names that have been served (saved to a file, so it survives a restart of the app). I wasn't sure what to do when it ran out of names, so I'm currently just clearing the save file and restarting the serving of names (if there are more door prizes than attendees?). Here's the app: http://pastie.caboo.se/73618 (save as name_picker.rb) Here's a sample data file: http://pastie.caboo.se/73619 (save as names.yml) Run the app: ruby name_picker.rb names.yml Point your browser to http://localhost:4242/