From da355b730bb9b089c66922e57a0168b376948770 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Sun, 16 Feb 2014 12:56:24 -0600 Subject: [PATCH 1/2] Add packages for `npm repo` tests Updated README to show additional mocked packages --- README.md | 6 ++++++ fixtures/test-repo-url-http.json | 15 +++++++++++++++ fixtures/test-repo-url-http/0.0.0.json | 15 +++++++++++++++ fixtures/test-repo-url-http/latest.json | 15 +++++++++++++++ fixtures/test-repo-url-https.json | 1 + .../-/test-repo-url-https-0.0.1.tgz | Bin 0 -> 371 bytes fixtures/test-repo-url-https/0.0.1.json | 1 + fixtures/test-repo-url-https/latest.json | 1 + fixtures/test-repo-url-ssh.json | 1 + .../-/test-repo-url-ssh-0.0.1.tgz | Bin 0 -> 364 bytes fixtures/test-repo-url-ssh/0.0.1.json | 1 + fixtures/test-repo-url-ssh/latest.json | 1 + 12 files changed, 57 insertions(+) create mode 100644 fixtures/test-repo-url-http.json create mode 100644 fixtures/test-repo-url-http/0.0.0.json create mode 100644 fixtures/test-repo-url-http/latest.json create mode 100644 fixtures/test-repo-url-https.json create mode 100644 fixtures/test-repo-url-https/-/test-repo-url-https-0.0.1.tgz create mode 100644 fixtures/test-repo-url-https/0.0.1.json create mode 100644 fixtures/test-repo-url-https/latest.json create mode 100644 fixtures/test-repo-url-ssh.json create mode 100644 fixtures/test-repo-url-ssh/-/test-repo-url-ssh-0.0.1.tgz create mode 100644 fixtures/test-repo-url-ssh/0.0.1.json create mode 100644 fixtures/test-repo-url-ssh/latest.json diff --git a/README.md b/README.md index beaeea5..c72f6a1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ Currently mocked packages are: `npm-test-peer-deps` at 0.0.0, with a peer dependency on `request@0.9.x` and a dependency on `underscore@1.3.1`. +`test-repo-url-http` at 0.0.0 + +`test-repo-url-https` at 0.0.1 + +`test-repo-url-ssh` at 0.0.1 + ##Usage Installing underscore 1.3.1: diff --git a/fixtures/test-repo-url-http.json b/fixtures/test-repo-url-http.json new file mode 100644 index 0000000..c061ada --- /dev/null +++ b/fixtures/test-repo-url-http.json @@ -0,0 +1,15 @@ +{ + "name": "test-repo-url-http", + "version": "0.0.0", + "description": "Test repo with http repository url", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://gitlab.com/evanlucas/test-repo-url-http.git" + }, + "author": "Evan Lucas ", + "license": "ISC" +} diff --git a/fixtures/test-repo-url-http/0.0.0.json b/fixtures/test-repo-url-http/0.0.0.json new file mode 100644 index 0000000..c061ada --- /dev/null +++ b/fixtures/test-repo-url-http/0.0.0.json @@ -0,0 +1,15 @@ +{ + "name": "test-repo-url-http", + "version": "0.0.0", + "description": "Test repo with http repository url", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://gitlab.com/evanlucas/test-repo-url-http.git" + }, + "author": "Evan Lucas ", + "license": "ISC" +} diff --git a/fixtures/test-repo-url-http/latest.json b/fixtures/test-repo-url-http/latest.json new file mode 100644 index 0000000..c061ada --- /dev/null +++ b/fixtures/test-repo-url-http/latest.json @@ -0,0 +1,15 @@ +{ + "name": "test-repo-url-http", + "version": "0.0.0", + "description": "Test repo with http repository url", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://gitlab.com/evanlucas/test-repo-url-http.git" + }, + "author": "Evan Lucas ", + "license": "ISC" +} diff --git a/fixtures/test-repo-url-https.json b/fixtures/test-repo-url-https.json new file mode 100644 index 0000000..cd4812c --- /dev/null +++ b/fixtures/test-repo-url-https.json @@ -0,0 +1 @@ +{"_id":"test-repo-url-https","_rev":"4-252d9ae747df7201a8e870dc60464829","name":"test-repo-url-https","description":"Test repo with non-github https repository url","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"test-repo-url-https","version":"0.0.0","description":"Test repo with non-github https repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"http://gitlab.com/evanlucas/test-repo-url-https.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-https@0.0.0","dist":{"shasum":"de1a007b42c5741892aa734921fa1279bf4db2f6","tarball":"http://registry.npmjs.org/test-repo-url-https/-/test-repo-url-https-0.0.0.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}},"0.0.1":{"name":"test-repo-url-https","version":"0.0.1","description":"Test repo with non-github https repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://gitlab.com/evanlucas/test-repo-url-https.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-https@0.0.1","dist":{"shasum":"e05008f3ff82b34f17b1e972454a0ab70a269c7d","tarball":"http://registry.npmjs.org/test-repo-url-https/-/test-repo-url-https-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}}},"readme":"ERROR: No README data found!","maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"time":{"0.0.0":"2014-02-16T18:38:39.564Z","0.0.1":"2014-02-16T18:42:28.053Z"},"readmeFilename":"","_attachments":{}} \ No newline at end of file diff --git a/fixtures/test-repo-url-https/-/test-repo-url-https-0.0.1.tgz b/fixtures/test-repo-url-https/-/test-repo-url-https-0.0.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..40d8213d36ce63f073a5eae4429b934927e7efc2 GIT binary patch literal 371 zcmV-(0gV11iwFP!000001MO2iZ^AGTW#(6$JTR5S4iF?%p-L4)rEcxWVuDNDCU#^y z6jbrwd$uXmiH*bbB^)f7IF@)b=;topYp_6;AH;^-ueJU@mi1>5GSk~8qw%sYpP-C zTw}?VPuL1$rB*(NCNyEuyB4-EvT?`ABUXd2hF9rIP+AQ)cxYD;m_o=(r_COaK2p?N zhFYoCVuwFp^hR2X0WS}tFrOxhQp1ugjL~L>9l!^`HlmPEQmmH*1_KZ~>3|WeJOsAS zzF!FUO_&%3hL-5^n$Q!p&e9Yk6<;NVu2Zq)s%i^v(=#6^@f4?Cymh5Eo@aqYaPO<& z`b2P33(q*8$2lum2xWtiyN6rSKlK0n{f~Q}emuY>dVI70VO@^V&hvDgG0@^#O=vH764wmKz&s-l(Y6Rb)&_ zu3UM;wGm3X9WaVCC&5<>0)qkYt+0>~WbVD%N8e9^ zyT+du?fI6Na-KqFhEK(oaiQu7-!NIV1vA4hA0~F>Qy13SQfa3!M+)3K4&0pRvzj}- z=`@_M5(SsWTey3;CH;N>5AXjl_rv2QT%yMh^Y6#yIR7*oE{S(w Kzk~|_3IG5$m#c~Z literal 0 HcmV?d00001 diff --git a/fixtures/test-repo-url-ssh/0.0.1.json b/fixtures/test-repo-url-ssh/0.0.1.json new file mode 100644 index 0000000..a22151c --- /dev/null +++ b/fixtures/test-repo-url-ssh/0.0.1.json @@ -0,0 +1 @@ +{"name":"test-repo-url-ssh","version":"0.0.1","description":"Test repo with non-github ssh repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@gitlab.com:evanlucas/test-repo-url-ssh.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-ssh@0.0.1","dist":{"shasum":"2a77307e108bfb57107c4c334abb5ef5395dc68a","tarball":"http://registry.npmjs.org/test-repo-url-ssh/-/test-repo-url-ssh-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}} \ No newline at end of file diff --git a/fixtures/test-repo-url-ssh/latest.json b/fixtures/test-repo-url-ssh/latest.json new file mode 100644 index 0000000..a22151c --- /dev/null +++ b/fixtures/test-repo-url-ssh/latest.json @@ -0,0 +1 @@ +{"name":"test-repo-url-ssh","version":"0.0.1","description":"Test repo with non-github ssh repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@gitlab.com:evanlucas/test-repo-url-ssh.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-ssh@0.0.1","dist":{"shasum":"2a77307e108bfb57107c4c334abb5ef5395dc68a","tarball":"http://registry.npmjs.org/test-repo-url-ssh/-/test-repo-url-ssh-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}} \ No newline at end of file From 335c47cc63c99bc1ad482fdd2ee73cc06827806f Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Sun, 16 Feb 2014 13:24:25 -0600 Subject: [PATCH 2/2] Added valid fixture for test-repo-url-http --- fixtures/test-repo-url-http.json | 16 +--------------- .../-/test-repo-url-http-0.0.1.tgz | Bin 0 -> 372 bytes fixtures/test-repo-url-http/0.0.0.json | 15 --------------- fixtures/test-repo-url-http/0.0.1.json | 1 + fixtures/test-repo-url-http/latest.json | 16 +--------------- 5 files changed, 3 insertions(+), 45 deletions(-) create mode 100644 fixtures/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz delete mode 100644 fixtures/test-repo-url-http/0.0.0.json create mode 100644 fixtures/test-repo-url-http/0.0.1.json diff --git a/fixtures/test-repo-url-http.json b/fixtures/test-repo-url-http.json index c061ada..a25d526 100644 --- a/fixtures/test-repo-url-http.json +++ b/fixtures/test-repo-url-http.json @@ -1,15 +1 @@ -{ - "name": "test-repo-url-http", - "version": "0.0.0", - "description": "Test repo with http repository url", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "http://gitlab.com/evanlucas/test-repo-url-http.git" - }, - "author": "Evan Lucas ", - "license": "ISC" -} +{"_id":"test-repo-url-http","_rev":"2-ab911ee92af4c4ad93d44a61b09e073b","name":"test-repo-url-http","description":"Test repo with non-github http repository url","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"test-repo-url-http","version":"0.0.1","description":"Test repo with non-github http repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"http://gitlab.com/evanlucas/test-repo-url-http.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-http@0.0.1","dist":{"shasum":"45c8a39b626c1f83f8b8f53007c2f60eb98eee9d","tarball":"http://registry.npmjs.org/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}}},"readme":"ERROR: No README data found!","maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"time":{"0.0.1":"2014-02-16T19:23:06.941Z"},"readmeFilename":"","_attachments":{}} \ No newline at end of file diff --git a/fixtures/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz b/fixtures/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..4e09b38d524809f299f3698bd85762882e06c1ed GIT binary patch literal 372 zcmV-)0gL`0iwFP!000001MO4KOT#b}-g$q;BZr+_o9ssmLxvzb2;TI#OV-6T+9oAQ z=Z5Tm_a&KAQ1GBbgnm$7`@X#IeQEL6&!!>LQT+DE z*cf_jG{z*uC+kr*%JUrg-!}3UTI;w$D?inVdx2B@CwS=t5XEajW7g}PUrl0>#;ss8fc&v5Lg)XzW5Cf)pZ S=+L3VIq?dyeY5!h3IG5#0", - "license": "ISC" -} diff --git a/fixtures/test-repo-url-http/0.0.1.json b/fixtures/test-repo-url-http/0.0.1.json new file mode 100644 index 0000000..38b15ec --- /dev/null +++ b/fixtures/test-repo-url-http/0.0.1.json @@ -0,0 +1 @@ +{"name":"test-repo-url-http","version":"0.0.1","description":"Test repo with non-github http repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"http://gitlab.com/evanlucas/test-repo-url-http.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-http@0.0.1","dist":{"shasum":"45c8a39b626c1f83f8b8f53007c2f60eb98eee9d","tarball":"http://registry.npmjs.org/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}} \ No newline at end of file diff --git a/fixtures/test-repo-url-http/latest.json b/fixtures/test-repo-url-http/latest.json index c061ada..38b15ec 100644 --- a/fixtures/test-repo-url-http/latest.json +++ b/fixtures/test-repo-url-http/latest.json @@ -1,15 +1 @@ -{ - "name": "test-repo-url-http", - "version": "0.0.0", - "description": "Test repo with http repository url", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "http://gitlab.com/evanlucas/test-repo-url-http.git" - }, - "author": "Evan Lucas ", - "license": "ISC" -} +{"name":"test-repo-url-http","version":"0.0.1","description":"Test repo with non-github http repository url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"http://gitlab.com/evanlucas/test-repo-url-http.git"},"author":{"name":"Evan Lucas","email":"evanlucas@me.com"},"license":"ISC","_id":"test-repo-url-http@0.0.1","dist":{"shasum":"45c8a39b626c1f83f8b8f53007c2f60eb98eee9d","tarball":"http://registry.npmjs.org/test-repo-url-http/-/test-repo-url-http-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"evanlucas","email":"evanlucas@me.com"},"maintainers":[{"name":"evanlucas","email":"evanlucas@me.com"}],"directories":{}} \ No newline at end of file