File tree 3 files changed +3
-7
lines changed
packages/google-cloud-resourcemanager
3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 50
50
" resource"
51
51
],
52
52
"dependencies" : {
53
- "@google-cloud/common" : " ^0.1 .0" ,
53
+ "@google-cloud/common" : " ^0.5 .0" ,
54
54
"extend" : " ^3.0.0" ,
55
55
"is" : " ^3.0.1"
56
56
},
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ var util = require('util');
31
31
*/
32
32
var Project = require ( './project.js' ) ;
33
33
34
- var PKG = require ( '../package.json' ) ;
35
-
36
34
/**
37
35
* <p class="notice">
38
36
* **This is a Beta release of Cloud Resource Manager.** This feature is not
@@ -69,7 +67,7 @@ function Resource(options) {
69
67
baseUrl : 'https://cloudresourcemanager.googleapis.com/v1beta1' ,
70
68
scopes : [ 'https://www.googleapis.com/auth/cloud-platform' ] ,
71
69
projectIdRequired : false ,
72
- userAgent : PKG . name + '/' + PKG . version
70
+ packageJson : require ( '../package.json' )
73
71
} ;
74
72
75
73
common . Service . call ( this , config , options ) ;
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ var proxyquire = require('proxyquire');
24
24
var Service = require ( '@google-cloud/common' ) . Service ;
25
25
var util = require ( '@google-cloud/common' ) . util ;
26
26
27
- var PKG = require ( '../package.json' ) ;
28
-
29
27
function FakeProject ( ) {
30
28
this . calledWith_ = [ ] . slice . call ( arguments ) ;
31
29
}
@@ -126,7 +124,7 @@ describe('Resource', function() {
126
124
'https://www.googleapis.com/auth/cloud-platform'
127
125
] ) ;
128
126
assert . strictEqual ( resource . projectIdRequired , false ) ;
129
- assert . strictEqual ( calledWith . userAgent , PKG . name + '/' + PKG . version ) ;
127
+ assert . deepEqual ( calledWith . packageJson , require ( '../package.json' ) ) ;
130
128
} ) ;
131
129
} ) ;
132
130
You can’t perform that action at this time.
0 commit comments