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 351e524 commit 7e420ea
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-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dns"
],
"dependencies": {
"@google-cloud/common": "^0.1.0",
"@google-cloud/common": "^0.5.0",
"arrify": "^1.0.0",
"dns-zonefile": "0.1.18",
"extend": "^3.0.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-dns/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ var util = require('util');
*/
var Zone = require('./zone.js');

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

/**
* [Google Cloud DNS](https://cloud.google.com/dns/what-is-cloud-dns) is a high-
* performance, resilient, global DNS service that provides a cost-effective way
Expand All @@ -60,7 +58,7 @@ function DNS(options) {
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
'https://www.googleapis.com/auth/cloud-platform'
],
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-dns/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');

var extended = false;
var fakeStreamRouter = {
extend: function(Class, methods) {
Expand Down Expand Up @@ -113,7 +111,7 @@ describe('DNS', function() {
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
'https://www.googleapis.com/auth/cloud-platform'
]);
assert.strictEqual(calledWith.userAgent, PKG.name + '/' + PKG.version);
assert.deepEqual(calledWith.packageJson, require('../package.json'));
});
});

Expand Down

0 comments on commit 7e420ea

Please sign in to comment.