From: George Moschovitis Date: 2005-12-21T23:17:53+09:00 Subject: Nitro + Og 0.26.0: New auto admin, scaffolding, morphing, sweeper, revisable, searchable Dear devs, New versions of Nitro and Og were just released! homepage: http://www.nitrohq.com install: gem install nitro download: http://rubyforge.org/projects/nitro/ irc: irce.freenode.net #nitro mailing list: http://rubyforge.org/pipermail/nitro-general/ What's new: Another step closer to web programming nirvana. This release features completely recoded scaffolding, an auto admin system, a recoded template-morphing system, a new intelligent dispatcher that handles both nice urls and general structure, and so much more. Moreover, this is the release with the most community contributions. Download now! Most notable changes: * New, intelligent dispatcher handles nice urls automatically, without explicit rewrite rules. At the same time, it handles sub directories, so you are free to design your app's structure as you like. * New template morphing implementation. The morphing compiler is fully customizable. You can implement your own morphers and add them to the morphing system, here for example is the new selected_if morpher: becomes * New Sweeper mixin. Using this mixin allows you to keep the cleanup logic in one place. This logic is called automagically by many default Nitro/Og methods (for example Og insert/update, scaffolding, etc). You can fully customize the behaviour. class Article include Sweeper def sweep_affected(action = :all) expire_affected_output('articles/view') ... end end a = Article[1] a.title = 'New' a.save # => calls expire_affected. This mixin is typically used to automatically clean up output caching files from the filesystem, but you can use it to remove temp rows from the database, or temp objects from a drb server or anything you like. * Searchable mixin. Include this mixin to your classes to make them searchable by the auto administration system. * Added two new session managers (OgSession, FileSession), cleaned up the session code. * Better validations implementation. Cleaner code, less evals, more flexible and easier to extend. * New scaffolding / auto administration system. The implementation is much cleaner and easier to customize. It leverages the latest advancements (dispatcher, sweeper, etc) and adds search support, pager, breadcrumps and more. You can define your own controls to handle properties and relations. Stay tuned for more stuff in the near future. * New Og revisable mixin. Just include this mixin in your classes and get db backed revision support for free. Here comes an example: class Article is Revisable property :body, String, :revisable => true property :title, String end Automatically generates the Revision class (and the backend schema): class Article::Revision article.revisions article.revise do |a| a.title = 'hello' a.body = 'world' end article.rollback(4) * Bug fixed KirbyBase Og adapter. This works great with the new 2.5 gem. * Added more rational defaults, and many predefined options to minimize the amount of setup needed to get your app running. Of course you can still customize just about everything in Nitro. * Improvements to PostgreSQL automatic generation of foreign key constraints. * Added evolution support to the MySql store. * Upgrated to Prototype 1.4 and Scriptaculous 1.5 * Updated the examples, check out the improved blog and why_wiki examples. * Many, many, many bug fixes and smaller improvements. Nitro provides everything you need to develop professional Web applications using Ruby and Javascript. Nitro redefines Rapid Application Development by providing a clean, yet efficient API, a layer of domain specific languages implemented on top of Ruby and the most powerful and elegant object relational mapping solution available everywhere. have fun, George Moschovitis -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com