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
-- 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
On 24/7/2006, at 12:42, Marc Brogle wrote:
[...] 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 [...]
Thanks for the contribution! I have now added it to the default bundle.
I placed the TM_HTTP_PROXY info in the Help file (but mentioned it in the template.)
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.
I fear this is only obtainable through the Carbon internet (something) API.