anachronic and vines: the joys of lightly populated namespaces

I released my first two real open source projects this week, both Ruby. Kind of nice, never thought it would happen, then it just did.

Vines is a (very small currently) bundle of useful general step definitions for Cucumber, it’s not currently rails specific, and I may make rails-specific steps a different include so it can be used for regular ruby projects.

The only step currently available is very simple, but not provided by cucumber. From its own feature tests:

Feature: Should happen steps
  In order to assert errors in my steps
  As a developer
  I want to talk about a step's side effects or consequences

  Scenario: step raises
    Then an error should occur when I eval `raise`

  Scenario: step raises a certain type
    Then an ArgumentError error should occur when I eval `raise ArgumentError`

That’s pretty simple stuff. There was and will be more there, but the code and dependencies had too many rough edges for now.

Anachronic went straight to plugin; in integration testing Paperclip I wanted to know whether deleting site images (my model wrapper for a paperclip image attachment) was cleaning up files correctly. I wanted to do it in Cucumber, and I wanted the steps to be simple.

The idea is very simple really:

When I add a site image
Then the images directory should have changed
When I delete the site image
Then the images directory should be back to how it started off

You could, of course, use git for this, but I didn’t care about file contents, only whether the files still existed. I think it’d make the tests slow. You may also like to use some combination of ls and diff; have fun with those man pages.

Simple solution — snapshot file and directory names recursively, then spot the difference between snapshots.

Wrote some specs, wrote some code, specs passed, put into the rails app as a plugin, wrote steps, green feature. Magic.

So, at last, something other than forks on my github page!

One email: three hours

Well, maybe it was worth it. Been a while since I head to proof-read something I wrote.

Fingers crossed, a new client.

Played 1 times
[Flash 9 is required to listen to audio.]

Faith and the Muse — Shattered in Aspect

Blair isn’t president, I got more work, and possibly a new client. Today was good. If only there were some Sandman left.

laureola:

The pygmy mouse lemur went missing for over a century.  Photograph: Mark Thiessen/AP/National Geographic. -> guardian uk

(via antje, awkwardforever, srslycuteanimals, allcreatures)

It was ambivalent towards its newfoundness.

(this post was reblogged from laureola)

Another month and I'll be free of the HSBC monster

And there will be much rejoicing.

How To Use An Apostrophe

via: earthmancomehome, via

Nice page, though I find this last bit amusing.

(this post was reblogged from earthmancomehome)
Possibly the only dismaying aspect of excellence is that it makes living in a world of mediocrity an ongoing prospect of living hell. The subtle distressing perturbation.
Harlan Ellison