Nebby is a domain-specific language for describing surveys.
Nebby provides a quick, Ruby-throated way to construct a survey and present the results in an easy-to-understand and easy-to-share way.
by Colin Dean http://cad.cx
- Ruby 1.9+
- Sinatra
- MongoDB
See example.rb.
N.b. that I have yet to actually write any code for processing this example.
The primary goal is to get this working as a standalone web site. The workflow would be something like this:
gem install bundler
duhgem install nebby
duhnebby init my_survey
creates a nebby installation in directory my_survey- edit my_survey.rb to your heart's desire
- deploy to heroku or duostack or the like
- share link to survey
- see results
- ???
- profit
Eventually, nebby should be useable as a gem with a sinatra or rails application. sinatra integration is foremost, as standalone nebby will use sinatra. rails is secondary because it will need to meet the robust needs of rails clientele.
- Randomization of recorded answers - optionally omit timestamp of answer
- Randomization of question order - each new respondent gets a randomized order of questions
Surveyor is an existing gem and has a similar DSL. However, its syntax is more procedural whereas nebby's is more block-oriented in the style of many testing frameworks.
However, it's likely that nebby will draw some semblance of influence from Surveyor. Also, I've never used Surveyor.