[TxMt] Re: Re: Blogging bundle and proxy servers (Allan Odgaard)

Marc Brogle brogle at iam.unibe.ch
Mon Jul 24 10:42:30 UTC 2006


>> Does the blogging bundle work with proxy servers, and if so, what
>> do I have to configure/change (shell variables in TM?) to make it
>> work correctly?
>>
>
> Support would need to be added for this. There is a Ruby Proxy class,
> so it might not be that difficult -- if you are familiar with Ruby,
> you may want to give this a shot yourself :)

I only had to do a small change in order to make the blogging bundle  
work with proxy servers. Attached you find the patch for the file  
blogging.rb, which is located in the Support/lib folder of the  
Blogging.bundle. The patch is for the Blogging.bundle included in  
revision 1183 of Textmate.

I changed the new2(...) method to set the proxy and added a text  
about "how to configure proxy settings" to the template text for the  
Blogging.bundle config file (com.macromates.textmate.blogging.txt).

To enable proxy support, you have to set and enable the TM_HTTP_PROXY  
environment variable (host:port of proxy server) in the Textmate  
preferences (Advanced->Shell Variables). If the variable is not set  
or disabled, the Blogging.bundle still works fine. So the patch  
should not break anything for non-proxy users.

A more elegant solution could read the proxy from the network  
settings for the current "Location" (configured in "System  
Preferences->Network"), but I haven't found out yet how to read these  
settings from ruby.

Please review /  change / improve these modifications, so the  
Blogging.bundle with proxy support could soon be available in future  
Textmate updates. :-)

Marc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: blogging.rb.patch
Type: application/octet-stream
Size: 711 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060724/c8b0a096/attachment.patch>
-------------- next part --------------

--
Marc Brogle - M.Sc. in Computer Science - Research Assistant
Institute of Computer Science and Applied Mathematics
University of Bern, Neubrueckstr. 10, CH-3012 Bern, Switzerland
http://www.iam.unibe.ch/~brogle  Phone/Fax: +41 31 631 8668/3261


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2388 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060724/c8b0a096/attachment.p7s>


More information about the textmate mailing list