It looks like the hard coded query parameter issue is a Ruby 1.8 problem. The post_form code doesn't take hard coded query parameters into account.
# File net/http.rb, line 400
def HTTP.post_form(url, params)
req = Post.new(url.path)
req.form_data = params
req.basic_auth url.user, url.password if url.user
new(url.host, url.port).start {|http|
http.request(req)
}
end
It looks like Ruby 1.9 passes along the query parameters in a post, but I haven't tested it.
# File net/http.rb, line 478
def HTTP.post_form(url, params)
req = Post.new(url.request_uri)
req.form_data = params
req.basic_auth url.user, url.password if url.user
new(url.hostname, url.port).start {|http|
http.request(req)
}
end
#
# == Description
#
# Returns the full path for an HTTP request, as required by Net::HTTP::Get.
#
# If the URI contains a query, the full path is URI#path + '?' + URI#query.
# Otherwise, the path is simply URI#path.
#
def request_uri
r = path_query
if r[0] != ?/
r = '/' + r
end
r
end
I don't have control over the server environment that we use to run Gitorious. The gitorious-plugin for Jenkins was the easiest way for me to get this working, and it was fun to dig around in some open source projects ;)
Thanks for a great product,
Scott