Comparing version 0.0.1 to 0.0.2
43
index.js
@@ -18,3 +18,3 @@ var Dogstatsy = require('dogstatsy'); | ||
reportTiming({ | ||
path: options.path, | ||
path: filterPath(options.path), | ||
method: options.method, | ||
@@ -31,2 +31,41 @@ socketPath: modem.socketPath, | ||
} | ||
} | ||
} | ||
var dockerNouns = [ | ||
'images', | ||
'insert', | ||
'json', | ||
'history', | ||
'push', | ||
'tag', | ||
'containers', | ||
'top', | ||
'changes', | ||
'export', | ||
'start', | ||
'commit', | ||
'stop', | ||
'restart', | ||
'kill', | ||
'resize', | ||
'attach', | ||
'copy', | ||
'create', | ||
'auth', | ||
'build', | ||
'search', | ||
'info', | ||
'events', | ||
]; | ||
var isDockerNoun = new RegExp(dockerNouns.join('|')); | ||
function filterPath (path) { | ||
return '/' + path | ||
.split('?')[0] //ignore query string | ||
.split('/') | ||
.filter(function (fragment) { | ||
return isDockerNoun.test(fragment); | ||
}) | ||
.join('/'); | ||
} |
{ | ||
"name": "dogerode", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "DogStatsD shim for dockerode", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3194
87