I just posted a rev for the Ape (runnable, source), as follows:

  • It uses the now-official APP namespace http://www.w3.org/2007/app. Since none of the Atom servers out there that I know now have made this rev yet, the Ape won’t work with anything. Get with the program, guys. [There are a few now.]

  • I added a test where I fire in a few posts, verify the app:edited ordering, then hit one of them with a PUT and see if the collection got re-ordered.

    Unfortunately, to make sure the timestamps are distinct, there are now a couple of sleep calls, so the Ape runs slower.

  • I added a test that when you delete a media link entry, the corresponding media resource goes away too.

  • [A couple of days later.] Oops, turns out I’d entirely missed the <app:accept> changes from the protocol-15 draft, but they’re in there now.

  • [Friday] Better error messages when the Ape can’t connect to a host, a situation caused by a (common) error scenario where you screw up the href value in a link.

  • [07/10] Lots more tests to check that when you PUT, to a Media Resource, the MLE gets updated and the media collection gets reordered properly.

  • [07/25] Added a test where I post an entry full of evil markup—script elements, funky attributes, javascript: links and so on—and see how well the server does at sanitizing it.

There are more items on the to-do list: Dave Johnson had some grief getting Ape to run locally. Among other basic goofs, there’s currently no README. Sigh, and sorry Dave.

Programming Ruby in NetBeans is sure a lot nicer than programming C in Emacs.



Contributions

Comment feed for ongoing:Comments feed

From: John Cowan (Jun 26 2007, at 23:05)

You don't actually need to sleep; you can fake it by saving the last timestamp you handed out, and if the current time is less than or equal to the saved timestamp, hand out the saved timestamp + 1 instead.

[link]

From: Sylvain Hellegouarch (Jun 27 2007, at 02:52)

Well actually amplee [1] already supports the new namespace.

[1] http://trac.defuze.org/wiki/amplee

[link]

From: Mark Lee (Jun 30 2007, at 08:53)

I believe that I've found a bug in the Slug verifying code - you said in my blog comments that it looks for <link>s with either @rel="alt" or no @rel. Shouldn't this be @rel="alternate", per RFC 4287, Section 4.2.7.2?

[link]

From: Tim Bray (Jun 30 2007, at 09:29)

You're right, Mark. D'oh. Fixed.

[link]

From: Tor Norbye (Jul 11 2007, at 01:07)

Hi Tim,

I've improved NetBeans' source formatter for Ruby recently, and it does a better job with for example hanging indents. I tried it on your <code>ape.rb</code> and it fixed various line continuations that I'm guessing the previous version of the formatter had flushed to the left.

[link]

From: Vassilis Rizopoulos (Jul 26 2007, at 01:46)

Tim, I think you should take a look at Hoe for organising the ape sources.

It simplifies a lot things like creating a gem, maintaining a history and documentation, the onerous stuff.

It's a rather clever set of rake tasks, although most of the tasks are geared for use with rubyforge (it automates releasing, posting to news, posting the announcement, publishing the rdocs etc. in true DRY fashion) so that would make it less attractive for use with APE.

This http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe has the gist of it.

[link]

author · Dad
colophon · rights
picture of the day
June 26, 2007
· Technology (90 fragments)
· · Atom (91 more)
· · Ruby (93 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!