Skip to content

Commit

Permalink
all modules: ensure all User-Agents are set (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored and callmehiphop committed Sep 9, 2016
1 parent ca76a24 commit aa5c254
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-resourcemanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"resource"
],
"dependencies": {
"@google-cloud/common": "^0.1.0",
"@google-cloud/common": "^0.5.0",
"extend": "^3.0.0",
"is": "^3.0.1"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-resourcemanager/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ var util = require('util');
*/
var Project = require('./project.js');

var PKG = require('../package.json');

/**
* <p class="notice">
* **This is a Beta release of Cloud Resource Manager.** This feature is not
Expand Down Expand Up @@ -69,7 +67,7 @@ function Resource(options) {
baseUrl: 'https://cloudresourcemanager.googleapis.com/v1beta1',
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
projectIdRequired: false,
userAgent: PKG.name + '/' + PKG.version
packageJson: require('../package.json')
};

common.Service.call(this, config, options);
Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-resourcemanager/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ var proxyquire = require('proxyquire');
var Service = require('@google-cloud/common').Service;
var util = require('@google-cloud/common').util;

var PKG = require('../package.json');

function FakeProject() {
this.calledWith_ = [].slice.call(arguments);
}
Expand Down Expand Up @@ -126,7 +124,7 @@ describe('Resource', function() {
'https://www.googleapis.com/auth/cloud-platform'
]);
assert.strictEqual(resource.projectIdRequired, false);
assert.strictEqual(calledWith.userAgent, PKG.name + '/' + PKG.version);
assert.deepEqual(calledWith.packageJson, require('../package.json'));
});
});

Expand Down

0 comments on commit aa5c254

Please sign in to comment.