[Pkg-javascript-commits] [node-locate-path] 03/03: fix copyright & control; add tests
Paolo Greppi
paolog-guest at moszumanska.debian.org
Wed Dec 6 09:07:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
paolog-guest pushed a commit to branch master
in repository node-locate-path.
commit 4f999a362f9ce64695bbe0a75e3509718f42c999
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date: Wed Dec 6 09:19:48 2017 +0100
fix copyright & control; add tests
---
debian/changelog | 10 +++-------
debian/control | 19 +++++++++----------
debian/copyright | 21 +++++++++++++++++++--
debian/patches/00-mocha.diff | 40 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 6 ++----
debian/tests/control | 3 +++
7 files changed, 77 insertions(+), 23 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 930ce06..20eda29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,5 @@
-node-locate-path (2.0.0-1) UNRELEASED; urgency=low
+node-locate-path (2.0.0-1) unstable; urgency=low
- [ FIX_ME debian author Wed, 06 Dec 2017 09:05:04 +0100 ]
- * Initial release (Closes: #nnnn)
+ * Initial release (Closes: #883657)
- [ root ]
- *
-
- -- root <root at debian> Wed, 06 Dec 2017 09:05:13 +0100
+ -- Paolo Greppi <paolo.greppi at libpf.com> Wed, 06 Dec 2017 10:05:47 +0100
diff --git a/debian/control b/debian/control
index eca05f8..c984aef 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,14 @@ Source: node-locate-path
Section: javascript
Priority: optional
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
-Uploaders: FIX_ME debian author
+Uploaders: Paolo Greppi <paolo.greppi at libpf.com>
Build-Depends:
debhelper (>= 9)
, dh-buildinfo
, nodejs
+ , node-p-locate (>= 2.0.0)
+ , node-path-exists (>= 3.0.0)
+ , mocha
Standards-Version: 4.1.1
Homepage: https://github.com/sindresorhus/locate-path#readme
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-locate-path.git
@@ -19,15 +22,11 @@ Depends:
, nodejs
, node-p-locate (>= 2.0.0)
, node-path-exists (>= 3.0.0)
-Description: FIX_ME write the Debian package description
- Write the short and long descriptions for the Debian package as
- explained in the Developer's Reference, §6.2.1 – §6.2.3.
- .
- You can start with the short upstream package description,
- “Get the first path that exists on disk of multiple paths”.
+Description: Get the first path that exists on disk of multiple paths
+ Node.js module to get the first path that exists on disk, from
+ an array of multiple possible paths.
.
- Be aware that most upstream package descriptions are not written to
- conform with Debian package guidelines. You need to explain the role
- of this package for a Debian audience.
+ Provides a synchronous version and an asynchronous version (that
+ returns a promise).
.
Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
index 6595c36..bab18cd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -8,8 +8,8 @@ Copyright: 2017 Sindre Sorhus <sindresorhus at gmail.com> (sindresorhus.com)
License: Expat
Files: debian/*
-Copyright: 2017 FIX_ME debian author
-License: Expat
+Copyright: 2017 Paolo Greppi <paolo.greppi at libpf.com>
+License: GPL-3.0+
License: Expat
Permission is hereby granted, free of charge, to any person
@@ -32,3 +32,20 @@ License: Expat
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
diff --git a/debian/patches/00-mocha.diff b/debian/patches/00-mocha.diff
new file mode 100644
index 0000000..7e91d5e
--- /dev/null
+++ b/debian/patches/00-mocha.diff
@@ -0,0 +1,40 @@
+Description: Change from ava to mocha as test runner (ava is not yet
+ available as a Debian package).
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: node-locate-path/test.js
+===================================================================
+--- node-locate-path.orig/test.js
++++ node-locate-path/test.js
+@@ -1,5 +1,5 @@
+-import test from 'ava';
+-import m from './';
++var assert = require('assert');
++var m = require('./');
+
+ const input = [
+ 'noop.foo',
+@@ -8,14 +8,14 @@ const input = [
+ 'test.js'
+ ];
+
+-test('async', async t => {
+- t.is(await m(input), 'index.js');
+- t.is(await m(['nonexistant']), undefined);
+- t.is(await m(['noop', 'unicorn'], {cwd: 'fixture'}), 'unicorn');
++test('async', function* () {
++ assert.equal(yield m(input), 'index.js');
++ assert.equal(yield m(['nonexistant']), undefined);
++ assert.equal(yield m(['noop', 'unicorn'], { cwd: 'fixture' }), 'unicorn');
+ });
+
+-test('sync', t => {
+- t.is(m.sync(input), 'index.js');
+- t.is(m.sync(['nonexistant']), undefined);
+- t.is(m.sync(['noop', 'unicorn'], {cwd: 'fixture'}), 'unicorn');
++test('sync', function() {
++ assert.equal(m.sync(input), 'index.js');
++ assert.equal(m.sync(['nonexistant']), undefined);
++ assert.equal(m.sync(['noop', 'unicorn'], {cwd: 'fixture'}), 'unicorn');
+ });
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c508ffd
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+00-mocha.diff
diff --git a/debian/rules b/debian/rules
index de57af0..d59f162 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,5 @@
#override_dh_auto_build:
-#override_dh_auto_test:
-
-
-
+override_dh_auto_test:
+ mocha -u tdd -R spec
diff --git a/debian/tests/control b/debian/tests/control
index 8a70b60..3be6c79 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
Tests: require
Depends: node-locate-path
+
+Test-Command: mocha -u tdd -R spec
+Depends: @, @builddeps@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-locate-path.git
More information about the Pkg-javascript-commits
mailing list