From ef14c5c4da73ce5b905134c8b8abeb97a3b9755c Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 17 Mar 2017 16:14:27 +0100 Subject: Get ruby client working --- try-ruby-client | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/try-ruby-client b/try-ruby-client index ff9c748d4..369e15d72 100644 --- a/try-ruby-client +++ b/try-ruby-client @@ -1,7 +1,8 @@ -# this was not working for me; it seems the ruby client tries to make an sslv3 connection require 'grpc' require 'gitaly' -chan = GRPC::Core::Channel.new('localhost:8877',{}, GRPC::Core::ChannelCredentials.new) +creds = GRPC::Core::ChannelCredentials.new(File.read('gitaly.crt')) +addr = 'localhost:8877' +chan = GRPC::Core::Channel.new(addr, { GRPC::Core::Channel::SSL_TARGET => 'gitaly' }, creds) stub = Gitaly::Notifications::Stub.new(nil, nil, channel_override: chan) -stub.post_receive(Gitaly::PostReceiveRequest.new) +puts stub.post_receive(Gitaly::PostReceiveRequest.new(repository: Gitaly::Repository.new)) -- cgit v1.2.3