Google
[update] looking at rspec I made some tweaks see bottom gist... [update] had some even better ideas for rails see bottom again... Having hacked rails apps is, in my opinion, not sufficient for learning the strengths/weaknesses/ins/outs of ruby, as most of it is obstructed from view. I guess in that sense they shouldn't really be called "helpers" (rimshot?). In any case, I figured I could build a simple Ruby library for querying Mnesia via my little project Grove. This has given me a chance to use Rspec outside of rails, and get working with some of metaprogramming bits of the language that I haven't touched. In particular its pushed me to consider building a query language using Ruby. There's one particular structure I'm leaning towards because it maps well to sql queries, and with Grove, Mnesia set comprehension queries. It's sort of Rspecish. Ideally, adapters would be built to implement the functions for eq, gt, etc that would allow translation into various forms of sql and other query languages. Writing things in ruby is just more fun, and it gives you more options like: It looks like my little adventure into letting ruby talk to Mnesia has pushed me in a whole new direction. I still want to add a lot more to Grove (authentication, better error description/handling, CrUD), but this might be more generally useful for other's applications. [update] even better: [update] rails use:

Published

12 Mar 2009

Tags