From 02199b0932b7b5bf291f19a4ce43a0526f755870 Mon Sep 17 00:00:00 2001 From: Matthew O'Connor Date: Thu, 21 Apr 2016 10:14:16 +0100 Subject: [PATCH 1/2] sample data added to readme --- CHANGELOG.md | 1 + README.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 537840e..522aa34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * toolbag removed. * Checking that github url exists before trying to extract user and repo * Stars, forks and watches are now assigned 0 instead of an empty string if repo.* is empty +* Sample data added to Readme. ## 10 April - 6.2.0 diff --git a/README.md b/README.md index bf2d785..ebb28bd 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,25 @@ all available variable names. - Change the registry used to validate the module name. - Defaults to `http://registry.npmjs.org/`. + ## Sample Data + ```json + { + "entity$": "-\/-\/github_cache", + "name": "fuge", + "user": "apparatus", + "repo": "fuge", + "stars": 155, + "watches": 15, + "forks": 18, + "last": "2016-04-09T21:57:45Z", + "urlRepo": "https:\/\/github.com\/apparatus\/fuge", + "urlClone": "git+https:\/\/github.com\/apparatus\/fuge.git", + "urlSsh": "git@github.com:apparatus\/fuge.git", + "pullRequests": 1, + "cached": 1461229347738 +} + ``` + ## Messages Handled This micro-service handles the following messages. From e4c8a73844ad90ec14d44f6506a91fed7224a704 Mon Sep 17 00:00:00 2001 From: Matthew O'Connor Date: Thu, 21 Apr 2016 11:52:41 +0100 Subject: [PATCH 2/2] test script and deps updated along with error msg test script and deps updated updated error message --- lib/github.js | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/github.js b/lib/github.js index 5adc230..a01744d 100644 --- a/lib/github.js +++ b/lib/github.js @@ -59,13 +59,13 @@ function cmdGet (msg, done) { } if (!params.user || !params.repo) { - return done(new Error('not found on npm')) + return done(new Error('not found on github')) } queryGithub(params, done) } else{ - return done(new Error('not found on npm')) + return done(new Error('not found on github')) } }) }) diff --git a/package.json b/package.json index 457473f..d2848cd 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "start": "node srv/start.js", "isolated": "GITHUB_ISOLATED=true node srv/start.js", "lint": "lab -P test -dL", - "test": "lab -m 5000 -t 75 -v -P test", + "test": "lab -v -P test -L -c -t 64", "cov": "lab -s -P test -r lcov | coveralls" }, "main": "lib/github.js", @@ -35,6 +35,7 @@ "license": "MIT", "dependencies": { "github4": "0.5.4", + "proxyquire": "1.7.4", "request": "2.70.0", "seneca": "2.0.0", "seneca-balance-client": "0.4.0",