From d98a33de5c4ed40a0a5cb81d1b485d37f58c2fc5 Mon Sep 17 00:00:00 2001 From: Adam Fortuna Date: Fri, 14 Apr 2017 11:26:19 -0400 Subject: [PATCH] Remove ping code during testing --- .gitignore | 1 + package.json | 8 +++----- ping.js | 31 ------------------------------- 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 ping.js diff --git a/.gitignore b/.gitignore index 14a72c9..45ff9eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ .projects_config +npm-debug.log diff --git a/package.json b/package.json index aa81ddf..7d2fb96 100755 --- a/package.json +++ b/package.json @@ -4,13 +4,11 @@ "description": "Sample Pluralsight Project", "main": "index.js", "scripts": { - "test": "npm-run-all -s test:notify test:code", + "test": "npm-run-all -s test:code", "test:code": "mocha test/", - "test:notify": "mocha --reporter json test/ | node ping.js", "deploy:github-pages": "git push origin master:gh-pages", - "test-watch": "npm-run-all -p -r test-watch:code test-watch:notify", - "test-watch:code": "mocha test/ --bail --watch --watch-extensions html", - "test-watch:notify": "mocha test/ --reporter json --watch --watch-extensions html | node ping.js" + "test-watch": "npm-run-all -p -r test-watch:code", + "test-watch:code": "mocha test/ --bail --watch --watch-extensions html" }, "author": "Adam Fortuna", "license": "MIT", diff --git a/ping.js b/ping.js deleted file mode 100644 index 4ea38e2..0000000 --- a/ping.js +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var stdin = process.openStdin(); - -try { - var uid = fs.readFileSync('./.projects_config', 'utf8'); -} catch(e) { - console.log("\n======\nMake sure to download the '.projects_config' file from the project page on Pluralsight and add it to the root directory of this project then re-run this command.\n======\n\n"); - process.exit(1); -} - -stdin.resume(); -stdin.setEncoding('utf8'); - -// This should be called with a "report" that represents the tests that were run. -stdin.on('data', function(report) { - try { - var parsedData = JSON.parse(report); - - // Send the data over to the Projects application - console.log("Todo: Send report to Pluralsight:", uid) - } catch(e) { - // Skip doing anything with this result - } -}); - -// When running without watch argument, exit after running -stdin.on('end', function () { - process.exit(0); -});