public
Description: Vanilla in Ruby
Home | Edit | New

TODO

  • provide some security so that anonymous users can’t run arbitrary ruby. Maybe use $safe_level or _why’s sandbox?
  • be able to load dynasnips from actual .rb files. Maybe the dynasnip class should provide some kind of serialise method that creates a snip with the given name? Perhaps some attribute declaration DSL that sets properties? Or maybe just store instance variables as tuples? It would be nice to be able to define methods on this class and then call them within the handle method. Perhaps declare some public methods whose results are stored as tuples in the snip?
  • Add textarea resizing, so that it grows as you edit content (i.e. http://jasonmoser.com/ajax/, although that implementation is a bit crufty perhaps)
  • Add indexes on implementations to tuples.snip_id – since that’s how they are typically loaded

Completed

  • Implement a Rack adapter, rather than using Sinatra as the webserver, so that it can be run under FastCGI (Sinatra depends on mongrel, which makes it a bit more difficult to use easily).
  • We should be able to move edit and new into dynasnips, i.e. /space/edit?name=snip_name. The edit dynasnip would then store the edit sub-template against itself (hmm, but what about changed header?)
  • It’d probably be useful to be able to call ‘render’ from within a dynasnip. Maybe making dynasnips subclasses of Renderer::Base would allow this, and possibly streamline implementation even further?
  • Fix the edit template when one of the snip parts includes HTML – at the moment it messes up the template if there’s a in it. Looking at how this wiki does it, it could just be a case of HTML-escaping the contents of the text area. We’ll also need to CGI escape the values when they get posted back. ERB has html_escaping. CGI does the URL escaping. Lovely.
  • Can system templates be rendered as a snip, so snips are included via {snip syntax} ? maybe that’s not important.
  • Add an accessor to Snip to find all snips which match some name/value, i.e. Snip.find(:name => ‘created_at’, :value => ‘>= 2.weeks.ago’). Something like that. This is going to be important for writing dynasnips (i.e. du-jour) (implemented as Snip.with(:attribute, ‘condition’))
Last edited by lazyatom, Mon Mar 10 12:59:19 -0700 2008
Home | Edit | New
Versions: