Merge branch 'master' of github.com:grpc/grpc into the-ultimate-showdown

Conflicts:
	src/ruby/ext/grpc/rb_channel.c
This commit is contained in:
Nicolas "Pixel" Noble 2015-08-13 02:07:12 +02:00
commit 68dce04303
3 changed files with 13 additions and 7 deletions

View File

@ -11,7 +11,8 @@
'-pedantic',
'-g',
'-zdefs',
'-Werror'
'-Werror',
'-Wno-error=deprecated-declarations'
],
'ldflags': [
'-g'

View File

@ -298,7 +298,9 @@ function authTest(expected_user, scope, client, done) {
assert.strictEqual(resp.payload.type, 'COMPRESSABLE');
assert.strictEqual(resp.payload.body.length, 314159);
assert.strictEqual(resp.username, expected_user);
assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE);
if (scope) {
assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE);
}
if (done) {
done();
}
@ -335,7 +337,7 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
if (done) {
done();
}
});
}, client_metadata);
};
if (per_rpc) {
updateMetadata('', {}, makeTestCall);

View File

@ -526,7 +526,7 @@ var requester_makers = {
* requestSerialize: function to serialize request objects
* responseDeserialize: function to deserialize response objects
* @param {Object} methods An object mapping method names to method attributes
* @param {string} serviceName The name of the service
* @param {string} serviceName The fully qualified name of the service
* @return {function(string, Object)} New client constructor
*/
exports.makeClientConstructor = function(methods, serviceName) {
@ -551,8 +551,10 @@ exports.makeClientConstructor = function(methods, serviceName) {
}
options['grpc.primary_user_agent'] = 'grpc-node/' + version;
this.channel = new grpc.Channel(address, credentials, options);
this.server_address = address.replace(/\/$/, '');
this.auth_uri = this.server_address + '/' + serviceName;
// Remove the optional DNS scheme, trailing port, and trailing backslash
address = address.replace(/^(dns:\/{3})?([^:\/]+)(:\d+)?\/?$/, '$2');
this.server_address = address;
this.auth_uri = 'https://' + this.server_address + '/' + serviceName;
this.updateMetadata = updateMetadata;
}
@ -590,7 +592,8 @@ exports.makeClientConstructor = function(methods, serviceName) {
*/
exports.makeProtobufClientConstructor = function(service) {
var method_attrs = common.getProtobufServiceAttrs(service, service.name);
var Client = exports.makeClientConstructor(method_attrs);
var Client = exports.makeClientConstructor(
method_attrs, common.fullyQualifiedName(service));
Client.service = service;
return Client;
};