Posted by Tom on 2010-08-06
If you’re paying attention, you’ll know Domizio Demichelis as the contributor of some big improvements to Hobo’s internationalisation. Well Domizio has jumped in and is now taking over from where Bryan left off in the push to Rails 3 compatibility. Welcome aboard Domizio!
Domizio is going to let us know how he’s getting on via some short posts here on the blog. He just sent me his first thoughts, so over to Domizio:
Porting Hobo to Rails 3
The new Rails 3 compatible version of Hobo is on the go. It has been 15 days now that I am involved in the project, and it looks very challenging. Rails 3 introduces a lot of improvements, but also a lot of changes that inevitably break the legacy code. Hobo is not an exception: it is deeply interacting with the Rails internals, so the last version got deeply broken as well.
I can only guess the huge amount of work that it will take to make it work, but the result will absolutely be worth the effort: thanks to Rails 3 the new Hobo will have less code, less monkey patching and more efficiency and flexibility.
Hobo becomes a Rails 3 engine.
Thanks to rails 3 engine capability a lot of code has moved to better places and will be loaded at a better time. All the patches to the frameworks are loaded right after the framework with
ActiveSupport.on_load hooks. All the code that needs reloading in developer mode has its own place to live in the
config.to_prepare blocks. The programmer will have more choices to configure Hobo internals with the
config.hobo.* configuration variables, the code will be more organized and easier to maintain.
New routes system for Hobo 1.3
The old ModelRouter has gone: it was drawing routes directly. The new system generates its own roues file and adds it to the
routes_reloader.paths, so no monkey patching is needed anymore. The
hobo_routes.rb file may be analized by the programmer that can eventually override any route in the regular