[TxMt] post_id should not be casted to an int in the blogging module

Nicholas Piël nicholas at nichol.as
Tue Sep 18 21:20:22 UTC 2007


First of all thanks for the great product, i love TextMate and the  
blogging bundle is really awesome.

I have been playing a bit with the blogging bundle in combination  
with my blog and the strictness of the Ruby library forced me to  
follow the specs as strict as well. So in some sense that is a good  

However, the XML-RPC API itself kinda sucks and i really have to do  
some magic with post id's in order for them both to understand each  
other. Luckily the MetaWeblog (and blogger) API allow the post-id's  
to be a string.

But, since the blogging bundle is casting the post-id to an INT it is  
causing problems when i try to edit a post with a post id that  
contains anything besides digits.

I glanced over the code and i do not see any reason for the post_id  
to be an INT, i modified line 238 in blogging.rb (self.post_id =  
@headers['post'].to_i if @headers['post']) by removing '.to_i' and  
now everything is working as expected.

I hope this adjustment will find its way to all happy cutting-edge  
TextMate users worldwide ;)

Nicholas Piël

More information about the textmate mailing list