From: Jacob Burkhart Date: 2007-05-05T00:35:09+09:00 Subject: Subversion Ruby Bindings access to URL So I struggled through the installation of swig, subversion and the ruby bindings, and now I want to connect to subversion from ruby. It turns out this is usually done through the filesystem with: Svn::Repos.open But, I don't have filesystem access to my repository, I only have web access So I need to do something like this: url = 'http://trac-hacks.swapoff.org/svn' ctx = Svn::Client::Context.new cb = Svn::Ra::Callbacks.new(ctx.auth_baton) cb.auth_baton = Svn::Core.auth_open([]) cfg = Svn::Core::config_get_config(nil) s = Svn::Ra::Session.open(url, cfg, cb) st = s.stat(", 1) (from: http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/#comment-137) The problem with that one, is that there's no way to pass in my username and password for htaccess Looking at the swig and other documentation It seems I need to pass a C struct struct svn_auth_provider_object_t To Svn::Core.auth_open([]) And that C struct needs to also contain a function pointer to a function that then returns username and password somehow? 00149 typedef struct svn_auth_provider_object_t 00150 { 00151 const svn_auth_provider_t *vtable; 00152 void *provider_baton; 00153 00154 } svn_auth_provider_object_t; http://svn.collab.net/svn-doxygen/group__auth__fns.html So it seems I need to figure out how to implement a C function pointer from ruby over swig, I'm guessing this isn't possible.... So, if that's the case I was thinking maybe I could use a Proxy server to proxy localhost:2901 or some other random port over to my real repository URL and pass the authentication username and password through the proxy Does anybody have any suggestions for such a proxy? perhaps on implemented in ruby. And, does anybody have any other suggestions for what I could try to in order to connect to my remote (And authenticated) repository via ruby subversion bindings? thanks, Jacob