Merge pull request #4625 from murgatroid99/ruby_client_stub_fix_typo

Fix a bug recently reported in the mailing list
pull/4648/head
Craig Tiller 9 years ago
commit c357749b48
  1. 4
      src/ruby/lib/grpc.rb
  2. 4
      src/ruby/lib/grpc/generic/client_stub.rb
  3. 8
      src/ruby/pb/test/client.rb

@ -1,4 +1,4 @@
# Copyright 2015, Google Inc.
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ssl_roots_path = File.expand_path('../../../etc/roots.pem', __FILE__)
ssl_roots_path = File.expand_path('../../../../etc/roots.pem', __FILE__)
unless ENV['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH']
ENV['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'] = ssl_roots_path
end

@ -1,4 +1,4 @@
# Copyright 2015, Google Inc.
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -464,7 +464,7 @@ module GRPC
method,
nil, # host use nil,
deadline)
call.set_credentials credentials unless credentials.nil?
call.set_credentials! credentials unless credentials.nil?
ActiveCall.new(call, @queue, marshal, unmarshal, deadline, started: false)
end
end

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# Copyright 2015, Google Inc.
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -264,11 +264,15 @@ class NamedTests
def per_rpc_creds
auth_creds = Google::Auth.get_application_default(@args.oauth_scope)
update_metadata = proc do |md|
kw = auth_creds.updater_proc.call({})
end
call_creds = GRPC::Core::CallCredentials.new(update_metadata)
resp = perform_large_unary(fill_username: true,
fill_oauth_scope: true,
**kw)
credentials: call_creds)
json_key = File.read(ENV[AUTH_ENV])
wanted_email = MultiJson.load(json_key)['client_email']
assert("#{__callee__}: bad username") { wanted_email == resp.username }

Loading…
Cancel
Save