From d93f3d1b80268d7aa8ae79ab32b011ff6df663a6 Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 10:45:07 +0100 Subject: [PATCH 1/6] remove express-basic-auth --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index f20bc16..794b618 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "dependencies": { "appmetrics": "^3.0.1", "debug": "^2.6.0", - "express": "^4.14.1", - "express-basic-auth": "^1.0.1" + "express": "^4.14.1" }, "devDependencies": { "codecov": "^2.1.0", From a7ca756c0afedb64be3a79b499e53aa3902f1155 Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 10:46:15 +0100 Subject: [PATCH 2/6] remove express-basic-auth --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 794b618..ee65080 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "appmetrics-prometheus", - "version": "1.0.0", + "version": "1.0.1", "description": "Provides a Prometheus (/metrics) endpoint for Application Metrics", "main": "index.js", "dependencies": { From 983dfd063a42213b583a3438398c1df98bacabb7 Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 10:46:58 +0100 Subject: [PATCH 3/6] bump version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d14bfa..a687b8d 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ We gathered this information by monitoring the sample application [Acme Air][3]. We welcome contributions. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details about the contributor licence agreement and other information. If you want to do anything more involved than a bug fix or a minor enhancement then we would recommend discussing it in an issue first before doing the work to make sure that it's likely to be accepted. We're also keen to improve test coverage and may not accept new code unless there are accompanying tests. ## Version -1.0.0 +1.0.1 ### License The Node Application Metrics Prometheus is licensed using an Apache v2.0 License. From 0330dbcd73bb7137a289a1544d80550aea379d5d Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 10:55:40 +0100 Subject: [PATCH 4/6] add licence headers --- test/apps/lb-3/common/models/message.js | 17 ++++++++++++++++- test/apps/lb-3/server/boot/authentication.js | 17 ++++++++++++++++- test/apps/lb-3/server/boot/root.js | 17 ++++++++++++++++- test/apps/lb-3/server/server.js | 17 ++++++++++++++++- test/ex-use-express.js | 17 ++++++++++++++++- test/ex-use-server.js | 17 ++++++++++++++++- test/test-http-inject-recursion.js | 17 ++++++++++++++++- test/test-https-injection.js | 17 ++++++++++++++++- test/test-loopback-injection.js | 17 ++++++++++++++++- 9 files changed, 144 insertions(+), 9 deletions(-) diff --git a/test/apps/lb-3/common/models/message.js b/test/apps/lb-3/common/models/message.js index fc94c5a..d0e7c51 100644 --- a/test/apps/lb-3/common/models/message.js +++ b/test/apps/lb-3/common/models/message.js @@ -1,4 +1,19 @@ -module.exports = function(Message) { +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + module.exports = function(Message) { Message.greet = function(msg, cb) { process.nextTick(function() { msg = msg || 'hello'; diff --git a/test/apps/lb-3/server/boot/authentication.js b/test/apps/lb-3/server/boot/authentication.js index 8e88d4b..42bb4f0 100644 --- a/test/apps/lb-3/server/boot/authentication.js +++ b/test/apps/lb-3/server/boot/authentication.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; module.exports = function enableAuthentication(server) { // enable authentication diff --git a/test/apps/lb-3/server/boot/root.js b/test/apps/lb-3/server/boot/root.js index 6adce90..f0ec9c9 100644 --- a/test/apps/lb-3/server/boot/root.js +++ b/test/apps/lb-3/server/boot/root.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; module.exports = function(server) { // Install a `/` route that returns server status diff --git a/test/apps/lb-3/server/server.js b/test/apps/lb-3/server/server.js index ef738ab..ed53978 100644 --- a/test/apps/lb-3/server/server.js +++ b/test/apps/lb-3/server/server.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; var loopback = require('loopback'); var boot = require('loopback-boot'); diff --git a/test/ex-use-express.js b/test/ex-use-express.js index 16420e4..a463b50 100644 --- a/test/ex-use-express.js +++ b/test/ex-use-express.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; require('../').monitor({ port: 'PORT' in process.env ? process.env.PORT : 3000, diff --git a/test/ex-use-server.js b/test/ex-use-server.js index 033e03f..2734b29 100644 --- a/test/ex-use-server.js +++ b/test/ex-use-server.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; const options = { cert: require('fs').readFileSync(__dirname + '/ec-cert.pem'), diff --git a/test/test-http-inject-recursion.js b/test/test-http-inject-recursion.js index 933b86d..42f89b7 100644 --- a/test/test-http-inject-recursion.js +++ b/test/test-http-inject-recursion.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; // Test framework. const debug = require('debug')('appmetrics-prometheus:test'); diff --git a/test/test-https-injection.js b/test/test-https-injection.js index 8cd72c9..d4906f2 100644 --- a/test/test-https-injection.js +++ b/test/test-https-injection.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; // Test framework. const debug = require('debug')('appmetrics-prometheus:test'); diff --git a/test/test-loopback-injection.js b/test/test-loopback-injection.js index b077a2a..6d9e16e 100644 --- a/test/test-loopback-injection.js +++ b/test/test-loopback-injection.js @@ -1,4 +1,19 @@ -'use strict'; +/******************************************************************************* + * Copyright 2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ + 'use strict'; // Test framework. const request = require('request'); From b16427113c3acdf4956edf83cfa697a6804d64bd Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 10:59:13 +0100 Subject: [PATCH 5/6] add license to test --- test/apps/lb-3/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/apps/lb-3/package.json b/test/apps/lb-3/package.json index 5855086..faf5de7 100644 --- a/test/apps/lb-3/package.json +++ b/test/apps/lb-3/package.json @@ -26,6 +26,6 @@ "type": "", "url": "" }, - "license": "UNLICENSED", + "license": "Apache-2.0", "description": "lb-3" } From 155486018e11ba89c0dc566e07ca94758cb751a7 Mon Sep 17 00:00:00 2001 From: Toby Corbin Date: Tue, 17 Oct 2017 11:47:20 +0100 Subject: [PATCH 6/6] fix eslint problems --- test/ex-use-express.js | 2 +- test/ex-use-server.js | 2 +- test/test-http-inject-recursion.js | 2 +- test/test-https-injection.js | 2 +- test/test-loopback-injection.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ex-use-express.js b/test/ex-use-express.js index a463b50..1920c28 100644 --- a/test/ex-use-express.js +++ b/test/ex-use-express.js @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ - 'use strict'; +'use strict'; require('../').monitor({ port: 'PORT' in process.env ? process.env.PORT : 3000, diff --git a/test/ex-use-server.js b/test/ex-use-server.js index 2734b29..9038321 100644 --- a/test/ex-use-server.js +++ b/test/ex-use-server.js @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ - 'use strict'; +'use strict'; const options = { cert: require('fs').readFileSync(__dirname + '/ec-cert.pem'), diff --git a/test/test-http-inject-recursion.js b/test/test-http-inject-recursion.js index 42f89b7..00df07c 100644 --- a/test/test-http-inject-recursion.js +++ b/test/test-http-inject-recursion.js @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ - 'use strict'; +'use strict'; // Test framework. const debug = require('debug')('appmetrics-prometheus:test'); diff --git a/test/test-https-injection.js b/test/test-https-injection.js index d4906f2..7638636 100644 --- a/test/test-https-injection.js +++ b/test/test-https-injection.js @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ - 'use strict'; +'use strict'; // Test framework. const debug = require('debug')('appmetrics-prometheus:test'); diff --git a/test/test-loopback-injection.js b/test/test-loopback-injection.js index 6d9e16e..4ad4dc7 100644 --- a/test/test-loopback-injection.js +++ b/test/test-loopback-injection.js @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ - 'use strict'; +'use strict'; // Test framework. const request = require('request');