Skip to content

Commit

Permalink
remove dependency on common-grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop committed Nov 14, 2017
1 parent a08e5c7 commit 876d5b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
1 change: 0 additions & 1 deletion packages/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
],
"dependencies": {
"@google-cloud/common": "^0.13.0",
"@google-cloud/common-grpc": "^0.4.2",
"arrify": "^1.0.0",
"async-each": "^1.0.1",
"extend": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/pubsub/src/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var arrify = require('arrify');
var common = require('@google-cloud/common');
var each = require('async-each');
var events = require('events');
var grpc = require('@google-cloud/common-grpc').grpc;
var grpc = require('google-gax').grpc().grpc;
var is = require('is');
var util = require('util');
var uuid = require('uuid');
Expand Down
10 changes: 8 additions & 2 deletions packages/pubsub/test/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ var fakeUtil = extend({}, common.util);
var fakeUuid = extend({}, uuid);
var fakeGrpc = extend({}, grpc);

function fakeGaxGrpc() {
return {
grpc: fakeGrpc
};
}

var v1Override;
function fakeV1(options) {
return (v1Override || v1)(options);
Expand Down Expand Up @@ -95,8 +101,8 @@ describe('ConnectionPool', function() {
'@google-cloud/common': {
util: fakeUtil
},
'@google-cloud/common-grpc': {
grpc: fakeGrpc
'google-gax': {
grpc: fakeGaxGrpc
},
uuid: fakeUuid,
'./v1': fakeV1
Expand Down
13 changes: 0 additions & 13 deletions packages/pubsub/test/iam.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

var assert = require('assert');
var extend = require('extend');
var GrpcService = require('@google-cloud/common-grpc').Service;
var nodeutil = require('util');
var path = require('path');
var proxyquire = require('proxyquire');
var util = require('@google-cloud/common').util;

Expand All @@ -33,13 +30,6 @@ var fakeUtil = extend({}, util, {
}
});

function FakeGrpcService() {
this.calledWith_ = arguments;
GrpcService.apply(this, arguments);
}

nodeutil.inherits(FakeGrpcService, GrpcService);

describe('IAM', function() {
var IAM;
var iam;
Expand All @@ -54,9 +44,6 @@ describe('IAM', function() {
IAM = proxyquire('../src/iam.js', {
'@google-cloud/common': {
util: fakeUtil
},
'@google-cloud/common-grpc': {
Service: FakeGrpcService
}
});
});
Expand Down

0 comments on commit 876d5b6

Please sign in to comment.