<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Spinach - Home</title>
  <id>tag:spinach.andascarygoat.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://spinach.andascarygoat.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://spinach.andascarygoat.com/" rel="alternate" type="text/html"/>
  <updated>2008-07-23T11:02:39Z</updated>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-07-23:86</id>
    <published>2008-07-23T10:04:00Z</published>
    <updated>2008-07-23T11:02:39Z</updated>
    <category term="actionscript"/>
    <category term="git"/>
    <category term="tribby"/>
    <link href="http://spinach.andascarygoat.com/2008/7/23/tribby-github-embeddable-contribution-graph" rel="alternate" type="text/html"/>
    <title>Tribby: Github embeddable contribution graph</title>
<content type="html">
            &lt;p&gt;
Hopefully i don't steal any names with this one :P.
&lt;/p&gt;

&lt;p&gt;
As the title aptly puts it, &lt;a href=&quot;http://github.com/zmack/tribby/&quot;&gt;Tribby&lt;/a&gt; is a tiny flash app that displays a user's contribution to a repo, much like the nice bar thingies do on github. The nice thing about it, though, is that it makes it dirt easy to just roll your own contribution visualisation dingies, since all the cheesy data transfer-conversion part is done for you, so you're just left with an array containing the number of commits belonging to the user and the total number of commits. 
&lt;/p&gt;
&lt;p&gt;
My ugly first attempt at getting something showing looks like this:
&lt;/p&gt;
        &amp;lt;embed src=&quot;http://spinach.andascarygoat.com/assets/2008/7/23/Tribby.swf&quot; height=&quot;60&quot; width=&quot;400&quot; /&gt;

&lt;p&gt;
That shows &lt;a href=&quot;http://substantiality.net/&quot;&gt;Sam Smoot&lt;/a&gt;'s contribution to the &lt;a href=&quot;http://github.com/sam/dm-core/&quot;&gt;datamapper core repo&lt;/a&gt;. Much love to mr. Smoot !
&lt;/p&gt;

&lt;p&gt;
It's fully scalable, so if you want it bigger or smaller, just change the width and height and you're all set. The danger is that if you make it too small you won't be able to make out crap, and if you make it too big it'll just make people cry and call you a meanie. Whichever works best for you.
&lt;/p&gt;
&lt;p&gt;
The level of actionscript you need to know to start making your own visualization isn't really that high so you could start experimenting armed only with the &lt;a href=&quot;http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/&quot;&gt;AS3 LiveDocs&lt;/a&gt; and the awesome &lt;a href=&quot;http://www.projectsprouts.org/&quot;&gt;Sprouts&lt;/a&gt; gem. Big tanks to &lt;a href=&quot;http://www.asserttrue.com/&quot;&gt;Luke Bayes&lt;/a&gt; for a fantastic job on that project.
&lt;/p&gt;

&lt;p&gt;
Anyway, that's about all there is to say for now, feel free to check out the readme in the &lt;a href=&quot;http://github.com/zmack/tribby/&quot;&gt;Tribby&lt;/a&gt; repo, fork it, kill it, make it bake cookies and such. Any questions or whatnot, hit me up on &lt;a href=&quot;http://twitter.com/monsieur_pickle&quot;&gt;twitter&lt;/a&gt; or just leave a comment.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-07-09:84</id>
    <published>2008-07-09T17:54:00Z</published>
    <updated>2008-07-09T17:56:10Z</updated>
    <category term="merb"/>
    <category term="ruby"/>
    <category term="somewhat useful"/>
    <link href="http://spinach.andascarygoat.com/2008/7/9/inflector-fun-with-datamapper-and-merb" rel="alternate" type="text/html"/>
    <title>Inflector fun with datamapper and merb</title>
<content type="html">
            &lt;p&gt;
Uh, really awkward. I've been posting so little that i've actually forgotten what the standard post structure is like, and am now forced to steal despicably from my other posts. I'm a dirty thieving bastard :(
&lt;/p&gt;
&lt;p&gt;
But, i digress.
&lt;/p&gt;
&lt;p&gt;
As of late, I've been messing around with &lt;a href=&quot;http://merbivore.com/&quot;&gt;merb&lt;/a&gt; for a personal project of mine, as old men do in the privacy of their own homes. Being the original fellow that we all know i am, my project has nothing to do with lolcats. Wanting to enforce that as thoroughly as possible, i decided to send a clear message to everybody, and screw up the inflector for 'lolcat'. 
&lt;/p&gt;
&lt;h2&gt;Long version ( filled with passion and romance )&lt;/h2&gt;
&lt;p&gt;
It seemed like a good idea at the time, although i must admit, alcohol was involved. 
&lt;/p&gt;
&lt;p&gt;Lawfully, i read the init.rb file, and found the code i was craving: &lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
# Here we define erratum/errata exception case:
#
# Language::English::Inflector.word &quot;erratum&quot;, &quot;errata&quot;
&lt;/pre&gt;
&lt;p&gt;
&quot;If it works for a fancy word like that, it's sure to work for 'lolcat' !&quot;, i thought, conspiring to the demise of humorous felines. Alas, having uncommented that piece of code, i was greeted by my old friend, the shit storm. Do say hello
&lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
/Users/zmack/Projects/omgpron/config/init.rb:133: uninitialized constant Language::English::Inflector (NameError)
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core/bootloader.rb:304:in `load'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core/bootloader.rb:304:in `load_initfile'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core/bootloader.rb:253:in `run'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core/bootloader.rb:65:in `run'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core/server.rb:51:in `start'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/lib/merb-core.rb:87:in `start'
        from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.4/bin/merb:12
        from /usr/bin/merb:19:in `load'
        from /usr/bin/merb:19
&lt;/pre&gt;

&lt;p&gt;
Dug around a bit, turns out the class was &lt;em&gt;Language::English::Inflect&lt;/em&gt;. No worries, we just change it to that and it does the trick. Well, not really.
&lt;p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
&gt;&gt; &quot;locat&quot;.pluralize # omg omg ?
=&gt; &quot;locats&quot; # gnoes :(
&lt;/pre&gt;

&lt;p&gt;Elegantly, i break out the hammer, and mightily unleash it upon the unsuspecting merb&lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
require 'ruby2ruby' # =&gt; true
&quot;lolcat&quot;.method(:plural).to_ruby # =&gt; &quot;def plural\n  English::Inflect.plural(self)\nend&quot;
&lt;/pre&gt;
&lt;p&gt;What is this treachery ? I was strictly instructed to use &lt;em&gt;Language::English::Inflect&lt;/em&gt; and now this doppelgänger comes to haunt me ?&lt;/p&gt;
&lt;p&gt;The trouble is, apparently, that Datamapper's extlib, being the eager little beaver that it is, also implements a &lt;em&gt;pluralize&lt;/em&gt; method, and uses the english gem with no namespacing. &lt;/p&gt;
&lt;p&gt;Using &lt;em&gt;English::Inflect&lt;/em&gt; in &lt;em&gt;init.rb&lt;/em&gt; results in more fail, as Datamapper apparently isn't loaded by that time. The thing that came to my mind by this point was to just stick the inflector rule in a model. If it's loading a model, Datamapper is bound to be loaded, wouldn't really make sense to be in the model without Datamapper, so our Inflector is bound to be in reach down there.
&lt;/p&gt;
&lt;p&gt;
And now, after a hard day's work, it is finally time to admire the fruits of our labor
&lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
&quot;lolcat&quot;.pluralize # =&gt; &quot;lolyourmum&quot;
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Awesome !&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Short version&lt;/h2&gt;
&lt;p&gt;If you're using merb and want to add a custom inflector, the init.rb comments are bunk, and what you have to use is&lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
Language::English::Inflect.word &quot;erratum&quot;, &quot;errata&quot;
&lt;/pre&gt;
&lt;p&gt;
Moreover, if you're also using Datamapper, the method on String gets monkeypatched, so you need to patch DM's inflector as well, by sticking the following in one of your models ( well, _near_ them anyway )
&lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
English::Inflect.word &quot;erratum&quot;, &quot;errata&quot;

class SomeModelOmg
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-05-04:54</id>
    <published>2008-05-04T16:52:00Z</published>
    <updated>2008-05-04T16:55:12Z</updated>
    <category term="badjo"/>
    <category term="projects"/>
    <link href="http://spinach.andascarygoat.com/2008/5/4/badjo-progressing-faster-than-a-nine-inch-nail-through-a-rotting-casket" rel="alternate" type="text/html"/>
    <title>Badjo progressing faster than a nine inch nail through a rotting casket</title>
<content type="html">
            &lt;p&gt;Been hacking away at this for a couple of days, and this is pretty much where i'm at currently.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gravatars get shown ( yay )&lt;/li&gt;
&lt;li&gt;Added project details when clicking on a repo ( have to add some sort of transition thingy but right now i can't think of a decent one so right now the text just magically appears )&lt;/li&gt;
&lt;li&gt;Made the whole thing fully resizable&lt;/li&gt;
&lt;li&gt;Scrolling for the project list ( the white circles control it - rubbish, i know, but MAGIC ! )&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So here's a quick look at what's what, and seeing as &lt;a href=&quot;http://evil.che.lu&quot;&gt;Cristi&lt;/a&gt; let me know that i apparently stole &lt;a href=&quot;http://drnicwilliams.com&quot;&gt;Nic&lt;/a&gt;'s son's name, this demo is entirely dedicated to him !
&lt;/p&gt;

&amp;lt;object height=&quot;300&quot; width=&quot;230&quot;&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;embed src=&quot;http://spinach.andascarygoat.com/assets/2008/5/4/GithubBadge.swf&quot; height=&quot;300&quot; width=&quot;230&quot; /&gt;
		&amp;lt;/object&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-04-30:51</id>
    <published>2008-04-30T08:04:00Z</published>
    <updated>2008-04-30T08:05:32Z</updated>
    <category term="badjo"/>
    <category term="projects"/>
    <link href="http://spinach.andascarygoat.com/2008/4/30/badjo-preview-o" rel="alternate" type="text/html"/>
    <title>Badjo preview ;o</title>
<content type="html">
            &amp;lt;object height=&quot;400&quot; width=&quot;210&quot;&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;param /&gt;
				&amp;lt;embed src=&quot;http://spinach.andascarygoat.com/assets/2008/4/30/GithubBadge.swf&quot; height=&quot;400&quot; width=&quot;210&quot; /&gt;
		&amp;lt;/object&gt;
		&amp;lt;label&gt;GitHub user:&amp;lt;/label&gt;
		&amp;lt;input /&gt;
		&amp;lt;input /&gt;
&lt;p&gt;
Stick a username in the input box, hit 'go', and it should either display a sad Octocat ( stuff failed, world coming to an end ), or actually display your repos. Your gravatar won't get displayed quite yet, sorry :( It was a big adjustment for me as well. But until i fix it, you can have Octocat ! Octocat's just as awesome, if not, even more awesome !
&lt;/p&gt;
&lt;p&gt;
Right, so this is pretty much it, if you look at the html in this post, after you overcome your gag reflex at all the rubbish in there, the &quot;FlashVars&quot; section of the flash snippet of the code contains the git user, and the bgcolor param and embed attribute control the movie's background color. 
&lt;/p&gt;
&lt;p&gt;
If you click around on stuff nothing happens, for the moment and i'm still bouncing around ideas of what it should actually do on click, so if you've got any suggestions leave a comment, hit me up on &lt;a href=&quot;http://twitter.com/monsieur_pickle&quot;&gt;twitter&lt;/a&gt;, or just fork it and hack it to bits :D. 
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-04-30:50</id>
    <published>2008-04-30T07:42:00Z</published>
    <updated>2008-04-30T07:43:53Z</updated>
    <category term="actionscript"/>
    <category term="badjo"/>
    <category term="projects"/>
    <link href="http://spinach.andascarygoat.com/2008/4/30/badges-anyone" rel="alternate" type="text/html"/>
    <title>Badges, anyone ?</title>
<content type="html">
            &lt;p&gt;
For the past month or so i've been doing ActionScript 3. It's typed, it's compiled, and it has this 'dynamic mode' that allows you to basically code it like it's straight javascript, but that incurs some sort of performance penalty, but nobody knows the exact value of that penalty. Long story short, it's ok.
&lt;/p&gt;
&lt;p&gt;
This would pretty much justify the lack of posts since the amount of new information i could share on ruby topics has dropped by quite a bit. But, i digress. 
&lt;/p&gt;
&lt;p&gt;
So it's easter and i'm having a beer and snooping around the interwebs looking for pictures of monkeys arm-wrestling, and one thing leads to another and i notice that &lt;a href=&quot;http://github.com&quot;&gt;Github&lt;/a&gt; has an api, and aforementioned api works with json as well. Being the go-getter i am, i start pondering about stuff i could possibly do with this new-found gem, and the first thing that pops out is &quot;some sort of thing that displays a person's repos !&quot;. 
&lt;/p&gt;
&lt;p&gt;
Ten or so minutes later, just as i'm setting up and grabbing another beer, &lt;a href=&quot;http://drnicwilliams.com&quot;&gt;dr. Nic&lt;/a&gt; starts showing off the &lt;a href=&quot;http://github.com/drnic/github-badges/tree&quot;&gt;javascript badge thing&lt;/a&gt; that he'd done. Epic cryface ensues, but then, with renewed force, i decide to make mine not bigger, not better, but DIFFERENT !. 
&lt;/p&gt;
&lt;p&gt;
Nic made his with TDD ? Well screw that, i'll go hardcore, NO TESTS WHATSOEVER.
&lt;/p&gt;
&lt;p&gt;
Nic made his using jquery ? I'll... well, that doesn't really count, since i'm using a different language. BUT it's different nonetheless !.
&lt;/p&gt;
&lt;p&gt;
Also, it has rounded corners. Rounded corners are always a big win. 
&lt;/p&gt;
&lt;p&gt;
So anyway, without further ado, &lt;a href=&quot;http://github.com/zmack/badjo&quot;&gt;here&lt;/a&gt;'s the repo. It's in pretty much what i'd call 'early alpha' right now, or in layman terms &quot;LOL IT KINDOF WORKS !&quot;, but it gets the job done. I'll put a post up with a test so you can check it out for yourselves in a bit. ( no clue about the name tbh, at first i thought it would be cool to have it be like, &quot;badge&quot; + &quot;banjo&quot;, because banjos are inherently cool, but now i think it's rubbish, so meh :'[ )
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-03-04:36</id>
    <published>2008-03-04T18:46:00Z</published>
    <updated>2008-03-04T19:03:03Z</updated>
    <category term="somewhat useful"/>
    <category term="vim"/>
    <link href="http://spinach.andascarygoat.com/2008/3/4/vim-tip-tuesday" rel="alternate" type="text/html"/>
    <title>Vim Tip Tuesday</title>
<content type="html">
            &lt;p&gt;
For the past few days i've been basically migrating all of my working hours over to another machine. While this sounds horrendously dull and annoying, i can pretty much assure you that it is. The most annoying thing, by far, though has been getting vim to act the same as it had on my former electronic helper. 
&lt;/p&gt;
&lt;p&gt;
The quick fix for this would've been to just import &lt;a href=&quot;http://evil.che.lu&quot;&gt;chelu&lt;/a&gt;'s hardcore .vim folder, but that just left me with a nagging feeling that i wasn't actually using all of the stuff in there. I wanted to go bare bones, raw bit mode, hunter hunted, man and nature, leaf and squirrel ! In layman terms, i just wanted to know what the hell each line of my conf was actually doing, instead of importing 2000 lines of stuff which had a pleasant outcome. 
&lt;/p&gt;
&lt;p&gt;
In the end, the stuff that i managed to boil my config down to contained two main things:
&lt;/p&gt;
&lt;h2&gt;Having vim not deselect after indenting in visual mode&lt;/h2&gt;
&lt;p&gt;
This irritated me more than having warm beer served to me by a fat waiter. I'd continue on with the prose on this topic, but the bulk of the matter is that it pissed me off. This fixes it, or rather it uses a 'large hammer' approach to solve this issue
&lt;pre&gt;
vmap &amp;lt;&amp;lt; &amp;gt;gv
vmap &amp;gt;&amp;gt; &amp;gt;gv
&lt;/pre&gt;
It basically tells vim to reselect the last selection after shifting left/right. Not the most elegant approach, but most effective.
&lt;/p&gt;
&lt;h2&gt;Temp files all over the place&lt;/h2&gt;
&lt;p&gt;
You know vim tempfiles. They're those things that show up when you want to check the status in your SCM of choice and just piss you off by being the background noise to your lovely afternoon on the country. The way to swat this nuisance is to simply tell our lovely friend vim to place his goddamn trash someplace else. Anywhere else, but preferably somewhere we would have nothing to do with it. The way to do this is to alter the &lt;b&gt;directory&lt;/b&gt; variable in vim. Initially, that lists &quot;.&quot; as the first acceptable option. Just set it to something  else, or simply erase the &quot;.&quot; folder from the bunch, and you're good to go. Gray hairs no more !
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2008-01-27:35</id>
    <published>2008-01-27T21:35:00Z</published>
    <updated>2008-02-06T21:48:03Z</updated>
    <category term="gems"/>
    <category term="hacks"/>
    <category term="ruby"/>
    <link href="http://spinach.andascarygoat.com/2008/1/27/today-is-not-today" rel="alternate" type="text/html"/>
    <title>Today is not today</title>
<content type="html">
            &lt;p&gt;
Hello there, kind and generous readers. It's been a while since my last post, and i'm quite sure i have been sorely missed. I would really like to say something along the lines of 'the past few months have been really really hectic and i have been immensely busy' but that would be somewhat untrue. The fact of the matter is that &amp;lt;strike&gt;i've been doing lots and lots of javascript&amp;lt;/strike&gt; &amp;lt;strike&gt;nothing really seemed that blogworthy&amp;lt;/strike&gt; i'm a lazy slob.
&lt;/p&gt;
&lt;p&gt;But from today onwards, i have decided to be a lazy slob no more ! Regular, coherent blogging here i come ! Well, mostly regular, can't quite guarantee coherency on my part. But, i digress. Today's topic is the lovely rubygems and the most disturbing fact that in version 1.0.1,
&lt;/p&gt;
&lt;h2&gt;Today is not today&lt;/h2&gt;
&lt;p&gt;
Just so you know what i'm talking about, in case you have rubygems 1.0.1 installed and ruby 1.8, fire up irb and do the following :
&lt;pre class=&quot;ruby&quot;&gt;
require 'rubygems'
Time.today == Time.today
&lt;/pre&gt;
The thing that'll probably show up will most likely be something along the lines of &quot;=&gt; false&quot;. There is a slim chance that it'll return true, but more on that later.
Actually, scratch that; more on that &lt;b&gt;now&lt;/b&gt;. If you turn that lovely today into a float, you'll be greeted by a lovely bunch of numbers. They may be quite similar to the following:
&lt;pre class=&quot;ruby&quot;&gt;
irb(main):003:0&gt; Time.today.to_f         
=&gt; 1201384800.62603
&lt;/pre&gt;
What may have already gotten your senses tingling should be that floating point part. What's that doing in our upstanding, fixed, and morally responsible time for the present day ? Does our day start at a random millisecond ? Nay, i say ! It does not.
&lt;/p&gt;
&lt;p&gt;Ok, so we know what the problem is, namely that somebody forgot to trim the floating point part, and we know roughly where it is, namely somewhere inside rubygems. After some grepping, you should find this little gem ( very subtle pun ! ) inside specification.rb:
&lt;pre class=&quot;ruby&quot;&gt;
# Time::today has been deprecated in 0.9.5 and will be removed.
if RUBY_VERSION &amp;lt; '1.9' then
  def Time.today
    t = Time.now
    t - ((t.to_i + t.gmt_offset) % 86400)
  end unless defined? Time.today
end
&lt;/pre&gt;
This is your typical good news - bad news scenario. The good news is that this thing's getting removed, the bad news is that it's buggy, it's in your code, and it's making the very fabric of time collapse upon itself. The way to fix it is quite complex, and instead of giving a rather lengthy and enlightening explanation of its inner workings, i'll just paste the fixed code. 
&lt;pre class=&quot;ruby&quot;&gt;
# Time::today has been deprecated in 0.9.5 and will be removed.
if RUBY_VERSION &amp;lt; '1.9' then
  def Time.today
    t = Time.now
    t - ((t.to_f + t.gmt_offset) % 86400)
  end unless defined? Time.today
end
&lt;/pre&gt;
Having read all that reworked and finely retuned code, please take a moment to grab a cup of tea, watch a video, or do whatever you find most relaxing. The last thing i would like to do is strain the honorable reader.
&lt;/p&gt;
&lt;p&gt;
So that's basically it. I've submitted the bug &lt;a href=&quot;https://rubyforge.org/tracker/index.php?func=detail&amp;amp;aid=17413&amp;amp;group_id=126&amp;amp;atid=575&quot;&gt;here&lt;/a&gt;, and in case you'd like to fix your version before the new one comes out, look for specification.rb in a folder resembling &quot;/usr/lib/ruby/site_ruby/1.8/rubygems&quot;. It doesn't have to be &lt;i&gt;identical&lt;/i&gt; to that, but that &quot;site_ruby&quot; part is pretty much a given.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-11-07:15</id>
    <published>2007-11-07T18:21:00Z</published>
    <updated>2008-02-06T21:47:40Z</updated>
    <category term="meta"/>
    <category term="ruby"/>
    <category term="testing"/>
    <link href="http://spinach.andascarygoat.com/2007/11/7/a-mighty-factory-worker" rel="alternate" type="text/html"/>
    <title>A mighty factory worker</title>
<content type="html">
            &lt;p&gt;In my last post i ranted slightly about having a factory instead of fixtures and why i think it's worth doing. The problem with &lt;a href=&quot;http://www.dcmanges.com/&quot;&gt;Dan Marges'&lt;/a&gt; Factory is, however that it tends to create a whole lot of junk you don't need.&lt;/p&gt;
&lt;p&gt;Allow me to explain. Let's take this snippet
&lt;pre class=&quot;ruby&quot;&gt;
def self.create_newspaper(attributes = {})
  default_attributes = {
    :customer =&gt; create_customer,
    :headline =&gt; &quot;Read all about it!&quot;
    :paperboy =&gt; create_paperboy
  }
  Newspaper.create! default_attributes.merge(attributes)
end
&lt;/pre&gt;
Let's say we had a paperboy already created in this particular situation and we passed it to the method via the attributes param. After this call, like it or not, we'll be stuck with two paperboys. Add to this validations and the fact that the point of factory is to write less test data than you would with fixtures and you'll most likely see my point.&lt;/p&gt;
&lt;p&gt;So let's recap what we'd like. We'd like something that creates all attached models to the one we call, and we'd like it to do so without screwing up every single thing in the universe. Sounds easy enough. &lt;/p&gt;
&lt;p&gt;Let's say we have &lt;b&gt;pickle&lt;/b&gt; which belongs to &lt;b&gt;jar&lt;/b&gt; which belongs to &lt;b&gt;shelf&lt;/b&gt;. When we call create_shelf we'd like our mighty class to also create pickles and jars to go along with our nice green shelf. &lt;/p&gt;
&lt;p&gt;Now at the time i had realised the simplicity of my needs, i had already gone into a great deal of trouble and writing to order my functions in a 'factory' sort of way. I had &lt;b&gt;create_pickle&lt;/b&gt;, &lt;b&gt;create_jar&lt;/b&gt; and &lt;b&gt;create_shelf&lt;/b&gt; all ready, and waiting for my signal. Not wanting to reformat all my code, i namely my newly-created method 'clever_create'. Its story was as follows
&lt;pre class=&quot;ruby&quot;&gt;
  def self.clever_create(klass, existing = {})
    call_stack = [:pickle, :jar, :shelf]

    create_params = {}

    call_stack.each do |current|
      create_params[current] = existing[current] || eval(&quot;self.create_#{current}(create_params)&quot;)
      break if current == klass
    end

    create_params
  end
&lt;/pre&gt;
That should pretty much take care of creating your objects for you and return your whole bunch of stuff in one neatly packed hash. The only problem is that, since you're doing a merge on the create_params in your create functions, some of those keys might not have methods in your models. As such, you should change your merge to an exclusive merge, which, oh noes, is not present in the manual ! What are we to do ? One option would be to run around screaming in anguish and dismay until we feint, another would be, as we are in ruby, to just create one. 
&lt;pre class=&quot;ruby&quot;&gt;
class Hash
  def exclusive_merge(other)
    self.each_key do |key|
      self[key] = other[key] if other.has_key?(key)
    end
  end
end
&lt;/pre&gt;
So there it is. If there is one already, i couldn't find it because it isn't called 'exclusive_merge'. If there isn't, then it's all good. 
&lt;/p&gt;
&lt;p&gt;There would be more to add, but sadly my alcoholic beverage of choice is getting quite warm by now, and i must continue another time. 
As such, i bid you farewell and good fortune !&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-10-23:14</id>
    <published>2007-10-23T19:37:00Z</published>
    <updated>2008-02-06T21:47:17Z</updated>
    <category term="ruby"/>
    <category term="testing"/>
    <link href="http://spinach.andascarygoat.com/2007/10/23/on-testing-part-one-of-many" rel="alternate" type="text/html"/>
    <title>On testing - part one of many</title>
<content type="html">
            &lt;p&gt;
Hey there, people. As you may or may not have noticed, i haven't really been writing all that much for the past few weeks, but now i have returned and am fully prepared to deliver upon the afore-promised bacon !
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
So i've been reading and writing a lot of tests for an existing application, and the grand conclusion i have come to is that fixtures are rubbish. There are a number of tests one can not carry out without using fixtures, but for the greater part using a &lt;a href=&quot;http://www.dcmanges.com/blog/38&quot;&gt;Factory&lt;/a&gt;-based approach is more fun to both read and write. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
The reason i like creating objects in my test rather than having fixtures is that it's easier to keep track of the things i have in my database and it makes the models easier to understand for people who are new to the codebase. For you it may be quite obvious that you need to create a &lt;b&gt;Widget&lt;/b&gt; before you create a &lt;b&gt;Kludgel&lt;/b&gt; and a &lt;b&gt;Porkchop&lt;/b&gt; that need to be linked to a &lt;b&gt;Fricasee&lt;/b&gt; and a &lt;b&gt;Frisbee&lt;/b&gt; with a diameter greater than 15, but having to swim around the codebase to gather that whole structure would take a lot more time and be considerably more boring than just having it laid out in front of you in a test and being able to play around with. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
One thing that doesn't really work that well when you're writing tests for an existing codebase is mocking. You generally want to write code with mocking and ease of testing in mind. What that usually leaves you with is a &lt;a href=&quot;http://www.therailsway.com/2007/10/4/many-skinny-methods&quot;&gt;lot of skinny methods&lt;/a&gt; just ripe for mocking, stubbing, and isolating the liver out of your unit tests. 
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;
Also, another thing to look out for is that posts containing no code at all look surprisingly smaller than posts containing code. As such, I shall return soon bearing gifts of both code and posts !
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-09-27:12</id>
    <published>2007-09-27T19:35:00Z</published>
    <updated>2008-02-06T21:46:43Z</updated>
    <category term="hacks"/>
    <category term="meta"/>
    <category term="ruby"/>
    <link href="http://spinach.andascarygoat.com/2007/9/27/even-more-metaprogramming" rel="alternate" type="text/html"/>
    <title>Even more metaprogramming</title>
<content type="html">
            &lt;p&gt;
Well, it's been a couple of weeks since i've posted anything and i do feel quite guilty about it. Therefore, i shall post more metaprogramming !

In the project i'm currently working on, it has been my great displeasure to encounter blocks similar to the following
&lt;/p&gt;

&lt;pre class=&quot;ruby&quot;&gt;
def xml_goats
  configuration_node.root.elements[&quot;goats&quot;].text.strip
end
  
def xml_apples
  configuration_node.root.elements[&quot;apples&quot;].text.strip
end
  
def xml_cherries
  configuration_node.root.elements[&quot;cherries&quot;].text.strip
end
&lt;/pre&gt;

&lt;p&gt;I don't know about you, but to me, that just screams &quot;metametametameta !!!&quot;. And it's not just because i'll use any excuse to stick some metaprogramming in my classes, but it genuinely looks like a load of nasty copy-paste malarkey. As such, i proceeded with my evil deeds&lt;/p&gt;

&lt;pre class=&quot;ruby&quot;&gt;
class Margerine
  %w[goats apples cherries].each{|x| 
    class_eval(%Q{
      def xml_#{x}
        configuration_node.root.elements[&quot;#{x}&quot;].text.strip
      end
    })
  }
end
&lt;/pre&gt;

&lt;p&gt;This by all means pretty much works as expected, and defines all those lovely functions for me. However, it still leaves me feeling a bit empty and unsatisfied. What if someday, somehow, we have more of these functions and they require a different set of method calls on the given node ? What will happen to our beautiful code then ? Will it be thrown to the gutter, like an old mistress with a dirty stocking ? Will it be fed to the wolves, like a lovingly furry squirrel who has eaten one too many hazelnuts ? That would most certainly not do. As such, we must make our code better, stronger, and even more delicious. &lt;/p&gt;
&lt;pre class=&quot;ruby&quot;&gt;
class Margerine
  def self.attr_xml_reader(items,submethod = &quot;text.strip&quot;)
    items.each{|item|
      class_eval( %Q{
        def xml_#{item}
          configuration_node.root.elements[&quot;#{item}&quot;].#{submethod}
        end
      }	)
    }
  end

  attr_xml_reader %w[goats apples cherries], &quot;text.strip.downcase&quot;

end
&lt;/pre&gt;
&lt;p&gt;Now we are indeed satisfied with our work, and knowing that all damsels and squirrels the world over are safe and sound, we rest to code another day&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-09-06:9</id>
    <published>2007-09-06T11:54:00Z</published>
    <updated>2008-02-06T21:45:50Z</updated>
    <category term="hacks"/>
    <category term="meta"/>
    <category term="ruby"/>
    <link href="http://spinach.andascarygoat.com/2007/9/6/tasting-the-sweet-nectar-of-metaprogramming" rel="alternate" type="text/html"/>
    <title>Tasting the sweet nectar of metaprogramming</title>
<content type="html">
            Metaprogramming is something you hear a lot about when you're around ruby, and with good reason. It's insanely powerful and hands down the most fun you can have with a programming language. Given that it's quite a complex topic, i'll start off slow - custom getters and setters. If you've used ruby for more than 20 minutes, you've probably seen attr_reader / attr_writer / attr_accessor. They're snippets of metaprogramming that just generate methods. Take attr_accessor, for instance. It gets you something to the tune of
&lt;pre class=&quot;ruby&quot;&gt;
def #{name}
  @#{name}
end

def #{name}=(value)
  @#{name} = value
end
&lt;/pre&gt;

But let's say you need something slightly more complex than that. Let's say you're writing an application which features sock possession reporting for animals with silly names. At least in my line of work, that's quite a common requirement. Being the magnificent human being you are, you'd like to write as little as possible. Therefore, you define a module
&lt;pre class=&quot;ruby&quot;&gt;
module Sockless
  def no_socks_for( *names )
    names.each { |name|
      class_eval(&quot;
        def #{name}_has_no_socks
          @#{name} + ' is a ghastly beast with no socks'
        end

        def #{name}=(value)
          @#{name} = value*2
        end&quot;)
    }
  end
end
&lt;/pre&gt;
Now you just have to extend your desired class with the Sockless module and you're home free
&lt;pre class=&quot;ruby&quot;&gt;
class TheSockZoo
  extend Sockless
  no_socks_for :pig, :sheep
end
&lt;/pre&gt;
Subsequently, you can amaze all sentient beings within a 10 mile radius by just adding these three lines of code and viewing the wonders of modern technology in action
&lt;pre class=&quot;ruby&quot;&gt;
r = TheSockZoo.new
r.pig,r.sheep = &quot;gi&quot;,&quot;dee&quot;
p r.pig_has_no_socks, r.sheep_has_no_socks
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-08-26:8</id>
    <published>2007-08-26T20:31:00Z</published>
    <updated>2008-02-06T21:45:26Z</updated>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="views"/>
    <link href="http://spinach.andascarygoat.com/2007/8/26/separating-view-sections" rel="alternate" type="text/html"/>
    <title>Using block helpers to make your views pretty</title>
<content type="html">
            &lt;p&gt;I was watching the code review that &lt;a href=&quot;http://weblog.jamisbuck.org/&quot;&gt;Jamis Buck&lt;/a&gt; and &lt;a href=&quot;http://www.vernix.org/marcel/&quot;&gt;Marcel Molina&lt;/a&gt; did for the &lt;a href=&quot;http://mtnwestrubyconf2007.confreaks.com/&quot;&gt;Mountain West Ruby Conference&lt;/a&gt; and one really nice idea that grabbed my attention was using block helpers to separate sections in views.&lt;/p&gt;
&lt;p&gt;Let's say you have a view and you need to render a partial with some content which only people who love delicious pickles should see. 
&lt;pre class=&quot;ruby&quot;&gt;
&amp;lt;% if @user.loves_delicious_pickles? %&gt;
  &amp;lt;%= render :partial =&gt; &quot;pickles&quot; %&gt;
&amp;lt;% end %&gt;
&lt;/pre&gt;
That's perfectly fine, but should your pickle logic get more complicated, you'll be stuck with an ugly looking conditional statement in your view. 
&lt;/p&gt;
&lt;p&gt;The alternative would be to add a helper to your controller and move all  your logic in there 
&lt;pre class=&quot;ruby&quot;&gt;
def lover_of_delicious_pickles
  yield if @user.loves_delicious_pickles?
end
&lt;/pre&gt;
Which would turn your view into something to the tune of
&lt;pre class=&quot;ruby&quot;&gt;
&amp;lt;% lover_of_delicious_pickles do %&gt;
  &amp;lt;%= render :partial =&gt; &quot;pickles&quot; %&gt;
&amp;lt;% end %&gt;
&lt;/pre&gt;
Granted, this isn't the best example but the idea itself is really good, and should at least make your code easier to understand. 
&lt;/p&gt;
More on this &lt;a href=&quot;http://codefluency.com/2006/05/28/rails-views-helpers-that-take-blocks/&quot;&gt;here&lt;/a&gt;.
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-08-23:6</id>
    <published>2007-08-23T21:46:00Z</published>
    <updated>2008-02-06T21:44:41Z</updated>
    <category term="hpricot"/>
    <category term="ruby"/>
    <link href="http://spinach.andascarygoat.com/2007/8/23/syndicating-other-people-s-content-for-your-own-selfish-use" rel="alternate" type="text/html"/>
    <title>Syndicating other people's content for your own selfish use</title>
<content type="html">
            &lt;p&gt;I've grown to love and adore google reader. It's the only tab that stays open for the entire duration of the day in my browser, mainly because if you subscribe to the right feeds, there's always something good to read. The thing is, feeds have made me lazier than i should be, namely, checking sites for stuff i want has suddenly become a chore. It's like calling the post office every day asking Mr. Wabu, the postal server, if any letters have arrived for you, instead of having the kind-hearted Mr. Wabu drop by your house every day and just deliver your loving bills in your lovely mailbox.&lt;/p&gt;
&lt;p&gt;As such, i decided this could not go on any longer. Mr. Wabu had to come by my house. Enter the Ruby !&lt;/p&gt;
&lt;p&gt;In case i've been too abstruse up to now, what i mean to do is syndicate the content of a website which, while relevant to me, has no rss feed of its own. For this particular example i'm using &lt;a href=&quot;http://code.whytheluckystiff.net/hpricot&quot;&gt;Hpricot&lt;/a&gt; for the ingenious act of spidering, and the omnipotent &lt;a href=&quot;http://builder.rubyforge.org/&quot;&gt;builder&lt;/a&gt; to generate the xml. I'm quire sure there are a number of gems/libraries out there that can generate rss much easier than builder, but this was the first one that came to mind and it is quite delightful to work with.&lt;/p&gt;
&lt;h2&gt;Ze Spider&lt;/h2&gt;
&lt;p&gt;I'd used to do spidering using just open-uri and scan, as i found writing 3-row regular expressions for my desired data a delight. This time, however,  i wanted to do something wild, so i went with Hpricot. This involves doing something to the tune of 
&lt;pre class=&quot;ruby&quot;&gt;
open(address) { |file|
		doc = Hpricot(file)
		doc.search('td.content table table table tr') { |match|
&lt;/pre&gt;
As you can probably figure, the parameter for search is a css-style selector for a horribly built table layout. We want this field's prized possession to become our own, so rob it of its data and see if it is of any use to us
&lt;pre class=&quot;ruby&quot;&gt;
if ( match.innerText =~ /pickles/ )
&lt;/pre&gt;
Yes, we are looking for pickles. &lt;br /&gt; Upon having found said pickles, we store their title, address and description somewhere, so that we can get them when we build the feed. I used a hash 
&lt;pre class=&quot;ruby&quot;&gt;
date = match.children[0].innerText.split('/')
				date = Date.new(2000+date[2].to_i,date[1].to_i,date[0].to_i)
				results &amp;lt;&amp;lt; { 	:title =&gt; &quot;#{title} #{match.children[2].innerText}&quot;,
								:link =&gt; match.children[5].search(&quot;a&quot;).attr(&quot;href&quot;),
								:body =&gt; match.children[5].search(&quot;a&quot;).attr(&quot;href&quot;),
								:date =&gt; date
							}
&lt;/pre&gt;
I was looking into a row, and the sixth child contained the link so, not being interested in the link's inner text, i just used Hpricot to extract the link's href. 
&lt;/p&gt;
&lt;h2&gt;Ze Feed&lt;/h2&gt;
&lt;p&gt;Moving on, let's say we have the results we need, so now we have to generate our feed. I used builder to get this done, mainly because it's easy to understand and the syntax is pretty much gorgeous. The feed is rss 0.91 because i was looking for something really simple, which google reader could understand. If you want to generate some other kind of RSS you can find the specs &lt;a href=&quot;http://cyber.law.harvard.edu/rss/rss.html&quot;&gt;here&lt;/a&gt;.
&lt;pre class=&quot;ruby&quot;&gt;
def midgets_to_rss(midgets)
	xml = Builder::XmlMarkup.new
	xml.rss(:version =&gt; &quot;0.91&quot;) {
		xml.channel {
			xml.title(&quot;Picklez&quot;)
			xml.description(&quot;Your picklez, foo !&quot;)
			midgets.each { |midget|
				xml.item {
					xml.title( midget[:title] )
					xml.link( midget[:link] )
					xml.description( midget[:body] )
				}
			}
		}
	}
end
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;You have your RSS 0.91 generated and all pretty, just waiting for to be stored somewhere. A number of options present themselves to you now, the main ones being that you either run your script on request as a CGI, or you stick it into a cron task and have it store its results in an XML for you. You could go either way, i chose to go with a cron task that sticks the feed into a file once an hour, because the data i'm intrested in isn't very urgent. 
&lt;/p&gt;
&lt;p&gt;Should you want the source of my awful thief of a script, and together with it the terrible secret of which cartoons i watch, you can find them &lt;a href=&quot;/assets/2007/8/23/stealerman.rb&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, one thing you should note is that in case you're running your script from a shared host and your ruby gems are stored in the local directory, you should probably set the ruby gem home dir in the script before you add your requires and what not.
&lt;pre class=&quot;ruby&quot;&gt;
ENV['GEM_HOME']='/home/#{whatever}/ruby/gems/'
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-08-08:4</id>
    <published>2007-08-08T00:27:00Z</published>
    <updated>2008-02-06T21:44:13Z</updated>
    <category term="hacks"/>
    <category term="liquid"/>
    <category term="mephisto"/>
    <link href="http://spinach.andascarygoat.com/2007/8/8/article-tags-in-my-layout" rel="alternate" type="text/html"/>
    <title>Article tags ? In my layout ?</title>
<content type="html">
            While carefully constructing the friendly about section earlier today, I noticed that, should an article fail to receive any tags, it would be left with an annoying &quot;Tags:&quot; text and, misleadingly enough, no tags. This makes various baby animals the world over quite sad indeed, so it must be fixed.
&lt;br /&gt;
My first idea was to dive into the layout and try something to the tune of :
&lt;pre class=&quot;ruby&quot;&gt;
{% unless article.tags.empty? %} Tags: {{ article | linked_tag_list }}{% endunless %}
&lt;/pre&gt;

While this did not actually do anything useful, it did bring to light the fact that my understanding of liquid is laughable, at best. Grep safely in hand, i went deeper and came across this lovely piece of code in 'app\drops\article_drop.rb':
&lt;pre class=&quot;ruby&quot;&gt;
def initialize(source, options = {})
    super source
    @options  = options
    @liquid.update \
      'body'            =&gt; @source.body_html,
      'excerpt'         =&gt; (@source.excerpt_html.blank? ? nil : @source.excerpt_html),
      'accept_comments' =&gt; @source.accept_comments?,
      'is_page_home'    =&gt; (options[:page] == true)
  end
&lt;/pre&gt;

Being the horrible person that I am, I added 
&lt;pre class=&quot;ruby&quot;&gt;
'tagged'          =&gt; !@source.tags.empty?,
&lt;/pre&gt;

Luckily enough, the universe didn't collapse and i could now use
&lt;pre class=&quot;ruby&quot;&gt;
{% if article.tagged %} Tags: {{ article | linked_tag_list }}{% endif %}
&lt;/pre&gt;
&lt;br /&gt;
Please note that if anybody tries making sense and pointing out that there is no sane reason why an article wouldn't be tagged, i will make up at least 20 reasons, one of which will involve string theories and pandas. You have been warned.
&lt;br /&gt;&lt;br /&gt;
&lt;i&gt;Shameful later edit&lt;/i&gt;&lt;br /&gt;
Thanks to &lt;a href=&quot;http://evil.che.lu/&quot;&gt;Cristi&lt;/a&gt; i now know what the right way to go about the above problem would have been, namely
&lt;pre class=&quot;ruby&quot;&gt;
{% unless article.tags == empty %} Tags: {{ article | linked_tag_list }}{% endunless %}
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://spinach.andascarygoat.com/">
    <author>
      <name>zmack</name>
    </author>
    <id>tag:spinach.andascarygoat.com,2007-08-06:2</id>
    <published>2007-08-06T20:10:00Z</published>
    <updated>2008-02-06T21:43:46Z</updated>
    <category term="hacks"/>
    <category term="mephisto"/>
    <link href="http://spinach.andascarygoat.com/2007/8/6/mephisto-edge-rails-edge-no-love" rel="alternate" type="text/html"/>
    <title>Mephisto edge + Rails edge = no love</title>
<content type="html">
            After postponing putting up a blog about my many and diverse ruby adventures, i finally sat down for a couple of minutes and put this up. 

Going through the regular motions of installing mephisto, it all seemed ok until i tried to log into the admin account. Then - disaster !
Mephisto died mercilessly stating that 

&lt;pre class=&quot;ruby&quot;&gt;
NoMethodError (undefined method `extract_options_from_args!' for #&amp;lt;class:0x2aaaf9b8a668&gt;)
&lt;/pre&gt;

After some grepping i found the function in activerecord base, in an earlier version of rails :

&lt;pre class=&quot;ruby&quot;&gt;
def extract_options_from_args!(args) #:nodoc:
  args.last.is_a?(Hash) ? args.pop : {}
end
&lt;/pre&gt;

The whole thing originates in the acts_as_paranoid plugin, so basically you can either patch that with the function definition, replace the call to the function, or just be a horrible human being and patch your edge rails with the function. Whichever way you choose to take, it should fix the issue. 
&lt;br /&gt;&lt;br /&gt;
&lt;i&gt;Later edit&lt;/i&gt;&lt;br /&gt;
As BradC points out, the intended replacement for extract_options_from_args! is args.extract_options!. As such, replacing line 75 of paranoid.rb to
&lt;pre class=&quot;ruby&quot;&gt;
options = args.extract_options!
&lt;/pre&gt;
would not make you a horrible person, quite on the contrary, it would make you a lovely one !
          </content>  </entry>
</feed>
