Wolfmans Howlings

A programmers Blog about Programming solutions and a few other issues

Porting xgps to Qtopia for the Freerunner

Posted by Jim Morris on Wed Aug 27 14:46:34 -0700 2008

Background

I was getting bored waiting for Trolltech to release the next version of Qtopia for the Freerunner, so I ported the xgps client from gpsd's distribution to Qtopia.

As you may know by now, Qtopia does not have X11 so none of the existing X11 based or GTK based GPS clients work. I was exploring GPSD because I wanted to to be able to get a one time position for my sunset calculator which requires your current latitude and longitude. Although GPSD is not well suited for that (thats a whole other blog entry), I did notice you can connect to it over the ethernet, so I was playing with cgps and xgps that you find in the GPSD tar file, running on my desktop, talking to gpsd running on my Freerunner.

... Show more ...

Posted in Openmoko  |  Tags openmoko,freerunner,gps  |  32 comments

Ruby 1.8.6 on Openmoko Freerunner

Posted by Jim Morris on Sun Aug 10 23:09:54 -0700 2008

I finally got around to building ruby 1.8.6 for my FR. I modified the ruby bitbake files that I found in the Mokomakefile openembedded directory. I am not sure how one actually is meant to do this, as the OE site is down and the docs don't explain it. So I just replaced the 1.8.5 ones with the 1.8.6 ones. I also managed to fix a bug in the 1.8.5 BB recipe that was causing socket to not build.

I also got the ruby dbus library to work, although I don't know what to do with it yet :)

... Show more ...

Posted in Openmoko  |  Tags ruby,freerunner  |  3 comments

OpenMoko Freerunner after a few weeks

Posted by Jim Morris on Tue Jul 22 13:20:08 -0700 2008

Well I have had this thing for a few weeks now, and I have burned a lot of hours playing with it :) (Wish I could bill someone for those hours it would have paid for the phone 4 times over!)

I started with 2007.2 the built in image, and upgraded it initially with dfu-util, then with opkg update && opkg upgrade.

... Show more ...

Posted in Openmoko,Linux  |  Tags openmoko,freerunner  |  5 comments

Upgrading Ubuntu Gutsy to Hardy

Posted by Jim Morris on Sun Jul 13 04:32:03 -0700 2008

I did my duty and upgraded from Gutsy to Hardy, after letting Hardy settle for a while. For the most part it was painless (unlike the last upgrade to Gutsy!).

Unfortunately the sound was now broken I have a HDA-Intel AD198x Analog chip set.

... Show more ...

Posted in Linux  |  Tags ubuntu,hardy,cups  |  4 comments

OpenMoko Freerunner first impressions

Posted by Jim Morris on Fri Jul 11 13:53:11 -0700 2008

OK so I just got my shiny new OpenMoko Freerunner GTA02.

This is an Open source GSM cell phone, running Linux and OpenMoko S/W stack.

... Show more ...

Posted in Openmoko,Linux  |  Tags openmoko,freerunner  |  19 comments

XPath matchers for rspec

Posted by Jim Morris on Wed Jan 02 13:32:50 -0800 2008

I've been working on a project that is mostly Java for the last many months, so haven't had much Ruby or Rails stuff to share.

However one thing I found when working on my tests in Java was an xpath matcher for JUnit 4.0 using the Hamcrest libraries.

... Show more ...

Posted in Rails,RSpec  |  Tags rspec,xpath,matcher  |  5 comments

Bit Vector Preferences

Posted by Jim Morris on Tue Aug 07 23:53:09 -0700 2007

In my latest web project I potentially have a lot of boolean preferences, which I use for enabling or disabling various email notifications to users.

Rather than having to add a migration everytime I want to add a new preference, I thought I would use the composed_of feature in my model and compose the boolean preferences from a bitvector. That way I can simply modify my model to add new preferences rather than add new columns to the database.

... Show more ...

Posted in Rails  |  Tags rails,preferences,composed_of,bitvector  |  2 comments

Paginating acts_as_taggable with will_paginate

Posted by Jim Morris on Mon Jul 30 15:04:50 -0700 2007

A question I see asked a lot is how do I paginate acts_as_taggable (on steroids)?

I haven't seen any answers I liked, so I created my own, which I'm sure a few people won't like either ;) But it works for me (tm).

... Show more ...

Posted in Rails  |  Tags acts_as_taggable,will_paginate  |  20 comments

RSpec testing all actions of a controller

Posted by Jim Morris on Sat Jul 28 14:23:07 -0700 2007

A pattern I find very helpful is to find all the actions in a controller and apply a test to all those actions.

For instance this is useful for automatically testing all actions are protected from unauthorized access when using a login system.

... Show more ...

Posted in Rails,RSpec  |  Tags rails,rspec,controllers  |  14 comments

Using RSpec to test HAML helpers

Posted by Jim Morris on Sat Jul 14 16:44:33 -0700 2007

UPDATED for HAML 2.0 and RSpec 1.1.5 - Changed open to haml_tag, prefix helper. to all rspec calls...

The most recent release of HAML introduced a neat feature that allows you to use HAML-like syntax in your helpers to generate HTML HAML#haml_tag.

... Show more ...

Posted in HAML,Rails,RSpec  |  Tags test,haml,rspec,helpers  |  9 comments