I'm fixing little problems that my configuration is having with hobix svn trunk. I'll post them here as I go?<br><br>Here is the first one ...<br><br>hobix blogs was throwing an exception when there were no blogs that looks like this:
<br><br>/usr/local/lib/ruby/site_ruby/1.8/hobix/commandline.rb:133:in `blogs_weblog': undefined method `-@' for nil:NilClass (NoMethodError)<br> from /usr/local/bin/hobix:79<br><br>Because although it would respond to sort, there was nothing in the array. So the following prints the no blogs message as expected.
<br><br>Index: lib/hobix/commandline.rb<br>===================================================================<br>--- lib/hobix/commandline.rb (revision 125)<br>+++ lib/hobix/commandline.rb (working copy)<br>@@ -127,10 +127,10 @@
<br> def blogs_weblog_explain; "List your weblogs."; end<br> def blogs_weblog_args; []; end<br> def blogs_weblog<br>- if @config['weblogs'].respond_to? :sort<br>- blogs = @config['weblogs'].sort
<br>- name_width = blogs.collect { |b| b[0].length }.max<br>- tabular( blogs, [[-name_width, 0, 'weblog-name'], [-40, 1, 'path']] )<br>+ if ( ( @config['weblogs'].respond_to? :sort ) && ( @config['weblogs'].length != 0 ) )
<br>+ blogs = @config['weblogs'].sort<br>+ name_width = blogs.collect { |b| b[0].length }.max<br>+ tabular( blogs, [[-name_width, 0, 'weblog-name'], [-40, 1, 'path']] )<br> else<br> puts "** You have no blogs set up. Use `hobix setup_blogs' to get started."
<br> end<br><br clear="all"><br>-- <br>Arthur A. Vanderbilt<br><a href="mailto:arthur@thevanderbilts.net">arthur@thevanderbilts.net</a>