[Pkg-javascript-commits] [node-tap-mocha-reporter] 123/137: Finalize

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:32 UTC 2017


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

rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.

commit ad719243a4969bb58f03c3132fee257271973620
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Tue Aug 22 23:13:17 2017 +0200

    Finalize
---
 debian/changelog |  6 +++---
 debian/control   | 31 +++++++++++++++++++++----------
 debian/rules     | 27 +++++++++++++++++++++------
 3 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 53905f6..010e5c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-node-tap-mocha-reporter (3.0.6-1) UNRELEASED; urgency=low
+node-tap-mocha-reporter (3.0.6-1) unstable; urgency=low
 
-  * Initial release (Closes: #nnnn)
+  * Initial release (Closes: #872947)
 
- -- Bastien Roucariès <rouca at debian.org>  Mon, 21 Aug 2017 22:56:37 +0200
+ -- Bastien Roucariès <rouca at debian.org>  Tue, 22 Aug 2017 22:30:33 +0200
 
diff --git a/debian/control b/debian/control
index d7cc7a5..a60aa19 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
 Source: node-tap-mocha-reporter
-Section: web
+Section: javascript
 Priority: optional
 Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
 Uploaders: Bastien Roucariès <rouca at debian.org>
@@ -7,14 +7,16 @@ Build-Depends:
  debhelper (>= 10)
  , dh-buildinfo
  , nodejs (>= 6)
- , node-js-yaml (>= 3.3.1)
- , node-debug (>= 2.1.3)
- , node-supports-color (>= 3)
- , node-escape-string-regexp (>= 1.0.3)
- , node-tap-parser (>= 3)
- , node-glob (>= 7.0.5)
- , node-diff (>= 1.3.2)
-Standards-Version: 3.9.8
+ , node-js-yaml (>= 3.3.1) <!nocheck>
+ , node-debug (>= 2.1.3) <!nocheck>
+ , node-supports-color (>= 3) <!nocheck>
+ , node-escape-string-regexp (>= 1.0.3 ) <!nocheck>
+ , node-tap-parser (>= 3) <!nocheck>
+ , node-glob (>= 7.0.5) <!nocheck>
+ , node-diff (>= 1.3.2) <!nocheck>
+ , node-tap (>= 8.0) <!nocheck>
+ , docbook2x <!nodoc>
+Standards-Version: 4.0.1
 Homepage: https://github.com/isaacs/tap-mocha-reporter
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-tap-mocha-reporter.git
@@ -31,7 +33,16 @@ Depends:
  , node-tap-parser (>= 3)
  , node-glob (>= 7.0.5)
  , node-diff (>= 1.3.2)
+Enhances: node-tap
 Description: Format a TAP stream using Mocha's set of reporters
- FIX_ME long description
+ This module allows one to format node-tap output like output
+ of Mocha test framework.
+ .
+ node-tap is a Node.js implementation of TAP a simple text-based interface
+ shared between testing modules implemented in many popular languages.
+ .
+ Mocha is a feature-rich JavaScript test framework running
+ on Node.js and browser, making asynchronous testing
+ simple.
  .
  Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/rules b/debian/rules
index e162595..765589f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,22 +24,31 @@ define newline
 
 endef
 space := $(subst ,, )
+# remove new line
+RAW2LINE:=$(subst $(newline),,$(1))
 
 # find all reporter supported
 define FIND_REPORTER_JS_RAW
     'use strict';
     try {
 	var F = require('$(TAP_MOCHA_JSPATH)');
-	process.stdout.write(F.types.join(' '));
+	var s = F.types.join(' ')
+		.replace(/\s*$$/g,'')
+		.replace(/^\s*/g,'')
+		.replace(/^\s+/g,' ');
+	process.stdout.write(s);
 	process.exit(0);
     }
     catch (e) {
+	process.stderr.write(e);
 	process.exit(1);
     }
 endef
+
+
 FIND_REPORTER_JS:=$(subst $(newline),,$(FIND_REPORTER_JS_RAW))
-REPORTER_LIST_RAW:=$(shell set -e; node -pe "$(FIND_REPORTER_JS)" | sed -E -e 's/[[:space:]]+/ /g')
-REPORTER_LIST:=$(subst $(newline), ,$(strip $(REPORTER_LIST_RAW)))
+# shell command to get reporter list
+REPORTER_LIST_CMD:=node -pe "$(FIND_REPORTER_JS)"
 
 %:
 	dh $@
@@ -54,17 +63,23 @@ endif
 
 # run a smoke test
 run_test_suite:
-	$(info List of reporter: $(REPORTER_LIST))
 	set -e; \
-	for r in $(REPORTER_LIST); do  \
+	REPORTER_LIST=`set -e;$(REPORTER_LIST_CMD)`; \
+	echo "List of reporter: $$REPORTER_LIST"; \
+	for r in $$REPORTER_LIST; do  \
 		echo "Use reporter $$r";  \
 		echo "=========================================================" ; \
 		tap test/*.js | $(TAP_MOCHA_INSTALL_PATH) $$r ; \
 		echo "=========================================================" ; \
 	done
 
+override_dh_fixperms:
+	dh_fixperms
+	chmod a+x debian/node-tap-mocha-reporter/usr/lib/nodejs/tap-mocha-reporter/index.js
+
 %.1.xml : %.1.xml.in
-	sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/g" -e 's, at LIST_OFENTRY@,$(subst $(space),</para></listitem><listitem><para>,$(REPORTER_LIST)),g' $< > $@
+	REPORTER_LIST_PARA=`set -e;$(REPORTER_LIST_CMD) | sed s', ,</para></listitem><listitem><para>,g'`;\
+	sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/g" -e "s, at LIST_OFENTRY@,$$REPORTER_LIST_PARA,g" $< > $@
 %.1: %.1.xml
 	cd $(dir $<) &&  docbook2x-man --encoding=utf-8 $(notdir $<)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git



More information about the Pkg-javascript-commits mailing list