Posts tagged github

has_many_polymorphs and Rails 3

I’m gradually porting a number of my older Rails apps over to Rails 3. The main motivation is a chance to really put the new version through its paces, get a better sense of how it’s working, where plugins are at, etc; but it’s also rather nice to get some of the performance improvements and cleaner code along the way.

Catapult relies on Evan Weaver’s has_many_polymorphs plugin quite extensively so it was important to be have a Rails 3 compatible version. I couldn’t find any evidence that anyone else was working on it, so I’ve forked the github project and made a few alterations. I’ve set it up to work as a gem (so I can pull in the latest version using bundler) and adjusted to fit the new rails initialization process. It’s rather hacky, but it’s working for me so far.

Evan informs me that he has no plans to work on compatibility, so I’m going to see what time I can find to tidy it up a bit more, make sure the tests are passing, etc. If anyone else is so inclined, I’d love some help with that. You can find my fork on github.

Chris Wanstrath on Github

Obie Fernandez has a nice interview with Chris Wanstrath of Github up on InfoQ. Github continues to be fascinating, both the company as a startup and the product as a change to how people interact with and around code.

From the interview, I particularly like the sound of their hiring practices, which have so far seemed very focussed on new employees’ community engagement and potential to bring new ideas to the table.

Friday Links – January 8th 2010

It’s time for me to take another stab at occasional link blogging. While I really appreciate those who blog individual links, I seem to keep coming back to ways of packaging links. Here’s a first installment for 2010:

Last month may have been the time for advent calendars—with Drew’s 24ways yet again containing many excellent articles that have me very excited about HTML5—but the jQuery team have decided to follow a similar model in the run up to the release of version 1.4. jQuery14.com kicks off on January 14th, but already has details of their new API website based on the contents of the jQuery Reference Guide.

The folks (downstairs from our new office) at the Really Interesting Group have been keeping busy. Not only can you now see the price list for Newspaper Club (want to make a newspaper like we did at Greenbelt? Newspaper Club should be your first port of call) but you can also read about the fun they had exposing data in Christmas presents. On the newspaper front, I found the idea of the Nashville Retrospect fascinating – it’s a free monthly newspaper devoted to Nashville nostalgia and history.

There’s all sorts of excitement around key-value store Redis. Simon Willison pointed out that the addition of BLPOP and BRPOP support over Christmas means you can use it to drive a queue server without polling. Ezra Zygmuntowicz has been working on an Actor library for ruby based on it. And there’s lots more. It’s good to see that the NoSQL/LessSQL movement is developing beyond simply replacing relational databases and opening up new possibilities and techniques.

For those of us who work with drupal, Project Verity could be quite a boon. Mark Boulton and Leisa Reichelt quite rightly point out that If you’re a company that takes pride in good design and user experience, handing over a Drupal backend can be a bit embarrassing and difficult to reconcile with your company philosophy. Project Verity is their response and while I’ve not actually seen it, I suspect those two are likely to be onto something. It certainly would be nice to be able to deliver a drupal site with a friendly face for admins. I’ve not really been tracking drupal 7 development, and hopefully it’ll reduce the need for such projects. If not, I imagine a port won’t take long to surface.

Given that I’ve been playing around with a Palm Pre and WebOS lately I’m delighted to see Palm using github. There’s a fair range of sample code that comes with the SDK, but this looks likely to be more comprehensive and it’ll be fascinating to see what develops as people begin to fork the code, throw in comments, etc.

Talking to WordPress with ActiveRecord

As mentioned in yesterday’s announcement I’m pulling some content across from this blog (running on wordpress) into the new Ket Lai site (a merb app). I’ve found myself doing similar things a few times lately, such as on Only Connect (on which more, soon) and so have built out a selection of ActiveRecord models to help me talk to a wordpress database from a ruby app.

At Matt‘s urging (he’s been using them to move data from a legacy site), I’ve finally put those models up on github. Being a single file they arguably should have been a gist, but I’m reserving the right to reorganise them in future.

They’re far from complete in that there are lots of validations I could have added in, named scopes that would probably be handy, and loads of convenience methods that some might like, but hopefully they’ll be of use to someone and evolve over time.

(on the subject of wordpress, I’m glad to see the addition of changelogs to the plugin directory – being asked to upgrade plugins without any idea what’s changed has long been a bugbear of mine, so hopefully this will resolve some of that)

Rails 2.3 final and theme_support updates

Somewhere between Ruby on Rails versions 2.3.0 (RC1) and 2.3.2 (final) a change was made to the arguments required for one of the methods the theme_support plugin requires. I must confess I hadn’t spotted it, but github user knapo kindly sent me a message with a patch. That patch is now applied in the main repository, as are a few tweaks to the ActionMailer integration to better handle multipart emails. You can get the new version from github.

Perhaps more significant than those small patches is that I’ve now pushed up a new rails app for use in testing theme_support. The tests are a series of cucumber stories, and the app is very barebones designed entirely to test the various features. I could do with tightening up the way the test app and the main plugin repository are connected, but it’s a start and has been very helpful with the aforementioned patches. Any improvements to the test suite would be much appreciated. You can, of course, find it on github.