Author Archives for Bryan Larsen
git subtree
Posted by
Bryan Larsen | July 28, 2010 comments 2 Responses

Although the blog has been quiet of late, one only has to look at the mailing list to see how busy the Hobo world is. I’d like to give a shout-out to Matt and Kevin and everybody else who are patiently answering questions there. The Hobo user community rocks! But a quiet blog does give the wrong impression sometimes.

I’ve got a few other things Hobo related that I hoped to blog about but aren’t ready yet, but there’s nothing stopping me from using this blog to point out tools that will make your Hobo experience better, is there?

Most of the Hobo and Ruby on Rails community uses git for version control. Git is awesome, but there are two common pain points: its learning curve, and submodules.

I won’t go into the problems with git submodules here. If you’ve got a small project with only one developer and you never need to modify your submodules, you’re unlikely to run into problems, but as you add developers and start modifying the modules, hassles quickly creep in.

In the past, when you added a plugin to your project, you basically had two options: copy the files into your project with script/plugin or link the files in using git submodules.

Now you can get the best of both worlds. With git subtree you get the behaviour of a copy, but you can still easily update the plugin and even extract changes to the plugin to push the changes upstream.

For instance, to add Hobo as a plugin to your project:

git subtree add --squash --prefix=vendor/plugins/hobo git://github.com/tablatom/hobo.git master

You can then update the plugin with:

git subtree pull --squash --prefix=vendor/plugins/hobo git://github.com/tablatom/hobo.git master

If you make changes to the Hobo in your app, you can extract them and send them to us with:

git subtree split --prefix=vendor/plugins/hobo --branch hobo-master
git push git@github.com:someuser/hobo.git hobo-master:master

(Replace someuser with your github username). And then send us a pull request.

Git subtree is not yet part of git itself, but hopefully it soon will be. Even if it does not, it isn’t doing anything crazy or unorthodox to your repository, so I wouldn’t worry about using it.

Two other alternatives to git subtree are Braid and Piston. They use similar strategies under the hood. However, I’ve found git subtree to work better for me.

New release candidate
Posted by
Bryan Larsen | January 26, 2010 comments One Response

We fixed a few minor bugs, so I’ve put out a new release candidate. Please try it in your application so we can release 1.0 as soon as possible. Thanks. See the change log for the details.

Hobo 1.0RC3
Posted by
Bryan Larsen | January 21, 2010 comments 4 Responses

I’m pleased to announce the release of Hobo 1.0RC3 (AKA 0.9.104). We hope that this will be the last release candidate before 1.0.

A large amount of the effort between the last two releases has gone into testing and into the documentation.

Here’s the changelog:

#604:

The new input-many introduced in 0.9.103 had issues with >10 elements, several issues running with IE7 and an issue with its javascript callbacks.

#537:

x._?.to_s now returns nil rather than a blank string

#592:

If you previously had a snippet such as this:

<table fields="this, date, account.login">
  <login-view:>
    ...
  </login-view:>
</table>

You now have to use:

<table fields="this, date, account.login">
  <account-login-view:>
    ...
  </account-login-view:>
</table>

The same change has been applied to <field-list>

#568:

hobo_index now supports the :scope option

See also the git log

Hobo 1.0RC2 released
Posted by
Bryan Larsen | December 10, 2009 comments One Response

Warning

If you are on Rails 2.3.5 and are running Hobo as a plugin, please check out bug #574 for a workaround you need to apply to your Rakefile.

Bugs

This release fixes a couple of serious bugs: 565 and 567.

Input-Many & has-many :through

The <input-many> tag in Rapid has been replaced with a version ported from the <hjq-input-many> tag in Hobo-JQuery. This brings the following enhancements:

  • it supports 0 length associations
  • input-many’s may be nested inside of other input-many’s
  • it allows the (+) and (-) buttons to be customized
  • it provides a default for the item parameter
  • it copies from a template rather than cloning the current item and clearing it
  • the template may be overridden
  • id’s of textareas and selects and other non-input’s are adjusted properly
  • classdata for inner elements updated

The new <input-many> tag differs from <hjq-input-many> in that:

  • it’s written in prototype.js rather than in jquery
  • it doesn’t have the delayed initialization feature
  • the name of the main parameter is default rather than item
  • hjq-input-many allows you to provide javascript callbacks. input-many fires rapid:add, rapid:change and rapid:remove events that can be hooked.

You will have to ensure that your hobo-rapid.js and clean.css files are updated in your application.

Changes

There were other minor bugs fixed. See the github log