[Nitro] [PATCH] ATOM serializer

George Moschovitis george.moschovitis at gmail.com
Sun Oct 21 16:24:01 EDT 2007


Thanks for the patch. I will work on this further.

-g.

On 10/21/07, Arne Brasseur <arne at arnebrasseur.net> wrote:
>
>  Hi,
>
> This patch doesn't fix much but does two useful things:
> - issue a warning if there is no model annotation on the controller
> - check if the serialized object respond_to?(:author) before calling
> #author
>
> >From looking at http://www.atomenabled.org/developers/syndication/ and at
> the W3C validator it seems the biggest issues are:
> - id's should be complete IRI's (a superset of URI's). Relative URL's are
> not valid.
> - the updated (timestamp) element is mandatory, both on the feed as on the
> entries
>
> For the second thing I would assume this could be done to play nicely with
> 'is Timestamped' ?
>
> As it stands this nice functionality is still undocumented, but for the
> adventurous this might help you get started:
>
> class RandomController
>   ann :self, :model => RandomThing
>
>   def index
>     @random_things = RandomThing.all
>   end
> end
>
> class RandomThing
>   attr :title, String
>   attr :author, String
>
>   def body
>     "you need this method"
>   end
> end
>
> app.dispatcher.root.random = RandomController
>
> go to http://localhost:9000/random.atom
>
> Have fun!
>
> (ab)
>
> Arne Brasseur schreef:
>
> Try the W3C validator:
> http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.me.gr%2Fblog%2Findex.atom
>
> It reports a few issues that you might want to solve before doing more
> testing.
>
> (ab)
>
> George Moschovitis schreef:
>
> Dear devs,
>
> I am trying to make the atom serializer in raw/util/atom.rb work.
> I create a new simpler (and faster) version. This seems to work with
> Google reader but It does not show any kind of summary
> in Firefox (when viewing the feed).
>
> Here is an example:
>
> http://me.gr/blog/index.atom
>
> Can anyone on this list spot the problem(s) with this feed?
>
> Please help me debug this once and for all.
>
> thanks,
> George.
>
>
>
> --
> http://gmosx.me.gr
> http://phidz.com
> http://blog.gmosx.com
> http://cull.gr
> http://www.joy.gr
> http://nitroproject.org
>
> ------------------------------
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.orghttp://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
> --
> Arne Brasseur
> http://www.arnebrasseur.nethttp://www.zhongwiki.comhttp://www.bankske.orgarne@arnebrasseur.net
>
> ------------------------------
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.orghttp://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
> --
> Arne Brasseur
> http://www.arnebrasseur.nethttp://www.zhongwiki.comhttp://www.bankske.orgarne@arnebrasseur.net
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>


-- 
http://gmosx.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071021/dd8cbdaf/attachment.html 


More information about the Nitro-general mailing list