[Pkg-javascript-commits] [node-requires-port] 03/04: Imported Upstream version 1.0.0

Thorsten Alteholz alteholz at moszumanska.debian.org
Sat Feb 6 18:43:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-requires-port.

commit 5d6bde138dded0ff4243c8d702652baca6da539e
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Sat Feb 6 19:43:30 2016 +0100

    Imported Upstream version 1.0.0
---
 .travis.yml  | 17 ++++-------------
 index.js     |  2 +-
 package.json | 16 ++++++++--------
 test.js      | 10 +++++-----
 4 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 22ebb02..0765106 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,25 +1,16 @@
+sudo: false
 language: node_js
 node_js:
+  - "4"
+  - "iojs"
   - "0.12"
-  - "0.11"
   - "0.10"
-  - "0.9"
-  - "0.8"
-  - "iojs-v1.1"
-  - "iojs-v1.0"
-before_install:
-  - "npm install -g npm at 1.4.x"
 script:
   - "npm run test-travis"
 after_script:
-  - "npm install coveralls at 2.11.x && cat coverage/lcov.info | coveralls"
+  - "npm install coveralls at 2 && cat coverage/lcov.info | coveralls"
 matrix:
   fast_finish: true
-  allow_failures:
-    - node_js: "0.11"
-    - node_js: "0.9"
-    - node_js: "iojs-v1.1"
-    - node_js: "iojs-v1.0"
 notifications:
   irc:
     channels:
diff --git a/index.js b/index.js
index 9ecfae3..4f267b2 100644
--- a/index.js
+++ b/index.js
@@ -25,7 +25,7 @@ module.exports = function required(port, protocol) {
     return port !== 443;
 
     case 'ftp':
-    return port !== 22;
+    return port !== 21;
 
     case 'gopher':
     return port !== 70;
diff --git a/package.json b/package.json
index 4159070..c113b4b 100644
--- a/package.json
+++ b/package.json
@@ -1,14 +1,14 @@
 {
   "name": "requires-port",
-  "version": "0.0.1",
+  "version": "1.0.0",
   "description": "Check if a protocol requires a certain port number to be added to an URL.",
   "main": "index.js",
   "scripts": {
     "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
-    "test": "mocha test.js",
+    "test-travis": "istanbul cover _mocha --report lcovonly -- test.js",
+    "coverage": "istanbul cover _mocha -- test.js",
     "watch": "mocha --watch test.js",
-    "coverage": "istanbul cover ./node_modules/.bin/_mocha -- test.js",
-    "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"
+    "test": "mocha test.js"
   },
   "repository": {
     "type": "git",
@@ -39,9 +39,9 @@
   },
   "homepage": "https://github.com/unshiftio/requires-port",
   "devDependencies": {
-    "assume": "1.1.x",
-    "istanbul": "0.3.x",
-    "mocha": "2.1.x",
-    "pre-commit": "1.0.x"
+    "assume": "1.3.x",
+    "istanbul": "0.4.x",
+    "mocha": "2.3.x",
+    "pre-commit": "1.1.x"
   }
 }
diff --git a/test.js b/test.js
index abd6bcb..93a0c74 100644
--- a/test.js
+++ b/test.js
@@ -72,11 +72,11 @@ describe('requires-port', function () {
     assume(required(8080, 'wss://www.google.com')).true();
   });
 
-  it('does not require port 22 for ftp', function () {
-    assume(required('22', 'ftp')).false();
-    assume(required(22, 'ftp')).false();
-    assume(required(22, 'ftp://')).false();
-    assume(required(22, 'ftp://www.google.com')).false();
+  it('does not require port 21 for ftp', function () {
+    assume(required('21', 'ftp')).false();
+    assume(required(21, 'ftp')).false();
+    assume(required(21, 'ftp://')).false();
+    assume(required(21, 'ftp://www.google.com')).false();
 
     assume(required('8080', 'ftp')).true();
     assume(required(8080, 'ftp')).true();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-requires-port.git



More information about the Pkg-javascript-commits mailing list