Site Archives: General
1.0RC1 released!
Posted by
Bryan Larsen | December 2, 2009 comments 3 Responses

I’m proud to announce that we’ve just released Hobo 1.0RC1 to gemcutter and rubyforge. It’s named 0.9.100 just in case any of you still have old versions of rubygems and don’t want to upgrade.

The fixes came fast and furiously in the last two weeks, and we took the opportunity to make a couple of small API changes before we locked down for 1.0. The biggest change was the removal of the “:dependent => :destroy” magic. Hobo no longer uses “:dependent => :destroy” to determine your primary collection. You will have to add “children” declarations in your viewhints files if you were depending on this behaviour. There’s a new step in the agility tutorial that talks about this. There’s also a new agility chapter for translations.

At this point we’re frozen for 1.0. From now on only critical and documentation and testing bugs will be fixed on our 1.0 branch. I’m also proud to announce that there are currently 0 critical bugs on our bugtracker. I expect you to change that quickly, but it feels pretty good to get it down to 0, even for a brief moment! Unfortunately, the Lighthouse doesn’t contain all of our documentation and testing bugs, because there aren’t many of those on there either.

Matt Jones (al2o3cr) and Tom Locke made significant contributions to this release.

Changelog

Deletions:

  • Children must now be specified in the viewhints. Hobo no longer uses the presence of :dependent => :destroy to determine the primary child association.

  • The bundles feature of Hobo which never really worked and was never documented has been removed from this release.

  • The message “You must activate your account before you can log in. Please check your email.” which used to be added to the flash message when a user has signed up has been removed from hobo_do_signup.

  • The fix for #556 means that the migration generator now ignores all models that have a hobo_model declaration but not a fields declaration. If you have any models that do not have a fields declaration (join tables, for example), you may wish to add a blank fields declaration.

Major enhancements:

  • Hobo now supports Ruby 1.9.1. Problems have been encountered with Ruby 1.9.1 and Rails 2.3.4. Rails 2.3.3 and 2.3.5 work fine.

  • Hobo has been tested against the new Rails 2.3.5. JRuby users may encounter Rails bug 3497

  • Rails 2.2 is still supported for this release. Support for 2.2 may be dropped post-1.0.

  • Translations (ie, the ht functions) has now been moved into its own module. To access the translation functions from elsewhere use Hobo::Translations.ht. Alternatively, including the Hobo::Translations module into your class will give you ht as a local instance method. (This is one of the things the hobo_controller declaration does.)

  • rake hobo:run_invite_only_generators was added as an alternative to rake hobo:run_standard_generators for those who created their application with the --invite-only flag

  • #409 The <editor> tag has been modified to display the to_s representation of the object while in edit mode. The to_html representation is still used in view mode. The editor tag for HTML columns has been modified to remove the heavy sanitizing that was previously performed. HtmlString will sanitize before saving to the database. You need to update your hobo-rapid.js for this fix. Run rake hobo:run_standard_generators or copy the file directly from github

  • #296 The migration generator now fully understands HABTM join tables. Note that the “decorated join table” functionality that was deprecated in Rails 2.3 is NOT supported.

  • #475 User-defined rich types are now loaded from RAILS_ROOT/app/rich_types, if it exists.

  • EnumString’s can now be translated. The manual has been updated with the details.

  • ViewHint’s can now be translated. Well, they mostly could in 0.9, but it has been cleaned up and documented with ViewHints.

  • Lifecycle states can now be translated. The key is #{table_name}.states.#{state} Transitions use the key #{table_name}.actions.#{transition}

Major bug fixes:

  • #537 The ._?. “smart dot” now returns ‘nil’ rather than calling its trailing function more often than it used to, more closely matching its documentation.

  • #457 ie7-recalc.js has been updated to improve compatibility with IE6. Please update the copy inside of your application, either by running rake hobo:run_standard_generators or by copying the file directly from github

  • #512 Hobo now has better compatibility with non-DRYML templates

Minor enhancements:

  • #554 The transition-buttons tag no longer displays transitions that are not :available_to the user.

  • #536 documentation for field-list more closely matches reality

  • #536 i18n has been silenced. It’s messages can be made to reappear on the log via HOBO_VERBOSE_TRANSLATIONS.

  • #555 Specifying ignore_index :foo will ignore the index named ‘foo’ on the model when generating migrations – handy for indexes that can’t be generated automatically (with a prefix length on MySQL, for instance) or existing indexes in legacy tables.

See also the git log

Hobo 0.9.0 released
Posted by
Bryan Larsen | November 17, 2009 comments 7 Responses

We’ve just released version 0.9.0 of Hobo.  It is available on gemcutter now, and should be on rubyforge within 24 hours.

We’re now entering a feature freeze.  We plan on releasing a 1.0 release candidate on December 1st.  After that point, we will only be fixing critical bugs and documentation.  At this point, we do not consider any of our extant bugs to be critical.   We’ll fix as many of them as we can before December 1st.  If any of them are important to you, please speak up so we can prioritize appropriately.

Major enhancements:

  • Internationalization! Through the hard work of soey and Spiralis, we now have internationalization support in Hobo. The manual page is on the cookbook. Locales are available on github.

  • Index generation: Matt Jones’ automatic index generation code has been merged. Migrations performed with 0.9.0 will now include appropriate indices. The default Rails index names are very long, so this is unlikely to work well on Oracle, which has a 30 character limit. Testing against Postgres, Oracle, SQL Server and JDBC has been extremely limited. To generate indices run script/generate hobo_migration.

  • New projects now have a summary page on /front/summary that provides application information to the administrator. Current projects may add this action by running the hobo_front_controller generator.

  • STI derived classes can add additional fields to their parent class with the fields block. Note that the “can’t generate a migration for STI base and derived classes all at once” issue still applies. In general, STI handling should now work much better.

  • Bug 464 The transition-buttons tag now generates buttons that link to the transition page for transitions that require parameters.

  • Bug 532 In previous versions, you had to add the new HTML5 tags to RAILS_ROOT/config/dryml_static_tags.txt. This version whitelists all HTML5 tags except for aside, section, header and footer, which conflict with existing Rapid tags.

Major bug fixes:

  • Bug 530 is a critical bug for invite-only projects. To incorporate the fix, you must rerun your generators or follow the instructions in the commit

  • Bug 480 Owner actions now work with has_many associations

  • Bug 516 Specifying a belongs_to association as a lifecycle param works; it appears as a select-one on the generated page.

  • Bug 515 Virtual :boolean fields declared with attr_accessor now work

  • Bug 484 Transition actions that require a key no longer check if the model is visible to Guest

  • Bug 485 Lifecycle support on STI models works now. Note that derived classes DO NOT inherit any of the parent lifecycle implementation.

  • Bug 387 STI derived classes now inherit settings like name_attribute correctly.

  • Bug 533 The hidden field generated with a checkbox input shouldn’t have an ID.

  • Bug 526 Routing errors now render not-found-page, rather than the default Rails routing error message.

Minor Enhancements:

  • Aside collections now have a new-link at the bottom (inside the preview-with-more) #421

  • the manual now includes a Generators section, and a subsite tutorial has been added.

  • Bug 386 and Bug 501 have been fixed, reducing the number of extraneous migrations that the hobo_migration generator creates. These are actually Rails and/or database bugs we’re working around. For instance, MySQL does not allow default values for text columns, so Rails silently ignores them. SQLite does not allow scale or precision settings on decimal fields. These types of bugs are good reasons why you should use the same type of database for development, testing and production.

  • A new view_hint, inline_booleans, controls whether boolean attributes are displayed in the header (default behavior of Rapid show pages) or inline with the rest of the field-list. You can either pass a list of field names, or ‘true’ (without quotes) to make all booleans inline.

  • hobo_show now accepts a model instance as a first parameter. This restores symmetry with the other hobo_* actions.

  • on Rails 2.3 and above, routes will be generated with the optional .:format suffix, and the formatted_* routes are skipped.

  • non-required fields that are marked :unique will now allow nil values.

Minor Bug Fixes

  • Bug 540 Hobo::Permissions::Associations::HasManyThroughAssociations#create! did not save as the “!” implied.

See the github log

Hobo 0.8.9 Released
Posted by
Bryan Larsen | October 14, 2009 comments 4 Responses

Our apologies for not releasing Hobo 0.8.9 earlier. We really should have pushed out a new version as soon as Bug 461 was fixed.

We’ve got some exciting stuff coming, including internationalization support from soey and Spiralis, and auto indexing from Matt Jones. This might slightly destabilize edge for a while — consider yourself warned.

The gems are on gemcutter.org now. gem install gemcutter to access them. Hopefully they’ll appear on Rubyforge soon.

Enhancements

  • precompile_taglibs allows you to precompile taglibs during application startup rather than on demand.
  • --invite-only option added to the hobo generator.

Major bug fixes:

  • Bug 461: Firefox 3.5 problems were caused by lowpro.  For existing projects, you will have to update your copy of public/javascripts/lowpro.js

  • Bug 477 caused problems when the user submitted a form from the index page.

  • “collection” was renamed to “collection-heading” in the Rapid generated show-page.

  • Bug 473: Hobo now uses any time zone’s configured for the application rather than using the server’s time zone.

Minor bug fixes and enhancements:

See the github log

Super-easy cross-browser gradient backgrounds
Posted by
Tom | June 23, 2009 comments 3 Responses

screen shot

Hobo 0.8.8 is coming very soon, consisting mostly of bug fixes and bringing us that bit closer to the hallowed version 1.0. While we’re waiting, I though I’d quickly let you know about a very simple Rails plugin I knocked up that makes it extremely easy to add gradient background images to your stylesheets. (If you follow the hobousers group you’ve already seen a mention of this.)

For example:

div.featured { background: url(/gradient_images/50:aaa:fff.png) repeat-x white; }

All that’s happening is that the plugin is rendering a PNG image on the fly; 1 pixel wide, 50 high, with a gradient from a light grey (#aaa) to white. It renders the image you would otherwise have to make yourself in Photoshop or whatever.

The general pattern for the image URL is:

/gradient_images/<height>:<start-color>:<end-color>.<format>

Colours are 3 or 6 digit hex values, as in CSS. The format can be anything supported by ImageMagick (e.g. png or jpg).

You can also do multiple gradients in the same image, like this

div.featured {
  height: 100px;
  background: url(/gradient_images/50:aaa:fff::50:fff:aaa.png) repeat-x 
}

That will give an image 100 pixels high fading from grey to white and back to grey.

Note that you only take the performance hit on the first request, after that the images will be served up directly by your web server thanks to Rails’ page caching. You’ll see a bunch of image files in public/gradient_images.

Requires Rails 2.3 and RMagick.

The plugin is available on github.

UPDATE: We just threw up a quick example app on github. It’s great to see how much nicer you can make the default Hobo app look with just three CSS declarations.